openplanr 3.2.0 → 3.3.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/CHANGELOG.md +21 -0
- package/dist/cli/commands/spec.d.ts +2 -1
- package/dist/cli/commands/spec.d.ts.map +1 -1
- package/dist/cli/commands/spec.js +45 -5
- package/dist/cli/commands/spec.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/index-B_96uzCl.js +572 -0
- package/dist/dashboard/assets/index-B_96uzCl.js.map +1 -0
- package/dist/dashboard/dashboard-manifest.json +10 -10
- package/dist/dashboard/index.html +1 -1
- package/dist/services/claude-plugin-service.d.ts +5 -0
- package/dist/services/claude-plugin-service.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.js +18 -2
- package/dist/services/claude-plugin-service.js.map +1 -1
- package/dist/services/codex-plugin-service.d.ts.map +1 -1
- package/dist/services/codex-plugin-service.js +11 -3
- package/dist/services/codex-plugin-service.js.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.d.ts +1 -3
- package/dist/services/runtime-manager/codex-discovery.d.ts.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.js +3 -16
- package/dist/services/runtime-manager/codex-discovery.js.map +1 -1
- package/dist/services/runtime-manager/doctor.d.ts +25 -0
- package/dist/services/runtime-manager/doctor.d.ts.map +1 -1
- package/dist/services/runtime-manager/doctor.js +480 -0
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/errors.d.ts +12 -0
- package/dist/services/runtime-manager/errors.d.ts.map +1 -0
- package/dist/services/runtime-manager/errors.js +14 -0
- package/dist/services/runtime-manager/errors.js.map +1 -0
- package/dist/services/runtime-manager/global-state.d.ts +7 -0
- package/dist/services/runtime-manager/global-state.d.ts.map +1 -1
- package/dist/services/runtime-manager/global-state.js +116 -0
- package/dist/services/runtime-manager/global-state.js.map +1 -1
- package/dist/services/runtime-manager/host-version-probe.d.ts +8 -0
- package/dist/services/runtime-manager/host-version-probe.d.ts.map +1 -0
- package/dist/services/runtime-manager/host-version-probe.js +14 -0
- package/dist/services/runtime-manager/host-version-probe.js.map +1 -0
- package/dist/services/runtime-manager/install-plan.d.ts +25 -0
- package/dist/services/runtime-manager/install-plan.d.ts.map +1 -1
- package/dist/services/runtime-manager/install-plan.js +305 -0
- package/dist/services/runtime-manager/install-plan.js.map +1 -1
- package/dist/services/runtime-manager/inventory.d.ts +6 -0
- package/dist/services/runtime-manager/inventory.d.ts.map +1 -1
- package/dist/services/runtime-manager/inventory.js +16 -1
- package/dist/services/runtime-manager/inventory.js.map +1 -1
- package/dist/services/runtime-manager/legacy-adapters.d.ts +9 -0
- package/dist/services/runtime-manager/legacy-adapters.d.ts.map +1 -0
- package/dist/services/runtime-manager/legacy-adapters.js +187 -0
- package/dist/services/runtime-manager/legacy-adapters.js.map +1 -0
- package/dist/services/runtime-manager/paths.d.ts +18 -0
- package/dist/services/runtime-manager/paths.d.ts.map +1 -0
- package/dist/services/runtime-manager/paths.js +83 -0
- package/dist/services/runtime-manager/paths.js.map +1 -0
- package/dist/services/runtime-manager/runtime-package.d.ts +21 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +77 -0
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager/storage.d.ts +47 -0
- package/dist/services/runtime-manager/storage.d.ts.map +1 -0
- package/dist/services/runtime-manager/storage.js +604 -0
- package/dist/services/runtime-manager/storage.js.map +1 -0
- package/dist/services/runtime-manager-service.d.ts +7 -17
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +32 -1695
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/ship-checks/contract.d.ts +13 -1
- package/dist/services/ship-checks/contract.d.ts.map +1 -1
- package/dist/services/ship-checks/contract.js +1 -1
- package/dist/services/ship-checks/contract.js.map +1 -1
- package/dist/services/ship-checks/coverage.d.ts +4 -0
- package/dist/services/ship-checks/coverage.d.ts.map +1 -0
- package/dist/services/ship-checks/coverage.js +113 -0
- package/dist/services/ship-checks/coverage.js.map +1 -0
- package/dist/services/ship-checks/discover.d.ts.map +1 -1
- package/dist/services/ship-checks/discover.js +3 -0
- package/dist/services/ship-checks/discover.js.map +1 -1
- package/dist/services/spec-service.d.ts +18 -0
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +174 -9
- package/dist/services/spec-service.js.map +1 -1
- package/dist/templates/spec/spec-shaped.md.hbs +1 -1
- package/dist/templates/spec/spec.md.hbs +2 -2
- package/docs/CLI.md +49 -2
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +3 -3
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +50 -46
- package/lib/host-packages/claude/openplanr/README.md +1 -1
- package/lib/host-packages/claude/openplanr/agents/planr-qa.md +5 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +21 -11
- package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +31 -10
- package/lib/host-packages/claude/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/claude/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +48 -44
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +21 -11
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +31 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-spec/references/specification-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-spec.mdc +6 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +54 -50
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +21 -11
- package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +31 -10
- package/lib/host-packages/openai/openplanr/skills/ship/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/openai/openplanr/skills/spec/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/json-schema.mjs +4 -0
- package/package.json +12 -12
- package/dist/dashboard/assets/index-L8qtwqv6.js +0 -572
- package/dist/dashboard/assets/index-L8qtwqv6.js.map +0 -1
- /package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
- /package/lib/host-packages/cursor/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
- /package/lib/host-packages/openai/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
|
@@ -71,8 +71,8 @@ import "./design-shared-protocol-contracts-75a938cc.mjs";
|
|
|
71
71
|
|
|
72
72
|
// packages/design/lib/design/utility.mjs
|
|
73
73
|
import { spawn } from "node:child_process";
|
|
74
|
-
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
75
|
-
import { dirname, join as
|
|
74
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync, realpathSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
75
|
+
import { dirname as dirname2, join as join4, resolve as resolve3 } from "node:path";
|
|
76
76
|
import { fileURLToPath } from "node:url";
|
|
77
77
|
|
|
78
78
|
// packages/design/lib/design/feedback-import.mjs
|
|
@@ -339,8 +339,234 @@ async function importDesignFeedback(file, { input, revision, allowStale = false,
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
// packages/design/lib/design/font-fetch.mjs
|
|
343
|
+
import {
|
|
344
|
+
chmodSync,
|
|
345
|
+
existsSync,
|
|
346
|
+
mkdirSync,
|
|
347
|
+
mkdtempSync,
|
|
348
|
+
readdirSync,
|
|
349
|
+
renameSync,
|
|
350
|
+
rmdirSync,
|
|
351
|
+
rmSync,
|
|
352
|
+
statSync,
|
|
353
|
+
writeFileSync
|
|
354
|
+
} from "node:fs";
|
|
355
|
+
import { dirname, join as join2, resolve as resolve2 } from "node:path";
|
|
356
|
+
var MAX_FAMILIES = 2;
|
|
357
|
+
var MAX_WEIGHTS = 3;
|
|
358
|
+
var TIMEOUT_MS = 2e4;
|
|
359
|
+
var MAX_FILE_BYTES = 15e5;
|
|
360
|
+
var MAX_TOTAL_BYTES = 5e6;
|
|
361
|
+
var CSS_ENDPOINT = "https://fonts.googleapis.com/css2";
|
|
362
|
+
var FONT_ORIGIN = "https://fonts.gstatic.com/";
|
|
363
|
+
var CATALOG_ROOT = "https://raw.githubusercontent.com/google/fonts/main";
|
|
364
|
+
var USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36";
|
|
365
|
+
var LICENSES = Object.freeze([
|
|
366
|
+
{
|
|
367
|
+
directory: "ofl",
|
|
368
|
+
metadata: "OFL",
|
|
369
|
+
file: "OFL.txt",
|
|
370
|
+
id: "OFL-1.1",
|
|
371
|
+
text: /SIL Open Font License,?\s+Version 1\.1/iu
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
directory: "apache",
|
|
375
|
+
metadata: "APACHE2",
|
|
376
|
+
file: "LICENSE.txt",
|
|
377
|
+
id: "Apache-2.0",
|
|
378
|
+
text: /Apache License\s+Version 2\.0/iu
|
|
379
|
+
}
|
|
380
|
+
]);
|
|
381
|
+
var FAMILY_SPEC = /^([A-Za-z0-9](?:[A-Za-z0-9 ]*[A-Za-z0-9])?):(\d{3}(?:,\d{3})*)$/u;
|
|
382
|
+
function parseFontFamily(spec) {
|
|
383
|
+
const match = typeof spec === "string" ? FAMILY_SPEC.exec(spec.trim()) : null;
|
|
384
|
+
if (!match)
|
|
385
|
+
throw new Error(
|
|
386
|
+
`--family ${JSON.stringify(spec ?? "")} must look like "Inter:400,600" (a name, a colon, comma-separated weights).`
|
|
387
|
+
);
|
|
388
|
+
const weights = [...new Set(match[2].split(",").map(Number))].sort((a, b) => a - b);
|
|
389
|
+
const invalid2 = weights.find((weight) => weight < 100 || weight > 900 || weight % 100 !== 0);
|
|
390
|
+
if (invalid2 !== void 0)
|
|
391
|
+
throw new Error(`--family "${spec}" has weight ${invalid2}; use 100 to 900 in steps of 100.`);
|
|
392
|
+
if (weights.length > MAX_WEIGHTS)
|
|
393
|
+
throw new Error(
|
|
394
|
+
`--family "${spec}" has ${weights.length} weights; at most ${MAX_WEIGHTS} per family.`
|
|
395
|
+
);
|
|
396
|
+
return { family: match[1], weights };
|
|
397
|
+
}
|
|
398
|
+
function latinFontFaces(css, family) {
|
|
399
|
+
const faces = [];
|
|
400
|
+
for (const [, subset, body] of css.matchAll(
|
|
401
|
+
/\/\*\s*([\w-]+)\s*\*\/\s*@font-face\s*\{([^}]*)\}/gu
|
|
402
|
+
)) {
|
|
403
|
+
const value = (name) => new RegExp(`(?:^|;)\\s*${name}\\s*:\\s*([^;]+)`, "iu").exec(body)?.[1].trim();
|
|
404
|
+
if (subset !== "latin" || !/^U\+0000-00FF\b/iu.test(value("unicode-range") ?? "")) continue;
|
|
405
|
+
const source = /^url\(([^)\s]+)\)\s*format\(['"]woff2['"]\)$/u.exec(value("src") ?? "");
|
|
406
|
+
if (!source?.[1].startsWith(FONT_ORIGIN))
|
|
407
|
+
throw new Error(
|
|
408
|
+
`"${family}" Latin face is not a woff2 file on ${FONT_ORIGIN}: ${value("src")}`
|
|
409
|
+
);
|
|
410
|
+
faces.push({ weight: Number(value("font-weight")), url: source[1] });
|
|
411
|
+
}
|
|
412
|
+
return faces;
|
|
413
|
+
}
|
|
414
|
+
async function request(fetchImpl, url, { headers, allowMissing = false, redirect } = {}) {
|
|
415
|
+
let response;
|
|
416
|
+
try {
|
|
417
|
+
response = await fetchImpl(url, {
|
|
418
|
+
headers,
|
|
419
|
+
redirect,
|
|
420
|
+
signal: AbortSignal.timeout(TIMEOUT_MS)
|
|
421
|
+
});
|
|
422
|
+
} catch (error) {
|
|
423
|
+
const reason = error?.name === "TimeoutError" ? `no response within ${TIMEOUT_MS / 1e3} s` : error?.message;
|
|
424
|
+
throw new Error(`Font fetch failed: ${url}: ${reason}`);
|
|
425
|
+
}
|
|
426
|
+
if (allowMissing && response.status === 404) return null;
|
|
427
|
+
if (!response.ok) throw new Error(`Font fetch failed: ${url}: HTTP ${response.status}`);
|
|
428
|
+
return response;
|
|
429
|
+
}
|
|
430
|
+
async function verifiedLicense(fetchImpl, family) {
|
|
431
|
+
const slug = family.toLowerCase().replace(/[^a-z0-9]/gu, "");
|
|
432
|
+
const tried = [];
|
|
433
|
+
for (const license of LICENSES) {
|
|
434
|
+
const base = `${CATALOG_ROOT}/${license.directory}/${slug}`;
|
|
435
|
+
tried.push(`${base}/METADATA.pb`);
|
|
436
|
+
const metadata = await request(fetchImpl, `${base}/METADATA.pb`, { allowMissing: true });
|
|
437
|
+
if (!metadata) continue;
|
|
438
|
+
const text = await metadata.text();
|
|
439
|
+
const name = /^name:\s*"([^"]*)"/mu.exec(text)?.[1];
|
|
440
|
+
const declared = /^license:\s*"([^"]*)"/mu.exec(text)?.[1];
|
|
441
|
+
if (name !== family && name?.toLowerCase() === family.toLowerCase())
|
|
442
|
+
throw new Error(`"${family}" is listed as "${name}"; use the catalog name "${name}".`);
|
|
443
|
+
if (name !== family || declared !== license.metadata)
|
|
444
|
+
throw new Error(
|
|
445
|
+
`"${family}" is not verified as ${license.id}: ${base}/METADATA.pb names ${JSON.stringify(name)} with license ${JSON.stringify(declared)}. Use the system stack.`
|
|
446
|
+
);
|
|
447
|
+
const body = Buffer.from(
|
|
448
|
+
await (await request(fetchImpl, `${base}/${license.file}`, { redirect: "error" })).arrayBuffer()
|
|
449
|
+
);
|
|
450
|
+
if (!license.text.test(body.toString("utf8")))
|
|
451
|
+
throw new Error(
|
|
452
|
+
`"${family}" is not verified as ${license.id}: ${base}/${license.file} does not contain the license text. Use the system stack.`
|
|
453
|
+
);
|
|
454
|
+
return { slug, license, body };
|
|
455
|
+
}
|
|
456
|
+
throw new Error(
|
|
457
|
+
`"${family}" is not an OFL or Apache licensed Google Fonts family (checked ${tried.join(", ")}). Use the system stack.`
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
async function download(fetchImpl, url) {
|
|
461
|
+
const bytes = Buffer.from(
|
|
462
|
+
await (await request(fetchImpl, url, { redirect: "error" })).arrayBuffer()
|
|
463
|
+
);
|
|
464
|
+
if (bytes.length > MAX_FILE_BYTES)
|
|
465
|
+
throw new Error(`Font file is ${bytes.length} bytes, over the ${MAX_FILE_BYTES} limit: ${url}`);
|
|
466
|
+
if (bytes.toString("latin1", 0, 4) !== "wOF2") throw new Error(`Font file is not woff2: ${url}`);
|
|
467
|
+
return bytes;
|
|
468
|
+
}
|
|
469
|
+
function assertWritableDestination(dest) {
|
|
470
|
+
if (!existsSync(dest)) return;
|
|
471
|
+
if (!statSync(dest).isDirectory() || readdirSync(dest).length > 0)
|
|
472
|
+
throw new Error(
|
|
473
|
+
`Font destination already exists and is not empty: ${dest}. Choose a new --dest or remove it.`
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
function faceRule(family, weights, file) {
|
|
477
|
+
const weight = weights.length > 1 ? `${weights[0]} ${weights.at(-1)}` : `${weights[0]}`;
|
|
478
|
+
return `@font-face {
|
|
479
|
+
font-family: "${family}";
|
|
480
|
+
font-style: normal;
|
|
481
|
+
font-weight: ${weight};
|
|
482
|
+
font-display: swap;
|
|
483
|
+
src: url("${file}") format("woff2");
|
|
484
|
+
}
|
|
485
|
+
`;
|
|
486
|
+
}
|
|
487
|
+
async function fetchDesignFonts({ families, dest, fetchImpl = fetch }) {
|
|
488
|
+
if (!dest) throw new Error("fonts fetch requires --dest <design>/source/assets/fonts.");
|
|
489
|
+
const specs = (families ?? []).map(parseFontFamily);
|
|
490
|
+
if (specs.length === 0)
|
|
491
|
+
throw new Error('fonts fetch requires at least one --family "<Name>:<weights>".');
|
|
492
|
+
if (specs.length > MAX_FAMILIES)
|
|
493
|
+
throw new Error(
|
|
494
|
+
`${specs.length} families requested (${specs.map(({ family }) => family).join(", ")}); at most ${MAX_FAMILIES}.`
|
|
495
|
+
);
|
|
496
|
+
const names = specs.map(({ family }) => family.toLowerCase());
|
|
497
|
+
if (new Set(names).size !== names.length)
|
|
498
|
+
throw new Error(
|
|
499
|
+
`--family names a family twice: ${specs.map(({ family }) => family).join(", ")}.`
|
|
500
|
+
);
|
|
501
|
+
const target = resolve2(dest);
|
|
502
|
+
assertWritableDestination(target);
|
|
503
|
+
const files = /* @__PURE__ */ new Map();
|
|
504
|
+
const rules = [];
|
|
505
|
+
const summaries = [];
|
|
506
|
+
let totalBytes = 0;
|
|
507
|
+
const add = (path, bytes) => {
|
|
508
|
+
totalBytes += bytes.length;
|
|
509
|
+
if (totalBytes > MAX_TOTAL_BYTES)
|
|
510
|
+
throw new Error(`Font snapshot exceeds ${MAX_TOTAL_BYTES} bytes at ${path}.`);
|
|
511
|
+
files.set(path, bytes);
|
|
512
|
+
};
|
|
513
|
+
for (const { family, weights } of specs) {
|
|
514
|
+
const { slug, license, body } = await verifiedLicense(fetchImpl, family);
|
|
515
|
+
const source = `${CSS_ENDPOINT}?family=${encodeURIComponent(family).replaceAll("%20", "+")}:wght@${weights.join(";")}&display=swap`;
|
|
516
|
+
const css = await (await request(fetchImpl, source, { headers: { "user-agent": USER_AGENT } })).text();
|
|
517
|
+
const faces = latinFontFaces(css, family);
|
|
518
|
+
const byUrl = /* @__PURE__ */ new Map();
|
|
519
|
+
for (const weight of weights) {
|
|
520
|
+
const face = faces.find((item) => item.weight === weight);
|
|
521
|
+
if (!face)
|
|
522
|
+
throw new Error(`"${family}" has no Latin woff2 face for weight ${weight} in ${source}`);
|
|
523
|
+
byUrl.set(face.url, [...byUrl.get(face.url) ?? [], weight]);
|
|
524
|
+
}
|
|
525
|
+
rules.push(`/* ${family} (${license.id}, ${slug}/${license.file}): ${source} */
|
|
526
|
+
`);
|
|
527
|
+
for (const [url, covered] of byUrl) {
|
|
528
|
+
const range = covered.length > 1 ? `${covered[0]}-${covered.at(-1)}` : `${covered[0]}`;
|
|
529
|
+
const file = `${slug}/${slug}-${range}-latin.woff2`;
|
|
530
|
+
add(file, await download(fetchImpl, url));
|
|
531
|
+
rules.push(faceRule(family, covered, file));
|
|
532
|
+
}
|
|
533
|
+
add(`${slug}/${license.file}`, body);
|
|
534
|
+
summaries.push({
|
|
535
|
+
family,
|
|
536
|
+
license: license.id,
|
|
537
|
+
weights,
|
|
538
|
+
source,
|
|
539
|
+
licenseFile: `${slug}/${license.file}`
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
add("fonts.css", Buffer.from(rules.join("")));
|
|
543
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
544
|
+
const staging = mkdtempSync(join2(dirname(target), ".fonts-fetch-"));
|
|
545
|
+
try {
|
|
546
|
+
for (const [path, bytes] of files) {
|
|
547
|
+
mkdirSync(dirname(join2(staging, path)), { recursive: true });
|
|
548
|
+
writeFileSync(join2(staging, path), bytes, { flag: "wx" });
|
|
549
|
+
}
|
|
550
|
+
assertWritableDestination(target);
|
|
551
|
+
if (existsSync(target)) rmdirSync(target);
|
|
552
|
+
chmodSync(staging, 493);
|
|
553
|
+
renameSync(staging, target);
|
|
554
|
+
} catch (error) {
|
|
555
|
+
rmSync(staging, { recursive: true, force: true });
|
|
556
|
+
throw error;
|
|
557
|
+
}
|
|
558
|
+
return {
|
|
559
|
+
ok: true,
|
|
560
|
+
dest: target,
|
|
561
|
+
css: join2(target, "fonts.css"),
|
|
562
|
+
families: summaries,
|
|
563
|
+
files: [...files].map(([path, bytes]) => ({ path, bytes: bytes.length })),
|
|
564
|
+
totalBytes
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
|
|
342
568
|
// packages/design/lib/design/studio-lifecycle.mjs
|
|
343
|
-
import { join as
|
|
569
|
+
import { join as join3 } from "node:path";
|
|
344
570
|
function localUrl(value, service, path) {
|
|
345
571
|
if (typeof value !== "string") return null;
|
|
346
572
|
try {
|
|
@@ -359,7 +585,7 @@ async function manageDesignStudio(file, { action = "status", instanceId, env = p
|
|
|
359
585
|
const services = (await listArtifactReviewServers({ env, fetchImpl })).filter(
|
|
360
586
|
(service2) => service2.kind === "design" && service2.projectRoot === current.root
|
|
361
587
|
);
|
|
362
|
-
const launcher = readJson(
|
|
588
|
+
const launcher = readJson(join3(current.root, ".design/server.json"), null);
|
|
363
589
|
let service = services.find((value) => value.instanceId === (instanceId ?? launcher?.instanceId));
|
|
364
590
|
if (instanceId !== void 0 && !service)
|
|
365
591
|
throw new Error(
|
|
@@ -643,7 +869,7 @@ async function attachedArtifactFrame(page, artifactId, warn) {
|
|
|
643
869
|
{ state: "attached", timeout: 5e3 }
|
|
644
870
|
);
|
|
645
871
|
try {
|
|
646
|
-
return await new Promise((
|
|
872
|
+
return await new Promise((resolve4, reject) => {
|
|
647
873
|
let settled = false;
|
|
648
874
|
const finish = (error, frame) => {
|
|
649
875
|
if (settled) return;
|
|
@@ -652,7 +878,7 @@ async function attachedArtifactFrame(page, artifactId, warn) {
|
|
|
652
878
|
page.off("frameattached", inspect);
|
|
653
879
|
page.off("framenavigated", inspect);
|
|
654
880
|
if (error) reject(error);
|
|
655
|
-
else
|
|
881
|
+
else resolve4(frame);
|
|
656
882
|
};
|
|
657
883
|
const inspect = async (frame) => {
|
|
658
884
|
if (settled || frame === page.mainFrame?.()) return;
|
|
@@ -896,7 +1122,7 @@ function verifyDesignDocument(file, report) {
|
|
|
896
1122
|
const images = (Array.isArray(report.screenshots) ? report.screenshots : []).filter((item) => {
|
|
897
1123
|
const path = typeof item === "string" ? item : item?.path;
|
|
898
1124
|
try {
|
|
899
|
-
return typeof path === "string" && isPng(readFileSync(
|
|
1125
|
+
return typeof path === "string" && isPng(readFileSync(resolve3(path)));
|
|
900
1126
|
} catch {
|
|
901
1127
|
return false;
|
|
902
1128
|
}
|
|
@@ -920,7 +1146,7 @@ function verifyDesignDocument(file, report) {
|
|
|
920
1146
|
screenshotCount: images.length,
|
|
921
1147
|
primaryJourneysChecked: Boolean(journeys)
|
|
922
1148
|
};
|
|
923
|
-
atomicJson(
|
|
1149
|
+
atomicJson(join4(current.root, ".design/verification", `${current.revision}.json`), saved);
|
|
924
1150
|
return saved;
|
|
925
1151
|
}
|
|
926
1152
|
async function designUtility(argv, {
|
|
@@ -932,7 +1158,7 @@ async function designUtility(argv, {
|
|
|
932
1158
|
} = {}) {
|
|
933
1159
|
if (argv.length === 0 || argv[0] === "--help" || argv[0] === "help") {
|
|
934
1160
|
const help = {
|
|
935
|
-
usage:
|
|
1161
|
+
usage: 'design.mjs inspect|validate|render|open|studio|view-context|export|feedback|verify|share|publish|sync|manage|handoff <design-document.json> | design.mjs fonts fetch --family "<Name>:<weights>" [--family ...] --dest <dir>',
|
|
936
1162
|
flags: [
|
|
937
1163
|
"--json",
|
|
938
1164
|
"--no-open",
|
|
@@ -949,9 +1175,11 @@ async function designUtility(argv, {
|
|
|
949
1175
|
"--allow-stale",
|
|
950
1176
|
"--variant <id>",
|
|
951
1177
|
"--pins <id,id>",
|
|
952
|
-
"--summary <text>"
|
|
1178
|
+
"--summary <text>",
|
|
1179
|
+
"--family <Name>:<weight,weight> (fonts fetch; at most 2 families, 3 weights each)",
|
|
1180
|
+
"--dest <design>/source/assets/fonts (fonts fetch)"
|
|
953
1181
|
],
|
|
954
|
-
note: "The host authors design sources. This utility only validates, renders, reviews and exports them."
|
|
1182
|
+
note: "The host authors design sources. This utility only validates, renders, reviews and exports them; fonts fetch downloads open-license fonts only when run."
|
|
955
1183
|
};
|
|
956
1184
|
stdout(help);
|
|
957
1185
|
return help;
|
|
@@ -971,10 +1199,11 @@ async function designUtility(argv, {
|
|
|
971
1199
|
"publish",
|
|
972
1200
|
"sync",
|
|
973
1201
|
"manage",
|
|
974
|
-
"handoff"
|
|
1202
|
+
"handoff",
|
|
1203
|
+
"fonts"
|
|
975
1204
|
].includes(command) || !input)
|
|
976
1205
|
throw new Error(
|
|
977
|
-
|
|
1206
|
+
'Usage: design.mjs inspect|validate|render|open|studio|view-context|export|feedback|verify|share|publish|sync|manage|handoff <design-document.json> [--json] [--no-open] [--view canvas|prototype|walkthrough] | design.mjs fonts fetch --family "<Name>:<weights>" [--family ...] --dest <dir>'
|
|
978
1207
|
);
|
|
979
1208
|
const flags = {};
|
|
980
1209
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -997,14 +1226,28 @@ async function designUtility(argv, {
|
|
|
997
1226
|
"scope",
|
|
998
1227
|
"revision",
|
|
999
1228
|
"request-time",
|
|
1000
|
-
"allow-stale"
|
|
1229
|
+
"allow-stale",
|
|
1230
|
+
"family",
|
|
1231
|
+
"dest"
|
|
1001
1232
|
].includes(key))
|
|
1002
1233
|
throw new Error(`Unknown option: ${args[i]}`);
|
|
1003
|
-
|
|
1234
|
+
if (["family", "dest"].includes(key) && command !== "fonts")
|
|
1235
|
+
throw new Error(`Unknown option for ${command}: ${args[i]}`);
|
|
1236
|
+
if (key === "family") flags.family = [...flags.family ?? [], args[++i]];
|
|
1237
|
+
else flags[key] = ["json", "no-open", "allow-stale"].includes(key) ? true : args[++i];
|
|
1004
1238
|
}
|
|
1005
1239
|
if (flags.view && !["canvas", "prototype", "walkthrough"].includes(flags.view))
|
|
1006
1240
|
throw new Error("View must be canvas, prototype, or walkthrough.");
|
|
1007
|
-
|
|
1241
|
+
if (command === "fonts") {
|
|
1242
|
+
if (input !== "fetch")
|
|
1243
|
+
throw new Error(
|
|
1244
|
+
'Usage: design.mjs fonts fetch --family "<Name>:<weights>" [--family ...] --dest <dir>'
|
|
1245
|
+
);
|
|
1246
|
+
const result2 = await fetchDesignFonts({ families: flags.family, dest: flags.dest, fetchImpl });
|
|
1247
|
+
stdout(result2);
|
|
1248
|
+
return result2;
|
|
1249
|
+
}
|
|
1250
|
+
const file = resolve3(input);
|
|
1008
1251
|
let result;
|
|
1009
1252
|
if (command === "view-context")
|
|
1010
1253
|
result = readDesignViewContext(file, { requestTime: flags["request-time"] });
|
|
@@ -1020,7 +1263,7 @@ async function designUtility(argv, {
|
|
|
1020
1263
|
if (action === "inspect") result = readDesignHandoff(file);
|
|
1021
1264
|
else {
|
|
1022
1265
|
const snapshot = readDesignHandoff(file);
|
|
1023
|
-
const input2 = flags.input ? readJson(
|
|
1266
|
+
const input2 = flags.input ? readJson(resolve3(flags.input)) : {};
|
|
1024
1267
|
result = await updateDesignHandoff(file, {
|
|
1025
1268
|
...input2,
|
|
1026
1269
|
action,
|
|
@@ -1074,21 +1317,21 @@ async function designUtility(argv, {
|
|
|
1074
1317
|
}
|
|
1075
1318
|
if (command === "export") {
|
|
1076
1319
|
const current = currentDesign(file), view = flags.view ?? current.document.defaultView;
|
|
1077
|
-
const state = readJson(
|
|
1320
|
+
const state = readJson(join4(current.root, ".design/studio-state.json"), { state: {} }).state;
|
|
1078
1321
|
if (flags.format && flags.format !== "html")
|
|
1079
1322
|
throw new Error(
|
|
1080
1323
|
"Portable export supports HTML. Use the studio PNG action for browser-rendered captures."
|
|
1081
1324
|
);
|
|
1082
|
-
const output =
|
|
1083
|
-
if (
|
|
1325
|
+
const output = resolve3(flags.output ?? join4(current.root, `${view}-export.html`));
|
|
1326
|
+
if (existsSync2(output))
|
|
1084
1327
|
throw new Error(`Export already exists: ${output}. Choose a new --output path.`);
|
|
1085
|
-
|
|
1086
|
-
|
|
1328
|
+
mkdirSync2(dirname2(output), { recursive: true });
|
|
1329
|
+
writeFileSync2(output, standaloneDesignHtml({ ...current, state }, view), { flag: "wx" });
|
|
1087
1330
|
result = { ok: true, output, view, revision: current.revision };
|
|
1088
1331
|
}
|
|
1089
1332
|
if (command === "verify") {
|
|
1090
1333
|
if (!flags.report) throw new Error("verify requires --report <browser-report.json>.");
|
|
1091
|
-
result = verifyDesignDocument(file, readJson(
|
|
1334
|
+
result = verifyDesignDocument(file, readJson(resolve3(flags.report)));
|
|
1092
1335
|
}
|
|
1093
1336
|
if (command === "feedback") {
|
|
1094
1337
|
const action = flags.action ?? "inspect";
|
|
@@ -1108,12 +1351,12 @@ async function designUtility(argv, {
|
|
|
1108
1351
|
if (!["current", "all"].includes(scope))
|
|
1109
1352
|
throw new Error("Feedback export scope must be current or all.");
|
|
1110
1353
|
if (!flags.output) throw new Error("Feedback export requires --output <path>.");
|
|
1111
|
-
const output =
|
|
1112
|
-
if (
|
|
1354
|
+
const output = resolve3(flags.output);
|
|
1355
|
+
if (existsSync2(output))
|
|
1113
1356
|
throw new Error("Feedback export already exists. Choose a new --output path.");
|
|
1114
1357
|
const snapshot = exportDesignReview(file, { scope, env });
|
|
1115
|
-
|
|
1116
|
-
|
|
1358
|
+
mkdirSync2(dirname2(output), { recursive: true });
|
|
1359
|
+
writeFileSync2(output, serializeDesignReviewExport(snapshot, format), {
|
|
1117
1360
|
flag: "wx",
|
|
1118
1361
|
mode: 384
|
|
1119
1362
|
});
|
|
@@ -1132,7 +1375,7 @@ async function designUtility(argv, {
|
|
|
1132
1375
|
env
|
|
1133
1376
|
});
|
|
1134
1377
|
else if (action === "select") {
|
|
1135
|
-
const current = currentDesign(file), saved = readJson(
|
|
1378
|
+
const current = currentDesign(file), saved = readJson(join4(current.root, ".design/studio-state.json"), {
|
|
1136
1379
|
state: {},
|
|
1137
1380
|
stateVersion: 0
|
|
1138
1381
|
});
|
|
@@ -183,7 +183,7 @@ SOFTWARE.
|
|
|
183
183
|
|
|
184
184
|
----------------
|
|
185
185
|
|
|
186
|
-
@radix-ui/react-accordion@1.3.
|
|
186
|
+
@radix-ui/react-accordion@1.3.1
|
|
187
187
|
|
|
188
188
|
MIT License
|
|
189
189
|
|
|
@@ -210,7 +210,7 @@ SOFTWARE.
|
|
|
210
210
|
|
|
211
211
|
----------------
|
|
212
212
|
|
|
213
|
-
@radix-ui/react-alert-dialog@1.2.
|
|
213
|
+
@radix-ui/react-alert-dialog@1.2.1
|
|
214
214
|
|
|
215
215
|
MIT License
|
|
216
216
|
|
|
@@ -291,7 +291,7 @@ SOFTWARE.
|
|
|
291
291
|
|
|
292
292
|
----------------
|
|
293
293
|
|
|
294
|
-
@radix-ui/react-avatar@1.3.
|
|
294
|
+
@radix-ui/react-avatar@1.3.1
|
|
295
295
|
|
|
296
296
|
MIT License
|
|
297
297
|
|
|
@@ -318,7 +318,7 @@ SOFTWARE.
|
|
|
318
318
|
|
|
319
319
|
----------------
|
|
320
320
|
|
|
321
|
-
@radix-ui/react-checkbox@1.4.
|
|
321
|
+
@radix-ui/react-checkbox@1.4.1
|
|
322
322
|
|
|
323
323
|
MIT License
|
|
324
324
|
|
|
@@ -345,7 +345,7 @@ SOFTWARE.
|
|
|
345
345
|
|
|
346
346
|
----------------
|
|
347
347
|
|
|
348
|
-
@radix-ui/react-collapsible@1.2.
|
|
348
|
+
@radix-ui/react-collapsible@1.2.1
|
|
349
349
|
|
|
350
350
|
MIT License
|
|
351
351
|
|
|
@@ -453,7 +453,7 @@ SOFTWARE.
|
|
|
453
453
|
|
|
454
454
|
----------------
|
|
455
455
|
|
|
456
|
-
@radix-ui/react-context-menu@2.4.
|
|
456
|
+
@radix-ui/react-context-menu@2.4.1
|
|
457
457
|
|
|
458
458
|
MIT License
|
|
459
459
|
|
|
@@ -480,7 +480,7 @@ SOFTWARE.
|
|
|
480
480
|
|
|
481
481
|
----------------
|
|
482
482
|
|
|
483
|
-
@radix-ui/react-dialog@1.3.
|
|
483
|
+
@radix-ui/react-dialog@1.3.1
|
|
484
484
|
|
|
485
485
|
MIT License
|
|
486
486
|
|
|
@@ -534,7 +534,7 @@ SOFTWARE.
|
|
|
534
534
|
|
|
535
535
|
----------------
|
|
536
536
|
|
|
537
|
-
@radix-ui/react-dismissable-layer@1.2.
|
|
537
|
+
@radix-ui/react-dismissable-layer@1.2.1
|
|
538
538
|
|
|
539
539
|
MIT License
|
|
540
540
|
|
|
@@ -561,7 +561,7 @@ SOFTWARE.
|
|
|
561
561
|
|
|
562
562
|
----------------
|
|
563
563
|
|
|
564
|
-
@radix-ui/react-dropdown-menu@2.2.
|
|
564
|
+
@radix-ui/react-dropdown-menu@2.2.1
|
|
565
565
|
|
|
566
566
|
MIT License
|
|
567
567
|
|
|
@@ -615,7 +615,7 @@ SOFTWARE.
|
|
|
615
615
|
|
|
616
616
|
----------------
|
|
617
617
|
|
|
618
|
-
@radix-ui/react-focus-scope@1.3.
|
|
618
|
+
@radix-ui/react-focus-scope@1.3.1
|
|
619
619
|
|
|
620
620
|
MIT License
|
|
621
621
|
|
|
@@ -669,7 +669,7 @@ SOFTWARE.
|
|
|
669
669
|
|
|
670
670
|
----------------
|
|
671
671
|
|
|
672
|
-
@radix-ui/react-hover-card@1.2.
|
|
672
|
+
@radix-ui/react-hover-card@1.2.1
|
|
673
673
|
|
|
674
674
|
MIT License
|
|
675
675
|
|
|
@@ -750,7 +750,7 @@ SOFTWARE.
|
|
|
750
750
|
|
|
751
751
|
----------------
|
|
752
752
|
|
|
753
|
-
@radix-ui/react-menu@2.2.
|
|
753
|
+
@radix-ui/react-menu@2.2.1
|
|
754
754
|
|
|
755
755
|
MIT License
|
|
756
756
|
|
|
@@ -777,7 +777,7 @@ SOFTWARE.
|
|
|
777
777
|
|
|
778
778
|
----------------
|
|
779
779
|
|
|
780
|
-
@radix-ui/react-menubar@1.2.
|
|
780
|
+
@radix-ui/react-menubar@1.2.1
|
|
781
781
|
|
|
782
782
|
MIT License
|
|
783
783
|
|
|
@@ -804,7 +804,7 @@ SOFTWARE.
|
|
|
804
804
|
|
|
805
805
|
----------------
|
|
806
806
|
|
|
807
|
-
@radix-ui/react-navigation-menu@1.4.
|
|
807
|
+
@radix-ui/react-navigation-menu@1.4.1
|
|
808
808
|
|
|
809
809
|
MIT License
|
|
810
810
|
|
|
@@ -831,7 +831,7 @@ SOFTWARE.
|
|
|
831
831
|
|
|
832
832
|
----------------
|
|
833
833
|
|
|
834
|
-
@radix-ui/react-one-time-password-field@0.2.
|
|
834
|
+
@radix-ui/react-one-time-password-field@0.2.1
|
|
835
835
|
|
|
836
836
|
MIT License
|
|
837
837
|
|
|
@@ -858,7 +858,7 @@ SOFTWARE.
|
|
|
858
858
|
|
|
859
859
|
----------------
|
|
860
860
|
|
|
861
|
-
@radix-ui/react-password-toggle-field@0.2.
|
|
861
|
+
@radix-ui/react-password-toggle-field@0.2.1
|
|
862
862
|
|
|
863
863
|
MIT License
|
|
864
864
|
|
|
@@ -885,7 +885,7 @@ SOFTWARE.
|
|
|
885
885
|
|
|
886
886
|
----------------
|
|
887
887
|
|
|
888
|
-
@radix-ui/react-popover@1.3.
|
|
888
|
+
@radix-ui/react-popover@1.3.1
|
|
889
889
|
|
|
890
890
|
MIT License
|
|
891
891
|
|
|
@@ -1020,7 +1020,7 @@ SOFTWARE.
|
|
|
1020
1020
|
|
|
1021
1021
|
----------------
|
|
1022
1022
|
|
|
1023
|
-
@radix-ui/react-progress@1.2.
|
|
1023
|
+
@radix-ui/react-progress@1.2.1
|
|
1024
1024
|
|
|
1025
1025
|
MIT License
|
|
1026
1026
|
|
|
@@ -1047,7 +1047,7 @@ SOFTWARE.
|
|
|
1047
1047
|
|
|
1048
1048
|
----------------
|
|
1049
1049
|
|
|
1050
|
-
@radix-ui/react-radio-group@1.5.
|
|
1050
|
+
@radix-ui/react-radio-group@1.5.1
|
|
1051
1051
|
|
|
1052
1052
|
MIT License
|
|
1053
1053
|
|
|
@@ -1074,7 +1074,7 @@ SOFTWARE.
|
|
|
1074
1074
|
|
|
1075
1075
|
----------------
|
|
1076
1076
|
|
|
1077
|
-
@radix-ui/react-roving-focus@1.2.
|
|
1077
|
+
@radix-ui/react-roving-focus@1.2.1
|
|
1078
1078
|
|
|
1079
1079
|
MIT License
|
|
1080
1080
|
|
|
@@ -1128,7 +1128,7 @@ SOFTWARE.
|
|
|
1128
1128
|
|
|
1129
1129
|
----------------
|
|
1130
1130
|
|
|
1131
|
-
@radix-ui/react-select@2.4.
|
|
1131
|
+
@radix-ui/react-select@2.4.1
|
|
1132
1132
|
|
|
1133
1133
|
MIT License
|
|
1134
1134
|
|
|
@@ -1182,7 +1182,7 @@ SOFTWARE.
|
|
|
1182
1182
|
|
|
1183
1183
|
----------------
|
|
1184
1184
|
|
|
1185
|
-
@radix-ui/react-slider@1.6.
|
|
1185
|
+
@radix-ui/react-slider@1.6.1
|
|
1186
1186
|
|
|
1187
1187
|
MIT License
|
|
1188
1188
|
|
|
@@ -1236,7 +1236,7 @@ SOFTWARE.
|
|
|
1236
1236
|
|
|
1237
1237
|
----------------
|
|
1238
1238
|
|
|
1239
|
-
@radix-ui/react-switch@1.4.
|
|
1239
|
+
@radix-ui/react-switch@1.4.1
|
|
1240
1240
|
|
|
1241
1241
|
MIT License
|
|
1242
1242
|
|
|
@@ -1263,7 +1263,7 @@ SOFTWARE.
|
|
|
1263
1263
|
|
|
1264
1264
|
----------------
|
|
1265
1265
|
|
|
1266
|
-
@radix-ui/react-tabs@1.2.
|
|
1266
|
+
@radix-ui/react-tabs@1.2.1
|
|
1267
1267
|
|
|
1268
1268
|
MIT License
|
|
1269
1269
|
|
|
@@ -1290,7 +1290,7 @@ SOFTWARE.
|
|
|
1290
1290
|
|
|
1291
1291
|
----------------
|
|
1292
1292
|
|
|
1293
|
-
@radix-ui/react-toast@1.3.
|
|
1293
|
+
@radix-ui/react-toast@1.3.1
|
|
1294
1294
|
|
|
1295
1295
|
MIT License
|
|
1296
1296
|
|
|
@@ -1317,7 +1317,7 @@ SOFTWARE.
|
|
|
1317
1317
|
|
|
1318
1318
|
----------------
|
|
1319
1319
|
|
|
1320
|
-
@radix-ui/react-toggle@1.2.
|
|
1320
|
+
@radix-ui/react-toggle@1.2.1
|
|
1321
1321
|
|
|
1322
1322
|
MIT License
|
|
1323
1323
|
|
|
@@ -1344,7 +1344,7 @@ SOFTWARE.
|
|
|
1344
1344
|
|
|
1345
1345
|
----------------
|
|
1346
1346
|
|
|
1347
|
-
@radix-ui/react-toggle-group@1.2.
|
|
1347
|
+
@radix-ui/react-toggle-group@1.2.1
|
|
1348
1348
|
|
|
1349
1349
|
MIT License
|
|
1350
1350
|
|
|
@@ -1371,7 +1371,7 @@ SOFTWARE.
|
|
|
1371
1371
|
|
|
1372
1372
|
----------------
|
|
1373
1373
|
|
|
1374
|
-
@radix-ui/react-toolbar@1.2.
|
|
1374
|
+
@radix-ui/react-toolbar@1.2.1
|
|
1375
1375
|
|
|
1376
1376
|
MIT License
|
|
1377
1377
|
|
|
@@ -1398,7 +1398,7 @@ SOFTWARE.
|
|
|
1398
1398
|
|
|
1399
1399
|
----------------
|
|
1400
1400
|
|
|
1401
|
-
@radix-ui/react-tooltip@1.4.
|
|
1401
|
+
@radix-ui/react-tooltip@1.4.1
|
|
1402
1402
|
|
|
1403
1403
|
MIT License
|
|
1404
1404
|
|
|
@@ -1791,7 +1791,7 @@ THE SOFTWARE.
|
|
|
1791
1791
|
|
|
1792
1792
|
----------------
|
|
1793
1793
|
|
|
1794
|
-
radix-ui@1.8.
|
|
1794
|
+
radix-ui@1.8.1
|
|
1795
1795
|
|
|
1796
1796
|
MIT License
|
|
1797
1797
|
|
|
@@ -1818,7 +1818,7 @@ SOFTWARE.
|
|
|
1818
1818
|
|
|
1819
1819
|
----------------
|
|
1820
1820
|
|
|
1821
|
-
react@19.3.
|
|
1821
|
+
react@19.3.1
|
|
1822
1822
|
|
|
1823
1823
|
MIT License
|
|
1824
1824
|
|
|
@@ -1845,7 +1845,7 @@ SOFTWARE.
|
|
|
1845
1845
|
|
|
1846
1846
|
----------------
|
|
1847
1847
|
|
|
1848
|
-
react-dom@19.3.
|
|
1848
|
+
react-dom@19.3.1
|
|
1849
1849
|
|
|
1850
1850
|
MIT License
|
|
1851
1851
|
|