design-parity 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -11,6 +11,20 @@ npx design-parity run \
11
11
  --out .design-parity/out
12
12
  ```
13
13
 
14
+ ## `reverse` — design → code
15
+
16
+ Ask the committed `design-map.json` which code implements a design node — the
17
+ direction a source without Code Connect (Stitch, Claude Design, bundle) otherwise
18
+ can't answer. Every node of a multi-node binding points back at its code handle.
19
+
20
+ ```sh
21
+ npx design-parity reverse figma:AbCdEf/1:42 # → ui/Home.kt#HomeScreen
22
+ npx design-parity reverse --repo . # dump the whole ref → code map
23
+ ```
24
+
25
+ Exit codes: `0` found (or full dump), `1` the ref maps to nothing, `2` no
26
+ readable `design-map.json`.
27
+
14
28
  This package is a thin launcher over
15
29
  [`@design-parity/action`](https://www.npmjs.com/package/@design-parity/action):
16
30
  it owns the `design-parity` bin so the bare `npx design-parity` invocation
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env node
2
- // `npx design-parity run …` — the no-checkout entrypoint. A thin launcher: it
3
- // loads @design-parity/action's run CLI, which reads process.argv itself and
4
- // sets the exit code. All the logic lives in the orchestrator package; this
5
- // package exists only to own the `design-parity` name on the registry so the
6
- // bare `npx design-parity` invocation works.
7
- import "@design-parity/action/run";
2
+ // `npx design-parity <subcommand> …` — the no-checkout entrypoint. A thin
3
+ // launcher: it dispatches on the first arg to the matching @design-parity/action
4
+ // CLI, which reads process.argv itself and sets the exit code. All the logic
5
+ // lives in the orchestrator package; this package exists only to own the
6
+ // `design-parity` name on the registry so `npx design-parity` works.
7
+ // reverse → the design→code lookup; anything else → a parity run.
8
+ if (process.argv[2] === "reverse") {
9
+ await import("@design-parity/action/reverse");
10
+ } else {
11
+ await import("@design-parity/action/run");
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-parity",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Top-level CLI for design-parity: run a parity check with no checkout via `npx design-parity run …`. A thin launcher over @design-parity/action; re-exports its programmatic API too.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "design-parity": "./bin/design-parity.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@design-parity/action": "^0.1.3"
21
+ "@design-parity/action": "^0.1.4"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",