1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
{"ast":null,"code":"import { LibsqlError } from \"@libsql/core/api\";\nimport { expandConfig } from \"@libsql/core/config\";\nimport { supportedUrlLink } from \"@libsql/core/util\";\nimport { _createClient as _createWsClient } from \"./ws.js\";\nimport { _createClient as _createHttpClient } from \"./http.js\";\nexport * from \"@libsql/core/api\";\nexport function createClient(config) {\n return _createClient(expandConfig(config, true));\n}\n/** @private */\nexport function _createClient(config) {\n if (config.scheme === \"ws\" || config.scheme === \"wss\") {\n return _createWsClient(config);\n } else if (config.scheme === \"http\" || config.scheme === \"https\") {\n return _createHttpClient(config);\n } else {\n throw new 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 ${supportedUrlLink}`, \"URL_SCHEME_NOT_SUPPORTED\");\n }\n}","map":{"version":3,"names":["LibsqlError","expandConfig","supportedUrlLink","_createClient","_createWsClient","_createHttpClient","createClient","config","scheme","JSON","stringify"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/client/lib-esm/web.js"],"sourcesContent":["import { LibsqlError } from \"@libsql/core/api\";\nimport { expandConfig } from \"@libsql/core/config\";\nimport { supportedUrlLink } from \"@libsql/core/util\";\nimport { _createClient as _createWsClient } from \"./ws.js\";\nimport { _createClient as _createHttpClient } from \"./http.js\";\nexport * from \"@libsql/core/api\";\nexport function createClient(config) {\n return _createClient(expandConfig(config, true));\n}\n/** @private */\nexport function _createClient(config) {\n if (config.scheme === \"ws\" || config.scheme === \"wss\") {\n return _createWsClient(config);\n }\n else if (config.scheme === \"http\" || config.scheme === \"https\") {\n return _createHttpClient(config);\n }\n else {\n throw new 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 ${supportedUrlLink}`, \"URL_SCHEME_NOT_SUPPORTED\");\n }\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,gBAAgB,QAAQ,mBAAmB;AACpD,SAASC,aAAa,IAAIC,eAAe,QAAQ,SAAS;AAC1D,SAASD,aAAa,IAAIE,iBAAiB,QAAQ,WAAW;AAC9D,cAAc,kBAAkB;AAChC,OAAO,SAASC,YAAYA,CAACC,MAAM,EAAE;EACjC,OAAOJ,aAAa,CAACF,YAAY,CAACM,MAAM,EAAE,IAAI,CAAC,CAAC;AACpD;AACA;AACA,OAAO,SAASJ,aAAaA,CAACI,MAAM,EAAE;EAClC,IAAIA,MAAM,CAACC,MAAM,KAAK,IAAI,IAAID,MAAM,CAACC,MAAM,KAAK,KAAK,EAAE;IACnD,OAAOJ,eAAe,CAACG,MAAM,CAAC;EAClC,CAAC,MACI,IAAIA,MAAM,CAACC,MAAM,KAAK,MAAM,IAAID,MAAM,CAACC,MAAM,KAAK,OAAO,EAAE;IAC5D,OAAOH,iBAAiB,CAACE,MAAM,CAAC;EACpC,CAAC,MACI;IACD,MAAM,IAAIP,WAAW,CAAC,4GAA4G,GAC9H,OAAOS,IAAI,CAACC,SAAS,CAACH,MAAM,CAACC,MAAM,GAAG,GAAG,CAAC,uCAAuCN,gBAAgB,EAAE,EAAE,0BAA0B,CAAC;EACxI;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |