create-basalt 1.4.0 → 1.4.2

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.
Files changed (2) hide show
  1. package/dist/templates.js +6 -3
  2. package/package.json +20 -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
- LOG_LEVEL: z.string().default('info'),
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?: string
203
+ logLevel?: LogLevel
201
204
  pretty?: boolean${commandsField}
202
205
  }
203
206
 
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "create-basalt",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
+ "engines": {
5
+ "node": ">=22.5.0"
6
+ },
4
7
  "description": "Scaffold a production-shaped Basalt SaaS app: npm create basalt my-saas [--billing] [--ui] [--cli] [--install] [--git]",
5
8
  "license": "MIT",
6
9
  "type": "module",
10
+ "sideEffects": false,
7
11
  "bin": {
8
12
  "create-basalt": "./dist/cli.js"
9
13
  },
@@ -20,6 +24,21 @@
20
24
  "@types/node": "^26.3.0",
21
25
  "typescript": "^7.0.2",
22
26
  "vitest": "^4.1.11",
27
+ "zod": "^3.24.0 || ^4.0.0",
28
+ "@basaltkit/auth": "^1.8.0",
29
+ "@basaltkit/cli": "^1.2.3",
30
+ "@basaltkit/config": "^1.1.2",
31
+ "@basaltkit/core": "^1.3.1",
32
+ "@basaltkit/env": "^1.0.2",
33
+ "@basaltkit/events": "^1.1.1",
34
+ "@basaltkit/fastify": "^1.8.1",
35
+ "@basaltkit/generator": "^1.2.2",
36
+ "@basaltkit/logger": "^1.2.2",
37
+ "@basaltkit/mcp": "^1.1.1",
38
+ "@basaltkit/prisma": "^1.4.3",
39
+ "@basaltkit/subscriptions": "^2.8.1",
40
+ "@basaltkit/tenancy": "^1.4.2",
41
+ "@basaltkit/testing": "^1.1.1",
23
42
  "@basaltkit/tsconfig": "^0.24.0"
24
43
  },
25
44
  "publishConfig": {