@postonus/cli 0.1.16 → 0.1.18
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 +116 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 });
|
|
@@ -7554,7 +7641,12 @@ var FromUrlInputSchema = object({
|
|
|
7554
7641
|
url: string2().url(),
|
|
7555
7642
|
scenarioId: _enum(FILE_SCENARIOS)
|
|
7556
7643
|
});
|
|
7557
|
-
var FromUrlOutputSchema = object({
|
|
7644
|
+
var FromUrlOutputSchema = object({
|
|
7645
|
+
uploadId: Uuid,
|
|
7646
|
+
mediaId: Uuid.nullable(),
|
|
7647
|
+
publicUrl: string2(),
|
|
7648
|
+
type: MediaTypeSchema
|
|
7649
|
+
});
|
|
7558
7650
|
var tagged8 = base.route({ tags: ["Uploads"] });
|
|
7559
7651
|
var uploadContract = {
|
|
7560
7652
|
initiateUpload: tagged8.route({ method: "POST", path: "/uploads/initiate", summary: "Get a signed URL to upload a file" }).errors(uploadErrors).input(InitiateUploadInputSchema).output(InitiateUploadOutputSchema),
|
|
@@ -8488,8 +8580,8 @@ var WorkflowRunSchema = object({
|
|
|
8488
8580
|
skipped: number2().int(),
|
|
8489
8581
|
failed: number2().int(),
|
|
8490
8582
|
errorMessage: string2().nullable(),
|
|
8491
|
-
cursorBefore: record(string2(),
|
|
8492
|
-
cursorAfter: record(string2(),
|
|
8583
|
+
cursorBefore: record(string2(), JsonValueSchema).nullable(),
|
|
8584
|
+
cursorAfter: record(string2(), JsonValueSchema).nullable(),
|
|
8493
8585
|
createdAt: Timestamp,
|
|
8494
8586
|
updatedAt: Timestamp,
|
|
8495
8587
|
deletedAt: Timestamp.nullable()
|
|
@@ -9288,8 +9380,21 @@ var ApprovalSettingsInputSchema = object({
|
|
|
9288
9380
|
approverRoles: array(_enum(["owner", "admin", "member"])),
|
|
9289
9381
|
minApprovers: number2().int().min(1).max(5)
|
|
9290
9382
|
});
|
|
9291
|
-
var
|
|
9383
|
+
var WorkspaceSummarySchema = object({
|
|
9384
|
+
id: string2(),
|
|
9385
|
+
name: string2(),
|
|
9386
|
+
logo: string2().nullable(),
|
|
9387
|
+
role: string2()
|
|
9388
|
+
});
|
|
9389
|
+
var publicTagged = base.route({ tags: ["Workspace"] });
|
|
9390
|
+
var tagged19 = publicTagged.meta({ internal: true });
|
|
9292
9391
|
var workspaceContract = {
|
|
9392
|
+
/**
|
|
9393
|
+
* Public, so an OAuth client can offer a workspace switcher: the chosen id goes
|
|
9394
|
+
* back as `x-workspace-id`. An API key is pinned to one workspace, so it lists
|
|
9395
|
+
* only that one.
|
|
9396
|
+
*/
|
|
9397
|
+
list: publicTagged.route({ method: "GET", path: "/workspaces", summary: "List your workspaces" }).errors(authedErrors).output(array(WorkspaceSummarySchema)),
|
|
9293
9398
|
getOwnedCapacity: tagged19.route({ method: "GET", path: "/workspaces/owned-capacity", summary: "Get owned workspace capacity" }).errors(authedErrors).output(OwnedCapacitySchema),
|
|
9294
9399
|
create: tagged19.route({ method: "POST", path: "/workspaces", summary: "Create a workspace", successStatus: 201 }).errors({
|
|
9295
9400
|
...authedErrors,
|
|
@@ -9767,7 +9872,7 @@ var HibernationEventIterator = class extends AsyncIteratorClass {
|
|
|
9767
9872
|
|
|
9768
9873
|
// ../../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
9874
|
var LAZY_SYMBOL = /* @__PURE__ */ Symbol("ORPC_LAZY_SYMBOL");
|
|
9770
|
-
function
|
|
9875
|
+
function lazy2(loader, meta2 = {}) {
|
|
9771
9876
|
return {
|
|
9772
9877
|
[LAZY_SYMBOL]: {
|
|
9773
9878
|
loader,
|
|
@@ -10017,7 +10122,7 @@ function getRouter(router, path) {
|
|
|
10017
10122
|
}
|
|
10018
10123
|
const lazied = current;
|
|
10019
10124
|
const rest = path.slice(i);
|
|
10020
|
-
return
|
|
10125
|
+
return lazy2(async () => {
|
|
10021
10126
|
const unwrapped = await unlazy(lazied);
|
|
10022
10127
|
const next = getRouter(unwrapped.default, rest);
|
|
10023
10128
|
return unlazy(next);
|
|
@@ -10041,7 +10146,7 @@ function enhanceRouter(router, options) {
|
|
|
10041
10146
|
if (isLazy(router)) {
|
|
10042
10147
|
const laziedMeta = getLazyMeta(router);
|
|
10043
10148
|
const enhancedPrefix = laziedMeta?.prefix ? mergePrefix(options.prefix, laziedMeta?.prefix) : options.prefix;
|
|
10044
|
-
const enhanced2 =
|
|
10149
|
+
const enhanced2 = lazy2(async () => {
|
|
10045
10150
|
const { default: unlaziedRouter } = await unlazy(router);
|
|
10046
10151
|
const enhanced3 = enhanceRouter(unlaziedRouter, options);
|
|
10047
10152
|
return unlazy(enhanced3);
|
|
@@ -10454,7 +10559,7 @@ var Builder = class _Builder {
|
|
|
10454
10559
|
* @see {@link https://orpc.dev/docs/router#extending-router Extending Router Docs}
|
|
10455
10560
|
*/
|
|
10456
10561
|
lazy(loader) {
|
|
10457
|
-
return enhanceRouter(
|
|
10562
|
+
return enhanceRouter(lazy2(loader), this["~orpc"]);
|
|
10458
10563
|
}
|
|
10459
10564
|
};
|
|
10460
10565
|
var os = new Builder({
|
|
@@ -11740,12 +11845,12 @@ var ZodToJsonSchemaConverter = class {
|
|
|
11740
11845
|
return [false, json];
|
|
11741
11846
|
}
|
|
11742
11847
|
case "lazy": {
|
|
11743
|
-
const
|
|
11848
|
+
const lazy3 = schema2;
|
|
11744
11849
|
const currentLazyDepth = lazyDepth2 + 1;
|
|
11745
11850
|
if (currentLazyDepth > this.maxLazyDepth) {
|
|
11746
11851
|
return [false, this.anyJsonSchema];
|
|
11747
11852
|
}
|
|
11748
|
-
return this.#convert(
|
|
11853
|
+
return this.#convert(lazy3._zod.def.getter(), options2, currentLazyDepth, structureDepth);
|
|
11749
11854
|
}
|
|
11750
11855
|
default: {
|
|
11751
11856
|
schema2._zod.def.type;
|
|
@@ -11992,7 +12097,7 @@ function formatTable(headers, rows) {
|
|
|
11992
12097
|
}
|
|
11993
12098
|
|
|
11994
12099
|
// src/version.ts
|
|
11995
|
-
var CLI_VERSION = "0.1.
|
|
12100
|
+
var CLI_VERSION = "0.1.18";
|
|
11996
12101
|
|
|
11997
12102
|
// src/client.ts
|
|
11998
12103
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|