durable-actors 0.14.3 → 0.14.5
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/actor/actor.d.ts +1 -1
- package/dist/actor/actor.d.ts.map +1 -1
- package/dist/actor/actor.js +1 -1
- package/dist/actor/actor.js.map +1 -1
- package/dist/actor/database.d.ts +12 -6
- package/dist/actor/database.d.ts.map +1 -1
- package/dist/actor/database.js +3 -9
- package/dist/actor/database.js.map +1 -1
- package/dist/actor/decorators.d.ts +3 -5
- package/dist/actor/decorators.d.ts.map +1 -1
- package/dist/actor/decorators.js +3 -8
- package/dist/actor/decorators.js.map +1 -1
- package/dist/actor/schema.d.ts +0 -1
- package/dist/actor/schema.d.ts.map +1 -1
- package/dist/actor/schema.js.map +1 -1
- package/dist/compiler/actor-build.d.ts.map +1 -1
- package/dist/compiler/actor-build.js +16 -2
- package/dist/compiler/actor-build.js.map +1 -1
- package/dist/compiler/actor-compiler.d.ts +0 -2
- package/dist/compiler/actor-compiler.d.ts.map +1 -1
- package/dist/compiler/actor-compiler.js +0 -8
- package/dist/compiler/actor-compiler.js.map +1 -1
- package/dist/compiler/json-schema.d.ts.map +1 -1
- package/dist/compiler/json-schema.js +4 -3
- package/dist/compiler/json-schema.js.map +1 -1
- package/dist/compiler/types.d.ts +1 -3
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js +0 -1
- package/dist/compiler/types.js.map +1 -1
- package/dist/drizzle.d.ts +31 -0
- package/dist/drizzle.d.ts.map +1 -0
- package/dist/drizzle.js +74 -0
- package/dist/drizzle.js.map +1 -0
- package/dist/host/actor-runtime.d.ts +0 -2
- package/dist/host/actor-runtime.d.ts.map +1 -1
- package/dist/host/actor-runtime.js +8 -12
- package/dist/host/actor-runtime.js.map +1 -1
- package/dist/host/database.d.ts +15 -4
- package/dist/host/database.d.ts.map +1 -1
- package/dist/host/database.js +82 -21
- package/dist/host/database.js.map +1 -1
- package/dist/host/persisted-fields.d.ts.map +1 -1
- package/dist/host/persisted-fields.js +1 -0
- package/dist/host/persisted-fields.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/templates/actor/package.json +1 -1
- package/dist/templates/ai-chat/package.json +1 -1
- package/dist/templates/chat/package.json +1 -1
- package/dist/templates/documents/package.json +1 -1
- package/package.json +16 -2
- package/dist/compiler/features/atomicity.d.ts +0 -9
- package/dist/compiler/features/atomicity.d.ts.map +0 -1
- package/dist/compiler/features/atomicity.js +0 -44
- package/dist/compiler/features/atomicity.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "durable-actors",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.5",
|
|
4
4
|
"description": "Provider-neutral actors for sandbox compute",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
"import": "./dist/proxy.js",
|
|
50
50
|
"default": "./dist/proxy.js"
|
|
51
51
|
},
|
|
52
|
+
"./drizzle": {
|
|
53
|
+
"types": "./dist/drizzle.d.ts",
|
|
54
|
+
"import": "./dist/drizzle.js",
|
|
55
|
+
"default": "./dist/drizzle.js"
|
|
56
|
+
},
|
|
52
57
|
".": {
|
|
53
58
|
"types": "./dist/index.d.ts",
|
|
54
59
|
"import": "./dist/index.js",
|
|
@@ -99,7 +104,7 @@
|
|
|
99
104
|
"@types/json-schema": "^7.0.15",
|
|
100
105
|
"ajv": "^8.20.0",
|
|
101
106
|
"commander": "^14.0.3",
|
|
102
|
-
"durable-actors-observer": "0.14.
|
|
107
|
+
"durable-actors-observer": "0.14.5",
|
|
103
108
|
"esbuild": "^0.28.2",
|
|
104
109
|
"import-meta-resolve": "^4.2.0",
|
|
105
110
|
"open": "^10.2.0",
|
|
@@ -112,10 +117,19 @@
|
|
|
112
117
|
"ws": "^8.18.3",
|
|
113
118
|
"zod": "^4.3.6"
|
|
114
119
|
},
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"drizzle-orm": ">=0.40.0"
|
|
122
|
+
},
|
|
123
|
+
"peerDependenciesMeta": {
|
|
124
|
+
"drizzle-orm": {
|
|
125
|
+
"optional": true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
115
128
|
"devDependencies": {
|
|
116
129
|
"@types/node": "^22.0.0",
|
|
117
130
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
118
131
|
"@types/ws": "^8.18.1",
|
|
132
|
+
"drizzle-orm": "0.45.4",
|
|
119
133
|
"dts-bundle-generator": "9.5.1",
|
|
120
134
|
"typedoc": "^0.28.20",
|
|
121
135
|
"typedoc-plugin-missing-exports": "^4.1.4"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import type { DecoratorResult, DecoratorUse, ParsedActor } from "../types.js";
|
|
3
|
-
declare function readAtomicity(use: DecoratorUse): DecoratorResult;
|
|
4
|
-
declare function validateAtomicity(actor: ParsedActor): {
|
|
5
|
-
methods: string[];
|
|
6
|
-
diagnostics: ts.Diagnostic[];
|
|
7
|
-
};
|
|
8
|
-
export { readAtomicity, validateAtomicity };
|
|
9
|
-
//# sourceMappingURL=atomicity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atomicity.d.ts","sourceRoot":"","sources":["../../../src/compiler/features/atomicity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAI3B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE7E,iBAAS,aAAa,CAAC,GAAG,EAAE,YAAY,GAAG,eAAe,CAWzD;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,WAAW;;;EAS5C;AAkBD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { definitionDiagnostic } from "../actor-compiler.js";
|
|
3
|
-
import { AnnotationKind } from "../types.js";
|
|
4
|
-
function readAtomicity(use) {
|
|
5
|
-
const node = use.target;
|
|
6
|
-
if (use.called)
|
|
7
|
-
return invalidAtomicity(use);
|
|
8
|
-
if (!ts.isMethodDeclaration(node) || !node.body)
|
|
9
|
-
return invalidAtomicity(use);
|
|
10
|
-
if (!hasModifier(node, ts.SyntaxKind.AsyncKeyword))
|
|
11
|
-
return invalidAtomicity(use);
|
|
12
|
-
if (hasModifier(node, ts.SyntaxKind.StaticKeyword))
|
|
13
|
-
return invalidAtomicity(use);
|
|
14
|
-
if (hasModifier(node, ts.SyntaxKind.PrivateKeyword) || hasModifier(node, ts.SyntaxKind.ProtectedKeyword))
|
|
15
|
-
return invalidAtomicity(use);
|
|
16
|
-
if (!ts.isIdentifier(node.name) && !ts.isStringLiteral(node.name))
|
|
17
|
-
return invalidAtomicity(use);
|
|
18
|
-
return { annotations: [{ kind: AnnotationKind.Atomicity, node: use.node }], diagnostics: [] };
|
|
19
|
-
}
|
|
20
|
-
function validateAtomicity(actor) {
|
|
21
|
-
const methods = [];
|
|
22
|
-
const diagnostics = [];
|
|
23
|
-
for (const member of actor.members) {
|
|
24
|
-
const annotations = member.annotations.filter(annotation => annotation.kind === AnnotationKind.Atomicity);
|
|
25
|
-
if (annotations.length > 1)
|
|
26
|
-
diagnostics.push(definitionDiagnostic(member.node, "@Atomic cannot be repeated"));
|
|
27
|
-
if (annotations.length === 1)
|
|
28
|
-
methods.push(member.node.name.text);
|
|
29
|
-
}
|
|
30
|
-
return { methods, diagnostics };
|
|
31
|
-
}
|
|
32
|
-
function hasModifier(node, kind) {
|
|
33
|
-
return ts.getModifiers(node)?.some(modifier => modifier.kind === kind) ?? false;
|
|
34
|
-
}
|
|
35
|
-
function invalidAtomicity(use) {
|
|
36
|
-
return {
|
|
37
|
-
annotations: [],
|
|
38
|
-
diagnostics: [
|
|
39
|
-
definitionDiagnostic(use.target, "@Atomic requires a public instance async method; use it without parentheses")
|
|
40
|
-
]
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export { readAtomicity, validateAtomicity };
|
|
44
|
-
//# sourceMappingURL=atomicity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atomicity.js","sourceRoot":"","sources":["../../../src/compiler/features/atomicity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAG5C,SAAS,aAAa,CAAC,GAAiB;IACpC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;IACvB,IAAI,GAAG,CAAC,MAAM;QAAE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC5C,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;QAAE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC7E,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAChF,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;QAAE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAChF,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACpG,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,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