@sixb/sqlite 0.1.7 → 0.1.8
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/execution-storage.d.ts +3 -2
- package/dist/execution-storage.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1492 -380
- package/dist/index.js.map +16 -10
- package/dist/migrations.d.ts.map +1 -1
- package/dist/objects/index.d.ts +3 -0
- package/dist/objects/index.d.ts.map +1 -0
- package/dist/{object-query-compiler.d.ts → objects/query-compiler.d.ts} +16 -1
- package/dist/objects/query-compiler.d.ts.map +1 -0
- package/dist/objects/read-scope.d.ts +17 -0
- package/dist/objects/read-scope.d.ts.map +1 -0
- package/dist/objects/reader.d.ts +51 -0
- package/dist/objects/reader.d.ts.map +1 -0
- package/dist/objects/rows.d.ts +33 -0
- package/dist/objects/rows.d.ts.map +1 -0
- package/dist/objects/selected-reader.d.ts +9 -0
- package/dist/objects/selected-reader.d.ts.map +1 -0
- package/dist/{object-storage.d.ts → objects/storage.d.ts} +12 -9
- package/dist/objects/storage.d.ts.map +1 -0
- package/dist/share-grant-storage.d.ts +20 -0
- package/dist/share-grant-storage.d.ts.map +1 -0
- package/dist/share-session-storage.d.ts +19 -0
- package/dist/share-session-storage.d.ts.map +1 -0
- package/dist/storage-errors.d.ts +1 -0
- package/dist/storage-errors.d.ts.map +1 -1
- package/dist/transactions.d.ts +8 -0
- package/dist/transactions.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/execution-storage.ts +22 -3
- package/src/index.ts +18 -3
- package/src/migrations/035-share-grants.sql +66 -0
- package/src/migrations/036-share-sessions.sql +226 -0
- package/src/migrations.ts +4 -0
- package/src/objects/index.ts +2 -0
- package/src/{object-query-compiler.ts → objects/query-compiler.ts} +104 -54
- package/src/objects/read-scope.ts +316 -0
- package/src/objects/reader.ts +526 -0
- package/src/objects/rows.ts +123 -0
- package/src/objects/selected-reader.ts +119 -0
- package/src/objects/storage.ts +296 -0
- package/src/share-grant-storage.ts +252 -0
- package/src/share-session-storage.ts +189 -0
- package/src/storage-errors.ts +4 -0
- package/src/transactions.ts +32 -0
- package/dist/object-query-compiler.d.ts.map +0 -1
- package/dist/object-storage.d.ts.map +0 -1
- package/src/object-storage.ts +0 -709
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { Database } from "bun:sqlite";
|
|
2
|
-
import type { CreateExecutionInput, ExecutionRecord, ExecutionStorage } from "@sixb/core/storage";
|
|
2
|
+
import type { CreateExecutionInput, ExecutionRecord, ExecutionStorage, ShareSessionStorage } from "@sixb/core/storage";
|
|
3
3
|
import type { SqliteAuthStorage } from "./auth-storage";
|
|
4
4
|
export declare class SqliteExecutionStorage implements ExecutionStorage {
|
|
5
5
|
private readonly db;
|
|
6
6
|
private readonly auth;
|
|
7
|
-
|
|
7
|
+
private readonly shareSessions;
|
|
8
|
+
constructor(db: Database, auth: SqliteAuthStorage, shareSessions: Pick<ShareSessionStorage, "getById">);
|
|
8
9
|
create(input: CreateExecutionInput): Promise<ExecutionRecord>;
|
|
9
10
|
getById(params: {
|
|
10
11
|
readonly projectId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-storage.d.ts","sourceRoot":"","sources":["../src/execution-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAQ1C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"execution-storage.d.ts","sourceRoot":"","sources":["../src/execution-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAQ1C,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,sBAAuB,YAAW,gBAAgB;IAE3D,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,iBAAiB,EACvB,aAAa,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAGhE,MAAM,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IA6E7D,OAAO,CAAC,MAAM,EAAE;QACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;QAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KACpB,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;CAapC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MigrationCapableStorage, Storage, StorageMigrator, StorageTransactionOptions } from "@sixb/core";
|
|
2
|
-
import { type AiCostStorage, type AiLimitStorage, type AiUsageStorage } from "@sixb/core/storage";
|
|
2
|
+
import { type AiCostStorage, type AiLimitStorage, type AiUsageStorage, type ShareGrantStorage, type ShareSessionStorage } from "@sixb/core/storage";
|
|
3
3
|
import { SqliteActionRunStorage } from "./action-run-storage";
|
|
4
4
|
import { SqliteAgentStorage } from "./agents";
|
|
5
5
|
import { SqliteAuthStorage } from "./auth-storage";
|
|
@@ -51,6 +51,8 @@ export declare class SqliteStorage implements MigrationCapableStorage {
|
|
|
51
51
|
readonly timeseries: Storage["timeseries"];
|
|
52
52
|
readonly webhookRuns: SqliteWebhookRunStorage;
|
|
53
53
|
readonly rules: SqliteRulesStorage;
|
|
54
|
+
readonly shareGrants: ShareGrantStorage;
|
|
55
|
+
readonly shareSessions: ShareSessionStorage;
|
|
54
56
|
readonly connectorConnections: SqliteConnectorConnectionStorage;
|
|
55
57
|
readonly migrators: readonly StorageMigrator[];
|
|
56
58
|
private readonly connection;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,OAAO,EACP,eAAe,EACf,yBAAyB,EAC1B,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,OAAO,EACP,eAAe,EACf,yBAAyB,EAC1B,MAAM,YAAY,CAAA;AAWnB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGzB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAI7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAO5D,OAAO,EAAE,qBAAqB,EAAyC,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AASzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAEjE,MAAM,WAAW,oBAAoB;IACnC,sDAAsD;IACtD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