@axiom-lattice/local-stores 3.0.2 → 3.1.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@3.0.2 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@3.1.0 build /home/runner/work/agentic/agentic/packages/local-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 149.55 KB
12
- ESM dist/index.mjs.map 279.48 KB
13
- ESM ⚡️ Build success in 346ms
14
- CJS dist/index.js 153.07 KB
15
- CJS dist/index.js.map 282.33 KB
16
- CJS ⚡️ Build success in 351ms
11
+ CJS dist/index.js 153.89 KB
12
+ CJS dist/index.js.map 283.58 KB
13
+ CJS ⚡️ Build success in 384ms
14
+ ESM dist/index.mjs 150.38 KB
15
+ ESM dist/index.mjs.map 280.73 KB
16
+ ESM ⚡️ Build success in 385ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 12584ms
18
+ DTS ⚡️ Build success in 15116ms
19
19
  DTS dist/index.d.ts 31.56 KB
20
20
  DTS dist/index.d.mts 31.56 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - eb3173b: up
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [eb3173b]
12
+ - @axiom-lattice/core@4.2.0
13
+ - @axiom-lattice/protocols@4.1.0
14
+
3
15
  ## 3.0.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2236,8 +2236,34 @@ var LocalEvalStore = class {
2236
2236
  return this.getProjectById(tenantId, id);
2237
2237
  }
2238
2238
  async deleteProject(tenantId, id) {
2239
- const result = this.db.prepare(`DELETE FROM lt_eval_projects WHERE tenant_id = ? AND id = ?`).run(tenantId, id);
2240
- return result.changes > 0;
2239
+ const db = this.db.getRawDb();
2240
+ db.run("BEGIN TRANSACTION");
2241
+ try {
2242
+ db.run(
2243
+ `DELETE FROM lt_eval_run_results
2244
+ WHERE run_id IN (
2245
+ SELECT id FROM lt_eval_runs WHERE tenant_id = ? AND project_id = ?
2246
+ )`,
2247
+ [tenantId, id]
2248
+ );
2249
+ db.run(
2250
+ `DELETE FROM lt_eval_cases
2251
+ WHERE tenant_id = ? AND suite_id IN (
2252
+ SELECT id FROM lt_eval_suites WHERE tenant_id = ? AND project_id = ?
2253
+ )`,
2254
+ [tenantId, tenantId, id]
2255
+ );
2256
+ db.run(`DELETE FROM lt_eval_runs WHERE tenant_id = ? AND project_id = ?`, [tenantId, id]);
2257
+ db.run(`DELETE FROM lt_eval_suites WHERE tenant_id = ? AND project_id = ?`, [tenantId, id]);
2258
+ db.run(`DELETE FROM lt_eval_projects WHERE tenant_id = ? AND id = ?`, [tenantId, id]);
2259
+ const deleted = db.getRowsModified() > 0;
2260
+ db.run("COMMIT");
2261
+ this.db.save();
2262
+ return deleted;
2263
+ } catch (error) {
2264
+ db.run("ROLLBACK");
2265
+ throw error;
2266
+ }
2241
2267
  }
2242
2268
  // -------------------------------------------------------------------------
2243
2269
  // Suites