@nodii/dev 0.6.222 → 0.6.223
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 +2 -0
- package/dist/core.js +1 -1
- package/dist/surface.js +18 -1
- package/dist/upload.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1029,6 +1029,8 @@ nodii-dev docs upload PATH... --class ruling|conformance|editorial
|
|
|
1029
1029
|
[--base CODE=VERSION ...] [--decision DECISION.json]
|
|
1030
1030
|
[--conformance-ref PR|REPO@SHA] [--meaning-unchanged REASON]
|
|
1031
1031
|
[--wait [--wait-minutes N]]
|
|
1032
|
+
# a ruling's DECISION.json: title, context, options, ruling, consequences,
|
|
1033
|
+
# provenance, ruledBy ("operator", the only value; P-22, DEV-DOC-9), amends
|
|
1032
1034
|
nodii-dev docs ratify --domain KEY [--domain KEY ...] --decision DECISION.json [--wait]
|
|
1033
1035
|
nodii-dev docs parked [CODE] [--status pending|acknowledged]
|
|
1034
1036
|
|
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, lstat, mkdir, readFile, rename, rm, writeFile } from "node:fs/pr
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { basename, dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.6.
|
|
7
|
+
export const VERSION = "0.6.223";
|
|
8
8
|
export const configPath = () =>
|
|
9
9
|
process.env.NODII_DEV_CONFIG_PATH ??
|
|
10
10
|
join(homedir(), ".config/nodii-dev/config.json");
|
package/dist/surface.js
CHANGED
|
@@ -34,7 +34,8 @@ import { MIN_FIGMA_INTERVAL_MS, figmaRest } from "./figma-rest.js";
|
|
|
34
34
|
import { createRenderer } from "./vendor/render-templates.mjs";
|
|
35
35
|
|
|
36
36
|
/** Bumped whenever the emitted code changes shape for the same inputs. */
|
|
37
|
-
|
|
37
|
+
// 67 (NODII-DEV-CLI-322): a Table Rich Cell whose text differs across rows reads it from the row (text={row.<column>Text}).
|
|
38
|
+
export const GENERATOR_FORMAT = 67;
|
|
38
39
|
/**
|
|
39
40
|
* DS parts that are an item of their parent's own list or grid, so they take no sizing
|
|
40
41
|
* wrapper: a Detail Section / Row's facts are the section grid's cells, a Right Pane / Row
|
|
@@ -4400,6 +4401,22 @@ function tableOf(node, ctx) {
|
|
|
4400
4401
|
secondaryKeys.add(secondary);
|
|
4401
4402
|
open = open.replace(new RegExp(`\\bsecondary=(${LITERAL})`), `secondary={row.${secondary}}`);
|
|
4402
4403
|
}
|
|
4404
|
+
// A Rich Cell's text is row data when the rows draw different texts; one
|
|
4405
|
+
// text on every row is the frame's own copy (NODII-DEV-CLI-322).
|
|
4406
|
+
const textAttr = new RegExp(`\\btext=(${LITERAL})`);
|
|
4407
|
+
if (/^<TableCell\b/.test(open) && textAttr.test(open)) {
|
|
4408
|
+
const texts = new Set(dataRows.map((p) => {
|
|
4409
|
+
const own = p.cells[i]?.code ?? "";
|
|
4410
|
+
return textAttr.exec(own.slice(0, openTagEnd(own) + 1))?.[1] ?? null;
|
|
4411
|
+
}));
|
|
4412
|
+
if (texts.size > 1) {
|
|
4413
|
+
const base = `${keys[i]}Text`;
|
|
4414
|
+
let field = base;
|
|
4415
|
+
for (let n = 2; secondaryKeys.has(field); n++) field = `${base}${n}`;
|
|
4416
|
+
secondaryKeys.add(field);
|
|
4417
|
+
open = open.replace(textAttr, `text={row.${field}}`);
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4403
4420
|
if (invalidPii.has(i)) return indent(`${open}${comment(`unmapped: ${invalidPii.get(i)}`)}${close}`, depth + 4);
|
|
4404
4421
|
if (piiColumn[i]) {
|
|
4405
4422
|
const nullable = nullablePii.get(i);
|
package/dist/upload.js
CHANGED
|
@@ -201,9 +201,13 @@ export async function docsCommand(action, args, flags, { request = devRequest, l
|
|
|
201
201
|
if (flags["no-embed"] !== undefined && action !== "upload")
|
|
202
202
|
throw new CliError("USAGE", "--no-embed is valid only with docs upload.", 2);
|
|
203
203
|
const decision = await readJsonFile(flags.decision, "decision");
|
|
204
|
-
if (cls === "ruling" && !decision) throw new CliError("RULING_NEEDS_DECISION", "A ruling write needs its decision: --decision DECISION.json (title, context, options, ruling, consequences, provenance, amends).", 2);
|
|
204
|
+
if (cls === "ruling" && !decision) throw new CliError("RULING_NEEDS_DECISION", "A ruling write needs its decision: --decision DECISION.json (title, context, options, ruling, consequences, provenance, ruledBy, amends).", 2);
|
|
205
205
|
if (cls !== "ruling" && decision) throw new CliError("DECISION_NEEDS_RULING", "--decision goes with --class ruling only.", 2);
|
|
206
206
|
if (decision && !decision.amends?.length) throw new CliError("AMENDS_EMPTY", "A decision whose amends list is empty is refused (M05-13).", 2);
|
|
207
|
+
// NODII-DEV-CLI-315 (P-22): Dev reads who ruled from this field, never the provenance text.
|
|
208
|
+
if (decision && !decision.ruledBy) throw new CliError("DECISION_RULED_BY_REQUIRED", 'A ruling names who ruled it: "ruledBy": "operator" in DECISION.json, the operator, whose statement the provenance quotes (P-22, DEV-DOC-9). Only an operator ruling settles a review finding (P-21).', 2);
|
|
209
|
+
// Review f-fa5afdb6 (DEV-DOC-9): only the operator rules, so a ruling is recorded only from an operator statement.
|
|
210
|
+
if (decision && decision.ruledBy !== "operator") throw new CliError("DECISION_RULED_BY_NOT_OPERATOR", `"ruledBy": ${JSON.stringify(decision.ruledBy)} in DECISION.json: only the operator rules, so a ruling is recorded only from an operator statement (P-22, DEV-DOC-9, MW4-27). A lane, steward or coordinator's own call is not a ruling; take the question to the operator.`, 2);
|
|
207
211
|
if (cls === "editorial" && flags["meaning-unchanged"] === true) throw new CliError("USAGE", "--meaning-unchanged needs a reason.", 2);
|
|
208
212
|
if (flags["conformance-ref"] === true) throw new CliError("USAGE", "--conformance-ref needs a value: a PR or REPO@SHA.", 2);
|
|
209
213
|
const docs = await checkDocuments(args, cwd);
|