the-forest/client/node_modules/.cache/babel-loader/f92c08201c9a0d2e79495d8c32fd94a889d444e08953cda91333bbfa86eddc3a.json

1 line
6.5 KiB
JSON
Raw Normal View History

2024-09-17 20:35:18 -04:00
{"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