@beignet/cli 0.0.33 → 0.0.35
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 +33 -0
- package/README.md +34 -7
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/inspect.js +54 -17
- package/dist/inspect.js.map +1 -1
- package/dist/lint.js +10 -3
- package/dist/lint.js.map +1 -1
- package/dist/make/inbox.d.ts.map +1 -1
- package/dist/make/inbox.js +4 -5
- package/dist/make/inbox.js.map +1 -1
- package/dist/make/payments.d.ts.map +1 -1
- package/dist/make/payments.js +5 -7
- package/dist/make/payments.js.map +1 -1
- package/dist/make/shared.js +1 -1
- package/dist/make/shared.js.map +1 -1
- package/dist/make/tenancy.d.ts.map +1 -1
- package/dist/make/tenancy.js +4 -6
- package/dist/make/tenancy.js.map +1 -1
- package/dist/make.js +8 -9
- package/dist/make.js.map +1 -1
- package/dist/provider-add.d.ts.map +1 -1
- package/dist/provider-add.js +52 -69
- package/dist/provider-add.js.map +1 -1
- package/dist/registry-edits.js +2 -1
- package/dist/registry-edits.js.map +1 -1
- package/dist/schedule.d.ts.map +1 -1
- package/dist/schedule.js +1 -1
- package/dist/schedule.js.map +1 -1
- package/dist/templates/agents.d.ts.map +1 -1
- package/dist/templates/agents.js +2 -0
- package/dist/templates/agents.js.map +1 -1
- package/dist/templates/base.js +3 -3
- package/dist/templates/base.js.map +1 -1
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +1 -0
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/server.d.ts +1 -0
- package/dist/templates/server.d.ts.map +1 -1
- package/dist/templates/server.js +19 -11
- package/dist/templates/server.js.map +1 -1
- package/dist/templates/testing.d.ts.map +1 -1
- package/dist/templates/testing.js +55 -26
- package/dist/templates/testing.js.map +1 -1
- package/dist/templates/todos.d.ts.map +1 -1
- package/dist/templates/todos.js +3 -4
- package/dist/templates/todos.js.map +1 -1
- package/package.json +3 -2
- package/skills/app-structure/SKILL.md +14 -1
- package/src/config.ts +2 -0
- package/src/inspect.ts +87 -21
- package/src/lint.ts +15 -3
- package/src/make/inbox.ts +4 -5
- package/src/make/payments.ts +4 -8
- package/src/make/shared.ts +1 -1
- package/src/make/tenancy.ts +4 -10
- package/src/make.ts +8 -9
- package/src/provider-add.ts +52 -69
- package/src/registry-edits.ts +2 -1
- package/src/schedule.ts +4 -3
- package/src/templates/agents.ts +2 -0
- package/src/templates/base.ts +3 -3
- package/src/templates/index.ts +1 -0
- package/src/templates/server.ts +19 -11
- package/src/templates/testing.ts +55 -26
- package/src/templates/todos.ts +3 -4
- package/src/test-helpers/generated-app.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @beignet/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.35
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 74aad51: Replace the schedule-specific instrumentation sink with shared provider targets, serve bodyless HEAD responses from GET routes, improve missing JSON content-type diagnostics, and expose the auth error HTTP status.
|
|
8
|
+
- db79263: Align route, listener, auth-provider, and webhook-integration APIs before 1.0. Route declarations now use an app-bound `createRoutes<AppContext>()` builder, listeners put their stable name first, Better Auth exports `createBetterAuthProvider(...)`, and vendor webhook verifiers live in `@beignet/webhooks-*` packages outside provider audits.
|
|
9
|
+
- 40f4155: Refresh package-shipped agent guidance for app-bound route builders, configured route-builder paths, webhook integrations, and operational error responses.
|
|
10
|
+
- c403db2: Isolate use-case observers, authenticate operational routes before context creation, honor configured generated-test roots, correct feature-helper linting, preserve optional OpenAPI descriptions, and keep upload resets stable.
|
|
11
|
+
- Updated dependencies [2101386]
|
|
12
|
+
- Updated dependencies [2290c4a]
|
|
13
|
+
- Updated dependencies [42921da]
|
|
14
|
+
- Updated dependencies [2a5b224]
|
|
15
|
+
- Updated dependencies [74aad51]
|
|
16
|
+
- Updated dependencies [db79263]
|
|
17
|
+
- Updated dependencies [397f106]
|
|
18
|
+
- Updated dependencies [40f4155]
|
|
19
|
+
- Updated dependencies [d1c0efd]
|
|
20
|
+
- Updated dependencies [c403db2]
|
|
21
|
+
- Updated dependencies [4cc5254]
|
|
22
|
+
- Updated dependencies [7d0c795]
|
|
23
|
+
- @beignet/core@0.0.35
|
|
24
|
+
|
|
25
|
+
## 0.0.34
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 8226b4c: Isolate notification channel failures, add app-owned preference checks, provide independently retryable queued delivery through existing job dispatchers, and document the app structure for queued notification workers.
|
|
30
|
+
- 479a383: Warn when hand-authored tenant-owned Drizzle repository ports expose raw `workspaceId` methods in addition to raw `tenantId` methods.
|
|
31
|
+
- 9345cc9: Stabilize the pre-1.0 public surface around factory-only providers, canonical server and testing imports, consistent memory naming, and the removal of deprecated aliases.
|
|
32
|
+
- Updated dependencies [8226b4c]
|
|
33
|
+
- Updated dependencies [9345cc9]
|
|
34
|
+
- @beignet/core@0.0.34
|
|
35
|
+
|
|
3
36
|
## 0.0.33
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -187,6 +187,11 @@ bun beignet doctor
|
|
|
187
187
|
beignet create [directory] [options]
|
|
188
188
|
beignet task run <name> [options]
|
|
189
189
|
beignet outbox drain [options]
|
|
190
|
+
beignet outbox list [options]
|
|
191
|
+
beignet outbox show <id> [options]
|
|
192
|
+
beignet outbox requeue <id> [options]
|
|
193
|
+
beignet outbox purge [options]
|
|
194
|
+
beignet outbox prune [options]
|
|
190
195
|
beignet schedule run <name> [options]
|
|
191
196
|
beignet make task <feature>/<name> [options]
|
|
192
197
|
beignet make contract <name> [options]
|
|
@@ -348,6 +353,7 @@ The standard app layout includes the files feature generators expect:
|
|
|
348
353
|
app-context.ts
|
|
349
354
|
infra/app-ports.ts
|
|
350
355
|
ports/index.ts
|
|
356
|
+
lib/routes.ts
|
|
351
357
|
lib/use-case.ts
|
|
352
358
|
```
|
|
353
359
|
|
|
@@ -374,6 +380,7 @@ export default defineConfig({
|
|
|
374
380
|
appContext: "src/app-context.ts",
|
|
375
381
|
contracts: "src/features",
|
|
376
382
|
features: "src/features",
|
|
383
|
+
routesBuilder: "src/lib/routes.ts",
|
|
377
384
|
routes: "src/app/api",
|
|
378
385
|
server: "src/core/server/index.ts",
|
|
379
386
|
listeners: "src/core/server/listeners.ts",
|
|
@@ -390,6 +397,10 @@ config before inspecting or writing files. When `appContext` is moved under a
|
|
|
390
397
|
source root such as `src/app-context.ts`, client setup follows that root at
|
|
391
398
|
`src/client/index.ts`.
|
|
392
399
|
|
|
400
|
+
The generated `lib/beignet-test-runner.ts` also resolves all four supported
|
|
401
|
+
config formats and includes configured test, feature, route, server, port,
|
|
402
|
+
infra-port, route-builder, and use-case-builder roots in test discovery.
|
|
403
|
+
|
|
393
404
|
The same config can declare app-owned names for Beignet operational database
|
|
394
405
|
tables when an app uses names other than the provider defaults:
|
|
395
406
|
|
|
@@ -568,7 +579,7 @@ The command writes `features/posts/policy.ts` with a `definePolicy(...)` starter
|
|
|
568
579
|
Register the policy with `createGate(...)`, install the gate as a port, and
|
|
569
580
|
bind it into request context so use cases can call `ctx.gate.authorize(...)`.
|
|
570
581
|
For tenant, ownership, or role-heavy rules, add a matrix test with
|
|
571
|
-
`createPolicyTester(...)` from `@beignet/core/
|
|
582
|
+
`createPolicyTester(...)` from `@beignet/core/testing`.
|
|
572
583
|
|
|
573
584
|
## Generate a port adapter
|
|
574
585
|
|
|
@@ -622,13 +633,13 @@ writes with a branded `TenantScope`; generated use cases call
|
|
|
622
633
|
`requireTenantScope(ctx)`, repository ports require `scope: TenantScope`, and
|
|
623
634
|
adapters unwrap the storage key with `tenantScopeId(scope)`. `doctor --strict`
|
|
624
635
|
also warns when tenant-scoped generated repositories lose that boundary, when
|
|
625
|
-
hand-authored Drizzle ports expose raw `tenantId` app-facing
|
|
626
|
-
scoped adapters stop using `tenantScopeId(scope)` predicates.
|
|
627
|
-
generate created, updated, and deleted domain events and
|
|
628
|
-
`ctx.ports.eventBus`. The
|
|
636
|
+
hand-authored Drizzle ports expose raw `tenantId` or `workspaceId` app-facing
|
|
637
|
+
methods, or when scoped adapters stop using `tenantScopeId(scope)` predicates.
|
|
638
|
+
Use `--events` to generate created, updated, and deleted domain events and
|
|
639
|
+
publish them through `ctx.ports.eventBus`. The
|
|
629
640
|
starter ships no event bus, so `--events` also wires one: it adds
|
|
630
641
|
`eventBus: EventBusPort` to `AppPorts`, defers the key in
|
|
631
|
-
`infra/app-ports.ts`, registers `
|
|
642
|
+
`infra/app-ports.ts`, registers `createMemoryEventBusProvider()` in
|
|
632
643
|
`server/providers.ts`, and adds the `@beignet/provider-event-bus-memory`
|
|
633
644
|
dependency. The wiring is skipped when the ports file already mentions
|
|
634
645
|
`eventBus`, so apps that wired their own bus are left untouched. Use
|
|
@@ -684,7 +695,7 @@ reports events and jobs the registry cannot deliver.
|
|
|
684
695
|
|
|
685
696
|
Generators wire the provider-backed ports their output depends on. `make
|
|
686
697
|
event` (and `make resource --events`) wires `eventBus: EventBusPort` with
|
|
687
|
-
`
|
|
698
|
+
`createMemoryEventBusProvider()` from
|
|
688
699
|
`@beignet/provider-event-bus-memory`, including the package dependency.
|
|
689
700
|
`make notification` wires `mailer: MailerPort` with
|
|
690
701
|
`createMemoryMailerProvider()` and `notifications: NotificationPort` with
|
|
@@ -700,6 +711,8 @@ Task, job, listener, schedule, and notification generators define artifacts
|
|
|
700
711
|
through app-owned context-bound builders in `lib/`. Each generator creates the
|
|
701
712
|
builder file when it is missing:
|
|
702
713
|
|
|
714
|
+
- `lib/routes.ts` exports `defineRoute` and `defineRouteGroup` from
|
|
715
|
+
`createRoutes<AppContext>()` (`@beignet/core/server`) and ships with every app
|
|
703
716
|
- `lib/tasks.ts` exports `defineTask` from `createTasks<AppContext>()`
|
|
704
717
|
(`@beignet/core/tasks`)
|
|
705
718
|
- `lib/jobs.ts` exports `defineJob` from `createJobs<AppContext>()`
|
|
@@ -732,6 +745,20 @@ The runner loads `server/outbox.ts` or `paths.outbox`. That module should export
|
|
|
732
745
|
lifecycle, so the CLI drain uses the same outbox, event bus, jobs,
|
|
733
746
|
instrumentation, actor, and tenant decisions as the scheduled drain route.
|
|
734
747
|
|
|
748
|
+
Inspect and recover failed deliveries through the same app-owned operational
|
|
749
|
+
context:
|
|
750
|
+
|
|
751
|
+
```bash
|
|
752
|
+
beignet outbox list --status deadLettered
|
|
753
|
+
beignet outbox show <id>
|
|
754
|
+
beignet outbox requeue <id> --reset-attempts
|
|
755
|
+
beignet outbox purge --before 2026-06-01T00:00:00Z --dry-run
|
|
756
|
+
beignet outbox prune --before 2026-06-01T00:00:00Z --dry-run
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
`purge` only targets dead-lettered messages; `prune` only targets delivered
|
|
760
|
+
messages. Both support bounded `--limit` runs and `--dry-run` previews.
|
|
761
|
+
|
|
735
762
|
There is intentionally no separate `beignet jobs drain` command. Outbox-backed
|
|
736
763
|
jobs drain through the outbox beside durable events. Direct provider jobs should
|
|
737
764
|
use provider-owned worker entrypoints, such as a BullMQ worker built with
|
package/dist/config.d.ts
CHANGED
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU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 -23,6 +23,7 @@ export const defaultBeignetConfig = {
|
|
|
23
23
|
policies: "features",
|
|
24
24
|
useCases: "features",
|
|
25
25
|
useCaseBuilder: "lib/use-case.ts",
|
|
26
|
+
routesBuilder: "lib/routes.ts",
|
|
26
27
|
listenersBuilder: "lib/listeners.ts",
|
|
27
28
|
jobsBuilder: "lib/jobs.ts",
|
|
28
29
|
schedulesBuilder: "lib/schedules.ts",
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA6ElC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE;QACL,SAAS,EAAE,UAAU;QACrB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,iBAAiB;QACzB,SAAS,EAAE,qBAAqB;QAChC,YAAY,EAAE,0BAA0B;QACxC,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kBAAkB;QAC1B,SAAS,EAAE,qBAAqB;QAChC,UAAU,EAAE,gBAAgB;QAC5B,KAAK,EAAE,gBAAgB;QACvB,mBAAmB,EAAE,oBAAoB;QACzC,QAAQ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B,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,6BAA6B,CAAC,KAAa,EAAE,KAAa;IACjE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CACb,yCAAyC,KAAK,qBAAqB,CACpE,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/inspect.js
CHANGED
|
@@ -895,6 +895,10 @@ async function inspectCanonicalConformance(targetDir, files, config, convention,
|
|
|
895
895
|
file: config.paths.infrastructurePorts,
|
|
896
896
|
reason: "infra/app-ports.ts should wire concrete app ports for the selected runtime.",
|
|
897
897
|
},
|
|
898
|
+
{
|
|
899
|
+
file: config.paths.routesBuilder,
|
|
900
|
+
reason: "lib/routes.ts should bind route declarations to the shared AppContext type.",
|
|
901
|
+
},
|
|
898
902
|
];
|
|
899
903
|
if (hasClientSurface) {
|
|
900
904
|
requiredFiles.push({
|
|
@@ -992,6 +996,18 @@ async function inspectCanonicalConformance(targetDir, files, config, convention,
|
|
|
992
996
|
});
|
|
993
997
|
}
|
|
994
998
|
}
|
|
999
|
+
if (files.includes(config.paths.routesBuilder)) {
|
|
1000
|
+
const routesBuilderSource = await readCachedSource(targetDir, config.paths.routesBuilder, sourceCache);
|
|
1001
|
+
if (!importsAppContext(routesBuilderSource, config.paths.routesBuilder, config, files) ||
|
|
1002
|
+
!/\bcreateRoutes\s*<\s*AppContext\s*>\s*\(\s*\)/.test(routesBuilderSource)) {
|
|
1003
|
+
diagnostics.push({
|
|
1004
|
+
severity: "warning",
|
|
1005
|
+
code: "BEIGNET_ROUTE_BUILDER_CONTEXT",
|
|
1006
|
+
file: config.paths.routesBuilder,
|
|
1007
|
+
message: `${config.paths.routesBuilder} should import AppContext from ${config.paths.appContext} and export route builders from createRoutes<AppContext>().`,
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
995
1011
|
const featureRoutesPath = `${featuresPath}/`;
|
|
996
1012
|
for (const file of files) {
|
|
997
1013
|
if (!file.startsWith(featureRoutesPath) || !file.endsWith("/routes.ts")) {
|
|
@@ -1000,20 +1016,12 @@ async function inspectCanonicalConformance(targetDir, files, config, convention,
|
|
|
1000
1016
|
const source = await readCachedSource(targetDir, file, sourceCache);
|
|
1001
1017
|
if (!source.includes("defineRouteGroup"))
|
|
1002
1018
|
continue;
|
|
1003
|
-
if (!
|
|
1019
|
+
if (!importsNamedFromFile(source, file, config.paths.routesBuilder, "defineRouteGroup", files)) {
|
|
1004
1020
|
diagnostics.push({
|
|
1005
1021
|
severity: "warning",
|
|
1006
|
-
code: "
|
|
1022
|
+
code: "BEIGNET_FEATURE_ROUTE_BUILDER",
|
|
1007
1023
|
file,
|
|
1008
|
-
message: `${file} should import
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1011
|
-
if (!/defineRouteGroup\s*<\s*AppContext\s*>\s*\(\s*\)\s*\(/.test(source)) {
|
|
1012
|
-
diagnostics.push({
|
|
1013
|
-
severity: "warning",
|
|
1014
|
-
code: "BEIGNET_FEATURE_ROUTE_GROUP_CONTEXT",
|
|
1015
|
-
file,
|
|
1016
|
-
message: `${file} should call defineRouteGroup<AppContext>()({ ... }) so route groups preserve per-route contract and use-case type checks.`,
|
|
1024
|
+
message: `${file} should import { defineRouteGroup } from ${config.paths.routesBuilder} so route groups use the app-bound context type.`,
|
|
1017
1025
|
});
|
|
1018
1026
|
}
|
|
1019
1027
|
}
|
|
@@ -1059,6 +1067,20 @@ function importsAppContext(source, importerFile, config, files) {
|
|
|
1059
1067
|
}
|
|
1060
1068
|
return false;
|
|
1061
1069
|
}
|
|
1070
|
+
function importsNamedFromFile(source, importerFile, expectedFile, importedName, files) {
|
|
1071
|
+
const importRegex = /import\s+\{([^}]+)\}\s+from\s+["']([^"']+)["']/g;
|
|
1072
|
+
for (const match of source.matchAll(importRegex)) {
|
|
1073
|
+
const sourceFile = sourceFileFromImport(match[2], importerFile, files);
|
|
1074
|
+
if (sourceFile !== expectedFile)
|
|
1075
|
+
continue;
|
|
1076
|
+
for (const member of match[1].split(",")) {
|
|
1077
|
+
const parsed = parseImportMember(member);
|
|
1078
|
+
if (parsed?.importedName === importedName)
|
|
1079
|
+
return true;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1062
1084
|
async function inspectAuthzAuditDrift(targetDir, files, config, convention, contracts) {
|
|
1063
1085
|
if (!convention.resourceGenerator)
|
|
1064
1086
|
return [];
|
|
@@ -1495,7 +1517,7 @@ async function inspectPaymentsProductionReadiness(targetDir, files, config, sour
|
|
|
1495
1517
|
severity: "warning",
|
|
1496
1518
|
code: "BEIGNET_PAYMENTS_STRIPE_MEMORY_PROVIDER",
|
|
1497
1519
|
file: serverProviderFiles(files, config)[0] ?? config.paths.server,
|
|
1498
|
-
message: "@beignet/provider-payments-stripe is installed and Stripe env/config is present, but server/providers.ts still registers memory payments. Register
|
|
1520
|
+
message: "@beignet/provider-payments-stripe is installed and Stripe env/config is present, but server/providers.ts still registers memory payments. Register createStripePaymentsProvider() before deploying Stripe-backed billing, or remove the Stripe provider/config until the app is ready to switch.",
|
|
1499
1521
|
});
|
|
1500
1522
|
}
|
|
1501
1523
|
if (!(await hasPaymentWebhookRoute(targetDir, files, config, sourceCache))) {
|
|
@@ -1551,7 +1573,8 @@ async function hasStripeMemoryProviderMismatch(targetDir, sourceCache, configFil
|
|
|
1551
1573
|
if (!installedPackages.has("@beignet/provider-payments-stripe")) {
|
|
1552
1574
|
return false;
|
|
1553
1575
|
}
|
|
1554
|
-
if (findProviderEntryIndex(providerEntries, ["
|
|
1576
|
+
if (findProviderEntryIndex(providerEntries, ["createStripePaymentsProvider"]) >=
|
|
1577
|
+
0) {
|
|
1555
1578
|
return false;
|
|
1556
1579
|
}
|
|
1557
1580
|
if (findProviderEntryIndex(providerEntries, [
|
|
@@ -2432,8 +2455,22 @@ async function listenedEventNames(targetDir, files, config) {
|
|
|
2432
2455
|
if (!listenerPattern.test(file) || isWorkflowTestFile(file))
|
|
2433
2456
|
continue;
|
|
2434
2457
|
const source = await readFile(path.join(targetDir, file), "utf8");
|
|
2435
|
-
|
|
2436
|
-
|
|
2458
|
+
const callPattern = /\bdefineListener\s*\(/g;
|
|
2459
|
+
for (const match of source.matchAll(callPattern)) {
|
|
2460
|
+
const openIndex = source.indexOf("(", match.index ?? 0);
|
|
2461
|
+
if (openIndex === -1)
|
|
2462
|
+
continue;
|
|
2463
|
+
const closeIndex = matchingDelimiterIndex(source, openIndex, "(", ")");
|
|
2464
|
+
if (closeIndex === -1)
|
|
2465
|
+
continue;
|
|
2466
|
+
const args = splitTopLevelArguments(source.slice(openIndex + 1, closeIndex));
|
|
2467
|
+
const options = args[1]?.trim();
|
|
2468
|
+
if (!options?.startsWith("{") || !options.endsWith("}"))
|
|
2469
|
+
continue;
|
|
2470
|
+
const eventProperty = splitTopLevelArguments(options.slice(1, -1)).find((property) => /^\s*event\s*:/.test(property));
|
|
2471
|
+
const eventName = /^\s*event\s*:\s*([A-Za-z_$][\w$]*)/.exec(eventProperty ?? "")?.[1];
|
|
2472
|
+
if (eventName)
|
|
2473
|
+
listened.add(eventName);
|
|
2437
2474
|
}
|
|
2438
2475
|
}
|
|
2439
2476
|
return listened;
|
|
@@ -2935,7 +2972,7 @@ async function inspectTenantScopeRepositoryDrift(targetDir, files, resources, co
|
|
|
2935
2972
|
severity: "warning",
|
|
2936
2973
|
code: "BEIGNET_TENANT_SCOPE_RAW_ID_BOUNDARY",
|
|
2937
2974
|
file: portFile,
|
|
2938
|
-
message: `${portFile} declares tenant-owned repository methods (${rawBoundaries.join(", ")}) with raw tenant IDs. Use TenantScope at app-facing repository boundaries and unwrap it with tenantScopeId(scope) inside ${repositoryFile}; keep provider-correlation lookups separate from authorization.`,
|
|
2975
|
+
message: `${portFile} declares tenant-owned repository methods (${rawBoundaries.join(", ")}) with raw tenant or workspace IDs. Use TenantScope at app-facing repository boundaries and unwrap it with tenantScopeId(scope) inside ${repositoryFile}; keep provider-correlation lookups separate from authorization.`,
|
|
2939
2976
|
});
|
|
2940
2977
|
continue;
|
|
2941
2978
|
}
|
|
@@ -3030,7 +3067,7 @@ function rawTenantRepositoryMethodBoundaries(block, tables) {
|
|
|
3030
3067
|
for (const method of repositoryMethodSignatures(block)) {
|
|
3031
3068
|
if (isProviderCorrelationMethod(method.name))
|
|
3032
3069
|
continue;
|
|
3033
|
-
const rawColumns = tenantColumnsUsedInSource(method.params, tables)
|
|
3070
|
+
const rawColumns = tenantColumnsUsedInSource(method.params, tables);
|
|
3034
3071
|
if (rawColumns.length === 0)
|
|
3035
3072
|
continue;
|
|
3036
3073
|
rawMethods.push(method.name);
|