@powerhousedao/host-core 6.2.3-dev.76 → 6.2.3-dev.78
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-Gjt5rBfF.mjs → compound-Cfqa5Jal.mjs} +22 -35
- package/dist/compound-Cfqa5Jal.mjs.map +1 -0
- package/dist/{compound-DlaK_sWa.d.mts → compound-DXcOFNcC.d.mts} +22 -306
- package/dist/compound-DXcOFNcC.d.mts.map +1 -0
- package/dist/{env-substitution-BjpuE5fm.mjs → env-substitution-qS_lDcbn.mjs} +4 -18
- package/dist/env-substitution-qS_lDcbn.mjs.map +1 -0
- package/dist/{host-schemas-mqOYNGot.d.mts → host-schemas-B6DsXA0Y.d.mts} +12 -305
- package/dist/host-schemas-B6DsXA0Y.d.mts.map +1 -0
- package/dist/index.d.mts +21 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +105 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{plugins-XL6WsvTL.d.mts → plugins-EFYLaYQi.d.mts} +2 -2
- package/dist/{plugins-XL6WsvTL.d.mts.map → plugins-EFYLaYQi.d.mts.map} +1 -1
- package/dist/plugins.d.mts +1 -1
- package/dist/projection.d.mts +11 -2
- package/dist/projection.d.mts.map +1 -1
- package/dist/projection.mjs +18 -2
- package/dist/projection.mjs.map +1 -1
- package/dist/runners/compound.d.mts +3 -35
- package/dist/runners/compound.d.mts.map +1 -1
- package/dist/runners/compound.mjs +1 -1
- package/dist/schema.d.mts +18 -3
- package/dist/schema.d.mts.map +1 -1
- package/dist/schema.mjs +64 -2
- package/dist/schema.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/compound-DlaK_sWa.d.mts.map +0 -1
- package/dist/compound-Gjt5rBfF.mjs.map +0 -1
- package/dist/env-substitution-BjpuE5fm.mjs.map +0 -1
- package/dist/host-schemas-mqOYNGot.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-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mB;;KAGpC,cAAc,EAAE,cAAc;KAC9B,eAAe,EAAE,cAAc;;;iBAQ3B,mBACd,cACA,QAAQ,EAAE,UACT;;;iBASa,sBAAsB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ReactorBackendKind, $t as itemTokenSchema, A as knownVerbIssues, At as ConcatToken, B as envSitesOf, Bt as TOKEN_KEYS, C as RunnerVerb, Ct as reactorHostSchema, D as hostSchemaIssues, Dt as runnerBaseSchema, E as getVerb, Et as refineStartOrder, F as DeclaredIssue, Ft as OutputPath, G as ChildWrapper, Gt as TokenMode, H as outputSitesOf, Ht as Token, I as OutputRef, It as OutputToken, J as CompoundWiring, Jt as envTokenSchema, K as CompoundHost, Kt as TokenableSchema, L as OutputsSchemaLookup, Lt as RecordMapToken, M as resolveRunnerModule, Mt as ItemToken, N as validateDeclaredHost, Nt as KeyToken, O as isSchemaLike, Ot as runnerKindSchema, P as validateHost, Pt as MapToken, Q as ReactorBackend, Qt as isToken, R as checkOutputPaths, Rt as RefFn, S as RunnerModule, St as reactorBackendSchema, T as ValidateHostOptions, Tt as reactorSchema, U as refKey, Ut as TokenFor, V as outputRefsOf, Vt as Template, W as schemaAtPath, Wt as TokenKey, X as HostSchemas, Xt as findToken, Y as HostDefinition, Yt as envTokenable, Z as Profile, Zt as forbidRef, _ as HostSchemaLike, _t as emittedHostSchemas, a as RunnerHandleData, an as tokenSchema, at as ReactorRemoteConfig, b as RunnerError, bt as profileSchema, c as toStartedHandle, ct as RunnerKind, d as BootCheckContext, dt as compoundHostSchema, en as keyTokenSchema, et as ReactorConfig, f as BootIssue, ft as compoundWiringSchema, g as HostSchemaIssues, gt as emitHostJsonSchema, h as HostSchemaIssue, ht as defineHostSchemas, i as RunnerHandle, in as tokenKeyOf, it as ReactorProtocol, j as listVerbs, jt as EnvToken, k as kindShapeIssues, kt as ArrayMapToken, l as MemberDraft, lt as childWrapperSchema, m as DeclaredHostOptions, mt as declaredHostSchemas, n as RunCompoundResult, nn as outputTokenSchema, nt as ReactorHostInput, o as StartedHandle, on as tokenable, ot as ReactorStorageConfig, p as CONNECT_RUNNER, pt as declaredGenericCompoundHostSchema, q as CompoundHostInput, qt as concatTokenSchema, r as runCompound, rn as ref, rt as ReactorPackageConfig, s as runnerHandleSchema, st as RunnerBase, t as RunCompoundOptions, tn as mapTokenSchema, tt as ReactorHost, u as applyChildWrapper, ut as childrenSchema, v as ONE_SHOT_VERBS, vt as genericCompoundHostSchema, w as SchemaIssue, wt as reactorProtocolSchema, x as RunnerIssue, xt as reactorBackendKindSchema, y as RunnerContext, yt as makeHostSchemas, z as checkTokenSites, zt as TOKEN_ESCAPE_KEY } from "./compound-DXcOFNcC.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { PHConnectDefaultDrive, PHConnectRuntimeConfig } from "@powerhousedao/shared/clis";
|
|
4
4
|
//#region src/host-loader.d.ts
|
|
@@ -389,6 +389,25 @@ interface CheckHostResult {
|
|
|
389
389
|
/** The `ph run` pipeline up to the verb, collecting every issue; starts nothing. */
|
|
390
390
|
export declare function checkHost(name: string, options: CheckHostOptions): Promise<CheckHostResult>;
|
|
391
391
|
//#endregion
|
|
392
|
+
//#region src/host-export-schema.d.ts
|
|
393
|
+
/** `ph host export`: a declared host plus its members, keyed by folder. */
|
|
394
|
+
export declare const hostExportSchema: z.ZodObject<{
|
|
395
|
+
format: z.ZodLiteral<"ph-host-export">;
|
|
396
|
+
version: z.ZodLiteral<1>;
|
|
397
|
+
project: z.ZodObject<{
|
|
398
|
+
name: z.ZodString;
|
|
399
|
+
root: z.ZodString;
|
|
400
|
+
}, z.core.$strict>;
|
|
401
|
+
name: z.ZodString;
|
|
402
|
+
host: z.ZodCustom<HostDefinition, HostDefinition>;
|
|
403
|
+
members: z.ZodRecord<z.ZodString, z.ZodCustom<HostDefinition, HostDefinition>>;
|
|
404
|
+
}, z.core.$strict>;
|
|
405
|
+
type HostExport = z.input<typeof hostExportSchema>;
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/host-export.d.ts
|
|
408
|
+
/** A host as declared and every member it reaches, raw `loadHost` bodies. */
|
|
409
|
+
export declare function exportHost(projectRoot: string, name: string): Promise<HostExport>;
|
|
410
|
+
//#endregion
|
|
392
411
|
//#region src/placeholders.d.ts
|
|
393
412
|
/**
|
|
394
413
|
* `${userData}` resolution for host files (desktop shape): storage paths in a
|
|
@@ -1197,6 +1216,6 @@ interface MemberInput extends Omit<ExpectHostInput, "members" | "plan"> {
|
|
|
1197
1216
|
*/
|
|
1198
1217
|
export declare function expectHost(input: ExpectHostInput): HostExpectation;
|
|
1199
1218
|
//#endregion
|
|
1200
|
-
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, type HostDefinition, type HostExit, type HostExpectation, 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 MemberExpectation, type MemberInput, type MergedContribution, type NormalizedPluginEntry, ONE_SHOT_VERBS, type Observe, type OutputLookup, type OutputPath, type OutputRef, type OutputSource, type OutputToken, type OutputsSchemaLookup, type OwnedConfigSlice, type PHHost, type PHHostOutputs, 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, type SchemaIssue, type SeedResult, type SelfMembers, type SpawnHostOptions, type SpawnHostPhase, type SpawnedHost, type StartedHandle, type SwitchboardReactorProjection, 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, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, compoundHostSchema, compoundWiringSchema, concatTokenSchema, declaredGenericCompoundHostSchema, declaredHostSchemas, defineHostSchemas, emitHostJsonSchema, emittedHostSchemas, envSitesOf, envTokenSchema, envTokenable, findToken, forbidRef, genericCompoundHostSchema, getVerb, hostSchemaIssues, isSchemaLike, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, listVerbs, makeHostSchemas, mapTokenSchema, outputRefsOf, outputSitesOf, outputTokenSchema, profileSchema, reactorBackendKindSchema, reactorBackendSchema, reactorHostSchema, reactorProtocolSchema, reactorSchema, ref, refKey, refineStartOrder, resolveRunnerModule, runCompound, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, schemaAtPath, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, validateDeclaredHost, validateHost };
|
|
1219
|
+
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, 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, type Observe, type OutputLookup, type OutputPath, type OutputRef, type OutputSource, type OutputToken, type OutputsSchemaLookup, type OwnedConfigSlice, type PHHost, type PHHostOutputs, 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, type SchemaIssue, type SeedResult, type SelfMembers, type SpawnHostOptions, type SpawnHostPhase, type SpawnedHost, type StartedHandle, type SwitchboardReactorProjection, 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, emitHostJsonSchema, emittedHostSchemas, envSitesOf, envTokenSchema, envTokenable, findToken, forbidRef, genericCompoundHostSchema, getVerb, hostSchemaIssues, isSchemaLike, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, listVerbs, makeHostSchemas, mapTokenSchema, outputRefsOf, outputSitesOf, outputTokenSchema, profileSchema, reactorBackendKindSchema, reactorBackendSchema, reactorHostSchema, reactorProtocolSchema, reactorSchema, ref, refKey, refineStartOrder, resolveRunnerModule, runCompound, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, schemaAtPath, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, validateDeclaredHost, validateHost };
|
|
1201
1220
|
export {};
|
|
1202
1221
|
//# 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/placeholders.ts","../src/host-types.ts","../src/plugins.ts","../src/plugins-resolve.ts","../src/drive-schema.ts","../src/drives.ts","../src/reactor-config.ts","../src/backend-projection.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,s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BACS,OAAO,gBACP,oBACA,OAAO;;;;;;;;;wBA0HE,UACpB,SAAS,mBACR,QAAQ;;;;KCvLC;UAEK;EACf,OAAO;;EAEP;;EAEA;EACA;EACA;;;;;;;;;UCJe;EACf;EACA;;;qBAIW,mCAAmC;wBAKhC,iBAAiB,eAAe,cAAc;;;wBAe9C,qBAAqB,GAAG,OAAO,GAAG,KAAK,aAAa;;;;;;;;;;;;;;;;KCIxD;EAEN;EACA;;;EAGA;;;;;EAIA;EAAuB;;UAEZ;EACf,OAAO,KAAK,YAAY;;UAGT;;EAEf,UAAU;;EAEV,MAAM,SAAS;;;EAGf,WAAW;;EAEX;;qBAGW,6BAA6B;;WAE/B;IAAW;IAAc;;EAElC,YAAY,iBAAiB;IAAW;IAAc;;;;;;;;;wBA4DxC,oBACd,eACA,eAAe;;UAqFA;;EAEf;IAAoB;IAAa;;;;UAIlB;;EAEf;;EAEA;;UAGe,mBAAmB;;;;EAIlC,MAAM;EACN,UAAU;;EAEV;;;;EAIA,OAAO,SAAS,eAAe;;UA6YhB;;;;;EAKf,WAAW;;;;;;;;;;;;;;wBAeG,mBAAmB,GAAG,MAAM,GAAG,SAAS,iBAAiB;wBACzD,mBAAmB,GACjC,MAAM,GACN,SAAS,gBACT,SAAS,iBACR,mBAAmB;;;UCrmBL;EACf;;EAEA,KAAK,SAAS;;EAEd;;EAEA,UAAU;;UAGK,sBAAsB;EACrC;;UAGe;EACf,QAAQ;;EAER,UAAU;;;wBAIU,UACpB,cACA,SAAS,mBACR,QAAQ;;;;;;;;;;;;;;
|
|
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/reactor-config.ts","../src/backend-projection.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,EAAA;;;;;;;;;GAOhC,EAAA,KAAA;qBAEW,iBAAe,EAAA;;;;;;;;;;;;;;;;;;;;;;;GAc1B,EAAA,KAAA;KAEU,YAAY,EAAE,aAAa;KAC3B,kBAAkB,EAAE,aAAa;;;;;;;KCtBjC;EACN;;EACA;EAAiB,QAAQ;;EACzB;EAAgB,QAAQ;;EACxB;EAAmB,QAAQ;;KAE5B,MAAM,SAAS;wBASJ,cACd,oBACA,kBACA,MAAK,MACJ;;wBAea,eACd,oBACA,MAAK,MACJ;;;wBAqBa,gBAAgB;wBAYhB,eAAe,oBAAoB,QAAQ;wBAO3C,eACd,oBACA,kBACA,MAAK;wBASS,WAAW;;;;;;;;;;wBAmBX,SACd,oBACA,kBACA,qBACA,MAAK,MACJ;;;UCpHc;EACf;;EAEA;;EAEA;EACA;;EAEA,MAAM;;EAEN;EAC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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,9 +1,10 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as resolveHostOutputs, $t as itemTokenSchema, A as findNonStaticValue, At as genericCompoundHostSchema, B as ONE_SHOT_VERBS, Bt as runnerKindSchema, C as writeRunRecord, Cn as runProvideHook, Ct as compoundHostSchema, D as OUTPUTS_FILE, Dt as defineHostSchemas, E as HostLoadError, Et as declaredHostSchemas, F as probeHostsFolder, Ft as reactorHostSchema, G as kindShapeIssues, Gt as TOKEN_ESCAPE_KEY, H as getVerb, Ht as driveDeclarationSchema, I as readOutputsFileHash, It as reactorProtocolSchema, J as resolveRunnerModule, Jt as envTokenSchema, K as knownVerbIssues, Kt as TOKEN_KEYS, L as scanHostImports, Lt as reactorSchema, M as lintHostImports, Mt as profileSchema, N as lintOutputsFile, Nt as reactorBackendKindSchema, O as computeOutputsHash, Ot as emitHostJsonSchema, P as loadHost, Pt as reactorBackendSchema, Q as describeMapElements, Qt as isToken, R as stripComments, Rt as refineStartOrder, S as readRunRecord, Sn as runObserveHookSequential, St as childrenSchema, T as runRecordSchema, Tt as declaredGenericCompoundHostSchema, U as hostSchemaIssues, Ut as drivesSchema, V as RunnerError, Vt as buildDriveDeclarationSchema, W as isSchemaLike, Wt as projectDriveIdWith, X as validateHost, Xt as findToken, Y as validateDeclaredHost, Yt as envTokenable, Z as TokenResolutionError, Zt as forbidRef, _ as clearRunRecord, _n as pluginEntryObjectSchema, _t as formatPath, a as takesCspRegistrySync, an as tokenSchema, at as isBuiltinEnvName, b as probeRun, bn as resolveOrder, bt as unwrapEscapes, c as compoundOutputSource, cn as findDeadConnectConfig, ct as checkOutputPaths, d as producerOutputsSchemas, dn as PluginError, dt as outputRefsOf, en as keyTokenSchema, et as unsetEnvMessage, f as runRecordOutputSource, fn as entryActiveForVerb, ft as outputSitesOf, g as applyChildWrapper, gn as normalizePluginEntry, gt as describeToken, h as resolveUserDataPlaceholders, hn as normalizePluginEntries, ht as collectTokenSites, i as runCompound, in as tokenKeyOf, it as BUILTIN_ENV_NAMES, j as lintHostImportGraph, jt as makeHostSchemas, k as describeHostOutputs, kt as emittedHostSchemas, l as loadProducers, ln as resolveHostPlugins, lt as checkTokenSites, m as defaultUserDataDir, mn as mergeContributions, mt as schemaAtPath, n as memberVerbOf, nn as outputTokenSchema, nt as memberForRef, o as runnerHandleSchema, on as tokenable, ot as substituteBuiltinEnv, p as runnerOutputsSchema, pn as hostTypeSatisfies, pt as refKey, q as listVerbs, qt as concatTokenSchema, r as prepareMember, rn as ref, rt as planCompound, s as toStartedHandle, sn as CONNECT_PLUGIN_OWNED_SLICES, st as findRemovedForms, t as compoundStartVerb, tn as mapTokenSchema, tt as PlanError, u as processResolveEnv, un as resolvePluginContributions, ut as envSitesOf, v as isPidAlive, vn as pluginEntrySchema, vt as isPlainObject, w as runRecordMemberSchema, wn as runTransformHook, wt as compoundWiringSchema, x as readProjectName, xn as runObserveHook, xt as childWrapperSchema, y as listRunRecords, yn as registerHostType, yt as renderTokens, z as CONNECT_RUNNER, zt as runnerBaseSchema } from "./compound-Cfqa5Jal.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
|
+
import { z } from "zod";
|
|
7
8
|
import { spawn } from "node:child_process";
|
|
8
9
|
import { DRIVE_ICON_MAX_BYTES, resolveImageRef } from "@powerhousedao/shared/connect/image-ref";
|
|
9
10
|
//#region src/spawn-host.ts
|
|
@@ -452,6 +453,108 @@ function issuer(result, file) {
|
|
|
452
453
|
};
|
|
453
454
|
}
|
|
454
455
|
//#endregion
|
|
456
|
+
//#region src/host-export-schema.ts
|
|
457
|
+
function isRecord$1(value) {
|
|
458
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
459
|
+
}
|
|
460
|
+
function childFolders$1(host) {
|
|
461
|
+
if (!isRecord$1(host) || !isRecord$1(host.children)) return [];
|
|
462
|
+
return Object.entries(host.children).flatMap(([key, child]) => isRecord$1(child) && typeof child.host === "string" ? [[key, child.host]] : []);
|
|
463
|
+
}
|
|
464
|
+
const declaredHostSchema = z.custom().superRefine((host, ctx) => {
|
|
465
|
+
const result = (isRecord$1(host) && "children" in host ? declaredHostSchemas.compoundHostSchema : declaredHostSchemas.reactorHostSchema).safeParse(host);
|
|
466
|
+
if (result.success) return;
|
|
467
|
+
for (const issue of result.error.issues) ctx.addIssue({
|
|
468
|
+
code: "custom",
|
|
469
|
+
message: issue.message,
|
|
470
|
+
path: issue.path
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
/** `ph host export`: a declared host plus its members, keyed by folder. */
|
|
474
|
+
const hostExportSchema = z.strictObject({
|
|
475
|
+
format: z.literal("ph-host-export"),
|
|
476
|
+
version: z.literal(1),
|
|
477
|
+
project: z.strictObject({
|
|
478
|
+
name: z.string().min(1),
|
|
479
|
+
root: z.string().min(1)
|
|
480
|
+
}),
|
|
481
|
+
name: z.string().min(1),
|
|
482
|
+
host: declaredHostSchema,
|
|
483
|
+
members: z.record(z.string(), declaredHostSchema)
|
|
484
|
+
}).superRefine((value, ctx) => {
|
|
485
|
+
const reached = /* @__PURE__ */ new Set();
|
|
486
|
+
const pending = [[["host"], value.host]];
|
|
487
|
+
for (let next = pending.shift(); next; next = pending.shift()) {
|
|
488
|
+
const [at, host] = next;
|
|
489
|
+
for (const [key, folder] of childFolders$1(host)) {
|
|
490
|
+
if (!(folder in value.members)) {
|
|
491
|
+
ctx.addIssue({
|
|
492
|
+
code: "custom",
|
|
493
|
+
path: [
|
|
494
|
+
...at,
|
|
495
|
+
"children",
|
|
496
|
+
key,
|
|
497
|
+
"host"
|
|
498
|
+
],
|
|
499
|
+
message: `Member folder "${folder}" is missing from members.`
|
|
500
|
+
});
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
if (reached.has(folder)) continue;
|
|
504
|
+
reached.add(folder);
|
|
505
|
+
pending.push([["members", folder], value.members[folder]]);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
for (const folder of Object.keys(value.members)) {
|
|
509
|
+
if (reached.has(folder)) continue;
|
|
510
|
+
ctx.addIssue({
|
|
511
|
+
code: "custom",
|
|
512
|
+
path: ["members", folder],
|
|
513
|
+
message: `Member "${folder}" is not reached from the host's children.`
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/host-export.ts
|
|
519
|
+
function checkHint(name) {
|
|
520
|
+
return `Run \`ph host check ${name}\`.`;
|
|
521
|
+
}
|
|
522
|
+
function childFolders(host, name) {
|
|
523
|
+
if (!("children" in host)) return [];
|
|
524
|
+
const parsed = declaredHostSchemas.childrenSchema.safeParse(host.children);
|
|
525
|
+
if (!parsed.success) throw new HostLoadError(`hosts/${name}/host.js: invalid \`children\`:\n${z.prettifyError(parsed.error)}`, checkHint(name));
|
|
526
|
+
return Object.values(parsed.data).map((child) => child.host);
|
|
527
|
+
}
|
|
528
|
+
/** A host as declared and every member it reaches, raw `loadHost` bodies. */
|
|
529
|
+
async function exportHost(projectRoot, name) {
|
|
530
|
+
const root = path.resolve(projectRoot);
|
|
531
|
+
const { host } = await loadHost(root, name);
|
|
532
|
+
const members = {};
|
|
533
|
+
const visit = async (folders) => {
|
|
534
|
+
for (const folder of folders) {
|
|
535
|
+
if (folder in members) continue;
|
|
536
|
+
const member = (await loadHost(root, folder)).host;
|
|
537
|
+
members[folder] = member;
|
|
538
|
+
await visit(childFolders(member, folder));
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
await visit(childFolders(host, name));
|
|
542
|
+
const envelope = {
|
|
543
|
+
format: "ph-host-export",
|
|
544
|
+
version: 1,
|
|
545
|
+
project: {
|
|
546
|
+
name: readProjectName(root),
|
|
547
|
+
root
|
|
548
|
+
},
|
|
549
|
+
name,
|
|
550
|
+
host,
|
|
551
|
+
members
|
|
552
|
+
};
|
|
553
|
+
const parsed = hostExportSchema.safeParse(JSON.parse(JSON.stringify(envelope)));
|
|
554
|
+
if (!parsed.success) throw new HostLoadError(`hosts/${name}/host.js: the export is not a valid host export:\n${z.prettifyError(parsed.error)}`, checkHint(name));
|
|
555
|
+
return envelope;
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
455
558
|
//#region src/drives.ts
|
|
456
559
|
const sha256Hex = (input) => crypto.createHash("sha256").update(input).digest("hex");
|
|
457
560
|
function projectDriveId(projectRoot, slug) {
|
|
@@ -904,6 +1007,6 @@ function expectHost(input) {
|
|
|
904
1007
|
return expectation;
|
|
905
1008
|
}
|
|
906
1009
|
//#endregion
|
|
907
|
-
export { BUILTIN_ENV_NAMES, CONNECT_PLUGIN_OWNED_SLICES, CONNECT_RUNNER, HostLoadError, ONE_SHOT_VERBS, OUTPUTS_FILE, PlanError, PluginError, RunnerError, SpawnHostError, TOKEN_ESCAPE_KEY, TOKEN_KEYS, TokenResolutionError, assertProtocolConsistency, backendToDescriptor, backendsToDescriptors, buildDriveDeclarationSchema, checkHost, checkOutputPaths, checkTokenSites, childWrapperSchema, childrenSchema, clearRunRecord, collectTokenSites, compoundHostSchema, compoundOutputSource, compoundWiringSchema, computeOutputsHash, concatTokenSchema, declaredGenericCompoundHostSchema, declaredHostSchemas, defaultUserDataDir, defineHostSchemas, describeHostOutputs, describeMapElements, describeToken, driveDeclarationSchema, drivesSchema, emitHostJsonSchema, emittedHostSchemas, entryActiveForVerb, envSitesOf, envTokenSchema, envTokenable, expectHost, explainDrivePlan, findDeadConnectConfig, findNonStaticValue, findRemovedForms, findToken, forbidRef, formatPath, genericCompoundHostSchema, getVerb, hostSchemaIssues, hostTypeSatisfies, isBuiltinEnvName, isPidAlive, isSchemaLike, isStructuralMultiReactor, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, lintHostImportGraph, lintHostImports, lintOutputsFile, listRunRecords, listVerbs, loadHost, loadProducers, makeHostSchemas, mapTokenSchema, memberForRef, mergeContributions, mergeDefaultDrives, mergeDrivePlan, normalizePluginEntries, normalizePluginEntry, outputRefsOf, outputSitesOf, outputTokenSchema, planCompound, pluginEntryObjectSchema, pluginEntrySchema, primaryBackend, probeHostsFolder, probeRun, processResolveEnv, producerOutputsSchemas, profileSchema, projectDriveId, projectDriveIdWith, projectDrivesIntoConnect, projectReactorToConnect, projectReactorToSwitchboard, protocolConflicts, protocolEnv, reactorBackendKindSchema, reactorBackendSchema, reactorClientMode, reactorHostSchema, reactorProtocolSchema, reactorSchema, readOutputsFileHash, readProjectName, readRunRecord, rebaseDriveUrl, ref, refKey, refineStartOrder, registerHostType, remoteBackendUrls, renderTokens, resolveDriveDeclaration, resolveHostOutputs, resolveHostPlugins, resolveOrder, resolvePluginContributions, resolveRunnerModule, resolveUserDataPlaceholders, runCompound, runObserveHook, runObserveHookSequential, runProvideHook, runRecordMemberSchema, runRecordOutputSource, runRecordSchema, runTransformHook, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, runnerOutputsSchema, scanHostImports, schemaAtPath, seedDrives, spawnHost, stripComments, substituteBuiltinEnv, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, unwrapEscapes, validateDeclaredHost, validateHost, writeRunRecord };
|
|
1010
|
+
export { BUILTIN_ENV_NAMES, CONNECT_PLUGIN_OWNED_SLICES, CONNECT_RUNNER, HostLoadError, ONE_SHOT_VERBS, OUTPUTS_FILE, PlanError, PluginError, RunnerError, 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, driveDeclarationSchema, drivesSchema, emitHostJsonSchema, emittedHostSchemas, entryActiveForVerb, envSitesOf, envTokenSchema, envTokenable, expectHost, explainDrivePlan, exportHost, findDeadConnectConfig, findNonStaticValue, findRemovedForms, findToken, forbidRef, formatPath, genericCompoundHostSchema, getVerb, hostExportSchema, hostSchemaIssues, hostTypeSatisfies, isBuiltinEnvName, isPidAlive, isSchemaLike, isStructuralMultiReactor, isToken, itemTokenSchema, keyTokenSchema, kindShapeIssues, knownVerbIssues, lintHostImportGraph, lintHostImports, lintOutputsFile, listRunRecords, listVerbs, loadHost, loadProducers, makeHostSchemas, mapTokenSchema, memberForRef, mergeContributions, mergeDefaultDrives, mergeDrivePlan, normalizePluginEntries, normalizePluginEntry, outputRefsOf, outputSitesOf, outputTokenSchema, planCompound, pluginEntryObjectSchema, pluginEntrySchema, primaryBackend, probeHostsFolder, probeRun, processResolveEnv, producerOutputsSchemas, profileSchema, projectDriveId, projectDriveIdWith, projectDrivesIntoConnect, projectReactorToConnect, projectReactorToSwitchboard, protocolConflicts, protocolEnv, reactorBackendKindSchema, reactorBackendSchema, reactorClientMode, reactorHostSchema, reactorProtocolSchema, reactorSchema, readOutputsFileHash, readProjectName, readRunRecord, rebaseDriveUrl, ref, refKey, refineStartOrder, registerHostType, remoteBackendUrls, renderTokens, resolveDriveDeclaration, resolveHostOutputs, resolveHostPlugins, resolveOrder, resolvePluginContributions, resolveRunnerModule, resolveUserDataPlaceholders, runCompound, runObserveHook, runObserveHookSequential, runProvideHook, runRecordMemberSchema, runRecordOutputSource, runRecordSchema, runTransformHook, runnerBaseSchema, runnerHandleSchema, runnerKindSchema, runnerOutputsSchema, scanHostImports, schemaAtPath, seedDrives, spawnHost, stripComments, substituteBuiltinEnv, toStartedHandle, tokenKeyOf, tokenSchema, tokenable, unwrapEscapes, validateDeclaredHost, validateHost, writeRunRecord };
|
|
908
1011
|
|
|
909
1012
|
//# sourceMappingURL=index.mjs.map
|