logixia 1.0.3 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +523 -2852
  2. package/dist/{build-C67p8wVr.js → build-DIEB3doa.js} +7 -2
  3. package/dist/build-DIEB3doa.js.map +1 -0
  4. package/dist/{build-MpmEusc_.mjs → build-MmD3T4bV.mjs} +8 -3
  5. package/dist/build-MmD3T4bV.mjs.map +1 -0
  6. package/dist/{chunk-C41Io3cc.mjs → chunk-uEZWKkIX.mjs} +1 -1
  7. package/dist/{esm-BYmTa3gi.mjs → esm-BRY8ugtK.mjs} +438 -276
  8. package/dist/esm-BRY8ugtK.mjs.map +1 -0
  9. package/dist/{esm-BTpcNBX_.js → esm-CzjF801-.js} +437 -275
  10. package/dist/esm-CzjF801-.js.map +1 -0
  11. package/dist/index.d.mts +1012 -95
  12. package/dist/index.d.mts.map +1 -1
  13. package/dist/index.d.ts +1012 -95
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +3558 -1435
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +3517 -1408
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/{lib-DvMm_tAr.mjs → lib-BNWFXK2z.mjs} +2211 -786
  20. package/dist/lib-BNWFXK2z.mjs.map +1 -0
  21. package/dist/{lib-xHiD5O-N.js → lib-Bb_wxP5g.js} +2210 -785
  22. package/dist/lib-Bb_wxP5g.js.map +1 -0
  23. package/dist/{promise-CnIyndHL.mjs → promise-BAWXE7C8.mjs} +820 -1449
  24. package/dist/promise-BAWXE7C8.mjs.map +1 -0
  25. package/dist/{promise-C7YeyZbJ.js → promise-Tbon3Kaq.js} +819 -1448
  26. package/dist/promise-Tbon3Kaq.js.map +1 -0
  27. package/dist/{sqlite3--ZdiJYT3.mjs → sqlite3-BUpkBlte.mjs} +2 -2
  28. package/dist/{sqlite3--ZdiJYT3.mjs.map → sqlite3-BUpkBlte.mjs.map} +1 -1
  29. package/package.json +124 -53
  30. package/dist/build-C67p8wVr.js.map +0 -1
  31. package/dist/build-MpmEusc_.mjs.map +0 -1
  32. package/dist/esm-BTpcNBX_.js.map +0 -1
  33. package/dist/esm-BYmTa3gi.mjs.map +0 -1
  34. package/dist/lib-DvMm_tAr.mjs.map +0 -1
  35. package/dist/lib-xHiD5O-N.js.map +0 -1
  36. package/dist/promise-C7YeyZbJ.js.map +0 -1
  37. package/dist/promise-CnIyndHL.mjs.map +0 -1
@@ -3,6 +3,7 @@ const require_chunk = require('./chunk-BTgCAUrQ.js');
3
3
  //#region node_modules/sqlite/build/utils/format-error.js
4
4
  var require_format_error = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/sqlite/build/utils/format-error.js": ((exports) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.formatError = void 0;
6
7
  function formatError(err) {
7
8
  if (err instanceof Error) return err;
8
9
  if (typeof err === "object") {
@@ -21,6 +22,7 @@ var require_format_error = /* @__PURE__ */ require_chunk.__commonJS({ "node_modu
21
22
  //#region node_modules/sqlite/build/Statement.js
22
23
  var require_Statement = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/sqlite/build/Statement.js": ((exports) => {
23
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Statement = void 0;
24
26
  const format_error_1$1 = require_format_error();
25
27
  /**
26
28
  * Promisified wrapper for the sqlite3#Statement interface.
@@ -176,6 +178,7 @@ var require_Statement = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules
176
178
  //#region node_modules/sqlite/build/utils/migrate.js
177
179
  var require_migrate = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/sqlite/build/utils/migrate.js": ((exports) => {
178
180
  Object.defineProperty(exports, "__esModule", { value: true });
181
+ exports.migrate = exports.readMigrations = void 0;
179
182
  const fs = require("fs");
180
183
  const path = require("path");
181
184
  async function readMigrations(migrationPath) {
@@ -253,6 +256,7 @@ var require_migrate = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/s
253
256
  //#region node_modules/sqlite/build/utils/strings.js
254
257
  var require_strings = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/sqlite/build/utils/strings.js": ((exports) => {
255
258
  Object.defineProperty(exports, "__esModule", { value: true });
259
+ exports.toSqlParams = void 0;
256
260
  /**
257
261
  * Allows for using strings and `sql-template-strings`. Converts both to a
258
262
  * format that's usable by the SQL methods
@@ -277,6 +281,7 @@ var require_strings = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/s
277
281
  //#region node_modules/sqlite/build/Database.js
278
282
  var require_Database = /* @__PURE__ */ require_chunk.__commonJS({ "node_modules/sqlite/build/Database.js": ((exports) => {
279
283
  Object.defineProperty(exports, "__esModule", { value: true });
284
+ exports.Database = void 0;
280
285
  const Statement_1 = require_Statement();
281
286
  const migrate_1 = require_migrate();
282
287
  const strings_1 = require_strings();
@@ -521,11 +526,11 @@ var import_Database = /* @__PURE__ */ require_chunk.__toESM(require_Database(),
521
526
  * Opens a database for manipulation. Most users will call this to get started.
522
527
  */
523
528
  async function open(config) {
524
- const db = new import_Database.Database(config);
529
+ const db = new import_Database.default.Database(config);
525
530
  await db.open();
526
531
  return db;
527
532
  }
528
533
 
529
534
  //#endregion
530
535
  exports.open = open;
531
- //# sourceMappingURL=build-C67p8wVr.js.map
536
+ //# sourceMappingURL=build-DIEB3doa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-DIEB3doa.js","names":["format_error_1","Database","path","Database"],"sources":["../node_modules/sqlite/build/utils/format-error.js","../node_modules/sqlite/build/Statement.js","../node_modules/sqlite/build/utils/migrate.js","../node_modules/sqlite/build/utils/strings.js","../node_modules/sqlite/build/Database.js","../node_modules/sqlite/build/index.mjs"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatError = void 0;\nfunction formatError(err) {\n if (err instanceof Error) {\n return err;\n }\n if (typeof err === 'object') {\n const newError = new Error();\n for (let prop in err) {\n newError[prop] = err[prop];\n }\n // message isn't part of the enumerable set\n if (err.message) {\n newError.message = err.message;\n }\n return newError;\n }\n if (typeof err === 'string') {\n return new Error(err);\n }\n return new Error(err);\n}\nexports.formatError = formatError;\n//# sourceMappingURL=format-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Statement = void 0;\nconst format_error_1 = require(\"./utils/format-error\");\n/**\n * Promisified wrapper for the sqlite3#Statement interface.\n */\nclass Statement {\n constructor(stmt) {\n this.stmt = stmt;\n }\n /**\n * Returns the underlying sqlite3 Statement instance\n */\n getStatementInstance() {\n return this.stmt;\n }\n /**\n * Binds parameters to the prepared statement.\n *\n * Binding parameters with this function completely resets the statement object and row cursor\n * and removes all previously bound parameters, if any.\n */\n bind(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.bind(...params, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Resets the row cursor of the statement and preserves the parameter bindings.\n * Use this function to re-execute the same query with the same bindings.\n */\n reset() {\n return new Promise(resolve => {\n this.stmt.reset(() => {\n resolve();\n });\n });\n }\n /**\n * Finalizes the statement. This is typically optional, but if you experience long delays before\n * the next query is executed, explicitly finalizing your statement might be necessary.\n * This might be the case when you run an exclusive query (see section Control Flow).\n * After the statement is finalized, all further function calls on that statement object\n * will throw errors.\n */\n finalize() {\n return new Promise((resolve, reject) => {\n this.stmt.finalize(err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Binds parameters and executes the statement.\n *\n * If you specify bind parameters, they will be bound to the statement before it is executed.\n * Note that the bindings and the row cursor are reset when you specify even a single bind parameter.\n *\n * The execution behavior is identical to the Database#run method with the difference that the\n * statement will not be finalized after it is run. This means you can run it multiple times.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n */\n run(...params) {\n return new Promise((resolve, reject) => {\n const stmt = this;\n this.stmt.run(...params, function (err) {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve({\n stmt,\n lastID: this.lastID,\n changes: this.changes\n });\n });\n });\n }\n /**\n * Binds parameters, executes the statement and retrieves the first result row.\n * The parameters are the same as the Statement#run function, with the following differences:\n *\n * Using this method can leave the database locked, as the database awaits further\n * calls to Statement#get to retrieve subsequent rows. To inform the database that you\n * are finished retrieving rows, you should either finalize (with Statement#finalize)\n * or reset (with Statement#reset) the statement.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n */\n get(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.get(...params, (err, row) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(row);\n });\n });\n }\n /**\n * Binds parameters, executes the statement and calls the callback with all result rows.\n * The parameters are the same as the Statement#run function, with the following differences:\n *\n * If the result set is empty, it will resolve to an empty array, otherwise it contains an\n * object for each result row which in turn contains the values of that row.\n * Like with Statement#run, the statement will not be finalized after executing this function.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseallsql-param--callback\n */\n all(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.all(...params, (err, rows) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(rows);\n });\n });\n }\n each(...params) {\n return new Promise((resolve, reject) => {\n const callback = params.pop();\n if (!callback || typeof callback !== 'function') {\n throw new Error('sqlite: Last param of Statement#each() must be a callback function');\n }\n if (params.length > 0) {\n const positional = params.pop();\n if (typeof positional === 'function') {\n throw new Error('sqlite: Statement#each() should only have a single callback defined. See readme for usage.');\n }\n params.push(positional);\n }\n this.stmt.each(...params, (err, row) => {\n if (err) {\n return callback((0, format_error_1.formatError)(err), null);\n }\n callback(null, row);\n }, (err, count) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(count);\n });\n });\n }\n}\nexports.Statement = Statement;\n//# sourceMappingURL=Statement.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.migrate = exports.readMigrations = void 0;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nasync function readMigrations(migrationPath) {\n const migrationsPath = migrationPath || path.join(process.cwd(), 'migrations');\n const location = path.resolve(migrationsPath);\n // Get the list of migration files, for example:\n // { id: 1, name: 'initial', filename: '001-initial.sql' }\n // { id: 2, name: 'feature', filename: '002-feature.sql' }\n const migrationFiles = await new Promise((resolve, reject) => {\n fs.readdir(location, (err, files) => {\n if (err) {\n return reject(err);\n }\n resolve(files\n .map(x => x.match(/^(\\d+).(.*?)\\.sql$/))\n .filter(x => x !== null)\n .map(x => ({ id: Number(x[1]), name: x[2], filename: x[0] }))\n .sort((a, b) => Math.sign(a.id - b.id)));\n });\n });\n if (!migrationFiles.length) {\n throw new Error(`No migration files found in '${location}'.`);\n }\n // Get the list of migrations, for example:\n // { id: 1, name: 'initial', filename: '001-initial.sql', up: ..., down: ... }\n // { id: 2, name: 'feature', filename: '002-feature.sql', up: ..., down: ... }\n return Promise.all(migrationFiles.map(migration => new Promise((resolve, reject) => {\n const filename = path.join(location, migration.filename);\n fs.readFile(filename, 'utf-8', (err, data) => {\n if (err) {\n return reject(err);\n }\n const [up, down] = data.split(/^--\\s+?down\\b/im);\n const migrationData = migration;\n migrationData.up = up.replace(/^-- .*?$/gm, '').trim(); // Remove comments\n migrationData.down = down ? down.trim() : ''; // and trim whitespaces\n resolve(migrationData);\n });\n })));\n}\nexports.readMigrations = readMigrations;\n/**\n * Migrates database schema to the latest version\n */\nasync function migrate(db, config = {}) {\n config.force = config.force || false;\n config.table = config.table || 'migrations';\n const { force, table } = config;\n const migrations = config.migrations\n ? config.migrations\n : await readMigrations(config.migrationsPath);\n // Create a database table for migrations meta data if it doesn't exist\n await db.run(`CREATE TABLE IF NOT EXISTS \"${table}\" (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n up TEXT NOT NULL,\n down TEXT NOT NULL\n)`);\n // Get the list of already applied migrations\n let dbMigrations = await db.all(`SELECT id, name, up, down FROM \"${table}\" ORDER BY id ASC`);\n // Undo migrations that exist only in the database but not in files,\n // also undo the last migration if the `force` option is enabled.\n const lastMigration = migrations[migrations.length - 1];\n for (const migration of dbMigrations\n .slice()\n .sort((a, b) => Math.sign(b.id - a.id))) {\n if (!migrations.some(x => x.id === migration.id) ||\n (force && migration.id === lastMigration.id)) {\n await db.run('BEGIN');\n try {\n await db.exec(migration.down);\n await db.run(`DELETE FROM \"${table}\" WHERE id = ?`, migration.id);\n await db.run('COMMIT');\n dbMigrations = dbMigrations.filter(x => x.id !== migration.id);\n }\n catch (err) {\n await db.run('ROLLBACK');\n throw err;\n }\n }\n else {\n break;\n }\n }\n // Apply pending migrations\n const lastMigrationId = dbMigrations.length\n ? dbMigrations[dbMigrations.length - 1].id\n : 0;\n for (const migration of migrations) {\n if (migration.id > lastMigrationId) {\n await db.run('BEGIN');\n try {\n await db.exec(migration.up);\n await db.run(`INSERT INTO \"${table}\" (id, name, up, down) VALUES (?, ?, ?, ?)`, migration.id, migration.name, migration.up, migration.down);\n await db.run('COMMIT');\n }\n catch (err) {\n await db.run('ROLLBACK');\n throw err;\n }\n }\n }\n}\nexports.migrate = migrate;\n//# sourceMappingURL=migrate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSqlParams = void 0;\n/**\n * Allows for using strings and `sql-template-strings`. Converts both to a\n * format that's usable by the SQL methods\n *\n * @param sql A SQL string or `sql-template-strings` object\n * @param params An array of parameters\n */\nfunction toSqlParams(sql, params = []) {\n if (typeof sql === 'string') {\n return {\n sql,\n params\n };\n }\n return {\n sql: sql.sql,\n params: sql.values\n };\n}\nexports.toSqlParams = toSqlParams;\n//# sourceMappingURL=strings.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Database = void 0;\nconst Statement_1 = require(\"./Statement\");\nconst migrate_1 = require(\"./utils/migrate\");\nconst strings_1 = require(\"./utils/strings\");\nconst format_error_1 = require(\"./utils/format-error\");\n/**\n * Promisified wrapper for the sqlite3#Database interface.\n */\nclass Database {\n constructor(config) {\n this.config = config;\n this.db = null;\n }\n /**\n * Event handler when verbose mode is enabled.\n * @see https://github.com/mapbox/node-sqlite3/wiki/Debugging\n */\n on(event, listener) {\n this.db.on(event, listener);\n }\n /**\n * Returns the underlying sqlite3 Database instance\n */\n getDatabaseInstance() {\n return this.db;\n }\n /**\n * Opens the database\n */\n open() {\n return new Promise((resolve, reject) => {\n let { filename, mode, driver } = this.config;\n // https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback\n if (filename === null || filename === undefined) {\n throw new Error('sqlite: filename cannot be null / undefined');\n }\n if (!driver) {\n throw new Error('sqlite: driver is not defined');\n }\n if (mode) {\n this.db = new driver(filename, mode, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n }\n else {\n this.db = new driver(filename, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n }\n });\n }\n /**\n * Closes the database.\n */\n close() {\n return new Promise((resolve, reject) => {\n this.db.close(err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseconfigureoption-value\n */\n configure(option, value) {\n this.db.configure(option, value);\n }\n /**\n * Runs the SQL query with the specified parameters. It does not retrieve any result data.\n * The function returns the Database object for which it was called to allow for function chaining.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaserunsql-param--callback\n */\n run(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.run(sqlObj.sql, ...sqlObj.params, function (err) {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve({\n stmt: new Statement_1.Statement(this.stmt),\n lastID: this.lastID,\n changes: this.changes\n });\n });\n });\n }\n /**\n * Runs the SQL query with the specified parameters and resolves with\n * with the first result row afterwards. If the result set is empty, returns undefined.\n *\n * The property names correspond to the column names of the result set.\n * It is impossible to access them by column index; the only supported way is by column name.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databasegetsql-param--callback\n */\n get(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.get(sqlObj.sql, ...sqlObj.params, (err, row) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(row);\n });\n });\n }\n each(sql, ...params) {\n return new Promise((resolve, reject) => {\n const callback = params.pop();\n if (!callback || typeof callback !== 'function') {\n throw new Error('sqlite: Last param of Database#each() must be a callback function');\n }\n if (params.length > 0) {\n const positional = params.pop();\n if (typeof positional === 'function') {\n throw new Error('sqlite: Database#each() should only have a single callback defined. See readme for usage.');\n }\n params.push(positional);\n }\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.each(sqlObj.sql, ...sqlObj.params, (err, row) => {\n if (err) {\n return callback((0, format_error_1.formatError)(err), null);\n }\n callback(null, row);\n }, (err, count) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(count);\n });\n });\n }\n /**\n * Runs the SQL query with the specified parameters. The parameters are the same as the\n * Database#run function, with the following differences:\n *\n * If the result set is empty, it will be an empty array, otherwise it will\n * have an object for each result row which\n * in turn contains the values of that row, like the Database#get function.\n *\n * Note that it first retrieves all result rows and stores them in memory.\n * For queries that have potentially large result sets, use the Database#each\n * function to retrieve all rows or Database#prepare followed by multiple\n * Statement#get calls to retrieve a previously unknown amount of rows.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseallsql-param--callback\n */\n all(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.all(sqlObj.sql, ...sqlObj.params, (err, rows) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(rows);\n });\n });\n }\n /**\n * Runs all SQL queries in the supplied string. No result rows are retrieved. If a query fails,\n * no subsequent statements will be executed (wrap it in a transaction if you want all\n * or none to be executed).\n *\n * Note: This function will only execute statements up to the first NULL byte.\n * Comments are not allowed and will lead to runtime errors.\n *\n * @param {string} sql The SQL query to run.\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseexecsql-callback\n */\n exec(sql) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql);\n this.db.exec(sqlObj.sql, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Prepares the SQL statement and optionally binds the specified parameters.\n * When bind parameters are supplied, they are bound to the prepared statement.\n *\n * @param {string} sql The SQL query to run.\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n * @returns Promise<Statement> Statement object\n */\n prepare(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n const stmt = this.db.prepare(sqlObj.sql, ...sqlObj.params, err => {\n if (err) {\n return reject(err);\n }\n resolve(new Statement_1.Statement(stmt));\n });\n });\n }\n /**\n * Loads a compiled SQLite extension into the database connection object.\n *\n * @param {string} path Filename of the extension to load\n */\n loadExtension(path) {\n return new Promise((resolve, reject) => {\n this.db.loadExtension(path, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Performs a database migration.\n */\n async migrate(config) {\n await (0, migrate_1.migrate)(this, config);\n }\n /**\n * The methods underneath requires creative work to implement. PRs / proposals accepted!\n */\n /*\n * Unsure if serialize can be made into a promise.\n */\n serialize() {\n throw new Error('sqlite: Currently not implemented. Use getDatabaseInstance().serialize() instead.');\n }\n /*\n * Unsure if parallelize can be made into a promise.\n */\n parallelize() {\n throw new Error('sqlite: Currently not implemented. Use getDatabaseInstance().parallelize() instead.');\n }\n}\nexports.Database = Database;\n//# sourceMappingURL=Database.js.map","export * from \"./Statement.js\";\nexport * from \"./Database.js\";\nimport Database from \"./Database.js\";\n\n/**\n * Opens a database for manipulation. Most users will call this to get started.\n */\nexport async function open(config) {\n const db = new Database.Database(config);\n await db.open();\n return db;\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,cAAc,KAAK;CAC3B,SAAS,YAAY,KAAK;AACtB,MAAI,eAAe,MACf,QAAO;AAEX,MAAI,OAAO,QAAQ,UAAU;GACzB,MAAM,2BAAW,IAAI,OAAO;AAC5B,QAAK,IAAI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} from "./chunk-C41Io3cc.mjs";
1
+ import { a as __toESM, n as __reExport, r as __require, t as __commonJS } from "./chunk-uEZWKkIX.mjs";
2
2
 
3
3
  //#region node_modules/sqlite/build/utils/format-error.js
4
4
  var require_format_error = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/utils/format-error.js": ((exports) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.formatError = void 0;
6
7
  function formatError(err) {
7
8
  if (err instanceof Error) return err;
8
9
  if (typeof err === "object") {
@@ -21,6 +22,7 @@ var require_format_error = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/bui
21
22
  //#region node_modules/sqlite/build/Statement.js
22
23
  var require_Statement = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/Statement.js": ((exports) => {
23
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Statement = void 0;
24
26
  const format_error_1$1 = require_format_error();
25
27
  /**
26
28
  * Promisified wrapper for the sqlite3#Statement interface.
@@ -176,6 +178,7 @@ var require_Statement = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/
176
178
  //#region node_modules/sqlite/build/utils/migrate.js
177
179
  var require_migrate = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/utils/migrate.js": ((exports) => {
178
180
  Object.defineProperty(exports, "__esModule", { value: true });
181
+ exports.migrate = exports.readMigrations = void 0;
179
182
  const fs = __require("fs");
180
183
  const path = __require("path");
181
184
  async function readMigrations(migrationPath) {
@@ -253,6 +256,7 @@ var require_migrate = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/ut
253
256
  //#region node_modules/sqlite/build/utils/strings.js
254
257
  var require_strings = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/utils/strings.js": ((exports) => {
255
258
  Object.defineProperty(exports, "__esModule", { value: true });
259
+ exports.toSqlParams = void 0;
256
260
  /**
257
261
  * Allows for using strings and `sql-template-strings`. Converts both to a
258
262
  * format that's usable by the SQL methods
@@ -277,6 +281,7 @@ var require_strings = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/ut
277
281
  //#region node_modules/sqlite/build/Database.js
278
282
  var require_Database = /* @__PURE__ */ __commonJS({ "node_modules/sqlite/build/Database.js": ((exports) => {
279
283
  Object.defineProperty(exports, "__esModule", { value: true });
284
+ exports.Database = void 0;
280
285
  const Statement_1 = require_Statement();
281
286
  const migrate_1 = require_migrate();
282
287
  const strings_1 = require_strings();
@@ -521,11 +526,11 @@ var import_Database = /* @__PURE__ */ __toESM(require_Database(), 1);
521
526
  * Opens a database for manipulation. Most users will call this to get started.
522
527
  */
523
528
  async function open(config) {
524
- const db = new import_Database.Database(config);
529
+ const db = new import_Database.default.Database(config);
525
530
  await db.open();
526
531
  return db;
527
532
  }
528
533
 
529
534
  //#endregion
530
535
  export { open };
531
- //# sourceMappingURL=build-MpmEusc_.mjs.map
536
+ //# sourceMappingURL=build-MmD3T4bV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-MmD3T4bV.mjs","names":["format_error_1","Database","path","Database"],"sources":["../node_modules/sqlite/build/utils/format-error.js","../node_modules/sqlite/build/Statement.js","../node_modules/sqlite/build/utils/migrate.js","../node_modules/sqlite/build/utils/strings.js","../node_modules/sqlite/build/Database.js","../node_modules/sqlite/build/index.mjs"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatError = void 0;\nfunction formatError(err) {\n if (err instanceof Error) {\n return err;\n }\n if (typeof err === 'object') {\n const newError = new Error();\n for (let prop in err) {\n newError[prop] = err[prop];\n }\n // message isn't part of the enumerable set\n if (err.message) {\n newError.message = err.message;\n }\n return newError;\n }\n if (typeof err === 'string') {\n return new Error(err);\n }\n return new Error(err);\n}\nexports.formatError = formatError;\n//# sourceMappingURL=format-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Statement = void 0;\nconst format_error_1 = require(\"./utils/format-error\");\n/**\n * Promisified wrapper for the sqlite3#Statement interface.\n */\nclass Statement {\n constructor(stmt) {\n this.stmt = stmt;\n }\n /**\n * Returns the underlying sqlite3 Statement instance\n */\n getStatementInstance() {\n return this.stmt;\n }\n /**\n * Binds parameters to the prepared statement.\n *\n * Binding parameters with this function completely resets the statement object and row cursor\n * and removes all previously bound parameters, if any.\n */\n bind(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.bind(...params, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Resets the row cursor of the statement and preserves the parameter bindings.\n * Use this function to re-execute the same query with the same bindings.\n */\n reset() {\n return new Promise(resolve => {\n this.stmt.reset(() => {\n resolve();\n });\n });\n }\n /**\n * Finalizes the statement. This is typically optional, but if you experience long delays before\n * the next query is executed, explicitly finalizing your statement might be necessary.\n * This might be the case when you run an exclusive query (see section Control Flow).\n * After the statement is finalized, all further function calls on that statement object\n * will throw errors.\n */\n finalize() {\n return new Promise((resolve, reject) => {\n this.stmt.finalize(err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Binds parameters and executes the statement.\n *\n * If you specify bind parameters, they will be bound to the statement before it is executed.\n * Note that the bindings and the row cursor are reset when you specify even a single bind parameter.\n *\n * The execution behavior is identical to the Database#run method with the difference that the\n * statement will not be finalized after it is run. This means you can run it multiple times.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n */\n run(...params) {\n return new Promise((resolve, reject) => {\n const stmt = this;\n this.stmt.run(...params, function (err) {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve({\n stmt,\n lastID: this.lastID,\n changes: this.changes\n });\n });\n });\n }\n /**\n * Binds parameters, executes the statement and retrieves the first result row.\n * The parameters are the same as the Statement#run function, with the following differences:\n *\n * Using this method can leave the database locked, as the database awaits further\n * calls to Statement#get to retrieve subsequent rows. To inform the database that you\n * are finished retrieving rows, you should either finalize (with Statement#finalize)\n * or reset (with Statement#reset) the statement.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n */\n get(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.get(...params, (err, row) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(row);\n });\n });\n }\n /**\n * Binds parameters, executes the statement and calls the callback with all result rows.\n * The parameters are the same as the Statement#run function, with the following differences:\n *\n * If the result set is empty, it will resolve to an empty array, otherwise it contains an\n * object for each result row which in turn contains the values of that row.\n * Like with Statement#run, the statement will not be finalized after executing this function.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseallsql-param--callback\n */\n all(...params) {\n return new Promise((resolve, reject) => {\n this.stmt.all(...params, (err, rows) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(rows);\n });\n });\n }\n each(...params) {\n return new Promise((resolve, reject) => {\n const callback = params.pop();\n if (!callback || typeof callback !== 'function') {\n throw new Error('sqlite: Last param of Statement#each() must be a callback function');\n }\n if (params.length > 0) {\n const positional = params.pop();\n if (typeof positional === 'function') {\n throw new Error('sqlite: Statement#each() should only have a single callback defined. See readme for usage.');\n }\n params.push(positional);\n }\n this.stmt.each(...params, (err, row) => {\n if (err) {\n return callback((0, format_error_1.formatError)(err), null);\n }\n callback(null, row);\n }, (err, count) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(count);\n });\n });\n }\n}\nexports.Statement = Statement;\n//# sourceMappingURL=Statement.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.migrate = exports.readMigrations = void 0;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nasync function readMigrations(migrationPath) {\n const migrationsPath = migrationPath || path.join(process.cwd(), 'migrations');\n const location = path.resolve(migrationsPath);\n // Get the list of migration files, for example:\n // { id: 1, name: 'initial', filename: '001-initial.sql' }\n // { id: 2, name: 'feature', filename: '002-feature.sql' }\n const migrationFiles = await new Promise((resolve, reject) => {\n fs.readdir(location, (err, files) => {\n if (err) {\n return reject(err);\n }\n resolve(files\n .map(x => x.match(/^(\\d+).(.*?)\\.sql$/))\n .filter(x => x !== null)\n .map(x => ({ id: Number(x[1]), name: x[2], filename: x[0] }))\n .sort((a, b) => Math.sign(a.id - b.id)));\n });\n });\n if (!migrationFiles.length) {\n throw new Error(`No migration files found in '${location}'.`);\n }\n // Get the list of migrations, for example:\n // { id: 1, name: 'initial', filename: '001-initial.sql', up: ..., down: ... }\n // { id: 2, name: 'feature', filename: '002-feature.sql', up: ..., down: ... }\n return Promise.all(migrationFiles.map(migration => new Promise((resolve, reject) => {\n const filename = path.join(location, migration.filename);\n fs.readFile(filename, 'utf-8', (err, data) => {\n if (err) {\n return reject(err);\n }\n const [up, down] = data.split(/^--\\s+?down\\b/im);\n const migrationData = migration;\n migrationData.up = up.replace(/^-- .*?$/gm, '').trim(); // Remove comments\n migrationData.down = down ? down.trim() : ''; // and trim whitespaces\n resolve(migrationData);\n });\n })));\n}\nexports.readMigrations = readMigrations;\n/**\n * Migrates database schema to the latest version\n */\nasync function migrate(db, config = {}) {\n config.force = config.force || false;\n config.table = config.table || 'migrations';\n const { force, table } = config;\n const migrations = config.migrations\n ? config.migrations\n : await readMigrations(config.migrationsPath);\n // Create a database table for migrations meta data if it doesn't exist\n await db.run(`CREATE TABLE IF NOT EXISTS \"${table}\" (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n up TEXT NOT NULL,\n down TEXT NOT NULL\n)`);\n // Get the list of already applied migrations\n let dbMigrations = await db.all(`SELECT id, name, up, down FROM \"${table}\" ORDER BY id ASC`);\n // Undo migrations that exist only in the database but not in files,\n // also undo the last migration if the `force` option is enabled.\n const lastMigration = migrations[migrations.length - 1];\n for (const migration of dbMigrations\n .slice()\n .sort((a, b) => Math.sign(b.id - a.id))) {\n if (!migrations.some(x => x.id === migration.id) ||\n (force && migration.id === lastMigration.id)) {\n await db.run('BEGIN');\n try {\n await db.exec(migration.down);\n await db.run(`DELETE FROM \"${table}\" WHERE id = ?`, migration.id);\n await db.run('COMMIT');\n dbMigrations = dbMigrations.filter(x => x.id !== migration.id);\n }\n catch (err) {\n await db.run('ROLLBACK');\n throw err;\n }\n }\n else {\n break;\n }\n }\n // Apply pending migrations\n const lastMigrationId = dbMigrations.length\n ? dbMigrations[dbMigrations.length - 1].id\n : 0;\n for (const migration of migrations) {\n if (migration.id > lastMigrationId) {\n await db.run('BEGIN');\n try {\n await db.exec(migration.up);\n await db.run(`INSERT INTO \"${table}\" (id, name, up, down) VALUES (?, ?, ?, ?)`, migration.id, migration.name, migration.up, migration.down);\n await db.run('COMMIT');\n }\n catch (err) {\n await db.run('ROLLBACK');\n throw err;\n }\n }\n }\n}\nexports.migrate = migrate;\n//# sourceMappingURL=migrate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSqlParams = void 0;\n/**\n * Allows for using strings and `sql-template-strings`. Converts both to a\n * format that's usable by the SQL methods\n *\n * @param sql A SQL string or `sql-template-strings` object\n * @param params An array of parameters\n */\nfunction toSqlParams(sql, params = []) {\n if (typeof sql === 'string') {\n return {\n sql,\n params\n };\n }\n return {\n sql: sql.sql,\n params: sql.values\n };\n}\nexports.toSqlParams = toSqlParams;\n//# sourceMappingURL=strings.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Database = void 0;\nconst Statement_1 = require(\"./Statement\");\nconst migrate_1 = require(\"./utils/migrate\");\nconst strings_1 = require(\"./utils/strings\");\nconst format_error_1 = require(\"./utils/format-error\");\n/**\n * Promisified wrapper for the sqlite3#Database interface.\n */\nclass Database {\n constructor(config) {\n this.config = config;\n this.db = null;\n }\n /**\n * Event handler when verbose mode is enabled.\n * @see https://github.com/mapbox/node-sqlite3/wiki/Debugging\n */\n on(event, listener) {\n this.db.on(event, listener);\n }\n /**\n * Returns the underlying sqlite3 Database instance\n */\n getDatabaseInstance() {\n return this.db;\n }\n /**\n * Opens the database\n */\n open() {\n return new Promise((resolve, reject) => {\n let { filename, mode, driver } = this.config;\n // https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback\n if (filename === null || filename === undefined) {\n throw new Error('sqlite: filename cannot be null / undefined');\n }\n if (!driver) {\n throw new Error('sqlite: driver is not defined');\n }\n if (mode) {\n this.db = new driver(filename, mode, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n }\n else {\n this.db = new driver(filename, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n }\n });\n }\n /**\n * Closes the database.\n */\n close() {\n return new Promise((resolve, reject) => {\n this.db.close(err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseconfigureoption-value\n */\n configure(option, value) {\n this.db.configure(option, value);\n }\n /**\n * Runs the SQL query with the specified parameters. It does not retrieve any result data.\n * The function returns the Database object for which it was called to allow for function chaining.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaserunsql-param--callback\n */\n run(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.run(sqlObj.sql, ...sqlObj.params, function (err) {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve({\n stmt: new Statement_1.Statement(this.stmt),\n lastID: this.lastID,\n changes: this.changes\n });\n });\n });\n }\n /**\n * Runs the SQL query with the specified parameters and resolves with\n * with the first result row afterwards. If the result set is empty, returns undefined.\n *\n * The property names correspond to the column names of the result set.\n * It is impossible to access them by column index; the only supported way is by column name.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databasegetsql-param--callback\n */\n get(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.get(sqlObj.sql, ...sqlObj.params, (err, row) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(row);\n });\n });\n }\n each(sql, ...params) {\n return new Promise((resolve, reject) => {\n const callback = params.pop();\n if (!callback || typeof callback !== 'function') {\n throw new Error('sqlite: Last param of Database#each() must be a callback function');\n }\n if (params.length > 0) {\n const positional = params.pop();\n if (typeof positional === 'function') {\n throw new Error('sqlite: Database#each() should only have a single callback defined. See readme for usage.');\n }\n params.push(positional);\n }\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.each(sqlObj.sql, ...sqlObj.params, (err, row) => {\n if (err) {\n return callback((0, format_error_1.formatError)(err), null);\n }\n callback(null, row);\n }, (err, count) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(count);\n });\n });\n }\n /**\n * Runs the SQL query with the specified parameters. The parameters are the same as the\n * Database#run function, with the following differences:\n *\n * If the result set is empty, it will be an empty array, otherwise it will\n * have an object for each result row which\n * in turn contains the values of that row, like the Database#get function.\n *\n * Note that it first retrieves all result rows and stores them in memory.\n * For queries that have potentially large result sets, use the Database#each\n * function to retrieve all rows or Database#prepare followed by multiple\n * Statement#get calls to retrieve a previously unknown amount of rows.\n *\n * @param {string} sql The SQL query to run.\n *\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n *\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseallsql-param--callback\n */\n all(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n this.db.all(sqlObj.sql, ...sqlObj.params, (err, rows) => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve(rows);\n });\n });\n }\n /**\n * Runs all SQL queries in the supplied string. No result rows are retrieved. If a query fails,\n * no subsequent statements will be executed (wrap it in a transaction if you want all\n * or none to be executed).\n *\n * Note: This function will only execute statements up to the first NULL byte.\n * Comments are not allowed and will lead to runtime errors.\n *\n * @param {string} sql The SQL query to run.\n * @see https://github.com/mapbox/node-sqlite3/wiki/API#databaseexecsql-callback\n */\n exec(sql) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql);\n this.db.exec(sqlObj.sql, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Prepares the SQL statement and optionally binds the specified parameters.\n * When bind parameters are supplied, they are bound to the prepared statement.\n *\n * @param {string} sql The SQL query to run.\n * @param {any} [params, ...] When the SQL statement contains placeholders, you\n * can pass them in here. They will be bound to the statement before it is\n * executed. There are three ways of passing bind parameters: directly in\n * the function's arguments, as an array, and as an object for named\n * parameters. This automatically sanitizes inputs.\n * @returns Promise<Statement> Statement object\n */\n prepare(sql, ...params) {\n return new Promise((resolve, reject) => {\n const sqlObj = (0, strings_1.toSqlParams)(sql, params);\n const stmt = this.db.prepare(sqlObj.sql, ...sqlObj.params, err => {\n if (err) {\n return reject(err);\n }\n resolve(new Statement_1.Statement(stmt));\n });\n });\n }\n /**\n * Loads a compiled SQLite extension into the database connection object.\n *\n * @param {string} path Filename of the extension to load\n */\n loadExtension(path) {\n return new Promise((resolve, reject) => {\n this.db.loadExtension(path, err => {\n if (err) {\n return reject((0, format_error_1.formatError)(err));\n }\n resolve();\n });\n });\n }\n /**\n * Performs a database migration.\n */\n async migrate(config) {\n await (0, migrate_1.migrate)(this, config);\n }\n /**\n * The methods underneath requires creative work to implement. PRs / proposals accepted!\n */\n /*\n * Unsure if serialize can be made into a promise.\n */\n serialize() {\n throw new Error('sqlite: Currently not implemented. Use getDatabaseInstance().serialize() instead.');\n }\n /*\n * Unsure if parallelize can be made into a promise.\n */\n parallelize() {\n throw new Error('sqlite: Currently not implemented. Use getDatabaseInstance().parallelize() instead.');\n }\n}\nexports.Database = Database;\n//# sourceMappingURL=Database.js.map","export * from \"./Statement.js\";\nexport * from \"./Database.js\";\nimport Database from \"./Database.js\";\n\n/**\n * Opens a database for manipulation. Most users will call this to get started.\n */\nexport async function open(config) {\n const db = new Database.Database(config);\n await db.open();\n return db;\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,cAAc,KAAK;CAC3B,SAAS,YAAY,KAAK;AACtB,MAAI,eAAe,MACf,QAAO;AAEX,MAAI,OAAO,QAAQ,UAAU;GACzB,MAAM,2BAAW,IAAI,OAAO;AAC5B,QAAK,IAAI,QAAQ,IACb,UAAS,QAAQ,IAAI;AAGzB,OAAI,IAAI,QACJ,UAAS,UAAU,IAAI;AAE3B,UAAO;;AAEX,MAAI,OAAO,QAAQ,SACf,QAAO,IAAI,MAAM,IAAI;AAEzB,SAAO,IAAI,MAAM,IAAI;;AAEzB,SAAQ,cAAc;;;;;;ACtBtB,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,YAAY,KA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QAAO;AAC5B,SAAI,IACA,QAAO,QAAQ,GAAG,eAAe,aAAa,IAAI,CAAC;AAEvD,cAAS;MACX;KACJ;;;;;;;;;;;;;;EAcN,QAAQ,KAAK,GAAG,QAAQ;AACpB,UAAO,IAAI,SAAS,SAAS,WAAW;IACpC,MAAM,UAAU,GAAG,UAAU,aAAa,KAAK,OAAO;IACtD,MAAM,OAAO,KAAK,GAAG,QAAQ,OAAO,KAAK,GAAG,OAAO,SAAQ,QAAO;AAC9D,SAAI,IACA,QAAO,OAAO,IAAI;AAEtB,aAAQ,IAAI,YAAY,UAAU,KAAK,CAAC;MAC1C;KACJ;;;;;;;EAON,cAAc,QAAM;AAChB,UAAO,IAAI,SAAS,SAAS,WAAW;AACpC,SAAK,GAAG,cAAcC,SAAM,QAAO;AAC/B,SAAI,IACA,QAAO,QAAQ,GAAG,eAAe,aAAa,IAAI,CAAC;AAEvD,cAAS;MACX;KACJ;;;;;EAKN,MAAM,QAAQ,QAAQ;AAClB,UAAO,GAAG,UAAU,SAAS,MAAM,OAAO;;;;;EAQ9C,YAAY;AACR,SAAM,IAAI,MAAM,oFAAoF;;EAKxG,cAAc;AACV,SAAM,IAAI,MAAM,sFAAsF;;;AAG9G,SAAQ,WAAWD;;;;;;;;;AC/QnB,eAAsB,KAAK,QAAQ;CACjC,MAAM,KAAK,IAAIE,wBAAS,SAAS,OAAO;AACxC,OAAM,GAAG,MAAM;AACf,QAAO"}
@@ -29,4 +29,4 @@ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeM
29
29
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
30
30
 
31
31
  //#endregion
32
- export { __commonJS, __reExport, __require, __toDynamicImportESM, __toESM };
32
+ export { __toESM as a, __toDynamicImportESM as i, __reExport as n, __require as r, __commonJS as t };