@powerhousedao/host-core 6.2.3-dev.86 → 6.2.3-dev.88
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-NxCal3db.d.mts → compound-7I7qUIiG.d.mts} +220 -2
- package/dist/compound-7I7qUIiG.d.mts.map +1 -0
- package/dist/{compound-GhJAA2dK.mjs → compound-BZb3tR_c.mjs} +93 -7
- package/dist/compound-BZb3tR_c.mjs.map +1 -0
- package/dist/{env-substitution-CN_oSVVY.mjs → env-substitution-BbFg9lIW.mjs} +93 -7
- package/dist/env-substitution-BbFg9lIW.mjs.map +1 -0
- package/dist/{host-schemas-DtKFmLd0.d.mts → host-schemas-CwNCJflE.d.mts} +220 -2
- package/dist/host-schemas-CwNCJflE.d.mts.map +1 -0
- package/dist/index.d.mts +90 -75
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +91 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{plugins-C1Rjl-zt.d.mts → plugins-DZPDoyBt.d.mts} +2 -2
- package/dist/{plugins-C1Rjl-zt.d.mts.map → plugins-DZPDoyBt.d.mts.map} +1 -1
- package/dist/plugins.d.mts +1 -1
- package/dist/projection.d.mts +82 -66
- package/dist/projection.d.mts.map +1 -1
- package/dist/projection.mjs +55 -20
- package/dist/projection.mjs.map +1 -1
- package/dist/runners/compound.d.mts +23 -1
- package/dist/runners/compound.d.mts.map +1 -1
- package/dist/runners/compound.mjs +1 -1
- package/dist/schema.d.mts +3 -3
- package/dist/schema.mjs +2 -2
- package/package.json +3 -3
- package/dist/compound-GhJAA2dK.mjs.map +0 -1
- package/dist/compound-NxCal3db.d.mts.map +0 -1
- package/dist/env-substitution-CN_oSVVY.mjs.map +0 -1
- package/dist/host-schemas-DtKFmLd0.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as HostDefinition, $t as TokenFor, A as knownVerbIssues, At as reactorBackendKindSchema, B as envSitesOf, Bt as ConcatToken, C as RunnerVerb, Ct as emittedHostSchemas, D as hostSchemaIssues, Dt as originOrUrlSchema, E as getVerb, Et as makeHostSchemas, F as DeclaredIssue, Ft as refineConnectReactor, G as CONNECT_PRIMARY_MESSAGE, Gt as OutputPath, H as outputSitesOf, Ht as ItemToken, I as OutputRef, It as refineStartOrder, J as CompoundHostInput, Jt as RefFn, K as ChildWrapper, Kt as OutputToken, L as OutputsSchemaLookup, Lt as runnerBaseSchema, M as resolveRunnerModule, Mt as reactorHostSchema, N as validateDeclaredHost, Nt as reactorProtocolSchema, O as isSchemaLike, Ot as placementKeyIssues, P as validateHost, Pt as reactorSchema, Q as HOST_NAME_PATTERN, Qt as Token, R as checkOutputPaths, Rt as runnerKindSchema, S as RunnerModule, St as emitHostJsonSchema, T as ValidateHostOptions, Tt as hostNameSchema, U as refKey, Ut as KeyToken, V as outputRefsOf, Vt as EnvToken, W as schemaAtPath, Wt as MapToken, X as HOST_NAME_MAX_LENGTH, Xt as TOKEN_KEYS, Y as CompoundWiring, Yt as TOKEN_ESCAPE_KEY, Z as HOST_NAME_MESSAGE, Zt as Template, _ as HostSchemaLike, _t as compoundWiringSchema, a as RunnerHandleData, an as envTokenable, at as ReactorConfig, b as RunnerError, bt as declaredHostSchemas, c as toStartedHandle, cn as isToken, ct as ReactorPackageConfig, d as BootCheckContext, dn as mapTokenSchema, dt as ReactorStorageConfig, en as TokenKey, et as HostSchemas, f as BootIssue, fn as outputTokenSchema, ft as RunnerBase, g as HostSchemaIssues, gn as tokenable, gt as compoundHostSchema, h as HostSchemaIssue, hn as tokenSchema, ht as childrenSchema, i as RunnerHandle, in as envTokenSchema, it as ReactorBackendKind, j as listVerbs, jt as reactorBackendSchema, k as kindShapeIssues, kt as profileSchema, l as MemberDraft, ln as itemTokenSchema, lt as ReactorProtocol, m as DeclaredHostOptions, mn as tokenKeyOf, mt as childWrapperSchema, n as RunCompoundResult, nn as TokenableSchema, nt as Profile, o as StartedHandle, on as findToken, ot as ReactorHost, p as CONNECT_RUNNER, pn as ref, pt as RunnerKind, q as CompoundHost, qt as RecordMapToken, r as runCompound, rn as concatTokenSchema, rt as ReactorBackend, s as runnerHandleSchema, sn as forbidRef, st as ReactorHostInput, t as RunCompoundOptions, tn as TokenMode, tt as PlacementKeyIssue, u as applyChildWrapper, un as keyTokenSchema, ut as ReactorRemoteConfig, v as ONE_SHOT_VERBS, vt as connectReactorIssues, w as SchemaIssue, wt as genericCompoundHostSchema, x as RunnerIssue, xt as defineHostSchemas, y as RunnerContext, yt as declaredGenericCompoundHostSchema, z as checkTokenSites, zt as ArrayMapToken } from "./compound-7I7qUIiG.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { SwitchboardDrive, driveAddressMessage, switchboardOfDrive } from "@powerhousedao/shared/host-tokens";
|
|
4
4
|
import { ORIGIN_PLACEHOLDER, SWITCHBOARD_PROXY_PATHS, isHtmlNavigation, isOriginPlaceholderUrl, isSwitchboardProxyPath, resolveOriginPlaceholders, toOriginPlaceholder, withOriginPlaceholders } from "@powerhousedao/shared/connect/origin-placeholder";
|
|
@@ -385,6 +385,8 @@ interface CheckDeferred extends DeferredToken {
|
|
|
385
385
|
}
|
|
386
386
|
interface CheckHostResult {
|
|
387
387
|
issues: HostIssue[];
|
|
388
|
+
/** What `ph run` survives but the user should know; never fails a check. */
|
|
389
|
+
warnings: HostIssue[];
|
|
388
390
|
/** `$output` tokens left unresolved because no `outputs` were given. */
|
|
389
391
|
deferred: CheckDeferred[];
|
|
390
392
|
}
|
|
@@ -796,9 +798,77 @@ export declare function mergeDrivePlan(projectRoot: string, hostDeclared: readon
|
|
|
796
798
|
}[]): DrivePlanEntry[];
|
|
797
799
|
export declare function explainDrivePlan(plan: readonly DrivePlanEntry[]): string;
|
|
798
800
|
//#endregion
|
|
801
|
+
//#region src/backend-projection.d.ts
|
|
802
|
+
/**
|
|
803
|
+
* Phase 4 (track R): project named host backends onto reactor-monitor's
|
|
804
|
+
* `ReactorDescriptor` shape — the input `provision()` takes. Pure and
|
|
805
|
+
* dependency-free; a type-assignability test pins the output to the real
|
|
806
|
+
* `ReactorDescriptor` so an upstream field rename fails this package's tests
|
|
807
|
+
* instead of silently drifting (D2.b: aligned locally, upstreaming not
|
|
808
|
+
* blocked on).
|
|
809
|
+
*/
|
|
810
|
+
/** The browser-provisionable storage union — reactor-monitor's
|
|
811
|
+
* `ReactorStorageConfig` shape. `postgres` is the SERVER extension (D2.b): a
|
|
812
|
+
* switchboard backend's storage, never a provisioned browser reactor's. */
|
|
813
|
+
type ProjectedStorage = {
|
|
814
|
+
kind: "idb";
|
|
815
|
+
} | {
|
|
816
|
+
kind: "memory";
|
|
817
|
+
} | {
|
|
818
|
+
kind: "path";
|
|
819
|
+
dataDir: string;
|
|
820
|
+
};
|
|
821
|
+
interface ProjectedDescriptor {
|
|
822
|
+
kind: "in-process" | "worker" | "remote";
|
|
823
|
+
name: string;
|
|
824
|
+
storage?: ProjectedStorage;
|
|
825
|
+
packages?: {
|
|
826
|
+
cdnUrl?: string;
|
|
827
|
+
specs?: string[];
|
|
828
|
+
dynamic?: boolean;
|
|
829
|
+
};
|
|
830
|
+
featureFlags?: {
|
|
831
|
+
documentDecisions?: boolean;
|
|
832
|
+
authEnforcement?: boolean;
|
|
833
|
+
authGroups?: boolean;
|
|
834
|
+
authConditions?: boolean;
|
|
835
|
+
};
|
|
836
|
+
remote?: {
|
|
837
|
+
url: string;
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
/** One backend → one descriptor. The protocol's featureFlags ride every
|
|
841
|
+
* descriptor (they are fleet consensus, not per-backend). A remote backend
|
|
842
|
+
* must carry remote.url — provision() requires it. */
|
|
843
|
+
export declare function backendToDescriptor(name: string, backend: ReactorBackend, protocol?: ReactorProtocol): ProjectedDescriptor;
|
|
844
|
+
/** All named backends, in placement-primary-first order (the order a
|
|
845
|
+
* createReactorClients step would provision them). */
|
|
846
|
+
export declare function backendsToDescriptors(reactor: ReactorConfig | undefined): ProjectedDescriptor[];
|
|
847
|
+
/**
|
|
848
|
+
* Structural multi-reactor (phase 4): true when the block names BOTH a local
|
|
849
|
+
* backend (in-process/worker — the tab's own reactor) and a remote one. This
|
|
850
|
+
* is the shape Connect's routing client serves; a lone remote backend is an
|
|
851
|
+
* attach-only host (assistant/agent shape), not a routed tab.
|
|
852
|
+
*/
|
|
853
|
+
export declare function isStructuralMultiReactor(reactor: ReactorConfig | undefined): boolean;
|
|
854
|
+
/** The remote backends' drive addresses, placement order. */
|
|
855
|
+
export declare function remoteBackendUrls(reactor: ReactorConfig | undefined): string[];
|
|
856
|
+
/** A switchboard as Connect's served config names it, with its connection settings. */
|
|
857
|
+
type ServedRemoteBackend = {
|
|
858
|
+
name: string;
|
|
859
|
+
url: string;
|
|
860
|
+
} & Omit<NonNullable<ReactorBackend["remote"]>, "url">;
|
|
861
|
+
/**
|
|
862
|
+
* The remote backends by host key, placement order, each with the
|
|
863
|
+
* connection settings it sets. A url that is not a string yet (an output
|
|
864
|
+
* token, unresolved when a host builds) is skipped, as in remoteBackendUrls.
|
|
865
|
+
*/
|
|
866
|
+
export declare function remoteBackends(reactor: ReactorConfig | undefined): ServedRemoteBackend[];
|
|
867
|
+
//#endregion
|
|
799
868
|
//#region src/reactor-config.d.ts
|
|
800
|
-
/**
|
|
801
|
-
*
|
|
869
|
+
/** A switchboard host's own store. Prefers placement.primary, else
|
|
870
|
+
* "main"/"local", else the first. Connect refuses placement.primary: its
|
|
871
|
+
* reactor is {@link browserBackend}. */
|
|
802
872
|
export declare function primaryBackend(reactor: ReactorConfig | undefined): ReactorBackend | undefined;
|
|
803
873
|
/** The env vars a protocol block maps onto, with their string values. Only
|
|
804
874
|
* keys the block actually sets appear. */
|
|
@@ -828,6 +898,10 @@ export declare function reactorBlockToSwitchboardConfig(reactor: ReactorConfig |
|
|
|
828
898
|
/** The four reactor-client shapes a Connect host can select (mirrors the
|
|
829
899
|
* shared PHReactorClientMode; kept local to avoid an import cycle). */
|
|
830
900
|
type ReactorClientMode = "in-process" | "worker" | "remote" | "router";
|
|
901
|
+
/** Connect's browser reactor: its first in-process or worker backend. */
|
|
902
|
+
export declare function browserBackend(reactor: ReactorConfig | undefined): (ReactorBackend & {
|
|
903
|
+
name: string;
|
|
904
|
+
}) | undefined;
|
|
831
905
|
/**
|
|
832
906
|
* Which reactor client the backend topology asks for:
|
|
833
907
|
* - local (in-process/worker) AND remote backends -> `router`
|
|
@@ -838,6 +912,13 @@ type ReactorClientMode = "in-process" | "worker" | "remote" | "router";
|
|
|
838
912
|
* legacy reactorWorker/multiReactor behaviour untouched.
|
|
839
913
|
*/
|
|
840
914
|
export declare function reactorClientMode(reactor: ReactorConfig | undefined): ReactorClientMode | undefined;
|
|
915
|
+
/** The router settings Connect serves: only the keys the host sets. */
|
|
916
|
+
interface ConnectRouterSettings {
|
|
917
|
+
/** A remote backend's host key; absent, the browser reactor (or the only switchboard). */
|
|
918
|
+
newDrives?: string;
|
|
919
|
+
probeTimeoutMs?: number;
|
|
920
|
+
provisionalRouteMs?: number;
|
|
921
|
+
}
|
|
841
922
|
interface ConnectReactorProjection {
|
|
842
923
|
/** Patch merged into the connect runtime config (connect.*). */
|
|
843
924
|
connect: {
|
|
@@ -845,10 +926,8 @@ interface ConnectReactorProjection {
|
|
|
845
926
|
instance?: {
|
|
846
927
|
reactorWorker?: boolean;
|
|
847
928
|
reactorClient?: ReactorClientMode;
|
|
848
|
-
remoteBackends?:
|
|
849
|
-
|
|
850
|
-
url: string;
|
|
851
|
-
}[];
|
|
929
|
+
remoteBackends?: ServedRemoteBackend[];
|
|
930
|
+
router?: ConnectRouterSettings;
|
|
852
931
|
};
|
|
853
932
|
app?: {
|
|
854
933
|
workflowsEnabled?: boolean;
|
|
@@ -857,8 +936,9 @@ interface ConnectReactorProjection {
|
|
|
857
936
|
}
|
|
858
937
|
/** Project the reactor block onto the Connect runtime config: protocol →
|
|
859
938
|
* connect.reactor (same shape), backend topology → instance.reactorWorker
|
|
860
|
-
* (
|
|
861
|
-
*
|
|
939
|
+
* (the browser reactor's kind), instance.reactorClient, and with a
|
|
940
|
+
* switchboard instance.remoteBackends and instance.router, workflows →
|
|
941
|
+
* app.workflowsEnabled. */
|
|
862
942
|
export declare function projectReactorToConnect(reactor: ReactorConfig | undefined): ConnectReactorProjection;
|
|
863
943
|
/** Each pre-set env var that CONTRADICTS the host's protocol block, as a
|
|
864
944
|
* message naming the var, the host value and the env value. An env var that
|
|
@@ -873,71 +953,6 @@ export declare function protocolConflicts(protocol: ReactorProtocol | undefined,
|
|
|
873
953
|
*/
|
|
874
954
|
export declare function assertProtocolConsistency(protocol: ReactorProtocol | undefined, env: Record<string, string | undefined>, hostFile?: string): void;
|
|
875
955
|
//#endregion
|
|
876
|
-
//#region src/backend-projection.d.ts
|
|
877
|
-
/**
|
|
878
|
-
* Phase 4 (track R): project named host backends onto reactor-monitor's
|
|
879
|
-
* `ReactorDescriptor` shape — the input `provision()` takes. Pure and
|
|
880
|
-
* dependency-free; a type-assignability test pins the output to the real
|
|
881
|
-
* `ReactorDescriptor` so an upstream field rename fails this package's tests
|
|
882
|
-
* instead of silently drifting (D2.b: aligned locally, upstreaming not
|
|
883
|
-
* blocked on).
|
|
884
|
-
*/
|
|
885
|
-
/** The browser-provisionable storage union — reactor-monitor's
|
|
886
|
-
* `ReactorStorageConfig` shape. `postgres` is the SERVER extension (D2.b): a
|
|
887
|
-
* switchboard backend's storage, never a provisioned browser reactor's. */
|
|
888
|
-
type ProjectedStorage = {
|
|
889
|
-
kind: "idb";
|
|
890
|
-
} | {
|
|
891
|
-
kind: "memory";
|
|
892
|
-
} | {
|
|
893
|
-
kind: "path";
|
|
894
|
-
dataDir: string;
|
|
895
|
-
};
|
|
896
|
-
interface ProjectedDescriptor {
|
|
897
|
-
kind: "in-process" | "worker" | "remote";
|
|
898
|
-
name: string;
|
|
899
|
-
storage?: ProjectedStorage;
|
|
900
|
-
packages?: {
|
|
901
|
-
cdnUrl?: string;
|
|
902
|
-
specs?: string[];
|
|
903
|
-
dynamic?: boolean;
|
|
904
|
-
};
|
|
905
|
-
featureFlags?: {
|
|
906
|
-
documentDecisions?: boolean;
|
|
907
|
-
authEnforcement?: boolean;
|
|
908
|
-
authGroups?: boolean;
|
|
909
|
-
authConditions?: boolean;
|
|
910
|
-
};
|
|
911
|
-
remote?: {
|
|
912
|
-
url: string;
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
/** One backend → one descriptor. The protocol's featureFlags ride every
|
|
916
|
-
* descriptor (they are fleet consensus, not per-backend). A remote backend
|
|
917
|
-
* must carry remote.url — provision() requires it. */
|
|
918
|
-
export declare function backendToDescriptor(name: string, backend: ReactorBackend, protocol?: ReactorProtocol): ProjectedDescriptor;
|
|
919
|
-
/** All named backends, in placement-primary-first order (the order a
|
|
920
|
-
* createReactorClients step would provision them). */
|
|
921
|
-
export declare function backendsToDescriptors(reactor: ReactorConfig | undefined): ProjectedDescriptor[];
|
|
922
|
-
/**
|
|
923
|
-
* Structural multi-reactor (phase 4): true when the block names BOTH a local
|
|
924
|
-
* backend (in-process/worker — the tab's own reactor) and a remote one. This
|
|
925
|
-
* is the shape Connect's routing client serves; a lone remote backend is an
|
|
926
|
-
* attach-only host (assistant/agent shape), not a routed tab.
|
|
927
|
-
*/
|
|
928
|
-
export declare function isStructuralMultiReactor(reactor: ReactorConfig | undefined): boolean;
|
|
929
|
-
/** The remote backends' drive addresses, placement order. */
|
|
930
|
-
export declare function remoteBackendUrls(reactor: ReactorConfig | undefined): string[];
|
|
931
|
-
/**
|
|
932
|
-
* The remote backends by host key, placement order. A url that is not a
|
|
933
|
-
* string yet (an output token, unresolved when a host builds) is skipped, as
|
|
934
|
-
* in remoteBackendUrls.
|
|
935
|
-
*/
|
|
936
|
-
export declare function remoteBackends(reactor: ReactorConfig | undefined): {
|
|
937
|
-
name: string;
|
|
938
|
-
url: string;
|
|
939
|
-
}[];
|
|
940
|
-
//#endregion
|
|
941
956
|
//#region src/connect-projection.d.ts
|
|
942
957
|
/**
|
|
943
958
|
* Concatenate groups of `connect.drives.defaultDrives` in the order given,
|
|
@@ -1249,6 +1264,6 @@ interface MemberInput extends Omit<ExpectHostInput, "members" | "plan"> {
|
|
|
1249
1264
|
*/
|
|
1250
1265
|
export declare function expectHost(input: ExpectHostInput): HostExpectation;
|
|
1251
1266
|
//#endregion
|
|
1252
|
-
export { type ArrayMapToken, type BootCheckContext, type BootIssue, type BuiltinEnv, CONNECT_RUNNER, type CheckDeferred, type CheckHostOptions, type CheckHostResult, type CheckStage, type ChildWrapper, type CompoundHost, type CompoundHostInput, type CompoundPlan, type CompoundWiring, type ConcatToken, type ConnectPluginSlices, type ConnectReactorProjection, type ConsumedOutput, type ContributedDrive, type ContributedDriveInput, type ContributionSource, type Contributions, type DeadConfigWarning, type DeclaredHostOptions, type DeclaredIssue, type DeferredResolution, type DeferredToken, type DriveDeclaration, type DrivePlanEntry, type DriveProjectionInput, type DriveSeederClient, type EnvToken, type ExpectHostInput, type ExpectedBackend, type ExpectedDrive, HOST_NAME_MAX_LENGTH, HOST_NAME_MESSAGE, HOST_NAME_PATTERN, type HostDefinition, type HostExit, type HostExpectation, type HostExport, type HostImports, type HostIssue, type HostOutputsDescription, type HostPlugin, type HostPluginModule, type HostSchemaIssue, type HostSchemaIssues, type HostSchemaLike, type HostSchemas, type HostsFolderStatus, type ItemToken, type KeyToken, type LoadedHost, type MapToken, type MemberDraft, type MemberExpectation, type MemberInput, type MergedContribution, type NormalizedPluginEntry, ONE_SHOT_VERBS, ORIGIN_PLACEHOLDER, type Observe, type OutputLookup, type OutputPath, type OutputRef, type OutputSource, type OutputToken, type OutputsSchemaLookup, type OwnedConfigSlice, type PHHost, type PHHostOutputs, type PlacedConnectDrives, type PlacementKeyIssue, type PlanEdge, type PlanMember, type PluginContributionsPlan, type PluginEntry, type PluginEntryData, type ProducerInfo, type ProducerMap, type Profile, type ProjectedDescriptor, type ProjectedStorage, type Provide, type ReactorBackend, type ReactorBackendKind, type ReactorClientMode, type ReactorConfig, type ReactorHost, type ReactorHostInput, type ReactorPackageConfig, type ReactorProtocol, type ReactorRemoteConfig, type ReactorStorageConfig, type RecordMapToken, type RefFn, type RemovedForm, type ResolveOptions, type ResolveSources, type ResolvedDrive, type ResolvedPlugin, type RunCompoundOptions, type RunCompoundResult, type RunProbe, type RunRecord, type RunRecordMember, type RunnerBase, type RunnerContext, RunnerError, type RunnerHandle, type RunnerHandleData, type RunnerIssue, type RunnerKind, type RunnerModule, type RunnerVerb, SWITCHBOARD_PROXY_PATHS, type SchemaIssue, type SeedResult, type SelfMembers, type SpawnHostOptions, type SpawnHostPhase, type SpawnedHost, type StartedHandle, type SwitchboardDrive, type SwitchboardReactorLayer, TOKEN_ESCAPE_KEY, TOKEN_KEYS, type Template, type Token, type TokenFor, type TokenKey, type TokenMode, type TokenPosition, type TokenSite, type TokenableSchema, type Transform, type ValidateHostOptions, applyChildWrapper, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, compoundHostSchema, compoundWiringSchema, concatTokenSchema, declaredGenericCompoundHostSchema, declaredHostSchemas, defineHostSchemas, driveAddressMessage, emitHostJsonSchema, emittedHostSchemas, envSitesOf, envTokenSchema, envTokenable, findToken, forbidRef, genericCompoundHostSchema, getVerb, hostNameSchema, hostSchemaIssues, isHtmlNavigation, isOriginPlaceholderUrl, isSchemaLike, isSwitchboardProxyPath, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, listVerbs, makeHostSchemas, mapTokenSchema, originOrUrlSchema, outputRefsOf, outputSitesOf, outputTokenSchema, placementKeyIssues, profileSchema, reactorBackendKindSchema, reactorBackendSchema, reactorHostSchema, reactorProtocolSchema, reactorSchema, ref, refKey, refineStartOrder, resolveOriginPlaceholders, resolveRunnerModule, runCompound, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, schemaAtPath, switchboardOfDrive, toOriginPlaceholder, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, validateDeclaredHost, validateHost, withOriginPlaceholders };
|
|
1267
|
+
export { type ArrayMapToken, type BootCheckContext, type BootIssue, type BuiltinEnv, CONNECT_PRIMARY_MESSAGE, CONNECT_RUNNER, type CheckDeferred, type CheckHostOptions, type CheckHostResult, type CheckStage, type ChildWrapper, type CompoundHost, type CompoundHostInput, type CompoundPlan, type CompoundWiring, type ConcatToken, type ConnectPluginSlices, type ConnectReactorProjection, type ConnectRouterSettings, type ConsumedOutput, type ContributedDrive, type ContributedDriveInput, type ContributionSource, type Contributions, type DeadConfigWarning, type DeclaredHostOptions, type DeclaredIssue, type DeferredResolution, type DeferredToken, type DriveDeclaration, type DrivePlanEntry, type DriveProjectionInput, type DriveSeederClient, type EnvToken, type ExpectHostInput, type ExpectedBackend, type ExpectedDrive, HOST_NAME_MAX_LENGTH, HOST_NAME_MESSAGE, HOST_NAME_PATTERN, type HostDefinition, type HostExit, type HostExpectation, type HostExport, type HostImports, type HostIssue, type HostOutputsDescription, type HostPlugin, type HostPluginModule, type HostSchemaIssue, type HostSchemaIssues, type HostSchemaLike, type HostSchemas, type HostsFolderStatus, type ItemToken, type KeyToken, type LoadedHost, type MapToken, type MemberDraft, type MemberExpectation, type MemberInput, type MergedContribution, type NormalizedPluginEntry, ONE_SHOT_VERBS, ORIGIN_PLACEHOLDER, type Observe, type OutputLookup, type OutputPath, type OutputRef, type OutputSource, type OutputToken, type OutputsSchemaLookup, type OwnedConfigSlice, type PHHost, type PHHostOutputs, type PlacedConnectDrives, type PlacementKeyIssue, type PlanEdge, type PlanMember, type PluginContributionsPlan, type PluginEntry, type PluginEntryData, type ProducerInfo, type ProducerMap, type Profile, type ProjectedDescriptor, type ProjectedStorage, type Provide, type ReactorBackend, type ReactorBackendKind, type ReactorClientMode, type ReactorConfig, type ReactorHost, type ReactorHostInput, type ReactorPackageConfig, type ReactorProtocol, type ReactorRemoteConfig, type ReactorStorageConfig, type RecordMapToken, type RefFn, type RemovedForm, type ResolveOptions, type ResolveSources, type ResolvedDrive, type ResolvedPlugin, type RunCompoundOptions, type RunCompoundResult, type RunProbe, type RunRecord, type RunRecordMember, type RunnerBase, type RunnerContext, RunnerError, type RunnerHandle, type RunnerHandleData, type RunnerIssue, type RunnerKind, type RunnerModule, type RunnerVerb, SWITCHBOARD_PROXY_PATHS, type SchemaIssue, type SeedResult, type SelfMembers, type ServedRemoteBackend, type SpawnHostOptions, type SpawnHostPhase, type SpawnedHost, type StartedHandle, type SwitchboardDrive, type SwitchboardReactorLayer, TOKEN_ESCAPE_KEY, TOKEN_KEYS, type Template, type Token, type TokenFor, type TokenKey, type TokenMode, type TokenPosition, type TokenSite, type TokenableSchema, type Transform, type ValidateHostOptions, applyChildWrapper, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, compoundHostSchema, compoundWiringSchema, concatTokenSchema, connectReactorIssues, declaredGenericCompoundHostSchema, declaredHostSchemas, defineHostSchemas, driveAddressMessage, emitHostJsonSchema, emittedHostSchemas, envSitesOf, envTokenSchema, envTokenable, findToken, forbidRef, genericCompoundHostSchema, getVerb, hostNameSchema, hostSchemaIssues, isHtmlNavigation, isOriginPlaceholderUrl, isSchemaLike, isSwitchboardProxyPath, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, listVerbs, makeHostSchemas, mapTokenSchema, originOrUrlSchema, outputRefsOf, outputSitesOf, outputTokenSchema, placementKeyIssues, profileSchema, reactorBackendKindSchema, reactorBackendSchema, reactorHostSchema, reactorProtocolSchema, reactorSchema, ref, refKey, refineConnectReactor, refineStartOrder, resolveOriginPlaceholders, resolveRunnerModule, runCompound, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, schemaAtPath, switchboardOfDrive, toOriginPlaceholder, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, validateDeclaredHost, validateHost, withOriginPlaceholders };
|
|
1253
1268
|
export {};
|
|
1254
1269
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/host-loader.ts","../src/run-record-schema.ts","../src/run-record.ts","../src/spawn-host.ts","../src/host-issues.ts","../src/env-substitution.ts","../src/resolve/resolve.ts","../src/check-host.ts","../src/host-export-schema.ts","../src/host-export.ts","../src/placeholders.ts","../src/host-types.ts","../src/plugins.ts","../src/plugins-resolve.ts","../src/drive-schema.ts","../src/drives.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/host-loader.ts","../src/run-record-schema.ts","../src/run-record.ts","../src/spawn-host.ts","../src/host-issues.ts","../src/env-substitution.ts","../src/resolve/resolve.ts","../src/check-host.ts","../src/host-export-schema.ts","../src/host-export.ts","../src/placeholders.ts","../src/host-types.ts","../src/plugins.ts","../src/plugins-resolve.ts","../src/drive-schema.ts","../src/drives.ts","../src/backend-projection.ts","../src/reactor-config.ts","../src/connect-projection.ts","../src/resolve/plan.ts","../src/resolve/removed-forms.ts","../src/resolve/sources.ts","../src/resolve/walk.ts","../src/resolve/node.ts","../src/expect-host.ts"],"mappings":";;;;;;qBAiCa,sBAAsB;EACjC,YAAY,iBAAiB;;KAMnB;EACN;;EACA;EAAe;;EACf;EAAiB;EAAa;;;;;wBAKpB,iBAAiB,sBAAsB;;qBAwB1C;;;;wBAsGG,cAAc;;UA8Bb;;EAEf;;EAEA;;;;;;;;wBASc,gBAAgB,mBAAmB,eAAe;;;wBAoClD,gBAAgB,mBAAmB;;;wBAMnC,gBAAgB,mBAAmB;;;;;wBAoBnC,oBACd,kBACA;;;wBA0Cc,mBACd,gBACA;UA8Be;EACf;EACA;EACA;EACA,MAAM;;wBA2Bc,SACpB,qBACA,mBACC,QAAQ;;;UAqEM;;EAEf;EACA;;EAEA,eAAe;;;;EAIf;EACA;;;wBAMc,oBAAoB;;;;wBAoBpB,mBAAmB;EACjC;EACA;EACA,eAAe;EACf;;;;;;;;;;;;;;;wBAiDoB,oBACpB,qBACA,mBACC,QAAQ;;;qBCzhBE,uBAAqB,EA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AAS,8BACT,kBACA,UAAU,+BACT;;;;;;;;;;;;KCCS;;UASK;;EAEf,MAAM;;EAEN;;EAEA,OAAO;;UAGQ;;;EAGf,MAAM;EACN,KAAK;;EAEL,OAAO;EACP,UAAU;;;EAGV,iBAAiB;;;wBAcH,WAAW;;;;;wBAmBX,kBAAkB,iBAAiB;;wBA+DnC,cAAc;;;wBAuDd,aAAa,GAAG,OAAO,IAAI;;;wBAe3B,cAAc,GAAG,OAAO,IAAI;;;;;;;;;UCpM3B;;EAEf;;EAEA;EACA;EACA,QAAQ;;;KAIE,cAAc,oBAAoB;EAAiB;;;wBAGzC,cACpB,qBACA,eAAe,cACd,QAAQ;;wBAuBK,oBACd,QAAQ,cACR,mBACA,gBACC;;wBAWa,uBACd,WAAW,eACT,KAAK,cAAc;;;;;;;;;wBAsBP,sBACd,qBACA;EAAW;EAAkB,WAAW;EAAa;IACpD;;;wBA0Da,kBACd,qBACA,MAAK,SAAS,sCACb,KAAK;;;;;;;;;;;;;;UCjIS;EACf;EACA,MAAM;EACN,UAAU;;EAEV;;;;;EAKA;;;;;;UAOe;EACf;EACA;;EAEA;;EAEA;EACA;EACA;;;UAIe;;EAEf;EACA;EACA;EACA,MAAM;;UAGS;EACf;EACA,MAAM;;;EAGN;;EAEA,aAAa;;EAEb;EACA,WAAW;;EAEX;EACA,SAAS;;EAET;EACA,UAAU;;EAEV;;EAEA;;EAEA,UAAU,eAAe;;UAGV,0BAA0B,KACzC;;EAIA;;EAEA;;;;UAKe;EACf,aAAa;EACb;;UAGe;EACf,MAAM;;;EAGN,UAAU;;EAEV,WAAW;;EAEX,uBAAuB;;EAEvB,mBAAmB;;EAEnB,OAAO;;UAGQ,oBAAoB,KAAK;EACxC;EACA;;;;;;;;wBAgKc,WAAW,OAAO,kBAAkB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as resolveHostOutputs, $t as
|
|
1
|
+
import { $ as resolveHostOutputs, $t as projectDriveIdWith, A as findNonStaticValue, An as runObserveHook, At as declaredGenericCompoundHostSchema, B as ONE_SHOT_VERBS, Bt as profileSchema, C as writeRunRecord, Cn as mergeContributions, Ct as HOST_NAME_MESSAGE, D as OUTPUTS_FILE, Dn as pluginEntrySchema, Dt as compoundHostSchema, E as HostLoadError, En as pluginEntryObjectSchema, Et as childrenSchema, F as probeHostsFolder, Ft as genericCompoundHostSchema, G as kindShapeIssues, Gt as reactorSchema, H as getVerb, Ht as reactorBackendSchema, I as readOutputsFileHash, It as hostNameSchema, J as resolveRunnerModule, Jt as runnerBaseSchema, K as knownVerbIssues, Kt as refineConnectReactor, L as scanHostImports, Lt as makeHostSchemas, M as lintHostImports, Mn as runProvideHook, Mt as defineHostSchemas, N as lintOutputsFile, Nn as runTransformHook, Nt as emitHostJsonSchema, O as computeOutputsHash, On as registerHostType, Ot as compoundWiringSchema, P as loadHost, Pt as emittedHostSchemas, Q as describeMapElements, Qt as drivesSchema, R as stripComments, Rt as originOrUrlSchema, S as readRunRecord, Sn as hostTypeSatisfies, St as HOST_NAME_MAX_LENGTH, T as runRecordSchema, Tn as normalizePluginEntry, Tt as childWrapperSchema, U as hostSchemaIssues, Ut as reactorHostSchema, V as RunnerError, Vt as reactorBackendKindSchema, W as isSchemaLike, Wt as reactorProtocolSchema, X as validateHost, Xt as buildDriveDeclarationSchema, Y as validateDeclaredHost, Yt as runnerKindSchema, Z as TokenResolutionError, Zt as driveDeclarationSchema, _ as clearRunRecord, _n as findDeadConnectConfig, _t as formatPath, a as takesCspRegistrySync, an as findToken, at as isBuiltinEnvName, b as probeRun, bn as PluginError, bt as unwrapEscapes, c as compoundOutputSource, cn as itemTokenSchema, ct as checkOutputPaths, d as producerOutputsSchemas, dn as outputTokenSchema, dt as outputRefsOf, en as TOKEN_ESCAPE_KEY, et as unsetEnvMessage, f as runRecordOutputSource, fn as ref, ft as outputSitesOf, g as applyChildWrapper, gn as CONNECT_PLUGIN_OWNED_SLICES, gt as describeToken, h as resolveUserDataPlaceholders, hn as tokenable, ht as collectTokenSites, i as runCompound, in as envTokenable, it as BUILTIN_ENV_NAMES, j as lintHostImportGraph, jn as runObserveHookSequential, jt as declaredHostSchemas, k as describeHostOutputs, kn as resolveOrder, kt as connectReactorIssues, l as loadProducers, ln as keyTokenSchema, lt as checkTokenSites, m as defaultUserDataDir, mn as tokenSchema, mt as schemaAtPath, n as memberVerbOf, nn as concatTokenSchema, nt as memberForRef, o as runnerHandleSchema, on as forbidRef, ot as substituteBuiltinEnv, p as runnerOutputsSchema, pn as tokenKeyOf, pt as refKey, q as listVerbs, qt as refineStartOrder, r as prepareMember, rn as envTokenSchema, rt as planCompound, s as toStartedHandle, sn as isToken, st as findRemovedForms, t as compoundStartVerb, tn as TOKEN_KEYS, tt as PlanError, u as processResolveEnv, un as mapTokenSchema, ut as envSitesOf, v as isPidAlive, vn as resolveHostPlugins, vt as isPlainObject, w as runRecordMemberSchema, wn as normalizePluginEntries, wt as HOST_NAME_PATTERN, x as readProjectName, xn as entryActiveForVerb, xt as CONNECT_PRIMARY_MESSAGE, y as listRunRecords, yn as resolvePluginContributions, yt as renderTokens, z as CONNECT_RUNNER, zt as placementKeyIssues } from "./compound-BZb3tR_c.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import fs from "node:fs";
|
|
@@ -8,6 +8,7 @@ import { z } from "zod";
|
|
|
8
8
|
import { driveAddressMessage, switchboardOfDrive, switchboardOfDrive as switchboardOfDrive$1 } from "@powerhousedao/shared/host-tokens";
|
|
9
9
|
import { ORIGIN_PLACEHOLDER, SWITCHBOARD_PROXY_PATHS, isHtmlNavigation, isOriginPlaceholderUrl, isSwitchboardProxyPath, resolveOriginPlaceholders, toOriginPlaceholder, withOriginPlaceholders } from "@powerhousedao/shared/connect/origin-placeholder";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
|
+
import { DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_SWITCHBOARD_PORT } from "@powerhousedao/shared/clis/constants";
|
|
11
12
|
import { DRIVE_ICON_MAX_BYTES, resolveImageRef } from "@powerhousedao/shared/connect/image-ref";
|
|
12
13
|
//#region src/spawn-host.ts
|
|
13
14
|
var SpawnHostError = class extends Error {
|
|
@@ -240,6 +241,7 @@ async function spawnHost(options) {
|
|
|
240
241
|
async function checkHost(name, options) {
|
|
241
242
|
const result = {
|
|
242
243
|
issues: [],
|
|
244
|
+
warnings: [],
|
|
243
245
|
deferred: []
|
|
244
246
|
};
|
|
245
247
|
const file = `hosts/${name}/host.js`;
|
|
@@ -404,6 +406,7 @@ async function checkCompound(result, options, subject) {
|
|
|
404
406
|
} catch (error) {
|
|
405
407
|
issue("declared", "", error);
|
|
406
408
|
}
|
|
409
|
+
result.warnings.push(...sharedPortWarnings(subject.file, prepared));
|
|
407
410
|
const byKey = new Map(prepared.map((m) => [m.key, m]));
|
|
408
411
|
const outputsSchemaOf = (ref) => {
|
|
409
412
|
const target = memberForRef(ref, members);
|
|
@@ -431,6 +434,39 @@ async function checkCompound(result, options, subject) {
|
|
|
431
434
|
});
|
|
432
435
|
}
|
|
433
436
|
}
|
|
437
|
+
const SWITCHBOARD_RUNNER = "@powerhousedao/ph-cli/runners/switchboard";
|
|
438
|
+
/** The port a member binds: its own literal, else its ph-cli runner's default. */
|
|
439
|
+
function boundPortOf(m) {
|
|
440
|
+
const port = m.draft.runner.port;
|
|
441
|
+
if (port === void 0) {
|
|
442
|
+
if (m.specifier === "@powerhousedao/ph-cli/runners/connect") return DEFAULT_CONNECT_STUDIO_PORT;
|
|
443
|
+
if (m.specifier === SWITCHBOARD_RUNNER) return DEFAULT_SWITCHBOARD_PORT;
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
return typeof port === "number" && Number.isInteger(port) && port > 0 ? port : void 0;
|
|
447
|
+
}
|
|
448
|
+
/** Members binding one port: under `ph run` the later one moves or fails. */
|
|
449
|
+
function sharedPortWarnings(file, prepared) {
|
|
450
|
+
const owners = /* @__PURE__ */ new Map();
|
|
451
|
+
const warnings = [];
|
|
452
|
+
for (const m of prepared) {
|
|
453
|
+
const port = boundPortOf(m);
|
|
454
|
+
if (port === void 0) continue;
|
|
455
|
+
const other = owners.get(port);
|
|
456
|
+
if (!other) {
|
|
457
|
+
owners.set(port, m);
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
const connects = m.specifier === "@powerhousedao/ph-cli/runners/connect" && other.specifier === "@powerhousedao/ph-cli/runners/connect";
|
|
461
|
+
warnings.push({
|
|
462
|
+
stage: "declared",
|
|
463
|
+
file,
|
|
464
|
+
path: `children.${m.key}.runner.port`,
|
|
465
|
+
message: connects ? `${other.key} and ${m.key} both use port ${port}. One will move to the next free port and lose its browser data.` : `${other.key} and ${m.key} both use port ${port}. One will move to the next free port or fail to start.`
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
return warnings;
|
|
469
|
+
}
|
|
434
470
|
function issuer(result, file) {
|
|
435
471
|
return (stage, found, error) => {
|
|
436
472
|
if (typeof found !== "string") {
|
|
@@ -700,15 +736,23 @@ function remoteBackendUrls(reactor) {
|
|
|
700
736
|
return backendsToDescriptors(reactor).filter((d) => d.kind === "remote").map((d) => d.remote?.url).filter((u) => typeof u === "string");
|
|
701
737
|
}
|
|
702
738
|
/**
|
|
703
|
-
* The remote backends by host key, placement order
|
|
704
|
-
*
|
|
705
|
-
* in remoteBackendUrls.
|
|
739
|
+
* The remote backends by host key, placement order, each with the
|
|
740
|
+
* connection settings it sets. A url that is not a string yet (an output
|
|
741
|
+
* token, unresolved when a host builds) is skipped, as in remoteBackendUrls.
|
|
706
742
|
*/
|
|
707
743
|
function remoteBackends(reactor) {
|
|
708
|
-
return backendsToDescriptors(reactor).flatMap((d) =>
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
744
|
+
return backendsToDescriptors(reactor).flatMap((d) => {
|
|
745
|
+
const remote = reactor?.backends?.[d.name]?.remote;
|
|
746
|
+
if (d.kind !== "remote" || typeof d.remote?.url !== "string" || !remote) return [];
|
|
747
|
+
const { requestTimeoutMs, breaker, realtime } = remote;
|
|
748
|
+
return [{
|
|
749
|
+
name: d.name,
|
|
750
|
+
url: d.remote.url,
|
|
751
|
+
...requestTimeoutMs !== void 0 ? { requestTimeoutMs } : {},
|
|
752
|
+
...breaker !== void 0 ? { breaker } : {},
|
|
753
|
+
...realtime !== void 0 ? { realtime } : {}
|
|
754
|
+
}];
|
|
755
|
+
});
|
|
712
756
|
}
|
|
713
757
|
//#endregion
|
|
714
758
|
//#region src/reactor-config.ts
|
|
@@ -720,8 +764,9 @@ function remoteBackends(reactor) {
|
|
|
720
764
|
* single-sourced `reactor.protocol` — both projections read the same block, so
|
|
721
765
|
* client and server cannot diverge, and a contradicting pre-set env fails boot.
|
|
722
766
|
*/
|
|
723
|
-
/**
|
|
724
|
-
*
|
|
767
|
+
/** A switchboard host's own store. Prefers placement.primary, else
|
|
768
|
+
* "main"/"local", else the first. Connect refuses placement.primary: its
|
|
769
|
+
* reactor is {@link browserBackend}. */
|
|
725
770
|
function primaryBackend(reactor) {
|
|
726
771
|
const backends = reactor?.backends;
|
|
727
772
|
if (!backends) return void 0;
|
|
@@ -766,6 +811,14 @@ function reactorBlockToSwitchboardConfig(reactor) {
|
|
|
766
811
|
return layer;
|
|
767
812
|
}
|
|
768
813
|
const LOCAL_BACKEND_KINDS = /* @__PURE__ */ new Set(["in-process", "worker"]);
|
|
814
|
+
/** Connect's browser reactor: its first in-process or worker backend. */
|
|
815
|
+
function browserBackend(reactor) {
|
|
816
|
+
const entry = Object.entries(reactor?.backends ?? {}).find(([, backend]) => LOCAL_BACKEND_KINDS.has(backend.kind));
|
|
817
|
+
return entry ? {
|
|
818
|
+
...entry[1],
|
|
819
|
+
name: entry[0]
|
|
820
|
+
} : void 0;
|
|
821
|
+
}
|
|
769
822
|
/**
|
|
770
823
|
* Which reactor client the backend topology asks for:
|
|
771
824
|
* - local (in-process/worker) AND remote backends -> `router`
|
|
@@ -784,22 +837,40 @@ function reactorClientMode(reactor) {
|
|
|
784
837
|
const hasRemote = kinds.some((k) => k === "remote");
|
|
785
838
|
if (hasLocal && hasRemote) return "router";
|
|
786
839
|
if (hasRemote) return "remote";
|
|
787
|
-
return
|
|
840
|
+
return browserBackend(reactor)?.kind === "worker" ? "worker" : "in-process";
|
|
841
|
+
}
|
|
842
|
+
/** Served only when `newDrives` names a served remote backend: a local one
|
|
843
|
+
* is the default, and Connect refuses one it has no address for. */
|
|
844
|
+
function connectRouterSettings(reactor, served) {
|
|
845
|
+
const newDrives = reactor?.placement?.newDrives;
|
|
846
|
+
const { probeTimeoutMs, provisionalRouteMs } = reactor?.router ?? {};
|
|
847
|
+
const router = {
|
|
848
|
+
...newDrives !== void 0 && served.some((remote) => remote.name === newDrives) ? { newDrives } : {},
|
|
849
|
+
...probeTimeoutMs !== void 0 ? { probeTimeoutMs } : {},
|
|
850
|
+
...provisionalRouteMs !== void 0 ? { provisionalRouteMs } : {}
|
|
851
|
+
};
|
|
852
|
+
return Object.keys(router).length > 0 ? router : void 0;
|
|
788
853
|
}
|
|
789
854
|
/** Project the reactor block onto the Connect runtime config: protocol →
|
|
790
855
|
* connect.reactor (same shape), backend topology → instance.reactorWorker
|
|
791
|
-
* (
|
|
792
|
-
*
|
|
856
|
+
* (the browser reactor's kind), instance.reactorClient, and with a
|
|
857
|
+
* switchboard instance.remoteBackends and instance.router, workflows →
|
|
858
|
+
* app.workflowsEnabled. */
|
|
793
859
|
function projectReactorToConnect(reactor) {
|
|
794
860
|
const connect = {};
|
|
795
861
|
if (reactor?.protocol) connect.reactor = reactor.protocol;
|
|
796
|
-
const backend = primaryBackend(reactor);
|
|
797
862
|
const mode = reactorClientMode(reactor);
|
|
798
|
-
if (
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
863
|
+
if (mode !== void 0) {
|
|
864
|
+
const routed = mode === "router" || mode === "remote";
|
|
865
|
+
const served = routed ? remoteBackends(reactor) : [];
|
|
866
|
+
const router = routed ? connectRouterSettings(reactor, served) : void 0;
|
|
867
|
+
connect.instance = {
|
|
868
|
+
reactorWorker: browserBackend(reactor)?.kind === "worker",
|
|
869
|
+
reactorClient: mode,
|
|
870
|
+
...routed ? { remoteBackends: served } : {},
|
|
871
|
+
...router ? { router } : {}
|
|
872
|
+
};
|
|
873
|
+
}
|
|
803
874
|
if (reactor?.workflows !== void 0) connect.app = { workflowsEnabled: reactor.workflows };
|
|
804
875
|
return { connect };
|
|
805
876
|
}
|
|
@@ -1070,6 +1141,6 @@ function expectHost(input) {
|
|
|
1070
1141
|
return expectation;
|
|
1071
1142
|
}
|
|
1072
1143
|
//#endregion
|
|
1073
|
-
export { BUILTIN_ENV_NAMES, CONNECT_PLUGIN_OWNED_SLICES, CONNECT_RUNNER, HOST_NAME_MAX_LENGTH, HOST_NAME_MESSAGE, HOST_NAME_PATTERN, HostLoadError, ONE_SHOT_VERBS, ORIGIN_PLACEHOLDER, OUTPUTS_FILE, PlanError, PluginError, RunnerError, SWITCHBOARD_PROXY_PATHS, SpawnHostError, TOKEN_ESCAPE_KEY, TOKEN_KEYS, TokenResolutionError, applyChildWrapper, assertProtocolConsistency, backendToDescriptor, backendsToDescriptors, buildDriveDeclarationSchema, checkHost, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, clearRunRecord, collectTokenSites, compoundHostSchema, compoundOutputSource, compoundWiringSchema, computeOutputsHash, concatTokenSchema, declaredGenericCompoundHostSchema, declaredHostSchemas, defaultUserDataDir, defineHostSchemas, describeHostOutputs, describeMapElements, describeToken, driveAddressMessage, driveDeclarationSchema, drivesSchema, emitHostJsonSchema, emittedHostSchemas, entryActiveForVerb, envSitesOf, envTokenSchema, envTokenable, expectHost, explainDrivePlan, exportHost, findDeadConnectConfig, findNonStaticValue, findRemovedForms, findToken, forbidRef, formatPath, genericCompoundHostSchema, getVerb, hostExportSchema, hostNameSchema, hostSchemaIssues, hostTypeSatisfies, isBuiltinEnvName, isHtmlNavigation, isOriginPlaceholderUrl, isPidAlive, isSchemaLike, isStructuralMultiReactor, isSwitchboardProxyPath, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, lintHostImportGraph, lintHostImports, lintOutputsFile, listRunRecords, listVerbs, loadHost, loadProducers, makeHostSchemas, mapTokenSchema, memberForRef, mergeContributions, mergeDefaultDrives, mergeDrivePlan, normalizePluginEntries, normalizePluginEntry, originOrUrlSchema, outputRefsOf, outputSitesOf, outputTokenSchema, placeConnectDrives, placementKeyIssues, planCompound, pluginEntryObjectSchema, pluginEntrySchema, primaryBackend, probeHostsFolder, probeRun, processResolveEnv, producerOutputsSchemas, profileSchema, projectDriveId, projectDriveIdWith, projectDrivesIntoConnect, projectReactorToConnect, protocolConflicts, protocolEnv, reactorBackendKindSchema, reactorBackendSchema, reactorBlockToSwitchboardConfig, reactorClientMode, reactorHostSchema, reactorProtocolSchema, reactorSchema, readOutputsFileHash, readProjectName, readRunRecord, rebaseDriveUrl, ref, refKey, refineStartOrder, registerHostType, remoteBackendUrls, remoteBackends, renderTokens, resolveDriveDeclaration, resolveHostOutputs, resolveHostPlugins, resolveOrder, resolveOriginPlaceholders, resolvePluginContributions, resolveRunnerModule, resolveUserDataPlaceholders, runCompound, runObserveHook, runObserveHookSequential, runProvideHook, runRecordMemberSchema, runRecordOutputSource, runRecordSchema, runTransformHook, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, runnerOutputsSchema, scanHostImports, schemaAtPath, seedDrives, spawnHost, stripComments, substituteBuiltinEnv, switchboardOfDrive, toOriginPlaceholder, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, unwrapEscapes, validateDeclaredHost, validateHost, withOriginPlaceholders, writeRunRecord };
|
|
1144
|
+
export { BUILTIN_ENV_NAMES, CONNECT_PLUGIN_OWNED_SLICES, CONNECT_PRIMARY_MESSAGE, CONNECT_RUNNER, HOST_NAME_MAX_LENGTH, HOST_NAME_MESSAGE, HOST_NAME_PATTERN, HostLoadError, ONE_SHOT_VERBS, ORIGIN_PLACEHOLDER, OUTPUTS_FILE, PlanError, PluginError, RunnerError, SWITCHBOARD_PROXY_PATHS, SpawnHostError, TOKEN_ESCAPE_KEY, TOKEN_KEYS, TokenResolutionError, applyChildWrapper, assertProtocolConsistency, backendToDescriptor, backendsToDescriptors, browserBackend, buildDriveDeclarationSchema, checkHost, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, clearRunRecord, collectTokenSites, compoundHostSchema, compoundOutputSource, compoundWiringSchema, computeOutputsHash, concatTokenSchema, connectReactorIssues, declaredGenericCompoundHostSchema, declaredHostSchemas, defaultUserDataDir, defineHostSchemas, describeHostOutputs, describeMapElements, describeToken, driveAddressMessage, driveDeclarationSchema, drivesSchema, emitHostJsonSchema, emittedHostSchemas, entryActiveForVerb, envSitesOf, envTokenSchema, envTokenable, expectHost, explainDrivePlan, exportHost, findDeadConnectConfig, findNonStaticValue, findRemovedForms, findToken, forbidRef, formatPath, genericCompoundHostSchema, getVerb, hostExportSchema, hostNameSchema, hostSchemaIssues, hostTypeSatisfies, isBuiltinEnvName, isHtmlNavigation, isOriginPlaceholderUrl, isPidAlive, isSchemaLike, isStructuralMultiReactor, isSwitchboardProxyPath, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, lintHostImportGraph, lintHostImports, lintOutputsFile, listRunRecords, listVerbs, loadHost, loadProducers, makeHostSchemas, mapTokenSchema, memberForRef, mergeContributions, mergeDefaultDrives, mergeDrivePlan, normalizePluginEntries, normalizePluginEntry, originOrUrlSchema, outputRefsOf, outputSitesOf, outputTokenSchema, placeConnectDrives, placementKeyIssues, planCompound, pluginEntryObjectSchema, pluginEntrySchema, primaryBackend, probeHostsFolder, probeRun, processResolveEnv, producerOutputsSchemas, profileSchema, projectDriveId, projectDriveIdWith, projectDrivesIntoConnect, projectReactorToConnect, protocolConflicts, protocolEnv, reactorBackendKindSchema, reactorBackendSchema, reactorBlockToSwitchboardConfig, reactorClientMode, reactorHostSchema, reactorProtocolSchema, reactorSchema, readOutputsFileHash, readProjectName, readRunRecord, rebaseDriveUrl, ref, refKey, refineConnectReactor, refineStartOrder, registerHostType, remoteBackendUrls, remoteBackends, renderTokens, resolveDriveDeclaration, resolveHostOutputs, resolveHostPlugins, resolveOrder, resolveOriginPlaceholders, resolvePluginContributions, resolveRunnerModule, resolveUserDataPlaceholders, runCompound, runObserveHook, runObserveHookSequential, runProvideHook, runRecordMemberSchema, runRecordOutputSource, runRecordSchema, runTransformHook, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, runnerOutputsSchema, scanHostImports, schemaAtPath, seedDrives, spawnHost, stripComments, substituteBuiltinEnv, switchboardOfDrive, toOriginPlaceholder, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, unwrapEscapes, validateDeclaredHost, validateHost, withOriginPlaceholders, writeRunRecord };
|
|
1074
1145
|
|
|
1075
1146
|
//# sourceMappingURL=index.mjs.map
|