@postonus/cli 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1599,6 +1599,7 @@ var bigint = /^-?\d+n?$/;
1599
1599
  var integer = /^-?\d+$/;
1600
1600
  var number = /^-?\d+(?:\.\d+)?$/;
1601
1601
  var boolean = /^(?:true|false)$/i;
1602
+ var _null = /^null$/i;
1602
1603
  var lowercase = /^[^A-Z]*$/;
1603
1604
  var uppercase = /^[^a-z]*$/;
1604
1605
 
@@ -2528,6 +2529,23 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
2528
2529
  return payload;
2529
2530
  };
2530
2531
  });
2532
+ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2533
+ $ZodType.init(inst, def);
2534
+ inst._zod.pattern = _null;
2535
+ inst._zod.values = /* @__PURE__ */ new Set([null]);
2536
+ inst._zod.parse = (payload, _ctx) => {
2537
+ const input = payload.value;
2538
+ if (input === null)
2539
+ return payload;
2540
+ payload.issues.push({
2541
+ expected: "null",
2542
+ code: "invalid_type",
2543
+ input,
2544
+ inst
2545
+ });
2546
+ return payload;
2547
+ };
2548
+ });
2531
2549
  var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
2532
2550
  $ZodType.init(inst, def);
2533
2551
  inst._zod.parse = (payload) => payload;
@@ -3627,6 +3645,23 @@ function handleReadonlyResult(payload) {
3627
3645
  payload.value = Object.freeze(payload.value);
3628
3646
  return payload;
3629
3647
  }
3648
+ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
3649
+ $ZodType.init(inst, def);
3650
+ defineLazy(inst._zod, "innerType", () => {
3651
+ const d = def;
3652
+ if (!d._cachedInner)
3653
+ d._cachedInner = def.getter();
3654
+ return d._cachedInner;
3655
+ });
3656
+ defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
3657
+ defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
3658
+ defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? void 0);
3659
+ defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? void 0);
3660
+ inst._zod.parse = (payload, ctx) => {
3661
+ const inner = inst._zod.innerType;
3662
+ return inner._zod.run(payload, ctx);
3663
+ };
3664
+ });
3630
3665
  var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
3631
3666
  $ZodCheck.init(inst, def);
3632
3667
  $ZodType.init(inst, def);
@@ -4427,6 +4462,13 @@ function _coercedBigint(Class2, params) {
4427
4462
  });
4428
4463
  }
4429
4464
  // @__NO_SIDE_EFFECTS__
4465
+ function _null2(Class2, params) {
4466
+ return new Class2({
4467
+ type: "null",
4468
+ ...normalizeParams(params)
4469
+ });
4470
+ }
4471
+ // @__NO_SIDE_EFFECTS__
4430
4472
  function _unknown(Class2) {
4431
4473
  return new Class2({
4432
4474
  type: "unknown"
@@ -5360,6 +5402,15 @@ var booleanProcessor = (_schema, _ctx, json, _params) => {
5360
5402
  var bigintProcessor = (schema, ctx, json, params) => {
5361
5403
  handleUnrepresentable(schema, ctx, json, params, "BigInt cannot be represented in JSON Schema");
5362
5404
  };
5405
+ var nullProcessor = (_schema, ctx, json, _params) => {
5406
+ if (ctx.target === "openapi-3.0") {
5407
+ json.type = "string";
5408
+ json.nullable = true;
5409
+ json.enum = [null];
5410
+ } else {
5411
+ json.type = "null";
5412
+ }
5413
+ };
5363
5414
  var neverProcessor = (_schema, _ctx, json, _params) => {
5364
5415
  json.not = {};
5365
5416
  };
@@ -5712,6 +5763,12 @@ var optionalProcessor = (schema, ctx, _json, params) => {
5712
5763
  const seen = ctx.seen.get(schema);
5713
5764
  seen.ref = def.innerType;
5714
5765
  };
5766
+ var lazyProcessor = (schema, ctx, _json, params) => {
5767
+ const innerType = schema._zod.innerType;
5768
+ processSchema(innerType, ctx, params);
5769
+ const seen = ctx.seen.get(schema);
5770
+ seen.ref = innerType;
5771
+ };
5715
5772
 
5716
5773
  // ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/errors.js
5717
5774
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
@@ -6335,6 +6392,14 @@ var ZodBigInt = /* @__PURE__ */ $constructor(
6335
6392
  }
6336
6393
  })
6337
6394
  );
6395
+ var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
6396
+ $ZodNull.init(inst, def);
6397
+ ZodType.init(inst, def);
6398
+ inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
6399
+ });
6400
+ function _null3(params) {
6401
+ return _null2(ZodNull, params);
6402
+ }
6338
6403
  var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
6339
6404
  $ZodUnknown.init(inst, def);
6340
6405
  ZodType.init(inst, def);
@@ -6753,6 +6818,18 @@ function readonly(innerType) {
6753
6818
  innerType
6754
6819
  });
6755
6820
  }
6821
+ var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
6822
+ $ZodLazy.init(inst, def);
6823
+ ZodType.init(inst, def);
6824
+ inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
6825
+ inst.unwrap = () => inst._zod.def.getter();
6826
+ });
6827
+ function lazy(getter) {
6828
+ return new ZodLazy({
6829
+ type: "lazy",
6830
+ getter
6831
+ });
6832
+ }
6756
6833
  var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
6757
6834
  $ZodCustom.init(inst, def);
6758
6835
  ZodType.init(inst, def);
@@ -6822,6 +6899,16 @@ var base = oc.$meta({});
6822
6899
  // ../../packages/api-contract/src/common.ts
6823
6900
  var PlatformSchema = _enum(PLATFORM_VALUES);
6824
6901
  var Timestamp = iso_exports.datetime();
6902
+ var JsonValueSchema = lazy(
6903
+ () => union([
6904
+ string2(),
6905
+ number2(),
6906
+ boolean2(),
6907
+ _null3(),
6908
+ array(JsonValueSchema),
6909
+ record(string2(), JsonValueSchema)
6910
+ ])
6911
+ );
6825
6912
  var DateInput = coerce_exports.date();
6826
6913
  var Uuid = string2().uuid();
6827
6914
  var IdPathParam = object({ id: Uuid });
@@ -8488,8 +8575,8 @@ var WorkflowRunSchema = object({
8488
8575
  skipped: number2().int(),
8489
8576
  failed: number2().int(),
8490
8577
  errorMessage: string2().nullable(),
8491
- cursorBefore: record(string2(), unknown()).nullable(),
8492
- cursorAfter: record(string2(), unknown()).nullable(),
8578
+ cursorBefore: record(string2(), JsonValueSchema).nullable(),
8579
+ cursorAfter: record(string2(), JsonValueSchema).nullable(),
8493
8580
  createdAt: Timestamp,
8494
8581
  updatedAt: Timestamp,
8495
8582
  deletedAt: Timestamp.nullable()
@@ -9767,7 +9854,7 @@ var HibernationEventIterator = class extends AsyncIteratorClass {
9767
9854
 
9768
9855
  // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9769
9856
  var LAZY_SYMBOL = /* @__PURE__ */ Symbol("ORPC_LAZY_SYMBOL");
9770
- function lazy(loader, meta2 = {}) {
9857
+ function lazy2(loader, meta2 = {}) {
9771
9858
  return {
9772
9859
  [LAZY_SYMBOL]: {
9773
9860
  loader,
@@ -10017,7 +10104,7 @@ function getRouter(router, path) {
10017
10104
  }
10018
10105
  const lazied = current;
10019
10106
  const rest = path.slice(i);
10020
- return lazy(async () => {
10107
+ return lazy2(async () => {
10021
10108
  const unwrapped = await unlazy(lazied);
10022
10109
  const next = getRouter(unwrapped.default, rest);
10023
10110
  return unlazy(next);
@@ -10041,7 +10128,7 @@ function enhanceRouter(router, options) {
10041
10128
  if (isLazy(router)) {
10042
10129
  const laziedMeta = getLazyMeta(router);
10043
10130
  const enhancedPrefix = laziedMeta?.prefix ? mergePrefix(options.prefix, laziedMeta?.prefix) : options.prefix;
10044
- const enhanced2 = lazy(async () => {
10131
+ const enhanced2 = lazy2(async () => {
10045
10132
  const { default: unlaziedRouter } = await unlazy(router);
10046
10133
  const enhanced3 = enhanceRouter(unlaziedRouter, options);
10047
10134
  return unlazy(enhanced3);
@@ -10454,7 +10541,7 @@ var Builder = class _Builder {
10454
10541
  * @see {@link https://orpc.dev/docs/router#extending-router Extending Router Docs}
10455
10542
  */
10456
10543
  lazy(loader) {
10457
- return enhanceRouter(lazy(loader), this["~orpc"]);
10544
+ return enhanceRouter(lazy2(loader), this["~orpc"]);
10458
10545
  }
10459
10546
  };
10460
10547
  var os = new Builder({
@@ -11740,12 +11827,12 @@ var ZodToJsonSchemaConverter = class {
11740
11827
  return [false, json];
11741
11828
  }
11742
11829
  case "lazy": {
11743
- const lazy2 = schema2;
11830
+ const lazy3 = schema2;
11744
11831
  const currentLazyDepth = lazyDepth2 + 1;
11745
11832
  if (currentLazyDepth > this.maxLazyDepth) {
11746
11833
  return [false, this.anyJsonSchema];
11747
11834
  }
11748
- return this.#convert(lazy2._zod.def.getter(), options2, currentLazyDepth, structureDepth);
11835
+ return this.#convert(lazy3._zod.def.getter(), options2, currentLazyDepth, structureDepth);
11749
11836
  }
11750
11837
  default: {
11751
11838
  schema2._zod.def.type;
@@ -11992,7 +12079,7 @@ function formatTable(headers, rows) {
11992
12079
  }
11993
12080
 
11994
12081
  // src/version.ts
11995
- var CLI_VERSION = "0.1.15";
12082
+ var CLI_VERSION = "0.1.17";
11996
12083
 
11997
12084
  // src/client.ts
11998
12085
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";