@atscript/moost-wf 0.1.163 → 0.1.164
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/store.d.mts +2 -26
- package/dist/store.mjs +3 -3
- package/package.json +21 -15
package/dist/store.d.mts
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
import { TAtscriptAnnotatedType, TAtscriptTypeComplex, TAtscriptTypeObject, TMetadataMap, TValidatorOptions, Validator } from "@atscript/typescript/utils";
|
|
2
|
+
import { WfState, WfStateStore } from "@moostjs/event-wf";
|
|
2
3
|
import { AtscriptDbTable } from "@atscript/db";
|
|
3
4
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@prostojs+wf@0.3.0/node_modules/@prostojs/wf/dist/types-DQ7U9zZ5.d.mts
|
|
5
|
-
interface TFlowState<T> {
|
|
6
|
-
schemaId: string;
|
|
7
|
-
context: T;
|
|
8
|
-
indexes: number[];
|
|
9
|
-
meta?: Record<string, unknown>;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region ../../node_modules/.pnpm/@prostojs+wf@0.3.0/node_modules/@prostojs/wf/dist/store-B_dDk2EG.d.mts
|
|
13
|
-
//#region src/outlets/types.d.ts
|
|
14
|
-
type WfState = TFlowState<unknown>;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/outlets/state/store.d.ts
|
|
17
|
-
interface WfStateStoreEntry {
|
|
18
|
-
state: WfState;
|
|
19
|
-
expiresAt?: number;
|
|
20
|
-
}
|
|
21
|
-
interface WfStateStore {
|
|
22
|
-
set(handle: string, state: WfState, expiresAt?: number): Promise<void>;
|
|
23
|
-
get(handle: string): Promise<WfStateStoreEntry | null>;
|
|
24
|
-
delete(handle: string): Promise<void>;
|
|
25
|
-
getAndDelete(handle: string): Promise<WfStateStoreEntry | null>;
|
|
26
|
-
cleanup?(): Promise<number>;
|
|
27
|
-
} //#endregion
|
|
28
|
-
//#endregion
|
|
29
5
|
//#region src/store/wf-store.d.ts
|
|
30
6
|
/** Internal row shape — only the columns the store reads back from the table. */
|
|
31
7
|
type StoredRow = {
|
|
@@ -49,7 +25,7 @@ interface ShadowFieldSpec {
|
|
|
49
25
|
/**
|
|
50
26
|
* Options for {@link AsWfStore}.
|
|
51
27
|
*
|
|
52
|
-
* The store implements `WfStateStore`
|
|
28
|
+
* The store implements the engine's `WfStateStore` (via `@moostjs/event-wf`) against a
|
|
53
29
|
* consumer-provided `AtscriptDbTable` whose row shape extends
|
|
54
30
|
* `AsWfStateRecord` with their own `@meta.id`-bearing primary key column.
|
|
55
31
|
*/
|
package/dist/store.mjs
CHANGED
|
@@ -280,9 +280,9 @@ var AsWfStateRecord = class {
|
|
|
280
280
|
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
|
-
$ak("db.index.fulltext", "db.index.plain", "db.index.unique", "db.view.joins", "expect.pattern", "ui.dict.attr", "ui.form.classes", "ui.form.styles", "ui.literalLabel", "ui.table.classes", "ui.table.selectWith", "ui.table.styles", "wf.context.pass");
|
|
284
|
-
$nr("db.agg.avg", "db.agg.count", "db.agg.countDistinct", "db.agg.max", "db.agg.min", "db.agg.sum", "db.alias", "db.amount.currency.ref", "db.column", "db.column.collate", "db.column.derived", "db.column.dimension", "db.column.filterable", "db.column.measure", "db.column.precision", "db.column.renamed", "db.column.searchable", "db.column.sortable", "db.column.version", "db.column.version.exempt", "db.compute", "db.default", "db.default.increment", "db.default.now", "db.default.uuid", "db.depth.limit", "db.encrypted", "db.http.path", "db.ignore", "db.index.fulltext", "db.index.geo", "db.index.plain", "db.index.unique", "db.json", "db.onUpdate.inc", "db.onUpdate.now", "db.patch.strategy", "db.rel.FK", "db.rel.filter", "db.rel.filterable", "db.rel.from", "db.rel.onDelete", "db.rel.onUpdate", "db.rel.to", "db.rel.via", "db.schema", "db.search.filter", "db.search.vector", "db.search.vector.threshold", "db.sort.nulls", "db.space", "db.sync.method", "db.table", "db.table.filterable", "db.table.preferredId.uniqueIndex", "db.table.renamed", "db.table.sortable", "db.unit.ref", "db.view", "db.view.filter", "db.view.for", "db.view.having", "db.view.joins", "db.view.materialized", "db.view.renamed", "db.writeOnly", "meta.default", "meta.id", "meta.readonly", "meta.required", "ui.dict.attr", "ui.dict.descr", "ui.dict.filterable", "ui.dict.label", "ui.dict.searchable", "ui.dict.sortable", "ui.form.disabled", "ui.form.hidden", "ui.form.order", "ui.form.prefix.ref", "ui.form.suffix.ref", "ui.nav.group", "ui.nav.hidden", "ui.nav.order", "ui.table.exclude", "ui.table.order", "ui.table.selectWith", "wf.store.fromContext");
|
|
283
|
+
$ak("db.index.fulltext", "db.index.fulltext.language", "db.index.fulltext.match", "db.index.plain", "db.index.unique", "db.view.joins", "expect.pattern", "ui.dict.attr", "ui.form.classes", "ui.form.styles", "ui.literalLabel", "ui.table.classes", "ui.table.selectWith", "ui.table.styles", "wf.context.pass");
|
|
284
|
+
$nr("db.agg.avg", "db.agg.count", "db.agg.countDistinct", "db.agg.max", "db.agg.min", "db.agg.sum", "db.alias", "db.amount.currency.ref", "db.column", "db.column.collate", "db.column.derived", "db.column.dimension", "db.column.filterable", "db.column.measure", "db.column.precision", "db.column.renamed", "db.column.searchable", "db.column.sortable", "db.column.version", "db.column.version.exempt", "db.compute", "db.default", "db.default.increment", "db.default.now", "db.default.uuid", "db.depth.limit", "db.encrypted", "db.http.path", "db.ignore", "db.index.fulltext", "db.index.fulltext.language", "db.index.fulltext.match", "db.index.geo", "db.index.plain", "db.index.unique", "db.json", "db.onUpdate.inc", "db.onUpdate.now", "db.patch.strategy", "db.rel.FK", "db.rel.filter", "db.rel.filterable", "db.rel.from", "db.rel.onDelete", "db.rel.onUpdate", "db.rel.to", "db.rel.via", "db.schema", "db.search.filter", "db.search.vector", "db.search.vector.threshold", "db.sort.nulls", "db.space", "db.sync.method", "db.table", "db.table.filterable", "db.table.preferredId.uniqueIndex", "db.table.renamed", "db.table.sortable", "db.unit.ref", "db.view", "db.view.filter", "db.view.for", "db.view.having", "db.view.joins", "db.view.materialized", "db.view.renamed", "db.writeOnly", "meta.default", "meta.id", "meta.readonly", "meta.required", "ui.dict.attr", "ui.dict.descr", "ui.dict.filterable", "ui.dict.label", "ui.dict.searchable", "ui.dict.sortable", "ui.form.disabled", "ui.form.hidden", "ui.form.order", "ui.form.prefix.ref", "ui.form.suffix.ref", "ui.nav.group", "ui.nav.hidden", "ui.nav.order", "ui.table.exclude", "ui.table.order", "ui.table.selectWith", "wf.store.fromContext");
|
|
285
285
|
defineAnnotatedType("union", JsonValue).item(defineAnnotatedType().designType("string").tags("string").$type).item(defineAnnotatedType().designType("number").tags("number").$type).item(defineAnnotatedType().designType("boolean").tags("boolean").$type).item(defineAnnotatedType().designType("null").tags("null").$type).item(defineAnnotatedType("array").of(defineAnnotatedType().ref(JsonValue).$type).$type).item(defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().ref(JsonValue).$type).$type);
|
|
286
|
-
defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.exclude", true).annotate("db.index.unique", "handle_idx", true).annotate("expect.maxLength", { length: 256 }).$type).prop("schemaId", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "schema_idx" }, true).annotate("expect.maxLength", { length: 256 }).$type).prop("state", defineAnnotatedType("object").prop("context", defineAnnotatedType().ref(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().ref(JsonValue).$type).optional().$type).annotate("ui.table.exclude", true).annotate("db.json", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.index.plain", { name: "expires_idx" }, true).annotate("expect.int",
|
|
286
|
+
defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.exclude", true).annotate("db.index.unique", "handle_idx", true).annotate("expect.maxLength", { length: 256 }).$type).prop("schemaId", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "schema_idx" }, true).annotate("expect.maxLength", { length: 256 }).$type).prop("state", defineAnnotatedType("object").prop("context", defineAnnotatedType().ref(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().ref(JsonValue).$type).optional().$type).annotate("ui.table.exclude", true).annotate("db.json", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.index.plain", { name: "expires_idx" }, true).annotate("expect.int", {}).optional().$type).prop("updatedAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.default.now", true).annotate("db.index.plain", { name: "updated_idx" }, true).annotate("expect.int", {}).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", {}).$type).prop("createdBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.exclude", true).annotate("expect.maxLength", { length: 128 }).optional().$type).prop("lastUpdatedBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.exclude", true).annotate("expect.maxLength", { length: 128 }).optional().$type);
|
|
287
287
|
//#endregion
|
|
288
288
|
export { AsWfStateRecord, AsWfStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-wf",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.164",
|
|
4
4
|
"description": "Workflow form integration for moost — decorators, interceptors, and serialization driven by atscript type metadata",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -56,30 +56,36 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@atscript/core": "^0.2.
|
|
60
|
-
"@atscript/db": "^0.1.
|
|
61
|
-
"@atscript/db-sql-tools": "^0.1.
|
|
62
|
-
"@atscript/db-sqlite": "^0.1.
|
|
63
|
-
"@atscript/typescript": "^0.2.
|
|
64
|
-
"@moostjs/event-wf": "^0.7.
|
|
59
|
+
"@atscript/core": "^0.2.4",
|
|
60
|
+
"@atscript/db": "^0.1.168",
|
|
61
|
+
"@atscript/db-sql-tools": "^0.1.168",
|
|
62
|
+
"@atscript/db-sqlite": "^0.1.168",
|
|
63
|
+
"@atscript/typescript": "^0.2.4",
|
|
64
|
+
"@moostjs/event-wf": "^0.7.2",
|
|
65
65
|
"@prostojs/wf": "^0.3.0",
|
|
66
|
-
"@uniqu/core": "^0.
|
|
66
|
+
"@uniqu/core": "^0.2.0",
|
|
67
67
|
"@wooksjs/event-core": "^0.8.0",
|
|
68
68
|
"@wooksjs/event-http": "^0.8.0",
|
|
69
69
|
"@wooksjs/event-wf": "^0.8.0",
|
|
70
70
|
"@wooksjs/http-body": "^0.8.0",
|
|
71
|
-
"moost": "^0.7.
|
|
72
|
-
"unplugin-atscript": "^0.2.
|
|
71
|
+
"moost": "^0.7.2",
|
|
72
|
+
"unplugin-atscript": "^0.2.4",
|
|
73
73
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
74
|
-
"@atscript/ui": "^0.1.
|
|
74
|
+
"@atscript/ui": "^0.1.164"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@atscript/core": "^0.2.
|
|
78
|
-
"@atscript/
|
|
79
|
-
"@
|
|
77
|
+
"@atscript/core": "^0.2.4",
|
|
78
|
+
"@atscript/db": "^0.1.168",
|
|
79
|
+
"@atscript/typescript": "^0.2.4",
|
|
80
|
+
"@moostjs/event-wf": "^0.7.2",
|
|
80
81
|
"@wooksjs/event-core": "^0.8.0",
|
|
81
82
|
"@wooksjs/event-wf": "^0.8.0",
|
|
82
|
-
"moost": "^0.7.
|
|
83
|
+
"moost": "^0.7.2"
|
|
84
|
+
},
|
|
85
|
+
"peerDependenciesMeta": {
|
|
86
|
+
"@atscript/db": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
83
89
|
},
|
|
84
90
|
"scripts": {
|
|
85
91
|
"build": "vp pack",
|