create-strata 2.2.36 → 2.2.37
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/dist/cli.js +24 -27
- package/dist/templates/package.json +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3177,9 +3177,9 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
3177
3177
|
"@getstrata/cli": "workspace:*",
|
|
3178
3178
|
"@getstrata/core": "workspace:*"
|
|
3179
3179
|
} : {
|
|
3180
|
-
"@getstrata/bootstrap": "^2.2.
|
|
3181
|
-
"@getstrata/cli": "^2.2.
|
|
3182
|
-
"@getstrata/core": "^2.2.
|
|
3180
|
+
"@getstrata/bootstrap": "^2.2.37",
|
|
3181
|
+
"@getstrata/cli": "^2.2.37",
|
|
3182
|
+
"@getstrata/core": "^2.2.37"
|
|
3183
3183
|
};
|
|
3184
3184
|
coreDeps.eta = "^4.6.0";
|
|
3185
3185
|
if (options.layers?.database === "mysql") {
|
|
@@ -4916,48 +4916,45 @@ export default createOutboxMigration("0005_outbox", "${driver}", { rls: ${rls} }
|
|
|
4916
4916
|
`;
|
|
4917
4917
|
}
|
|
4918
4918
|
function renderCliQueueFailedTs() {
|
|
4919
|
-
return `
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
}
|
|
4923
|
-
|
|
4924
|
-
async function queueFailedCommand(): Promise<void> {
|
|
4925
|
-
const { queueFailedCommand: run } = await import("@getstrata/cli/queueFailed");
|
|
4926
|
-
await run(bootApp);
|
|
4927
|
-
}
|
|
4928
|
-
|
|
4929
|
-
async function queueRetryCommand(id?: string): Promise<void> {
|
|
4930
|
-
const { queueRetryCommand: run } = await import("@getstrata/cli/queueFailed");
|
|
4931
|
-
await run(id, bootApp);
|
|
4932
|
-
}
|
|
4919
|
+
return `import { createQueueFailedCommands } from "@getstrata/cli/queueFailed";
|
|
4920
|
+
import { bootstrapApp } from "../bootstrap/createApp.ts";
|
|
4921
|
+
import { closeDatabase } from "../bootstrap/database.ts";
|
|
4933
4922
|
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
await
|
|
4937
|
-
}
|
|
4923
|
+
let app: Awaited<ReturnType<typeof bootstrapApp>> | undefined;
|
|
4924
|
+
const { queueFailedCommand, queueFlushFailedCommand, queueRetryCommand } = createQueueFailedCommands(
|
|
4925
|
+
async () => { app = await bootstrapApp({ migrate: false }); },
|
|
4926
|
+
async () => { try { await app?.context.dispose(); } finally { app = undefined; await closeDatabase(); } },
|
|
4927
|
+
);
|
|
4938
4928
|
|
|
4939
4929
|
export { queueFailedCommand, queueFlushFailedCommand, queueRetryCommand };
|
|
4940
4930
|
`;
|
|
4941
4931
|
}
|
|
4942
4932
|
function renderCliOpenApiTs() {
|
|
4943
|
-
return `
|
|
4944
|
-
|
|
4945
|
-
|
|
4933
|
+
return `import { createApp } from "../bootstrap/createApp.ts";
|
|
4934
|
+
import { closeDatabase } from "../bootstrap/database.ts";
|
|
4935
|
+
|
|
4936
|
+
let app: Awaited<ReturnType<typeof createApp>> | undefined;
|
|
4937
|
+
async function bootstrap() {
|
|
4938
|
+
app = await createApp({ migrate: false });
|
|
4939
|
+
return app;
|
|
4940
|
+
}
|
|
4941
|
+
async function close() {
|
|
4942
|
+
try { await app?.context.dispose(); } finally { app = undefined; await closeDatabase(); }
|
|
4946
4943
|
}
|
|
4947
4944
|
|
|
4948
4945
|
async function openapiGenerateCommand(): Promise<void> {
|
|
4949
4946
|
const { createOpenApiGenerateCommand } = await import("@getstrata/cli/openapi");
|
|
4950
|
-
await createOpenApiGenerateCommand(bootstrap)();
|
|
4947
|
+
await createOpenApiGenerateCommand(bootstrap, close)();
|
|
4951
4948
|
}
|
|
4952
4949
|
|
|
4953
4950
|
async function openapiValidateCommand(): Promise<void> {
|
|
4954
4951
|
const { createOpenApiValidateCommand } = await import("@getstrata/cli/openapi");
|
|
4955
|
-
await createOpenApiValidateCommand(bootstrap)();
|
|
4952
|
+
await createOpenApiValidateCommand(bootstrap, close)();
|
|
4956
4953
|
}
|
|
4957
4954
|
|
|
4958
4955
|
async function openapiCheckCommand(): Promise<void> {
|
|
4959
4956
|
const { createOpenApiCheckCommand } = await import("@getstrata/cli/openapi");
|
|
4960
|
-
await createOpenApiCheckCommand(bootstrap)();
|
|
4957
|
+
await createOpenApiCheckCommand(bootstrap, close)();
|
|
4961
4958
|
}
|
|
4962
4959
|
|
|
4963
4960
|
export { openapiCheckCommand, openapiGenerateCommand, openapiValidateCommand };
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"check": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@getstrata/bootstrap": "^2.2.
|
|
16
|
-
"@getstrata/cli": "^2.2.
|
|
17
|
-
"@getstrata/core": "^2.2.
|
|
15
|
+
"@getstrata/bootstrap": "^2.2.37",
|
|
16
|
+
"@getstrata/cli": "^2.2.37",
|
|
17
|
+
"@getstrata/core": "^2.2.37",
|
|
18
18
|
"eta": "^4.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|