@starci/eslint-grammar-core 0.21.22 → 0.21.23
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
|
+
## 0.21.23 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
- Changed: version stamp only, with `@starci/grammar` 0.21.23; requires `@starci/eslint-canon-fe` 9.13.6. The runtime copies carry the module shape of `be.integrations.passport` in the package slot manifest, the R304 law and the canon pins of `@starci/hfs` 5.8.0.
|
|
6
|
+
|
|
3
7
|
## 0.21.22 - 2026-11-04
|
|
4
8
|
|
|
5
9
|
- Changed: version stamp only, with `@starci/grammar` 0.21.22; requires `@starci/eslint-canon-fe` 9.13.5. the runtime copy of the canon pins names `@starci/hfs` 5.7.1 and the release-7a versions.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-grammar-core",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.23",
|
|
4
4
|
"description": "ESLint rules for the core Grammar's component, token and composition contracts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=22"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@starci/eslint-canon-fe": "9.13.
|
|
44
|
+
"@starci/eslint-canon-fe": "9.13.6",
|
|
45
45
|
"eslint": ">=9",
|
|
46
46
|
"typescript": ">=5.9"
|
|
47
47
|
},
|
|
@@ -38,7 +38,7 @@ pins:
|
|
|
38
38
|
source: packages/next-data/package.json
|
|
39
39
|
why: 'the SWR data helpers of every front end (fe-stack data, owner:next-data-package): pollingRestart, the viewer and tenant key helpers, viewerSwrConfig and the viewer cache; each operation hook stays in the app and the package holds no component.'
|
|
40
40
|
'@starci/grammar':
|
|
41
|
-
version: 0.21.
|
|
41
|
+
version: 0.21.23
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: fe
|
|
@@ -52,28 +52,28 @@ pins:
|
|
|
52
52
|
source: packages/next-i18n/package.json
|
|
53
53
|
why: 'the next-intl stack of every front end (fe-stack i18n, owner:next-i18n-package): defineI18n over the locales of the app, the locale-negotiating proxy, the locale-aware navigation, the request config that loads the catalogs of the app and the locale read of the [locale] layout; the app keeps its message catalogs and writes none of the stack.'
|
|
54
54
|
'@starci/eslint-canon-be':
|
|
55
|
-
version: 3.
|
|
55
|
+
version: 3.16.0
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: be
|
|
59
59
|
source: packages/eslint-canon-be/package.json
|
|
60
60
|
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.'
|
|
61
61
|
'@starci/eslint-canon-fe':
|
|
62
|
-
version: 9.13.
|
|
62
|
+
version: 9.13.6
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
66
66
|
source: packages/eslint-canon-fe/package.json
|
|
67
67
|
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.'
|
|
68
68
|
'@starci/eslint-grammar-core':
|
|
69
|
-
version: 0.21.
|
|
69
|
+
version: 0.21.23
|
|
70
70
|
group: starci
|
|
71
71
|
install: registry
|
|
72
72
|
side: fe
|
|
73
73
|
source: packages/eslint-grammar-core/package.json
|
|
74
74
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
75
75
|
'@starci/eslint-grammar-offset-pop':
|
|
76
|
-
version: 0.21.
|
|
76
|
+
version: 0.21.23
|
|
77
77
|
group: starci
|
|
78
78
|
install: registry
|
|
79
79
|
side: fe
|
|
@@ -155,7 +155,7 @@ pins:
|
|
|
155
155
|
source: packages/mail/package.json
|
|
156
156
|
why: 'outgoing mail of a back end: a NestJS module and the Mailer port over SMTP (connect, greeting, socket and total timeouts, STARTTLS required by default, recipient, message and attachment checks, a shared SMTP target policy, coded errors, typed escaping render helpers returning { subject, text, html }), with @starci/mail/testing for its specs; the only importer of nodemailer (R90).'
|
|
157
157
|
'@starci/hfs':
|
|
158
|
-
version: 5.
|
|
158
|
+
version: 5.8.0
|
|
159
159
|
group: starci
|
|
160
160
|
install: registry
|
|
161
161
|
side: both
|
|
@@ -2857,7 +2857,7 @@ rules:
|
|
|
2857
2857
|
code: "HFS_SERVICE_PLACEMENT"
|
|
2858
2858
|
editions: [lite, full]
|
|
2859
2859
|
docs: [docs/microservices.md#r163]
|
|
2860
|
-
law: "A back-end service lives only at `be/apps/<service>/`: a folder with a `Dockerfile` of its own, or with a `package.json` other than the app root's and those of the
|
|
2860
|
+
law: "A back-end service lives only at `be/apps/<service>/`: a folder with a `Dockerfile` of its own, or with a `package.json` other than the app root's and those of the workspace packages (`fe/apps/<app>`, `fe/packages/<pkg>`, a root `packages/<name>`), outside `be/apps/<service>/` (and outside a front end's `fe/apps/<app>/Dockerfile`) is a second service root and a finding; a service is a Nest app of the one repository that shares the `be/src` libraries and the one package.json, and its image is built from its own Dockerfile."
|
|
2861
2861
|
kinds: [check]
|
|
2862
2862
|
gates: [land, ci]
|
|
2863
2863
|
failureCodes: ["HFS_SERVICE_PLACEMENT"]
|
|
@@ -4185,7 +4185,7 @@ rules:
|
|
|
4185
4185
|
editions: [lite, full]
|
|
4186
4186
|
docs:
|
|
4187
4187
|
- {path: docs/application-stacks.md#r250-deploy-scan, editions: [lite, full]}
|
|
4188
|
-
law: "In lite and full apps, scheduled work belongs to the back-end queue scheduler, a platform/jobs tick (R335) that enqueues through the queue outbox or a declared replicated-job. Deployment files, scripts, workflows, compose files and Dockerfiles install no host crontab, cron.d entry, systemd timer, @reboot job or at job; a workflow does not schedule app work. Docker compose up, down and pull run only against an explicitly dev environment. Deploy shell scripts delegate to docker, starci or the app CLI, and contain no node -e, psql, inline SQL or downloaded shell logic."
|
|
4188
|
+
law: "In lite and full apps, scheduled work belongs to the back-end queue scheduler, a platform/jobs tick (R335) that enqueues through the queue outbox or a declared replicated-job. Deployment files, scripts, workflows, compose files and Dockerfiles install no host crontab, cron.d entry, systemd timer, @reboot job or at job; a workflow does not schedule app work (the managed nightly cache verify, `cache-verify.yml`, is the one scheduled workflow). Docker compose up, down and pull run only against an explicitly dev environment. Deploy shell scripts delegate to docker, starci or the app CLI, and contain no node -e, psql, inline SQL or downloaded shell logic."
|
|
4189
4189
|
kinds: [check]
|
|
4190
4190
|
gates: [settle, land, ci]
|
|
4191
4191
|
failureCodes: ["HFS_HOST_CRON", "HFS_DEPLOY_NO_LOGIC", "HFS_DEPLOY_COMPOSE_ON_VPS", "HFS_DEPLOY_SCHEDULER"]
|
|
@@ -4340,13 +4340,14 @@ rules:
|
|
|
4340
4340
|
editionWhy: "owner:lite-backing-services makes the db service lite's database; database configuration, extension, migration and seed requirements apply to that backing."
|
|
4341
4341
|
docs: [docs/microservices.md#r259]
|
|
4342
4342
|
templateNa: "Extension use, contract migrations, vault operations and seed literals are product-authored db content, rather than a scaffolded SQL surface."
|
|
4343
|
-
law: "DB_CONFIG_EXT: extensions belong to the database allowlist, vault writes and migration role passwords are refused, and seed data holds no real email or phone. Destructive DDL belongs only to *_contract_* migrations whose targets are no longer referenced by back-end SQL or entities, and a contract migration that is new since the previous release tag (the newest v* tag HEAD contains) never destroys an object that the back-end sources of that tag still reference: the deploy applies it right after the accept, while that release is the rollback target, so the code change goes in one release and its contract migration in the next. Seeds contain no real email or phone literals."
|
|
4343
|
+
law: "DB_CONFIG_EXT: extensions belong to the database allowlist, vault writes and migration role passwords are refused, and seed data holds no real email or phone. Destructive DDL belongs only to *_contract_* migrations whose targets are no longer referenced by back-end SQL or entities, and a contract migration that is new since the previous release tag (the newest v* tag HEAD contains) never destroys an object that the back-end sources of that tag still reference: the deploy applies it right after the accept, while that release is the rollback target, so the code change goes in one release and its contract migration in the next. A migration already on the base unchanged is immutable (R213), so its destructive and dynamic DDL is reported as a known item, not a blocker; an owner ruling in hfs.json `db.destructiveRulings` (the exact migration, the exact objects, a reason and the date) accepts those objects outside a contract migration only while the same proof finds them unreferenced, else DB_DESTRUCTIVE_RULING_UNPROVEN. Seeds contain no real email or phone literals."
|
|
4344
4344
|
kinds: [check]
|
|
4345
4345
|
gates: [settle, land, ci]
|
|
4346
|
-
failureCodes: ["DB_EXTENSION_ALLOWED", "DB_MIGRATION_DESTRUCTIVE", "HFS_SEED_PII", "DB_VAULT_WRITE"]
|
|
4346
|
+
failureCodes: ["DB_EXTENSION_ALLOWED", "DB_MIGRATION_DESTRUCTIVE", "DB_DESTRUCTIVE_RULING_UNPROVEN", "HFS_SEED_PII", "DB_VAULT_WRITE"]
|
|
4347
4347
|
enforcers:
|
|
4348
4348
|
- {kind: hfs, id: db-config-ext, at: scripts/hfs/rules/database-config.mjs}
|
|
4349
4349
|
- {kind: hfs, id: db-migration-destructive, at: scripts/hfs/rules/database-migrations.mjs}
|
|
4350
|
+
- {kind: hfs, id: db-migration-landed, at: scripts/hfs/rules/database-landed.mjs}
|
|
4350
4351
|
proves:
|
|
4351
4352
|
- {path: packages/hfs/src/hfs-database-config.spec.mjs, editions: [lite], codes: [DB_EXTENSION_ALLOWED, DB_MIGRATION_DESTRUCTIVE, HFS_SEED_PII, DB_VAULT_WRITE]}
|
|
4352
4353
|
exemplifiedBy:
|
|
@@ -5270,7 +5271,7 @@ rules:
|
|
|
5270
5271
|
- {path: packages/hfs/src/bypass-detector.spec.mjs, editions: [lite, full], codes: [HFS_BYPASS_MARKER]}
|
|
5271
5272
|
- id: R304
|
|
5272
5273
|
code: "BE_SCHEMA_PLACE"
|
|
5273
|
-
law: "The back end validates by zone. A transport door (GraphQL `@InputType`, REST request class) is validated by `class-validator` (R42); untrusted data that never reaches a DTO (a provider's HTTP response, structured model output, a queue or outbox payload read back, a tool argument) is read through a `zod` schema. `zod` is imported only from a `<name>.schema.ts` file (or its spec) of a `modules/domain`, `modules/platform` or `modules/integrations` owner, never in a feature, a transport door or a `dto/` folder, and a schema file imports neither `class-validator`, `class-transformer` nor `@nestjs/graphql`, imports zod and declares only zod schema values and their types (no class, provider, function or other logic). The spec of a schema file parses the schema directly and builds no testing module only while its sibling is such a file. The reader that calls the schema maps a failed parse to its owner's error family. No schema is shared between the front end and the back end: the shared contract is the emitted `schema.graphql` and `openapi.json`."
|
|
5274
|
+
law: "The back end validates by zone. A transport door (GraphQL `@InputType`, REST request class) is validated by `class-validator` (R42); untrusted data that never reaches a DTO (a provider's HTTP response, structured model output, a queue or outbox payload read back, a tool argument) is read through a `zod` schema. `zod` is imported only from a `<name>.schema.ts` file (or its spec) of a `modules/domain`, `modules/platform` or `modules/integrations` owner, or from any file of a root workspace package (tier `package`, `packages/<name>/`), whose node, block and vocabulary contracts are zod schemas, never in a feature, a transport door or a `dto/` folder, and a schema file imports neither `class-validator`, `class-transformer` nor `@nestjs/graphql`, imports zod and declares only zod schema values and their types (no class, provider, function or other logic). The spec of a schema file parses the schema directly and builds no testing module only while its sibling is such a file. The reader that calls the schema maps a failed parse to its owner's error family. No schema of a module is shared between the front end and the back end: the shared contract is the emitted `schema.graphql` and `openapi.json`."
|
|
5274
5275
|
kinds: [lint, design]
|
|
5275
5276
|
gates: [pre-commit, settle, land, ci]
|
|
5276
5277
|
failureCodes: ["BE_SCHEMA_PLACE"]
|
|
@@ -6623,7 +6624,7 @@ rules:
|
|
|
6623
6624
|
- {path: packages/hfs/src/stack-local.spec.mjs, editions: [lite, full]}
|
|
6624
6625
|
- id: R374
|
|
6625
6626
|
code: "STACKS_CODE_BIND_MOUNT"
|
|
6626
|
-
law: "A service the app customises runs from an image built out of `.starcistacks/images/<name>/` (a Dockerfile whose every FROM is digest-pinned and whose final stage is the harness's image for that service, the fork or its runtime layer, when the harness owns one), the same image in every environment; no stack or compose file bind-mounts code, plugins or scripts into a service container (data volumes, secrets, least grants and read-only plain config data files stay allowed)."
|
|
6627
|
+
law: "A service the app customises runs from an image built out of `.starcistacks/images/<name>/` (a Dockerfile whose every FROM is digest-pinned and whose final stage is the harness's image for that service, the fork or its runtime layer, when the harness owns one), the same image in every environment (the folder build, or a project-owned reference `<project>` or `<project>-<name>` as the managed images workflow publishes it); no stack or compose file bind-mounts code, plugins or scripts into a service container (data volumes, secrets, least grants and read-only plain config data files stay allowed)."
|
|
6627
6628
|
kinds: [check]
|
|
6628
6629
|
gates: [settle, land, ci]
|
|
6629
6630
|
failureCodes: ["STACKS_CODE_BIND_MOUNT", "STACKS_IMAGE_BASE_UNPINNED", "STACKS_IMAGE_BASE_NOT_FORK", "STACKS_IMAGE_ENV_DIVERGES"]
|
|
@@ -2044,8 +2044,8 @@ slots:
|
|
|
2044
2044
|
tracked: tracked
|
|
2045
2045
|
tier: integrations
|
|
2046
2046
|
owner: true
|
|
2047
|
-
requires: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.
|
|
2048
|
-
allows: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.
|
|
2047
|
+
requires: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.module-definition.ts, passport.module.ts] # Secrets, no defaults (R44); options and named injectors (R83); the kit and the module over @starci/auth
|
|
2048
|
+
allows: [index.ts, passport.config.ts, passport.options.ts, passport.decorators.ts, passport.kit.ts, passport.module-definition.ts, passport.module.ts, errors/]
|
|
2049
2049
|
logic: [passport.kit.ts] # the verifier mapping over the package: measured at 100 per file
|
|
2050
2050
|
tests: unit-beside
|
|
2051
2051
|
rules: [BE_TIER_DIRECTION, BE_ERROR_HOME, BE_SECRET_DEFAULT, BE_INFRA_OWNER, BE_AUTH_PASSPORT_OWNER, BE_AUTH_JWT_OWN_JWKS, BE_AUTH_REFRESH_COOKIE]
|
|
@@ -5,6 +5,13 @@ import { kindShapeProblems, patternShapeProblems } from './declaration-slots.mjs
|
|
|
5
5
|
import { byCodeUnit } from '../lib/list.mjs';
|
|
6
6
|
/** Shape problems of the optional hfs.json `db` block of a lite app: the environment variable naming its database, its image, forced RLS and its application role. */
|
|
7
7
|
const isStringList = (value) => Array.isArray(value) && value.every((entry) => typeof entry === 'string' && entry.trim());
|
|
8
|
+
/** One owner ruling on a migration's destructive DDL: the exact file, the exact objects, the reason and the date the owner ruled it. */
|
|
9
|
+
const isDestructiveRuling = (ruling) => isPlainObject(ruling)
|
|
10
|
+
&& typeof ruling.migration === 'string' && /^db\/migrations\/\d{14}_[a-z0-9_-]+\.sql$/.test(ruling.migration)
|
|
11
|
+
&& isStringList(ruling.objects) && ruling.objects.length > 0
|
|
12
|
+
&& typeof ruling.reason === 'string' && ruling.reason.trim() !== ''
|
|
13
|
+
&& typeof ruling.date === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(ruling.date)
|
|
14
|
+
&& Object.keys(ruling).every((key) => ['migration', 'objects', 'reason', 'date'].includes(key));
|
|
8
15
|
function dbBlockProblems(block) {
|
|
9
16
|
if (block === undefined)
|
|
10
17
|
return [];
|
|
@@ -12,7 +19,7 @@ function dbBlockProblems(block) {
|
|
|
12
19
|
return ['db must be an object'];
|
|
13
20
|
const bad = [];
|
|
14
21
|
for (const key of Object.keys(block))
|
|
15
|
-
if (!['urlEnv', 'image', 'forceRls', 'forceRlsExemptions', 'appRole'].includes(key))
|
|
22
|
+
if (!['urlEnv', 'image', 'forceRls', 'forceRlsExemptions', 'appRole', 'destructiveRulings'].includes(key))
|
|
16
23
|
bad.push(`db has unknown key ${key}`);
|
|
17
24
|
if (block.urlEnv !== undefined && (typeof block.urlEnv !== 'string' || !/^[A-Z][A-Z0-9_]*$/.test(block.urlEnv)))
|
|
18
25
|
bad.push('db.urlEnv must name an UPPER_CASE environment variable');
|
|
@@ -24,6 +31,8 @@ function dbBlockProblems(block) {
|
|
|
24
31
|
bad.push('db.appRole must name a role');
|
|
25
32
|
if (block.forceRlsExemptions !== undefined && !Array.isArray(block.forceRlsExemptions))
|
|
26
33
|
bad.push('db.forceRlsExemptions must be a list of { table, reason }');
|
|
34
|
+
if (block.destructiveRulings !== undefined && !(Array.isArray(block.destructiveRulings) && block.destructiveRulings.every(isDestructiveRuling)))
|
|
35
|
+
bad.push('db.destructiveRulings must be a list of { migration, objects, reason, date } naming one db/migrations file, the objects it destroys, why and the date the owner ruled it (YYYY-MM-DD)');
|
|
27
36
|
return bad;
|
|
28
37
|
}
|
|
29
38
|
function appShapeProblems(apps, at, side, names) {
|