@nanobpm/engine-wasm 0.1.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/nanobpmn_engine.d.ts +133 -0
- package/nanobpmn_engine.js +615 -0
- package/nanobpmn_engine_bg.wasm +0 -0
- package/nanobpmn_engine_bg.wasm.d.ts +21 -0
- package/package.json +34 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A simulated engine instance bound to one modeler session.
|
|
6
|
+
*/
|
|
7
|
+
export class TestEngine {
|
|
8
|
+
free(): void;
|
|
9
|
+
[Symbol.dispose](): void;
|
|
10
|
+
/**
|
|
11
|
+
* Activate up to `max_jobs` `Created` jobs of `job_type`, locking them to
|
|
12
|
+
* `worker` until `now + timeout_ms`. Returns a JSON array of activated jobs
|
|
13
|
+
* (key, type, instance/element, retries, variables) for the dispatch loop to
|
|
14
|
+
* hand to worker handlers. The host owns the wall clock via `tickNow`.
|
|
15
|
+
*/
|
|
16
|
+
activateJobs(job_type: string, max_jobs: number, timeout_ms: number, worker: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Advance the virtual clock by `by_ms` milliseconds, firing any timers that
|
|
19
|
+
* become due and expiring any lapsed job locks.
|
|
20
|
+
*/
|
|
21
|
+
advanceTime(by_ms: number): string;
|
|
22
|
+
/**
|
|
23
|
+
* Complete a waiting job by key, merging `variables_json` (a JSON object
|
|
24
|
+
* string) into the instance. The job is activated first if it has not been
|
|
25
|
+
* already, so the UI can complete a freshly-created job directly.
|
|
26
|
+
*/
|
|
27
|
+
completeJob(job_key: string, variables_json: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Correlate a message to any instance waiting on it: publishes `message_name`
|
|
30
|
+
* with the given `correlation_key` (the value the waiting subscription's
|
|
31
|
+
* `correlationKey` expression resolved to) and merges `variables_json` (a
|
|
32
|
+
* JSON object string) into each correlated instance. This unblocks a message
|
|
33
|
+
* intermediate catch / receive task without an external broker — the
|
|
34
|
+
* in-browser equivalent of an app publishing a message. Returns the snapshot.
|
|
35
|
+
*/
|
|
36
|
+
correlateMessage(message_name: string, correlation_key: string, variables_json: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Start a new instance of `process_id`, seeding it with the given variables
|
|
39
|
+
* (a JSON object string; pass `"{}"` or `""` for none). Returns the
|
|
40
|
+
* post-run [`Snapshot`] with a top-level `created` field holding the new
|
|
41
|
+
* instance key.
|
|
42
|
+
*/
|
|
43
|
+
createInstance(process_id: string, variables_json: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Parse and deploy a BPMN resource. Returns a JSON object
|
|
46
|
+
* `{ "processIds": [...], "snapshot": {...} }` on success, or throws a
|
|
47
|
+
* JS error carrying the parse/deploy failure message.
|
|
48
|
+
*/
|
|
49
|
+
deploy(xml: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* The full ordered event log emitted so far, as a JSON array of
|
|
52
|
+
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
53
|
+
*/
|
|
54
|
+
events(): string;
|
|
55
|
+
/**
|
|
56
|
+
* Fail a waiting job by key with the given remaining `retries` and message.
|
|
57
|
+
* With no retries left this raises an incident (visible in the snapshot).
|
|
58
|
+
*/
|
|
59
|
+
failJob(job_key: string, retries: number, message: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Create a fresh, empty simulated engine. The virtual clock starts at 0.
|
|
62
|
+
*/
|
|
63
|
+
constructor();
|
|
64
|
+
/**
|
|
65
|
+
* Discard all engine state (deployed definitions, instances, jobs, timers,
|
|
66
|
+
* the event log and the virtual clock), returning the engine to the same
|
|
67
|
+
* pristine state as a freshly constructed one. Callers redeploy afterwards
|
|
68
|
+
* to start a clean run — this is what makes a re-run start from zero
|
|
69
|
+
* completed instances rather than accumulating across runs.
|
|
70
|
+
*/
|
|
71
|
+
reset(): void;
|
|
72
|
+
/**
|
|
73
|
+
* The current simulation state as a JSON [`Snapshot`].
|
|
74
|
+
*/
|
|
75
|
+
snapshot(): string;
|
|
76
|
+
/**
|
|
77
|
+
* Set the engine clock to a wall-clock instant (ms), then trigger due timers
|
|
78
|
+
* and expire lapsed job locks. The embedded host calls this with `Date.now()`
|
|
79
|
+
* so `engine-core` stays clock-free while running as a real runtime. The
|
|
80
|
+
* clock never moves backwards. Returns the snapshot.
|
|
81
|
+
*/
|
|
82
|
+
tickNow(now_ms: number): string;
|
|
83
|
+
/**
|
|
84
|
+
* The current virtual clock (milliseconds).
|
|
85
|
+
*/
|
|
86
|
+
readonly now: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
90
|
+
|
|
91
|
+
export interface InitOutput {
|
|
92
|
+
readonly memory: WebAssembly.Memory;
|
|
93
|
+
readonly __wbg_testengine_free: (a: number, b: number) => void;
|
|
94
|
+
readonly testengine_activateJobs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
95
|
+
readonly testengine_advanceTime: (a: number, b: number, c: number) => void;
|
|
96
|
+
readonly testengine_completeJob: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
97
|
+
readonly testengine_correlateMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
98
|
+
readonly testengine_createInstance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
99
|
+
readonly testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
100
|
+
readonly testengine_events: (a: number, b: number) => void;
|
|
101
|
+
readonly testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
102
|
+
readonly testengine_new: () => number;
|
|
103
|
+
readonly testengine_now: (a: number) => number;
|
|
104
|
+
readonly testengine_reset: (a: number) => void;
|
|
105
|
+
readonly testengine_snapshot: (a: number, b: number) => void;
|
|
106
|
+
readonly testengine_tickNow: (a: number, b: number, c: number) => void;
|
|
107
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
108
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
109
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
110
|
+
readonly __wbindgen_export3: (a: number, b: number, c: number) => void;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
117
|
+
* a precompiled `WebAssembly.Module`.
|
|
118
|
+
*
|
|
119
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
120
|
+
*
|
|
121
|
+
* @returns {InitOutput}
|
|
122
|
+
*/
|
|
123
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
127
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
128
|
+
*
|
|
129
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
130
|
+
*
|
|
131
|
+
* @returns {Promise<InitOutput>}
|
|
132
|
+
*/
|
|
133
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
/* @ts-self-types="./nanobpmn_engine.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A simulated engine instance bound to one modeler session.
|
|
5
|
+
*/
|
|
6
|
+
export class TestEngine {
|
|
7
|
+
__destroy_into_raw() {
|
|
8
|
+
const ptr = this.__wbg_ptr;
|
|
9
|
+
this.__wbg_ptr = 0;
|
|
10
|
+
TestEngineFinalization.unregister(this);
|
|
11
|
+
return ptr;
|
|
12
|
+
}
|
|
13
|
+
free() {
|
|
14
|
+
const ptr = this.__destroy_into_raw();
|
|
15
|
+
wasm.__wbg_testengine_free(ptr, 0);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Activate up to `max_jobs` `Created` jobs of `job_type`, locking them to
|
|
19
|
+
* `worker` until `now + timeout_ms`. Returns a JSON array of activated jobs
|
|
20
|
+
* (key, type, instance/element, retries, variables) for the dispatch loop to
|
|
21
|
+
* hand to worker handlers. The host owns the wall clock via `tickNow`.
|
|
22
|
+
* @param {string} job_type
|
|
23
|
+
* @param {number} max_jobs
|
|
24
|
+
* @param {number} timeout_ms
|
|
25
|
+
* @param {string} worker
|
|
26
|
+
* @returns {string}
|
|
27
|
+
*/
|
|
28
|
+
activateJobs(job_type, max_jobs, timeout_ms, worker) {
|
|
29
|
+
let deferred4_0;
|
|
30
|
+
let deferred4_1;
|
|
31
|
+
try {
|
|
32
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33
|
+
const ptr0 = passStringToWasm0(job_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
34
|
+
const len0 = WASM_VECTOR_LEN;
|
|
35
|
+
const ptr1 = passStringToWasm0(worker, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
36
|
+
const len1 = WASM_VECTOR_LEN;
|
|
37
|
+
wasm.testengine_activateJobs(retptr, this.__wbg_ptr, ptr0, len0, max_jobs, timeout_ms, ptr1, len1);
|
|
38
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
39
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
40
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
41
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
42
|
+
var ptr3 = r0;
|
|
43
|
+
var len3 = r1;
|
|
44
|
+
if (r3) {
|
|
45
|
+
ptr3 = 0; len3 = 0;
|
|
46
|
+
throw takeObject(r2);
|
|
47
|
+
}
|
|
48
|
+
deferred4_0 = ptr3;
|
|
49
|
+
deferred4_1 = len3;
|
|
50
|
+
return getStringFromWasm0(ptr3, len3);
|
|
51
|
+
} finally {
|
|
52
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
53
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Advance the virtual clock by `by_ms` milliseconds, firing any timers that
|
|
58
|
+
* become due and expiring any lapsed job locks.
|
|
59
|
+
* @param {number} by_ms
|
|
60
|
+
* @returns {string}
|
|
61
|
+
*/
|
|
62
|
+
advanceTime(by_ms) {
|
|
63
|
+
let deferred2_0;
|
|
64
|
+
let deferred2_1;
|
|
65
|
+
try {
|
|
66
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
67
|
+
wasm.testengine_advanceTime(retptr, this.__wbg_ptr, by_ms);
|
|
68
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
69
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
70
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
71
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
72
|
+
var ptr1 = r0;
|
|
73
|
+
var len1 = r1;
|
|
74
|
+
if (r3) {
|
|
75
|
+
ptr1 = 0; len1 = 0;
|
|
76
|
+
throw takeObject(r2);
|
|
77
|
+
}
|
|
78
|
+
deferred2_0 = ptr1;
|
|
79
|
+
deferred2_1 = len1;
|
|
80
|
+
return getStringFromWasm0(ptr1, len1);
|
|
81
|
+
} finally {
|
|
82
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
83
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Complete a waiting job by key, merging `variables_json` (a JSON object
|
|
88
|
+
* string) into the instance. The job is activated first if it has not been
|
|
89
|
+
* already, so the UI can complete a freshly-created job directly.
|
|
90
|
+
* @param {string} job_key
|
|
91
|
+
* @param {string} variables_json
|
|
92
|
+
* @returns {string}
|
|
93
|
+
*/
|
|
94
|
+
completeJob(job_key, variables_json) {
|
|
95
|
+
let deferred4_0;
|
|
96
|
+
let deferred4_1;
|
|
97
|
+
try {
|
|
98
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
99
|
+
const ptr0 = passStringToWasm0(job_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
100
|
+
const len0 = WASM_VECTOR_LEN;
|
|
101
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
102
|
+
const len1 = WASM_VECTOR_LEN;
|
|
103
|
+
wasm.testengine_completeJob(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
104
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
105
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
106
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
107
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
108
|
+
var ptr3 = r0;
|
|
109
|
+
var len3 = r1;
|
|
110
|
+
if (r3) {
|
|
111
|
+
ptr3 = 0; len3 = 0;
|
|
112
|
+
throw takeObject(r2);
|
|
113
|
+
}
|
|
114
|
+
deferred4_0 = ptr3;
|
|
115
|
+
deferred4_1 = len3;
|
|
116
|
+
return getStringFromWasm0(ptr3, len3);
|
|
117
|
+
} finally {
|
|
118
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
119
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Correlate a message to any instance waiting on it: publishes `message_name`
|
|
124
|
+
* with the given `correlation_key` (the value the waiting subscription's
|
|
125
|
+
* `correlationKey` expression resolved to) and merges `variables_json` (a
|
|
126
|
+
* JSON object string) into each correlated instance. This unblocks a message
|
|
127
|
+
* intermediate catch / receive task without an external broker — the
|
|
128
|
+
* in-browser equivalent of an app publishing a message. Returns the snapshot.
|
|
129
|
+
* @param {string} message_name
|
|
130
|
+
* @param {string} correlation_key
|
|
131
|
+
* @param {string} variables_json
|
|
132
|
+
* @returns {string}
|
|
133
|
+
*/
|
|
134
|
+
correlateMessage(message_name, correlation_key, variables_json) {
|
|
135
|
+
let deferred5_0;
|
|
136
|
+
let deferred5_1;
|
|
137
|
+
try {
|
|
138
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
139
|
+
const ptr0 = passStringToWasm0(message_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
140
|
+
const len0 = WASM_VECTOR_LEN;
|
|
141
|
+
const ptr1 = passStringToWasm0(correlation_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
142
|
+
const len1 = WASM_VECTOR_LEN;
|
|
143
|
+
const ptr2 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
144
|
+
const len2 = WASM_VECTOR_LEN;
|
|
145
|
+
wasm.testengine_correlateMessage(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
146
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
147
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
148
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
149
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
150
|
+
var ptr4 = r0;
|
|
151
|
+
var len4 = r1;
|
|
152
|
+
if (r3) {
|
|
153
|
+
ptr4 = 0; len4 = 0;
|
|
154
|
+
throw takeObject(r2);
|
|
155
|
+
}
|
|
156
|
+
deferred5_0 = ptr4;
|
|
157
|
+
deferred5_1 = len4;
|
|
158
|
+
return getStringFromWasm0(ptr4, len4);
|
|
159
|
+
} finally {
|
|
160
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
161
|
+
wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Start a new instance of `process_id`, seeding it with the given variables
|
|
166
|
+
* (a JSON object string; pass `"{}"` or `""` for none). Returns the
|
|
167
|
+
* post-run [`Snapshot`] with a top-level `created` field holding the new
|
|
168
|
+
* instance key.
|
|
169
|
+
* @param {string} process_id
|
|
170
|
+
* @param {string} variables_json
|
|
171
|
+
* @returns {string}
|
|
172
|
+
*/
|
|
173
|
+
createInstance(process_id, variables_json) {
|
|
174
|
+
let deferred4_0;
|
|
175
|
+
let deferred4_1;
|
|
176
|
+
try {
|
|
177
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
178
|
+
const ptr0 = passStringToWasm0(process_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
179
|
+
const len0 = WASM_VECTOR_LEN;
|
|
180
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
181
|
+
const len1 = WASM_VECTOR_LEN;
|
|
182
|
+
wasm.testengine_createInstance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
183
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
184
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
185
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
186
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
187
|
+
var ptr3 = r0;
|
|
188
|
+
var len3 = r1;
|
|
189
|
+
if (r3) {
|
|
190
|
+
ptr3 = 0; len3 = 0;
|
|
191
|
+
throw takeObject(r2);
|
|
192
|
+
}
|
|
193
|
+
deferred4_0 = ptr3;
|
|
194
|
+
deferred4_1 = len3;
|
|
195
|
+
return getStringFromWasm0(ptr3, len3);
|
|
196
|
+
} finally {
|
|
197
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
198
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Parse and deploy a BPMN resource. Returns a JSON object
|
|
203
|
+
* `{ "processIds": [...], "snapshot": {...} }` on success, or throws a
|
|
204
|
+
* JS error carrying the parse/deploy failure message.
|
|
205
|
+
* @param {string} xml
|
|
206
|
+
* @returns {string}
|
|
207
|
+
*/
|
|
208
|
+
deploy(xml) {
|
|
209
|
+
let deferred3_0;
|
|
210
|
+
let deferred3_1;
|
|
211
|
+
try {
|
|
212
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
213
|
+
const ptr0 = passStringToWasm0(xml, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
214
|
+
const len0 = WASM_VECTOR_LEN;
|
|
215
|
+
wasm.testengine_deploy(retptr, this.__wbg_ptr, ptr0, len0);
|
|
216
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
217
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
218
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
219
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
220
|
+
var ptr2 = r0;
|
|
221
|
+
var len2 = r1;
|
|
222
|
+
if (r3) {
|
|
223
|
+
ptr2 = 0; len2 = 0;
|
|
224
|
+
throw takeObject(r2);
|
|
225
|
+
}
|
|
226
|
+
deferred3_0 = ptr2;
|
|
227
|
+
deferred3_1 = len2;
|
|
228
|
+
return getStringFromWasm0(ptr2, len2);
|
|
229
|
+
} finally {
|
|
230
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
231
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The full ordered event log emitted so far, as a JSON array of
|
|
236
|
+
* `{ seq, now, type, ...payload }`. Useful for a step-through / trace view.
|
|
237
|
+
* @returns {string}
|
|
238
|
+
*/
|
|
239
|
+
events() {
|
|
240
|
+
let deferred2_0;
|
|
241
|
+
let deferred2_1;
|
|
242
|
+
try {
|
|
243
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
244
|
+
wasm.testengine_events(retptr, this.__wbg_ptr);
|
|
245
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
246
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
247
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
248
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
249
|
+
var ptr1 = r0;
|
|
250
|
+
var len1 = r1;
|
|
251
|
+
if (r3) {
|
|
252
|
+
ptr1 = 0; len1 = 0;
|
|
253
|
+
throw takeObject(r2);
|
|
254
|
+
}
|
|
255
|
+
deferred2_0 = ptr1;
|
|
256
|
+
deferred2_1 = len1;
|
|
257
|
+
return getStringFromWasm0(ptr1, len1);
|
|
258
|
+
} finally {
|
|
259
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Fail a waiting job by key with the given remaining `retries` and message.
|
|
265
|
+
* With no retries left this raises an incident (visible in the snapshot).
|
|
266
|
+
* @param {string} job_key
|
|
267
|
+
* @param {number} retries
|
|
268
|
+
* @param {string} message
|
|
269
|
+
* @returns {string}
|
|
270
|
+
*/
|
|
271
|
+
failJob(job_key, retries, message) {
|
|
272
|
+
let deferred4_0;
|
|
273
|
+
let deferred4_1;
|
|
274
|
+
try {
|
|
275
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
276
|
+
const ptr0 = passStringToWasm0(job_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
277
|
+
const len0 = WASM_VECTOR_LEN;
|
|
278
|
+
const ptr1 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
279
|
+
const len1 = WASM_VECTOR_LEN;
|
|
280
|
+
wasm.testengine_failJob(retptr, this.__wbg_ptr, ptr0, len0, retries, ptr1, len1);
|
|
281
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
282
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
283
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
284
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
285
|
+
var ptr3 = r0;
|
|
286
|
+
var len3 = r1;
|
|
287
|
+
if (r3) {
|
|
288
|
+
ptr3 = 0; len3 = 0;
|
|
289
|
+
throw takeObject(r2);
|
|
290
|
+
}
|
|
291
|
+
deferred4_0 = ptr3;
|
|
292
|
+
deferred4_1 = len3;
|
|
293
|
+
return getStringFromWasm0(ptr3, len3);
|
|
294
|
+
} finally {
|
|
295
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
296
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Create a fresh, empty simulated engine. The virtual clock starts at 0.
|
|
301
|
+
*/
|
|
302
|
+
constructor() {
|
|
303
|
+
const ret = wasm.testengine_new();
|
|
304
|
+
this.__wbg_ptr = ret;
|
|
305
|
+
TestEngineFinalization.register(this, this.__wbg_ptr, this);
|
|
306
|
+
return this;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* The current virtual clock (milliseconds).
|
|
310
|
+
* @returns {number}
|
|
311
|
+
*/
|
|
312
|
+
get now() {
|
|
313
|
+
const ret = wasm.testengine_now(this.__wbg_ptr);
|
|
314
|
+
return ret;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Discard all engine state (deployed definitions, instances, jobs, timers,
|
|
318
|
+
* the event log and the virtual clock), returning the engine to the same
|
|
319
|
+
* pristine state as a freshly constructed one. Callers redeploy afterwards
|
|
320
|
+
* to start a clean run — this is what makes a re-run start from zero
|
|
321
|
+
* completed instances rather than accumulating across runs.
|
|
322
|
+
*/
|
|
323
|
+
reset() {
|
|
324
|
+
wasm.testengine_reset(this.__wbg_ptr);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* The current simulation state as a JSON [`Snapshot`].
|
|
328
|
+
* @returns {string}
|
|
329
|
+
*/
|
|
330
|
+
snapshot() {
|
|
331
|
+
let deferred2_0;
|
|
332
|
+
let deferred2_1;
|
|
333
|
+
try {
|
|
334
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
335
|
+
wasm.testengine_snapshot(retptr, this.__wbg_ptr);
|
|
336
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
337
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
338
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
339
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
340
|
+
var ptr1 = r0;
|
|
341
|
+
var len1 = r1;
|
|
342
|
+
if (r3) {
|
|
343
|
+
ptr1 = 0; len1 = 0;
|
|
344
|
+
throw takeObject(r2);
|
|
345
|
+
}
|
|
346
|
+
deferred2_0 = ptr1;
|
|
347
|
+
deferred2_1 = len1;
|
|
348
|
+
return getStringFromWasm0(ptr1, len1);
|
|
349
|
+
} finally {
|
|
350
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
351
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Set the engine clock to a wall-clock instant (ms), then trigger due timers
|
|
356
|
+
* and expire lapsed job locks. The embedded host calls this with `Date.now()`
|
|
357
|
+
* so `engine-core` stays clock-free while running as a real runtime. The
|
|
358
|
+
* clock never moves backwards. Returns the snapshot.
|
|
359
|
+
* @param {number} now_ms
|
|
360
|
+
* @returns {string}
|
|
361
|
+
*/
|
|
362
|
+
tickNow(now_ms) {
|
|
363
|
+
let deferred2_0;
|
|
364
|
+
let deferred2_1;
|
|
365
|
+
try {
|
|
366
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
367
|
+
wasm.testengine_tickNow(retptr, this.__wbg_ptr, now_ms);
|
|
368
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
369
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
370
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
371
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
372
|
+
var ptr1 = r0;
|
|
373
|
+
var len1 = r1;
|
|
374
|
+
if (r3) {
|
|
375
|
+
ptr1 = 0; len1 = 0;
|
|
376
|
+
throw takeObject(r2);
|
|
377
|
+
}
|
|
378
|
+
deferred2_0 = ptr1;
|
|
379
|
+
deferred2_1 = len1;
|
|
380
|
+
return getStringFromWasm0(ptr1, len1);
|
|
381
|
+
} finally {
|
|
382
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
383
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (Symbol.dispose) TestEngine.prototype[Symbol.dispose] = TestEngine.prototype.free;
|
|
388
|
+
function __wbg_get_imports() {
|
|
389
|
+
const import0 = {
|
|
390
|
+
__proto__: null,
|
|
391
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
392
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
393
|
+
},
|
|
394
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
395
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
396
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
397
|
+
return addHeapObject(ret);
|
|
398
|
+
},
|
|
399
|
+
};
|
|
400
|
+
return {
|
|
401
|
+
__proto__: null,
|
|
402
|
+
"./nanobpmn_engine_bg.js": import0,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const TestEngineFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
407
|
+
? { register: () => {}, unregister: () => {} }
|
|
408
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_testengine_free(ptr, 1));
|
|
409
|
+
|
|
410
|
+
function addHeapObject(obj) {
|
|
411
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
412
|
+
const idx = heap_next;
|
|
413
|
+
heap_next = heap[idx];
|
|
414
|
+
|
|
415
|
+
heap[idx] = obj;
|
|
416
|
+
return idx;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
function dropObject(idx) {
|
|
420
|
+
if (idx < 1028) return;
|
|
421
|
+
heap[idx] = heap_next;
|
|
422
|
+
heap_next = idx;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
let cachedDataViewMemory0 = null;
|
|
426
|
+
function getDataViewMemory0() {
|
|
427
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
428
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
429
|
+
}
|
|
430
|
+
return cachedDataViewMemory0;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
function getStringFromWasm0(ptr, len) {
|
|
434
|
+
return decodeText(ptr >>> 0, len);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
let cachedUint8ArrayMemory0 = null;
|
|
438
|
+
function getUint8ArrayMemory0() {
|
|
439
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
440
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
441
|
+
}
|
|
442
|
+
return cachedUint8ArrayMemory0;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
function getObject(idx) { return heap[idx]; }
|
|
446
|
+
|
|
447
|
+
let heap = new Array(1024).fill(undefined);
|
|
448
|
+
heap.push(undefined, null, true, false);
|
|
449
|
+
|
|
450
|
+
let heap_next = heap.length;
|
|
451
|
+
|
|
452
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
453
|
+
if (realloc === undefined) {
|
|
454
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
455
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
456
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
457
|
+
WASM_VECTOR_LEN = buf.length;
|
|
458
|
+
return ptr;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
let len = arg.length;
|
|
462
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
463
|
+
|
|
464
|
+
const mem = getUint8ArrayMemory0();
|
|
465
|
+
|
|
466
|
+
let offset = 0;
|
|
467
|
+
|
|
468
|
+
for (; offset < len; offset++) {
|
|
469
|
+
const code = arg.charCodeAt(offset);
|
|
470
|
+
if (code > 0x7F) break;
|
|
471
|
+
mem[ptr + offset] = code;
|
|
472
|
+
}
|
|
473
|
+
if (offset !== len) {
|
|
474
|
+
if (offset !== 0) {
|
|
475
|
+
arg = arg.slice(offset);
|
|
476
|
+
}
|
|
477
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
478
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
479
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
480
|
+
|
|
481
|
+
offset += ret.written;
|
|
482
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
WASM_VECTOR_LEN = offset;
|
|
486
|
+
return ptr;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function takeObject(idx) {
|
|
490
|
+
const ret = getObject(idx);
|
|
491
|
+
dropObject(idx);
|
|
492
|
+
return ret;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
496
|
+
cachedTextDecoder.decode();
|
|
497
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
498
|
+
let numBytesDecoded = 0;
|
|
499
|
+
function decodeText(ptr, len) {
|
|
500
|
+
numBytesDecoded += len;
|
|
501
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
502
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
503
|
+
cachedTextDecoder.decode();
|
|
504
|
+
numBytesDecoded = len;
|
|
505
|
+
}
|
|
506
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
const cachedTextEncoder = new TextEncoder();
|
|
510
|
+
|
|
511
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
512
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
513
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
514
|
+
view.set(buf);
|
|
515
|
+
return {
|
|
516
|
+
read: arg.length,
|
|
517
|
+
written: buf.length
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
let WASM_VECTOR_LEN = 0;
|
|
523
|
+
|
|
524
|
+
let wasmModule, wasmInstance, wasm;
|
|
525
|
+
function __wbg_finalize_init(instance, module) {
|
|
526
|
+
wasmInstance = instance;
|
|
527
|
+
wasm = instance.exports;
|
|
528
|
+
wasmModule = module;
|
|
529
|
+
cachedDataViewMemory0 = null;
|
|
530
|
+
cachedUint8ArrayMemory0 = null;
|
|
531
|
+
return wasm;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
async function __wbg_load(module, imports) {
|
|
535
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
536
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
537
|
+
try {
|
|
538
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
539
|
+
} catch (e) {
|
|
540
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
541
|
+
|
|
542
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
543
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
544
|
+
|
|
545
|
+
} else { throw e; }
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
const bytes = await module.arrayBuffer();
|
|
550
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
551
|
+
} else {
|
|
552
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
553
|
+
|
|
554
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
555
|
+
return { instance, module };
|
|
556
|
+
} else {
|
|
557
|
+
return instance;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
function expectedResponseType(type) {
|
|
562
|
+
switch (type) {
|
|
563
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
564
|
+
}
|
|
565
|
+
return false;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function initSync(module) {
|
|
570
|
+
if (wasm !== undefined) return wasm;
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
if (module !== undefined) {
|
|
574
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
575
|
+
({module} = module)
|
|
576
|
+
} else {
|
|
577
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const imports = __wbg_get_imports();
|
|
582
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
583
|
+
module = new WebAssembly.Module(module);
|
|
584
|
+
}
|
|
585
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
586
|
+
return __wbg_finalize_init(instance, module);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
async function __wbg_init(module_or_path) {
|
|
590
|
+
if (wasm !== undefined) return wasm;
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
if (module_or_path !== undefined) {
|
|
594
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
595
|
+
({module_or_path} = module_or_path)
|
|
596
|
+
} else {
|
|
597
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (module_or_path === undefined) {
|
|
602
|
+
module_or_path = new URL('nanobpmn_engine_bg.wasm', import.meta.url);
|
|
603
|
+
}
|
|
604
|
+
const imports = __wbg_get_imports();
|
|
605
|
+
|
|
606
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
607
|
+
module_or_path = fetch(module_or_path);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
611
|
+
|
|
612
|
+
return __wbg_finalize_init(instance, module);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_testengine_free: (a: number, b: number) => void;
|
|
5
|
+
export const testengine_activateJobs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
6
|
+
export const testengine_advanceTime: (a: number, b: number, c: number) => void;
|
|
7
|
+
export const testengine_completeJob: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
|
+
export const testengine_correlateMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
9
|
+
export const testengine_createInstance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
11
|
+
export const testengine_events: (a: number, b: number) => void;
|
|
12
|
+
export const testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
13
|
+
export const testengine_new: () => number;
|
|
14
|
+
export const testengine_now: (a: number) => number;
|
|
15
|
+
export const testengine_reset: (a: number) => void;
|
|
16
|
+
export const testengine_snapshot: (a: number, b: number) => void;
|
|
17
|
+
export const testengine_tickNow: (a: number, b: number, c: number) => void;
|
|
18
|
+
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
19
|
+
export const __wbindgen_export: (a: number, b: number) => number;
|
|
20
|
+
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
21
|
+
export const __wbindgen_export3: (a: number, b: number, c: number) => void;
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nanobpm/engine-wasm",
|
|
3
|
+
"version": "0.1.0",
|
|
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. The substrate for the Bojtos demo framework (ADR 0043) and the console test-run panel.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Magikcraft/nano-bpm",
|
|
10
|
+
"directory": "engine-wasm/pkg"
|
|
11
|
+
},
|
|
12
|
+
"main": "./nanobpmn_engine.js",
|
|
13
|
+
"module": "./nanobpmn_engine.js",
|
|
14
|
+
"types": "./nanobpmn_engine.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./nanobpmn_engine.d.ts",
|
|
18
|
+
"default": "./nanobpmn_engine.js"
|
|
19
|
+
},
|
|
20
|
+
"./nanobpmn_engine_bg.wasm": "./nanobpmn_engine_bg.wasm"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"nanobpmn_engine.js",
|
|
24
|
+
"nanobpmn_engine.d.ts",
|
|
25
|
+
"nanobpmn_engine_bg.wasm",
|
|
26
|
+
"nanobpmn_engine_bg.wasm.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"./snippets/*"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
}
|
|
34
|
+
}
|