@nanobpm/engine-wasm 0.5.0 → 0.6.0
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/lean/nanobpmn_engine.d.ts +30 -0
- package/lean/nanobpmn_engine.js +85 -0
- package/lean/nanobpmn_engine_bg.wasm +0 -0
- package/lean/nanobpmn_engine_bg.wasm.d.ts +2 -0
- package/package.json +1 -1
- package/readmodel/nanobpmn_engine.d.ts +30 -0
- package/readmodel/nanobpmn_engine.js +85 -0
- package/readmodel/nanobpmn_engine_bg.wasm +0 -0
- package/readmodel/nanobpmn_engine_bg.wasm.d.ts +2 -0
|
@@ -135,6 +135,34 @@ export class TestEngine {
|
|
|
135
135
|
* JS error carrying the parse/deploy failure message.
|
|
136
136
|
*/
|
|
137
137
|
deploy(xml: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* Deploy a single `form-js` `.form` resource (the verbatim form-js JSON
|
|
140
|
+
* document). Mirrors the native deploy decomposition, which registers a
|
|
141
|
+
* `.form` resource as a [`Command::DeployForms`] (stored, not executed) so
|
|
142
|
+
* `getFormByKey` can serve its schema. The form-js document's `id` is the
|
|
143
|
+
* form identifier used for versioning/lookup — a body without a non-empty
|
|
144
|
+
* string `id` is a client error (native parity). The deploy resource name is
|
|
145
|
+
* derived as `<id>.form`.
|
|
146
|
+
*
|
|
147
|
+
* Returns a JSON object
|
|
148
|
+
* `{ "formKey": "...", "formId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
149
|
+
* on success, or throws a JS error carrying the parse/deploy failure message.
|
|
150
|
+
*/
|
|
151
|
+
deployForm(schema: string): string;
|
|
152
|
+
/**
|
|
153
|
+
* Deploy a single generic resource (any deployed file that is not a
|
|
154
|
+
* BPMN/DMN/form — e.g. a Markdown agent prompt) under `resource_name` with
|
|
155
|
+
* the given verbatim `content`. Mirrors the native deploy decomposition,
|
|
156
|
+
* which registers such a file as a [`Command::DeployGenericResources`]
|
|
157
|
+
* (stored, not executed) so `getResourceByKey` can serve its content. The
|
|
158
|
+
* `resource_id` is the filename (`resource_name`), matching Zeebe's default
|
|
159
|
+
* resource transformer.
|
|
160
|
+
*
|
|
161
|
+
* Returns a JSON object
|
|
162
|
+
* `{ "resourceKey": "...", "resourceId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
163
|
+
* on success, or throws a JS error carrying the deploy failure message.
|
|
164
|
+
*/
|
|
165
|
+
deployResource(resource_name: string, content: string): string;
|
|
138
166
|
/**
|
|
139
167
|
* The full ordered event log emitted so far, as a JSON array of
|
|
140
168
|
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
@@ -260,6 +288,8 @@ export interface InitOutput {
|
|
|
260
288
|
readonly testengine_debugResume: (a: number, b: number) => void;
|
|
261
289
|
readonly testengine_debugStep: (a: number, b: number) => void;
|
|
262
290
|
readonly testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
291
|
+
readonly testengine_deployForm: (a: number, b: number, c: number, d: number) => void;
|
|
292
|
+
readonly testengine_deployResource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
263
293
|
readonly testengine_events: (a: number, b: number) => void;
|
|
264
294
|
readonly testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
265
295
|
readonly testengine_migrate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
package/lean/nanobpmn_engine.js
CHANGED
|
@@ -562,6 +562,91 @@ export class TestEngine {
|
|
|
562
562
|
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Deploy a single `form-js` `.form` resource (the verbatim form-js JSON
|
|
567
|
+
* document). Mirrors the native deploy decomposition, which registers a
|
|
568
|
+
* `.form` resource as a [`Command::DeployForms`] (stored, not executed) so
|
|
569
|
+
* `getFormByKey` can serve its schema. The form-js document's `id` is the
|
|
570
|
+
* form identifier used for versioning/lookup — a body without a non-empty
|
|
571
|
+
* string `id` is a client error (native parity). The deploy resource name is
|
|
572
|
+
* derived as `<id>.form`.
|
|
573
|
+
*
|
|
574
|
+
* Returns a JSON object
|
|
575
|
+
* `{ "formKey": "...", "formId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
576
|
+
* on success, or throws a JS error carrying the parse/deploy failure message.
|
|
577
|
+
* @param {string} schema
|
|
578
|
+
* @returns {string}
|
|
579
|
+
*/
|
|
580
|
+
deployForm(schema) {
|
|
581
|
+
let deferred3_0;
|
|
582
|
+
let deferred3_1;
|
|
583
|
+
try {
|
|
584
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
585
|
+
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
586
|
+
const len0 = WASM_VECTOR_LEN;
|
|
587
|
+
wasm.testengine_deployForm(retptr, this.__wbg_ptr, ptr0, len0);
|
|
588
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
589
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
590
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
591
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
592
|
+
var ptr2 = r0;
|
|
593
|
+
var len2 = r1;
|
|
594
|
+
if (r3) {
|
|
595
|
+
ptr2 = 0; len2 = 0;
|
|
596
|
+
throw takeObject(r2);
|
|
597
|
+
}
|
|
598
|
+
deferred3_0 = ptr2;
|
|
599
|
+
deferred3_1 = len2;
|
|
600
|
+
return getStringFromWasm0(ptr2, len2);
|
|
601
|
+
} finally {
|
|
602
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
603
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Deploy a single generic resource (any deployed file that is not a
|
|
608
|
+
* BPMN/DMN/form — e.g. a Markdown agent prompt) under `resource_name` with
|
|
609
|
+
* the given verbatim `content`. Mirrors the native deploy decomposition,
|
|
610
|
+
* which registers such a file as a [`Command::DeployGenericResources`]
|
|
611
|
+
* (stored, not executed) so `getResourceByKey` can serve its content. The
|
|
612
|
+
* `resource_id` is the filename (`resource_name`), matching Zeebe's default
|
|
613
|
+
* resource transformer.
|
|
614
|
+
*
|
|
615
|
+
* Returns a JSON object
|
|
616
|
+
* `{ "resourceKey": "...", "resourceId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
617
|
+
* on success, or throws a JS error carrying the deploy failure message.
|
|
618
|
+
* @param {string} resource_name
|
|
619
|
+
* @param {string} content
|
|
620
|
+
* @returns {string}
|
|
621
|
+
*/
|
|
622
|
+
deployResource(resource_name, content) {
|
|
623
|
+
let deferred4_0;
|
|
624
|
+
let deferred4_1;
|
|
625
|
+
try {
|
|
626
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
627
|
+
const ptr0 = passStringToWasm0(resource_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
628
|
+
const len0 = WASM_VECTOR_LEN;
|
|
629
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
630
|
+
const len1 = WASM_VECTOR_LEN;
|
|
631
|
+
wasm.testengine_deployResource(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
632
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
633
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
634
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
635
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
636
|
+
var ptr3 = r0;
|
|
637
|
+
var len3 = r1;
|
|
638
|
+
if (r3) {
|
|
639
|
+
ptr3 = 0; len3 = 0;
|
|
640
|
+
throw takeObject(r2);
|
|
641
|
+
}
|
|
642
|
+
deferred4_0 = ptr3;
|
|
643
|
+
deferred4_1 = len3;
|
|
644
|
+
return getStringFromWasm0(ptr3, len3);
|
|
645
|
+
} finally {
|
|
646
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
647
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
565
650
|
/**
|
|
566
651
|
* The full ordered event log emitted so far, as a JSON array of
|
|
567
652
|
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
Binary file
|
|
@@ -18,6 +18,8 @@ export const testengine_debugIsPaused: (a: number) => number;
|
|
|
18
18
|
export const testengine_debugResume: (a: number, b: number) => void;
|
|
19
19
|
export const testengine_debugStep: (a: number, b: number) => void;
|
|
20
20
|
export const testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
21
|
+
export const testengine_deployForm: (a: number, b: number, c: number, d: number) => void;
|
|
22
|
+
export const testengine_deployResource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
23
|
export const testengine_events: (a: number, b: number) => void;
|
|
22
24
|
export const testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
23
25
|
export const testengine_migrate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/engine-wasm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The nanobpmn engine (engine-core) compiled to WebAssembly for in-browser BPMN execution: deploy a diagram, start instances, activate/complete jobs, and read live snapshots/traces. Published as two subpath entrypoints — a lean baseline engine (default) and a read-model engine (the gateway's C8-style REST read surface). The substrate for the Bojtos demo framework (ADR 0043) and the console test-run panel.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -135,6 +135,34 @@ export class TestEngine {
|
|
|
135
135
|
* JS error carrying the parse/deploy failure message.
|
|
136
136
|
*/
|
|
137
137
|
deploy(xml: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* Deploy a single `form-js` `.form` resource (the verbatim form-js JSON
|
|
140
|
+
* document). Mirrors the native deploy decomposition, which registers a
|
|
141
|
+
* `.form` resource as a [`Command::DeployForms`] (stored, not executed) so
|
|
142
|
+
* `getFormByKey` can serve its schema. The form-js document's `id` is the
|
|
143
|
+
* form identifier used for versioning/lookup — a body without a non-empty
|
|
144
|
+
* string `id` is a client error (native parity). The deploy resource name is
|
|
145
|
+
* derived as `<id>.form`.
|
|
146
|
+
*
|
|
147
|
+
* Returns a JSON object
|
|
148
|
+
* `{ "formKey": "...", "formId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
149
|
+
* on success, or throws a JS error carrying the parse/deploy failure message.
|
|
150
|
+
*/
|
|
151
|
+
deployForm(schema: string): string;
|
|
152
|
+
/**
|
|
153
|
+
* Deploy a single generic resource (any deployed file that is not a
|
|
154
|
+
* BPMN/DMN/form — e.g. a Markdown agent prompt) under `resource_name` with
|
|
155
|
+
* the given verbatim `content`. Mirrors the native deploy decomposition,
|
|
156
|
+
* which registers such a file as a [`Command::DeployGenericResources`]
|
|
157
|
+
* (stored, not executed) so `getResourceByKey` can serve its content. The
|
|
158
|
+
* `resource_id` is the filename (`resource_name`), matching Zeebe's default
|
|
159
|
+
* resource transformer.
|
|
160
|
+
*
|
|
161
|
+
* Returns a JSON object
|
|
162
|
+
* `{ "resourceKey": "...", "resourceId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
163
|
+
* on success, or throws a JS error carrying the deploy failure message.
|
|
164
|
+
*/
|
|
165
|
+
deployResource(resource_name: string, content: string): string;
|
|
138
166
|
/**
|
|
139
167
|
* The full ordered event log emitted so far, as a JSON array of
|
|
140
168
|
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
@@ -296,6 +324,8 @@ export interface InitOutput {
|
|
|
296
324
|
readonly testengine_debugResume: (a: number, b: number) => void;
|
|
297
325
|
readonly testengine_debugStep: (a: number, b: number) => void;
|
|
298
326
|
readonly testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
327
|
+
readonly testengine_deployForm: (a: number, b: number, c: number, d: number) => void;
|
|
328
|
+
readonly testengine_deployResource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
299
329
|
readonly testengine_events: (a: number, b: number) => void;
|
|
300
330
|
readonly testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
301
331
|
readonly testengine_getFormByKey: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -562,6 +562,91 @@ export class TestEngine {
|
|
|
562
562
|
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Deploy a single `form-js` `.form` resource (the verbatim form-js JSON
|
|
567
|
+
* document). Mirrors the native deploy decomposition, which registers a
|
|
568
|
+
* `.form` resource as a [`Command::DeployForms`] (stored, not executed) so
|
|
569
|
+
* `getFormByKey` can serve its schema. The form-js document's `id` is the
|
|
570
|
+
* form identifier used for versioning/lookup — a body without a non-empty
|
|
571
|
+
* string `id` is a client error (native parity). The deploy resource name is
|
|
572
|
+
* derived as `<id>.form`.
|
|
573
|
+
*
|
|
574
|
+
* Returns a JSON object
|
|
575
|
+
* `{ "formKey": "...", "formId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
576
|
+
* on success, or throws a JS error carrying the parse/deploy failure message.
|
|
577
|
+
* @param {string} schema
|
|
578
|
+
* @returns {string}
|
|
579
|
+
*/
|
|
580
|
+
deployForm(schema) {
|
|
581
|
+
let deferred3_0;
|
|
582
|
+
let deferred3_1;
|
|
583
|
+
try {
|
|
584
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
585
|
+
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
586
|
+
const len0 = WASM_VECTOR_LEN;
|
|
587
|
+
wasm.testengine_deployForm(retptr, this.__wbg_ptr, ptr0, len0);
|
|
588
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
589
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
590
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
591
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
592
|
+
var ptr2 = r0;
|
|
593
|
+
var len2 = r1;
|
|
594
|
+
if (r3) {
|
|
595
|
+
ptr2 = 0; len2 = 0;
|
|
596
|
+
throw takeObject(r2);
|
|
597
|
+
}
|
|
598
|
+
deferred3_0 = ptr2;
|
|
599
|
+
deferred3_1 = len2;
|
|
600
|
+
return getStringFromWasm0(ptr2, len2);
|
|
601
|
+
} finally {
|
|
602
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
603
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Deploy a single generic resource (any deployed file that is not a
|
|
608
|
+
* BPMN/DMN/form — e.g. a Markdown agent prompt) under `resource_name` with
|
|
609
|
+
* the given verbatim `content`. Mirrors the native deploy decomposition,
|
|
610
|
+
* which registers such a file as a [`Command::DeployGenericResources`]
|
|
611
|
+
* (stored, not executed) so `getResourceByKey` can serve its content. The
|
|
612
|
+
* `resource_id` is the filename (`resource_name`), matching Zeebe's default
|
|
613
|
+
* resource transformer.
|
|
614
|
+
*
|
|
615
|
+
* Returns a JSON object
|
|
616
|
+
* `{ "resourceKey": "...", "resourceId": "...", "version": N, "resourceName": "...", "snapshot": {...} }`
|
|
617
|
+
* on success, or throws a JS error carrying the deploy failure message.
|
|
618
|
+
* @param {string} resource_name
|
|
619
|
+
* @param {string} content
|
|
620
|
+
* @returns {string}
|
|
621
|
+
*/
|
|
622
|
+
deployResource(resource_name, content) {
|
|
623
|
+
let deferred4_0;
|
|
624
|
+
let deferred4_1;
|
|
625
|
+
try {
|
|
626
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
627
|
+
const ptr0 = passStringToWasm0(resource_name, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
628
|
+
const len0 = WASM_VECTOR_LEN;
|
|
629
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
630
|
+
const len1 = WASM_VECTOR_LEN;
|
|
631
|
+
wasm.testengine_deployResource(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
632
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
633
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
634
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
635
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
636
|
+
var ptr3 = r0;
|
|
637
|
+
var len3 = r1;
|
|
638
|
+
if (r3) {
|
|
639
|
+
ptr3 = 0; len3 = 0;
|
|
640
|
+
throw takeObject(r2);
|
|
641
|
+
}
|
|
642
|
+
deferred4_0 = ptr3;
|
|
643
|
+
deferred4_1 = len3;
|
|
644
|
+
return getStringFromWasm0(ptr3, len3);
|
|
645
|
+
} finally {
|
|
646
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
647
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
565
650
|
/**
|
|
566
651
|
* The full ordered event log emitted so far, as a JSON array of
|
|
567
652
|
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
Binary file
|
|
@@ -18,6 +18,8 @@ export const testengine_debugIsPaused: (a: number) => number;
|
|
|
18
18
|
export const testengine_debugResume: (a: number, b: number) => void;
|
|
19
19
|
export const testengine_debugStep: (a: number, b: number) => void;
|
|
20
20
|
export const testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
21
|
+
export const testengine_deployForm: (a: number, b: number, c: number, d: number) => void;
|
|
22
|
+
export const testengine_deployResource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
23
|
export const testengine_events: (a: number, b: number) => void;
|
|
22
24
|
export const testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
23
25
|
export const testengine_getFormByKey: (a: number, b: number, c: number, d: number) => void;
|