@nodii/dev 0.6.13 → 0.6.14
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 +9 -1
- package/dist/api.js +1 -1
- package/dist/cli.js +6 -2
- package/dist/core.js +1 -1
- package/dist/devops-openapi.json +1 -1
- package/dist/figma.js +35 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ prints them without creating anything.
|
|
|
147
147
|
nodii-dev figma file add FILE_KEY --name TEXT --kind design-system|surfaces|prototype [--module M]
|
|
148
148
|
nodii-dev figma lock FILE_KEY --title TEXT [--scope KIND:ID ...]
|
|
149
149
|
nodii-dev figma scope add CHANGE_SET --scope KIND:ID [--scope ...]
|
|
150
|
+
nodii-dev figma scope set CHANGE_SET --scope KIND:ID [--scope ...]
|
|
150
151
|
nodii-dev figma publish-plan FILE_KEY
|
|
151
152
|
nodii-dev figma check FILE_KEY
|
|
152
153
|
nodii-dev figma log-write CHANGE_SET --tool TOOL --nodes NODE[,NODE]
|
|
@@ -190,7 +191,14 @@ refuses an overlap with `SCOPE_CONFLICT`; the CLI prints Dev's message, then
|
|
|
190
191
|
the set holding the overlapping scope. `figma lock` without `--scope` locks the
|
|
191
192
|
whole file, as older CLIs do, and that conflicts with every other set.
|
|
192
193
|
`figma scope add` widens a set you hold, with the same check; nothing is ever
|
|
193
|
-
widened silently.
|
|
194
|
+
widened silently. `figma scope set` narrows a set you hold to exactly the
|
|
195
|
+
scopes you give, and releases the rest for other sets: for example, a set
|
|
196
|
+
migrated as a whole-file lock can keep just its page. It only narrows. Each
|
|
197
|
+
scope must sit inside one the set holds (the whole file holds everything, and
|
|
198
|
+
a page holds its components and creates); anything else is
|
|
199
|
+
`SCOPE_NOT_NARROWER`. Dev refuses with `WRITE_OUT_OF_SCOPE` when a logged
|
|
200
|
+
write or a submitted node would fall outside the narrower scopes, so keep a
|
|
201
|
+
scope that holds them.
|
|
194
202
|
|
|
195
203
|
Every write must fall inside the set's scopes (MW1-57.7). The post-hook
|
|
196
204
|
logs each write's node ids, in colon form. It also logs the variable,
|
package/dist/api.js
CHANGED
|
@@ -102,7 +102,7 @@ export const GROUPS = {
|
|
|
102
102
|
composite: "Composite", "service-edges": "ServiceEdges", lanes: "Lanes",
|
|
103
103
|
swaps: "Swaps", ideas: "Ideas", terminology: "Terminology", credentials: "Credentials",
|
|
104
104
|
rulebook: "ad-documents", "ad-decisions": "ad-decisions", domains: "ad-domains", standardizations: "standardizations",
|
|
105
|
-
archive: "archive", harness: "harness",
|
|
105
|
+
archive: "archive", harness: "harness", utils: "utils",
|
|
106
106
|
// DEC-0020 rule delivery; `rules core|report|cap` are first-class (upload.js).
|
|
107
107
|
rules: "rulebook",
|
|
108
108
|
};
|
package/dist/cli.js
CHANGED
|
@@ -40,6 +40,8 @@ import {
|
|
|
40
40
|
figmaPublishPlanText,
|
|
41
41
|
figmaResubmit,
|
|
42
42
|
figmaScopeAdd,
|
|
43
|
+
figmaScopeSet,
|
|
44
|
+
figmaScopeSetText,
|
|
43
45
|
figmaSubmit,
|
|
44
46
|
isChangeSetId,
|
|
45
47
|
scopeText,
|
|
@@ -92,6 +94,7 @@ Usage: nodii-dev <command> [options] [--json]
|
|
|
92
94
|
# scopes: component:NODE page:NODE foundations create:PAGE:NAME;
|
|
93
95
|
# no --scope locks the whole file (DEC-0032)
|
|
94
96
|
figma scope add CHANGE_SET --scope KIND:ID [--scope ...] # widen a held set's scopes
|
|
97
|
+
figma scope set CHANGE_SET --scope KIND:ID [--scope ...] # narrow to exactly these; the rest frees
|
|
95
98
|
figma publish-plan FILE_KEY # what to publish, and what to leave unchecked in Figma's dialog
|
|
96
99
|
figma published FILE_KEY|CHANGE_SET --figma-version V # a file key marks every awaiting set published
|
|
97
100
|
figma check|log-write|submit|apply|abandon|release
|
|
@@ -140,7 +143,7 @@ contracts, sagas, outbox-topics, tables, libraries, workers, projects, issues,
|
|
|
140
143
|
backlogs, builds, changes, deploy-reports, runtime, people, agents, inbox,
|
|
141
144
|
gate, design, runbooks, doctrine, changelog, health-verdicts, approval-kinds,
|
|
142
145
|
notification-registry, skills, open-questions, decisions, drift, requests,
|
|
143
|
-
rulebook, ad-decisions, domains, standardizations, archive, and
|
|
146
|
+
rulebook, ad-decisions, domains, standardizations, archive, harness, and utils.
|
|
144
147
|
|
|
145
148
|
Run a command with --help or see the package README for all flags.`;
|
|
146
149
|
|
|
@@ -606,7 +609,8 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
606
609
|
if (action === "lock")
|
|
607
610
|
return emit(await figmaLock(rest[0], requireFlag(f, "title"), { scopes: scopesFrom(f) }), json, (p) => figmaLockText(p.data));
|
|
608
611
|
if (action === "scope") {
|
|
609
|
-
if (rest[0]
|
|
612
|
+
if (!["add", "set"].includes(rest[0]) || !rest[1] || rest.length > 2) throw new CliError("USAGE", "figma scope add|set CHANGE_SET --scope KIND:ID [--scope ...]", 2);
|
|
613
|
+
if (rest[0] === "set") return emit(await figmaScopeSet(rest[1], scopesFrom(f)), json, (p) => figmaScopeSetText(rest[1], p.data));
|
|
610
614
|
return emit(await figmaScopeAdd(rest[1], scopesFrom(f)), json, (p) =>
|
|
611
615
|
`${rest[1]} holds ${p.data?.scopes?.length ?? "its"} scope(s)${p.data?.scopes?.length ? `: ${p.data.scopes.map(scopeText).join(", ")}` : ""}`);
|
|
612
616
|
}
|
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.6.
|
|
7
|
+
export const VERSION = "0.6.14";
|
|
8
8
|
export const configPath = () =>
|
|
9
9
|
process.env.NODII_DEV_CONFIG_PATH ??
|
|
10
10
|
join(homedir(), ".config/nodii-dev/config.json");
|