@mastra/libsql 1.30.0-alpha.0 → 1.30.0-alpha.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.
package/dist/index.js CHANGED
@@ -1447,8 +1447,9 @@ var LibSQLVector = class extends MastraVector {
1447
1447
  }
1448
1448
  }
1449
1449
  async _doTruncateIndex({ indexName }) {
1450
+ const parsedIndexName = parseSqlIdentifier(indexName, "index name");
1450
1451
  await this.turso.execute({
1451
- sql: `DELETE FROM ${parseSqlIdentifier(indexName, "index name")}`,
1452
+ sql: `DELETE FROM ${parsedIndexName} WHERE rowid IS NOT NULL`,
1452
1453
  args: []
1453
1454
  });
1454
1455
  }
@@ -12016,9 +12017,19 @@ var ObservabilityLibSQL = class ObservabilityLibSQL extends ObservabilityStorage
12016
12017
  indexed: true
12017
12018
  } };
12018
12019
  #db;
12020
+ #persistenceLocation;
12021
+ get persistenceLocation() {
12022
+ return this.#persistenceLocation;
12023
+ }
12019
12024
  constructor(config) {
12020
12025
  super();
12021
12026
  const client = resolveClient(config);
12027
+ this.#persistenceLocation = config.embeddedReplica || client.protocol === "file" ? "local" : [
12028
+ "http",
12029
+ "https",
12030
+ "ws",
12031
+ "wss"
12032
+ ].includes(client.protocol) ? "remote" : void 0;
12022
12033
  this.#db = new LibSQLDB({
12023
12034
  client,
12024
12035
  maxRetries: config.maxRetries,