@grepai/cli 0.6.9 → 0.7.0

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 (3) hide show
  1. package/index.js +147 -986
  2. package/index.js.map +4 -7
  3. package/package.json +3 -2
package/index.js CHANGED
@@ -13603,7 +13603,7 @@ var require_process = __commonJS((exports, module2) => {
13603
13603
  var require_filesystem = __commonJS((exports, module2) => {
13604
13604
  var fs2 = __require("fs");
13605
13605
  var LDD_PATH = "/usr/bin/ldd";
13606
- var readFileSync3 = (path4) => fs2.readFileSync(path4, "utf-8");
13606
+ var readFileSync2 = (path4) => fs2.readFileSync(path4, "utf-8");
13607
13607
  var readFile3 = (path4) => new Promise((resolve4, reject) => {
13608
13608
  fs2.readFile(path4, "utf-8", (err2, data) => {
13609
13609
  if (err2) {
@@ -13615,7 +13615,7 @@ var require_filesystem = __commonJS((exports, module2) => {
13615
13615
  });
13616
13616
  module2.exports = {
13617
13617
  LDD_PATH,
13618
- readFileSync: readFileSync3,
13618
+ readFileSync: readFileSync2,
13619
13619
  readFile: readFile3
13620
13620
  };
13621
13621
  });
@@ -13624,7 +13624,7 @@ var require_filesystem = __commonJS((exports, module2) => {
13624
13624
  var require_detect_libc = __commonJS((exports, module2) => {
13625
13625
  var childProcess = __require("child_process");
13626
13626
  var { isLinux, getReport } = require_process();
13627
- var { LDD_PATH, readFile: readFile3, readFileSync: readFileSync3 } = require_filesystem();
13627
+ var { LDD_PATH, readFile: readFile3, readFileSync: readFileSync2 } = require_filesystem();
13628
13628
  var cachedFamilyFilesystem;
13629
13629
  var cachedVersionFilesystem;
13630
13630
  var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
@@ -13655,14 +13655,14 @@ var require_detect_libc = __commonJS((exports, module2) => {
13655
13655
  var MUSL = "musl";
13656
13656
  var GLIBC_ON_LDD = GLIBC.toUpperCase();
13657
13657
  var MUSL_ON_LDD = MUSL.toLowerCase();
13658
- var isFileMusl3 = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
13658
+ var isFileMusl2 = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
13659
13659
  var familyFromReport = () => {
13660
13660
  const report = getReport();
13661
13661
  if (report.header && report.header.glibcVersionRuntime) {
13662
13662
  return GLIBC;
13663
13663
  }
13664
13664
  if (Array.isArray(report.sharedObjects)) {
13665
- if (report.sharedObjects.some(isFileMusl3)) {
13665
+ if (report.sharedObjects.some(isFileMusl2)) {
13666
13666
  return MUSL;
13667
13667
  }
13668
13668
  }
@@ -13704,7 +13704,7 @@ var require_detect_libc = __commonJS((exports, module2) => {
13704
13704
  }
13705
13705
  cachedFamilyFilesystem = null;
13706
13706
  try {
13707
- const lddContent = readFileSync3(LDD_PATH);
13707
+ const lddContent = readFileSync2(LDD_PATH);
13708
13708
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
13709
13709
  } catch (e) {}
13710
13710
  return cachedFamilyFilesystem;
@@ -13759,7 +13759,7 @@ var require_detect_libc = __commonJS((exports, module2) => {
13759
13759
  }
13760
13760
  cachedVersionFilesystem = null;
13761
13761
  try {
13762
- const lddContent = readFileSync3(LDD_PATH);
13762
+ const lddContent = readFileSync2(LDD_PATH);
13763
13763
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
13764
13764
  if (versionMatch) {
13765
13765
  cachedVersionFilesystem = versionMatch[1];
@@ -13852,7 +13852,7 @@ var require_sqlite_error = __commonJS((exports, module2) => {
13852
13852
  var require_libsql = __commonJS((exports, module2) => {
13853
13853
  var { currentTarget } = require_dist2();
13854
13854
  var { familySync, GLIBC } = require_detect_libc();
13855
- function requireNative3() {
13855
+ function requireNative2() {
13856
13856
  let target = currentTarget();
13857
13857
  if (familySync() == GLIBC) {
13858
13858
  switch (target) {
@@ -13886,7 +13886,7 @@ var require_libsql = __commonJS((exports, module2) => {
13886
13886
  statementColumns,
13887
13887
  statementSafeIntegers,
13888
13888
  rowsNext
13889
- } = requireNative3();
13889
+ } = requireNative2();
13890
13890
  var SqliteError2 = require_sqlite_error();
13891
13891
  function convertError2(err2) {
13892
13892
  if (err2.libsqlError) {
@@ -13895,7 +13895,7 @@ var require_libsql = __commonJS((exports, module2) => {
13895
13895
  return err2;
13896
13896
  }
13897
13897
 
13898
- class Database7 {
13898
+ class Database5 {
13899
13899
  constructor(path4, opts) {
13900
13900
  const encryptionCipher = opts?.encryptionCipher ?? "aes256cbc";
13901
13901
  if (opts && opts.syncUrl) {
@@ -13937,7 +13937,7 @@ var require_libsql = __commonJS((exports, module2) => {
13937
13937
  prepare(sql) {
13938
13938
  try {
13939
13939
  const stmt = databasePrepareSync.call(this.db, sql);
13940
- return new Statement5(stmt);
13940
+ return new Statement4(stmt);
13941
13941
  } catch (err2) {
13942
13942
  throw convertError2(err2);
13943
13943
  }
@@ -14048,7 +14048,7 @@ var require_libsql = __commonJS((exports, module2) => {
14048
14048
  }
14049
14049
  }
14050
14050
 
14051
- class Statement5 {
14051
+ class Statement4 {
14052
14052
  constructor(stmt) {
14053
14053
  this.stmt = stmt;
14054
14054
  }
@@ -14121,7 +14121,7 @@ var require_libsql = __commonJS((exports, module2) => {
14121
14121
  return this;
14122
14122
  }
14123
14123
  }
14124
- module2.exports = Database7;
14124
+ module2.exports = Database5;
14125
14125
  module2.exports.SqliteError = SqliteError2;
14126
14126
  });
14127
14127
 
@@ -14140,7 +14140,7 @@ var require_promise_limit = __commonJS((exports, module2) => {
14140
14140
  var job = jobs.shift();
14141
14141
  semaphore.queue = jobs.length;
14142
14142
  if (job) {
14143
- run11(job.fn).then(job.resolve).catch(job.reject);
14143
+ run10(job.fn).then(job.resolve).catch(job.reject);
14144
14144
  }
14145
14145
  }
14146
14146
  function queue(fn) {
@@ -14149,7 +14149,7 @@ var require_promise_limit = __commonJS((exports, module2) => {
14149
14149
  semaphore.queue = jobs.length;
14150
14150
  });
14151
14151
  }
14152
- function run11(fn) {
14152
+ function run10(fn) {
14153
14153
  outstanding++;
14154
14154
  try {
14155
14155
  return Promise.resolve(fn()).then(function(result) {
@@ -14168,7 +14168,7 @@ var require_promise_limit = __commonJS((exports, module2) => {
14168
14168
  if (outstanding >= count4) {
14169
14169
  return queue(fn);
14170
14170
  } else {
14171
- return run11(fn);
14171
+ return run10(fn);
14172
14172
  }
14173
14173
  };
14174
14174
  return semaphore;
@@ -101786,6 +101786,7 @@ function mergeWithinBudgetOrFlush(current, next, config3) {
101786
101786
 
101787
101787
  // ../core/src/internal/services/codebase-scanner-agentfs.ts
101788
101788
  import { globSync } from "fs";
101789
+ import { connect as connect2 } from "@tursodatabase/sync";
101789
101790
 
101790
101791
  // ../../node_modules/.bun/@tursodatabase+database-common@0.4.4/node_modules/@tursodatabase/database-common/dist/bind.js
101791
101792
  function bindParams(stmt, params) {
@@ -102272,191 +102273,7 @@ class Statement {
102272
102273
  }
102273
102274
  }
102274
102275
 
102275
- // ../../node_modules/.bun/@tursodatabase+sync-common@0.4.4/node_modules/@tursodatabase/sync-common/dist/run.js
102276
- function trackPromise(p3) {
102277
- let status2 = { promise: null, finished: false };
102278
- status2.promise = p3.finally(() => status2.finished = true);
102279
- return status2;
102280
- }
102281
- function timeoutMs(ms) {
102282
- return new Promise((resolve4) => setTimeout(resolve4, ms));
102283
- }
102284
- function normalizeUrl(url3) {
102285
- return url3.replace(/^libsql:\/\//, "https://");
102286
- }
102287
- async function process3(opts, io, request) {
102288
- const requestType = request.request();
102289
- const completion = request.completion();
102290
- if (requestType.type == "Http") {
102291
- let url3 = requestType.url;
102292
- if (typeof opts.url == "function") {
102293
- url3 = opts.url();
102294
- } else {
102295
- url3 = opts.url;
102296
- }
102297
- if (url3 == null) {
102298
- completion.poison(`url is empty - sync is paused`);
102299
- return;
102300
- }
102301
- url3 = normalizeUrl(url3);
102302
- try {
102303
- let headers = typeof opts.headers === "function" ? await opts.headers() : opts.headers;
102304
- if (requestType.headers != null && requestType.headers.length > 0) {
102305
- headers = { ...headers };
102306
- for (let header of requestType.headers) {
102307
- headers[header[0]] = header[1];
102308
- }
102309
- }
102310
- const response = await fetch(`${url3}${requestType.path}`, {
102311
- method: requestType.method,
102312
- headers,
102313
- body: requestType.body != null ? new Uint8Array(requestType.body) : null
102314
- });
102315
- completion.status(response.status);
102316
- const reader = response.body.getReader();
102317
- while (true) {
102318
- const { done: done9, value: value6 } = await reader.read();
102319
- if (done9) {
102320
- completion.done();
102321
- break;
102322
- }
102323
- completion.pushBuffer(value6);
102324
- }
102325
- } catch (error51) {
102326
- completion.poison(`fetch error: ${error51}`);
102327
- }
102328
- } else if (requestType.type == "FullRead") {
102329
- try {
102330
- const metadata2 = await io.read(requestType.path);
102331
- if (metadata2 != null) {
102332
- completion.pushBuffer(metadata2);
102333
- }
102334
- completion.done();
102335
- } catch (error51) {
102336
- completion.poison(`metadata read error: ${error51}`);
102337
- }
102338
- } else if (requestType.type == "FullWrite") {
102339
- try {
102340
- await io.write(requestType.path, requestType.content);
102341
- completion.done();
102342
- } catch (error51) {
102343
- completion.poison(`metadata write error: ${error51}`);
102344
- }
102345
- } else if (requestType.type == "Transform") {
102346
- if (opts.transform == null) {
102347
- completion.poison("transform is not set");
102348
- return;
102349
- }
102350
- const results = [];
102351
- for (const mutation of requestType.mutations) {
102352
- const result = opts.transform(mutation);
102353
- if (result == null) {
102354
- results.push({ type: "Keep" });
102355
- } else if (result.operation == "skip") {
102356
- results.push({ type: "Skip" });
102357
- } else if (result.operation == "rewrite") {
102358
- results.push({ type: "Rewrite", stmt: result.stmt });
102359
- } else {
102360
- completion.poison("unexpected transform operation");
102361
- return;
102362
- }
102363
- }
102364
- completion.pushTransform(results);
102365
- completion.done();
102366
- }
102367
- }
102368
- function runner(opts, io, engine) {
102369
- let tasks = [];
102370
- return {
102371
- async wait() {
102372
- for (let request = engine.protocolIo();request != null; request = engine.protocolIo()) {
102373
- tasks.push(trackPromise(process3(opts, io, request)));
102374
- }
102375
- const tasksRace = tasks.length == 0 ? Promise.resolve() : Promise.race([timeoutMs(opts.preemptionMs), ...tasks.map((t) => t.promise)]);
102376
- await Promise.all([engine.ioLoopAsync(), tasksRace]);
102377
- tasks = tasks.filter((t) => !t.finished);
102378
- engine.protocolIoStep();
102379
- }
102380
- };
102381
- }
102382
- async function run10(runner2, generator) {
102383
- while (true) {
102384
- const { type: type2, ...rest } = await generator.resumeAsync(null);
102385
- if (type2 == "Done") {
102386
- return null;
102387
- }
102388
- if (type2 == "SyncEngineStats") {
102389
- return rest;
102390
- }
102391
- if (type2 == "SyncEngineChanges") {
102392
- return rest.changes;
102393
- }
102394
- await runner2.wait();
102395
- }
102396
- }
102397
-
102398
- class SyncEngineGuards {
102399
- waitLock;
102400
- pushLock;
102401
- pullLock;
102402
- checkpointLock;
102403
- constructor() {
102404
- this.waitLock = new AsyncLock;
102405
- this.pushLock = new AsyncLock;
102406
- this.pullLock = new AsyncLock;
102407
- this.checkpointLock = new AsyncLock;
102408
- }
102409
- async wait(f) {
102410
- try {
102411
- await this.waitLock.acquire();
102412
- return await f();
102413
- } finally {
102414
- this.waitLock.release();
102415
- }
102416
- }
102417
- async push(f) {
102418
- try {
102419
- await this.pushLock.acquire();
102420
- await this.pullLock.acquire();
102421
- await this.checkpointLock.acquire();
102422
- return await f();
102423
- } finally {
102424
- this.pushLock.release();
102425
- this.pullLock.release();
102426
- this.checkpointLock.release();
102427
- }
102428
- }
102429
- async apply(f) {
102430
- try {
102431
- await this.waitLock.acquire();
102432
- await this.pushLock.acquire();
102433
- await this.pullLock.acquire();
102434
- await this.checkpointLock.acquire();
102435
- return await f();
102436
- } finally {
102437
- this.waitLock.release();
102438
- this.pushLock.release();
102439
- this.pullLock.release();
102440
- this.checkpointLock.release();
102441
- }
102442
- }
102443
- async checkpoint(f) {
102444
- try {
102445
- await this.waitLock.acquire();
102446
- await this.pushLock.acquire();
102447
- await this.pullLock.acquire();
102448
- await this.checkpointLock.acquire();
102449
- return await f();
102450
- } finally {
102451
- this.waitLock.release();
102452
- this.pushLock.release();
102453
- this.pullLock.release();
102454
- this.checkpointLock.release();
102455
- }
102456
- }
102457
- }
102458
-
102459
- // ../../node_modules/.bun/@tursodatabase+sync@0.4.4/node_modules/@tursodatabase/sync/index.js
102276
+ // ../../node_modules/.bun/@tursodatabase+database@0.4.4/node_modules/@tursodatabase/database/index.js
102460
102277
  import { createRequire } from "module";
102461
102278
  var require2 = createRequire(import.meta.url);
102462
102279
  var __dirname2 = new URL(".", import.meta.url).pathname;
@@ -102520,15 +102337,15 @@ function requireNative() {
102520
102337
  } else if (process.platform === "android") {
102521
102338
  if (process.arch === "arm64") {
102522
102339
  try {
102523
- return require2("./sync.android-arm64.node");
102340
+ return require2("./turso.android-arm64.node");
102524
102341
  } catch (e) {
102525
102342
  loadErrors.push(e);
102526
102343
  }
102527
102344
  try {
102528
- const binding = require2("@tursodatabase/sync-android-arm64");
102529
- const bindingPackageVersion = require2("@tursodatabase/sync-android-arm64/package.json").version;
102530
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102531
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102345
+ const binding = require2("@tursodatabase/database-android-arm64");
102346
+ const bindingPackageVersion = require2("@tursodatabase/database-android-arm64/package.json").version;
102347
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102348
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102532
102349
  }
102533
102350
  return binding;
102534
102351
  } catch (e) {
@@ -102536,15 +102353,15 @@ function requireNative() {
102536
102353
  }
102537
102354
  } else if (process.arch === "arm") {
102538
102355
  try {
102539
- return require2("./sync.android-arm-eabi.node");
102356
+ return require2("./turso.android-arm-eabi.node");
102540
102357
  } catch (e) {
102541
102358
  loadErrors.push(e);
102542
102359
  }
102543
102360
  try {
102544
- const binding = require2("@tursodatabase/sync-android-arm-eabi");
102545
- const bindingPackageVersion = require2("@tursodatabase/sync-android-arm-eabi/package.json").version;
102546
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102547
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102361
+ const binding = require2("@tursodatabase/database-android-arm-eabi");
102362
+ const bindingPackageVersion = require2("@tursodatabase/database-android-arm-eabi/package.json").version;
102363
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102364
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102548
102365
  }
102549
102366
  return binding;
102550
102367
  } catch (e) {
@@ -102556,15 +102373,15 @@ function requireNative() {
102556
102373
  } else if (process.platform === "win32") {
102557
102374
  if (process.arch === "x64") {
102558
102375
  try {
102559
- return require2("./sync.win32-x64-msvc.node");
102376
+ return require2("./turso.win32-x64-msvc.node");
102560
102377
  } catch (e) {
102561
102378
  loadErrors.push(e);
102562
102379
  }
102563
102380
  try {
102564
- const binding = require2("@tursodatabase/sync-win32-x64-msvc");
102565
- const bindingPackageVersion = require2("@tursodatabase/sync-win32-x64-msvc/package.json").version;
102566
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102567
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102381
+ const binding = require2("@tursodatabase/database-win32-x64-msvc");
102382
+ const bindingPackageVersion = require2("@tursodatabase/database-win32-x64-msvc/package.json").version;
102383
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102384
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102568
102385
  }
102569
102386
  return binding;
102570
102387
  } catch (e) {
@@ -102572,15 +102389,15 @@ function requireNative() {
102572
102389
  }
102573
102390
  } else if (process.arch === "ia32") {
102574
102391
  try {
102575
- return require2("./sync.win32-ia32-msvc.node");
102392
+ return require2("./turso.win32-ia32-msvc.node");
102576
102393
  } catch (e) {
102577
102394
  loadErrors.push(e);
102578
102395
  }
102579
102396
  try {
102580
- const binding = require2("@tursodatabase/sync-win32-ia32-msvc");
102581
- const bindingPackageVersion = require2("@tursodatabase/sync-win32-ia32-msvc/package.json").version;
102582
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102583
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102397
+ const binding = require2("@tursodatabase/database-win32-ia32-msvc");
102398
+ const bindingPackageVersion = require2("@tursodatabase/database-win32-ia32-msvc/package.json").version;
102399
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102400
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102584
102401
  }
102585
102402
  return binding;
102586
102403
  } catch (e) {
@@ -102588,15 +102405,15 @@ function requireNative() {
102588
102405
  }
102589
102406
  } else if (process.arch === "arm64") {
102590
102407
  try {
102591
- return require2("./sync.win32-arm64-msvc.node");
102408
+ return require2("./turso.win32-arm64-msvc.node");
102592
102409
  } catch (e) {
102593
102410
  loadErrors.push(e);
102594
102411
  }
102595
102412
  try {
102596
- const binding = require2("@tursodatabase/sync-win32-arm64-msvc");
102597
- const bindingPackageVersion = require2("@tursodatabase/sync-win32-arm64-msvc/package.json").version;
102598
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102599
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102413
+ const binding = require2("@tursodatabase/database-win32-arm64-msvc");
102414
+ const bindingPackageVersion = require2("@tursodatabase/database-win32-arm64-msvc/package.json").version;
102415
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102416
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102600
102417
  }
102601
102418
  return binding;
102602
102419
  } catch (e) {
@@ -102607,15 +102424,15 @@ function requireNative() {
102607
102424
  }
102608
102425
  } else if (process.platform === "darwin") {
102609
102426
  try {
102610
- return require2("./sync.darwin-universal.node");
102427
+ return require2("./turso.darwin-universal.node");
102611
102428
  } catch (e) {
102612
102429
  loadErrors.push(e);
102613
102430
  }
102614
102431
  try {
102615
- const binding = require2("@tursodatabase/sync-darwin-universal");
102616
- const bindingPackageVersion = require2("@tursodatabase/sync-darwin-universal/package.json").version;
102617
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102618
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102432
+ const binding = require2("@tursodatabase/database-darwin-universal");
102433
+ const bindingPackageVersion = require2("@tursodatabase/database-darwin-universal/package.json").version;
102434
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102435
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102619
102436
  }
102620
102437
  return binding;
102621
102438
  } catch (e) {
@@ -102623,15 +102440,15 @@ function requireNative() {
102623
102440
  }
102624
102441
  if (process.arch === "x64") {
102625
102442
  try {
102626
- return require2("./sync.darwin-x64.node");
102443
+ return require2("./turso.darwin-x64.node");
102627
102444
  } catch (e) {
102628
102445
  loadErrors.push(e);
102629
102446
  }
102630
102447
  try {
102631
- const binding = require2("@tursodatabase/sync-darwin-x64");
102632
- const bindingPackageVersion = require2("@tursodatabase/sync-darwin-x64/package.json").version;
102633
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102634
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102448
+ const binding = require2("@tursodatabase/database-darwin-x64");
102449
+ const bindingPackageVersion = require2("@tursodatabase/database-darwin-x64/package.json").version;
102450
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102451
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102635
102452
  }
102636
102453
  return binding;
102637
102454
  } catch (e) {
@@ -102639,15 +102456,15 @@ function requireNative() {
102639
102456
  }
102640
102457
  } else if (process.arch === "arm64") {
102641
102458
  try {
102642
- return require2("./sync.darwin-arm64.node");
102459
+ return require2("./turso.darwin-arm64.node");
102643
102460
  } catch (e) {
102644
102461
  loadErrors.push(e);
102645
102462
  }
102646
102463
  try {
102647
- const binding = require2("@tursodatabase/sync-darwin-arm64");
102648
- const bindingPackageVersion = require2("@tursodatabase/sync-darwin-arm64/package.json").version;
102649
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102650
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102464
+ const binding = require2("@tursodatabase/database-darwin-arm64");
102465
+ const bindingPackageVersion = require2("@tursodatabase/database-darwin-arm64/package.json").version;
102466
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102467
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102651
102468
  }
102652
102469
  return binding;
102653
102470
  } catch (e) {
@@ -102659,15 +102476,15 @@ function requireNative() {
102659
102476
  } else if (process.platform === "freebsd") {
102660
102477
  if (process.arch === "x64") {
102661
102478
  try {
102662
- return require2("./sync.freebsd-x64.node");
102479
+ return require2("./turso.freebsd-x64.node");
102663
102480
  } catch (e) {
102664
102481
  loadErrors.push(e);
102665
102482
  }
102666
102483
  try {
102667
- const binding = require2("@tursodatabase/sync-freebsd-x64");
102668
- const bindingPackageVersion = require2("@tursodatabase/sync-freebsd-x64/package.json").version;
102669
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102670
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102484
+ const binding = require2("@tursodatabase/database-freebsd-x64");
102485
+ const bindingPackageVersion = require2("@tursodatabase/database-freebsd-x64/package.json").version;
102486
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102487
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102671
102488
  }
102672
102489
  return binding;
102673
102490
  } catch (e) {
@@ -102675,15 +102492,15 @@ function requireNative() {
102675
102492
  }
102676
102493
  } else if (process.arch === "arm64") {
102677
102494
  try {
102678
- return require2("./sync.freebsd-arm64.node");
102495
+ return require2("./turso.freebsd-arm64.node");
102679
102496
  } catch (e) {
102680
102497
  loadErrors.push(e);
102681
102498
  }
102682
102499
  try {
102683
- const binding = require2("@tursodatabase/sync-freebsd-arm64");
102684
- const bindingPackageVersion = require2("@tursodatabase/sync-freebsd-arm64/package.json").version;
102685
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102686
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102500
+ const binding = require2("@tursodatabase/database-freebsd-arm64");
102501
+ const bindingPackageVersion = require2("@tursodatabase/database-freebsd-arm64/package.json").version;
102502
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102503
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102687
102504
  }
102688
102505
  return binding;
102689
102506
  } catch (e) {
@@ -102696,15 +102513,15 @@ function requireNative() {
102696
102513
  if (process.arch === "x64") {
102697
102514
  if (isMusl()) {
102698
102515
  try {
102699
- return require2("./sync.linux-x64-musl.node");
102516
+ return require2("./turso.linux-x64-musl.node");
102700
102517
  } catch (e) {
102701
102518
  loadErrors.push(e);
102702
102519
  }
102703
102520
  try {
102704
- const binding = require2("@tursodatabase/sync-linux-x64-musl");
102705
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-x64-musl/package.json").version;
102706
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102707
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102521
+ const binding = require2("@tursodatabase/database-linux-x64-musl");
102522
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-x64-musl/package.json").version;
102523
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102524
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102708
102525
  }
102709
102526
  return binding;
102710
102527
  } catch (e) {
@@ -102712,15 +102529,15 @@ function requireNative() {
102712
102529
  }
102713
102530
  } else {
102714
102531
  try {
102715
- return require2("./sync.linux-x64-gnu.node");
102532
+ return require2("./turso.linux-x64-gnu.node");
102716
102533
  } catch (e) {
102717
102534
  loadErrors.push(e);
102718
102535
  }
102719
102536
  try {
102720
- const binding = require2("@tursodatabase/sync-linux-x64-gnu");
102721
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-x64-gnu/package.json").version;
102722
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102723
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102537
+ const binding = require2("@tursodatabase/database-linux-x64-gnu");
102538
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-x64-gnu/package.json").version;
102539
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102540
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102724
102541
  }
102725
102542
  return binding;
102726
102543
  } catch (e) {
@@ -102730,15 +102547,15 @@ function requireNative() {
102730
102547
  } else if (process.arch === "arm64") {
102731
102548
  if (isMusl()) {
102732
102549
  try {
102733
- return require2("./sync.linux-arm64-musl.node");
102550
+ return require2("./turso.linux-arm64-musl.node");
102734
102551
  } catch (e) {
102735
102552
  loadErrors.push(e);
102736
102553
  }
102737
102554
  try {
102738
- const binding = require2("@tursodatabase/sync-linux-arm64-musl");
102739
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-arm64-musl/package.json").version;
102740
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102741
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102555
+ const binding = require2("@tursodatabase/database-linux-arm64-musl");
102556
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-arm64-musl/package.json").version;
102557
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102558
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102742
102559
  }
102743
102560
  return binding;
102744
102561
  } catch (e) {
@@ -102746,15 +102563,15 @@ function requireNative() {
102746
102563
  }
102747
102564
  } else {
102748
102565
  try {
102749
- return require2("./sync.linux-arm64-gnu.node");
102566
+ return require2("./turso.linux-arm64-gnu.node");
102750
102567
  } catch (e) {
102751
102568
  loadErrors.push(e);
102752
102569
  }
102753
102570
  try {
102754
- const binding = require2("@tursodatabase/sync-linux-arm64-gnu");
102755
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-arm64-gnu/package.json").version;
102756
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102757
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102571
+ const binding = require2("@tursodatabase/database-linux-arm64-gnu");
102572
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-arm64-gnu/package.json").version;
102573
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102574
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102758
102575
  }
102759
102576
  return binding;
102760
102577
  } catch (e) {
@@ -102764,15 +102581,15 @@ function requireNative() {
102764
102581
  } else if (process.arch === "arm") {
102765
102582
  if (isMusl()) {
102766
102583
  try {
102767
- return require2("./sync.linux-arm-musleabihf.node");
102584
+ return require2("./turso.linux-arm-musleabihf.node");
102768
102585
  } catch (e) {
102769
102586
  loadErrors.push(e);
102770
102587
  }
102771
102588
  try {
102772
- const binding = require2("@tursodatabase/sync-linux-arm-musleabihf");
102773
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-arm-musleabihf/package.json").version;
102774
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102775
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102589
+ const binding = require2("@tursodatabase/database-linux-arm-musleabihf");
102590
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-arm-musleabihf/package.json").version;
102591
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102592
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102776
102593
  }
102777
102594
  return binding;
102778
102595
  } catch (e) {
@@ -102780,15 +102597,15 @@ function requireNative() {
102780
102597
  }
102781
102598
  } else {
102782
102599
  try {
102783
- return require2("./sync.linux-arm-gnueabihf.node");
102600
+ return require2("./turso.linux-arm-gnueabihf.node");
102784
102601
  } catch (e) {
102785
102602
  loadErrors.push(e);
102786
102603
  }
102787
102604
  try {
102788
- const binding = require2("@tursodatabase/sync-linux-arm-gnueabihf");
102789
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-arm-gnueabihf/package.json").version;
102790
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102791
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102605
+ const binding = require2("@tursodatabase/database-linux-arm-gnueabihf");
102606
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-arm-gnueabihf/package.json").version;
102607
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102608
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102792
102609
  }
102793
102610
  return binding;
102794
102611
  } catch (e) {
@@ -102798,15 +102615,15 @@ function requireNative() {
102798
102615
  } else if (process.arch === "riscv64") {
102799
102616
  if (isMusl()) {
102800
102617
  try {
102801
- return require2("./sync.linux-riscv64-musl.node");
102618
+ return require2("./turso.linux-riscv64-musl.node");
102802
102619
  } catch (e) {
102803
102620
  loadErrors.push(e);
102804
102621
  }
102805
102622
  try {
102806
- const binding = require2("@tursodatabase/sync-linux-riscv64-musl");
102807
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-riscv64-musl/package.json").version;
102808
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102809
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102623
+ const binding = require2("@tursodatabase/database-linux-riscv64-musl");
102624
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-riscv64-musl/package.json").version;
102625
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102626
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102810
102627
  }
102811
102628
  return binding;
102812
102629
  } catch (e) {
@@ -102814,15 +102631,15 @@ function requireNative() {
102814
102631
  }
102815
102632
  } else {
102816
102633
  try {
102817
- return require2("./sync.linux-riscv64-gnu.node");
102634
+ return require2("./turso.linux-riscv64-gnu.node");
102818
102635
  } catch (e) {
102819
102636
  loadErrors.push(e);
102820
102637
  }
102821
102638
  try {
102822
- const binding = require2("@tursodatabase/sync-linux-riscv64-gnu");
102823
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-riscv64-gnu/package.json").version;
102824
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102825
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102639
+ const binding = require2("@tursodatabase/database-linux-riscv64-gnu");
102640
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-riscv64-gnu/package.json").version;
102641
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102642
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102826
102643
  }
102827
102644
  return binding;
102828
102645
  } catch (e) {
@@ -102831,15 +102648,15 @@ function requireNative() {
102831
102648
  }
102832
102649
  } else if (process.arch === "ppc64") {
102833
102650
  try {
102834
- return require2("./sync.linux-ppc64-gnu.node");
102651
+ return require2("./turso.linux-ppc64-gnu.node");
102835
102652
  } catch (e) {
102836
102653
  loadErrors.push(e);
102837
102654
  }
102838
102655
  try {
102839
- const binding = require2("@tursodatabase/sync-linux-ppc64-gnu");
102840
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-ppc64-gnu/package.json").version;
102841
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102842
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102656
+ const binding = require2("@tursodatabase/database-linux-ppc64-gnu");
102657
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-ppc64-gnu/package.json").version;
102658
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102659
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102843
102660
  }
102844
102661
  return binding;
102845
102662
  } catch (e) {
@@ -102847,15 +102664,15 @@ function requireNative() {
102847
102664
  }
102848
102665
  } else if (process.arch === "s390x") {
102849
102666
  try {
102850
- return require2("./sync.linux-s390x-gnu.node");
102667
+ return require2("./turso.linux-s390x-gnu.node");
102851
102668
  } catch (e) {
102852
102669
  loadErrors.push(e);
102853
102670
  }
102854
102671
  try {
102855
- const binding = require2("@tursodatabase/sync-linux-s390x-gnu");
102856
- const bindingPackageVersion = require2("@tursodatabase/sync-linux-s390x-gnu/package.json").version;
102857
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102858
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102672
+ const binding = require2("@tursodatabase/database-linux-s390x-gnu");
102673
+ const bindingPackageVersion = require2("@tursodatabase/database-linux-s390x-gnu/package.json").version;
102674
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102675
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102859
102676
  }
102860
102677
  return binding;
102861
102678
  } catch (e) {
@@ -102867,15 +102684,15 @@ function requireNative() {
102867
102684
  } else if (process.platform === "openharmony") {
102868
102685
  if (process.arch === "arm64") {
102869
102686
  try {
102870
- return require2("./sync.openharmony-arm64.node");
102687
+ return require2("./turso.openharmony-arm64.node");
102871
102688
  } catch (e) {
102872
102689
  loadErrors.push(e);
102873
102690
  }
102874
102691
  try {
102875
- const binding = require2("@tursodatabase/sync-openharmony-arm64");
102876
- const bindingPackageVersion = require2("@tursodatabase/sync-openharmony-arm64/package.json").version;
102877
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102878
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102692
+ const binding = require2("@tursodatabase/database-openharmony-arm64");
102693
+ const bindingPackageVersion = require2("@tursodatabase/database-openharmony-arm64/package.json").version;
102694
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102695
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102879
102696
  }
102880
102697
  return binding;
102881
102698
  } catch (e) {
@@ -102883,15 +102700,15 @@ function requireNative() {
102883
102700
  }
102884
102701
  } else if (process.arch === "x64") {
102885
102702
  try {
102886
- return require2("./sync.openharmony-x64.node");
102703
+ return require2("./turso.openharmony-x64.node");
102887
102704
  } catch (e) {
102888
102705
  loadErrors.push(e);
102889
102706
  }
102890
102707
  try {
102891
- const binding = require2("@tursodatabase/sync-openharmony-x64");
102892
- const bindingPackageVersion = require2("@tursodatabase/sync-openharmony-x64/package.json").version;
102893
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102894
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102708
+ const binding = require2("@tursodatabase/database-openharmony-x64");
102709
+ const bindingPackageVersion = require2("@tursodatabase/database-openharmony-x64/package.json").version;
102710
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102711
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102895
102712
  }
102896
102713
  return binding;
102897
102714
  } catch (e) {
@@ -102899,15 +102716,15 @@ function requireNative() {
102899
102716
  }
102900
102717
  } else if (process.arch === "arm") {
102901
102718
  try {
102902
- return require2("./sync.openharmony-arm.node");
102719
+ return require2("./turso.openharmony-arm.node");
102903
102720
  } catch (e) {
102904
102721
  loadErrors.push(e);
102905
102722
  }
102906
102723
  try {
102907
- const binding = require2("@tursodatabase/sync-openharmony-arm");
102908
- const bindingPackageVersion = require2("@tursodatabase/sync-openharmony-arm/package.json").version;
102909
- if (bindingPackageVersion !== "0.4.0-pre.18" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102910
- throw new Error(`Native binding package version mismatch, expected 0.4.0-pre.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102724
+ const binding = require2("@tursodatabase/database-openharmony-arm");
102725
+ const bindingPackageVersion = require2("@tursodatabase/database-openharmony-arm/package.json").version;
102726
+ if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
102727
+ throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
102911
102728
  }
102912
102729
  return binding;
102913
102730
  } catch (e) {
@@ -102923,7 +102740,7 @@ function requireNative() {
102923
102740
  nativeBinding = requireNative();
102924
102741
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
102925
102742
  try {
102926
- nativeBinding = require2("./sync.wasi.cjs");
102743
+ nativeBinding = require2("./turso.wasi.cjs");
102927
102744
  } catch (err2) {
102928
102745
  if (process.env.NAPI_RS_FORCE_WASI) {
102929
102746
  loadErrors.push(err2);
@@ -102931,7 +102748,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
102931
102748
  }
102932
102749
  if (!nativeBinding) {
102933
102750
  try {
102934
- nativeBinding = require2("@tursodatabase/sync-wasm32-wasi");
102751
+ nativeBinding = require2("@tursodatabase/database-wasm32-wasi");
102935
102752
  } catch (err2) {
102936
102753
  if (process.env.NAPI_RS_FORCE_WASI) {
102937
102754
  loadErrors.push(err2);
@@ -102945,668 +102762,12 @@ if (!nativeBinding) {
102945
102762
  }
102946
102763
  throw new Error(`Failed to load native binding`);
102947
102764
  }
102948
- var { BatchExecutor, Database: Database3, Statement: Statement3, GeneratorHolder, JsDataCompletion, JsProtocolIo, JsProtocolRequestBytes, SyncEngine, SyncEngineChanges, DatabaseChangeTypeJs, SyncEngineProtocolVersion } = nativeBinding;
102949
-
102950
- // ../../node_modules/.bun/@tursodatabase+sync@0.4.4/node_modules/@tursodatabase/sync/dist/promise.js
102951
- import { promises as promises2 } from "fs";
102952
- var NodeIO = {
102953
- async read(path4) {
102954
- try {
102955
- return await promises2.readFile(path4);
102956
- } catch (error51) {
102957
- if (error51.code === "ENOENT") {
102958
- return null;
102959
- }
102960
- throw error51;
102961
- }
102962
- },
102963
- async write(path4, data) {
102964
- const unix = Math.floor(Date.now() / 1000);
102965
- const nonce = Math.floor(Math.random() * 1e9);
102966
- const tmp2 = `${path4}.tmp.${unix}.${nonce}`;
102967
- await promises2.writeFile(tmp2, new Uint8Array(data));
102968
- try {
102969
- await promises2.rename(tmp2, path4);
102970
- } catch (err2) {
102971
- await promises2.unlink(tmp2);
102972
- throw err2;
102973
- }
102974
- }
102975
- };
102976
- function memoryIO2() {
102977
- let values3 = new Map;
102978
- return {
102979
- async read(path4) {
102980
- return values3.get(path4);
102981
- },
102982
- async write(path4, data) {
102983
- values3.set(path4, data);
102984
- }
102985
- };
102986
- }
102987
-
102988
- class Database4 extends Database {
102989
- #engine;
102990
- #guards;
102991
- #runner;
102992
- constructor(opts) {
102993
- if (opts.url == null) {
102994
- super(new Database3(opts.path, { tracing: opts.tracing }));
102995
- this.#engine = null;
102996
- return;
102997
- }
102998
- let partialSyncOpts = undefined;
102999
- if (opts.partialSyncExperimental != null) {
103000
- switch (opts.partialSyncExperimental.bootstrapStrategy.kind) {
103001
- case "prefix":
103002
- partialSyncOpts = {
103003
- bootstrapStrategy: { type: "Prefix", length: opts.partialSyncExperimental.bootstrapStrategy.length },
103004
- segmentSize: opts.partialSyncExperimental.segmentSize,
103005
- prefetch: opts.partialSyncExperimental.prefetch
103006
- };
103007
- break;
103008
- case "query":
103009
- partialSyncOpts = {
103010
- bootstrapStrategy: { type: "Query", query: opts.partialSyncExperimental.bootstrapStrategy.query },
103011
- segmentSize: opts.partialSyncExperimental.segmentSize,
103012
- prefetch: opts.partialSyncExperimental.prefetch
103013
- };
103014
- break;
103015
- }
103016
- }
103017
- const engine = new SyncEngine({
103018
- path: opts.path,
103019
- clientName: opts.clientName,
103020
- useTransform: opts.transform != null,
103021
- protocolVersion: "v1",
103022
- longPollTimeoutMs: opts.longPollTimeoutMs,
103023
- tracing: opts.tracing,
103024
- bootstrapIfEmpty: typeof opts.url != "function" || opts.url() != null,
103025
- remoteEncryption: opts.remoteEncryption?.cipher,
103026
- partialSyncOpts
103027
- });
103028
- let headers;
103029
- if (typeof opts.authToken == "function") {
103030
- const authToken = opts.authToken;
103031
- headers = async () => ({
103032
- ...opts.authToken != null && { Authorization: `Bearer ${await authToken()}` },
103033
- ...opts.remoteEncryption != null && {
103034
- "x-turso-encryption-key": opts.remoteEncryption.key,
103035
- "x-turso-encryption-cipher": opts.remoteEncryption.cipher
103036
- }
103037
- });
103038
- } else {
103039
- const authToken = opts.authToken;
103040
- headers = {
103041
- ...opts.authToken != null && { Authorization: `Bearer ${authToken}` },
103042
- ...opts.remoteEncryption != null && {
103043
- "x-turso-encryption-key": opts.remoteEncryption.key,
103044
- "x-turso-encryption-cipher": opts.remoteEncryption.cipher
103045
- }
103046
- };
103047
- }
103048
- const runOpts = {
103049
- url: opts.url,
103050
- headers,
103051
- preemptionMs: 1,
103052
- transform: opts.transform
103053
- };
103054
- const db = engine.db();
103055
- const memory = db.memory;
103056
- const io = memory ? memoryIO2() : NodeIO;
103057
- const run11 = runner(runOpts, io, engine);
103058
- super(engine.db(), () => run11.wait());
103059
- this.#runner = run11;
103060
- this.#engine = engine;
103061
- this.#guards = new SyncEngineGuards;
103062
- }
103063
- async connect() {
103064
- if (this.connected) {
103065
- return;
103066
- } else if (this.#engine == null) {
103067
- await super.connect();
103068
- } else {
103069
- await run10(this.#runner, this.#engine.connect());
103070
- }
103071
- this.connected = true;
103072
- }
103073
- async pull() {
103074
- if (this.#engine == null) {
103075
- throw new Error("sync is disabled as database was opened without sync support");
103076
- }
103077
- const changes2 = await this.#guards.wait(async () => await run10(this.#runner, this.#engine.wait()));
103078
- if (changes2.empty()) {
103079
- return false;
103080
- }
103081
- await this.#guards.apply(async () => await run10(this.#runner, this.#engine.apply(changes2)));
103082
- return true;
103083
- }
103084
- async push() {
103085
- if (this.#engine == null) {
103086
- throw new Error("sync is disabled as database was opened without sync support");
103087
- }
103088
- await this.#guards.push(async () => await run10(this.#runner, this.#engine.push()));
103089
- }
103090
- async checkpoint() {
103091
- if (this.#engine == null) {
103092
- throw new Error("sync is disabled as database was opened without sync support");
103093
- }
103094
- await this.#guards.checkpoint(async () => await run10(this.#runner, this.#engine.checkpoint()));
103095
- }
103096
- async stats() {
103097
- if (this.#engine == null) {
103098
- throw new Error("sync is disabled as database was opened without sync support");
103099
- }
103100
- return await run10(this.#runner, this.#engine.stats());
103101
- }
103102
- async close() {
103103
- await super.close();
103104
- if (this.#engine != null) {
103105
- this.#engine.close();
103106
- }
103107
- }
103108
- }
103109
- async function connect2(opts) {
103110
- const db = new Database4(opts);
103111
- await db.connect();
103112
- return db;
103113
- }
103114
-
103115
- // ../../node_modules/.bun/@tursodatabase+database@0.4.4/node_modules/@tursodatabase/database/index.js
103116
- import { createRequire as createRequire2 } from "module";
103117
- var require3 = createRequire2(import.meta.url);
103118
- var __dirname3 = new URL(".", import.meta.url).pathname;
103119
- var { readFileSync: readFileSync2 } = require3("node:fs");
103120
- var nativeBinding2 = null;
103121
- var loadErrors2 = [];
103122
- var isMusl2 = () => {
103123
- let musl = false;
103124
- if (process.platform === "linux") {
103125
- musl = isMuslFromFilesystem2();
103126
- if (musl === null) {
103127
- musl = isMuslFromReport2();
103128
- }
103129
- if (musl === null) {
103130
- musl = isMuslFromChildProcess2();
103131
- }
103132
- }
103133
- return musl;
103134
- };
103135
- var isFileMusl2 = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
103136
- var isMuslFromFilesystem2 = () => {
103137
- try {
103138
- return readFileSync2("/usr/bin/ldd", "utf-8").includes("musl");
103139
- } catch {
103140
- return null;
103141
- }
103142
- };
103143
- var isMuslFromReport2 = () => {
103144
- let report = null;
103145
- if (typeof process.report?.getReport === "function") {
103146
- process.report.excludeNetwork = true;
103147
- report = process.report.getReport();
103148
- }
103149
- if (!report) {
103150
- return null;
103151
- }
103152
- if (report.header && report.header.glibcVersionRuntime) {
103153
- return false;
103154
- }
103155
- if (Array.isArray(report.sharedObjects)) {
103156
- if (report.sharedObjects.some(isFileMusl2)) {
103157
- return true;
103158
- }
103159
- }
103160
- return false;
103161
- };
103162
- var isMuslFromChildProcess2 = () => {
103163
- try {
103164
- return require3("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
103165
- } catch (e) {
103166
- return false;
103167
- }
103168
- };
103169
- function requireNative2() {
103170
- if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
103171
- try {
103172
- nativeBinding2 = require3(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
103173
- } catch (err2) {
103174
- loadErrors2.push(err2);
103175
- }
103176
- } else if (process.platform === "android") {
103177
- if (process.arch === "arm64") {
103178
- try {
103179
- return require3("./turso.android-arm64.node");
103180
- } catch (e) {
103181
- loadErrors2.push(e);
103182
- }
103183
- try {
103184
- const binding = require3("@tursodatabase/database-android-arm64");
103185
- const bindingPackageVersion = require3("@tursodatabase/database-android-arm64/package.json").version;
103186
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103187
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103188
- }
103189
- return binding;
103190
- } catch (e) {
103191
- loadErrors2.push(e);
103192
- }
103193
- } else if (process.arch === "arm") {
103194
- try {
103195
- return require3("./turso.android-arm-eabi.node");
103196
- } catch (e) {
103197
- loadErrors2.push(e);
103198
- }
103199
- try {
103200
- const binding = require3("@tursodatabase/database-android-arm-eabi");
103201
- const bindingPackageVersion = require3("@tursodatabase/database-android-arm-eabi/package.json").version;
103202
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103203
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103204
- }
103205
- return binding;
103206
- } catch (e) {
103207
- loadErrors2.push(e);
103208
- }
103209
- } else {
103210
- loadErrors2.push(new Error(`Unsupported architecture on Android ${process.arch}`));
103211
- }
103212
- } else if (process.platform === "win32") {
103213
- if (process.arch === "x64") {
103214
- try {
103215
- return require3("./turso.win32-x64-msvc.node");
103216
- } catch (e) {
103217
- loadErrors2.push(e);
103218
- }
103219
- try {
103220
- const binding = require3("@tursodatabase/database-win32-x64-msvc");
103221
- const bindingPackageVersion = require3("@tursodatabase/database-win32-x64-msvc/package.json").version;
103222
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103223
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103224
- }
103225
- return binding;
103226
- } catch (e) {
103227
- loadErrors2.push(e);
103228
- }
103229
- } else if (process.arch === "ia32") {
103230
- try {
103231
- return require3("./turso.win32-ia32-msvc.node");
103232
- } catch (e) {
103233
- loadErrors2.push(e);
103234
- }
103235
- try {
103236
- const binding = require3("@tursodatabase/database-win32-ia32-msvc");
103237
- const bindingPackageVersion = require3("@tursodatabase/database-win32-ia32-msvc/package.json").version;
103238
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103239
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103240
- }
103241
- return binding;
103242
- } catch (e) {
103243
- loadErrors2.push(e);
103244
- }
103245
- } else if (process.arch === "arm64") {
103246
- try {
103247
- return require3("./turso.win32-arm64-msvc.node");
103248
- } catch (e) {
103249
- loadErrors2.push(e);
103250
- }
103251
- try {
103252
- const binding = require3("@tursodatabase/database-win32-arm64-msvc");
103253
- const bindingPackageVersion = require3("@tursodatabase/database-win32-arm64-msvc/package.json").version;
103254
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103255
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103256
- }
103257
- return binding;
103258
- } catch (e) {
103259
- loadErrors2.push(e);
103260
- }
103261
- } else {
103262
- loadErrors2.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
103263
- }
103264
- } else if (process.platform === "darwin") {
103265
- try {
103266
- return require3("./turso.darwin-universal.node");
103267
- } catch (e) {
103268
- loadErrors2.push(e);
103269
- }
103270
- try {
103271
- const binding = require3("@tursodatabase/database-darwin-universal");
103272
- const bindingPackageVersion = require3("@tursodatabase/database-darwin-universal/package.json").version;
103273
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103274
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103275
- }
103276
- return binding;
103277
- } catch (e) {
103278
- loadErrors2.push(e);
103279
- }
103280
- if (process.arch === "x64") {
103281
- try {
103282
- return require3("./turso.darwin-x64.node");
103283
- } catch (e) {
103284
- loadErrors2.push(e);
103285
- }
103286
- try {
103287
- const binding = require3("@tursodatabase/database-darwin-x64");
103288
- const bindingPackageVersion = require3("@tursodatabase/database-darwin-x64/package.json").version;
103289
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103290
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103291
- }
103292
- return binding;
103293
- } catch (e) {
103294
- loadErrors2.push(e);
103295
- }
103296
- } else if (process.arch === "arm64") {
103297
- try {
103298
- return require3("./turso.darwin-arm64.node");
103299
- } catch (e) {
103300
- loadErrors2.push(e);
103301
- }
103302
- try {
103303
- const binding = require3("@tursodatabase/database-darwin-arm64");
103304
- const bindingPackageVersion = require3("@tursodatabase/database-darwin-arm64/package.json").version;
103305
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103306
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103307
- }
103308
- return binding;
103309
- } catch (e) {
103310
- loadErrors2.push(e);
103311
- }
103312
- } else {
103313
- loadErrors2.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
103314
- }
103315
- } else if (process.platform === "freebsd") {
103316
- if (process.arch === "x64") {
103317
- try {
103318
- return require3("./turso.freebsd-x64.node");
103319
- } catch (e) {
103320
- loadErrors2.push(e);
103321
- }
103322
- try {
103323
- const binding = require3("@tursodatabase/database-freebsd-x64");
103324
- const bindingPackageVersion = require3("@tursodatabase/database-freebsd-x64/package.json").version;
103325
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103326
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103327
- }
103328
- return binding;
103329
- } catch (e) {
103330
- loadErrors2.push(e);
103331
- }
103332
- } else if (process.arch === "arm64") {
103333
- try {
103334
- return require3("./turso.freebsd-arm64.node");
103335
- } catch (e) {
103336
- loadErrors2.push(e);
103337
- }
103338
- try {
103339
- const binding = require3("@tursodatabase/database-freebsd-arm64");
103340
- const bindingPackageVersion = require3("@tursodatabase/database-freebsd-arm64/package.json").version;
103341
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103342
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103343
- }
103344
- return binding;
103345
- } catch (e) {
103346
- loadErrors2.push(e);
103347
- }
103348
- } else {
103349
- loadErrors2.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
103350
- }
103351
- } else if (process.platform === "linux") {
103352
- if (process.arch === "x64") {
103353
- if (isMusl2()) {
103354
- try {
103355
- return require3("./turso.linux-x64-musl.node");
103356
- } catch (e) {
103357
- loadErrors2.push(e);
103358
- }
103359
- try {
103360
- const binding = require3("@tursodatabase/database-linux-x64-musl");
103361
- const bindingPackageVersion = require3("@tursodatabase/database-linux-x64-musl/package.json").version;
103362
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103363
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103364
- }
103365
- return binding;
103366
- } catch (e) {
103367
- loadErrors2.push(e);
103368
- }
103369
- } else {
103370
- try {
103371
- return require3("./turso.linux-x64-gnu.node");
103372
- } catch (e) {
103373
- loadErrors2.push(e);
103374
- }
103375
- try {
103376
- const binding = require3("@tursodatabase/database-linux-x64-gnu");
103377
- const bindingPackageVersion = require3("@tursodatabase/database-linux-x64-gnu/package.json").version;
103378
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103379
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103380
- }
103381
- return binding;
103382
- } catch (e) {
103383
- loadErrors2.push(e);
103384
- }
103385
- }
103386
- } else if (process.arch === "arm64") {
103387
- if (isMusl2()) {
103388
- try {
103389
- return require3("./turso.linux-arm64-musl.node");
103390
- } catch (e) {
103391
- loadErrors2.push(e);
103392
- }
103393
- try {
103394
- const binding = require3("@tursodatabase/database-linux-arm64-musl");
103395
- const bindingPackageVersion = require3("@tursodatabase/database-linux-arm64-musl/package.json").version;
103396
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103397
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103398
- }
103399
- return binding;
103400
- } catch (e) {
103401
- loadErrors2.push(e);
103402
- }
103403
- } else {
103404
- try {
103405
- return require3("./turso.linux-arm64-gnu.node");
103406
- } catch (e) {
103407
- loadErrors2.push(e);
103408
- }
103409
- try {
103410
- const binding = require3("@tursodatabase/database-linux-arm64-gnu");
103411
- const bindingPackageVersion = require3("@tursodatabase/database-linux-arm64-gnu/package.json").version;
103412
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103413
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103414
- }
103415
- return binding;
103416
- } catch (e) {
103417
- loadErrors2.push(e);
103418
- }
103419
- }
103420
- } else if (process.arch === "arm") {
103421
- if (isMusl2()) {
103422
- try {
103423
- return require3("./turso.linux-arm-musleabihf.node");
103424
- } catch (e) {
103425
- loadErrors2.push(e);
103426
- }
103427
- try {
103428
- const binding = require3("@tursodatabase/database-linux-arm-musleabihf");
103429
- const bindingPackageVersion = require3("@tursodatabase/database-linux-arm-musleabihf/package.json").version;
103430
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103431
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103432
- }
103433
- return binding;
103434
- } catch (e) {
103435
- loadErrors2.push(e);
103436
- }
103437
- } else {
103438
- try {
103439
- return require3("./turso.linux-arm-gnueabihf.node");
103440
- } catch (e) {
103441
- loadErrors2.push(e);
103442
- }
103443
- try {
103444
- const binding = require3("@tursodatabase/database-linux-arm-gnueabihf");
103445
- const bindingPackageVersion = require3("@tursodatabase/database-linux-arm-gnueabihf/package.json").version;
103446
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103447
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103448
- }
103449
- return binding;
103450
- } catch (e) {
103451
- loadErrors2.push(e);
103452
- }
103453
- }
103454
- } else if (process.arch === "riscv64") {
103455
- if (isMusl2()) {
103456
- try {
103457
- return require3("./turso.linux-riscv64-musl.node");
103458
- } catch (e) {
103459
- loadErrors2.push(e);
103460
- }
103461
- try {
103462
- const binding = require3("@tursodatabase/database-linux-riscv64-musl");
103463
- const bindingPackageVersion = require3("@tursodatabase/database-linux-riscv64-musl/package.json").version;
103464
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103465
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103466
- }
103467
- return binding;
103468
- } catch (e) {
103469
- loadErrors2.push(e);
103470
- }
103471
- } else {
103472
- try {
103473
- return require3("./turso.linux-riscv64-gnu.node");
103474
- } catch (e) {
103475
- loadErrors2.push(e);
103476
- }
103477
- try {
103478
- const binding = require3("@tursodatabase/database-linux-riscv64-gnu");
103479
- const bindingPackageVersion = require3("@tursodatabase/database-linux-riscv64-gnu/package.json").version;
103480
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103481
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103482
- }
103483
- return binding;
103484
- } catch (e) {
103485
- loadErrors2.push(e);
103486
- }
103487
- }
103488
- } else if (process.arch === "ppc64") {
103489
- try {
103490
- return require3("./turso.linux-ppc64-gnu.node");
103491
- } catch (e) {
103492
- loadErrors2.push(e);
103493
- }
103494
- try {
103495
- const binding = require3("@tursodatabase/database-linux-ppc64-gnu");
103496
- const bindingPackageVersion = require3("@tursodatabase/database-linux-ppc64-gnu/package.json").version;
103497
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103498
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103499
- }
103500
- return binding;
103501
- } catch (e) {
103502
- loadErrors2.push(e);
103503
- }
103504
- } else if (process.arch === "s390x") {
103505
- try {
103506
- return require3("./turso.linux-s390x-gnu.node");
103507
- } catch (e) {
103508
- loadErrors2.push(e);
103509
- }
103510
- try {
103511
- const binding = require3("@tursodatabase/database-linux-s390x-gnu");
103512
- const bindingPackageVersion = require3("@tursodatabase/database-linux-s390x-gnu/package.json").version;
103513
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103514
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103515
- }
103516
- return binding;
103517
- } catch (e) {
103518
- loadErrors2.push(e);
103519
- }
103520
- } else {
103521
- loadErrors2.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
103522
- }
103523
- } else if (process.platform === "openharmony") {
103524
- if (process.arch === "arm64") {
103525
- try {
103526
- return require3("./turso.openharmony-arm64.node");
103527
- } catch (e) {
103528
- loadErrors2.push(e);
103529
- }
103530
- try {
103531
- const binding = require3("@tursodatabase/database-openharmony-arm64");
103532
- const bindingPackageVersion = require3("@tursodatabase/database-openharmony-arm64/package.json").version;
103533
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103534
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103535
- }
103536
- return binding;
103537
- } catch (e) {
103538
- loadErrors2.push(e);
103539
- }
103540
- } else if (process.arch === "x64") {
103541
- try {
103542
- return require3("./turso.openharmony-x64.node");
103543
- } catch (e) {
103544
- loadErrors2.push(e);
103545
- }
103546
- try {
103547
- const binding = require3("@tursodatabase/database-openharmony-x64");
103548
- const bindingPackageVersion = require3("@tursodatabase/database-openharmony-x64/package.json").version;
103549
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103550
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103551
- }
103552
- return binding;
103553
- } catch (e) {
103554
- loadErrors2.push(e);
103555
- }
103556
- } else if (process.arch === "arm") {
103557
- try {
103558
- return require3("./turso.openharmony-arm.node");
103559
- } catch (e) {
103560
- loadErrors2.push(e);
103561
- }
103562
- try {
103563
- const binding = require3("@tursodatabase/database-openharmony-arm");
103564
- const bindingPackageVersion = require3("@tursodatabase/database-openharmony-arm/package.json").version;
103565
- if (bindingPackageVersion !== "0.3.0-pre.4" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
103566
- throw new Error(`Native binding package version mismatch, expected 0.3.0-pre.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103567
- }
103568
- return binding;
103569
- } catch (e) {
103570
- loadErrors2.push(e);
103571
- }
103572
- } else {
103573
- loadErrors2.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
103574
- }
103575
- } else {
103576
- loadErrors2.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
103577
- }
103578
- }
103579
- nativeBinding2 = requireNative2();
103580
- if (!nativeBinding2 || process.env.NAPI_RS_FORCE_WASI) {
103581
- try {
103582
- nativeBinding2 = require3("./turso.wasi.cjs");
103583
- } catch (err2) {
103584
- if (process.env.NAPI_RS_FORCE_WASI) {
103585
- loadErrors2.push(err2);
103586
- }
103587
- }
103588
- if (!nativeBinding2) {
103589
- try {
103590
- nativeBinding2 = require3("@tursodatabase/database-wasm32-wasi");
103591
- } catch (err2) {
103592
- if (process.env.NAPI_RS_FORCE_WASI) {
103593
- loadErrors2.push(err2);
103594
- }
103595
- }
103596
- }
103597
- }
103598
- if (!nativeBinding2) {
103599
- if (loadErrors2.length > 0) {
103600
- throw new Error(`Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors2 });
103601
- }
103602
- throw new Error(`Failed to load native binding`);
103603
- }
103604
- var { BatchExecutor: BatchExecutor2, Database: Database5, Statement: Statement4 } = nativeBinding2;
102765
+ var { BatchExecutor, Database: Database3, Statement: Statement3 } = nativeBinding;
103605
102766
 
103606
102767
  // ../../node_modules/.bun/@tursodatabase+database@0.4.4/node_modules/@tursodatabase/database/dist/promise.js
103607
- class Database6 extends Database {
102768
+ class Database4 extends Database {
103608
102769
  constructor(path4, opts = {}) {
103609
- super(new Database5(path4, opts));
102770
+ super(new Database3(path4, opts));
103610
102771
  }
103611
102772
  }
103612
102773
 
@@ -104962,7 +104123,7 @@ class AgentFS2 extends AgentFSCore {
104962
104123
  }
104963
104124
  dbPath = `${dir2}/${id2}.db`;
104964
104125
  }
104965
- const db = new Database6(dbPath);
104126
+ const db = new Database4(dbPath);
104966
104127
  await db.connect();
104967
104128
  return await this.openWith(db);
104968
104129
  }
@@ -110354,7 +109515,7 @@ var layer20 = (config3) => scopedContext2(map16(make78(config3), (client) => mak
110354
109515
  // ../../node_modules/.bun/@effect+sql-libsql@0.39.0+d00fac6ed6378613/node_modules/@effect/sql-libsql/dist/esm/LibsqlMigrator.js
110355
109516
  var exports_LibsqlMigrator = {};
110356
109517
  __export(exports_LibsqlMigrator, {
110357
- run: () => run11,
109518
+ run: () => run10,
110358
109519
  make: () => make73,
110359
109520
  layer: () => layer21,
110360
109521
  fromRecord: () => fromRecord,
@@ -110373,8 +109534,8 @@ var fromFileSystem = (directory5) => FileSystem.pipe(flatMap10((FS) => FS.readDi
110373
109534
  })).sort(([a], [b]) => a - b)));
110374
109535
 
110375
109536
  // ../../node_modules/.bun/@effect+sql-libsql@0.39.0+d00fac6ed6378613/node_modules/@effect/sql-libsql/dist/esm/LibsqlMigrator.js
110376
- var run11 = /* @__PURE__ */ make73({});
110377
- var layer21 = (options7) => effectDiscard(run11(options7));
109537
+ var run10 = /* @__PURE__ */ make73({});
109538
+ var layer21 = (options7) => effectDiscard(run10(options7));
110378
109539
  // ../../node_modules/.bun/@effect+sql-pg@0.50.1+d00fac6ed6378613/node_modules/@effect/sql-pg/dist/esm/PgClient.js
110379
109540
  var exports_PgClient = {};
110380
109541
  __export(exports_PgClient, {
@@ -110728,7 +109889,7 @@ var PgJson = /* @__PURE__ */ custom4("PgJson");
110728
109889
  // ../../node_modules/.bun/@effect+sql-pg@0.50.1+d00fac6ed6378613/node_modules/@effect/sql-pg/dist/esm/PgMigrator.js
110729
109890
  var exports_PgMigrator = {};
110730
109891
  __export(exports_PgMigrator, {
110731
- run: () => run12,
109892
+ run: () => run11,
110732
109893
  make: () => make73,
110733
109894
  layer: () => layer23,
110734
109895
  fromRecord: () => fromRecord,
@@ -110737,7 +109898,7 @@ __export(exports_PgMigrator, {
110737
109898
  fromBabelGlob: () => fromBabelGlob,
110738
109899
  MigrationError: () => MigrationError
110739
109900
  });
110740
- var run12 = /* @__PURE__ */ make73({
109901
+ var run11 = /* @__PURE__ */ make73({
110741
109902
  dumpSchema(path4, table2) {
110742
109903
  const pgDump = (args3) => gen2(function* () {
110743
109904
  const sql = yield* PgClient;
@@ -110779,7 +109940,7 @@ var run12 = /* @__PURE__ */ make73({
110779
109940
  return pgDumpFile(path4);
110780
109941
  }
110781
109942
  });
110782
- var layer23 = (options7) => effectDiscard(run12(options7));
109943
+ var layer23 = (options7) => effectDiscard(run11(options7));
110783
109944
  // ../core/src/internal/services/sql.ts
110784
109945
  var Migrations2 = (config3) => exports_Migrator.fromRecord({
110785
109946
  "0001_create_documents_table": gen2(function* () {
@@ -112973,11 +112134,11 @@ var program = gen2(function* () {
112973
112134
  const command = exports_Command.make("grepai").pipe(exports_Command.withSubcommands([indexCommand, searchCommand]));
112974
112135
  const cli = exports_Command.run(command, {
112975
112136
  name: "GREP AI",
112976
- version: "v0.6.9"
112137
+ version: "v0.7.0"
112977
112138
  });
112978
112139
  yield* cli(process.argv);
112979
112140
  });
112980
112141
  program.pipe(provide2(mergeAll5(GrepAi.Default).pipe(provideMerge2(Clack.Default), provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
112981
112142
 
112982
- //# debugId=5E9BE8572F8D989364756E2164756E21
112143
+ //# debugId=039C99EDE759421464756E2164756E21
112983
112144
  //# sourceMappingURL=index.js.map