@tomflow/proflow-execution-runtime 0.1.3 → 0.1.4
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/CHANGELOG.md
CHANGED
|
@@ -19,7 +19,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
19
19
|
readonly ok: true;
|
|
20
20
|
readonly status: "SUCCEEDED";
|
|
21
21
|
readonly moduleRef: "execution-runtime";
|
|
22
|
-
readonly moduleVersion: "0.1.
|
|
22
|
+
readonly moduleVersion: "0.1.4";
|
|
23
23
|
};
|
|
24
24
|
observedEffects: never[];
|
|
25
25
|
};
|
|
@@ -29,7 +29,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
29
29
|
readonly ok: true;
|
|
30
30
|
readonly status: "SUCCEEDED";
|
|
31
31
|
readonly moduleRef: "execution-runtime";
|
|
32
|
-
readonly moduleVersion: "0.1.
|
|
32
|
+
readonly moduleVersion: "0.1.4";
|
|
33
33
|
};
|
|
34
34
|
observedEffects: never[];
|
|
35
35
|
};
|
|
@@ -37,7 +37,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
37
37
|
result: {
|
|
38
38
|
readonly contract: "deployment.result.v1";
|
|
39
39
|
readonly moduleRef: "execution-runtime";
|
|
40
|
-
readonly moduleVersion: "0.1.
|
|
40
|
+
readonly moduleVersion: "0.1.4";
|
|
41
41
|
readonly ok: false;
|
|
42
42
|
readonly status: "ACTION_REQUIRED";
|
|
43
43
|
readonly actionRequired: {
|
|
@@ -49,7 +49,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
49
49
|
ok: true;
|
|
50
50
|
status: "SUCCEEDED";
|
|
51
51
|
moduleRef: "execution-runtime";
|
|
52
|
-
moduleVersion: "0.1.
|
|
52
|
+
moduleVersion: "0.1.4";
|
|
53
53
|
data: {
|
|
54
54
|
readiness: "READY" | "NOT_READY";
|
|
55
55
|
} | undefined;
|
|
@@ -61,7 +61,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
61
61
|
} | {
|
|
62
62
|
contract: "deployment.result.v1";
|
|
63
63
|
moduleRef: "execution-runtime";
|
|
64
|
-
moduleVersion: "0.1.
|
|
64
|
+
moduleVersion: "0.1.4";
|
|
65
65
|
ok: false;
|
|
66
66
|
status: "ACTION_REQUIRED";
|
|
67
67
|
actionRequired: {
|
|
@@ -85,7 +85,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
85
85
|
ok: true;
|
|
86
86
|
status: "SUCCEEDED";
|
|
87
87
|
moduleRef: "execution-runtime";
|
|
88
|
-
moduleVersion: "0.1.
|
|
88
|
+
moduleVersion: "0.1.4";
|
|
89
89
|
checks: {
|
|
90
90
|
id: string;
|
|
91
91
|
status: "FAIL" | "PASS";
|
|
@@ -94,7 +94,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
94
94
|
} | {
|
|
95
95
|
contract: "deployment.result.v1";
|
|
96
96
|
moduleRef: "execution-runtime";
|
|
97
|
-
moduleVersion: "0.1.
|
|
97
|
+
moduleVersion: "0.1.4";
|
|
98
98
|
ok: false;
|
|
99
99
|
status: "ACTION_REQUIRED";
|
|
100
100
|
actionRequired: {
|
|
@@ -109,7 +109,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
109
109
|
} | {
|
|
110
110
|
contract: "deployment.result.v1";
|
|
111
111
|
moduleRef: "execution-runtime";
|
|
112
|
-
moduleVersion: "0.1.
|
|
112
|
+
moduleVersion: "0.1.4";
|
|
113
113
|
ok: false;
|
|
114
114
|
status: "ACTION_REQUIRED";
|
|
115
115
|
actionRequired: {
|
|
@@ -130,7 +130,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
130
130
|
readonly ok: true;
|
|
131
131
|
readonly status: "SUCCEEDED";
|
|
132
132
|
readonly moduleRef: "execution-runtime";
|
|
133
|
-
readonly moduleVersion: "0.1.
|
|
133
|
+
readonly moduleVersion: "0.1.4";
|
|
134
134
|
};
|
|
135
135
|
observedEffects: never[];
|
|
136
136
|
};
|
|
@@ -138,7 +138,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
138
138
|
result: {
|
|
139
139
|
readonly contract: "deployment.result.v1";
|
|
140
140
|
readonly moduleRef: "execution-runtime";
|
|
141
|
-
readonly moduleVersion: "0.1.
|
|
141
|
+
readonly moduleVersion: "0.1.4";
|
|
142
142
|
readonly ok: false;
|
|
143
143
|
readonly status: "ACTION_REQUIRED";
|
|
144
144
|
readonly actionRequired: {
|
|
@@ -150,7 +150,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
150
150
|
ok: true;
|
|
151
151
|
status: "SUCCEEDED";
|
|
152
152
|
moduleRef: "execution-runtime";
|
|
153
|
-
moduleVersion: "0.1.
|
|
153
|
+
moduleVersion: "0.1.4";
|
|
154
154
|
data: {
|
|
155
155
|
host: string;
|
|
156
156
|
port: number;
|
|
@@ -164,11 +164,11 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
164
164
|
readonly ok: true;
|
|
165
165
|
readonly status: "SUCCEEDED";
|
|
166
166
|
readonly moduleRef: "execution-runtime";
|
|
167
|
-
readonly moduleVersion: "0.1.
|
|
167
|
+
readonly moduleVersion: "0.1.4";
|
|
168
168
|
} | {
|
|
169
169
|
readonly contract: "deployment.result.v1";
|
|
170
170
|
readonly moduleRef: "execution-runtime";
|
|
171
|
-
readonly moduleVersion: "0.1.
|
|
171
|
+
readonly moduleVersion: "0.1.4";
|
|
172
172
|
readonly ok: false;
|
|
173
173
|
readonly status: "ACTION_REQUIRED";
|
|
174
174
|
readonly actionRequired: {
|
|
@@ -184,7 +184,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
184
184
|
readonly ok: true;
|
|
185
185
|
readonly status: "SUCCEEDED";
|
|
186
186
|
readonly moduleRef: "execution-runtime";
|
|
187
|
-
readonly moduleVersion: "0.1.
|
|
187
|
+
readonly moduleVersion: "0.1.4";
|
|
188
188
|
};
|
|
189
189
|
observedEffects: "Runs the single backend Execution Runtime service"[];
|
|
190
190
|
}>;
|
|
@@ -192,7 +192,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
192
192
|
result: {
|
|
193
193
|
readonly contract: "deployment.result.v1";
|
|
194
194
|
readonly moduleRef: "execution-runtime";
|
|
195
|
-
readonly moduleVersion: "0.1.
|
|
195
|
+
readonly moduleVersion: "0.1.4";
|
|
196
196
|
readonly ok: false;
|
|
197
197
|
readonly status: "ACTION_REQUIRED";
|
|
198
198
|
readonly actionRequired: {
|
|
@@ -204,7 +204,7 @@ export declare function createBehaviorAdapter(service?: ProcessService): {
|
|
|
204
204
|
ok: true;
|
|
205
205
|
status: "SUCCEEDED";
|
|
206
206
|
moduleRef: "execution-runtime";
|
|
207
|
-
moduleVersion: "0.1.
|
|
207
|
+
moduleVersion: "0.1.4";
|
|
208
208
|
data: {
|
|
209
209
|
host: string;
|
|
210
210
|
port: number;
|
|
@@ -220,7 +220,7 @@ export declare const behaviorAdapter: {
|
|
|
220
220
|
readonly ok: true;
|
|
221
221
|
readonly status: "SUCCEEDED";
|
|
222
222
|
readonly moduleRef: "execution-runtime";
|
|
223
|
-
readonly moduleVersion: "0.1.
|
|
223
|
+
readonly moduleVersion: "0.1.4";
|
|
224
224
|
};
|
|
225
225
|
observedEffects: never[];
|
|
226
226
|
};
|
|
@@ -230,7 +230,7 @@ export declare const behaviorAdapter: {
|
|
|
230
230
|
readonly ok: true;
|
|
231
231
|
readonly status: "SUCCEEDED";
|
|
232
232
|
readonly moduleRef: "execution-runtime";
|
|
233
|
-
readonly moduleVersion: "0.1.
|
|
233
|
+
readonly moduleVersion: "0.1.4";
|
|
234
234
|
};
|
|
235
235
|
observedEffects: never[];
|
|
236
236
|
};
|
|
@@ -238,7 +238,7 @@ export declare const behaviorAdapter: {
|
|
|
238
238
|
result: {
|
|
239
239
|
readonly contract: "deployment.result.v1";
|
|
240
240
|
readonly moduleRef: "execution-runtime";
|
|
241
|
-
readonly moduleVersion: "0.1.
|
|
241
|
+
readonly moduleVersion: "0.1.4";
|
|
242
242
|
readonly ok: false;
|
|
243
243
|
readonly status: "ACTION_REQUIRED";
|
|
244
244
|
readonly actionRequired: {
|
|
@@ -250,7 +250,7 @@ export declare const behaviorAdapter: {
|
|
|
250
250
|
ok: true;
|
|
251
251
|
status: "SUCCEEDED";
|
|
252
252
|
moduleRef: "execution-runtime";
|
|
253
|
-
moduleVersion: "0.1.
|
|
253
|
+
moduleVersion: "0.1.4";
|
|
254
254
|
data: {
|
|
255
255
|
readiness: "READY" | "NOT_READY";
|
|
256
256
|
} | undefined;
|
|
@@ -262,7 +262,7 @@ export declare const behaviorAdapter: {
|
|
|
262
262
|
} | {
|
|
263
263
|
contract: "deployment.result.v1";
|
|
264
264
|
moduleRef: "execution-runtime";
|
|
265
|
-
moduleVersion: "0.1.
|
|
265
|
+
moduleVersion: "0.1.4";
|
|
266
266
|
ok: false;
|
|
267
267
|
status: "ACTION_REQUIRED";
|
|
268
268
|
actionRequired: {
|
|
@@ -286,7 +286,7 @@ export declare const behaviorAdapter: {
|
|
|
286
286
|
ok: true;
|
|
287
287
|
status: "SUCCEEDED";
|
|
288
288
|
moduleRef: "execution-runtime";
|
|
289
|
-
moduleVersion: "0.1.
|
|
289
|
+
moduleVersion: "0.1.4";
|
|
290
290
|
checks: {
|
|
291
291
|
id: string;
|
|
292
292
|
status: "FAIL" | "PASS";
|
|
@@ -295,7 +295,7 @@ export declare const behaviorAdapter: {
|
|
|
295
295
|
} | {
|
|
296
296
|
contract: "deployment.result.v1";
|
|
297
297
|
moduleRef: "execution-runtime";
|
|
298
|
-
moduleVersion: "0.1.
|
|
298
|
+
moduleVersion: "0.1.4";
|
|
299
299
|
ok: false;
|
|
300
300
|
status: "ACTION_REQUIRED";
|
|
301
301
|
actionRequired: {
|
|
@@ -310,7 +310,7 @@ export declare const behaviorAdapter: {
|
|
|
310
310
|
} | {
|
|
311
311
|
contract: "deployment.result.v1";
|
|
312
312
|
moduleRef: "execution-runtime";
|
|
313
|
-
moduleVersion: "0.1.
|
|
313
|
+
moduleVersion: "0.1.4";
|
|
314
314
|
ok: false;
|
|
315
315
|
status: "ACTION_REQUIRED";
|
|
316
316
|
actionRequired: {
|
|
@@ -331,7 +331,7 @@ export declare const behaviorAdapter: {
|
|
|
331
331
|
readonly ok: true;
|
|
332
332
|
readonly status: "SUCCEEDED";
|
|
333
333
|
readonly moduleRef: "execution-runtime";
|
|
334
|
-
readonly moduleVersion: "0.1.
|
|
334
|
+
readonly moduleVersion: "0.1.4";
|
|
335
335
|
};
|
|
336
336
|
observedEffects: never[];
|
|
337
337
|
};
|
|
@@ -339,7 +339,7 @@ export declare const behaviorAdapter: {
|
|
|
339
339
|
result: {
|
|
340
340
|
readonly contract: "deployment.result.v1";
|
|
341
341
|
readonly moduleRef: "execution-runtime";
|
|
342
|
-
readonly moduleVersion: "0.1.
|
|
342
|
+
readonly moduleVersion: "0.1.4";
|
|
343
343
|
readonly ok: false;
|
|
344
344
|
readonly status: "ACTION_REQUIRED";
|
|
345
345
|
readonly actionRequired: {
|
|
@@ -351,7 +351,7 @@ export declare const behaviorAdapter: {
|
|
|
351
351
|
ok: true;
|
|
352
352
|
status: "SUCCEEDED";
|
|
353
353
|
moduleRef: "execution-runtime";
|
|
354
|
-
moduleVersion: "0.1.
|
|
354
|
+
moduleVersion: "0.1.4";
|
|
355
355
|
data: {
|
|
356
356
|
host: string;
|
|
357
357
|
port: number;
|
|
@@ -365,11 +365,11 @@ export declare const behaviorAdapter: {
|
|
|
365
365
|
readonly ok: true;
|
|
366
366
|
readonly status: "SUCCEEDED";
|
|
367
367
|
readonly moduleRef: "execution-runtime";
|
|
368
|
-
readonly moduleVersion: "0.1.
|
|
368
|
+
readonly moduleVersion: "0.1.4";
|
|
369
369
|
} | {
|
|
370
370
|
readonly contract: "deployment.result.v1";
|
|
371
371
|
readonly moduleRef: "execution-runtime";
|
|
372
|
-
readonly moduleVersion: "0.1.
|
|
372
|
+
readonly moduleVersion: "0.1.4";
|
|
373
373
|
readonly ok: false;
|
|
374
374
|
readonly status: "ACTION_REQUIRED";
|
|
375
375
|
readonly actionRequired: {
|
|
@@ -385,7 +385,7 @@ export declare const behaviorAdapter: {
|
|
|
385
385
|
readonly ok: true;
|
|
386
386
|
readonly status: "SUCCEEDED";
|
|
387
387
|
readonly moduleRef: "execution-runtime";
|
|
388
|
-
readonly moduleVersion: "0.1.
|
|
388
|
+
readonly moduleVersion: "0.1.4";
|
|
389
389
|
};
|
|
390
390
|
observedEffects: "Runs the single backend Execution Runtime service"[];
|
|
391
391
|
}>;
|
|
@@ -393,7 +393,7 @@ export declare const behaviorAdapter: {
|
|
|
393
393
|
result: {
|
|
394
394
|
readonly contract: "deployment.result.v1";
|
|
395
395
|
readonly moduleRef: "execution-runtime";
|
|
396
|
-
readonly moduleVersion: "0.1.
|
|
396
|
+
readonly moduleVersion: "0.1.4";
|
|
397
397
|
readonly ok: false;
|
|
398
398
|
readonly status: "ACTION_REQUIRED";
|
|
399
399
|
readonly actionRequired: {
|
|
@@ -405,7 +405,7 @@ export declare const behaviorAdapter: {
|
|
|
405
405
|
ok: true;
|
|
406
406
|
status: "SUCCEEDED";
|
|
407
407
|
moduleRef: "execution-runtime";
|
|
408
|
-
moduleVersion: "0.1.
|
|
408
|
+
moduleVersion: "0.1.4";
|
|
409
409
|
data: {
|
|
410
410
|
host: string;
|
|
411
411
|
port: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createServer } from "node:net";
|
|
1
2
|
import { descriptor } from "./descriptor.js";
|
|
2
3
|
const base = {
|
|
3
4
|
contract: "deployment.result.v1",
|
|
@@ -15,6 +16,77 @@ const unbound = {
|
|
|
15
16
|
description: "Bind a configured Execution Runtime service",
|
|
16
17
|
},
|
|
17
18
|
};
|
|
19
|
+
async function listenerPreflight(listener) {
|
|
20
|
+
const port = listener.port === "" ? 80 : Number(listener.port);
|
|
21
|
+
const host = listener.hostname.replace(/^\[(.*)\]$/, "$1");
|
|
22
|
+
const address = `${host}:${port}`;
|
|
23
|
+
try {
|
|
24
|
+
const response = await fetch(new URL("/ready", listener), {
|
|
25
|
+
signal: AbortSignal.timeout(500),
|
|
26
|
+
});
|
|
27
|
+
if (response.ok)
|
|
28
|
+
return {
|
|
29
|
+
result: {
|
|
30
|
+
...base,
|
|
31
|
+
checks: [
|
|
32
|
+
{
|
|
33
|
+
id: "execution-runtime-listener",
|
|
34
|
+
status: "PASS",
|
|
35
|
+
message: `Execution Runtime listener ${address} is already READY`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
observedEffects: [],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// A stopped runtime is expected here; continue with a bind-only port probe.
|
|
44
|
+
}
|
|
45
|
+
const probe = await new Promise((resolve) => {
|
|
46
|
+
const server = createServer();
|
|
47
|
+
server.once("error", (error) => resolve({
|
|
48
|
+
available: false,
|
|
49
|
+
message: error instanceof Error ? error.message : String(error),
|
|
50
|
+
}));
|
|
51
|
+
server.listen({ host, port, exclusive: true }, () => server.close(() => resolve({
|
|
52
|
+
available: true,
|
|
53
|
+
message: `Execution Runtime listener ${address} is available`,
|
|
54
|
+
})));
|
|
55
|
+
});
|
|
56
|
+
return probe.available
|
|
57
|
+
? {
|
|
58
|
+
result: {
|
|
59
|
+
...base,
|
|
60
|
+
checks: [
|
|
61
|
+
{
|
|
62
|
+
id: "execution-runtime-listener",
|
|
63
|
+
status: "PASS",
|
|
64
|
+
message: probe.message,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
observedEffects: [],
|
|
69
|
+
}
|
|
70
|
+
: {
|
|
71
|
+
result: {
|
|
72
|
+
...base,
|
|
73
|
+
ok: false,
|
|
74
|
+
status: "ACTION_REQUIRED",
|
|
75
|
+
actionRequired: {
|
|
76
|
+
action: "free-execution-runtime-port",
|
|
77
|
+
description: `Execution Runtime listener ${address} is unavailable (${probe.message}); stop the conflicting process or configure a different endpoint before platform start`,
|
|
78
|
+
},
|
|
79
|
+
checks: [
|
|
80
|
+
{
|
|
81
|
+
id: "execution-runtime-listener",
|
|
82
|
+
status: "FAIL",
|
|
83
|
+
message: probe.message,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
observedEffects: [],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
18
90
|
export function createBehaviorAdapter(service) {
|
|
19
91
|
return {
|
|
20
92
|
describe: () => ({ result: base, observedEffects: [] }),
|
|
@@ -165,7 +237,7 @@ export async function createServiceProcessBinding(input) {
|
|
|
165
237
|
});
|
|
166
238
|
const probeAdapter = {
|
|
167
239
|
describe: behaviorAdapter.describe,
|
|
168
|
-
preflight:
|
|
240
|
+
preflight: () => listenerPreflight(listener),
|
|
169
241
|
verify: async () => {
|
|
170
242
|
let ready = false;
|
|
171
243
|
try {
|
|
@@ -264,5 +336,10 @@ export async function createProductionBinding(input) {
|
|
|
264
336
|
},
|
|
265
337
|
}),
|
|
266
338
|
});
|
|
267
|
-
return {
|
|
339
|
+
return {
|
|
340
|
+
behaviorAdapter: {
|
|
341
|
+
...createBehaviorAdapter(service),
|
|
342
|
+
preflight: () => listenerPreflight(listener),
|
|
343
|
+
},
|
|
344
|
+
};
|
|
268
345
|
}
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "execution-runtime";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-execution-runtime";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.4";
|
|
7
7
|
readonly kind: "service";
|
|
8
8
|
readonly templateVersion: "1.0.0";
|
|
9
9
|
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
@@ -3,7 +3,7 @@ export const descriptor = {
|
|
|
3
3
|
contractVersion: "1.0.0",
|
|
4
4
|
moduleRef: "execution-runtime",
|
|
5
5
|
packageName: "@tomflow/proflow-execution-runtime",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.4",
|
|
7
7
|
kind: "service",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-execution-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@tomflow/proflow-execution-browser-extension": "^0.1.3",
|
|
26
|
-
"@tomflow/proflow-execution-local": "^0.1.3",
|
|
27
26
|
"@tomflow/proflow-execution-contracts": "^0.1.2",
|
|
27
|
+
"@tomflow/proflow-execution-local": "^0.1.3",
|
|
28
28
|
"@tomflow/proflow-model-contracts": "^0.1.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/proflow.module.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "execution-runtime",
|
|
5
5
|
"packageName": "@tomflow/proflow-execution-runtime",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.4",
|
|
7
7
|
"kind": "service",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|