@beignet/cli 0.0.37 → 0.0.38
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 +17 -0
- package/README.md +18 -5
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/inspect.js +15 -15
- package/dist/inspect.js.map +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +27 -6
- package/dist/lint.js.map +1 -1
- package/dist/make/inbox.js +7 -7
- package/dist/make/inbox.js.map +1 -1
- package/dist/make/payments.d.ts +2 -1
- package/dist/make/payments.d.ts.map +1 -1
- package/dist/make/payments.js +15 -11
- package/dist/make/payments.js.map +1 -1
- package/dist/make/shared.d.ts +1 -1
- package/dist/make/shared.d.ts.map +1 -1
- package/dist/make/shared.js +49 -37
- package/dist/make/shared.js.map +1 -1
- package/dist/make/tenancy.js +8 -8
- package/dist/make/tenancy.js.map +1 -1
- package/dist/make.d.ts.map +1 -1
- package/dist/make.js +27 -16
- package/dist/make.js.map +1 -1
- package/dist/operational-error-reporting.d.ts +15 -0
- package/dist/operational-error-reporting.d.ts.map +1 -0
- package/dist/operational-error-reporting.js +42 -0
- package/dist/operational-error-reporting.js.map +1 -0
- package/dist/outbox.d.ts.map +1 -1
- package/dist/outbox.js +73 -0
- package/dist/outbox.js.map +1 -1
- package/dist/provider-add.js +17 -17
- package/dist/provider-add.js.map +1 -1
- package/dist/provider-audit.js +3 -3
- package/dist/provider-audit.js.map +1 -1
- package/dist/schedule.d.ts.map +1 -1
- package/dist/schedule.js +28 -1
- package/dist/schedule.js.map +1 -1
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +37 -4
- package/dist/task.js.map +1 -1
- package/dist/templates/index.js +2 -2
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/server.d.ts +1 -1
- package/dist/templates/server.d.ts.map +1 -1
- package/dist/templates/server.js +5 -5
- package/dist/templates/server.js.map +1 -1
- package/dist/templates/testing.js +1 -1
- package/dist/templates/todos.js +6 -6
- package/package.json +4 -4
- package/src/config.ts +2 -2
- package/src/inspect.ts +15 -17
- package/src/lint.ts +35 -4
- package/src/make/inbox.ts +7 -7
- package/src/make/payments.ts +23 -15
- package/src/make/shared.ts +56 -40
- package/src/make/tenancy.ts +8 -8
- package/src/make.ts +30 -16
- package/src/operational-error-reporting.ts +60 -0
- package/src/outbox.ts +77 -0
- package/src/provider-add.ts +21 -17
- package/src/provider-audit.ts +3 -3
- package/src/schedule.ts +32 -1
- package/src/task.ts +41 -4
- package/src/templates/index.ts +2 -2
- package/src/templates/server.ts +5 -5
- package/src/templates/testing.ts +1 -1
- package/src/templates/todos.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @beignet/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.38
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1081ac6: Harden HTTP response handling, synchronous upload cleanup, CLI path and registry diagnostics, provider context preservation, Redis subscription observability, and provider documentation.
|
|
8
|
+
- d23b0b3: Continue versioned W3C trace context through outbox, event bus, BullMQ, and
|
|
9
|
+
Inngest boundaries without making telemetry metadata part of delivery success.
|
|
10
|
+
- 6bd52fc: Rename the canonical runtime port wiring file, value, and CLI config path to `infra/port-wiring.ts`, `initialPorts`, and `paths.portWiring`.
|
|
11
|
+
- 7b918c4: Standardize bounded terminal-only runtime error reporting, structured Sentry metadata redaction, and isolated reporting across HTTP, jobs, schedules, tasks, listeners, and outbox drains.
|
|
12
|
+
- Updated dependencies [443b9a1]
|
|
13
|
+
- Updated dependencies [1081ac6]
|
|
14
|
+
- Updated dependencies [d23b0b3]
|
|
15
|
+
- Updated dependencies [6bd52fc]
|
|
16
|
+
- Updated dependencies [7b918c4]
|
|
17
|
+
- Updated dependencies [7e1a68e]
|
|
18
|
+
- @beignet/core@0.0.38
|
|
19
|
+
|
|
3
20
|
## 0.0.37
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -351,7 +351,7 @@ The standard app layout includes the files feature generators expect:
|
|
|
351
351
|
|
|
352
352
|
```txt
|
|
353
353
|
app-context.ts
|
|
354
|
-
infra/
|
|
354
|
+
infra/port-wiring.ts
|
|
355
355
|
ports/index.ts
|
|
356
356
|
lib/routes.ts
|
|
357
357
|
lib/use-case.ts
|
|
@@ -380,6 +380,8 @@ export default defineConfig({
|
|
|
380
380
|
appContext: "src/app-context.ts",
|
|
381
381
|
contracts: "src/features",
|
|
382
382
|
features: "src/features",
|
|
383
|
+
ports: "src/ports/index.ts",
|
|
384
|
+
portWiring: "src/infra/port-wiring.ts",
|
|
383
385
|
routesBuilder: "src/lib/routes.ts",
|
|
384
386
|
routes: "src/app/api",
|
|
385
387
|
server: "src/core/server/index.ts",
|
|
@@ -657,7 +659,7 @@ Use `--events` to generate created, updated, and deleted domain events and
|
|
|
657
659
|
publish them through `ctx.ports.eventBus`. The
|
|
658
660
|
starter ships no event bus, so `--events` also wires one: it adds
|
|
659
661
|
`eventBus: EventBusPort` to `AppPorts`, defers the key in
|
|
660
|
-
`infra/
|
|
662
|
+
`infra/port-wiring.ts`, registers `createMemoryEventBusProvider()` in
|
|
661
663
|
`server/providers.ts`, and adds the `@beignet/provider-event-bus-memory`
|
|
662
664
|
dependency. The wiring is skipped when the ports file already mentions
|
|
663
665
|
`eventBus`, so apps that wired their own bus are left untouched. Use
|
|
@@ -719,7 +721,7 @@ event` (and `make resource --events`) wires `eventBus: EventBusPort` with
|
|
|
719
721
|
`createMemoryMailerProvider()` and `notifications: NotificationPort` with
|
|
720
722
|
`createInlineNotificationsProvider()`, both dev-default providers from
|
|
721
723
|
`@beignet/core`. Each port is wired independently — added to `AppPorts`,
|
|
722
|
-
deferred in `infra/
|
|
724
|
+
deferred in `infra/port-wiring.ts`, and registered in `server/providers.ts` —
|
|
723
725
|
and skipped when the ports file already has the key, so integrations such as
|
|
724
726
|
resend (which contributes `mailer`) and app-owned adapters are left
|
|
725
727
|
untouched. Swap the dev-default provider for a production adapter without
|
|
@@ -934,6 +936,12 @@ paths, and `--json` emits machine-readable output with `schemaVersion: 1`.
|
|
|
934
936
|
Run it in the deploy pipeline where production configuration is present; it
|
|
935
937
|
exits `1` on any error finding.
|
|
936
938
|
|
|
939
|
+
`beignet task run`, `beignet schedule run`, and `beignet outbox drain` use an
|
|
940
|
+
optional `ctx.ports.errorReporter` from their app-owned context. They report
|
|
941
|
+
terminal command failures, dead letters, and settlement failures, then perform
|
|
942
|
+
a bounded flush before stopping context. Retryable outbox deliveries remain
|
|
943
|
+
instrumentation/log events rather than incident reports.
|
|
944
|
+
|
|
937
945
|
## Lint app architecture
|
|
938
946
|
|
|
939
947
|
Run `lint` when you want the CLI to enforce Beignet dependency direction:
|
|
@@ -951,6 +959,11 @@ feature-specific domain files importing another feature's domain unless the
|
|
|
951
959
|
target is `features/shared/domain`. Workflow folders include feature-owned
|
|
952
960
|
jobs, listeners, notifications, schedules, and uploads.
|
|
953
961
|
|
|
962
|
+
Local `@/` imports are resolved through the app's `tsconfig.json` path mapping,
|
|
963
|
+
including `@/* -> ./src/*` layouts, before dependency direction is classified.
|
|
964
|
+
The CLI uses TypeScript's config parser, so JSON comments and extended
|
|
965
|
+
tsconfigs follow the same rules as the compiler.
|
|
966
|
+
|
|
954
967
|
Import diagnostics include 1-based `line` and `column` positions. Human
|
|
955
968
|
output prints clickable `file.ts:12:3` locations; runtime-boundary
|
|
956
969
|
diagnostics report the chain root file and the full import chain in the
|
|
@@ -1113,8 +1126,8 @@ The server exposes six tools:
|
|
|
1113
1126
|
- `doctor` - drift diagnostics as JSON, `{ strict?: boolean }` defaults to
|
|
1114
1127
|
`true` (read-only)
|
|
1115
1128
|
- `doctor_fix` - apply doctor's low-risk fixes; repairs route-group,
|
|
1116
|
-
schedule, task,
|
|
1117
|
-
|
|
1129
|
+
schedule, task, outbox, and fully unregistered listener registry drift when
|
|
1130
|
+
the central registry/provider anchors are recognizable
|
|
1118
1131
|
- `lint` - architecture dependency-direction diagnostics (read-only)
|
|
1119
1132
|
- `make` - run a generator with `{ artifact, name, ...options }`, the same
|
|
1120
1133
|
artifact kinds as `beignet make`
|
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,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
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,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAA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E;QACb,iBAAiB,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,qBAsClC,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAEjE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,GAAE,aAAkB,EAC1B,UAAU,CAAC,EAAE,MAAM,GAClB,qBAAqB,CA2BvB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,qBAAqB,CAAC,CA+ChC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAGjE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAGnE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAErE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAErE"}
|
package/dist/config.js
CHANGED
|
@@ -18,7 +18,7 @@ export const defaultBeignetConfig = {
|
|
|
18
18
|
schedules: "server/schedules.ts",
|
|
19
19
|
appContext: "app-context.ts",
|
|
20
20
|
ports: "ports/index.ts",
|
|
21
|
-
|
|
21
|
+
portWiring: "infra/port-wiring.ts",
|
|
22
22
|
features: "features",
|
|
23
23
|
policies: "features",
|
|
24
24
|
useCases: "features",
|
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;AA4FlC;;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,
|
|
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;AA4FlC;;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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AAC,CAC1C,CACF;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAAC,KAAa,EAAE,KAAa;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CACb,kDAAkD,KAAK,qBAAqB,CAC7E,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
|
@@ -267,7 +267,7 @@ function inspectConvention(files, config) {
|
|
|
267
267
|
]);
|
|
268
268
|
const missingResourceGenerator = missingRequirements(files, [
|
|
269
269
|
config.paths.appContext,
|
|
270
|
-
config.paths.
|
|
270
|
+
config.paths.portWiring,
|
|
271
271
|
config.paths.ports,
|
|
272
272
|
config.paths.server,
|
|
273
273
|
config.paths.useCaseBuilder,
|
|
@@ -892,8 +892,8 @@ async function inspectCanonicalConformance(targetDir, files, config, convention,
|
|
|
892
892
|
reason: "server/providers.ts should own provider registration, even when the provider list is small.",
|
|
893
893
|
},
|
|
894
894
|
{
|
|
895
|
-
file: config.paths.
|
|
896
|
-
reason: "infra/
|
|
895
|
+
file: config.paths.portWiring,
|
|
896
|
+
reason: "infra/port-wiring.ts should wire concrete app ports for the selected runtime.",
|
|
897
897
|
},
|
|
898
898
|
{
|
|
899
899
|
file: config.paths.routesBuilder,
|
|
@@ -1275,7 +1275,7 @@ async function inspectProductionReadiness(targetDir, files, config, convention)
|
|
|
1275
1275
|
const installedPackages = installedPackageNames(packageJson);
|
|
1276
1276
|
const providerDoctorRules = await providerDoctorRulesForInstalledPackages(targetDir, packageJson);
|
|
1277
1277
|
const configFiles = operationalConfigFiles(files, config);
|
|
1278
|
-
const infrastructurePath = directoryPath(path.dirname(config.paths.
|
|
1278
|
+
const infrastructurePath = directoryPath(path.dirname(config.paths.portWiring));
|
|
1279
1279
|
const schemaDir = `${infrastructurePath}/db/schema`;
|
|
1280
1280
|
let hasSecurityHeadersHook = false;
|
|
1281
1281
|
for (const file of files) {
|
|
@@ -1563,7 +1563,7 @@ async function inspectPaymentsProductionReadiness(targetDir, files, config, sour
|
|
|
1563
1563
|
diagnostics.push({
|
|
1564
1564
|
severity: "warning",
|
|
1565
1565
|
code: "BEIGNET_BILLING_ENTITLEMENTS_PROVIDER_MISSING",
|
|
1566
|
-
file: path.dirname(config.paths.
|
|
1566
|
+
file: path.dirname(config.paths.portWiring),
|
|
1567
1567
|
message: "features/billing/entitlements.ts exists, but no infra or server provider appears to call createBillingEntitlements(...). Wire the billing-backed entitlements port into AppPorts so paid feature gates use app billing state.",
|
|
1568
1568
|
});
|
|
1569
1569
|
}
|
|
@@ -1853,7 +1853,7 @@ async function usesEntitlementChecks(targetDir, files, sourceCache) {
|
|
|
1853
1853
|
return false;
|
|
1854
1854
|
}
|
|
1855
1855
|
async function hasBillingEntitlementsProviderWiring(targetDir, files, config, sourceCache) {
|
|
1856
|
-
const infraPath = path.dirname(config.paths.
|
|
1856
|
+
const infraPath = path.dirname(config.paths.portWiring);
|
|
1857
1857
|
const serverPath = path.dirname(config.paths.server);
|
|
1858
1858
|
const candidateFiles = files.filter((file) => /\.(?:ts|tsx|mts|cts)$/.test(file) &&
|
|
1859
1859
|
!isTestSourceFile(file) &&
|
|
@@ -2085,10 +2085,10 @@ function isRouteServerOrInfraFile(file, config) {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
function isInfraOrServerFile(file, config) {
|
|
2087
2087
|
const serverDir = directoryPath(path.dirname(config.paths.server));
|
|
2088
|
-
const infrastructureDir = directoryPath(path.dirname(config.paths.
|
|
2088
|
+
const infrastructureDir = directoryPath(path.dirname(config.paths.portWiring));
|
|
2089
2089
|
return (file === config.paths.server ||
|
|
2090
2090
|
file.startsWith(`${serverDir}/`) ||
|
|
2091
|
-
file === config.paths.
|
|
2091
|
+
file === config.paths.portWiring ||
|
|
2092
2092
|
file.startsWith(`${infrastructureDir}/`));
|
|
2093
2093
|
}
|
|
2094
2094
|
function containsCallExpression(source, name) {
|
|
@@ -2150,7 +2150,7 @@ async function inspectWorkflowRegistrationDrift(targetDir, files, config, conven
|
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
|
-
const infraDir = directoryPath(path.dirname(config.paths.
|
|
2153
|
+
const infraDir = directoryPath(path.dirname(config.paths.portWiring));
|
|
2154
2154
|
const listenerTarget = drift.listeners.wiringFile
|
|
2155
2155
|
? `${drift.listeners.wiringFile}, which already calls registerListeners(...)`
|
|
2156
2156
|
: drift.listeners.eventBusFile
|
|
@@ -2722,7 +2722,7 @@ async function inspectDatabaseLifecycleDrift(targetDir, files, config, conventio
|
|
|
2722
2722
|
const diagnostics = [];
|
|
2723
2723
|
const sourceCache = new Map();
|
|
2724
2724
|
const resources = await collectResourceNames(targetDir, files, config);
|
|
2725
|
-
const infrastructurePath = directoryPath(path.dirname(config.paths.
|
|
2725
|
+
const infrastructurePath = directoryPath(path.dirname(config.paths.portWiring));
|
|
2726
2726
|
const featuresPath = directoryPath(config.paths.features);
|
|
2727
2727
|
const repositoriesPath = path.join(infrastructurePath, "db", "repositories.ts");
|
|
2728
2728
|
const repositoriesSource = files.includes(repositoriesPath)
|
|
@@ -4589,10 +4589,10 @@ async function inspectResourceSlices(targetDir, files, config, convention, stric
|
|
|
4589
4589
|
const portFile = resourcePortFile(resource, singular, config);
|
|
4590
4590
|
const featureRouteFile = path.join(config.paths.features, resource, "routes.ts");
|
|
4591
4591
|
const sharedErrorsFile = path.join(config.paths.features, "shared", "errors.ts");
|
|
4592
|
-
const infrastructureDir = `${directoryPath(path.dirname(config.paths.
|
|
4593
|
-
const drizzleSchemaFile = path.join(path.dirname(config.paths.
|
|
4594
|
-
const drizzleRepositoryFile = path.join(path.dirname(config.paths.
|
|
4595
|
-
const memoryRepositoryFile = path.join(path.dirname(config.paths.
|
|
4592
|
+
const infrastructureDir = `${directoryPath(path.dirname(config.paths.portWiring))}/${resource}/`;
|
|
4593
|
+
const drizzleSchemaFile = path.join(path.dirname(config.paths.portWiring), "db", "schema", `${resource}.ts`);
|
|
4594
|
+
const drizzleRepositoryFile = path.join(path.dirname(config.paths.portWiring), resource, `drizzle-${singular}-repository.ts`);
|
|
4595
|
+
const memoryRepositoryFile = path.join(path.dirname(config.paths.portWiring), resource, `in-memory-${singular}-repository.ts`);
|
|
4596
4596
|
const routeFile = path.join(config.paths.routes, resource, "route.ts");
|
|
4597
4597
|
const catchAllRouteFile = path.join(config.paths.routes, "[[...path]]", "route.ts");
|
|
4598
4598
|
const testFile = resourceTestFile(resource, config);
|
|
@@ -4823,7 +4823,7 @@ async function collectResourceNames(targetDir, files, config) {
|
|
|
4823
4823
|
const resources = new Set();
|
|
4824
4824
|
const portsPath = directoryPath(path.dirname(config.paths.ports));
|
|
4825
4825
|
const featuresPath = directoryPath(config.paths.features);
|
|
4826
|
-
const infrastructurePath = directoryPath(path.dirname(config.paths.
|
|
4826
|
+
const infrastructurePath = directoryPath(path.dirname(config.paths.portWiring));
|
|
4827
4827
|
for (const file of files) {
|
|
4828
4828
|
const portMatch = new RegExp(`^${escapeRegExp(portsPath)}/([^/]+)-repository\\.ts$`).exec(file);
|
|
4829
4829
|
if (portMatch) {
|