@mastra/cloudflare-d1 1.4.5-alpha.1 → 1.4.5-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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +38 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +9 -3
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClaimRunOwnershipInput, ClaimRunOwnershipResult, RenewRunOwnershipInput, RenewRunOwnershipResult, RunFence, RunOwnershipRecord, WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput, UpdateWorkflowStateOptions, PruneOptions, PruneResult, RetentionTablesDescriptor, TableRetentionPolicy } from '@mastra/core/storage';
|
|
2
2
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
3
|
-
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
3
|
+
import type { StepResult, WorkflowRunState, WorkflowRunStatus } from '@mastra/core/workflows';
|
|
4
4
|
import type { D1DomainConfig } from '../../db/index.js';
|
|
5
5
|
export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
6
6
|
#private;
|
|
@@ -11,6 +11,7 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
11
11
|
*/
|
|
12
12
|
static readonly retentionTables: RetentionTablesDescriptor;
|
|
13
13
|
constructor(config: D1DomainConfig);
|
|
14
|
+
supportsGuardedSnapshotWrites(): boolean;
|
|
14
15
|
supportsConcurrentUpdates(): boolean;
|
|
15
16
|
init(): Promise<void>;
|
|
16
17
|
prune(policies: Record<string, TableRetentionPolicy>, options?: PruneOptions): Promise<PruneResult[]>;
|
|
@@ -34,7 +35,7 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
34
35
|
runId: string;
|
|
35
36
|
opts: UpdateWorkflowStateOptions;
|
|
36
37
|
}): Promise<WorkflowRunState | undefined>;
|
|
37
|
-
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, fence, }: {
|
|
38
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, fence, expectedStatus, }: {
|
|
38
39
|
workflowName: string;
|
|
39
40
|
runId: string;
|
|
40
41
|
resourceId?: string;
|
|
@@ -42,7 +43,12 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
42
43
|
createdAt?: Date;
|
|
43
44
|
updatedAt?: Date;
|
|
44
45
|
fence?: RunFence;
|
|
45
|
-
|
|
46
|
+
expectedStatus?: WorkflowRunStatus | WorkflowRunStatus[];
|
|
47
|
+
}): Promise<boolean>;
|
|
48
|
+
loadWorkflowRunStatus({ workflowName, runId, }: {
|
|
49
|
+
workflowName: string;
|
|
50
|
+
runId: string;
|
|
51
|
+
}): Promise<WorkflowRunStatus | null>;
|
|
46
52
|
loadWorkflowSnapshot(params: {
|
|
47
53
|
workflowName: string;
|
|
48
54
|
runId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,4BAA4B,EAE5B,0BAA0B,EAC1B,YAAY,EACZ,WAAW,EACX,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EASL,gBAAgB,EAIjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sour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qBAAqB,CAAC,EAC1B,YAAY,EACZ,KAAK,GACN,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAoBpC;IAEK,oBAAoB,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CA2B5G;IAED,OAAO,CAAC,gBAAgB;IAqBlB,gBAAgB,CAAC,EACrB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,UAAU,EACV,MAAM,GACP,GAAE,4BAAiC,GAAG,OAAO,CAAC,YAAY,CAAC,CAoE3D;IAEK,kBAAkB,CAAC,EACvB,KAAK,EACL,YAAY,GACb,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA8B9B;IAEK,qBAAqB,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,QAAQ,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBhB;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare-d1",
|
|
3
|
-
"version": "1.4.5-alpha.
|
|
3
|
+
"version": "1.4.5-alpha.2",
|
|
4
4
|
"description": "D1 provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"tsx": "^4.23.15",
|
|
37
37
|
"typescript": "^7.0.2",
|
|
38
38
|
"vitest": "4.1.12",
|
|
39
|
-
"@internal/types-builder": "0.0.120",
|
|
40
|
-
"@internal/lint": "0.0.145",
|
|
41
39
|
"@internal/storage-test-utils": "0.0.141",
|
|
42
|
-
"@
|
|
40
|
+
"@internal/types-builder": "0.0.120",
|
|
41
|
+
"@mastra/core": "1.80.0-alpha.5",
|
|
42
|
+
"@internal/lint": "0.0.145"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@cloudflare/workers-types": "^4.20240919.0",
|