@powerhousedao/ph-cli 6.2.3-dev.70 → 6.2.3-dev.72

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.
Files changed (79) hide show
  1. package/dist/{cli-connect-override-Cf7WutqU.mjs → cli-connect-override-CEJhQWRX.mjs} +5 -5
  2. package/dist/cli-connect-override-CEJhQWRX.mjs.map +1 -0
  3. package/dist/cli.mjs +4 -4
  4. package/dist/compound-B6RZMA0Y-Cv3XMQ3Y.mjs +2459 -0
  5. package/dist/compound-B6RZMA0Y-Cv3XMQ3Y.mjs.map +1 -0
  6. package/dist/{connect-build-BtKpvcQK.mjs → connect-build-BfhOGbha.mjs} +4 -4
  7. package/dist/{connect-build-BtKpvcQK.mjs.map → connect-build-BfhOGbha.mjs.map} +1 -1
  8. package/dist/{connect-config-9EZB_0H_.mjs → connect-config-DblqJgxR.mjs} +4 -4
  9. package/dist/{connect-config-9EZB_0H_.mjs.map → connect-config-DblqJgxR.mjs.map} +1 -1
  10. package/dist/connect-plugin-configs-D2fwYpMw.mjs +50 -0
  11. package/dist/connect-plugin-configs-D2fwYpMw.mjs.map +1 -0
  12. package/dist/{connect-studio-Bhlc77WI.mjs → connect-studio-B1_4TNEb.mjs} +8 -6
  13. package/dist/connect-studio-B1_4TNEb.mjs.map +1 -0
  14. package/dist/{connect-studio-BehPZzN7.mjs → connect-studio-BS26pchr.mjs} +3 -3
  15. package/dist/{dist-BqeDFgEy.mjs → dist-CCLkwpTS.mjs} +199 -109
  16. package/dist/dist-CCLkwpTS.mjs.map +1 -0
  17. package/dist/explain-DUXbB9jf.mjs +241 -0
  18. package/dist/explain-DUXbB9jf.mjs.map +1 -0
  19. package/dist/{generate-all-C_sPGBuk.mjs → generate-all-Dgyy_kT-.mjs} +7 -3
  20. package/dist/generate-all-Dgyy_kT-.mjs.map +1 -0
  21. package/dist/{generate-desktop-shell-BBSGpmud.mjs → generate-desktop-shell-BdXDiS5o.mjs} +113 -7
  22. package/dist/generate-desktop-shell-BdXDiS5o.mjs.map +1 -0
  23. package/dist/generate-hosts-BFmPIW2X.mjs +18 -0
  24. package/dist/generate-hosts-BFmPIW2X.mjs.map +1 -0
  25. package/dist/generate-hosts-RWj7WPHZ.mjs +4 -0
  26. package/dist/{index-CspiP73o.d.mts → index-BIbx17vt.d.mts} +178 -14
  27. package/dist/index-BIbx17vt.d.mts.map +1 -0
  28. package/dist/{ph-cli-commands-3ptdQ0NI.mjs → ph-cli-commands-DSAhaETu.mjs} +156 -139
  29. package/dist/ph-cli-commands-DSAhaETu.mjs.map +1 -0
  30. package/dist/ph-cli-commands-d5XjMWW0.mjs +4 -0
  31. package/dist/{run-sugar-BdjKTPGO.mjs → run-sugar-Ns53R6lU.mjs} +4 -4
  32. package/dist/{run-sugar-BdjKTPGO.mjs.map → run-sugar-Ns53R6lU.mjs.map} +1 -1
  33. package/dist/runners/connect.d.mts +1054 -26
  34. package/dist/runners/connect.d.mts.map +1 -1
  35. package/dist/runners/connect.mjs +127 -50
  36. package/dist/runners/connect.mjs.map +1 -1
  37. package/dist/runners/switchboard.d.mts +170 -28
  38. package/dist/runners/switchboard.d.mts.map +1 -1
  39. package/dist/runners/switchboard.mjs +171 -49
  40. package/dist/runners/switchboard.mjs.map +1 -1
  41. package/dist/{schemas-BQSPev1x.mjs → schemas-D5N5U_Mf.mjs} +205 -4
  42. package/dist/{schemas-BQSPev1x.mjs.map → schemas-D5N5U_Mf.mjs.map} +1 -1
  43. package/dist/scripts/emit-runner-schemas.ts +24 -0
  44. package/dist/start-run-BIaYSpHh.mjs +124 -0
  45. package/dist/start-run-BIaYSpHh.mjs.map +1 -0
  46. package/dist/{superseded-config-9D7BdLvd.mjs → superseded-config-CbSTFun2.mjs} +4 -4
  47. package/dist/superseded-config-CbSTFun2.mjs.map +1 -0
  48. package/dist/switchboard-h4-XgP1h.mjs +2 -2
  49. package/dist/switchboard-h4-XgP1h.mjs.map +1 -1
  50. package/dist/utils-DAux4Ga7.mjs +4 -0
  51. package/dist/{vetra-BD-34wGs.mjs → vetra-UQsfYM_Q.mjs} +10 -10
  52. package/dist/vetra-UQsfYM_Q.mjs.map +1 -0
  53. package/package.json +15 -20
  54. package/dist/cli-connect-override-Cf7WutqU.mjs.map +0 -1
  55. package/dist/connect-studio-Bhlc77WI.mjs.map +0 -1
  56. package/dist/dist-BqeDFgEy.mjs.map +0 -1
  57. package/dist/explain-BDHmXgw3.mjs +0 -27
  58. package/dist/explain-BDHmXgw3.mjs.map +0 -1
  59. package/dist/generate-all-C_sPGBuk.mjs.map +0 -1
  60. package/dist/generate-desktop-shell-BBSGpmud.mjs.map +0 -1
  61. package/dist/host-schemas-CtPNRr5v-BQyKKFbS.mjs +0 -493
  62. package/dist/host-schemas-CtPNRr5v-BQyKKFbS.mjs.map +0 -1
  63. package/dist/index-CspiP73o.d.mts.map +0 -1
  64. package/dist/ph-cli-commands-3ptdQ0NI.mjs.map +0 -1
  65. package/dist/ph-cli-commands-Dx8hNj6W.mjs +0 -4
  66. package/dist/plugins-CHVv4qup.mjs +0 -91
  67. package/dist/plugins-CHVv4qup.mjs.map +0 -1
  68. package/dist/reactor-env-BbR86_Li.mjs +0 -29
  69. package/dist/reactor-env-BbR86_Li.mjs.map +0 -1
  70. package/dist/reactor-env-D_EvBtLB.mjs +0 -4
  71. package/dist/runners/compound.d.mts +0 -127
  72. package/dist/runners/compound.d.mts.map +0 -1
  73. package/dist/runners/compound.mjs +0 -72
  74. package/dist/runners/compound.mjs.map +0 -1
  75. package/dist/start-run-CmDxyMw0.mjs +0 -36
  76. package/dist/start-run-CmDxyMw0.mjs.map +0 -1
  77. package/dist/superseded-config-9D7BdLvd.mjs.map +0 -1
  78. package/dist/utils-TO9lB8Xs.mjs +0 -4
  79. package/dist/vetra-BD-34wGs.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cd23951b-05b2-5ced-9ed3-1edf36cf8d22")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f127d75c-98fe-50ba-96b2-cba545041922")}catch(e){}}();
4
4
  function getEnumValues(entries) {
5
5
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
6
6
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -4275,9 +4275,33 @@ const numberProcessor = (schema, ctx, _json, params) => {
4275
4275
  const booleanProcessor = (_schema, _ctx, json, _params) => {
4276
4276
  json.type = "boolean";
4277
4277
  };
4278
+ const bigintProcessor = (schema, ctx, json, params) => {
4279
+ handleUnrepresentable(schema, ctx, json, params, "BigInt cannot be represented in JSON Schema");
4280
+ };
4281
+ const symbolProcessor = (schema, ctx, json, params) => {
4282
+ handleUnrepresentable(schema, ctx, json, params, "Symbols cannot be represented in JSON Schema");
4283
+ };
4284
+ const nullProcessor = (_schema, ctx, json, _params) => {
4285
+ if (ctx.target === "openapi-3.0") {
4286
+ json.type = "string";
4287
+ json.nullable = true;
4288
+ json.enum = [null];
4289
+ } else json.type = "null";
4290
+ };
4291
+ const undefinedProcessor = (schema, ctx, json, params) => {
4292
+ handleUnrepresentable(schema, ctx, json, params, "Undefined cannot be represented in JSON Schema");
4293
+ };
4294
+ const voidProcessor = (schema, ctx, json, params) => {
4295
+ handleUnrepresentable(schema, ctx, json, params, "Void cannot be represented in JSON Schema");
4296
+ };
4278
4297
  const neverProcessor = (_schema, _ctx, json, _params) => {
4279
4298
  json.not = {};
4280
4299
  };
4300
+ const anyProcessor = (_schema, _ctx, _json, _params) => {};
4301
+ const unknownProcessor = (_schema, _ctx, _json, _params) => {};
4302
+ const dateProcessor = (schema, ctx, json, params) => {
4303
+ handleUnrepresentable(schema, ctx, json, params, "Date cannot be represented in JSON Schema");
4304
+ };
4281
4305
  const enumProcessor = (schema, _ctx, json, _params) => {
4282
4306
  const def = schema._zod.def;
4283
4307
  const values = getEnumValues(def.entries);
@@ -4315,12 +4339,47 @@ const literalProcessor = (schema, ctx, json, params) => {
4315
4339
  json.enum = vals;
4316
4340
  }
4317
4341
  };
4342
+ const nanProcessor = (schema, ctx, json, params) => {
4343
+ handleUnrepresentable(schema, ctx, json, params, "NaN cannot be represented in JSON Schema");
4344
+ };
4345
+ const templateLiteralProcessor = (schema, _ctx, json, _params) => {
4346
+ const _json = json;
4347
+ const pattern = schema._zod.pattern;
4348
+ if (!pattern) throw new Error("Pattern not found in template literal");
4349
+ _json.type = "string";
4350
+ _json.pattern = pattern.source;
4351
+ };
4352
+ const fileProcessor = (schema, _ctx, json, _params) => {
4353
+ const _json = json;
4354
+ _json.type = "string";
4355
+ _json.format = "binary";
4356
+ _json.contentEncoding = "binary";
4357
+ const { minimum, maximum, mime } = aggregateChecks(schema);
4358
+ if (minimum !== void 0) _json.minLength = minimum;
4359
+ if (maximum !== void 0) _json.maxLength = maximum;
4360
+ if (!mime) return;
4361
+ if (mime.length === 0) _json.not = {};
4362
+ else if (mime.length === 1) _json.contentMediaType = mime[0];
4363
+ else _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4364
+ };
4365
+ const successProcessor = (_schema, _ctx, json, _params) => {
4366
+ json.type = "boolean";
4367
+ };
4318
4368
  const customProcessor = (schema, ctx, json, params) => {
4319
4369
  handleUnrepresentable(schema, ctx, json, params, "Custom types cannot be represented in JSON Schema");
4320
4370
  };
4371
+ const functionProcessor = (schema, ctx, json, params) => {
4372
+ handleUnrepresentable(schema, ctx, json, params, "Function types cannot be represented in JSON Schema");
4373
+ };
4321
4374
  const transformProcessor = (schema, ctx, json, params) => {
4322
4375
  handleUnrepresentable(schema, ctx, json, params, "Transforms cannot be represented in JSON Schema");
4323
4376
  };
4377
+ const mapProcessor = (schema, ctx, json, params) => {
4378
+ handleUnrepresentable(schema, ctx, json, params, "Map cannot be represented in JSON Schema");
4379
+ };
4380
+ const setProcessor = (schema, ctx, json, params) => {
4381
+ handleUnrepresentable(schema, ctx, json, params, "Set cannot be represented in JSON Schema");
4382
+ };
4324
4383
  const arrayProcessor = (schema, ctx, _json, params) => {
4325
4384
  const json = _json;
4326
4385
  const def = schema._zod.def;
@@ -4405,6 +4464,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4405
4464
  json.allOf = allOf;
4406
4465
  ctx.intersections.push(allOf);
4407
4466
  };
4467
+ const tupleProcessor = (schema, ctx, _json, params) => {
4468
+ const json = _json;
4469
+ const def = schema._zod.def;
4470
+ json.type = "array";
4471
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
4472
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
4473
+ const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
4474
+ ...params,
4475
+ path: [
4476
+ ...params.path,
4477
+ prefixPath,
4478
+ i
4479
+ ]
4480
+ }));
4481
+ const rest = def.rest ? processSchema(def.rest, ctx, {
4482
+ ...params,
4483
+ path: [
4484
+ ...params.path,
4485
+ restPath,
4486
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
4487
+ ]
4488
+ }) : null;
4489
+ let minItems = def.items.length;
4490
+ while (minItems > 0) {
4491
+ const item = def.items[minItems - 1];
4492
+ if (!(ctx.io === "input" ? inputOptin(item) !== void 0 : item._zod.optout === "optional")) break;
4493
+ minItems--;
4494
+ }
4495
+ const maxItems = def.items.length;
4496
+ const isClosed = !def.rest;
4497
+ if (ctx.target === "draft-2020-12") {
4498
+ json.prefixItems = prefixItems;
4499
+ if (isClosed) json.items = false;
4500
+ else if (rest) json.items = rest;
4501
+ if (minItems > 0) json.minItems = minItems;
4502
+ if (isClosed) json.maxItems = maxItems;
4503
+ } else if (ctx.target === "openapi-3.0") {
4504
+ json.items = { anyOf: prefixItems };
4505
+ if (rest) json.items.anyOf.push(rest);
4506
+ if (minItems > 0) json.minItems = minItems;
4507
+ if (isClosed) json.maxItems = maxItems;
4508
+ } else {
4509
+ json.items = prefixItems;
4510
+ if (isClosed) json.additionalItems = false;
4511
+ else if (rest) json.additionalItems = rest;
4512
+ if (minItems > 0) json.minItems = minItems;
4513
+ if (isClosed) json.maxItems = maxItems;
4514
+ }
4515
+ const { minimum, maximum } = aggregateChecks(schema);
4516
+ if (typeof minimum === "number") json.minItems = minimum;
4517
+ if (typeof maximum === "number") json.maxItems = maximum;
4518
+ };
4408
4519
  /** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
4409
4520
  * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
4410
4521
  * behind a wrapper only carries its own `type` before then, and a union key only has its branches.
@@ -4582,12 +4693,99 @@ const readonlyProcessor = (schema, ctx, json, params) => {
4582
4693
  seen.ref = def.innerType;
4583
4694
  json.readOnly = true;
4584
4695
  };
4696
+ const promiseProcessor = (schema, ctx, _json, params) => {
4697
+ const def = schema._zod.def;
4698
+ processSchema(def.innerType, ctx, params);
4699
+ const seen = ctx.seen.get(schema);
4700
+ seen.ref = def.innerType;
4701
+ };
4585
4702
  const optionalProcessor = (schema, ctx, _json, params) => {
4586
4703
  const def = schema._zod.def;
4587
4704
  processSchema(def.innerType, ctx, params);
4588
4705
  const seen = ctx.seen.get(schema);
4589
4706
  seen.ref = def.innerType;
4590
4707
  };
4708
+ const lazyProcessor = (schema, ctx, _json, params) => {
4709
+ const innerType = schema._zod.innerType;
4710
+ processSchema(innerType, ctx, params);
4711
+ const seen = ctx.seen.get(schema);
4712
+ seen.ref = innerType;
4713
+ };
4714
+ const allProcessors = {
4715
+ string: stringProcessor,
4716
+ number: numberProcessor,
4717
+ boolean: booleanProcessor,
4718
+ bigint: bigintProcessor,
4719
+ symbol: symbolProcessor,
4720
+ null: nullProcessor,
4721
+ undefined: undefinedProcessor,
4722
+ void: voidProcessor,
4723
+ never: neverProcessor,
4724
+ any: anyProcessor,
4725
+ unknown: unknownProcessor,
4726
+ date: dateProcessor,
4727
+ enum: enumProcessor,
4728
+ literal: literalProcessor,
4729
+ nan: nanProcessor,
4730
+ template_literal: templateLiteralProcessor,
4731
+ file: fileProcessor,
4732
+ success: successProcessor,
4733
+ custom: customProcessor,
4734
+ function: functionProcessor,
4735
+ transform: transformProcessor,
4736
+ map: mapProcessor,
4737
+ set: setProcessor,
4738
+ array: arrayProcessor,
4739
+ object: objectProcessor,
4740
+ union: unionProcessor,
4741
+ intersection: intersectionProcessor,
4742
+ tuple: tupleProcessor,
4743
+ record: recordProcessor,
4744
+ nullable: nullableProcessor,
4745
+ nonoptional: nonoptionalProcessor,
4746
+ default: defaultProcessor,
4747
+ prefault: prefaultProcessor,
4748
+ catch: catchProcessor,
4749
+ pipe: pipeProcessor,
4750
+ readonly: readonlyProcessor,
4751
+ promise: promiseProcessor,
4752
+ optional: optionalProcessor,
4753
+ lazy: lazyProcessor
4754
+ };
4755
+ function toJSONSchema(input, params) {
4756
+ if ("_idmap" in input) {
4757
+ const registry = input;
4758
+ const ctx = initializeContext({
4759
+ ...params,
4760
+ processors: allProcessors
4761
+ });
4762
+ const defs = {};
4763
+ for (const entry of registry._idmap.entries()) {
4764
+ const [_, schema] = entry;
4765
+ processSchema(schema, ctx);
4766
+ }
4767
+ const schemas = {};
4768
+ ctx.external = {
4769
+ registry,
4770
+ uri: params?.uri,
4771
+ defs
4772
+ };
4773
+ for (const entry of registry._idmap.entries()) {
4774
+ const [key, schema] = entry;
4775
+ extractDefs(ctx, schema);
4776
+ assignProp(schemas, key, finalize(ctx, schema));
4777
+ }
4778
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
4779
+ return { schemas };
4780
+ }
4781
+ const ctx = initializeContext({
4782
+ ...params,
4783
+ processors: allProcessors
4784
+ });
4785
+ processSchema(input, ctx);
4786
+ extractDefs(ctx, input);
4787
+ return finalize(ctx, input);
4788
+ }
4591
4789
  //#endregion
4592
4790
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
4593
4791
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
@@ -5007,6 +5205,9 @@ const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
5007
5205
  $ZodURL.init(inst, def);
5008
5206
  ZodStringFormat.init(inst, def);
5009
5207
  });
5208
+ function url(params) {
5209
+ return /* @__PURE__ */ _url(ZodURL, params);
5210
+ }
5010
5211
  const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
5011
5212
  $ZodEmoji.init(inst, def);
5012
5213
  ZodStringFormat.init(inst, def);
@@ -5531,7 +5732,7 @@ function superRefine(fn, params) {
5531
5732
  return /* @__PURE__ */ _superRefine(fn, params);
5532
5733
  }
5533
5734
  //#endregion
5534
- export { looseObject as a, strictObject as c, unknown as d, prettifyError as f, literal as i, string as l, array as n, number as o, boolean as r, record as s, _enum as t, union as u };
5735
+ export { looseObject as a, strictObject as c, unknown as d, url as f, literal as i, string as l, prettifyError as m, array as n, number as o, toJSONSchema as p, boolean as r, record as s, _enum as t, union as u };
5535
5736
 
5536
- //# sourceMappingURL=schemas-BQSPev1x.mjs.map
5537
- //# debugId=cd23951b-05b2-5ced-9ed3-1edf36cf8d22
5737
+ //# sourceMappingURL=schemas-D5N5U_Mf.mjs.map
5738
+ //# debugId=f127d75c-98fe-50ba-96b2-cba545041922