@nanobpm/urban 0.61.0 → 0.63.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/dist/runtime/core/host.d.ts +15 -0
- package/dist/runtime/core/host.js +28 -0
- package/dist/runtime/core/modules/runtime.gen.js +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +4 -0
- package/package.json +1 -1
- package/src/runtime/browser/runtime.browser.js +113 -49
- package/src/runtime/browser/runtime.detailform.test.ts +268 -0
- package/src/runtime/core/host.ts +36 -0
- package/src/runtime/core/modules/pages.test.ts +43 -16
- package/src/runtime/core/modules/runtime.gen.ts +1 -1
- package/src/runtime/index.ts +4 -0
|
@@ -336,3 +336,18 @@ export interface EngineClient {
|
|
|
336
336
|
/** Tear down all connections. */
|
|
337
337
|
close(): Promise<void>;
|
|
338
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* The names of every method on {@link EngineClient} — the single *runtime* source of
|
|
341
|
+
* truth for the interface's surface. It is compile-time-pinned to `keyof EngineClient`
|
|
342
|
+
* in both directions (see the two assertions below): the `satisfies` rejects a stray or
|
|
343
|
+
* misspelled name, and the exhaustiveness assertion rejects an *omitted* one, so adding,
|
|
344
|
+
* renaming, or removing an `EngineClient` method that this list does not mirror fails
|
|
345
|
+
* `npm run typecheck`.
|
|
346
|
+
*
|
|
347
|
+
* A fake/adapter (e.g. `@nanobpm/urban-testkit`'s `WasmEngineClient`) can iterate this
|
|
348
|
+
* list to assert at *runtime* that it implements the full surface — catching the
|
|
349
|
+
* "the SDK grew a method the test double lags" seam-lag class (issue #341: `openUserTasks`,
|
|
350
|
+
* and `getForm` before it) that a purely structural `implements EngineClient` check no
|
|
351
|
+
* longer catches once the fake is published/compiled against an older `@nanobpm/urban`.
|
|
352
|
+
*/
|
|
353
|
+
export declare const ENGINE_CLIENT_METHODS: readonly ["deployResources", "createInstance", "cancelInstance", "publishMessage", "searchUserTasks", "openUserTasks", "getForm", "completeUserTask", "searchProcessInstances", "registerWorker", "close"];
|
|
@@ -42,3 +42,31 @@ export function presentFormIdentifier(value) {
|
|
|
42
42
|
const trimmed = value?.trim();
|
|
43
43
|
return trimmed ? trimmed : undefined;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* The names of every method on {@link EngineClient} — the single *runtime* source of
|
|
47
|
+
* truth for the interface's surface. It is compile-time-pinned to `keyof EngineClient`
|
|
48
|
+
* in both directions (see the two assertions below): the `satisfies` rejects a stray or
|
|
49
|
+
* misspelled name, and the exhaustiveness assertion rejects an *omitted* one, so adding,
|
|
50
|
+
* renaming, or removing an `EngineClient` method that this list does not mirror fails
|
|
51
|
+
* `npm run typecheck`.
|
|
52
|
+
*
|
|
53
|
+
* A fake/adapter (e.g. `@nanobpm/urban-testkit`'s `WasmEngineClient`) can iterate this
|
|
54
|
+
* list to assert at *runtime* that it implements the full surface — catching the
|
|
55
|
+
* "the SDK grew a method the test double lags" seam-lag class (issue #341: `openUserTasks`,
|
|
56
|
+
* and `getForm` before it) that a purely structural `implements EngineClient` check no
|
|
57
|
+
* longer catches once the fake is published/compiled against an older `@nanobpm/urban`.
|
|
58
|
+
*/
|
|
59
|
+
export const ENGINE_CLIENT_METHODS = [
|
|
60
|
+
"deployResources",
|
|
61
|
+
"createInstance",
|
|
62
|
+
"cancelInstance",
|
|
63
|
+
"publishMessage",
|
|
64
|
+
"searchUserTasks",
|
|
65
|
+
"openUserTasks",
|
|
66
|
+
"getForm",
|
|
67
|
+
"completeUserTask",
|
|
68
|
+
"searchProcessInstances",
|
|
69
|
+
"registerWorker",
|
|
70
|
+
"close",
|
|
71
|
+
];
|
|
72
|
+
const _engineClientMethodsAreExhaustive = true;
|