create-basalt 1.4.0 → 1.4.1
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/templates.js +6 -3
- package/package.json +16 -1
package/dist/templates.js
CHANGED
|
@@ -95,12 +95,15 @@ export function tsconfigJson() {
|
|
|
95
95
|
}
|
|
96
96
|
export function envTs(options) {
|
|
97
97
|
return `import { defineEnv${options.auth ? ', secret' : ''} } from '@basaltkit/env'
|
|
98
|
+
import { LOG_LEVELS } from '@basaltkit/logger'
|
|
98
99
|
import { z } from 'zod'
|
|
99
100
|
|
|
100
101
|
export const env = defineEnv({
|
|
101
102
|
PORT: z.coerce.number().default(3000),
|
|
102
103
|
HOST: z.string().default('0.0.0.0'),
|
|
103
|
-
|
|
104
|
+
// Typed against the logger's LogLevel union — a free-form string here fails
|
|
105
|
+
// \`pnpm typecheck\` where loggerPlugin({ level }) consumes it.
|
|
106
|
+
LOG_LEVEL: z.enum(LOG_LEVELS).default('info'),
|
|
104
107
|
NODE_ENV: z.enum(['development', 'production', 'test']).default('development'),${options.auth
|
|
105
108
|
? `
|
|
106
109
|
// Signs JWTs and sessions. secret() is fail-closed: required in production
|
|
@@ -123,7 +126,7 @@ export function appTs(options) {
|
|
|
123
126
|
`import { configPlugin } from '@basaltkit/config'`,
|
|
124
127
|
`import { eventsPlugin } from '@basaltkit/events'`,
|
|
125
128
|
`import { fastifyPlugin, securityPlugin } from '@basaltkit/fastify'`,
|
|
126
|
-
`import { loggerPlugin } from '@basaltkit/logger'`,
|
|
129
|
+
`import { loggerPlugin, type LogLevel } from '@basaltkit/logger'`,
|
|
127
130
|
];
|
|
128
131
|
const plugins = [
|
|
129
132
|
`configPlugin({ app: { name: '${options.name}' } })`,
|
|
@@ -197,7 +200,7 @@ export function appTs(options) {
|
|
|
197
200
|
import { appRoutes } from './routes.js'
|
|
198
201
|
|
|
199
202
|
export interface BuildAppOptions {
|
|
200
|
-
logLevel?:
|
|
203
|
+
logLevel?: LogLevel
|
|
201
204
|
pretty?: boolean${commandsField}
|
|
202
205
|
}
|
|
203
206
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-basalt",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Scaffold a production-shaped Basalt SaaS app: npm create basalt my-saas [--billing] [--ui] [--cli] [--install] [--git]",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,21 @@
|
|
|
20
20
|
"@types/node": "^26.3.0",
|
|
21
21
|
"typescript": "^7.0.2",
|
|
22
22
|
"vitest": "^4.1.11",
|
|
23
|
+
"zod": "^4.0.0",
|
|
24
|
+
"@basaltkit/auth": "^1.6.3",
|
|
25
|
+
"@basaltkit/config": "^1.1.1",
|
|
26
|
+
"@basaltkit/cli": "^1.2.1",
|
|
27
|
+
"@basaltkit/env": "^1.0.1",
|
|
28
|
+
"@basaltkit/core": "^1.3.0",
|
|
29
|
+
"@basaltkit/fastify": "^1.7.0",
|
|
30
|
+
"@basaltkit/generator": "^1.2.0",
|
|
31
|
+
"@basaltkit/events": "^1.0.1",
|
|
32
|
+
"@basaltkit/logger": "^1.2.1",
|
|
33
|
+
"@basaltkit/mcp": "^1.0.3",
|
|
34
|
+
"@basaltkit/subscriptions": "^2.7.0",
|
|
35
|
+
"@basaltkit/tenancy": "^1.4.0",
|
|
36
|
+
"@basaltkit/prisma": "^1.4.2",
|
|
37
|
+
"@basaltkit/testing": "^1.1.0",
|
|
23
38
|
"@basaltkit/tsconfig": "^0.24.0"
|
|
24
39
|
},
|
|
25
40
|
"publishConfig": {
|