1 line
6.5 KiB
JSON
1 line
6.5 KiB
JSON
{"ast":null,"code":"\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\nvar __exportStar = this && this.__exportStar || function (m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports._createClient = exports.createClient = void 0;\nconst api_1 = require(\"@libsql/core/api\");\nconst config_1 = require(\"@libsql/core/config\");\nconst util_1 = require(\"@libsql/core/util\");\nconst ws_js_1 = require(\"./ws.js\");\nconst http_js_1 = require(\"./http.js\");\n__exportStar(require(\"@libsql/core/api\"), exports);\nfunction createClient(config) {\n return _createClient((0, config_1.expandConfig)(config, true));\n}\nexports.createClient = createClient;\n/** @private */\nfunction _createClient(config) {\n if (config.scheme === \"ws\" || config.scheme === \"wss\") {\n return (0, ws_js_1._createClient)(config);\n } else if (config.scheme === \"http\" || config.scheme === \"https\") {\n return (0, http_js_1._createClient)(config);\n } else {\n throw new api_1.LibsqlError('The client that uses Web standard APIs supports only \"libsql:\", \"wss:\", \"ws:\", \"https:\" and \"http:\" URLs, ' + `got ${JSON.stringify(config.scheme + \":\")}. For more information, please read ${util_1.supportedUrlLink}`, \"URL_SCHEME_NOT_SUPPORTED\");\n }\n}\nexports._createClient = _createClient;","map":{"version":3,"names":["__createBinding","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__exportStar","exports","p","prototype","hasOwnProperty","call","value","_createClient","createClient","api_1","require","config_1","util_1","ws_js_1","http_js_1","config","expandConfig","scheme","LibsqlError","JSON","stringify","supportedUrlLink"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/client/lib-cjs/web.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._createClient = exports.createClient = void 0;\nconst api_1 = require(\"@libsql/core/api\");\nconst config_1 = require(\"@libsql/core/config\");\nconst util_1 = require(\"@libsql/core/util\");\nconst ws_js_1 = require(\"./ws.js\");\nconst http_js_1 = require(\"./http.js\");\n__exportStar(require(\"@libsql/core/api\"), exports);\nfunction createClient(config) {\n return _createClient((0, config_1.expandConfig)(config, true));\n}\nexports.createClient = createClient;\n/** @private */\nfunction _createClient(config) {\n if (config.scheme === \"ws\" || config.scheme === \"wss\") {\n return (0, ws_js_1._createClient)(config);\n }\n else if (config.scheme === \"http\" || config.scheme === \"https\") {\n return (0, http_js_1._createClient)(config);\n }\n else {\n throw new api_1.LibsqlError('The client that uses Web standard APIs supports only \"libsql:\", \"wss:\", \"ws:\", \"https:\" and \"http:\" URLs, ' +\n `got ${JSON.stringify(config.scheme + \":\")}. For more information, please read ${util_1.supportedUrlLink}`, \"URL_SCHEME_NOT_SUPPORTED\");\n }\n}\nexports._createClient = _createClient;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,eAAe,GAAI,IAAI,I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