ply-ui-cli 1.1.118 → 1.1.121
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 +2 -2
- package/dist/vendor.js +173 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108,7 +108,7 @@ function parseArgs(argv) {
|
|
|
108
108
|
async function main() {
|
|
109
109
|
const { command, positionals, flags } = parseArgs(process.argv.slice(2));
|
|
110
110
|
if (flags.version && !command) {
|
|
111
|
-
console.log("1.1.
|
|
111
|
+
console.log("1.1.121");
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
if (flags.help || !command) {
|
|
@@ -158,7 +158,7 @@ async function main() {
|
|
|
158
158
|
}
|
|
159
159
|
case "--version":
|
|
160
160
|
case "-V":
|
|
161
|
-
console.log("1.1.
|
|
161
|
+
console.log("1.1.121");
|
|
162
162
|
return;
|
|
163
163
|
default:
|
|
164
164
|
console.error(`Unknown command: ${command}`);
|
package/dist/vendor.js
CHANGED
|
@@ -15111,7 +15111,7 @@ ${content.join("\n")}
|
|
|
15111
15111
|
var version = {
|
|
15112
15112
|
major: 4,
|
|
15113
15113
|
minor: 5,
|
|
15114
|
-
patch:
|
|
15114
|
+
patch: 4
|
|
15115
15115
|
};
|
|
15116
15116
|
|
|
15117
15117
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -17404,22 +17404,99 @@ function isRecursive(inst, stack) {
|
|
|
17404
17404
|
result = true;
|
|
17405
17405
|
};
|
|
17406
17406
|
const def = inst._zod.def;
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17407
|
+
const kind = def.type;
|
|
17408
|
+
switch (kind) {
|
|
17409
|
+
case "object": {
|
|
17410
|
+
for (const key of Reflect.ownKeys(def.shape))
|
|
17411
|
+
check2(def.shape[key]);
|
|
17412
|
+
check2(def.catchall);
|
|
17413
|
+
break;
|
|
17414
|
+
}
|
|
17415
|
+
case "array":
|
|
17416
|
+
check2(def.element);
|
|
17417
|
+
break;
|
|
17418
|
+
case "tuple":
|
|
17419
|
+
for (const el of def.items)
|
|
17420
|
+
check2(el);
|
|
17421
|
+
check2(def.rest);
|
|
17422
|
+
break;
|
|
17423
|
+
case "record":
|
|
17424
|
+
case "map":
|
|
17425
|
+
check2(def.keyType);
|
|
17426
|
+
check2(def.valueType);
|
|
17427
|
+
break;
|
|
17428
|
+
case "set":
|
|
17429
|
+
check2(def.valueType);
|
|
17430
|
+
break;
|
|
17431
|
+
case "union":
|
|
17432
|
+
for (const el of def.options)
|
|
17433
|
+
check2(el);
|
|
17434
|
+
break;
|
|
17435
|
+
case "intersection":
|
|
17436
|
+
check2(def.left);
|
|
17437
|
+
check2(def.right);
|
|
17438
|
+
break;
|
|
17439
|
+
case "optional":
|
|
17440
|
+
case "nullable":
|
|
17441
|
+
case "default":
|
|
17442
|
+
case "prefault":
|
|
17443
|
+
case "catch":
|
|
17444
|
+
case "readonly":
|
|
17445
|
+
case "nonoptional":
|
|
17446
|
+
case "promise":
|
|
17447
|
+
case "success":
|
|
17448
|
+
check2(def.innerType);
|
|
17449
|
+
break;
|
|
17450
|
+
case "pipe":
|
|
17451
|
+
check2(def.in);
|
|
17452
|
+
check2(def.out);
|
|
17453
|
+
break;
|
|
17454
|
+
case "function":
|
|
17455
|
+
check2(def.input);
|
|
17456
|
+
check2(def.output);
|
|
17457
|
+
break;
|
|
17458
|
+
// reading `_zod.innerType` resolves the getter once and caches it
|
|
17459
|
+
case "lazy":
|
|
17460
|
+
check2(inst._zod.innerType);
|
|
17461
|
+
break;
|
|
17462
|
+
// a leaf by choice: `parts` are regex fragments, not data positions
|
|
17463
|
+
case "template_literal":
|
|
17464
|
+
// leaves
|
|
17465
|
+
case "string":
|
|
17466
|
+
case "number":
|
|
17467
|
+
case "int":
|
|
17468
|
+
case "boolean":
|
|
17469
|
+
case "bigint":
|
|
17470
|
+
case "symbol":
|
|
17471
|
+
case "undefined":
|
|
17472
|
+
case "null":
|
|
17473
|
+
case "void":
|
|
17474
|
+
case "never":
|
|
17475
|
+
case "any":
|
|
17476
|
+
case "unknown":
|
|
17477
|
+
case "date":
|
|
17478
|
+
case "nan":
|
|
17479
|
+
case "enum":
|
|
17480
|
+
case "literal":
|
|
17481
|
+
case "file":
|
|
17482
|
+
case "transform":
|
|
17483
|
+
case "custom":
|
|
17484
|
+
break;
|
|
17485
|
+
default: {
|
|
17486
|
+
kind;
|
|
17487
|
+
for (const key in def) {
|
|
17488
|
+
const desc = Object.getOwnPropertyDescriptor(def, key);
|
|
17489
|
+
if (!desc || desc.get)
|
|
17490
|
+
continue;
|
|
17491
|
+
const value = desc.value;
|
|
17492
|
+
if (!value || typeof value !== "object")
|
|
17493
|
+
continue;
|
|
17494
|
+
if (value._zod)
|
|
17495
|
+
check2(value);
|
|
17496
|
+
else if (Array.isArray(value))
|
|
17497
|
+
for (const el of value)
|
|
17498
|
+
check2(el);
|
|
17499
|
+
}
|
|
17423
17500
|
}
|
|
17424
17501
|
}
|
|
17425
17502
|
stack.delete(inst);
|
|
@@ -27552,6 +27629,7 @@ function initializeContext(params) {
|
|
|
27552
27629
|
cycles: params?.cycles ?? "ref",
|
|
27553
27630
|
reused: params?.reused ?? "inline",
|
|
27554
27631
|
intersections: [],
|
|
27632
|
+
deferred: [],
|
|
27555
27633
|
external: params?.external ?? void 0
|
|
27556
27634
|
};
|
|
27557
27635
|
}
|
|
@@ -27900,6 +27978,8 @@ function finalize(ctx, schema) {
|
|
|
27900
27978
|
compactTypeUnion(entry[1].def ?? entry[1].schema);
|
|
27901
27979
|
}
|
|
27902
27980
|
}
|
|
27981
|
+
for (const rewrite of ctx.deferred)
|
|
27982
|
+
rewrite();
|
|
27903
27983
|
if (ctx.intersections.length) {
|
|
27904
27984
|
const carriers = /* @__PURE__ */ new Map();
|
|
27905
27985
|
for (const seen of ctx.seen.values()) {
|
|
@@ -28076,12 +28156,12 @@ var stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
28076
28156
|
if (contentEncoding)
|
|
28077
28157
|
json2.contentEncoding = contentEncoding;
|
|
28078
28158
|
if (patterns && patterns.size > 0) {
|
|
28079
|
-
const
|
|
28080
|
-
if (
|
|
28081
|
-
json2.pattern =
|
|
28082
|
-
else if (
|
|
28159
|
+
const patternList = [...patterns];
|
|
28160
|
+
if (patternList.length === 1)
|
|
28161
|
+
json2.pattern = patternList[0].source;
|
|
28162
|
+
else if (patternList.length > 1) {
|
|
28083
28163
|
json2.allOf = [
|
|
28084
|
-
...
|
|
28164
|
+
...patternList.map((regex) => ({
|
|
28085
28165
|
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
28086
28166
|
pattern: regex.source
|
|
28087
28167
|
}))
|
|
@@ -28425,6 +28505,69 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
28425
28505
|
if (typeof maximum === "number")
|
|
28426
28506
|
json2.maxItems = maximum;
|
|
28427
28507
|
};
|
|
28508
|
+
function stringifyKeyNames(bySchema, json2, visited) {
|
|
28509
|
+
if (json2.$ref) {
|
|
28510
|
+
if (visited.has(json2))
|
|
28511
|
+
return json2;
|
|
28512
|
+
visited.add(json2);
|
|
28513
|
+
const def = bySchema.get(json2)?.def;
|
|
28514
|
+
if (!def)
|
|
28515
|
+
return json2;
|
|
28516
|
+
const inlined = stringifyKeyNames(bySchema, def, visited);
|
|
28517
|
+
return inlined === def ? json2 : inlined;
|
|
28518
|
+
}
|
|
28519
|
+
for (const keyword of ["anyOf", "oneOf"]) {
|
|
28520
|
+
const branches = json2[keyword];
|
|
28521
|
+
if (!Array.isArray(branches))
|
|
28522
|
+
continue;
|
|
28523
|
+
const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));
|
|
28524
|
+
if (mapped.some((branch, i) => branch !== branches[i]))
|
|
28525
|
+
json2 = { ...json2, [keyword]: mapped };
|
|
28526
|
+
}
|
|
28527
|
+
const types = Array.isArray(json2.type) ? json2.type : [json2.type];
|
|
28528
|
+
const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
|
|
28529
|
+
const values = json2.enum ?? (json2.const !== void 0 ? [json2.const] : void 0);
|
|
28530
|
+
if (!numericType && !values?.some((v) => typeof v === "number"))
|
|
28531
|
+
return json2;
|
|
28532
|
+
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json2;
|
|
28533
|
+
if (rest.enum)
|
|
28534
|
+
rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
|
|
28535
|
+
else if (typeof rest.const === "number")
|
|
28536
|
+
rest.const = String(rest.const);
|
|
28537
|
+
if (!numericType)
|
|
28538
|
+
return rest;
|
|
28539
|
+
rest.type = "string";
|
|
28540
|
+
if (!values)
|
|
28541
|
+
rest.pattern = (types.includes("number") ? number : integer).source;
|
|
28542
|
+
return rest;
|
|
28543
|
+
}
|
|
28544
|
+
var pendingRecords = /* @__PURE__ */ new WeakMap();
|
|
28545
|
+
function rewriteKeyNames(ctx) {
|
|
28546
|
+
const bySchema = /* @__PURE__ */ new Map();
|
|
28547
|
+
for (const entry of ctx.seen.values()) {
|
|
28548
|
+
if (entry.def && !bySchema.has(entry.schema))
|
|
28549
|
+
bySchema.set(entry.schema, entry);
|
|
28550
|
+
}
|
|
28551
|
+
const rewrites = /* @__PURE__ */ new Map();
|
|
28552
|
+
for (const record2 of pendingRecords.get(ctx) ?? []) {
|
|
28553
|
+
const seen = ctx.seen.get(record2);
|
|
28554
|
+
const names = (seen?.def ?? seen?.schema)?.propertyNames;
|
|
28555
|
+
if (!names || names === true || rewrites.has(names))
|
|
28556
|
+
continue;
|
|
28557
|
+
const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
|
|
28558
|
+
if (rewritten !== names)
|
|
28559
|
+
rewrites.set(names, rewritten);
|
|
28560
|
+
}
|
|
28561
|
+
if (!rewrites.size)
|
|
28562
|
+
return;
|
|
28563
|
+
for (const entry of ctx.seen.values()) {
|
|
28564
|
+
for (const carrier of [entry.schema, entry.def]) {
|
|
28565
|
+
const rewritten = carrier && rewrites.get(carrier.propertyNames);
|
|
28566
|
+
if (rewritten)
|
|
28567
|
+
carrier.propertyNames = rewritten;
|
|
28568
|
+
}
|
|
28569
|
+
}
|
|
28570
|
+
}
|
|
28428
28571
|
var recordProcessor = (schema, ctx, _json, params) => {
|
|
28429
28572
|
const json2 = _json;
|
|
28430
28573
|
const def = schema._zod.def;
|
|
@@ -28447,6 +28590,13 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
28447
28590
|
...params,
|
|
28448
28591
|
path: [...params.path, "propertyNames"]
|
|
28449
28592
|
});
|
|
28593
|
+
let pending = pendingRecords.get(ctx);
|
|
28594
|
+
if (!pending) {
|
|
28595
|
+
pending = [];
|
|
28596
|
+
pendingRecords.set(ctx, pending);
|
|
28597
|
+
ctx.deferred.push(() => rewriteKeyNames(ctx));
|
|
28598
|
+
}
|
|
28599
|
+
pending.push(schema);
|
|
28450
28600
|
}
|
|
28451
28601
|
json2.additionalProperties = process2(def.valueType, ctx, {
|
|
28452
28602
|
...params,
|
|
@@ -28458,7 +28608,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
28458
28608
|
if (keyValues && !def.partial && !omittableOnInput) {
|
|
28459
28609
|
const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
|
|
28460
28610
|
if (validKeyValues.length > 0) {
|
|
28461
|
-
json2.required = validKeyValues;
|
|
28611
|
+
json2.required = validKeyValues.map(String);
|
|
28462
28612
|
}
|
|
28463
28613
|
}
|
|
28464
28614
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ply-ui-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.121",
|
|
4
4
|
"description": "Ply CLI — add Angular + Tailwind CSS components to your project (shadcn-style, code is copied in and owned by you). Not MUI Base UI.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|