@starci/eslint-canon-fe 9.5.13 → 9.5.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.5.14 - 2026-10-29
|
|
4
|
+
|
|
5
|
+
- Changed: the bundled `runtime/scripts/lib/sops-envelope.mjs` admits an age set of one or more recipients for the selected-identity decrypt (`selectedAgeEnvelope`): the selected recipient must be one of the set, an empty entry or gap (`invalid-age-entry`) and a recipient named twice (`duplicate-age-recipient`) are refused, a dotenv envelope reads every `sops_age__list_<n>__` entry; the bundled canon pins name hfs 4.11.13, eslint-canon-be 3.8.12, eslint-canon-fe 9.5.14 and the Grammar family 0.15.25. No rule changed.
|
|
6
|
+
|
|
3
7
|
## 9.5.13 - 2026-10-29
|
|
4
8
|
|
|
5
9
|
- Changed: the bundled canon pins name hfs 4.11.12, eslint-canon-be 3.8.11, eslint-canon-fe 9.5.13 and the Grammar family 0.15.24; the bundled slot judgement (`runtime/scripts/hfs/path-findings.mjs`) admits the one file a file slot names by its path, as eslint-canon-be does.
|
package/package.json
CHANGED
|
@@ -31,35 +31,35 @@ pins:
|
|
|
31
31
|
source: packages/event-stream/package.json
|
|
32
32
|
why: 'the one server-sent-events client of every front end (fe-stack event-stream, owner:event-stream-package): the transport client layer (modules/api/sse/clients) creates one instance for the app with the bearer token source and the stream operations follow on it; it carries Last-Event-ID resume, the capped doubling backoff, the heartbeat timeout, the single 401 renewal and the useSWRSubscription adapter, so no app keeps a hand-written reader.'
|
|
33
33
|
'@starci/grammar':
|
|
34
|
-
version: 0.15.
|
|
34
|
+
version: 0.15.25
|
|
35
35
|
group: starci
|
|
36
36
|
install: registry
|
|
37
37
|
side: fe
|
|
38
38
|
source: packages/grammar/package.json
|
|
39
39
|
why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
|
|
40
40
|
'@starci/eslint-canon-be':
|
|
41
|
-
version: 3.8.
|
|
41
|
+
version: 3.8.12
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: be
|
|
45
45
|
source: packages/eslint-canon-be/package.json
|
|
46
46
|
why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
|
|
47
47
|
'@starci/eslint-canon-fe':
|
|
48
|
-
version: 9.5.
|
|
48
|
+
version: 9.5.14
|
|
49
49
|
group: starci
|
|
50
50
|
install: registry
|
|
51
51
|
side: fe
|
|
52
52
|
source: packages/eslint-canon-fe/package.json
|
|
53
53
|
why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
|
|
54
54
|
'@starci/eslint-grammar-core':
|
|
55
|
-
version: 0.15.
|
|
55
|
+
version: 0.15.25
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: fe
|
|
59
59
|
source: packages/eslint-grammar-core/package.json
|
|
60
60
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
61
61
|
'@starci/eslint-grammar-offset-pop':
|
|
62
|
-
version: 0.15.
|
|
62
|
+
version: 0.15.25
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
@@ -106,7 +106,7 @@ pins:
|
|
|
106
106
|
source: packages/ai-router/package.json
|
|
107
107
|
why: 'the AI pool router of a back end: a NestJS module that routes OpenAI-compatible chat, stream and embeddings calls across keys, models and providers, with @starci/ai-router/testing for its specs; @starci/jest-preset compiles it as an ESM-only dependency.'
|
|
108
108
|
'@starci/hfs':
|
|
109
|
-
version: 4.11.
|
|
109
|
+
version: 4.11.13
|
|
110
110
|
group: starci
|
|
111
111
|
install: registry
|
|
112
112
|
side: both
|
|
@@ -62,13 +62,17 @@ export function isSopsEnvelope(text) {
|
|
|
62
62
|
try { return sopsTree(parseYaml(src)); } catch { return false; }
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/**
|
|
65
|
+
/** A refused admission, named by its reason. */
|
|
66
66
|
const refusal = (reason) => ({ ok: false, reason });
|
|
67
67
|
|
|
68
|
+
const DOTENV_AGE_FIELD = /^age__list_(0|[1-9]\d{0,2})__map_(recipient|enc)$/u;
|
|
69
|
+
|
|
68
70
|
function dotenvMetadataValue(meta, age, key, value) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
const field = DOTENV_AGE_FIELD.exec(key);
|
|
72
|
+
if (field) {
|
|
73
|
+
const entry = (age[Number(field[1])] ??= {});
|
|
74
|
+
entry[field[2]] = value;
|
|
75
|
+
} else if (key === 'mac_only_encrypted') {
|
|
72
76
|
if (value !== 'false') return 'partial-mac';
|
|
73
77
|
meta[key] = false;
|
|
74
78
|
} else if (key.includes('__')) return 'unsupported-key-group';
|
|
@@ -88,13 +92,14 @@ function readDotenvMetadata(text) {
|
|
|
88
92
|
pairs.set(name, line.slice(at + 1).replaceAll(String.raw`\n`, '\n'));
|
|
89
93
|
}
|
|
90
94
|
const meta = {};
|
|
91
|
-
const age =
|
|
95
|
+
const age = [];
|
|
92
96
|
for (const [name, value] of pairs) {
|
|
93
97
|
if (!name.startsWith('sops_')) continue;
|
|
94
98
|
const reason = dotenvMetadataValue(meta, age, name.slice('sops_'.length), value);
|
|
95
99
|
if (reason) return { refusal: reason };
|
|
96
100
|
}
|
|
97
|
-
|
|
101
|
+
// A gap in the list indices is an entry sops never wrote: refused as an empty entry, never skipped.
|
|
102
|
+
meta.age = Array.from(age, (entry) => entry ?? null);
|
|
98
103
|
return { meta };
|
|
99
104
|
}
|
|
100
105
|
|
|
@@ -142,15 +147,35 @@ function validateAgeMetadata(meta, text, recipient) {
|
|
|
142
147
|
const fields = new Set([...providers, 'age', 'lastmodified', 'mac', 'version', 'unencrypted_suffix', 'encrypted_suffix', 'unencrypted_regex', 'encrypted_regex', 'unencrypted_comment_regex', 'encrypted_comment_regex', 'mac_only_encrypted']);
|
|
143
148
|
if (Object.keys(meta).some(name => !fields.has(name))) return refusal('unknown-metadata');
|
|
144
149
|
if (Object.hasOwn(meta, 'mac_only_encrypted') && meta.mac_only_encrypted !== false) return refusal('partial-mac');
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (!
|
|
148
|
-
if (typeof entry.recipient !== 'string' || entry.recipient !== recipient) return refusal('recipient-mismatch');
|
|
149
|
-
if (!hasValidAgePayload(entry)) return refusal('invalid-age-entry');
|
|
150
|
+
const set = ageSet(meta.age);
|
|
151
|
+
if (!set.ok) return set;
|
|
152
|
+
if (!set.recipients.includes(recipient)) return refusal('recipient-mismatch');
|
|
150
153
|
if (!hasValidEnvelopeVersion(meta)) return refusal('invalid-envelope');
|
|
151
154
|
return { ok: true };
|
|
152
155
|
}
|
|
153
156
|
|
|
157
|
+
const AGE_RECIPIENT = /^age1[ac-hj-np-z02-9]+$/u;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The age set of an envelope: one or more entries (the owner key and an environment's server key are the standard pair), each a
|
|
161
|
+
* well-formed recipient with its wrapped data key; an empty entry or a recipient named twice is refused.
|
|
162
|
+
*/
|
|
163
|
+
function ageSet(entries) {
|
|
164
|
+
if (!Array.isArray(entries) || entries.length === 0) return refusal('unsupported-age-set');
|
|
165
|
+
const recipients = [];
|
|
166
|
+
for (const entry of entries) {
|
|
167
|
+
if (!isAgeEntry(entry) || typeof entry.recipient !== 'string' || !AGE_RECIPIENT.test(entry.recipient) || !hasValidAgePayload(entry))
|
|
168
|
+
return refusal('invalid-age-entry');
|
|
169
|
+
if (recipients.includes(entry.recipient)) return refusal('duplicate-age-recipient');
|
|
170
|
+
recipients.push(entry.recipient);
|
|
171
|
+
}
|
|
172
|
+
return { ok: true, recipients };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Admit one flat age envelope for the native selected-identity invocation when `recipient` (the selected identity's public key) is
|
|
177
|
+
* one of its age set. Shape admission, never cryptographic proof.
|
|
178
|
+
*/
|
|
154
179
|
export function selectedAgeEnvelope(text, format, recipient) {
|
|
155
180
|
if (!['binary', 'json', 'yaml', 'dotenv'].includes(format)) return refusal('unsupported-format');
|
|
156
181
|
const parsed = readAgeMetadata(text, format);
|