@beignet/cli 0.0.33 → 0.0.34
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 +11 -0
- package/README.md +7 -7
- package/dist/inspect.js +5 -4
- package/dist/inspect.js.map +1 -1
- package/dist/make/inbox.js +3 -3
- package/dist/make/payments.js +3 -3
- 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.js +3 -3
- package/dist/make.js +5 -5
- 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/templates/base.js +3 -3
- package/dist/templates/base.js.map +1 -1
- package/dist/templates/server.d.ts.map +1 -1
- package/dist/templates/server.js +11 -9
- package/dist/templates/server.js.map +1 -1
- package/dist/templates/todos.js +2 -2
- package/package.json +2 -2
- package/skills/app-structure/SKILL.md +2 -0
- package/src/inspect.ts +5 -6
- package/src/make/inbox.ts +3 -3
- package/src/make/payments.ts +3 -3
- package/src/make/shared.ts +1 -1
- package/src/make/tenancy.ts +3 -3
- package/src/make.ts +5 -5
- package/src/provider-add.ts +52 -69
- package/src/registry-edits.ts +2 -1
- package/src/templates/base.ts +3 -3
- package/src/templates/server.ts +11 -9
- package/src/templates/todos.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @beignet/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
- 479a383: Warn when hand-authored tenant-owned Drizzle repository ports expose raw `workspaceId` methods in addition to raw `tenantId` methods.
|
|
9
|
+
- 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.
|
|
10
|
+
- Updated dependencies [8226b4c]
|
|
11
|
+
- Updated dependencies [9345cc9]
|
|
12
|
+
- @beignet/core@0.0.34
|
|
13
|
+
|
|
3
14
|
## 0.0.33
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -568,7 +568,7 @@ The command writes `features/posts/policy.ts` with a `definePolicy(...)` starter
|
|
|
568
568
|
Register the policy with `createGate(...)`, install the gate as a port, and
|
|
569
569
|
bind it into request context so use cases can call `ctx.gate.authorize(...)`.
|
|
570
570
|
For tenant, ownership, or role-heavy rules, add a matrix test with
|
|
571
|
-
`createPolicyTester(...)` from `@beignet/core/
|
|
571
|
+
`createPolicyTester(...)` from `@beignet/core/testing`.
|
|
572
572
|
|
|
573
573
|
## Generate a port adapter
|
|
574
574
|
|
|
@@ -622,13 +622,13 @@ writes with a branded `TenantScope`; generated use cases call
|
|
|
622
622
|
`requireTenantScope(ctx)`, repository ports require `scope: TenantScope`, and
|
|
623
623
|
adapters unwrap the storage key with `tenantScopeId(scope)`. `doctor --strict`
|
|
624
624
|
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
|
|
625
|
+
hand-authored Drizzle ports expose raw `tenantId` or `workspaceId` app-facing
|
|
626
|
+
methods, or when scoped adapters stop using `tenantScopeId(scope)` predicates.
|
|
627
|
+
Use `--events` to generate created, updated, and deleted domain events and
|
|
628
|
+
publish them through `ctx.ports.eventBus`. The
|
|
629
629
|
starter ships no event bus, so `--events` also wires one: it adds
|
|
630
630
|
`eventBus: EventBusPort` to `AppPorts`, defers the key in
|
|
631
|
-
`infra/app-ports.ts`, registers `
|
|
631
|
+
`infra/app-ports.ts`, registers `createMemoryEventBusProvider()` in
|
|
632
632
|
`server/providers.ts`, and adds the `@beignet/provider-event-bus-memory`
|
|
633
633
|
dependency. The wiring is skipped when the ports file already mentions
|
|
634
634
|
`eventBus`, so apps that wired their own bus are left untouched. Use
|
|
@@ -684,7 +684,7 @@ reports events and jobs the registry cannot deliver.
|
|
|
684
684
|
|
|
685
685
|
Generators wire the provider-backed ports their output depends on. `make
|
|
686
686
|
event` (and `make resource --events`) wires `eventBus: EventBusPort` with
|
|
687
|
-
`
|
|
687
|
+
`createMemoryEventBusProvider()` from
|
|
688
688
|
`@beignet/provider-event-bus-memory`, including the package dependency.
|
|
689
689
|
`make notification` wires `mailer: MailerPort` with
|
|
690
690
|
`createMemoryMailerProvider()` and `notifications: NotificationPort` with
|
package/dist/inspect.js
CHANGED
|
@@ -1495,7 +1495,7 @@ async function inspectPaymentsProductionReadiness(targetDir, files, config, sour
|
|
|
1495
1495
|
severity: "warning",
|
|
1496
1496
|
code: "BEIGNET_PAYMENTS_STRIPE_MEMORY_PROVIDER",
|
|
1497
1497
|
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
|
|
1498
|
+
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
1499
|
});
|
|
1500
1500
|
}
|
|
1501
1501
|
if (!(await hasPaymentWebhookRoute(targetDir, files, config, sourceCache))) {
|
|
@@ -1551,7 +1551,8 @@ async function hasStripeMemoryProviderMismatch(targetDir, sourceCache, configFil
|
|
|
1551
1551
|
if (!installedPackages.has("@beignet/provider-payments-stripe")) {
|
|
1552
1552
|
return false;
|
|
1553
1553
|
}
|
|
1554
|
-
if (findProviderEntryIndex(providerEntries, ["
|
|
1554
|
+
if (findProviderEntryIndex(providerEntries, ["createStripePaymentsProvider"]) >=
|
|
1555
|
+
0) {
|
|
1555
1556
|
return false;
|
|
1556
1557
|
}
|
|
1557
1558
|
if (findProviderEntryIndex(providerEntries, [
|
|
@@ -2935,7 +2936,7 @@ async function inspectTenantScopeRepositoryDrift(targetDir, files, resources, co
|
|
|
2935
2936
|
severity: "warning",
|
|
2936
2937
|
code: "BEIGNET_TENANT_SCOPE_RAW_ID_BOUNDARY",
|
|
2937
2938
|
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.`,
|
|
2939
|
+
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
2940
|
});
|
|
2940
2941
|
continue;
|
|
2941
2942
|
}
|
|
@@ -3030,7 +3031,7 @@ function rawTenantRepositoryMethodBoundaries(block, tables) {
|
|
|
3030
3031
|
for (const method of repositoryMethodSignatures(block)) {
|
|
3031
3032
|
if (isProviderCorrelationMethod(method.name))
|
|
3032
3033
|
continue;
|
|
3033
|
-
const rawColumns = tenantColumnsUsedInSource(method.params, tables)
|
|
3034
|
+
const rawColumns = tenantColumnsUsedInSource(method.params, tables);
|
|
3034
3035
|
if (rawColumns.length === 0)
|
|
3035
3036
|
continue;
|
|
3036
3037
|
rawMethods.push(method.name);
|