@atscript/moost-wf 0.1.97 → 0.1.99
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 +52 -3
- package/dist/store.mjs +23 -1
- package/package.json +24 -19
- package/src/store/as-wf-state.as.d.ts +58 -0
- package/dist/as-wf-state-DD5Ot4HG.mjs +0 -24
package/dist/store.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
1
|
+
import { TAtscriptAnnotatedType, TAtscriptTypeComplex, TAtscriptTypeObject, TMetadataMap, TValidatorOptions, Validator } from "@atscript/typescript/utils";
|
|
3
2
|
import { AtscriptDbTable } from "@atscript/db";
|
|
4
3
|
|
|
5
4
|
//#region ../../node_modules/.pnpm/@prostojs+wf@0.1.1/node_modules/@prostojs/wf/dist/types-DQ7U9zZ5.d.mts
|
|
@@ -177,4 +176,54 @@ declare class AsWfStore implements WfStateStore {
|
|
|
177
176
|
protected resolveFieldPrimitive(fieldType: TAtscriptAnnotatedType): "string" | "number" | "boolean" | undefined;
|
|
178
177
|
}
|
|
179
178
|
//#endregion
|
|
180
|
-
|
|
179
|
+
//#region src/store/as-wf-state.as.d.ts
|
|
180
|
+
/**
|
|
181
|
+
* Atscript type **JsonValue**
|
|
182
|
+
* @see {@link ./as-wf-state.as:6:13}
|
|
183
|
+
*/
|
|
184
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
185
|
+
[key: string]: JsonValue;
|
|
186
|
+
};
|
|
187
|
+
declare namespace JsonValue {
|
|
188
|
+
const __is_atscript_annotated_type: true;
|
|
189
|
+
const type: TAtscriptTypeComplex<JsonValue>;
|
|
190
|
+
const metadata: TMetadataMap<AtscriptMetadata>;
|
|
191
|
+
const validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof JsonValue>;
|
|
192
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
193
|
+
const toJsonSchema: () => any;
|
|
194
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
195
|
+
const toExampleData: (() => any) | undefined;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Atscript interface **AsWfStateRecord**
|
|
199
|
+
* @see {@link ./as-wf-state.as:8:18}
|
|
200
|
+
*/
|
|
201
|
+
declare class AsWfStateRecord {
|
|
202
|
+
handle: string;
|
|
203
|
+
schemaId: string;
|
|
204
|
+
state: {
|
|
205
|
+
context: JsonValue;
|
|
206
|
+
indexes: number[];
|
|
207
|
+
meta?: {
|
|
208
|
+
[key: string]: JsonValue;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
expiresAt?: number;
|
|
212
|
+
/* timestamp */
|
|
213
|
+
updatedAt: number;
|
|
214
|
+
/* timestamp */
|
|
215
|
+
createdAt: number;
|
|
216
|
+
/* timestamp */
|
|
217
|
+
createdBy?: string;
|
|
218
|
+
lastUpdatedBy?: string;
|
|
219
|
+
static __is_atscript_annotated_type: true;
|
|
220
|
+
static type: TAtscriptTypeObject<keyof AsWfStateRecord, AsWfStateRecord>;
|
|
221
|
+
static metadata: TMetadataMap<AtscriptMetadata>;
|
|
222
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsWfStateRecord>;
|
|
223
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
224
|
+
static toJsonSchema: () => any;
|
|
225
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
226
|
+
static toExampleData?: () => any;
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
export { AsWfStateRecord, AsWfStore, type AsWfStoreOptions };
|
package/dist/store.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
2
2
|
//#region src/store/wf-store.ts
|
|
3
3
|
const defaultClock = { now: () => Date.now() };
|
|
4
4
|
/**
|
|
@@ -236,4 +236,26 @@ var AsWfStore = class {
|
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
//#endregion
|
|
239
|
+
//#region src/store/as-wf-state.as
|
|
240
|
+
var JsonValue = class {
|
|
241
|
+
static __is_atscript_annotated_type = true;
|
|
242
|
+
static type = {};
|
|
243
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
244
|
+
static id = "JsonValue";
|
|
245
|
+
static toJsonSchema() {
|
|
246
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var AsWfStateRecord = class {
|
|
250
|
+
static __is_atscript_annotated_type = true;
|
|
251
|
+
static type = {};
|
|
252
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
253
|
+
static id = "AsWfStateRecord";
|
|
254
|
+
static toJsonSchema() {
|
|
255
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
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().refTo(JsonValue).$type).$type).item(defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).$type);
|
|
259
|
+
defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", 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().refTo(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).optional().$type).annotate("ui.table.hidden", 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", true).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", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("createdBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type).prop("lastUpdatedBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type);
|
|
260
|
+
//#endregion
|
|
239
261
|
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.99",
|
|
4
4
|
"description": "Workflow form integration for moost — decorators, interceptors, and serialization driven by atscript type metadata",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -26,9 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
29
|
-
"src/store/as-wf-state.as"
|
|
29
|
+
"src/store/as-wf-state.as",
|
|
30
|
+
"src/store/as-wf-state.as.d.ts"
|
|
30
31
|
],
|
|
31
32
|
"type": "module",
|
|
33
|
+
"sideEffects": false,
|
|
32
34
|
"main": "dist/index.mjs",
|
|
33
35
|
"types": "dist/index.d.mts",
|
|
34
36
|
"exports": {
|
|
@@ -44,33 +46,36 @@
|
|
|
44
46
|
"types": "./dist/store.d.mts",
|
|
45
47
|
"import": "./dist/store.mjs"
|
|
46
48
|
},
|
|
47
|
-
"./store.as":
|
|
49
|
+
"./store.as": {
|
|
50
|
+
"types": "./src/store/as-wf-state.as.d.ts",
|
|
51
|
+
"default": "./src/store/as-wf-state.as"
|
|
52
|
+
},
|
|
48
53
|
"./package.json": "./package.json"
|
|
49
54
|
},
|
|
50
55
|
"publishConfig": {
|
|
51
56
|
"access": "public"
|
|
52
57
|
},
|
|
53
58
|
"devDependencies": {
|
|
54
|
-
"@atscript/core": "^0.1.
|
|
55
|
-
"@atscript/db": "^0.1.
|
|
56
|
-
"@atscript/db-sqlite": "^0.1.
|
|
57
|
-
"@atscript/typescript": "^0.1.
|
|
58
|
-
"@moostjs/event-wf": "^0.6.
|
|
59
|
+
"@atscript/core": "^0.1.76",
|
|
60
|
+
"@atscript/db": "^0.1.105",
|
|
61
|
+
"@atscript/db-sqlite": "^0.1.105",
|
|
62
|
+
"@atscript/typescript": "^0.1.76",
|
|
63
|
+
"@moostjs/event-wf": "^0.6.27",
|
|
59
64
|
"@prostojs/wf": "^0.1.1",
|
|
60
|
-
"@wooksjs/event-core": "^0.7.
|
|
61
|
-
"@wooksjs/event-wf": "^0.7.
|
|
62
|
-
"moost": "^0.6.
|
|
63
|
-
"unplugin-atscript": "^0.1.
|
|
65
|
+
"@wooksjs/event-core": "^0.7.19",
|
|
66
|
+
"@wooksjs/event-wf": "^0.7.19",
|
|
67
|
+
"moost": "^0.6.27",
|
|
68
|
+
"unplugin-atscript": "^0.1.76",
|
|
64
69
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
65
|
-
"@atscript/ui": "^0.1.
|
|
70
|
+
"@atscript/ui": "^0.1.99"
|
|
66
71
|
},
|
|
67
72
|
"peerDependencies": {
|
|
68
|
-
"@atscript/core": "^0.1.
|
|
69
|
-
"@atscript/typescript": "^0.1.
|
|
70
|
-
"@moostjs/event-wf": "^0.6.
|
|
71
|
-
"@wooksjs/event-core": "^0.7.
|
|
72
|
-
"@wooksjs/event-wf": "^0.7.
|
|
73
|
-
"moost": "^0.6.
|
|
73
|
+
"@atscript/core": "^0.1.76",
|
|
74
|
+
"@atscript/typescript": "^0.1.76",
|
|
75
|
+
"@moostjs/event-wf": "^0.6.27",
|
|
76
|
+
"@wooksjs/event-core": "^0.7.19",
|
|
77
|
+
"@wooksjs/event-wf": "^0.7.19",
|
|
78
|
+
"moost": "^0.6.27"
|
|
74
79
|
},
|
|
75
80
|
"scripts": {
|
|
76
81
|
"build": "vp pack",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// prettier-ignore-start
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/* oxlint-disable */
|
|
4
|
+
/// <reference path="./as-wf-state.as" />
|
|
5
|
+
/**
|
|
6
|
+
* 🪄 This file was generated by Atscript
|
|
7
|
+
* Do not edit this file!
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { TAtscriptTypeObject, TAtscriptTypeComplex, TAtscriptTypeFinal, TAtscriptTypeArray, TAtscriptAnnotatedType, TMetadataMap, Validator, TValidatorOptions } from "@atscript/typescript/utils"
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Atscript type **JsonValue**
|
|
14
|
+
* @see {@link ./as-wf-state.as:6:13}
|
|
15
|
+
*/
|
|
16
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
17
|
+
[key: string]: JsonValue
|
|
18
|
+
}
|
|
19
|
+
declare namespace JsonValue {
|
|
20
|
+
const __is_atscript_annotated_type: true
|
|
21
|
+
const type: TAtscriptTypeComplex<JsonValue>
|
|
22
|
+
const metadata: TMetadataMap<AtscriptMetadata>
|
|
23
|
+
const validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof JsonValue>
|
|
24
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
25
|
+
const toJsonSchema: () => any
|
|
26
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
27
|
+
const toExampleData: (() => any) | undefined
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Atscript interface **AsWfStateRecord**
|
|
32
|
+
* @see {@link ./as-wf-state.as:8:18}
|
|
33
|
+
*/
|
|
34
|
+
export declare class AsWfStateRecord {
|
|
35
|
+
handle: string
|
|
36
|
+
schemaId: string
|
|
37
|
+
state: {
|
|
38
|
+
context: JsonValue
|
|
39
|
+
indexes: number[]
|
|
40
|
+
meta?: {
|
|
41
|
+
[key: string]: JsonValue
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
expiresAt?: number /* timestamp */
|
|
45
|
+
updatedAt: number /* timestamp */
|
|
46
|
+
createdAt: number /* timestamp */
|
|
47
|
+
createdBy?: string
|
|
48
|
+
lastUpdatedBy?: string
|
|
49
|
+
static __is_atscript_annotated_type: true
|
|
50
|
+
static type: TAtscriptTypeObject<keyof AsWfStateRecord, AsWfStateRecord>
|
|
51
|
+
static metadata: TMetadataMap<AtscriptMetadata>
|
|
52
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsWfStateRecord>
|
|
53
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
54
|
+
static toJsonSchema: () => any
|
|
55
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
56
|
+
static toExampleData?: () => any
|
|
57
|
+
}
|
|
58
|
+
// prettier-ignore-end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
2
|
-
//#region src/store/as-wf-state.as
|
|
3
|
-
var JsonValue = class {
|
|
4
|
-
static __is_atscript_annotated_type = true;
|
|
5
|
-
static type = {};
|
|
6
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
7
|
-
static id = "JsonValue";
|
|
8
|
-
static toJsonSchema() {
|
|
9
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var AsWfStateRecord = class {
|
|
13
|
-
static __is_atscript_annotated_type = true;
|
|
14
|
-
static type = {};
|
|
15
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
16
|
-
static id = "AsWfStateRecord";
|
|
17
|
-
static toJsonSchema() {
|
|
18
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
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().refTo(JsonValue).$type).$type).item(defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).$type);
|
|
22
|
-
defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", 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().refTo(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).optional().$type).annotate("ui.table.hidden", 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", true).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", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("createdBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type).prop("lastUpdatedBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type);
|
|
23
|
-
//#endregion
|
|
24
|
-
export { AsWfStateRecord as t };
|