1 line
2.6 KiB
JSON
1 line
2.6 KiB
JSON
{"ast":null,"code":"import { expandConfig } from \"@libsql/core/config\";\nimport { _createClient as _createSqlite3Client } from \"./sqlite3.js\";\nimport { _createClient as _createWsClient } from \"./ws.js\";\nimport { _createClient as _createHttpClient } from \"./http.js\";\nexport * from \"@libsql/core/api\";\n/** Creates a {@link Client} object.\n *\n * You must pass at least an `url` in the {@link Config} object.\n */\nexport function createClient(config) {\n return _createClient(expandConfig(config, true));\n}\nfunction _createClient(config) {\n if (config.scheme === \"wss\" || config.scheme === \"ws\") {\n return _createWsClient(config);\n } else if (config.scheme === \"https\" || config.scheme === \"http\") {\n return _createHttpClient(config);\n } else {\n return _createSqlite3Client(config);\n }\n}","map":{"version":3,"names":["expandConfig","_createClient","_createSqlite3Client","_createWsClient","_createHttpClient","createClient","config","scheme"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/client/lib-esm/node.js"],"sourcesContent":["import { expandConfig } from \"@libsql/core/config\";\nimport { _createClient as _createSqlite3Client } from \"./sqlite3.js\";\nimport { _createClient as _createWsClient } from \"./ws.js\";\nimport { _createClient as _createHttpClient } from \"./http.js\";\nexport * from \"@libsql/core/api\";\n/** Creates a {@link Client} object.\n *\n * You must pass at least an `url` in the {@link Config} object.\n */\nexport function createClient(config) {\n return _createClient(expandConfig(config, true));\n}\nfunction _createClient(config) {\n if (config.scheme === \"wss\" || config.scheme === \"ws\") {\n return _createWsClient(config);\n }\n else if (config.scheme === \"https\" || config.scheme === \"http\") {\n return _createHttpClient(config);\n }\n else {\n return _createSqlite3Client(config);\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,IAAIC,oBAAoB,QAAQ,cAAc;AACpE,SAASD,aAAa,IAAIE,eAAe,QAAQ,SAAS;AAC1D,SAASF,aAAa,IAAIG,iBAAiB,QAAQ,WAAW;AAC9D,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,MAAM,EAAE;EACjC,OAAOL,aAAa,CAACD,YAAY,CAACM,MAAM,EAAE,IAAI,CAAC,CAAC;AACpD;AACA,SAASL,aAAaA,CAACK,MAAM,EAAE;EAC3B,IAAIA,MAAM,CAACC,MAAM,KAAK,KAAK,IAAID,MAAM,CAACC,MAAM,KAAK,IAAI,EAAE;IACnD,OAAOJ,eAAe,CAACG,MAAM,CAAC;EAClC,CAAC,MACI,IAAIA,MAAM,CAACC,MAAM,KAAK,OAAO,IAAID,MAAM,CAACC,MAAM,KAAK,MAAM,EAAE;IAC5D,OAAOH,iBAAiB,CAACE,MAAM,CAAC;EACpC,CAAC,MACI;IACD,OAAOJ,oBAAoB,CAACI,MAAM,CAAC;EACvC;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |