@parity-app/cli 0.6.3 → 0.7.0
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/bin.mjs +12 -8
- package/dist/{client-C4An81o9.mjs → client-D5kbiMmn.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{schema-CiVy9tZT.mjs → schema-DcQLoUPP.mjs} +13 -1
- package/dist/src-BaOpaXkV.mjs +4 -0
- package/dist/{src-YQY8r4mh.mjs → src-CSah1pZ-.mjs} +543 -709
- package/dist/{src-DzU4U2rh.mjs → src-D2kRGtaF.mjs} +1 -1
- package/dist/{src-B40wy5fK.mjs → src-vUHtM2X4.mjs} +1 -1
- package/dist/{src-C5-HaJcA.mjs → src-x0VQ8I6l.mjs} +3 -3
- package/package.json +1 -1
- package/skills/SKILL.md +16 -16
- package/dist/src-AKjejfTT.mjs +0 -4
package/dist/bin.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as
|
|
3
|
-
import { a as describeExec, c as describeProps, f as setCaller, i as describeConsole, l as describeStatus, n as describeAccessibility, o as describeModes, p as mcpCallerName, r as describeComponents, s as describeProblems, t as call, u as describeTokens } from "./client-
|
|
2
|
+
import { c as closest, d as readErrorDetails, l as errorCodes, s as CodedError, u as errorDetails } from "./schema-DcQLoUPP.mjs";
|
|
3
|
+
import { a as describeExec, c as describeProps, f as setCaller, i as describeConsole, l as describeStatus, n as describeAccessibility, o as describeModes, p as mcpCallerName, r as describeComponents, s as describeProblems, t as call, u as describeTokens } from "./client-D5kbiMmn.mjs";
|
|
4
4
|
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, normalize, relative, resolve, sep } from "node:path";
|
|
6
6
|
import { parseArgs } from "node:util";
|
|
@@ -387,8 +387,8 @@ const executeOperation = {
|
|
|
387
387
|
*/
|
|
388
388
|
async function runCheck(library, options) {
|
|
389
389
|
if (!library) throw new Error("parity lib check <library> [--tab t] [--mode m]");
|
|
390
|
-
const { componentNode, generateId, librarySource, withLibraryContext } = await import("./src-
|
|
391
|
-
const { newestEntries, registryDir } = await import("./src-
|
|
390
|
+
const { componentNode, generateId, librarySource, withLibraryContext } = await import("./src-BaOpaXkV.mjs");
|
|
391
|
+
const { newestEntries, registryDir } = await import("./src-vUHtM2X4.mjs");
|
|
392
392
|
const entry = (await newestEntries()).find((item) => item.manifest.id === library);
|
|
393
393
|
if (!entry) throw new Error(`The registry has no library "${library}"`);
|
|
394
394
|
const list = entry.manifest.components?.list ?? {};
|
|
@@ -511,8 +511,8 @@ function describeCheck(report) {
|
|
|
511
511
|
* because it reads the project's files and its own copy of TypeScript.
|
|
512
512
|
*/
|
|
513
513
|
async function runLib(packageName, options) {
|
|
514
|
-
const { appManifestPath, generateLibrary, manifestText, mergeManifest, reviseLibrary } = await import("./src-
|
|
515
|
-
const { covers, registryDir, registryEntries } = await import("./src-
|
|
514
|
+
const { appManifestPath, generateLibrary, manifestText, mergeManifest, reviseLibrary } = await import("./src-x0VQ8I6l.mjs");
|
|
515
|
+
const { covers, registryDir, registryEntries } = await import("./src-vUHtM2X4.mjs");
|
|
516
516
|
const spec = packageName === void 0 ? void 0 : packageSpec(packageName);
|
|
517
517
|
let root = resolve(options.root ?? ".");
|
|
518
518
|
if (spec && (spec.version !== void 0 || options.registry && !options.root)) {
|
|
@@ -523,7 +523,7 @@ async function runLib(packageName, options) {
|
|
|
523
523
|
console.error(`Installing ${spec.name} ${version} on its own…`);
|
|
524
524
|
root = await installedVersion(spec.name, version);
|
|
525
525
|
}
|
|
526
|
-
const { parseLibraryEdits } = await import("./src-
|
|
526
|
+
const { parseLibraryEdits } = await import("./src-x0VQ8I6l.mjs");
|
|
527
527
|
const trialEdits = options.edits ? parseLibraryEdits(JSON.parse(await readFile(resolve(options.edits), "utf8"))) : void 0;
|
|
528
528
|
const recordedId = options.registry && spec ? options.id ?? (await registryEntries()).find((entry) => entry.manifest.package?.name === spec.name)?.manifest.id : void 0;
|
|
529
529
|
const appErrors = recordedId ? await readAppErrors(registryDir(), recordedId) : void 0;
|
|
@@ -943,11 +943,15 @@ const stateSchema = object({
|
|
|
943
943
|
},
|
|
944
944
|
modes: {
|
|
945
945
|
type: "array",
|
|
946
|
+
description: "The project's modes, primary first.",
|
|
946
947
|
items: object({
|
|
947
948
|
id: string,
|
|
948
949
|
name: string,
|
|
949
950
|
width: { type: "number" },
|
|
950
|
-
primary:
|
|
951
|
+
primary: {
|
|
952
|
+
...boolean_,
|
|
953
|
+
description: "The project's first mode: every design's main frame unless it picks another. Only one is."
|
|
954
|
+
}
|
|
951
955
|
})
|
|
952
956
|
},
|
|
953
957
|
components: strings,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as readErrorDetails, f as unknownReference, i as nonBlankString, r as jsonText, s as CodedError } from "./schema-DcQLoUPP.mjs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as call, n as describeAccessibility, r as describeComponents, i as describeConsole, a as describeExec, o as describeModes, s as describeProblems, c as describeProps, l as describeStatus, u as describeTokens, d as registry, f as setCaller } from "./client-
|
|
1
|
+
export { t as call, n as describeAccessibility, r as describeComponents, i as describeConsole, a as describeExec, o as describeModes, s as describeProblems, c as describeProps, l as describeStatus, u as describeTokens, d as registry, f as setCaller } from "./client-D5kbiMmn.mjs";
|
|
@@ -104,6 +104,18 @@ const plainObject = z.record(z.string(), z.unknown());
|
|
|
104
104
|
const nonBlankString = z.string().trim().min(1, "can't be blank");
|
|
105
105
|
/** A number other than NaN or ±Infinity, which zod 4 refuses on its own. */
|
|
106
106
|
const finiteNumber = z.number();
|
|
107
|
+
/**
|
|
108
|
+
* An object in a file Parity owns, such as a `.par`. A key it doesn't know is an error, and a key set to `undefined` is
|
|
109
|
+
* left out, as JSON leaves it out, so what the window saves from memory reads as it would from the file.
|
|
110
|
+
*/
|
|
111
|
+
function fileObject(shape) {
|
|
112
|
+
return z.strictObject(shape).overwrite(withoutUnset);
|
|
113
|
+
}
|
|
114
|
+
/** Zod's own copy of an object, without the keys whose values are `undefined`. */
|
|
115
|
+
function withoutUnset(value) {
|
|
116
|
+
for (const [key, entry] of Object.entries(value)) if (entry === void 0) Reflect.deleteProperty(value, key);
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
107
119
|
/** JSON text holding what `schema` checks. Text that isn't JSON fails as `expected JSON`. */
|
|
108
120
|
function jsonText(schema) {
|
|
109
121
|
return z.string().transform((text, context) => {
|
|
@@ -224,4 +236,4 @@ function bound(inclusiveWords, exclusiveWords, origin, limit, inclusive = true)
|
|
|
224
236
|
"bigint"
|
|
225
237
|
].includes(origin) ? `expected ${words} ${limit}` : void 0;
|
|
226
238
|
}
|
|
227
|
-
export {
|
|
239
|
+
export { parseData as a, closest as c, readErrorDetails as d, unknownReference as f, nonBlankString as i, errorCodes as l, finiteNumber as n, plainObject as o, jsonText as r, CodedError as s, fileObject as t, errorDetails as u };
|