@powerhousedao/host-core 6.3.0-dev.9 → 6.4.0-next.1
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/{compound-DKi56SSx.mjs → compound-BWLJ0KBw.mjs} +1617 -488
- package/dist/compound-BWLJ0KBw.mjs.map +1 -0
- package/dist/{compound-CBqPgk38.d.mts → compound-D2dh2VUh.d.mts} +332 -22
- package/dist/compound-D2dh2VUh.d.mts.map +1 -0
- package/dist/{env-substitution-C_fVirPh.d.mts → env-substitution-Ct39KFvA.d.mts} +7 -3
- package/dist/env-substitution-Ct39KFvA.d.mts.map +1 -0
- package/dist/{env-substitution-BXGohOGN.mjs → env-substitution-FJ5Nua4M.mjs} +29 -10
- package/dist/env-substitution-FJ5Nua4M.mjs.map +1 -0
- package/dist/{host-schemas-BM7F21lf.d.mts → host-schemas-B6_-P11_.d.mts} +52 -19
- package/dist/host-schemas-B6_-P11_.d.mts.map +1 -0
- package/dist/index.d.mts +196 -131
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +52 -356
- package/dist/index.mjs.map +1 -1
- package/dist/kill-tree.d.mts +8 -0
- package/dist/kill-tree.d.mts.map +1 -0
- package/dist/kill-tree.mjs +73 -0
- package/dist/kill-tree.mjs.map +1 -0
- package/dist/plugins-DP3YlIWx.mjs +309 -0
- package/dist/plugins-DP3YlIWx.mjs.map +1 -0
- package/dist/{plugins-Uk84BRay.d.mts → plugins-Dsmfhbn7.d.mts} +53 -3
- package/dist/plugins-Dsmfhbn7.d.mts.map +1 -0
- package/dist/plugins.d.mts +2 -2
- package/dist/plugins.mjs +2 -174
- package/dist/projection.d.mts +13 -19
- package/dist/projection.d.mts.map +1 -1
- package/dist/projection.mjs +18 -11
- package/dist/projection.mjs.map +1 -1
- package/dist/runners/compound.d.mts +9 -3
- package/dist/runners/compound.d.mts.map +1 -1
- package/dist/runners/compound.mjs +1 -1
- package/dist/schema.d.mts +6 -4
- package/dist/schema.d.mts.map +1 -1
- package/dist/schema.mjs +5 -4
- package/dist/schema.mjs.map +1 -1
- package/package.json +9 -3
- package/dist/compound-CBqPgk38.d.mts.map +0 -1
- package/dist/compound-DKi56SSx.mjs.map +0 -1
- package/dist/env-substitution-BXGohOGN.mjs.map +0 -1
- package/dist/env-substitution-C_fVirPh.d.mts.map +0 -1
- package/dist/host-schemas-BM7F21lf.d.mts.map +0 -1
- package/dist/plugins-Uk84BRay.d.mts.map +0 -1
- package/dist/plugins.mjs.map +0 -1
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ArrayMapToken, ConcatToken, EnvToken, ItemToken, KeyToken, MapToken, OutputPath, OutputToken, RecordMapToken, RefFn, TOKEN_ESCAPE_KEY, TOKEN_KEYS, Template, Token, TokenFor, TokenKey, TokenMode, TokenableSchema, concatTokenSchema, envTokenSchema, envTokenable, findToken, forbidRef, isToken, itemTokenSchema, keyTokenSchema, mapTokenSchema, outputTokenSchema, ref, tokenKeyOf, tokenSchema, tokenable } from "@powerhousedao/shared/host-tokens";
|
|
3
|
+
//#region src/host-ref.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* How a host is addressed (decision D5). A bare name (`switchboard`) is the
|
|
6
|
+
* project's own host, `<project>/hosts/switchboard/`, always: a package
|
|
7
|
+
* cannot shadow it. `<package>/<host>` (`@powerhousedao/vetra-cli/studio`,
|
|
8
|
+
* `tools/studio`) is a host an installed package supplies, in the `hosts/`
|
|
9
|
+
* folder it ships: `<package>/hosts/studio/`. The host is the last segment,
|
|
10
|
+
* so a host name has no `/`. Only inside a package's compound does a bare
|
|
11
|
+
* member name look in that package first (`locateHost`'s `scope`).
|
|
12
|
+
*/
|
|
13
|
+
declare class HostLoadError extends Error {
|
|
14
|
+
constructor(message: string, hint?: string);
|
|
15
|
+
}
|
|
16
|
+
/** An installed package that supplies hosts: its name and its real folder,
|
|
17
|
+
* which its host files and their module specifiers resolve from. */
|
|
18
|
+
interface HostPackage {
|
|
19
|
+
name: string;
|
|
20
|
+
root: string;
|
|
21
|
+
}
|
|
22
|
+
interface HostRef {
|
|
23
|
+
/** Absent: the project's own host. */
|
|
24
|
+
package?: string;
|
|
25
|
+
/** The folder under `hosts/`. */
|
|
26
|
+
host: string;
|
|
27
|
+
}
|
|
28
|
+
/** Splits a ref at its last `/`; refuses what names no host. */
|
|
29
|
+
declare function parseHostRef(ref: string): HostRef;
|
|
30
|
+
declare function formatHostRef(ref: HostRef): string;
|
|
31
|
+
/** Where messages point for a host file: `hosts/<host>/host.js`, behind its
|
|
32
|
+
* package for a package's (`@acme/tools/hosts/studio/host.js`). */
|
|
33
|
+
declare function hostFileLabel(folder: string, hostPackage?: HostPackage): string;
|
|
34
|
+
/**
|
|
35
|
+
* The real folder of the installed package `name`, found from `fromRoot` as
|
|
36
|
+
* Node finds it: the first `<dir>/node_modules/<name>/package.json` on the
|
|
37
|
+
* lookup paths of `<fromRoot>/package.json`, by its real path (a pnpm link
|
|
38
|
+
* leads to the package's own folder, whose dependencies are its own). Not
|
|
39
|
+
* through `exports`, which may not list `package.json`. Undefined when it is
|
|
40
|
+
* not installed there.
|
|
41
|
+
*/
|
|
42
|
+
declare function resolvePackageRoot(fromRoot: string, name: string): string | undefined;
|
|
43
|
+
/** The installed package `name`, found from the project root
|
|
44
|
+
* (resolvePackageRoot). */
|
|
45
|
+
declare function findHostPackage(projectRoot: string, name: string, host: string): HostPackage;
|
|
46
|
+
/** Where a host's file is, and who supplies it. */
|
|
47
|
+
interface HostLocation {
|
|
48
|
+
/** How it is addressed from anywhere in the project: bare for the
|
|
49
|
+
* project's own, `<package>/<host>` for a package's. A compound starts an
|
|
50
|
+
* own-process member with it, and its record names the member by it. */
|
|
51
|
+
ref: string;
|
|
52
|
+
/** Its folder under `hostsDir`. */
|
|
53
|
+
folder: string;
|
|
54
|
+
/** The `hosts/` folder it is in. */
|
|
55
|
+
hostsDir: string;
|
|
56
|
+
/** The package that supplies it; absent for the project's own. */
|
|
57
|
+
package?: HostPackage;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Where `ref` is. `<package>/<host>` is always the installed package's,
|
|
61
|
+
* found from the project root (also when a package's compound writes it). A
|
|
62
|
+
* bare name is the project's, except in a package's compound (`scope`): there
|
|
63
|
+
* the package's own host of that name comes first. Throws a HostLoadError
|
|
64
|
+
* naming the package and the host. A bare name the project lacks is left to
|
|
65
|
+
* the loader's own message (undefined `package`, project `hostsDir`).
|
|
66
|
+
*/
|
|
67
|
+
declare function locateHost(projectRoot: string, ref: string, scope?: HostPackage): HostLocation;
|
|
68
|
+
//#endregion
|
|
3
69
|
//#region src/host-schemas.d.ts
|
|
4
70
|
/**
|
|
5
71
|
* The zod single source for host.js blocks (typed-host-configs G1). Every
|
|
@@ -18,6 +84,16 @@ declare const HOST_NAME_PATTERN: RegExp;
|
|
|
18
84
|
declare const HOST_NAME_MAX_LENGTH = 128;
|
|
19
85
|
declare const HOST_NAME_MESSAGE = "A host name is used as a file name, so use only letters, digits, '.', '_' and '-', start with a letter or digit, and keep it to 128 characters.";
|
|
20
86
|
declare const hostNameSchema: z.ZodString;
|
|
87
|
+
/** An npm package name, as `<package>/<host>` names a package that supplies
|
|
88
|
+
* hosts: `name` or `@scope/name`, each part letters, digits, '-', '.', '_'
|
|
89
|
+
* and '~', not starting with '.' or '_'. Each part is one folder name, the
|
|
90
|
+
* one the package has under node_modules. */
|
|
91
|
+
declare const PACKAGE_NAME_PATTERN: RegExp;
|
|
92
|
+
/** How a compound names a member's host: its folder under the project's
|
|
93
|
+
* `hosts/` (or, in a package's compound, the package's first), or
|
|
94
|
+
* `<package>/<host>` for one an installed package supplies. */
|
|
95
|
+
declare const HOST_REF_PATTERN: RegExp;
|
|
96
|
+
declare const HOST_REF_MESSAGE = "A member's host is a host folder (`switchboard`), or `<package>/<host>` (`@acme/tools/studio`) for one an installed package supplies.";
|
|
21
97
|
/**
|
|
22
98
|
* A URL, or one written against the page origin (`${origin}/graphql`): the
|
|
23
99
|
* browser resolves the placeholder when it loads Connect's config, for a
|
|
@@ -52,6 +128,12 @@ declare const runnerKindSchema: z.ZodEnum<{
|
|
|
52
128
|
reactor: "reactor";
|
|
53
129
|
}>;
|
|
54
130
|
type RunnerKind = z.infer<typeof runnerKindSchema>;
|
|
131
|
+
/** A compound member's process: its own, or the compound's (`shared`). */
|
|
132
|
+
declare const memberProcessSchema: z.ZodEnum<{
|
|
133
|
+
own: "own";
|
|
134
|
+
shared: "shared";
|
|
135
|
+
}>;
|
|
136
|
+
type MemberProcess = z.infer<typeof memberProcessSchema>;
|
|
55
137
|
declare const reactorBackendKindSchema: z.ZodEnum<{
|
|
56
138
|
"in-process": "in-process";
|
|
57
139
|
remote: "remote";
|
|
@@ -178,7 +260,6 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
178
260
|
refuse: "refuse";
|
|
179
261
|
}>>;
|
|
180
262
|
}, z.core.$strict>>;
|
|
181
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
182
263
|
renown: z.ZodOptional<z.ZodObject<{
|
|
183
264
|
url: z.ZodOptional<z.ZodString>;
|
|
184
265
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -295,7 +376,6 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
295
376
|
refuse: "refuse";
|
|
296
377
|
}>>;
|
|
297
378
|
}, z.core.$strict>>;
|
|
298
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
299
379
|
renown: z.ZodOptional<z.ZodObject<{
|
|
300
380
|
url: z.ZodOptional<z.ZodString>;
|
|
301
381
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -324,6 +404,10 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
324
404
|
}, z.core.$strict>>;
|
|
325
405
|
}, z.core.$strict>>>>;
|
|
326
406
|
}, z.core.$strict>>;
|
|
407
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
408
|
+
own: "own";
|
|
409
|
+
shared: "shared";
|
|
410
|
+
}>>;
|
|
327
411
|
}, z.core.$strict>;
|
|
328
412
|
childrenSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
329
413
|
host: z.ZodString;
|
|
@@ -401,7 +485,6 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
401
485
|
refuse: "refuse";
|
|
402
486
|
}>>;
|
|
403
487
|
}, z.core.$strict>>;
|
|
404
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
405
488
|
renown: z.ZodOptional<z.ZodObject<{
|
|
406
489
|
url: z.ZodOptional<z.ZodString>;
|
|
407
490
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -430,6 +513,10 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
430
513
|
}, z.core.$strict>>;
|
|
431
514
|
}, z.core.$strict>>>>;
|
|
432
515
|
}, z.core.$strict>>;
|
|
516
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
517
|
+
own: "own";
|
|
518
|
+
shared: "shared";
|
|
519
|
+
}>>;
|
|
433
520
|
}, z.core.$strict>>;
|
|
434
521
|
reactorHostSchema: z.ZodObject<{
|
|
435
522
|
name: z.ZodString;
|
|
@@ -513,7 +600,6 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
513
600
|
refuse: "refuse";
|
|
514
601
|
}>>;
|
|
515
602
|
}, z.core.$strict>>;
|
|
516
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
517
603
|
renown: z.ZodOptional<z.ZodObject<{
|
|
518
604
|
url: z.ZodOptional<z.ZodString>;
|
|
519
605
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -633,7 +719,6 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
633
719
|
refuse: "refuse";
|
|
634
720
|
}>>;
|
|
635
721
|
}, z.core.$strict>>;
|
|
636
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
637
722
|
renown: z.ZodOptional<z.ZodObject<{
|
|
638
723
|
url: z.ZodOptional<z.ZodString>;
|
|
639
724
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -662,6 +747,10 @@ declare function buildHostSchemas(tokenField: FieldWrappers): {
|
|
|
662
747
|
}, z.core.$strict>>;
|
|
663
748
|
}, z.core.$strict>>>>;
|
|
664
749
|
}, z.core.$strict>>;
|
|
750
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
751
|
+
own: "own";
|
|
752
|
+
shared: "shared";
|
|
753
|
+
}>>;
|
|
665
754
|
}, z.core.$strict>>;
|
|
666
755
|
config: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
667
756
|
profile: z.ZodOptional<z.ZodObject<{
|
|
@@ -811,7 +900,6 @@ declare const declaredSchemas: {
|
|
|
811
900
|
refuse: "refuse";
|
|
812
901
|
}>>;
|
|
813
902
|
}, z.core.$strict>>;
|
|
814
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
815
903
|
renown: z.ZodOptional<z.ZodObject<{
|
|
816
904
|
url: z.ZodOptional<z.ZodString>;
|
|
817
905
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -928,7 +1016,6 @@ declare const declaredSchemas: {
|
|
|
928
1016
|
refuse: "refuse";
|
|
929
1017
|
}>>;
|
|
930
1018
|
}, z.core.$strict>>;
|
|
931
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
932
1019
|
renown: z.ZodOptional<z.ZodObject<{
|
|
933
1020
|
url: z.ZodOptional<z.ZodString>;
|
|
934
1021
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -957,6 +1044,10 @@ declare const declaredSchemas: {
|
|
|
957
1044
|
}, z.core.$strict>>;
|
|
958
1045
|
}, z.core.$strict>>>>;
|
|
959
1046
|
}, z.core.$strict>>;
|
|
1047
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1048
|
+
own: "own";
|
|
1049
|
+
shared: "shared";
|
|
1050
|
+
}>>;
|
|
960
1051
|
}, z.core.$strict>;
|
|
961
1052
|
childrenSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
962
1053
|
host: z.ZodString;
|
|
@@ -1034,7 +1125,6 @@ declare const declaredSchemas: {
|
|
|
1034
1125
|
refuse: "refuse";
|
|
1035
1126
|
}>>;
|
|
1036
1127
|
}, z.core.$strict>>;
|
|
1037
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1038
1128
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1039
1129
|
url: z.ZodOptional<z.ZodString>;
|
|
1040
1130
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1063,6 +1153,10 @@ declare const declaredSchemas: {
|
|
|
1063
1153
|
}, z.core.$strict>>;
|
|
1064
1154
|
}, z.core.$strict>>>>;
|
|
1065
1155
|
}, z.core.$strict>>;
|
|
1156
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1157
|
+
own: "own";
|
|
1158
|
+
shared: "shared";
|
|
1159
|
+
}>>;
|
|
1066
1160
|
}, z.core.$strict>>;
|
|
1067
1161
|
reactorHostSchema: z.ZodObject<{
|
|
1068
1162
|
name: z.ZodString;
|
|
@@ -1146,7 +1240,6 @@ declare const declaredSchemas: {
|
|
|
1146
1240
|
refuse: "refuse";
|
|
1147
1241
|
}>>;
|
|
1148
1242
|
}, z.core.$strict>>;
|
|
1149
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1150
1243
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1151
1244
|
url: z.ZodOptional<z.ZodString>;
|
|
1152
1245
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1266,7 +1359,6 @@ declare const declaredSchemas: {
|
|
|
1266
1359
|
refuse: "refuse";
|
|
1267
1360
|
}>>;
|
|
1268
1361
|
}, z.core.$strict>>;
|
|
1269
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1270
1362
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1271
1363
|
url: z.ZodOptional<z.ZodString>;
|
|
1272
1364
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1295,6 +1387,10 @@ declare const declaredSchemas: {
|
|
|
1295
1387
|
}, z.core.$strict>>;
|
|
1296
1388
|
}, z.core.$strict>>>>;
|
|
1297
1389
|
}, z.core.$strict>>;
|
|
1390
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1391
|
+
own: "own";
|
|
1392
|
+
shared: "shared";
|
|
1393
|
+
}>>;
|
|
1298
1394
|
}, z.core.$strict>>;
|
|
1299
1395
|
config: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1300
1396
|
profile: z.ZodOptional<z.ZodObject<{
|
|
@@ -1407,7 +1503,6 @@ declare const reactorSchema: z.ZodObject<{
|
|
|
1407
1503
|
refuse: "refuse";
|
|
1408
1504
|
}>>;
|
|
1409
1505
|
}, z.core.$strict>>;
|
|
1410
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1411
1506
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1412
1507
|
url: z.ZodOptional<z.ZodString>;
|
|
1413
1508
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1524,7 +1619,6 @@ declare const childWrapperSchema: z.ZodObject<{
|
|
|
1524
1619
|
refuse: "refuse";
|
|
1525
1620
|
}>>;
|
|
1526
1621
|
}, z.core.$strict>>;
|
|
1527
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1528
1622
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1529
1623
|
url: z.ZodOptional<z.ZodString>;
|
|
1530
1624
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1553,6 +1647,10 @@ declare const childWrapperSchema: z.ZodObject<{
|
|
|
1553
1647
|
}, z.core.$strict>>;
|
|
1554
1648
|
}, z.core.$strict>>>>;
|
|
1555
1649
|
}, z.core.$strict>>;
|
|
1650
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1651
|
+
own: "own";
|
|
1652
|
+
shared: "shared";
|
|
1653
|
+
}>>;
|
|
1556
1654
|
}, z.core.$strict>;
|
|
1557
1655
|
declare const childrenSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1558
1656
|
host: z.ZodString;
|
|
@@ -1630,7 +1728,6 @@ declare const childrenSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
1630
1728
|
refuse: "refuse";
|
|
1631
1729
|
}>>;
|
|
1632
1730
|
}, z.core.$strict>>;
|
|
1633
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1634
1731
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1635
1732
|
url: z.ZodOptional<z.ZodString>;
|
|
1636
1733
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1659,6 +1756,10 @@ declare const childrenSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
1659
1756
|
}, z.core.$strict>>;
|
|
1660
1757
|
}, z.core.$strict>>>>;
|
|
1661
1758
|
}, z.core.$strict>>;
|
|
1759
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1760
|
+
own: "own";
|
|
1761
|
+
shared: "shared";
|
|
1762
|
+
}>>;
|
|
1662
1763
|
}, z.core.$strict>>;
|
|
1663
1764
|
declare const reactorHostSchema: z.ZodObject<{
|
|
1664
1765
|
name: z.ZodString;
|
|
@@ -1742,7 +1843,6 @@ declare const reactorHostSchema: z.ZodObject<{
|
|
|
1742
1843
|
refuse: "refuse";
|
|
1743
1844
|
}>>;
|
|
1744
1845
|
}, z.core.$strict>>;
|
|
1745
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1746
1846
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1747
1847
|
url: z.ZodOptional<z.ZodString>;
|
|
1748
1848
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1862,7 +1962,6 @@ declare const compoundHostSchema: z.ZodObject<{
|
|
|
1862
1962
|
refuse: "refuse";
|
|
1863
1963
|
}>>;
|
|
1864
1964
|
}, z.core.$strict>>;
|
|
1865
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1866
1965
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1867
1966
|
url: z.ZodOptional<z.ZodString>;
|
|
1868
1967
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -1891,6 +1990,10 @@ declare const compoundHostSchema: z.ZodObject<{
|
|
|
1891
1990
|
}, z.core.$strict>>;
|
|
1892
1991
|
}, z.core.$strict>>>>;
|
|
1893
1992
|
}, z.core.$strict>>;
|
|
1993
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
1994
|
+
own: "own";
|
|
1995
|
+
shared: "shared";
|
|
1996
|
+
}>>;
|
|
1894
1997
|
}, z.core.$strict>>;
|
|
1895
1998
|
config: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1896
1999
|
profile: z.ZodOptional<z.ZodObject<{
|
|
@@ -1990,7 +2093,6 @@ declare const genericCompoundHostSchema: z.ZodObject<{
|
|
|
1990
2093
|
refuse: "refuse";
|
|
1991
2094
|
}>>;
|
|
1992
2095
|
}, z.core.$strict>>;
|
|
1993
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
1994
2096
|
renown: z.ZodOptional<z.ZodObject<{
|
|
1995
2097
|
url: z.ZodOptional<z.ZodString>;
|
|
1996
2098
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -2019,6 +2121,10 @@ declare const genericCompoundHostSchema: z.ZodObject<{
|
|
|
2019
2121
|
}, z.core.$strict>>;
|
|
2020
2122
|
}, z.core.$strict>>>>;
|
|
2021
2123
|
}, z.core.$strict>>;
|
|
2124
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
2125
|
+
own: "own";
|
|
2126
|
+
shared: "shared";
|
|
2127
|
+
}>>;
|
|
2022
2128
|
}, z.core.$strict>>;
|
|
2023
2129
|
profile: z.ZodOptional<z.ZodObject<{
|
|
2024
2130
|
appId: z.ZodOptional<z.ZodString>;
|
|
@@ -2122,7 +2228,6 @@ declare const declaredGenericCompoundHostSchema: z.ZodObject<{
|
|
|
2122
2228
|
refuse: "refuse";
|
|
2123
2229
|
}>>;
|
|
2124
2230
|
}, z.core.$strict>>;
|
|
2125
|
-
workflows: z.ZodOptional<z.ZodBoolean>;
|
|
2126
2231
|
renown: z.ZodOptional<z.ZodObject<{
|
|
2127
2232
|
url: z.ZodOptional<z.ZodString>;
|
|
2128
2233
|
networkId: z.ZodOptional<z.ZodString>;
|
|
@@ -2151,6 +2256,10 @@ declare const declaredGenericCompoundHostSchema: z.ZodObject<{
|
|
|
2151
2256
|
}, z.core.$strict>>;
|
|
2152
2257
|
}, z.core.$strict>>>>;
|
|
2153
2258
|
}, z.core.$strict>>;
|
|
2259
|
+
process: z.ZodOptional<z.ZodEnum<{
|
|
2260
|
+
own: "own";
|
|
2261
|
+
shared: "shared";
|
|
2262
|
+
}>>;
|
|
2154
2263
|
}, z.core.$strict>>;
|
|
2155
2264
|
profile: z.ZodOptional<z.ZodObject<{
|
|
2156
2265
|
appId: z.ZodOptional<z.ZodString>;
|
|
@@ -2263,13 +2372,21 @@ declare function checkOutputPaths(host: unknown, outputsSchemaOf: (ref: OutputRe
|
|
|
2263
2372
|
/**
|
|
2264
2373
|
* Resolves a host's `runner.module` specifier from the PROJECT's dependency
|
|
2265
2374
|
* tree (not ph-cli's), imports it, and checks the runner-module contract:
|
|
2266
|
-
* `{ run, hostSchema, kind, outputsSchema?, verbs?, ...optionalVerbs }`.
|
|
2375
|
+
* `{ run, hostSchema, kind, outputsSchema?, verbs?, ...optionalVerbs }`. For
|
|
2376
|
+
* a host an installed package supplies, the caller passes the package's
|
|
2377
|
+
* folder as the root (`moduleRootOf`).
|
|
2267
2378
|
*/
|
|
2268
2379
|
declare class RunnerError extends Error {
|
|
2269
2380
|
constructor(message: string, hint?: string);
|
|
2270
2381
|
}
|
|
2271
2382
|
interface RunnerContext {
|
|
2383
|
+
/** The project: the working directory, its `.ph/` state and stores, also
|
|
2384
|
+
* for a host a package supplies. */
|
|
2272
2385
|
projectRoot: string;
|
|
2386
|
+
/** Set when an installed package supplies the host
|
|
2387
|
+
* (`ph run <package>/<host>`): the module specifiers the host names (its
|
|
2388
|
+
* plugins, a Cli's package) resolve from `root`, as its runner did. */
|
|
2389
|
+
hostPackage?: HostPackage;
|
|
2273
2390
|
/** The verb this runner runs at. For a compound member it is the member's
|
|
2274
2391
|
* OWN effective verb (e.g. "serve" under a compound at "run"). */
|
|
2275
2392
|
verb: string;
|
|
@@ -2284,6 +2401,45 @@ interface RunnerContext {
|
|
|
2284
2401
|
* `ph run <host> [verb]`, checked against the runner's `argsSchema`. They
|
|
2285
2402
|
* win over the host file. A compound member gets its own share. */
|
|
2286
2403
|
argv?: readonly string[];
|
|
2404
|
+
/** The host this verb received, read from disk again: loaded, resolved and
|
|
2405
|
+
* validated as the first was. For a dev server that follows the project's
|
|
2406
|
+
* files; a process keeps the first evaluation of a host file otherwise.
|
|
2407
|
+
* Rejects when the files no longer make a valid host. Not set for a
|
|
2408
|
+
* compound member. */
|
|
2409
|
+
reloadHost?: () => Promise<unknown>;
|
|
2410
|
+
/** Set when this runner is a compound's foreground member (its module
|
|
2411
|
+
* exports `foreground: true`): it runs in the compound's process, last,
|
|
2412
|
+
* and its handle's `exited` ends the stack. */
|
|
2413
|
+
foreground?: ForegroundContext;
|
|
2414
|
+
}
|
|
2415
|
+
/** What a compound hands its foreground member. */
|
|
2416
|
+
interface ForegroundContext {
|
|
2417
|
+
/** The other members as the stack sees them now. */
|
|
2418
|
+
members(): readonly MemberStatus[];
|
|
2419
|
+
/** The stack already runs in another process: nothing of it was started
|
|
2420
|
+
* for this run, which reads its outputs from the live record and must
|
|
2421
|
+
* end (a command beside the stack). */
|
|
2422
|
+
beside: boolean;
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* One member of a running compound, in the fields a services manager shows
|
|
2426
|
+
* for a service instance (`ServiceInstanceStatus` in clint): the service id
|
|
2427
|
+
* is the member's name, its endpoints are its URL outputs.
|
|
2428
|
+
*/
|
|
2429
|
+
interface MemberStatus {
|
|
2430
|
+
/** The member's key in `children`. */
|
|
2431
|
+
name: string;
|
|
2432
|
+
/** Its host folder. */
|
|
2433
|
+
host: string;
|
|
2434
|
+
process: "own" | "shared";
|
|
2435
|
+
status: "starting" | "ready" | "stopping" | "stopped" | "failed";
|
|
2436
|
+
/** Its process: a child's, or the compound's for a shared member. */
|
|
2437
|
+
pid?: number;
|
|
2438
|
+
/** Every URL among its outputs, by dotted path (`drives.lab.url`). */
|
|
2439
|
+
endpoints: Record<string, string>;
|
|
2440
|
+
/** This run's log file (own-process members). */
|
|
2441
|
+
logFile?: string;
|
|
2442
|
+
error?: string;
|
|
2287
2443
|
}
|
|
2288
2444
|
/** A verb receives the PARSED host (its runner's hostSchema output), so
|
|
2289
2445
|
* schema defaults and transforms reach it. */
|
|
@@ -2330,6 +2486,10 @@ interface RunnerModule<O = unknown> {
|
|
|
2330
2486
|
/** The arguments the runner accepts after `ph run <host> [verb]`
|
|
2331
2487
|
* (`RunnerArgsSchema`). Absent: it accepts none, and any argument fails. */
|
|
2332
2488
|
argsSchema?: unknown;
|
|
2489
|
+
/** The runner owns the terminal (the Cli runner): it reads stdin itself,
|
|
2490
|
+
* and in a compound it is the foreground member, whose exit ends the
|
|
2491
|
+
* stack (`RunnerContext.foreground`). */
|
|
2492
|
+
foreground?: boolean;
|
|
2333
2493
|
/** What the verb would refuse at boot, given the parsed host and an
|
|
2334
2494
|
* environment (`ph host check`). Starts nothing. */
|
|
2335
2495
|
checkBoot?: (host: O, ctx: BootCheckContext) => readonly BootIssue[] | Promise<readonly BootIssue[]>;
|
|
@@ -2356,6 +2516,12 @@ declare function resolveRunnerModule(projectRoot: string, specifier: string): Pr
|
|
|
2356
2516
|
* the declared host (tokens may remain in token-able fields; a `$map` is
|
|
2357
2517
|
* the empty collection, see `emptyMaps`). */
|
|
2358
2518
|
declare const ONE_SHOT_VERBS: ReadonlySet<string>;
|
|
2519
|
+
/** Why a one-shot verb (build) does not run on a host an installed package
|
|
2520
|
+
* supplies (`ref`, as the project addresses it): the package ships its hosts
|
|
2521
|
+
* built, and a build here would write into the installed package (a
|
|
2522
|
+
* Connect's outDir) or build the project in its name. The package's own
|
|
2523
|
+
* repository builds them, where they are project hosts. */
|
|
2524
|
+
declare function packageBuildRefusal(ref: string, hostPackage: HostPackage, verb: string): RunnerIssue;
|
|
2359
2525
|
/** Verbs that work on a host's stores and start nothing (`migrate`,
|
|
2360
2526
|
* `migrate-status`, `reset`). Their host is resolved as for `run`, so they
|
|
2361
2527
|
* address the stores `run` opens; they take no lock and return nothing, so
|
|
@@ -2428,6 +2594,50 @@ type MemberDraft = Record<string, unknown> & {
|
|
|
2428
2594
|
/** Generic compound rule: `reactor`/`config` replace, `runner` key-merges. */
|
|
2429
2595
|
declare function applyChildWrapper(base: HostDefinition, wrapper: ChildWrapper): MemberDraft;
|
|
2430
2596
|
//#endregion
|
|
2597
|
+
//#region src/resolve/plan.d.ts
|
|
2598
|
+
/**
|
|
2599
|
+
* The dependency plan (pipeline step 4): which compound member consumes
|
|
2600
|
+
* which member's outputs, and the start order that follows. Producers start
|
|
2601
|
+
* before consumers; `config.startOrder` is optional and, when given, must
|
|
2602
|
+
* agree with the tokens. Cycles fail. Pure.
|
|
2603
|
+
*/
|
|
2604
|
+
declare class PlanError extends Error {
|
|
2605
|
+
constructor(message: string);
|
|
2606
|
+
}
|
|
2607
|
+
interface PlanMember {
|
|
2608
|
+
/** The member key (`children.<key>`). */
|
|
2609
|
+
key: string;
|
|
2610
|
+
/** The member's host folder (`children.<key>.host`). */
|
|
2611
|
+
host: string;
|
|
2612
|
+
/** The producers its tokens name, with the host path of one token each. */
|
|
2613
|
+
refs: {
|
|
2614
|
+
ref: OutputRef;
|
|
2615
|
+
path: string;
|
|
2616
|
+
}[];
|
|
2617
|
+
}
|
|
2618
|
+
interface PlanEdge {
|
|
2619
|
+
consumer: string;
|
|
2620
|
+
producer: string;
|
|
2621
|
+
/** Host path in the consumer of the (first) token behind this edge. */
|
|
2622
|
+
path: string;
|
|
2623
|
+
}
|
|
2624
|
+
interface CompoundPlan {
|
|
2625
|
+
/** Member keys in start order. */
|
|
2626
|
+
order: string[];
|
|
2627
|
+
edges: PlanEdge[];
|
|
2628
|
+
/** "tokens": derived from the dependencies; "startOrder": the declared
|
|
2629
|
+
* order, checked against them. */
|
|
2630
|
+
source: "tokens" | "startOrder";
|
|
2631
|
+
}
|
|
2632
|
+
/** The member a ref names: the unique member running `ref.host`, or the
|
|
2633
|
+
* member `ref.member` when given (it must run `ref.host`). */
|
|
2634
|
+
declare function memberForRef(ref: OutputRef, members: readonly Pick<PlanMember, "key" | "host">[]): {
|
|
2635
|
+
key: string;
|
|
2636
|
+
} | {
|
|
2637
|
+
error: string;
|
|
2638
|
+
};
|
|
2639
|
+
declare function planCompound(members: readonly PlanMember[], startOrder?: readonly string[]): CompoundPlan;
|
|
2640
|
+
//#endregion
|
|
2431
2641
|
//#region src/runner-handle.d.ts
|
|
2432
2642
|
/**
|
|
2433
2643
|
* What a server verb returns to its supervisor (typed-host-configs 3.1/3.6):
|
|
@@ -2454,6 +2664,8 @@ interface StartedHandle extends RunnerHandleData {
|
|
|
2454
2664
|
outputs: Record<string, unknown>;
|
|
2455
2665
|
ready?: PromiseLike<unknown>;
|
|
2456
2666
|
shutdown?: () => unknown;
|
|
2667
|
+
/** A foreground member's end, with its exit code. */
|
|
2668
|
+
exited?: PromiseLike<unknown>;
|
|
2457
2669
|
}
|
|
2458
2670
|
/** Normalize what a verb returned. `undefined` (a self-sustaining bridge)
|
|
2459
2671
|
* is an empty handle; anything else must match runnerHandleSchema. */
|
|
@@ -2472,12 +2684,25 @@ declare function toStartedHandle(value: unknown, where: string): StartedHandle;
|
|
|
2472
2684
|
* resolve against the live outputs of the members started before it, and
|
|
2473
2685
|
* the member's runner validates the resolved host.
|
|
2474
2686
|
*
|
|
2475
|
-
* Attached and in-process
|
|
2476
|
-
*
|
|
2687
|
+
* Attached, and in-process unless a member runs in its own process: member
|
|
2688
|
+
* verbs start their servers (which hold the event loop) and return a
|
|
2689
|
+
* handle; the compound lives as long as they do. An own-process member is
|
|
2690
|
+
* `ph run <host>` as a child (spawnHost), handed its resolved host, stopped
|
|
2691
|
+
* through its stdin. A foreground member (a runner that exports
|
|
2692
|
+
* `foreground: true`, the Cli runner) owns the terminal: it starts last, in
|
|
2693
|
+
* this process, and its end ends the stack with its exit code; the members
|
|
2694
|
+
* next to it run in their own processes unless they say otherwise.
|
|
2695
|
+
*
|
|
2696
|
+
* A compound an installed package supplies (`ctx.hostPackage`) names its
|
|
2697
|
+
* members in that package first: a bare member host is the package's when
|
|
2698
|
+
* it ships one, else the project's. Its record and its members' logs go in a
|
|
2699
|
+
* folder named after the package.
|
|
2477
2700
|
*/
|
|
2478
2701
|
interface StartedMember {
|
|
2479
2702
|
name: string;
|
|
2480
2703
|
member: ChildWrapper;
|
|
2704
|
+
/** How the project addresses the member's host (PreparedMember.ref). */
|
|
2705
|
+
ref: string;
|
|
2481
2706
|
specifier: string;
|
|
2482
2707
|
kind: RunnerKind;
|
|
2483
2708
|
verb: string;
|
|
@@ -2486,6 +2711,20 @@ interface StartedMember {
|
|
|
2486
2711
|
* as parsed by the member runner's outputsSchema. */
|
|
2487
2712
|
outputs: Record<string, unknown>;
|
|
2488
2713
|
}
|
|
2714
|
+
interface PreparedMember {
|
|
2715
|
+
key: string;
|
|
2716
|
+
member: ChildWrapper;
|
|
2717
|
+
draft: MemberDraft;
|
|
2718
|
+
specifier: string;
|
|
2719
|
+
runner: RunnerModule;
|
|
2720
|
+
file: string;
|
|
2721
|
+
/** How the project addresses the member's host: its folder, or
|
|
2722
|
+
* `<package>/<host>` for one a package supplies. An own-process member is
|
|
2723
|
+
* started by it, and the record names the member's host by it. */
|
|
2724
|
+
ref: string;
|
|
2725
|
+
/** The package that supplies the member's host. */
|
|
2726
|
+
hostPackage?: HostPackage;
|
|
2727
|
+
}
|
|
2489
2728
|
interface RunCompoundOptions {
|
|
2490
2729
|
/** Project identity for the lock (defaults read from package.json by the CLI). */
|
|
2491
2730
|
projectName: string;
|
|
@@ -2505,6 +2744,69 @@ interface RunCompoundOptions {
|
|
|
2505
2744
|
/** What a stream's supervisor reads (default stdout and stderr). */
|
|
2506
2745
|
supervisedOutputs?: readonly NodeJS.WritableStream[];
|
|
2507
2746
|
}
|
|
2747
|
+
/** Past the shell's own limit: this only matters when no shell is left. */
|
|
2748
|
+
declare const STOP_STREAM_LIMIT_MS = 15000;
|
|
2749
|
+
/**
|
|
2750
|
+
* Windows has no SIGTERM, so a supervisor asks a stack to stop through its
|
|
2751
|
+
* stdin: a line, or the pipe closing, which also covers the supervisor dying.
|
|
2752
|
+
* Only when it asks to: a stack started from a script may have no stdin.
|
|
2753
|
+
*/
|
|
2754
|
+
declare function stopStreamOf(env: NodeJS.ProcessEnv, stdin: () => NodeJS.ReadableStream): NodeJS.ReadableStream | undefined;
|
|
2755
|
+
interface HoldStopOptions {
|
|
2756
|
+
/** How long the stop may take before exiting regardless (default
|
|
2757
|
+
* {@link STOP_STREAM_LIMIT_MS}). */
|
|
2758
|
+
limitMs?: number;
|
|
2759
|
+
/** What the supervisor reads (default stdout and stderr). */
|
|
2760
|
+
outputs?: readonly NodeJS.WritableStream[];
|
|
2761
|
+
/** Delivers the request; false when nothing handles it (default: SIGTERM
|
|
2762
|
+
* to this process's handlers). */
|
|
2763
|
+
signal?: () => boolean;
|
|
2764
|
+
exit?: (code: number) => void;
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* A standalone host's stop through its supervisor's stream (stdin, under
|
|
2768
|
+
* {@link STOP_ON_STDIN_ENV}): a line or the end of it is delivered as the
|
|
2769
|
+
* stop channel delivers a request, to the SIGTERM handlers, else as exit
|
|
2770
|
+
* 143. Held until `started()`: a stop while the verb starts takes effect
|
|
2771
|
+
* once it has, so a store is never left half-opened.
|
|
2772
|
+
*/
|
|
2773
|
+
declare function holdStopRequests(stream: NodeJS.ReadableStream, options?: HoldStopOptions): {
|
|
2774
|
+
started(): void;
|
|
2775
|
+
};
|
|
2776
|
+
/** A member as {@link planForeground} reads it. */
|
|
2777
|
+
interface ForegroundCandidate {
|
|
2778
|
+
key: string;
|
|
2779
|
+
specifier: string;
|
|
2780
|
+
member: Pick<ChildWrapper, "process">;
|
|
2781
|
+
runner: Pick<RunnerModule, "foreground">;
|
|
2782
|
+
}
|
|
2783
|
+
interface ForegroundPlan {
|
|
2784
|
+
/** The member whose runner owns the terminal, when there is one. */
|
|
2785
|
+
foreground?: string;
|
|
2786
|
+
/** The start order: the plan's, with the foreground member last. */
|
|
2787
|
+
order: string[];
|
|
2788
|
+
/** Broken foreground rules; `ph run` refuses the first. */
|
|
2789
|
+
issues: RunnerIssue[];
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* The member whose runner owns the terminal (`foreground: true`) and the
|
|
2793
|
+
* order the compound starts its members in. Its rules: one such member at
|
|
2794
|
+
* most, in the compound's process, and last, so no member reads its outputs
|
|
2795
|
+
* and a `startOrder` that names it puts it at the end. `runCompound` refuses
|
|
2796
|
+
* the first broken one; `ph host check` reports them all.
|
|
2797
|
+
*/
|
|
2798
|
+
declare function planForeground(members: readonly ForegroundCandidate[], plan: CompoundPlan, wiring: CompoundWiring): ForegroundPlan;
|
|
2799
|
+
/** Where a member runs: `own` (a child process) or `shared` (the
|
|
2800
|
+
* compound's). The foreground member and every member at a one-shot verb
|
|
2801
|
+
* share the compound's; next to a foreground member the default is `own`. */
|
|
2802
|
+
declare function memberProcessOf(member: Pick<ChildWrapper, "process">, options: {
|
|
2803
|
+
/** It is the foreground member. */
|
|
2804
|
+
foreground: boolean;
|
|
2805
|
+
/** The compound has a foreground member. */
|
|
2806
|
+
besideForeground: boolean;
|
|
2807
|
+
/** It runs at a one-shot verb (build). */
|
|
2808
|
+
oneShot: boolean;
|
|
2809
|
+
}): MemberProcess;
|
|
2508
2810
|
interface RunCompoundResult {
|
|
2509
2811
|
started: StartedMember[];
|
|
2510
2812
|
/** Graceful teardown, consumers before producers (reverse dependency
|
|
@@ -2516,7 +2818,15 @@ interface RunCompoundResult {
|
|
|
2516
2818
|
handleSignal: (signal: "SIGINT" | "SIGTERM") => Promise<void>;
|
|
2517
2819
|
}
|
|
2518
2820
|
declare function runCompound(hostInput: HostDefinition, ctx: RunnerContext, options: RunCompoundOptions): Promise<RunCompoundResult>;
|
|
2821
|
+
/**
|
|
2822
|
+
* A compound that is, through its compound members, a member of itself
|
|
2823
|
+
* would start itself without end: the chain of hosts, as the project
|
|
2824
|
+
* addresses them, when there is one. Each compound member's own members are
|
|
2825
|
+
* looked up as it looks them up (its package first, for a package's). A
|
|
2826
|
+
* reactor member ends a chain.
|
|
2827
|
+
*/
|
|
2828
|
+
declare function memberCycle(projectRoot: string, prepared: readonly PreparedMember[]): Promise<string[] | undefined>;
|
|
2519
2829
|
//#endregion
|
|
2520
|
-
export {
|
|
2830
|
+
export { validateHost as $, profileSchema as $t, ForegroundContext as A, findToken as An, ReactorHostInput as At, RunnerVerb as B, tokenable as Bn, compoundWiringSchema as Bt, planCompound as C, TokenFor as Cn, PACKAGE_NAME_PATTERN as Ct, BootIssue as D, concatTokenSchema as Dn, ReactorBackendKind as Dt, BootCheckContext as E, TokenableSchema as En, ReactorBackend as Et, ONE_SHOT_VERBS as F, mapTokenSchema as Fn, RunnerBase as Ft, hostSchemaIssues as G, findHostPackage as Gn, emitHostJsonSchema as Gt, SchemaIssue as H, HostLocation as Hn, declaredGenericCompoundHostSchema as Ht, RunnerContext as I, outputTokenSchema as In, RunnerKind as It, knownVerbIssues as J, locateHost as Jn, hostNameSchema as Jt, isSchemaLike as K, formatHostRef as Kn, emittedHostSchemas as Kt, RunnerError as L, ref as Ln, childWrapperSchema as Lt, HostSchemaIssues as M, isToken as Mn, ReactorProtocol as Mt, HostSchemaLike as N, itemTokenSchema as Nn, ReactorRemoteConfig as Nt, CONNECT_RUNNER as O, envTokenSchema as On, ReactorConfig as Ot, MemberStatus as P, keyTokenSchema as Pn, ReactorStorageConfig as Pt, validateDeclaredHost as Q, placementKeyIssues as Qt, RunnerIssue as R, tokenKeyOf as Rn, childrenSchema as Rt, memberForRef as S, Token as Sn, MemberProcess as St, applyChildWrapper as T, TokenMode as Tn, Profile as Tt, ValidateHostOptions as U, HostPackage as Un, declaredHostSchemas as Ut, STORE_VERBS as V, HostLoadError as Vn, connectReactorIssues as Vt, getVerb as W, HostRef as Wn, defineHostSchemas as Wt, packageBuildRefusal as X, resolvePackageRoot as Xn, memberProcessSchema as Xt, listVerbs as Y, parseHostRef as Yn, makeHostSchemas as Yt, resolveRunnerModule as Z, originOrUrlSchema as Zt, toStartedHandle as _, RecordMapToken as _n, HOST_NAME_PATTERN as _t, RunCompoundResult as a, refineConnectReactor as an, envSitesOf as at, PlanError as b, TOKEN_KEYS as bn, HostDefinition as bt, memberCycle as c, runnerKindSchema as cn, refKey as ct, runCompound as d, EnvToken as dn, ChildWrapper as dt, reactorBackendKindSchema as en, DeclaredIssue as et, stopStreamOf as f, ItemToken as fn, CompoundHost as ft, runnerHandleSchema as g, OutputToken as gn, HOST_NAME_MESSAGE as gt, StartedHandle as h, OutputPath as hn, HOST_NAME_MAX_LENGTH as ht, RunCompoundOptions as i, reactorSchema as in, checkTokenSites as it, HostSchemaIssue as j, forbidRef as jn, ReactorPackageConfig as jt, DeclaredHostOptions as k, envTokenable as kn, ReactorHost as kt, memberProcessOf as l, ArrayMapToken as ln, schemaAtPath as lt, RunnerHandleData as m, MapToken as mn, CompoundWiring as mt, ForegroundPlan as n, reactorHostSchema as nn, OutputsSchemaLookup as nt, STOP_STREAM_LIMIT_MS as o, refineStartOrder as on, outputRefsOf as ot, RunnerHandle as p, KeyToken as pn, CompoundHostInput as pt, kindShapeIssues as q, hostFileLabel as qn, genericCompoundHostSchema as qt, HoldStopOptions as r, reactorProtocolSchema as rn, checkOutputPaths as rt, holdStopRequests as s, runnerBaseSchema as sn, outputSitesOf as st, ForegroundCandidate as t, reactorBackendSchema as tn, OutputRef as tt, planForeground as u, ConcatToken as un, CONNECT_PRIMARY_MESSAGE as ut, CompoundPlan as v, RefFn as vn, HOST_REF_MESSAGE as vt, MemberDraft as w, TokenKey as wn, PlacementKeyIssue as wt, PlanMember as x, Template as xn, HostSchemas as xt, PlanEdge as y, TOKEN_ESCAPE_KEY as yn, HOST_REF_PATTERN as yt, RunnerModule as z, tokenSchema as zn, compoundHostSchema as zt };
|
|
2521
2831
|
export {};
|
|
2522
|
-
//# sourceMappingURL=compound-
|
|
2832
|
+
//# sourceMappingURL=compound-D2dh2VUh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compound-D2dh2VUh.d.mts","names":[],"sources":["../src/host-ref.ts","../src/host-schemas.ts","../src/resolve/declared.ts","../src/runner-resolver.ts","../src/child-wrapper.ts","../src/resolve/plan.ts","../src/runner-handle.ts","../src/compound.ts"],"mappings":";;;;;;;;;;;;cAsBa,sBAAsB;EACjC,YAAY,iBAAiB;;;;UAQd;EACf;EACA;;UAGe;;EAEf;;EAEA;;;iBAIc,aAAa,cAAc;iBAyB3B,cAAc,KAAK;;;iBAMnB,cACd,gBACA,cAAc;;;;;;;;;iBA2BA,mBACd,kBACA;;;iBAkBc,gBACd,qBACA,cACA,eACC;;UAgCc;;;;EAIf;;EAEA;;EAEA;;EAEA,UAAU;;;;;;;;;;iBAgCI,WACd,qBACA,aACA,QAAQ,cACP;;;;;;;;;;;;;;;;cCnLU,mBAAiB;cACjB;cACA;cAEA,gBAAc,EAAA;;;;;cAUd,sBAAoB;;;;cAMpB,kBAAgB;cAGhB;;;;;;cAQA,mBAAiB,EAAA,mBAAA,EAAA,QAAA,EAAA;cAOjB,eAAa,EAAA;;;;;GAKxB,EAAA,KAAA;cAEW,uBAAqB,EAAA;;;;;;;;;;;;;;;;GAYhC,EAAA,KAAA;cAEW,kBAAgB,EAAA;;;;KACjB,aAAa,EAAE,aAAa;;cAG3B,qBAAmB,EAAA;;;;KACpB,gBAAgB,E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