create-strata 2.2.54 → 2.2.56
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
CHANGED
|
@@ -3717,16 +3717,16 @@ function renderDockerfile(layers) {
|
|
|
3717
3717
|
const frontend = needsFrontendBuild(layers.frontend);
|
|
3718
3718
|
const lines = [
|
|
3719
3719
|
'# Production image. Build once, run with env from your platform; see README "Deploy".',
|
|
3720
|
-
"FROM oven/bun:1.4.
|
|
3720
|
+
"FROM oven/bun:1.4.4 AS deps",
|
|
3721
3721
|
"WORKDIR /app",
|
|
3722
3722
|
"COPY package.json bun.lock ./",
|
|
3723
3723
|
"RUN bun install --frozen-lockfile --production",
|
|
3724
3724
|
""
|
|
3725
3725
|
];
|
|
3726
3726
|
if (frontend) {
|
|
3727
|
-
lines.push("FROM oven/bun:1.4.
|
|
3727
|
+
lines.push("FROM oven/bun:1.4.4 AS frontend", "WORKDIR /app/frontend", "COPY --from=deps /app/node_modules /app/node_modules", "ARG SPA_PREFIX", "ENV SPA_PREFIX=$SPA_PREFIX", "COPY frontend/package.json frontend/bun.lock ./", "RUN bun install --frozen-lockfile", "COPY frontend/ ./", "RUN bun run build", "");
|
|
3728
3728
|
}
|
|
3729
|
-
lines.push("FROM oven/bun:1.4.
|
|
3729
|
+
lines.push("FROM oven/bun:1.4.4-slim AS runtime", "WORKDIR /app", "ENV APP_ENV=production", "ENV AUTH_DEV_HEADERS=false", "ENV PORT=3000", "COPY --from=deps /app/node_modules ./node_modules", "COPY . .");
|
|
3730
3730
|
if (frontend) {
|
|
3731
3731
|
lines.push("COPY --from=frontend /app/frontend/dist ./frontend/dist");
|
|
3732
3732
|
}
|
|
@@ -4071,7 +4071,7 @@ The app uses the database named in \`DATABASE_URL\` and creates it on first migr
|
|
|
4071
4071
|
${renderOpenApiReadme()}
|
|
4072
4072
|
## Deploy
|
|
4073
4073
|
|
|
4074
|
-
Bun >=1.4.
|
|
4074
|
+
Bun >=1.4.4 is required. \`.bun-version\` and Docker stages pin the tested 1.4.4 runtime; upgrade pins deliberately and rerun checks before deployment. Runtime and TypeScript requirements use >=1.4.4, accepting future 1.4.x patches; the bun-types override keeps transitive shims above the same minimum. Refresh and commit root/frontend lockfiles when upgrading. Updating framework packages does not rewrite an existing app Dockerfile, runtime pin or manifest.
|
|
4075
4075
|
|
|
4076
4076
|
\`Dockerfile\` builds a production image from the committed \`bun.lock\` (run \`bun install\` once and commit the lockfile).${needsFrontendBuild(layers.frontend) ? " The React frontend is built inside the image." : ""}
|
|
4077
4077
|
|
|
@@ -4138,7 +4138,7 @@ function postgresAppRolePrivilegeSql(options) {
|
|
|
4138
4138
|
const database = assertSafeSqlIdentifier(options.database, "database name");
|
|
4139
4139
|
const role = assertSafeSqlIdentifier(options.role ?? POSTGRES_APP_ROLE, "role name");
|
|
4140
4140
|
return `GRANT CONNECT ON DATABASE ${database} TO ${role};
|
|
4141
|
-
GRANT USAGE
|
|
4141
|
+
GRANT USAGE ON SCHEMA public TO ${role};
|
|
4142
4142
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${role};
|
|
4143
4143
|
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO ${role};
|
|
4144
4144
|
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ${role};
|
|
@@ -4473,9 +4473,9 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
4473
4473
|
"@getstrata/cli": "workspace:*",
|
|
4474
4474
|
"@getstrata/core": "workspace:*"
|
|
4475
4475
|
} : {
|
|
4476
|
-
"@getstrata/bootstrap": "^2.2.
|
|
4477
|
-
"@getstrata/cli": "^2.2.
|
|
4478
|
-
"@getstrata/core": "^2.2.
|
|
4476
|
+
"@getstrata/bootstrap": "^2.2.56",
|
|
4477
|
+
"@getstrata/cli": "^2.2.56",
|
|
4478
|
+
"@getstrata/core": "^2.2.56"
|
|
4479
4479
|
};
|
|
4480
4480
|
coreDeps.eta = "^4.6.0";
|
|
4481
4481
|
if (options.layers?.database === "mysql") {
|
|
@@ -4502,11 +4502,11 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
4502
4502
|
private: true,
|
|
4503
4503
|
type: "module",
|
|
4504
4504
|
scripts,
|
|
4505
|
-
engines: { bun: ">=1.4.
|
|
4506
|
-
overrides: { "bun-types": ">=1.4.
|
|
4505
|
+
engines: { bun: ">=1.4.4" },
|
|
4506
|
+
overrides: { "bun-types": ">=1.4.4" },
|
|
4507
4507
|
dependencies: coreDeps,
|
|
4508
4508
|
devDependencies: {
|
|
4509
|
-
"@types/bun": ">=1.4.
|
|
4509
|
+
"@types/bun": ">=1.4.4",
|
|
4510
4510
|
typescript: "^7.0.2"
|
|
4511
4511
|
}
|
|
4512
4512
|
}, null, 2)}
|
|
@@ -6033,7 +6033,7 @@ export const TENANCY_ENABLED = ${usesTenantTable(layers.tenancy)};
|
|
|
6033
6033
|
manifest.scripts.preview = `bun run build && ${publicEnv} bun dev-server.ts --preview`;
|
|
6034
6034
|
writeText(manifestPath, JSON.stringify(manifest, null, 2));
|
|
6035
6035
|
}
|
|
6036
|
-
writeText(join2(targetDir, ".bun-version"), `1.4.
|
|
6036
|
+
writeText(join2(targetDir, ".bun-version"), `1.4.4
|
|
6037
6037
|
`);
|
|
6038
6038
|
writeText(join2(targetDir, ".env.example"), renderEnvExample(projectName, layers));
|
|
6039
6039
|
writeText(join2(targetDir, ".gitignore"), renderGitignore());
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"react-router-dom": "^7.8.0",
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@types/bun": ">=1.4.
|
|
13
|
+
"@types/bun": ">=1.4.4",
|
|
14
14
|
"@types/react": "^19.1.10",
|
|
15
15
|
"@types/react-dom": "^19.1.7",
|
|
16
16
|
"typescript": "^7.0.2",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
"overrides": {
|
|
21
|
-
"bun-types": ">=1.4.
|
|
21
|
+
"bun-types": ">=1.4.4",
|
|
22
22
|
},
|
|
23
23
|
"packages": {
|
|
24
|
-
"@types/bun": ["@types/bun@1.4.
|
|
24
|
+
"@types/bun": ["@types/bun@1.4.4", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="],
|
|
25
25
|
|
|
26
26
|
"@types/node": ["@types/node@26.2.0", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg=="],
|
|
27
27
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
"@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
|
|
71
71
|
|
|
72
|
-
"bun-types": ["bun-types@1.4.
|
|
72
|
+
"bun-types": ["bun-types@1.4.4", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="],
|
|
73
73
|
|
|
74
74
|
"cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="],
|
|
75
75
|
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"react-router-dom": "^7.8.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/bun": ">=1.4.
|
|
16
|
+
"@types/bun": ">=1.4.4",
|
|
17
17
|
"@types/react": "^19.1.10",
|
|
18
18
|
"@types/react-dom": "^19.1.7",
|
|
19
19
|
"typescript": "^7.0.2"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"bun": ">=1.4.
|
|
22
|
+
"bun": ">=1.4.4"
|
|
23
23
|
},
|
|
24
24
|
"overrides": {
|
|
25
|
-
"bun-types": ">=1.4.
|
|
25
|
+
"bun-types": ">=1.4.4"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -12,19 +12,19 @@
|
|
|
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.56",
|
|
16
|
+
"@getstrata/cli": "^2.2.56",
|
|
17
|
+
"@getstrata/core": "^2.2.56",
|
|
18
18
|
"eta": "^4.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/bun": ">=1.4.
|
|
21
|
+
"@types/bun": ">=1.4.4",
|
|
22
22
|
"typescript": "^7.0.2"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"bun": ">=1.4.
|
|
25
|
+
"bun": ">=1.4.4"
|
|
26
26
|
},
|
|
27
27
|
"overrides": {
|
|
28
|
-
"bun-types": ">=1.4.
|
|
28
|
+
"bun-types": ">=1.4.4"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -17,11 +17,18 @@ try {
|
|
|
17
17
|
config.hostname ? { hostname: config.hostname } : undefined,
|
|
18
18
|
);
|
|
19
19
|
} catch (error) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const failures: unknown[] = [];
|
|
21
|
+
for (const cleanup of [() => context.dispose(), closeDatabase]) {
|
|
22
|
+
try {
|
|
23
|
+
await cleanup();
|
|
24
|
+
} catch (failure) {
|
|
25
|
+
failures.push(failure);
|
|
26
|
+
}
|
|
24
27
|
}
|
|
28
|
+
if (failures.length)
|
|
29
|
+
throw new AggregateError([error, ...failures], "Application startup and cleanup failed.", {
|
|
30
|
+
cause: error,
|
|
31
|
+
});
|
|
25
32
|
throw error;
|
|
26
33
|
}
|
|
27
34
|
console.log(`Listening on ${server.url.origin} (APP_URL ${config.appUrl})`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-strata",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.56",
|
|
4
4
|
"description": "Create a new Strata app. Interactive wizard; choose each layer; one database engine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
|
-
"bun": ">=1.4.
|
|
27
|
+
"bun": ">=1.4.4"
|
|
28
28
|
}
|
|
29
29
|
}
|