@powerhousedao/shared 6.2.3-dev.56 → 6.2.3-dev.57

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.
@@ -1 +1 @@
1
- {"version":3,"file":"types-BZBiwi6I.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;;;;;;;;;;;;cAaA;cAGA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAYA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW,iBAAiB;cAuBjB,gBAAgB;;;KCzVjB,iCAAiC;KACjC,wBAAwB;KACxB,mBAAmB;KACnB,WAAW;KAOX;KAGA;EACV;EACA;EACA,WAAW;EACX;;KAGU;EACV;EACA;;KAGU;EACV;EACA;EACA;;KAGU;;EAEV;;EAEA;EACA;EACA;;EAEA;;KAGU,wBACR,8BACA;KAEQ;EACV;EACA;EACA;;KAGU;EACV,SAAS;EACT,QAAQ;;KAGE;EACV;EACA,gBAAgB;EAChB,mBAAmB;EACnB,WAAW;;KAGD;EACV;EACA;EACA;EAGA;EAKA;;KAGU;;EAEV;;KAGU;EACV;;EAEA;;KAGU;;EAEV;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;KAGU;EACV,UAAU;EACV,QAAQ;;KAGE;EACV;EACA;EACA;;EAEA;;EAEA;;EAEA,WAAW;;KAGD;;EAEV;;EAEA;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV;EACA;;EAEA;;;;KAKU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV,eAAe;;EAEf;;EAEA;;;;;;;;;;KAWU;EAEN;EAAgB;;KAEV;;KAQA;EACV,YAAY;EACZ,SAAS;EACT;EACA;IACE;;;IAGA;IACA;MAAe;MAAqB;;IACpC;MACE;MACA,UAAU;;;;KAKJ;EACV;EACA;EACA;EACA;;;;;;;;;KAUU;;EAEV,QAAQ;;EAER,QAAQ;EACR;;;KAIU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;EAER,gBAAgB;;EAEhB;IACE;;;;;EASF;;;;;;;;;;;;KAaU;EACV,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,iBAAiB;;EAEjB,2BAA2B;;KAGjB;EACV,WAAW;EACX,MAAM;EACN,KAAK;EACL,WAAW;EACX,SAAS;EACT,SAAS;EACT,SAAS;EACT,YAAY;EACZ,WAAW;EACX,UAAU;EACV,MAAM;;;KAII;;;EAGV;;EAEA;;EAEA;;KAGU;EAEV,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;IACE;IACA;MAIM;MACA;;IAEN;MACE;MACA;MACA;;;EAGJ;IACE;IACA;IACA,SAAS;;EAEX;IACE;MACE;;IAEF;;EAEF;IACE;IACA;IACA;IACA;;EAEF,WAAW;EACX;IACE;IACA;IACA;;EAIF;IACE;;EAEF;EACA,UAAU;;;;cC2eC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBzB,EAAA,KAAA;;;KC40BU,WAAW,EAAE,aAAa"}
1
+ {"version":3,"file":"types-BZBiwi6I.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;;;;;;;;;;;;cAaA;cAGA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAeA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW,iBAAiB;cAuBjB,gBAAgB;;;KC5VjB,iCAAiC;KACjC,wBAAwB;KACxB,mBAAmB;KACnB,WAAW;KAOX;KAGA;EACV;EACA;EACA,WAAW;EACX;;KAGU;EACV;EACA;;KAGU;EACV;EACA;EACA;;KAGU;;EAEV;;EAEA;EACA;EACA;;EAEA;;KAGU,wBACR,8BACA;KAEQ;EACV;EACA;EACA;;KAGU;EACV,SAAS;EACT,QAAQ;;KAGE;EACV;EACA,gBAAgB;EAChB,mBAAmB;EACnB,WAAW;;KAGD;EACV;EACA;EACA;EAGA;EAKA;;KAGU;;EAEV;;KAGU;EACV;;EAEA;;KAGU;;EAEV;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;KAGU;EACV,UAAU;EACV,QAAQ;;KAGE;EACV;EACA;EACA;;EAEA;;EAEA;;EAEA,WAAW;;KAGD;;EAEV;;EAEA;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV;EACA;;EAEA;;;;KAKU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV,eAAe;;EAEf;;EAEA;;;;;;;;;;KAWU;EAEN;EAAgB;;KAEV;;KAQA;EACV,YAAY;EACZ,SAAS;EACT;EACA;IACE;;;IAGA;IACA;MAAe;MAAqB;;IACpC;MACE;MACA,UAAU;;;;KAKJ;EACV;EACA;EACA;EACA;;;;;;;;;KAUU;;EAEV,QAAQ;;EAER,QAAQ;EACR;;;KAIU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;EAER,gBAAgB;;EAEhB;IACE;;;;;EASF;;;;;;;;;;;;KAaU;EACV,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,iBAAiB;;EAEjB,2BAA2B;;KAGjB;EACV,WAAW;EACX,MAAM;EACN,KAAK;EACL,WAAW;EACX,SAAS;EACT,SAAS;EACT,SAAS;EACT,YAAY;EACZ,WAAW;EACX,UAAU;EACV,MAAM;;;KAII;;;EAGV;;EAEA;;EAEA;;KAGU;EAEV,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;IACE;IACA;MAIM;MACA;;IAEN;MACE;MACA;MACA;;;EAGJ;IACE;IACA;IACA,SAAS;;EAEX;IACE;MACE;;IAEF;;EAEF;IACE;IACA;IACA;IACA;;EAEF,WAAW;EACX;IACE;IACA;IACA;;EAIF;IACE;;EAEF;EACA,UAAU;;;;cC2eC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBzB,EAAA,KAAA;;;KC40BU,WAAW,EAAE,aAAa"}
@@ -0,0 +1,9 @@
1
+ //#region constants.d.ts
2
+ declare const PACKAGES_DEPENDENCIES: readonly ["@powerhousedao/builder-tools", "@powerhousedao/clint", "@powerhousedao/codegen", "@powerhousedao/common", "@powerhousedao/config", "@powerhousedao/design-system", "@powerhousedao/desktop", "@powerhousedao/host-core", "document-drive", "document-model", "@powerhousedao/opentelemetry-instrumentation-reactor", "@powerhousedao/pieces-framework", "@powerhousedao/reactor", "@powerhousedao/reactor-api", "@powerhousedao/reactor-attachments", "@powerhousedao/reactor-browser", "@powerhousedao/reactor-drive", "@powerhousedao/reactor-group", "@powerhousedao/reactor-hypercore", "@powerhousedao/reactor-mcp", "@powerhousedao/reactor-privacy", "@powerhousedao/reactor-router", "@powerhousedao/reactor-workflow", "@powerhousedao/registry", "@powerhousedao/switchboard-gui", "@powerhousedao/vetra", "@powerhousedao/workflow", "@powerhousedao/analytics-engine-core", "@powerhousedao/analytics-engine-knex", "@powerhousedao/analytics-engine-pg", "@powerhousedao/analytics-engine-browser", "@powerhousedao/analytics-engine-graphql", "@powerhousedao/shared", "@powerhousedao/powerhouse-vetra-packages", "@renown/sdk"];
3
+ declare const CLIS_DEPENDENCIES: string[];
4
+ declare const APPS_DEPENDENCIES: string[];
5
+ declare const ALL_POWERHOUSE_DEPENDENCIES: string[];
6
+ //#endregion
7
+ export { PACKAGES_DEPENDENCIES as i, APPS_DEPENDENCIES as n, CLIS_DEPENDENCIES as r, ALL_POWERHOUSE_DEPENDENCIES as t };
8
+ export {};
9
+ //# sourceMappingURL=constants-DVJon33y.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-DVJon33y.d.ts","names":[],"sources":["../constants.ts"],"mappings":";cACa;cAsCA;cACA;cAKA"}
@@ -1,3 +1,3 @@
1
- import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-HBAa-ako.js";
1
+ import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-DVJon33y.js";
2
2
  export { ALL_POWERHOUSE_DEPENDENCIES, APPS_DEPENDENCIES, CLIS_DEPENDENCIES, PACKAGES_DEPENDENCIES };
3
3
  export {};
package/dist/constants.js CHANGED
@@ -1,10 +1,12 @@
1
1
  //#region constants.ts
2
2
  const PACKAGES_DEPENDENCIES = [
3
3
  "@powerhousedao/builder-tools",
4
+ "@powerhousedao/clint",
4
5
  "@powerhousedao/codegen",
5
6
  "@powerhousedao/common",
6
7
  "@powerhousedao/config",
7
8
  "@powerhousedao/design-system",
9
+ "@powerhousedao/desktop",
8
10
  "@powerhousedao/host-core",
9
11
  "document-drive",
10
12
  "document-model",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../constants.ts"],"sourcesContent":["// Every package published from the monorepo that `ph update` / `ph use` keep in lockstep.\nexport const PACKAGES_DEPENDENCIES = [\n \"@powerhousedao/builder-tools\",\n \"@powerhousedao/codegen\",\n \"@powerhousedao/common\",\n \"@powerhousedao/config\",\n \"@powerhousedao/design-system\",\n \"@powerhousedao/host-core\",\n \"document-drive\",\n \"document-model\",\n \"@powerhousedao/opentelemetry-instrumentation-reactor\",\n \"@powerhousedao/pieces-framework\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/reactor-api\",\n \"@powerhousedao/reactor-attachments\",\n \"@powerhousedao/reactor-browser\",\n \"@powerhousedao/reactor-drive\",\n \"@powerhousedao/reactor-group\",\n \"@powerhousedao/reactor-hypercore\",\n \"@powerhousedao/reactor-mcp\",\n \"@powerhousedao/reactor-privacy\",\n \"@powerhousedao/reactor-router\",\n \"@powerhousedao/reactor-workflow\",\n \"@powerhousedao/registry\",\n \"@powerhousedao/switchboard-gui\",\n \"@powerhousedao/vetra\",\n \"@powerhousedao/workflow\",\n \"@powerhousedao/analytics-engine-core\",\n \"@powerhousedao/analytics-engine-knex\",\n \"@powerhousedao/analytics-engine-pg\",\n \"@powerhousedao/analytics-engine-browser\",\n \"@powerhousedao/analytics-engine-graphql\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/powerhouse-vetra-packages\",\n \"@renown/sdk\",\n] as const;\n\nexport const CLIS_DEPENDENCIES = [\"ph-cmd\", \"@powerhousedao/ph-cli\"];\nexport const APPS_DEPENDENCIES = [\n \"@powerhousedao/connect\",\n \"@powerhousedao/switchboard\",\n];\n\nexport const ALL_POWERHOUSE_DEPENDENCIES = [\n ...PACKAGES_DEPENDENCIES,\n ...CLIS_DEPENDENCIES,\n ...APPS_DEPENDENCIES,\n];\n"],"mappings":";AACA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,CAAC,UAAU,uBAAuB;AACnE,MAAa,oBAAoB,CAC/B,0BACA,4BACF;AAEA,MAAa,8BAA8B;CACzC,GAAG;CACH,GAAG;CACH,GAAG;AACL"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../constants.ts"],"sourcesContent":["// Every package published from the monorepo that `ph update` / `ph use` keep in lockstep.\nexport const PACKAGES_DEPENDENCIES = [\n \"@powerhousedao/builder-tools\",\n \"@powerhousedao/clint\",\n \"@powerhousedao/codegen\",\n \"@powerhousedao/common\",\n \"@powerhousedao/config\",\n \"@powerhousedao/design-system\",\n \"@powerhousedao/desktop\",\n \"@powerhousedao/host-core\",\n \"document-drive\",\n \"document-model\",\n \"@powerhousedao/opentelemetry-instrumentation-reactor\",\n \"@powerhousedao/pieces-framework\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/reactor-api\",\n \"@powerhousedao/reactor-attachments\",\n \"@powerhousedao/reactor-browser\",\n \"@powerhousedao/reactor-drive\",\n \"@powerhousedao/reactor-group\",\n \"@powerhousedao/reactor-hypercore\",\n \"@powerhousedao/reactor-mcp\",\n \"@powerhousedao/reactor-privacy\",\n \"@powerhousedao/reactor-router\",\n \"@powerhousedao/reactor-workflow\",\n \"@powerhousedao/registry\",\n \"@powerhousedao/switchboard-gui\",\n \"@powerhousedao/vetra\",\n \"@powerhousedao/workflow\",\n \"@powerhousedao/analytics-engine-core\",\n \"@powerhousedao/analytics-engine-knex\",\n \"@powerhousedao/analytics-engine-pg\",\n \"@powerhousedao/analytics-engine-browser\",\n \"@powerhousedao/analytics-engine-graphql\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/powerhouse-vetra-packages\",\n \"@renown/sdk\",\n] as const;\n\nexport const CLIS_DEPENDENCIES = [\"ph-cmd\", \"@powerhousedao/ph-cli\"];\nexport const APPS_DEPENDENCIES = [\n \"@powerhousedao/connect\",\n \"@powerhousedao/switchboard\",\n];\n\nexport const ALL_POWERHOUSE_DEPENDENCIES = [\n ...PACKAGES_DEPENDENCIES,\n ...CLIS_DEPENDENCIES,\n ...APPS_DEPENDENCIES,\n];\n"],"mappings":";AACA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,CAAC,UAAU,uBAAuB;AACnE,MAAa,oBAAoB,CAC/B,0BACA,4BACF;AAEA,MAAa,8BAA8B;CACzC,GAAG;CACH,GAAG;CACH,GAAG;AACL"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as AnalyticsSeriesInput, c as CompoundAnalyticsExpression, d as ConversionMetric, f as IAnalyticsStore, i as AnalyticsSeries, l as CompoundAnalyticsInputs, n as AnalyticsOperand, o as AnalyticsSeriesQuery, p as MultiCurrencyConversion, r as AnalyticsQuery, s as AnalyticsUpdateCallback, t as AnalyticsDimension, u as CompoundAnalyticsQuery } from "./types-Bsp8VL2y.js";
2
2
  import { $ as AddOperationErrorInput, $i as SetOperationErrorTemplateInput, $n as MutationMoveOperationArgs, $r as RemoveRelationshipActionInput, $t as DocumentModelOperationExampleAction, A as PHPackageProvider, Aa as UndoAction, Ai as SetModelDescriptionInput, An as MakeEmpty, Ar as MutationUpdateStateExampleArgs, At as DeleteOperationErrorAction, B as ServiceActions, Ba as UpdateStateExampleInput, Bi as SetModuleNameInput, Bn as Mutation, Br as PieceModule, Bt as DocumentModelDocumentModelModule, C as PHConnectPwaUrlPattern, Ca as SigningParameters, Ci as SetAuthorNameAction, Cn as ISigner, Cr as MutationSetOperationReducerArgs, Ct as DeleteChildDocumentInput, D as PHConnectRenownAdapters, Da as StateReducer, Di as SetInitialStateAction, Dn as IsStateOfType, Dr as MutationUndoArgs, Dt as DeleteModuleAction, E as PHConnectRenown, Ea as State, Ei as SetAuthorWebsiteInput, En as IsDocumentOfType, Er as MutationSetStateSchemaArgs, Et as DeleteDocumentActionInput, F as ParsedCmdResult, Fa as UpdateOperationExampleAction, Fi as SetModelNameAction, Fn as Maybe, Fr as OperationsByScope, Ft as DeleteStateExampleAction, G as ActionVerificationHandler, Gi as SetOperationDescriptionInput, Gn as MutationAddOperationExampleArgs, Gr as Query, Gt as DocumentModelLib, H as ActionErrorCallback, Ha as UpgradeDocumentActionInput, Hi as SetNameActionInput, Hn as MutationAddModuleArgs, Hr as Publisher, Ht as DocumentModelHeaderAction, I as PathValidation, Ia as UpdateOperationExampleInput, Ii as SetModelNameInput, In as MinimalBackupData, Ir as PartialRecord, It as DeleteStateExampleInput, J as AddChangeLogItemInput, Ji as SetOperationErrorDescriptionAction, Jn as MutationDeleteModuleArgs, Jr as RedoActionInput, Jt as DocumentModelModuleAction, K as Actions, Ki as SetOperationErrorCodeAction, Kn as MutationAddStateExampleArgs, Kr as Redo, Kt as DocumentModelLocalState, L as PowerhouseConfig, La as UpdateRelationshipAction, Li as SetModuleDescriptionAction, Ln as ModuleSpecification, Lr as PartialState, Lt as DocumentAction, M as PHRenownPrivyAdapterConfig, Ma as UndoRedoAction, Mi as SetModelExtensionInput, Mn as MakeOptional, Mr as OperationErrorSpecification, Mt as DeleteOperationExampleAction, N as PHRenownRainbowAdapterConfig, Na as UpdateChangeLogItemAction, Ni as SetModelIdAction, Nn as Manifest, Nr as OperationIndex, Nt as DeleteOperationExampleInput, O as PHConnectRuntimeConfig, Oa as SubgraphModule, Oi as SetInitialStateInput, On as LoadFromFile, Or as MutationUpdateChangeLogItemInputArgs, Ot as DeleteModuleInput, P as PackageManagerArgs, Pa as UpdateChangeLogItemInput, Pi as SetModelIdInput, Pn as MappedOperation, Pr as OperationSpecification, Pt as DeleteOperationInput, Q as AddOperationErrorAction, Qi as SetOperationErrorTemplateAction, Qn as MutationDeleteStateExampleArgs, Qr as RemoveRelationshipAction, Qt as DocumentModelOperationErrorOperations, R as PowerhousePackage, Ra as UpdateRelationshipActionInput, Ri as SetModuleDescriptionInput, Rn as MoveOperationAction, Rr as PhAiToolAnnotations, Rt as DocumentModelAction, S as PHConnectPwaRuntimeCaching, Sa as SignatureVerificationHandler, Si as ScopeState, Sn as ISignalResult, Sr as MutationSetOperationNameArgs, St as DeleteChangeLogItemInput, T as PHConnectReactorFeatureFlags, Ta as SkipHeaderOperations, Ti as SetAuthorWebsiteAction, Tn as InputMaybe, Tr as MutationSetOperationTemplateArgs, Tt as DeleteDocumentAction, U as ActionSignatureContext, Ua as User, Ui as SetNameOperation, Un as MutationAddOperationArgs, Ur as PurgeDocumentAction, Ut as DocumentModelHeaderOperations, Va as UpgradeDocumentAction, Vi as SetNameAction, Vn as MutationAddChangeLogItemInputArgs, Vr as PowerhouseModule, Vt as DocumentModelGlobalState, W as ActionSigningHandler, Wa as ValidationError, Wi as SetOperationDescriptionAction, Wn as MutationAddOperationErrorArgs, Wr as PurgeDocumentActionInput, Wt as DocumentModelInput, X as AddModuleInput, Xi as SetOperationErrorNameAction, Xn as MutationDeleteOperationErrorArgs, Xr as ReducerOptions, Xt as DocumentModelOperationAction, Y as AddModuleAction, Yi as SetOperationErrorDescriptionInput, Yn as MutationDeleteOperationArgs, Yr as Reducer, Yt as DocumentModelModuleOperations, Z as AddOperationAction, Zi as SetOperationErrorNameInput, Zn as MutationDeleteOperationExampleArgs, Zr as ReleaseNewVersionAction, Zt as DocumentModelOperationErrorAction, _ as PHConnectPwa, _a as Signal, _i as SchemaNOOPAction, _n as IAction, _o as ProcessorRecord, _r as MutationSetOperationDescriptionArgs, _t as CreateDocument, a as PHConnectAi, aa as SetOperationSchemaInput, ai as ReorderModulesInput, an as DocumentModelUtils, ar as MutationReorderOperationExamplesArgs, at as AddStateExampleAction, b as PHConnectPwaIcon, ba as SignalResults, bi as SchemaSetPreferredEditorAction, bn as IOperation, br as MutationSetOperationErrorNameArgs, bt as CreateState, c as PHConnectDefaultDrive, ca as SetOperationTemplateAction, ci as ReorderOperationExamplesAction, cn as DocumentOperationsIgnoreMap, co as IProcessorDispatch, cr as MutationSetAuthorWebsiteArgs, ct as AssertIsStateOfType, d as PHConnectDriveSection, da as SetPreferredEditorActionInput, di as ReorderStateExamplesInput, dn as EditorDispatch, do as ProcessorApp, dr as MutationSetModelExtensionArgs, dt as ConfigEntry, ea as SetOperationNameAction, ei as ReorderChangeLogItemsAction, en as DocumentModelOperationExampleOperations, er as MutationRedoArgs, et as AddOperationExampleAction, f as PHConnectDriveSections, fa as SetPreferredEditorOperation, fi as ReplayDocumentOptions, fn as EditorModule, fo as ProcessorApps, fr as MutationSetModelIdArgs, ft as ConfigEntryType, g as PHConnectPackages, ga as Set_PreferredEditor, gi as Scalars, gn as GetDocumentOptions, go as ProcessorFilter, gr as MutationSetNameArgs, gt as CreateChildDocumentSignal, h as PHConnectOpenPanel, ha as Set_Name, hi as SaveToFileHandle, hn as FileInput, ho as ProcessorFactoryBuilder, hr as MutationSetModuleNameArgs, ht as CreateChildDocumentInput, i as LogLevels, ia as SetOperationSchemaAction, ii as ReorderModulesAction, in as DocumentModelStateOperations, ir as MutationReorderOperationErrorsArgs, it as AddRelationshipActionInput, j as PHReactorRenown, ja as UndoActionInput, ji as SetModelExtensionAction, jn as MakeMaybe, jr as NOOPAction, jt as DeleteOperationErrorInput, k as PHConnectSentry, ka as Undo, ki as SetModelDescriptionAction, kn as LoadFromInput, kr as MutationUpdateOperationExampleArgs, kt as DeleteOperationAction, l as PHConnectDefaultDriveLocal, la as SetOperationTemplateInput, li as ReorderOperationExamplesInput, ln as DocumentSpecification, lo as IProcessorHostModuleBase, lr as MutationSetInitialStateArgs, lt as Author, m as PHConnectInstance, ma as SetStateSchemaInput, mi as SaveToFile, mn as Exact, mo as ProcessorFactory, mr as MutationSetModuleDescriptionArgs, mt as CopyChildDocumentSignal, n as DrivePreserveStrategy, na as SetOperationReducerAction, ni as ReorderModuleOperationsAction, nn as DocumentModelPHState, nr as MutationReorderModuleOperationsArgs, nt as AddOperationInput, o as PHConnectApp, oa as SetOperationScopeAction, oi as ReorderOperationErrorsAction, on as DocumentModelVersioningAction, or as MutationReorderStateExamplesArgs, ot as AddStateExampleInput, p as PHConnectDrives, pa as SetStateSchemaAction, pi as RevisionsFilter, pn as EditorProps, po as ProcessorDispatchResult, pr as MutationSetModelNameArgs, pt as CopyChildDocumentInput, q as AddChangeLogItemAction, qi as SetOperationErrorCodeInput, qn as MutationDeleteChangeLogItemInputArgs, qr as RedoAction, qt as DocumentModelModule, r as LogLevel, ra as SetOperationReducerInput, ri as ReorderModuleOperationsInput, rn as DocumentModelStateAction, rr as MutationReorderModulesArgs, rt as AddRelationshipAction, s as PHConnectBranding, sa as SetOperationScopeInput, si as ReorderOperationErrorsInput, sn as DocumentModelVersioningOperations, so as IProcessor, sr as MutationSetAuthorNameArgs, st as AssertIsDocumentOfType, t as DrivePreserveStrategies, ta as SetOperationNameInput, ti as ReorderChangeLogItemsInput, tn as DocumentModelOperationOperations, tr as MutationReorderChangeLogItemsInputArgs, tt as AddOperationExampleInput, u as PHConnectDefaultDriveRemote, ua as SetPreferredEditorAction, ui as ReorderStateExamplesAction, un as ENSInfo, uo as IProcessorManager, ur as MutationSetModelDescriptionArgs, ut as CodeExample, v as PHConnectPwaCacheStrategy, va as SignalDispatch, vi as SchemaRedoAction, vn as ID, vo as ProcessorStatus, vr as MutationSetOperationErrorCodeArgs, vt as CreateDocumentAction, w as PHConnectReactor, wa as SkipHeaderOperationIndex, wi as SetAuthorNameInput, wn as Incremental, wr as MutationSetOperationSchemaArgs, wt as DeleteChildDocumentSignal, x as PHConnectPwaManifest, xa as SignalType, xi as SchemaUndoAction, xn as ISignal, xr as MutationSetOperationErrorTemplateArgs, xt as DeleteChangeLogItemAction, y as PHConnectPwaFileHandler, ya as SignalResult, yi as SchemaSetNameAction, yn as IDocument, yo as TrackedProcessor, yr as MutationSetOperationErrorDescriptionArgs, yt as CreateDocumentActionInput, z as ServiceAction, za as UpdateStateExampleAction, zi as SetModuleNameAction, zn as MoveOperationInput, zr as PhAiToolDescriptor, zt as DocumentModelDocument } from "./types-DDH6v2BE.js";
3
- import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-HBAa-ako.js";
3
+ import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-DVJon33y.js";
4
4
  import { $ as LegacySynchronizationUnit, A as TriggerData, B as PackagePage, C as RemoveTriggerInput, D as SetSharingTypeInput, E as SetDriveNameInput, F as PACKAGE_MODULE_TYPES, G as RegistryPackageSource, H as RegistryPackage, I as PackageFacets, J as DriveDocumentModelModule, K as RegistryPackageStatus, L as PackageInfo, M as TriggerType, N as UpdateFileInput, O as TransmitterType, P as UpdateNodeInput, Q as LegacyAddFileInput, R as PackageListItem, S as RemoveListenerInput, T as SetDriveIconInput, U as RegistryPackageList, V as Page, W as RegistryPackageMap, X as DocumentDriveDocument, Y as DocumentDriveAction, Z as LegacyAddFileAction, _ as ListenerInput, _t as SetDriveNameAction, a as CopyNodeInput, at as DocumentDriveNodeOperations, b as PullResponderTriggerData, c as DocumentDriveLocalState, ct as UpdateNodeAction, d as FolderNode, dt as DocumentDriveDriveAction, et as AddFileAction, f as Listener, ft as DocumentDriveDriveOperations, g as ListenerFilterInput, gt as SetDriveIconAction, h as ListenerFilter, ht as SetAvailableOfflineAction, i as AddTriggerInput, it as DocumentDriveNodeAction, j as TriggerInput, k as Trigger, lt as AddListenerAction, m as ListenerCallInfoInput, mt as RemoveTriggerAction, n as AddFolderInput, nt as CopyNodeAction, o as DeleteNodeInput, ot as MoveNodeAction, p as ListenerCallInfo, pt as RemoveListenerAction, q as DocumentDrivePHState, r as AddListenerInput, rt as DeleteNodeAction, s as DocumentDriveGlobalState, st as UpdateFileAction, t as AddFileInput, tt as AddFolderAction, u as FileNode, ut as AddTriggerAction, v as MoveNodeInput, vt as SetSharingTypeAction, w as SetAvailableOfflineInput, x as PullResponderTriggerDataInput, y as Node, z as PackageModuleType } from "./types-CywupGpk.js";
5
5
  import { a as GenerateNodesCopyIdGenerator, i as DriveInput, n as buildTreeUrl, o as GenerateNodesCopySrc, r as shortGitSha, s as SharingType, t as GITHUB_REPO_URL } from "./index-C3fD6cad.js";
6
6
  export { ALL_POWERHOUSE_DEPENDENCIES, APPS_DEPENDENCIES, type ActionErrorCallback, type ActionSignatureContext, type ActionSigningHandler, type ActionVerificationHandler, type Actions, type AddChangeLogItemAction, type AddChangeLogItemInput, type AddFileAction, type AddFileInput, type AddFolderAction, type AddFolderInput, type AddListenerAction, type AddListenerInput, type AddModuleAction, type AddModuleInput, type AddOperationAction, type AddOperationErrorAction, type AddOperationErrorInput, type AddOperationExampleAction, type AddOperationExampleInput, type AddOperationInput, type AddRelationshipAction, type AddRelationshipActionInput, type AddStateExampleAction, type AddStateExampleInput, type AddTriggerAction, type AddTriggerInput, type AnalyticsDimension, type AnalyticsOperand, type AnalyticsQuery, type AnalyticsSeries, type AnalyticsSeriesInput, type AnalyticsSeriesQuery, type AnalyticsUpdateCallback, type AssertIsDocumentOfType, type AssertIsStateOfType, type Author, CLIS_DEPENDENCIES, type CodeExample, type CompoundAnalyticsExpression, type CompoundAnalyticsInputs, type CompoundAnalyticsQuery, type ConfigEntry, type ConfigEntryType, type ConversionMetric, type CopyChildDocumentInput, type CopyChildDocumentSignal, type CopyNodeAction, type CopyNodeInput, type CreateChildDocumentInput, type CreateChildDocumentSignal, type CreateDocument, type CreateDocumentAction, type CreateDocumentActionInput, type CreateState, type DeleteChangeLogItemAction, type DeleteChangeLogItemInput, type DeleteChildDocumentInput, type DeleteChildDocumentSignal, type DeleteDocumentAction, type DeleteDocumentActionInput, type DeleteModuleAction, type DeleteModuleInput, type DeleteNodeAction, type DeleteNodeInput, type DeleteOperationAction, type DeleteOperationErrorAction, type DeleteOperationErrorInput, type DeleteOperationExampleAction, type DeleteOperationExampleInput, type DeleteOperationInput, type DeleteStateExampleAction, type DeleteStateExampleInput, type DocumentAction, type DocumentDriveAction, type DocumentDriveDocument, type DocumentDriveDriveAction, type DocumentDriveDriveOperations, type DocumentDriveGlobalState, type DocumentDriveLocalState, type DocumentDriveNodeAction, type DocumentDriveNodeOperations, type DocumentDrivePHState, type DocumentModelAction, type DocumentModelDocument, type DocumentModelDocumentModelModule, type DocumentModelGlobalState, type DocumentModelHeaderAction, type DocumentModelHeaderOperations, type DocumentModelInput, type DocumentModelLib, type DocumentModelLocalState, type DocumentModelModule, type DocumentModelModuleAction, type DocumentModelModuleOperations, type DocumentModelOperationAction, type DocumentModelOperationErrorAction, type DocumentModelOperationErrorOperations, type DocumentModelOperationExampleAction, type DocumentModelOperationExampleOperations, type DocumentModelOperationOperations, type DocumentModelPHState, type DocumentModelStateAction, type DocumentModelStateOperations, type DocumentModelUtils, type DocumentModelVersioningAction, type DocumentModelVersioningOperations, type DocumentOperationsIgnoreMap, type DocumentSpecification, type DriveDocumentModelModule, type DriveInput, type DrivePreserveStrategies, type DrivePreserveStrategy, type ENSInfo, type EditorDispatch, type EditorModule, type EditorProps, type Exact, type FileInput, type FileNode, type FolderNode, GITHUB_REPO_URL, type GenerateNodesCopyIdGenerator, type GenerateNodesCopySrc, type GetDocumentOptions, type IAction, type IAnalyticsStore, type ID, type IDocument, type IOperation, type IProcessor, type IProcessorDispatch, type IProcessorHostModuleBase, type IProcessorManager, type ISignal, type ISignalResult, type ISigner, type Incremental, type InputMaybe, type IsDocumentOfType, type IsStateOfType, type LegacyAddFileAction, type LegacyAddFileInput, type LegacySynchronizationUnit, type Listener, type ListenerCallInfo, type ListenerCallInfoInput, type ListenerFilter, type ListenerFilterInput, type ListenerInput, type LoadFromFile, type LoadFromInput, type LogLevel, type LogLevels, type MakeEmpty, type MakeMaybe, type MakeOptional, type Manifest, type MappedOperation, type Maybe, type MinimalBackupData, type ModuleSpecification, type MoveNodeAction, type MoveNodeInput, type MoveOperationAction, type MoveOperationInput, type MultiCurrencyConversion, type Mutation, type MutationAddChangeLogItemInputArgs, type MutationAddModuleArgs, type MutationAddOperationArgs, type MutationAddOperationErrorArgs, type MutationAddOperationExampleArgs, type MutationAddStateExampleArgs, type MutationDeleteChangeLogItemInputArgs, type MutationDeleteModuleArgs, type MutationDeleteOperationArgs, type MutationDeleteOperationErrorArgs, type MutationDeleteOperationExampleArgs, type MutationDeleteStateExampleArgs, type MutationMoveOperationArgs, type MutationRedoArgs, type MutationReorderChangeLogItemsInputArgs, type MutationReorderModuleOperationsArgs, type MutationReorderModulesArgs, type MutationReorderOperationErrorsArgs, type MutationReorderOperationExamplesArgs, type MutationReorderStateExamplesArgs, type MutationSetAuthorNameArgs, type MutationSetAuthorWebsiteArgs, type MutationSetInitialStateArgs, type MutationSetModelDescriptionArgs, type MutationSetModelExtensionArgs, type MutationSetModelIdArgs, type MutationSetModelNameArgs, type MutationSetModuleDescriptionArgs, type MutationSetModuleNameArgs, type MutationSetNameArgs, type MutationSetOperationDescriptionArgs, type MutationSetOperationErrorCodeArgs, type MutationSetOperationErrorDescriptionArgs, type MutationSetOperationErrorNameArgs, type MutationSetOperationErrorTemplateArgs, type MutationSetOperationNameArgs, type MutationSetOperationReducerArgs, type MutationSetOperationSchemaArgs, type MutationSetOperationTemplateArgs, type MutationSetStateSchemaArgs, type MutationUndoArgs, type MutationUpdateChangeLogItemInputArgs, type MutationUpdateOperationExampleArgs, type MutationUpdateStateExampleArgs, type NOOPAction, type Node, type OperationErrorSpecification, type OperationIndex, type OperationSpecification, type OperationsByScope, PACKAGES_DEPENDENCIES, type PACKAGE_MODULE_TYPES, type PHConnectAi, type PHConnectApp, type PHConnectBranding, type PHConnectDefaultDrive, type PHConnectDefaultDriveLocal, type PHConnectDefaultDriveRemote, type PHConnectDriveSection, type PHConnectDriveSections, type PHConnectDrives, type PHConnectInstance, type PHConnectOpenPanel, type PHConnectPackages, type PHConnectPwa, type PHConnectPwaCacheStrategy, type PHConnectPwaFileHandler, type PHConnectPwaIcon, type PHConnectPwaManifest, type PHConnectPwaRuntimeCaching, type PHConnectPwaUrlPattern, type PHConnectReactor, type PHConnectReactorFeatureFlags, type PHConnectRenown, type PHConnectRenownAdapters, type PHConnectRuntimeConfig, type PHConnectSentry, type PHPackageProvider, type PHReactorRenown, type PHRenownPrivyAdapterConfig, type PHRenownRainbowAdapterConfig, type PackageFacets, type PackageInfo, type PackageListItem, type PackageManagerArgs, type PackageModuleType, type PackagePage, type Page, type ParsedCmdResult, type PartialRecord, type PartialState, type PathValidation, type PhAiToolAnnotations, type PhAiToolDescriptor, type PieceModule, type PowerhouseConfig, type PowerhouseModule, type PowerhousePackage, type ProcessorApp, type ProcessorApps, type ProcessorDispatchResult, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type ProcessorStatus, type Publisher, type PullResponderTriggerData, type PullResponderTriggerDataInput, type PurgeDocumentAction, type PurgeDocumentActionInput, type Query, type Redo, type RedoAction, type RedoActionInput, type Reducer, type ReducerOptions, type RegistryPackage, type RegistryPackageList, type RegistryPackageMap, type RegistryPackageSource, type RegistryPackageStatus, type ReleaseNewVersionAction, type RemoveListenerAction, type RemoveListenerInput, type RemoveRelationshipAction, type RemoveRelationshipActionInput, type RemoveTriggerAction, type RemoveTriggerInput, type ReorderChangeLogItemsAction, type ReorderChangeLogItemsInput, type ReorderModuleOperationsAction, type ReorderModuleOperationsInput, type ReorderModulesAction, type ReorderModulesInput, type ReorderOperationErrorsAction, type ReorderOperationErrorsInput, type ReorderOperationExamplesAction, type ReorderOperationExamplesInput, type ReorderStateExamplesAction, type ReorderStateExamplesInput, type ReplayDocumentOptions, type RevisionsFilter, type SaveToFile, type SaveToFileHandle, type Scalars, type SchemaNOOPAction, type SchemaRedoAction, type SchemaSetNameAction, type SchemaSetPreferredEditorAction, type SchemaUndoAction, type ScopeState, type ServiceAction, type ServiceActions, type SetAuthorNameAction, type SetAuthorNameInput, type SetAuthorWebsiteAction, type SetAuthorWebsiteInput, type SetAvailableOfflineAction, type SetAvailableOfflineInput, type SetDriveIconAction, type SetDriveIconInput, type SetDriveNameAction, type SetDriveNameInput, type SetInitialStateAction, type SetInitialStateInput, type SetModelDescriptionAction, type SetModelDescriptionInput, type SetModelExtensionAction, type SetModelExtensionInput, type SetModelIdAction, type SetModelIdInput, type SetModelNameAction, type SetModelNameInput, type SetModuleDescriptionAction, type SetModuleDescriptionInput, type SetModuleNameAction, type SetModuleNameInput, type SetNameAction, type SetNameActionInput, type SetNameOperation, type SetOperationDescriptionAction, type SetOperationDescriptionInput, type SetOperationErrorCodeAction, type SetOperationErrorCodeInput, type SetOperationErrorDescriptionAction, type SetOperationErrorDescriptionInput, type SetOperationErrorNameAction, type SetOperationErrorNameInput, type SetOperationErrorTemplateAction, type SetOperationErrorTemplateInput, type SetOperationNameAction, type SetOperationNameInput, type SetOperationReducerAction, type SetOperationReducerInput, type SetOperationSchemaAction, type SetOperationSchemaInput, type SetOperationScopeAction, type SetOperationScopeInput, type SetOperationTemplateAction, type SetOperationTemplateInput, type SetPreferredEditorAction, type SetPreferredEditorActionInput, type SetPreferredEditorOperation, type SetSharingTypeAction, type SetSharingTypeInput, type SetStateSchemaAction, type SetStateSchemaInput, type Set_Name, type Set_PreferredEditor, type SharingType, type Signal, type SignalDispatch, type SignalResult, type SignalResults, type SignalType, type SignatureVerificationHandler, type SigningParameters, type SkipHeaderOperationIndex, type SkipHeaderOperations, type State, type StateReducer, type SubgraphModule, type TrackedProcessor, type TransmitterType, type Trigger, type TriggerData, type TriggerInput, type TriggerType, type Undo, type UndoAction, type UndoActionInput, type UndoRedoAction, type UpdateChangeLogItemAction, type UpdateChangeLogItemInput, type UpdateFileAction, type UpdateFileInput, type UpdateNodeAction, type UpdateNodeInput, type UpdateOperationExampleAction, type UpdateOperationExampleInput, type UpdateRelationshipAction, type UpdateRelationshipActionInput, type UpdateStateExampleAction, type UpdateStateExampleInput, type UpgradeDocumentAction, type UpgradeDocumentActionInput, type User, type ValidationError, buildTreeUrl, shortGitSha };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["fs"],"sources":["../../registry/types.ts","../../clis/constants.ts","../../clis/file-system/get-config.ts","../../clis/file-system/spawn-async.ts","../../registry/registry.ts"],"sourcesContent":["import type { Manifest } from \"types\";\nexport interface PackageInfo {\n name: string;\n path: string;\n manifest: Manifest | null;\n documentTypes: string[];\n version?: string;\n /** Install spec the user requested (name, name@tag, or name@version); present\n * on installed packages, used to pick the update stream. Absent for legacy\n * entries. */\n spec?: string;\n /** Mapping of dist-tag → version (e.g. {latest: \"1.0.0\", dev: \"1.1.0-dev.3\"}). */\n distTags?: Record<string, string>;\n /** All published versions of the package, sorted ascending by semver. */\n versions?: string[];\n /**\n * The newest version the registry currently reports for this package (the\n * `version` field of list items / single-package responses). Distinct from\n * {@link version}, which holds the installed version on installed rows.\n * Every registry reports it, even ones without dist-tag support, so it is\n * the fallback target for the `latest` update stream.\n */\n latestVersion?: string;\n /** Accounts that own the name (publish/unpublish rights). Present only on\n * registries with the Postgres-backed auth; omitted when untracked. */\n owners?: string[];\n}\n\n/**\n * Item shape of `GET /packages` pages: only what a listing card renders. Pass\n * `detail=full` for {@link PackageInfo} items.\n */\nexport interface PackageListItem {\n name: string;\n path: string;\n version?: string;\n description?: string;\n category?: string;\n publisher?: { name?: string; url?: string };\n}\n\n/** Envelope of `GET /packages` and `GET /pieces`. */\nexport interface Page<T> {\n items: T[];\n total: number;\n limit: number;\n offset: number;\n hasMore: boolean;\n}\n\n/** Filter options over the `name`-restricted set, sent with `facets=true`. */\nexport interface PackageFacets {\n categories: string[];\n publishers: string[];\n}\n\n/** `GET /packages`; items are {@link PackageInfo} with `detail=full`. */\nexport interface PackagePage<T = PackageListItem> extends Page<T> {\n facets?: PackageFacets;\n}\n\n/** Manifest module lists accepted by the `moduleType` filter. */\nexport const PACKAGE_MODULE_TYPES = [\n \"documentModels\",\n \"editors\",\n \"apps\",\n \"subgraphs\",\n \"processors\",\n] as const;\nexport type PackageModuleType = (typeof PACKAGE_MODULE_TYPES)[number];\n\nexport type RegistryPackageStatus =\n | \"available\"\n | \"local-install\"\n | \"registry-install\"\n | \"dismissed\";\n\nexport type RegistryPackageSource =\n | \"available\"\n | \"local-install\"\n | \"registry-install\"\n | \"common\"\n | \"project\";\n\nexport type RegistryPackage = PackageInfo & {\n status: RegistryPackageStatus;\n /**\n * Shared-dependency version mismatches against the Connect build's version\n * table, pre-formatted (see `formatSharedDepWarnings`). Absent when the\n * host has no shared-deps table (vendor-off / dev) or none were found.\n */\n sharedDepWarnings?: string[];\n};\nexport type RegistryPackageMap = Record<string, RegistryPackage | undefined>;\nexport type RegistryPackageList = RegistryPackage[];\n","import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\n// Per-project dev-server port bands. `ph init` assigns each project a port\n// triple derived from its name, so two projects never collide and an agent's\n// MCP URL can be baked into .mcp.json before a session starts.\n//\n// Two hard constraints picked these bands, both below 10000:\n//\n// 1. Below the OS ephemeral range. Linux allocates outbound source ports\n// from 32768-60999 (`/proc/sys/net/ipv4/ip_local_port_range`); macOS and\n// Windows start at 49152. A listener parked in that window can lose a\n// race to a transient outbound socket, which would surface as a\n// `--strictPort` failure blaming a project conflict that does not exist.\n// 2. Below 10000, which is where ph-clint starts. ph-clint derives its own\n// per-CLI ports by hashing into 10000-59900, so staying under 10000\n// keeps the two schemes from ever contending.\n//\n// Within those limits the blocks were chosen by measuring which ports the\n// Powerhouse repos actually reference: 2000-2999 has none, 7000-7999 has one,\n// 6000-6999 has five. See PROJECT_PORT_DENYLIST in project-ports.ts for the\n// individual ports skipped inside them.\nexport const PROJECT_PORT_BAND_SIZE = 1000 as const;\nexport const PROJECT_PORT_BAND_SWITCHBOARD = 7000 as const;\nexport const PROJECT_PORT_BAND_STUDIO = 6000 as const;\nexport const PROJECT_PORT_BAND_VETRA_CONNECT = 2000 as const;\n\n/**\n * Icon for the drives switchboard creates by default, inlined as a data URI.\n *\n * A remote URL is the wrong shape for this: the value is baked into the drive\n * document and rendered by every Connect that opens it, so the icon only\n * appears when that client can reach that host. A desktop or air-gapped install\n * cannot, and the ipfs.io gateway this previously pointed at now answers 403\n * regardless.\n *\n * The mark is drawn dark-on-light so it stays legible against either theme.\n */\nexport const DEFAULT_DRIVE_ICON =\n \"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20rx='3'%20fill='%23F3F5F7'/%3E%3Cpath%20fill='%23343839'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0059%200L3.41636%205.45646C2.44979%206.25682%202.3795%207.71452%203.26456%208.60418L5.54425%2010.8957C6.21311%2011.568%206.35783%2012.6012%205.89944%2013.4314L4.48126%2016H2.13333C0.955126%2016%200%2015.0449%200%2013.8667V2.13333C0%200.955126%200.955126%200%202.13333%200H10.0059ZM11.2436%200L10.0128%202.24221C9.55899%203.06891%209.70183%204.09549%2010.3641%204.7669L12.7825%207.21868C13.6656%208.11402%2013.5866%209.57512%2012.612%2010.37L5.70922%2016H13.8667C15.0449%2016%2016%2015.0449%2016%2013.8667V2.13333C16%200.955126%2015.0449%200%2013.8667%200H11.2436Z'/%3E%3C/svg%3E\" as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\nexport const PIECES_FRAMEWORK_PACKAGE = \"@powerhousedao/pieces-framework\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.3.6\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required. `devVersioned`\n// is for a workspace package the build inlines, which no consumer provides.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n devVersioned: [],\n },\n // Each piece is bundled whole (build-pieces.mts), framework included, so the\n // framework is only ever needed to compile the piece's own source.\n piece: {\n peerVersioned: [],\n peerExternal: {},\n devVersioned: [PIECES_FRAMEWORK_PACKAGE],\n },\n} as const satisfies Record<\n string,\n {\n peerVersioned: readonly string[];\n peerExternal: Record<string, PeerSpec>;\n devVersioned: readonly string[];\n }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"@reown/appkit\",\n \"bufferutil\",\n \"esbuild\",\n \"keccak\",\n \"protobufjs\",\n \"utf-8-validate\",\n] as const;\n\n// Single-version pins the boilerplate enforces on generated projects,\n// avoiding duplicates from coexisting version ranges. Rendered as pnpm\n// `overrides` (pnpm-workspace.yaml) and as yarn v1 `resolutions`\n// (package.json). Generated-project only — never change the monorepo\n// catalog for this (a re-resolution there pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_DEPENDENCY_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n // uniform-runners: the generic compound runner the scaffolded\n // hosts/desktop/host.js names; dormant in classic projects until the\n // feature flag defaults on.\n \"@powerhousedao/host-core\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n // Node only, as the build is: a piece is loaded by a host process, never by\n // the browser. Without these a package can build a piece and still fail the\n // `packageName/pieces` import a host resolves it through.\n \"./pieces\": {\n types: \"./dist/types/pieces/index.d.ts\",\n node: \"./dist/node/pieces/index.mjs\",\n },\n \"./pieces/*\": {\n types: \"./dist/types/pieces/*/index.d.ts\",\n node: \"./dist/node/pieces/*/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n lint: \"oxlint --type-aware --type-check\",\n \"lint:fix\": \"oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n connect: \"ph-cli connect\",\n build: \"ph-cli build\",\n reactor: \"ph-cli reactor\",\n service: \"ph-cli service\",\n vetra: \"ph-cli vetra\",\n \"service-startup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n \"service-unstartup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n} as const;\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"5.0.3\",\n oxfmt: \"0.68.0\",\n oxlint: \"1.70.0\",\n \"oxlint-tsgolint\": \"0.23.0\",\n tailwindcss: \"^4.1.16\",\n typescript: \"~7.0.2\",\n vite: \"^8.0.10\",\n \"vite-tsconfig-paths\": \"6.1.1\",\n vitest: \"5.0.3\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n","import { readFileSync } from \"node:fs\";\nimport { DEFAULT_CONFIG } from \"../constants.js\";\nimport type { PowerhouseConfig } from \"../types.js\";\n\nexport function getConfig(path = \"./powerhouse.config.json\") {\n let config: PowerhouseConfig = { ...DEFAULT_CONFIG };\n try {\n const configStr = readFileSync(path, \"utf-8\");\n const userConfig = JSON.parse(configStr) as PowerhouseConfig;\n config = { ...config, ...userConfig };\n } catch {\n // console.warn(\"No powerhouse.config.json found, using defaults\");\n }\n\n return config;\n}\n","import spawn from \"cross-spawn\";\n\nexport function spawnAsync(\n command: string,\n args: string[],\n options: {\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n } = {},\n): Promise<string> {\n return new Promise((resolve, reject) => {\n // cross-spawn rather than node:child_process.spawn. On Windows npm, pnpm\n // and yarn are all `.cmd` shims, and since the fix for CVE-2024-27980\n // (Node 18.20.2 / 20.12.2 / 21.7.3 and later) `spawn` refuses to execute\n // `.bat`/`.cmd` unless `shell: true` -- it throws `spawn EINVAL`, and\n // synchronously, so an `error` listener never sees it. Passing\n // `shell: true` instead would hand the arguments to cmd.exe, which strips\n // quotes and splits on shell metacharacters. cross-spawn resolves the shim\n // and escapes the arguments itself, so the call keeps shell-less argument\n // semantics on every platform.\n const child = spawn(command, args, {\n cwd: options.cwd,\n env: options.env,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n\n let stdout = \"\";\n let stderr = \"\";\n\n child.stdout?.on(\"data\", (d: Buffer) => {\n stdout += d.toString();\n });\n\n child.stderr?.on(\"data\", (d: Buffer) => {\n stderr += d.toString();\n });\n\n child.on(\"error\", reject);\n\n child.on(\"close\", (code) => {\n if (code === 0) {\n resolve(stdout.trim());\n } else {\n reject(\n new Error(stderr.trim() || `${command} exited with code ${code}`),\n );\n }\n });\n });\n}\n","import { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n DEFAULT_REGISTRY_URL,\n POWERHOUSE_CONFIG_FILE,\n} from \"../clis/constants.js\";\nimport { getConfig } from \"../clis/file-system/get-config.js\";\nimport { spawnAsync } from \"../clis/file-system/spawn-async.js\";\n\nexport { DEFAULT_REGISTRY_URL } from \"../clis/constants.js\";\n\n/**\n * Extract the host portion of a registry URL — what npm uses as the key in\n * `~/.npmrc` for per-registry tokens (e.g. `//registry.vetra.io/`).\n */\nexport function registryAuthKey(registryUrl: string): string {\n const url = new URL(registryUrl);\n // Always trailing slash; npm's lookup is exact-match against the leading\n // path of the registry URL, with `//` prefix and trailing `/`.\n const path = url.pathname.endsWith(\"/\") ? url.pathname : `${url.pathname}/`;\n return `//${url.host}${path}:_authToken`;\n}\n\nexport interface ResolveRegistryUrlOptions {\n /** Explicit registry URL (e.g. from --registry flag). Highest priority. */\n registry?: string;\n /** Project path to read powerhouse.config.json from. */\n projectPath: string;\n /** Environment variables. Defaults to process.env. */\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Resolve the registry URL with priority: flag > env > config > default.\n */\nexport function resolveRegistryUrl(options: ResolveRegistryUrlOptions): string {\n const { registry, projectPath, env = process.env } = options;\n const configPath = join(projectPath, POWERHOUSE_CONFIG_FILE);\n const config = getConfig(configPath);\n\n return (\n registry ??\n env.PH_REGISTRY_URL ??\n config.packageRegistryUrl ??\n DEFAULT_REGISTRY_URL\n );\n}\n\n/**\n * Check if the user is authenticated with the given npm registry.\n * Returns the username on success, throws on failure.\n */\nexport async function checkNpmAuth(registryUrl: string): Promise<string> {\n return spawnAsync(\"npm\", [\"whoami\", \"--registry\", registryUrl]);\n}\n\nexport interface NpmPublishOptions {\n /** Registry URL to publish to. */\n registryUrl: string;\n /** Working directory (project root). */\n cwd: string;\n /** Additional arguments forwarded to npm publish. */\n args?: string[];\n /** Bearer token for the registry. When set, passed via a registry-scoped\n * `_authToken` config flag rather than read from the user's `.npmrc`. */\n authToken?: string;\n}\n\nexport interface NpmPublishResult {\n /** stdout from npm publish. */\n stdout: string;\n}\n\n/**\n * Run `npm publish` against the given registry.\n * Uses spawn with args array to avoid shell injection.\n *\n * When `authToken` is provided, the token is passed via a registry-scoped\n * `--//host/:_authToken=<token>` flag (npm's standard form for per-registry\n * tokens) so we never have to write to `~/.npmrc`.\n */\nexport async function npmPublish(\n options: NpmPublishOptions,\n): Promise<NpmPublishResult> {\n const { registryUrl, cwd, args = [], authToken } = options;\n const tokenArg = authToken\n ? [`--${registryAuthKey(registryUrl)}=${authToken}`]\n : [];\n const npmArgs = [\"publish\", \"--registry\", registryUrl, ...tokenArg, ...args];\n const stdout = await spawnAsync(\"npm\", npmArgs, { cwd });\n return { stdout };\n}\n\n/**\n * Write `_authToken=<token>` for the given registry host into `~/.npmrc`,\n * preserving any other lines. Replaces the existing entry for the same key\n * if present. Returns the absolute path to the npmrc that was written.\n */\nexport async function writeRegistryAuthToken(\n registryUrl: string,\n token: string,\n): Promise<string> {\n const npmrcPath = join(homedir(), \".npmrc\");\n const key = registryAuthKey(registryUrl);\n let existing = \"\";\n try {\n existing = await fs.readFile(npmrcPath, \"utf8\");\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") throw err;\n }\n const lines = existing.split(\"\\n\");\n const filtered = lines.filter((line) => !line.startsWith(`${key}=`));\n // Also drop any trailing empties to avoid stacking blank lines on rewrite.\n while (filtered.length && filtered[filtered.length - 1] === \"\")\n filtered.pop();\n filtered.push(`${key}=${token}`);\n await fs.writeFile(npmrcPath, `${filtered.join(\"\\n\")}\\n`, \"utf8\");\n return npmrcPath;\n}\n\nexport interface NpmUnpublishOptions {\n /** Registry URL to unpublish from. */\n registryUrl: string;\n /** Working directory (project root). */\n cwd: string;\n /** Package spec: `<name>` (whole package) or `<name>@<version>` (single version). */\n spec: string;\n /** Additional arguments forwarded to npm unpublish. */\n args?: string[];\n /** Bearer token for the registry (same semantics as `NpmPublishOptions.authToken`). */\n authToken?: string;\n}\n\nexport interface NpmUnpublishResult {\n /** stdout from npm unpublish. */\n stdout: string;\n}\n\n/**\n * Run `npm unpublish` against the given registry.\n * Always passes `--force` because npm otherwise refuses to unpublish packages\n * older than 72h (a public-npmjs safeguard that doesn't apply to private registries).\n */\nexport async function npmUnpublish(\n options: NpmUnpublishOptions,\n): Promise<NpmUnpublishResult> {\n const { registryUrl, cwd, spec, args = [], authToken } = options;\n const tokenArg = authToken\n ? [`--${registryAuthKey(registryUrl)}=${authToken}`]\n : [];\n const npmArgs = [\n \"unpublish\",\n spec,\n \"--registry\",\n registryUrl,\n \"--force\",\n ...tokenArg,\n ...args,\n ];\n const stdout = await spawnAsync(\"npm\", npmArgs, { cwd });\n return { stdout };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":["fs"],"sources":["../../registry/types.ts","../../clis/constants.ts","../../clis/file-system/get-config.ts","../../clis/file-system/spawn-async.ts","../../registry/registry.ts"],"sourcesContent":["import type { Manifest } from \"types\";\nexport interface PackageInfo {\n name: string;\n path: string;\n manifest: Manifest | null;\n documentTypes: string[];\n version?: string;\n /** Install spec the user requested (name, name@tag, or name@version); present\n * on installed packages, used to pick the update stream. Absent for legacy\n * entries. */\n spec?: string;\n /** Mapping of dist-tag → version (e.g. {latest: \"1.0.0\", dev: \"1.1.0-dev.3\"}). */\n distTags?: Record<string, string>;\n /** All published versions of the package, sorted ascending by semver. */\n versions?: string[];\n /**\n * The newest version the registry currently reports for this package (the\n * `version` field of list items / single-package responses). Distinct from\n * {@link version}, which holds the installed version on installed rows.\n * Every registry reports it, even ones without dist-tag support, so it is\n * the fallback target for the `latest` update stream.\n */\n latestVersion?: string;\n /** Accounts that own the name (publish/unpublish rights). Present only on\n * registries with the Postgres-backed auth; omitted when untracked. */\n owners?: string[];\n}\n\n/**\n * Item shape of `GET /packages` pages: only what a listing card renders. Pass\n * `detail=full` for {@link PackageInfo} items.\n */\nexport interface PackageListItem {\n name: string;\n path: string;\n version?: string;\n description?: string;\n category?: string;\n publisher?: { name?: string; url?: string };\n}\n\n/** Envelope of `GET /packages` and `GET /pieces`. */\nexport interface Page<T> {\n items: T[];\n total: number;\n limit: number;\n offset: number;\n hasMore: boolean;\n}\n\n/** Filter options over the `name`-restricted set, sent with `facets=true`. */\nexport interface PackageFacets {\n categories: string[];\n publishers: string[];\n}\n\n/** `GET /packages`; items are {@link PackageInfo} with `detail=full`. */\nexport interface PackagePage<T = PackageListItem> extends Page<T> {\n facets?: PackageFacets;\n}\n\n/** Manifest module lists accepted by the `moduleType` filter. */\nexport const PACKAGE_MODULE_TYPES = [\n \"documentModels\",\n \"editors\",\n \"apps\",\n \"subgraphs\",\n \"processors\",\n] as const;\nexport type PackageModuleType = (typeof PACKAGE_MODULE_TYPES)[number];\n\nexport type RegistryPackageStatus =\n | \"available\"\n | \"local-install\"\n | \"registry-install\"\n | \"dismissed\";\n\nexport type RegistryPackageSource =\n | \"available\"\n | \"local-install\"\n | \"registry-install\"\n | \"common\"\n | \"project\";\n\nexport type RegistryPackage = PackageInfo & {\n status: RegistryPackageStatus;\n /**\n * Shared-dependency version mismatches against the Connect build's version\n * table, pre-formatted (see `formatSharedDepWarnings`). Absent when the\n * host has no shared-deps table (vendor-off / dev) or none were found.\n */\n sharedDepWarnings?: string[];\n};\nexport type RegistryPackageMap = Record<string, RegistryPackage | undefined>;\nexport type RegistryPackageList = RegistryPackage[];\n","import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\n// Per-project dev-server port bands. `ph init` assigns each project a port\n// triple derived from its name, so two projects never collide and an agent's\n// MCP URL can be baked into .mcp.json before a session starts.\n//\n// Two hard constraints picked these bands, both below 10000:\n//\n// 1. Below the OS ephemeral range. Linux allocates outbound source ports\n// from 32768-60999 (`/proc/sys/net/ipv4/ip_local_port_range`); macOS and\n// Windows start at 49152. A listener parked in that window can lose a\n// race to a transient outbound socket, which would surface as a\n// `--strictPort` failure blaming a project conflict that does not exist.\n// 2. Below 10000, which is where ph-clint starts. ph-clint derives its own\n// per-CLI ports by hashing into 10000-59900, so staying under 10000\n// keeps the two schemes from ever contending.\n//\n// Within those limits the blocks were chosen by measuring which ports the\n// Powerhouse repos actually reference: 2000-2999 has none, 7000-7999 has one,\n// 6000-6999 has five. See PROJECT_PORT_DENYLIST in project-ports.ts for the\n// individual ports skipped inside them.\nexport const PROJECT_PORT_BAND_SIZE = 1000 as const;\nexport const PROJECT_PORT_BAND_SWITCHBOARD = 7000 as const;\nexport const PROJECT_PORT_BAND_STUDIO = 6000 as const;\nexport const PROJECT_PORT_BAND_VETRA_CONNECT = 2000 as const;\n\n/**\n * Icon for the drives switchboard creates by default, inlined as a data URI.\n *\n * A remote URL is the wrong shape for this: the value is baked into the drive\n * document and rendered by every Connect that opens it, so the icon only\n * appears when that client can reach that host. A desktop or air-gapped install\n * cannot, and the ipfs.io gateway this previously pointed at now answers 403\n * regardless.\n *\n * The mark is drawn dark-on-light so it stays legible against either theme.\n */\nexport const DEFAULT_DRIVE_ICON =\n \"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20rx='3'%20fill='%23F3F5F7'/%3E%3Cpath%20fill='%23343839'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0059%200L3.41636%205.45646C2.44979%206.25682%202.3795%207.71452%203.26456%208.60418L5.54425%2010.8957C6.21311%2011.568%206.35783%2012.6012%205.89944%2013.4314L4.48126%2016H2.13333C0.955126%2016%200%2015.0449%200%2013.8667V2.13333C0%200.955126%200.955126%200%202.13333%200H10.0059ZM11.2436%200L10.0128%202.24221C9.55899%203.06891%209.70183%204.09549%2010.3641%204.7669L12.7825%207.21868C13.6656%208.11402%2013.5866%209.57512%2012.612%2010.37L5.70922%2016H13.8667C15.0449%2016%2016%2015.0449%2016%2013.8667V2.13333C16%200.955126%2015.0449%200%2013.8667%200H11.2436Z'/%3E%3C/svg%3E\" as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\nexport const PIECES_FRAMEWORK_PACKAGE = \"@powerhousedao/pieces-framework\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.3.6\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required. `devVersioned`\n// is for a workspace package the build inlines, which no consumer provides.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n devVersioned: [],\n },\n // Each piece is bundled whole (build-pieces.mts), framework included, so the\n // framework is only ever needed to compile the piece's own source.\n piece: {\n peerVersioned: [],\n peerExternal: {},\n devVersioned: [PIECES_FRAMEWORK_PACKAGE],\n },\n} as const satisfies Record<\n string,\n {\n peerVersioned: readonly string[];\n peerExternal: Record<string, PeerSpec>;\n devVersioned: readonly string[];\n }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"@reown/appkit\",\n \"bufferutil\",\n \"esbuild\",\n \"keccak\",\n \"protobufjs\",\n \"utf-8-validate\",\n] as const;\n\n// Single-version pins the boilerplate enforces on generated projects,\n// avoiding duplicates from coexisting version ranges. Rendered as pnpm\n// `overrides` (pnpm-workspace.yaml) and as yarn v1 `resolutions`\n// (package.json). Generated-project only — never change the monorepo\n// catalog for this (a re-resolution there pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_DEPENDENCY_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n // uniform-runners: the runner modules the scaffolded hosts/*/host.js\n // files name (desktop runner, clint-runner/mastra-runner, and the generic\n // compound they build on); dormant in classic projects until the feature\n // flag defaults on.\n \"@powerhousedao/host-core\",\n \"@powerhousedao/clint\",\n \"@powerhousedao/desktop\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n // Node only, as the build is: a piece is loaded by a host process, never by\n // the browser. Without these a package can build a piece and still fail the\n // `packageName/pieces` import a host resolves it through.\n \"./pieces\": {\n types: \"./dist/types/pieces/index.d.ts\",\n node: \"./dist/node/pieces/index.mjs\",\n },\n \"./pieces/*\": {\n types: \"./dist/types/pieces/*/index.d.ts\",\n node: \"./dist/node/pieces/*/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n lint: \"oxlint --type-aware --type-check\",\n \"lint:fix\": \"oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n connect: \"ph-cli connect\",\n build: \"ph-cli build\",\n reactor: \"ph-cli reactor\",\n service: \"ph-cli service\",\n vetra: \"ph-cli vetra\",\n \"service-startup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n \"service-unstartup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n} as const;\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"5.0.3\",\n oxfmt: \"0.68.0\",\n oxlint: \"1.70.0\",\n \"oxlint-tsgolint\": \"0.23.0\",\n tailwindcss: \"^4.1.16\",\n typescript: \"~7.0.2\",\n vite: \"^8.0.10\",\n \"vite-tsconfig-paths\": \"6.1.1\",\n vitest: \"5.0.3\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n","import { readFileSync } from \"node:fs\";\nimport { DEFAULT_CONFIG } from \"../constants.js\";\nimport type { PowerhouseConfig } from \"../types.js\";\n\nexport function getConfig(path = \"./powerhouse.config.json\") {\n let config: PowerhouseConfig = { ...DEFAULT_CONFIG };\n try {\n const configStr = readFileSync(path, \"utf-8\");\n const userConfig = JSON.parse(configStr) as PowerhouseConfig;\n config = { ...config, ...userConfig };\n } catch {\n // console.warn(\"No powerhouse.config.json found, using defaults\");\n }\n\n return config;\n}\n","import spawn from \"cross-spawn\";\n\nexport function spawnAsync(\n command: string,\n args: string[],\n options: {\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n } = {},\n): Promise<string> {\n return new Promise((resolve, reject) => {\n // cross-spawn rather than node:child_process.spawn. On Windows npm, pnpm\n // and yarn are all `.cmd` shims, and since the fix for CVE-2024-27980\n // (Node 18.20.2 / 20.12.2 / 21.7.3 and later) `spawn` refuses to execute\n // `.bat`/`.cmd` unless `shell: true` -- it throws `spawn EINVAL`, and\n // synchronously, so an `error` listener never sees it. Passing\n // `shell: true` instead would hand the arguments to cmd.exe, which strips\n // quotes and splits on shell metacharacters. cross-spawn resolves the shim\n // and escapes the arguments itself, so the call keeps shell-less argument\n // semantics on every platform.\n const child = spawn(command, args, {\n cwd: options.cwd,\n env: options.env,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n\n let stdout = \"\";\n let stderr = \"\";\n\n child.stdout?.on(\"data\", (d: Buffer) => {\n stdout += d.toString();\n });\n\n child.stderr?.on(\"data\", (d: Buffer) => {\n stderr += d.toString();\n });\n\n child.on(\"error\", reject);\n\n child.on(\"close\", (code) => {\n if (code === 0) {\n resolve(stdout.trim());\n } else {\n reject(\n new Error(stderr.trim() || `${command} exited with code ${code}`),\n );\n }\n });\n });\n}\n","import { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n DEFAULT_REGISTRY_URL,\n POWERHOUSE_CONFIG_FILE,\n} from \"../clis/constants.js\";\nimport { getConfig } from \"../clis/file-system/get-config.js\";\nimport { spawnAsync } from \"../clis/file-system/spawn-async.js\";\n\nexport { DEFAULT_REGISTRY_URL } from \"../clis/constants.js\";\n\n/**\n * Extract the host portion of a registry URL — what npm uses as the key in\n * `~/.npmrc` for per-registry tokens (e.g. `//registry.vetra.io/`).\n */\nexport function registryAuthKey(registryUrl: string): string {\n const url = new URL(registryUrl);\n // Always trailing slash; npm's lookup is exact-match against the leading\n // path of the registry URL, with `//` prefix and trailing `/`.\n const path = url.pathname.endsWith(\"/\") ? url.pathname : `${url.pathname}/`;\n return `//${url.host}${path}:_authToken`;\n}\n\nexport interface ResolveRegistryUrlOptions {\n /** Explicit registry URL (e.g. from --registry flag). Highest priority. */\n registry?: string;\n /** Project path to read powerhouse.config.json from. */\n projectPath: string;\n /** Environment variables. Defaults to process.env. */\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Resolve the registry URL with priority: flag > env > config > default.\n */\nexport function resolveRegistryUrl(options: ResolveRegistryUrlOptions): string {\n const { registry, projectPath, env = process.env } = options;\n const configPath = join(projectPath, POWERHOUSE_CONFIG_FILE);\n const config = getConfig(configPath);\n\n return (\n registry ??\n env.PH_REGISTRY_URL ??\n config.packageRegistryUrl ??\n DEFAULT_REGISTRY_URL\n );\n}\n\n/**\n * Check if the user is authenticated with the given npm registry.\n * Returns the username on success, throws on failure.\n */\nexport async function checkNpmAuth(registryUrl: string): Promise<string> {\n return spawnAsync(\"npm\", [\"whoami\", \"--registry\", registryUrl]);\n}\n\nexport interface NpmPublishOptions {\n /** Registry URL to publish to. */\n registryUrl: string;\n /** Working directory (project root). */\n cwd: string;\n /** Additional arguments forwarded to npm publish. */\n args?: string[];\n /** Bearer token for the registry. When set, passed via a registry-scoped\n * `_authToken` config flag rather than read from the user's `.npmrc`. */\n authToken?: string;\n}\n\nexport interface NpmPublishResult {\n /** stdout from npm publish. */\n stdout: string;\n}\n\n/**\n * Run `npm publish` against the given registry.\n * Uses spawn with args array to avoid shell injection.\n *\n * When `authToken` is provided, the token is passed via a registry-scoped\n * `--//host/:_authToken=<token>` flag (npm's standard form for per-registry\n * tokens) so we never have to write to `~/.npmrc`.\n */\nexport async function npmPublish(\n options: NpmPublishOptions,\n): Promise<NpmPublishResult> {\n const { registryUrl, cwd, args = [], authToken } = options;\n const tokenArg = authToken\n ? [`--${registryAuthKey(registryUrl)}=${authToken}`]\n : [];\n const npmArgs = [\"publish\", \"--registry\", registryUrl, ...tokenArg, ...args];\n const stdout = await spawnAsync(\"npm\", npmArgs, { cwd });\n return { stdout };\n}\n\n/**\n * Write `_authToken=<token>` for the given registry host into `~/.npmrc`,\n * preserving any other lines. Replaces the existing entry for the same key\n * if present. Returns the absolute path to the npmrc that was written.\n */\nexport async function writeRegistryAuthToken(\n registryUrl: string,\n token: string,\n): Promise<string> {\n const npmrcPath = join(homedir(), \".npmrc\");\n const key = registryAuthKey(registryUrl);\n let existing = \"\";\n try {\n existing = await fs.readFile(npmrcPath, \"utf8\");\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") throw err;\n }\n const lines = existing.split(\"\\n\");\n const filtered = lines.filter((line) => !line.startsWith(`${key}=`));\n // Also drop any trailing empties to avoid stacking blank lines on rewrite.\n while (filtered.length && filtered[filtered.length - 1] === \"\")\n filtered.pop();\n filtered.push(`${key}=${token}`);\n await fs.writeFile(npmrcPath, `${filtered.join(\"\\n\")}\\n`, \"utf8\");\n return npmrcPath;\n}\n\nexport interface NpmUnpublishOptions {\n /** Registry URL to unpublish from. */\n registryUrl: string;\n /** Working directory (project root). */\n cwd: string;\n /** Package spec: `<name>` (whole package) or `<name>@<version>` (single version). */\n spec: string;\n /** Additional arguments forwarded to npm unpublish. */\n args?: string[];\n /** Bearer token for the registry (same semantics as `NpmPublishOptions.authToken`). */\n authToken?: string;\n}\n\nexport interface NpmUnpublishResult {\n /** stdout from npm unpublish. */\n stdout: string;\n}\n\n/**\n * Run `npm unpublish` against the given registry.\n * Always passes `--force` because npm otherwise refuses to unpublish packages\n * older than 72h (a public-npmjs safeguard that doesn't apply to private registries).\n */\nexport async function npmUnpublish(\n options: NpmUnpublishOptions,\n): Promise<NpmUnpublishResult> {\n const { registryUrl, cwd, spec, args = [], authToken } = options;\n const tokenArg = authToken\n ? [`--${registryAuthKey(registryUrl)}=${authToken}`]\n : [];\n const npmArgs = [\n \"unpublish\",\n spec,\n \"--registry\",\n registryUrl,\n \"--force\",\n ...tokenArg,\n ...args,\n ];\n const stdout = await spawnAsync(\"npm\", npmArgs, { cwd });\n return { stdout };\n}\n"],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/shared",
3
- "version": "6.2.3-dev.56",
3
+ "version": "6.2.3-dev.57",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {
@@ -1,9 +0,0 @@
1
- //#region constants.d.ts
2
- declare const PACKAGES_DEPENDENCIES: readonly ["@powerhousedao/builder-tools", "@powerhousedao/codegen", "@powerhousedao/common", "@powerhousedao/config", "@powerhousedao/design-system", "@powerhousedao/host-core", "document-drive", "document-model", "@powerhousedao/opentelemetry-instrumentation-reactor", "@powerhousedao/pieces-framework", "@powerhousedao/reactor", "@powerhousedao/reactor-api", "@powerhousedao/reactor-attachments", "@powerhousedao/reactor-browser", "@powerhousedao/reactor-drive", "@powerhousedao/reactor-group", "@powerhousedao/reactor-hypercore", "@powerhousedao/reactor-mcp", "@powerhousedao/reactor-privacy", "@powerhousedao/reactor-router", "@powerhousedao/reactor-workflow", "@powerhousedao/registry", "@powerhousedao/switchboard-gui", "@powerhousedao/vetra", "@powerhousedao/workflow", "@powerhousedao/analytics-engine-core", "@powerhousedao/analytics-engine-knex", "@powerhousedao/analytics-engine-pg", "@powerhousedao/analytics-engine-browser", "@powerhousedao/analytics-engine-graphql", "@powerhousedao/shared", "@powerhousedao/powerhouse-vetra-packages", "@renown/sdk"];
3
- declare const CLIS_DEPENDENCIES: string[];
4
- declare const APPS_DEPENDENCIES: string[];
5
- declare const ALL_POWERHOUSE_DEPENDENCIES: string[];
6
- //#endregion
7
- export { PACKAGES_DEPENDENCIES as i, APPS_DEPENDENCIES as n, CLIS_DEPENDENCIES as r, ALL_POWERHOUSE_DEPENDENCIES as t };
8
- export {};
9
- //# sourceMappingURL=constants-HBAa-ako.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants-HBAa-ako.d.ts","names":[],"sources":["../constants.ts"],"mappings":";cACa;cAoCA;cACA;cAKA"}