@starci/eslint-canon-be 3.6.6 → 3.7.0

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -0
  3. package/dist/ai-gateway.d.ts +19 -0
  4. package/dist/ai-gateway.js +184 -0
  5. package/dist/app-composition.d.ts +1 -1
  6. package/dist/app-composition.js +18 -5
  7. package/dist/auth-passport.d.ts +14 -0
  8. package/dist/auth-passport.js +106 -0
  9. package/dist/index.js +6 -0
  10. package/dist/infra-owner.js +7 -5
  11. package/dist/jwt-alg.js +1 -1
  12. package/dist/lib/hfs-view.d.ts +5 -0
  13. package/dist/module-layering.js +6 -2
  14. package/dist/no-raw-sql.d.ts +9 -0
  15. package/dist/no-raw-sql.js +78 -0
  16. package/package.json +1 -1
  17. package/runtime/knowledge/hfs/canon-pins.yaml +54 -24
  18. package/runtime/knowledge/hfs/fe-stack.yaml +4 -11
  19. package/runtime/knowledge/hfs/rules.yaml +248 -155
  20. package/runtime/knowledge/hfs/slots.yaml +185 -174
  21. package/runtime/scripts/hfs/architecture/canon-clones.mjs +1 -1
  22. package/runtime/scripts/hfs/architecture/{supabase-be.mjs → identity.mjs} +45 -15
  23. package/runtime/scripts/hfs/architecture/index.mjs +2 -3
  24. package/runtime/scripts/hfs/architecture/{supabase-ast.mjs → jwt-ast.mjs} +2 -103
  25. package/runtime/scripts/hfs/architecture/register-once.mjs +1 -1
  26. package/runtime/scripts/hfs/architecture/schema-owner.mjs +29 -4
  27. package/runtime/scripts/hfs/architecture/server-action.mjs +3 -4
  28. package/runtime/scripts/hfs/architecture/side-boundary.mjs +1 -1
  29. package/runtime/scripts/hfs/architecture/{supabase-keys.mjs → sql-keys.mjs} +1 -1
  30. package/runtime/scripts/hfs/architecture/sql-owner.mjs +25 -27
  31. package/runtime/scripts/hfs/architecture/transport-owner.mjs +7 -3
  32. package/runtime/scripts/hfs/declaration-shape.mjs +15 -18
  33. package/runtime/scripts/hfs/manifest-shape.mjs +4 -4
  34. package/runtime/scripts/hfs/rule-params-shape.mjs +4 -1
  35. package/runtime/scripts/hfs/rules/database-constants.mjs +8 -10
  36. package/runtime/scripts/hfs/rules/database-migrations.mjs +3 -3
  37. package/runtime/scripts/hfs/slot-app-view.mjs +1 -1
  38. package/runtime/scripts/hfs/slots.mjs +8 -2
  39. package/runtime/scripts/lib/secret-patterns.mjs +2 -2
  40. package/runtime/scripts/hfs/architecture/supabase-tables.mjs +0 -50
  41. package/runtime/scripts/hfs/architecture/supabase.mjs +0 -226
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-be",
3
- "version": "3.6.6",
3
+ "version": "3.7.0",
4
4
  "description": "The StarCi back-end lint canon: every rule its laws publish, gathered as one flat-config plugin.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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.8
34
+ version: 0.15.11
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.6.6
41
+ version: 3.7.0
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.4.7
48
+ version: 9.5.0
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.8
55
+ version: 0.15.11
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.8
62
+ version: 0.15.11
63
63
  group: starci
64
64
  install: registry
65
65
  side: fe
@@ -85,12 +85,12 @@ pins:
85
85
  side: both
86
86
  source: packages/prettier-config/package.json
87
87
  '@starci/jest-preset':
88
- version: 2.4.1
88
+ version: 2.5.0
89
89
  group: starci
90
90
  install: registry
91
91
  side: be
92
92
  source: packages/jest-preset/package.json
93
- why: 'the Jest preset of a back end: the world runner runs up to min(--maxWorkers, slots) world files at once, each in its own process bound to one data slot of the test world (STARCI_TEST_WORLD_SLOT), and reads test-world state protocol 2 only: it pairs exactly with @starci/test-world, and any other state file is JEST_PRESET_WORLD_PAIR_MISMATCH. The unit run writes the lcov Sonar and Codecov import (services only); the integration, e2e and contract projects run every spec file in a worker process of its own (world-runner.cjs), so a process-global framework registry (@nestjs/graphql type metadata) never leaks between e2e files; it ships the unit kit (mockEntityManager, fakeTransaction, fakeIds, FakeClock, Outcome matchers) and the recordingOutbox claim side.'
93
+ why: 'the Jest preset of a back end: the world runner runs up to min(--maxWorkers, slots) world files at once, each in its own process bound to one data slot of the test world (STARCI_TEST_WORLD_SLOT), and reads test-world state protocol 2 only: it pairs exactly with @starci/test-world, and any other state file is JEST_PRESET_WORLD_PAIR_MISMATCH. The unit run writes the lcov Sonar and Codecov import (services only); the integration, e2e and contract projects run every spec file in a worker process of its own (world-runner.cjs), so a process-global framework registry (@nestjs/graphql type metadata) never leaks between e2e files; it ships the unit kit (mockEntityManager, fakeTransaction, fakeQueryBuilder, queueQueryBuilders, fakeIds, FakeClock, Outcome matchers) and the recordingOutbox claim side.'
94
94
  '@starci/test-world':
95
95
  version: 1.2.3
96
96
  group: starci
@@ -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.9.9
109
+ version: 4.10.0
110
110
  group: starci
111
111
  install: registry
112
112
  side: both
@@ -241,6 +241,16 @@ pins:
241
241
  group: framework
242
242
  side: be
243
243
  why: readiness probes with dependency indicators use Terminus (the liveness route of the scaffolded skeleton does not, being a thin door over the liveness service); every measured product back end resolves 11.1.1.
244
+ '@langchain/core':
245
+ version: 1.3.1
246
+ group: framework
247
+ side: be
248
+ why: 'the LangChain core of the one AI integration (BE-AI-3): prompt templates, output parsers, runnables and BaseRetriever; @langchain/openai takes it as its peer. The registry latest on 2026-10-29.'
249
+ '@langchain/openai':
250
+ version: 1.8.0
251
+ group: framework
252
+ side: be
253
+ why: 'ChatOpenAI and OpenAIEmbeddings of the one AI integration, pointed at the ai-router gateway with a virtual key (BE-AI-1, BE-AI-3, R327); peer @langchain/core ^1.3.1. The registry latest on 2026-10-29.'
244
254
  '@nestjs/cqrs':
245
255
  version: 11.0.3
246
256
  group: framework
@@ -533,7 +543,7 @@ pins:
533
543
  version: 3.1150.0
534
544
  group: framework
535
545
  side: be
536
- why: 'the S3 transport of integrations/object-storage, the one ObjectStorage adapter of both editions (MinIO, S3, Spaces, Supabase Storage); 3.1150.0 is the release of 2026-10-12, chosen over newer ones that had not aged two weeks.'
546
+ why: 'the S3 transport of integrations/object-storage, the one ObjectStorage adapter of both editions (MinIO, S3, Spaces); 3.1150.0 is the release of 2026-10-12, chosen over newer ones that had not aged two weeks.'
537
547
  '@aws-sdk/s3-request-presigner':
538
548
  version: 3.1150.0
539
549
  group: framework
@@ -584,27 +594,47 @@ pins:
584
594
  group: framework
585
595
  side: be
586
596
  why: 'the Express 5 integration @nestjs/apollo loads at boot (R111 nestjs-apollo-express5, knowledge/hfs/peer-integrations.yaml); every api app that serves GraphQL installs it; the latest registry version on 2026-10-13.'
587
- # --- Supabase lite
588
- '@supabase/ssr':
589
- version: 0.12.7
597
+ # --- lite identity (integrations/passport, ruling lite-self-hosted-postgres-passport-minio)
598
+ '@nestjs/passport':
599
+ version: 11.0.5
590
600
  group: framework
591
- side: fe
592
- why: the one server/browser client factory for a lite Next app; exact version registry-checked for the lite scaffold.
593
- '@supabase/supabase-js':
594
- version: 2.117.2
601
+ side: be
602
+ why: 'PassportStrategy of integrations/passport; 11.0.5 is CommonJS on the Nest 11 line (12.0.0 is ESM-only and breaks Nest 11 jest under the CommonJS transform of @starci/jest-preset), as nivo-lite runs it.'
603
+ passport:
604
+ version: 0.7.0
595
605
  group: framework
596
- side: both
597
- why: the generated Database-typed client used by the FE data owner and the BE Auth/Storage integration.
606
+ side: be
607
+ why: the strategy runtime under @nestjs/passport (its peer range ^0.5 || ^0.6 || ^0.7).
608
+ passport-google-oauth20:
609
+ version: 2.0.0
610
+ group: framework
611
+ side: be
612
+ why: Google OAuth 2.0 (authorization code with state and PKCE) of integrations/passport.
613
+ passport-local:
614
+ version: 1.0.0
615
+ group: framework
616
+ side: be
617
+ why: the email and password strategy of integrations/passport.
618
+ bcryptjs:
619
+ version: 3.0.3
620
+ group: framework
621
+ side: be
622
+ why: 'bcrypt in pure JavaScript (no native build on the alpine image); verifies the $2a$/$2b$ hashes auth.users carries over.'
623
+ '@types/passport-google-oauth20':
624
+ version: 2.0.17
625
+ group: framework
626
+ side: be
627
+ why: types of passport-google-oauth20.
628
+ '@types/passport-local':
629
+ version: 1.0.38
630
+ group: framework
631
+ side: be
632
+ why: types of passport-local.
598
633
  jose:
599
634
  version: 6.2.12
600
635
  group: framework
601
636
  side: be
602
- why: verifies Supabase access tokens against the project JWKS with issuer, audience, expiry and algorithm checks.
603
- supabase:
604
- version: 2.119.0
605
- group: tooling
606
- side: both
607
- why: the root CLI wrapper owns local schema lifecycle and generates the committed database types.
637
+ why: signs the app's own ES256 access tokens and verifies them against its own key set (createLocalJWKSet) in integrations/passport.
608
638
  class-transformer:
609
639
  version: 0.5.1
610
640
  group: framework
@@ -37,10 +37,10 @@ concerns:
37
37
  - id: rest
38
38
  tier: core
39
39
  packages: [axios]
40
- home: [fe.modules.api]
40
+ home: [fe.modules.api, fe.modules.auth]
41
41
  pattern: FE-API-REST
42
42
  forbids: [ky, superagent, node-fetch, cross-fetch, isomorphic-fetch]
43
- why: modules/api/rest/<area>/*.ts for uploads, presigned URLs and auth endpoints only; GraphQL carries every other call.
43
+ why: modules/api/rest/<area>/*.ts for uploads and presigned URLs, and modules/auth/auth-door.ts for the app's own auth doors only; GraphQL carries every other call.
44
44
  - id: data
45
45
  tier: core
46
46
  packages: [swr]
@@ -99,8 +99,8 @@ concerns:
99
99
  packages: []
100
100
  home: [fe.modules.auth]
101
101
  pattern: FE-AUTH
102
- forbids: []
103
- why: modules/auth is the identity-provider client (lite - the @supabase/supabase-js auth client; full - the app's IdP client); it yields the session and the access token for the Apollo link and never reads data.
102
+ forbids: ['@supabase/supabase-js', '@supabase/ssr', '@supabase/auth-js']
103
+ why: modules/auth is the session issuer's client (lite - auth-door.ts over the app's own back-end auth doors with the in-memory token store; full - the app's IdP client); it yields the session and the access token for the Apollo link and never reads data.
104
104
  - id: i18n
105
105
  tier: core
106
106
  packages: [next-intl]
@@ -256,13 +256,6 @@ concerns:
256
256
  pattern: FE-RULE-OWNERSHIP
257
257
  forbids: []
258
258
  why: The selected Grammar family's lint package runs beside the universal front-end canon; the family catalog declares the package and factory.
259
- - id: auth-supabase
260
- tier: opt
261
- packages: ['@supabase/supabase-js', '@supabase/ssr']
262
- home: [fe.modules.auth]
263
- pattern: FE-AUTH
264
- forbids: []
265
- why: the lite auth provider client and PKCE server cookie adapter, confined to modules/auth; data still goes through the back end.
266
259
  - id: framework-support
267
260
  tier: opt
268
261
  packages: [server-only, rxjs]