@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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/LocalEvalStore.test.ts +41 -2
- package/src/stores/LocalEvalStore.ts +28 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/local-stores@3.0
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m153.89 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m283.58 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 384ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m150.38 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m280.73 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 385ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 15116ms
|
|
19
19
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m31.56 KB[39m
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m31.56 KB[39m
|
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
|
|
2240
|
-
|
|
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
|