create-blixis 0.2.0 → 0.2.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/index.js CHANGED
@@ -103,7 +103,8 @@ process.on("SIGTERM", () => {
103
103
  const RUNTIME_DEPENDENCIES = [
104
104
  "@blixis-io/core",
105
105
  "@blixis-io/di",
106
- "@blixis-io/http"
106
+ "@blixis-io/http",
107
+ "zod"
107
108
  ];
108
109
  /** Added only with --deploy: the CLI and its deploy plugin. */
109
110
  const DEPLOY_DEPENDENCIES = ["@blixis-io/cli", "@blixis-io/deploy"];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["unreachable"],"sources":["../src/template.ts","../src/scaffold.ts","../src/index.ts"],"sourcesContent":["/** Every file of the generated app, keyed by path relative to the project root. */\nexport function templateFiles(packageName: string, packageManagerPin?: string): Record<string, string> {\n return {\n \"package.json\": `${JSON.stringify(\n {\n name: packageName,\n version: \"0.0.0\",\n private: true,\n type: \"module\",\n // Pins the package manager (corepack honours it), so a Docker image or CI job installs with the same\n // major version the project was created with instead of whatever is newest.\n ...(packageManagerPin ? { packageManager: packageManagerPin } : {}),\n engines: { node: \">=24\" },\n scripts: {\n // Decorators need tsc (esbuild/tsx drop the metadata), so dev is \"compile once, then\n // recompile on change while node restarts on the new output\".\n dev: 'tsc -p tsconfig.json && concurrently -k -n tsc,app \"tsc -p tsconfig.json --watch --preserveWatchOutput\" \"node --watch dist/main.js\"',\n build: \"tsc -p tsconfig.json\",\n start: \"node dist/main.js\",\n typecheck: \"tsc --noEmit -p tsconfig.json\",\n },\n },\n null,\n 2,\n )}\\n`,\n\n \"tsconfig.json\": `${JSON.stringify(\n {\n compilerOptions: {\n target: \"es2023\",\n lib: [\"es2023\"],\n types: [\"node\"],\n module: \"nodenext\",\n moduleResolution: \"nodenext\",\n strict: true,\n experimentalDecorators: true,\n emitDecoratorMetadata: true,\n useDefineForClassFields: false,\n esModuleInterop: true,\n skipLibCheck: true,\n outDir: \"dist\",\n rootDir: \"src\",\n },\n include: [\"src\"],\n },\n null,\n 2,\n )}\\n`,\n\n \".gitignore\": \"node_modules\\ndist\\n\",\n\n \"README.md\": `# ${packageName}\n\nA [Blixis](https://blixis-io.github.io/framework/) app.\n\n\\`\\`\\`bash\nnpm run dev # rebuilds and restarts on every change\n# or: npm run build && npm start\ncurl http://localhost:3000/hello/world\n\\`\\`\\`\n\nDecorators need \\`tsc\\` (not tsx/esbuild) — see the\n[installation notes](https://blixis-io.github.io/framework/start-here/installation/).\n`,\n\n \"src/hello.service.ts\": `import { Injectable } from \"@blixis-io/di\";\n\n@Injectable()\nexport class HelloService {\n greet(name: string): string {\n return \\`Hello, \\${name}!\\`;\n }\n}\n`,\n\n \"src/hello.controller.ts\": `import { Controller, Get, Param } from \"@blixis-io/http\";\nimport { HelloService } from \"./hello.service.js\";\n\n@Controller(\"hello\")\nexport class HelloController {\n constructor(private readonly hello: HelloService) {}\n\n @Get(\":name\")\n greet(@Param(\"name\") name: string) {\n return { message: this.hello.greet(name) };\n }\n}\n`,\n\n \"src/app.module.ts\": `import { Module } from \"@blixis-io/core\";\nimport { HelloController } from \"./hello.controller.js\";\nimport { HelloService } from \"./hello.service.js\";\n\n@Module({\n providers: [HelloService],\n controllers: [HelloController],\n})\nexport class AppModule {}\n`,\n\n \"src/main.ts\": `import { createHttpApplication } from \"@blixis-io/http\";\nimport { AppModule } from \"./app.module.js\";\n\nconst app = await createHttpApplication(AppModule);\nconst port = Number(process.env[\"PORT\"] ?? 3000);\nawait app.listen(port);\n\nconsole.log(\\`Listening on http://localhost:\\${port}\\`);\n\nprocess.on(\"SIGTERM\", () => {\n void app.close(\"SIGTERM\").then(() => process.exit(0));\n});\n`,\n };\n}\n\nexport const RUNTIME_DEPENDENCIES = [\"@blixis-io/core\", \"@blixis-io/di\", \"@blixis-io/http\"] as const;\n/** Added only with --deploy: the CLI and its deploy plugin. */\nexport const DEPLOY_DEPENDENCIES = [\"@blixis-io/cli\", \"@blixis-io/deploy\"] as const;\nexport const DEV_DEPENDENCIES = [\"typescript\", \"@types/node\", \"concurrently\"] as const;\n","import { existsSync, mkdirSync, readdirSync, writeFileSync } from \"node:fs\";\nimport { basename, dirname, join, resolve } from \"node:path\";\nimport { templateFiles } from \"./template.js\";\n\nconst PACKAGE_NAME = /^[a-z0-9-~][a-z0-9-._~]*$/;\n\nexport class ScaffoldError extends Error {\n override readonly name = \"ScaffoldError\";\n}\n\nexport interface ScaffoldResult {\n directory: string;\n packageName: string;\n files: string[];\n}\n\n/** Writes the starter app into `cwd/<target>`. The directory may not exist yet, or must be empty. */\nexport function scaffold(cwd: string, target: string, packageManagerPin?: string): ScaffoldResult {\n const directory = resolve(cwd, target);\n const packageName = basename(directory);\n\n if (!PACKAGE_NAME.test(packageName)) {\n throw new ScaffoldError(\n `\"${packageName}\" is not a valid package name — use lowercase letters, digits, \"-\", \".\" or \"_\", starting with a letter or digit.`,\n );\n }\n if (existsSync(directory) && readdirSync(directory).length > 0) {\n throw new ScaffoldError(`${target} already exists and is not empty.`);\n }\n\n const files = Object.entries(templateFiles(packageName, packageManagerPin));\n for (const [path, content] of files) {\n const absolute = join(directory, path);\n mkdirSync(dirname(absolute), { recursive: true });\n writeFileSync(absolute, content);\n }\n\n return { directory, packageName, files: files.map(([path]) => path) };\n}\n","#!/usr/bin/env node\nimport { spawn } from \"node:child_process\";\nimport { realpathSync } from \"node:fs\";\nimport { relative } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { ScaffoldError, scaffold } from \"./scaffold.js\";\nimport { DEPLOY_DEPENDENCIES, DEV_DEPENDENCIES, RUNTIME_DEPENDENCIES } from \"./template.js\";\n\nconst USAGE = `create-blixis <directory> [--deploy <target>] [--ci <provider>] [--no-install]\n\n pnpm create blixis my-app\n npm create blixis@latest my-app\n pnpm create blixis my-app --deploy docker --ci github\n\n --deploy <target> also set up deployment (docker, vercel, netlify or cloudflare): installs\n @blixis-io/cli and @blixis-io/deploy and runs \\`blix deploy init\\`\n --ci <provider> with --deploy: also write the CI pipeline (github, gitlab or bitbucket)\n --no-install write the files only; print the install commands instead\n`;\n\nexport type PackageManager = \"pnpm\" | \"npm\" | \"yarn\" | \"bun\";\n\nexport interface CreateResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\n/** Runs one package-manager command; resolves with its exit code. Injected so tests never touch the network. */\nexport type InstallRunner = (command: string, args: readonly string[], cwd: string) => Promise<number>;\n\nexport interface CreateOptions {\n cwd: string;\n /** `npm_config_user_agent` — tells us which package manager invoked `create`. */\n userAgent?: string | undefined;\n install?: InstallRunner;\n}\n\nexport function detectPackageManager(userAgent: string | undefined): PackageManager {\n const name = userAgent?.split(\"/\")[0];\n return name === \"pnpm\" || name === \"yarn\" || name === \"bun\" ? name : \"npm\";\n}\n\n/** `\"pnpm@11.25.0\"` from an `npm_config_user_agent` like `pnpm/11.25.0 npm/? node/v24.0.0`, for the `packageManager` field. Bun isn't managed by corepack, so it gets none. */\nexport function packageManagerPin(userAgent: string | undefined): string | undefined {\n const match = /^(pnpm|npm|yarn)\\/(\\d+\\.\\d+\\.\\d+)/.exec(userAgent ?? \"\");\n return match ? `${match[1]}@${match[2]}` : undefined;\n}\n\nfunction addArgs(pm: PackageManager, dev: boolean, packages: readonly string[]): string[] {\n const verb = pm === \"npm\" ? \"install\" : \"add\";\n const devFlag = pm === \"bun\" ? \"-d\" : \"-D\";\n return [verb, ...(dev ? [devFlag] : []), ...packages];\n}\n\n/** The command that runs a locally installed binary (`blix`), per package manager. */\nfunction execBlix(pm: PackageManager, args: readonly string[]): { command: string; args: string[] } {\n switch (pm) {\n case \"pnpm\":\n return { command: \"pnpm\", args: [\"exec\", \"blix\", ...args] };\n case \"npm\":\n return { command: \"npx\", args: [\"blix\", ...args] };\n case \"yarn\":\n return { command: \"yarn\", args: [\"blix\", ...args] };\n case \"bun\":\n return { command: \"bunx\", args: [\"blix\", ...args] };\n /* v8 ignore start -- @preserve: exhaustiveness guard, unreachable while every package manager has a case */\n default: {\n const unreachable: never = pm;\n throw new Error(`Unknown package manager ${String(unreachable)}`);\n }\n /* v8 ignore stop */\n }\n}\n\ninterface ParsedArgs {\n positionals: string[];\n noInstall: boolean;\n help: boolean;\n deploy?: string | undefined;\n ci?: string | undefined;\n error?: string | undefined;\n}\n\nconst VALUE_FLAGS = new Set([\"deploy\", \"ci\"]);\n\nfunction parseArgs(argv: readonly string[]): ParsedArgs {\n const parsed: ParsedArgs = { positionals: [], noInstall: false, help: false };\n for (let index = 0; index < argv.length; index++) {\n const arg = argv[index];\n if (arg === undefined) {\n continue;\n }\n if (arg === \"--help\" || arg === \"-h\") {\n parsed.help = true;\n } else if (arg === \"--no-install\") {\n parsed.noInstall = true;\n } else if (arg.startsWith(\"--\")) {\n const [name = \"\", inline] = arg.slice(2).split(/=(.*)/s);\n if (!VALUE_FLAGS.has(name)) {\n parsed.error ??= `Unknown option \"${arg}\"`;\n continue;\n }\n const value = inline ?? argv[++index];\n if (value === undefined || value.startsWith(\"-\")) {\n parsed.error ??= `--${name} needs a value`;\n continue;\n }\n if (name === \"deploy\") {\n parsed.deploy = value;\n } else {\n parsed.ci = value;\n }\n } else if (arg.startsWith(\"-\")) {\n parsed.error ??= `Unknown option \"${arg}\"`;\n } else {\n parsed.positionals.push(arg);\n }\n }\n return parsed;\n}\n\nconst runWithInheritedStdio: InstallRunner = (command, args, cwd) =>\n new Promise((resolve, reject) => {\n const child = spawn(command, args, { cwd, stdio: \"inherit\", shell: process.platform === \"win32\" });\n child.once(\"error\", reject);\n child.once(\"close\", (code) => {\n resolve(code ?? 1);\n });\n });\n\n/** The whole CLI as a function of argv + environment — no process.exit()/console.log(), so it is directly testable. */\nexport async function runCreate(argv: readonly string[], options: CreateOptions): Promise<CreateResult> {\n const parsed = parseArgs(argv);\n const [target, ...extra] = parsed.positionals;\n\n if (parsed.help) {\n return { exitCode: 0, stdout: USAGE, stderr: \"\" };\n }\n if (parsed.error) {\n return { exitCode: 1, stdout: \"\", stderr: `${parsed.error}\\n\\n${USAGE}` };\n }\n if (!target || extra.length > 0) {\n return { exitCode: 1, stdout: \"\", stderr: `Usage: ${USAGE}` };\n }\n if (parsed.ci && !parsed.deploy) {\n return { exitCode: 1, stdout: \"\", stderr: `--ci only makes sense with --deploy <target>.\\n\\n${USAGE}` };\n }\n\n let result;\n try {\n result = scaffold(options.cwd, target, packageManagerPin(options.userAgent));\n } catch (error) {\n if (error instanceof ScaffoldError) {\n return { exitCode: 1, stdout: \"\", stderr: `${error.message}\\n` };\n }\n throw error;\n }\n\n const pm = detectPackageManager(options.userAgent);\n const runtime = addArgs(pm, false, RUNTIME_DEPENDENCIES);\n const dev = addArgs(pm, true, DEV_DEPENDENCIES);\n const deployDev = addArgs(pm, true, DEPLOY_DEPENDENCIES);\n const initArgs = parsed.deploy ? [\"deploy\", \"init\", \"--target\", parsed.deploy, ...(parsed.ci ? [\"--ci\", parsed.ci] : [])] : [];\n const blixInit = execBlix(pm, initArgs);\n const dir = relative(options.cwd, result.directory) || \".\";\n let stdout = `Created ${result.packageName} in ${dir}\\n`;\n\n if (parsed.noInstall) {\n stdout += `\\nNext:\\n cd ${dir}\\n ${pm} ${runtime.join(\" \")}\\n ${pm} ${dev.join(\" \")}\\n`;\n if (parsed.deploy) {\n stdout += ` ${pm} ${deployDev.join(\" \")}\\n ${blixInit.command} ${blixInit.args.join(\" \")}\\n`;\n }\n return { exitCode: 0, stdout, stderr: \"\" };\n }\n\n const install = options.install ?? runWithInheritedStdio;\n const steps: { command: string; args: readonly string[] }[] = [\n { command: pm, args: runtime },\n { command: pm, args: dev },\n ...(parsed.deploy ? [{ command: pm, args: deployDev }, blixInit] : []),\n ];\n for (const step of steps) {\n const code = await install(step.command, step.args, result.directory);\n if (code !== 0) {\n const isInit = parsed.deploy !== undefined && step === steps.at(-1);\n return {\n exitCode: code,\n stdout,\n stderr: `\\n\"${step.command} ${step.args.join(\" \")}\" failed (exit ${code}). The files are in ${dir}; ${\n isInit ? \"run `blix deploy init` yourself (the app itself is ready).\" : \"run the install yourself.\"\n }\\n`,\n };\n }\n }\n\n const run = pm === \"npm\" ? \"npm run\" : pm;\n stdout += `\\nNext:\\n cd ${dir}\\n ${run} dev\\n curl http://localhost:3000/hello/world\\n`;\n if (parsed.deploy) {\n const dryRun = execBlix(pm, [\"deploy\", \"--dry-run\"]);\n stdout += `\\nDeploy (${parsed.deploy}${parsed.ci ? `, ${parsed.ci}` : \"\"}):\\n review blix.config.ts, then\\n ${dryRun.command} ${dryRun.args.join(\" \")}\\n`;\n }\n return { exitCode: 0, stdout, stderr: \"\" };\n}\n\n// Same entry-point check as @blixis-io/cli: pathToFileURL(realpathSync(...)) so a\n// bin shim's symlink and a path with spaces both still match import.meta.url.\n/* v8 ignore start -- @preserve: process wiring, exercised by index.test.ts spawning the real built binary */\nif (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {\n const result = await runCreate(process.argv.slice(2), {\n cwd: process.cwd(),\n userAgent: process.env[\"npm_config_user_agent\"],\n });\n if (result.stdout) {\n process.stdout.write(result.stdout);\n }\n if (result.stderr) {\n process.stderr.write(result.stderr);\n }\n process.exitCode = result.exitCode;\n}\n/* v8 ignore stop */\n"],"mappings":";;;;;;;AACA,SAAgB,cAAc,aAAqB,mBAAoD;CACrG,OAAO;EACL,gBAAgB,GAAG,KAAK,UACtB;GACE,MAAM;GACN,SAAS;GACT,SAAS;GACT,MAAM;GAGN,GAAI,oBAAoB,EAAE,gBAAgB,kBAAkB,IAAI,CAAC;GACjE,SAAS,EAAE,MAAM,OAAO;GACxB,SAAS;IAGP,KAAK;IACL,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,GACA,MACA,CACF,EAAE;EAEF,iBAAiB,GAAG,KAAK,UACvB;GACE,iBAAiB;IACf,QAAQ;IACR,KAAK,CAAC,QAAQ;IACd,OAAO,CAAC,MAAM;IACd,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,wBAAwB;IACxB,uBAAu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,KAAK,SAAS,KAAK,MAAM,OAAO,SAAS;EACpE,IAAI,SAAS,GAAG;GACd,MAAM,SAAS,OAAO,WAAW,KAAA,KAAa,SAAS,MAAM,GAAG,EAAE;GAClE,OAAO;IACL,UAAU;IACV;IACA,QAAQ,MAAM,KAAK,QAAQ,GAAG,KAAK,KAAK,KAAK,GAAG,EAAE,iBAAiB,KAAK,sBAAsB,IAAI,IAChG,SAAS,+DAA+D,4BACzE;GACH;EACF;CACF;CAGA,UAAU,iBAAiB,IAAI,MADnB,OAAO,QAAQ,YAAY,GACE;CACzC,IAAI,OAAO,QAAQ;EACjB,MAAM,SAAS,SAAS,IAAI,CAAC,UAAU,WAAW,CAAC;EACnD,UAAU,aAAa,OAAO,SAAS,OAAO,KAAK,KAAK,OAAO,OAAO,GAAG,uCAAuC,OAAO,QAAQ,GAAG,OAAO,KAAK,KAAK,GAAG,EAAE;CAC1J;CACA,OAAO;EAAE,UAAU;EAAG;EAAQ,QAAQ;CAAG;AAC3C;;AAKA,IAAI,QAAQ,KAAK,MAAM,YAAY,QAAQ,cAAc,aAAa,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM;CAC5F,MAAM,SAAS,MAAM,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG;EACpD,KAAK,QAAQ,IAAI;EACjB,WAAW,QAAQ,IAAI;CACzB,CAAC;CACD,IAAI,OAAO,QACT,QAAQ,OAAO,MAAM,OAAO,MAAM;CAEpC,IAAI,OAAO,QACT,QAAQ,OAAO,MAAM,OAAO,MAAM;CAEpC,QAAQ,WAAW,OAAO;AAC5B"}
1
+ {"version":3,"file":"index.js","names":["unreachable"],"sources":["../src/template.ts","../src/scaffold.ts","../src/index.ts"],"sourcesContent":["/** Every file of the generated app, keyed by path relative to the project root. */\nexport function templateFiles(packageName: string, packageManagerPin?: string): Record<string, string> {\n return {\n \"package.json\": `${JSON.stringify(\n {\n name: packageName,\n version: \"0.0.0\",\n private: true,\n type: \"module\",\n // Pins the package manager (corepack honours it), so a Docker image or CI job installs with the same\n // major version the project was created with instead of whatever is newest.\n ...(packageManagerPin ? { packageManager: packageManagerPin } : {}),\n engines: { node: \">=24\" },\n scripts: {\n // Decorators need tsc (esbuild/tsx drop the metadata), so dev is \"compile once, then\n // recompile on change while node restarts on the new output\".\n dev: 'tsc -p tsconfig.json && concurrently -k -n tsc,app \"tsc -p tsconfig.json --watch --preserveWatchOutput\" \"node --watch dist/main.js\"',\n build: \"tsc -p tsconfig.json\",\n start: \"node dist/main.js\",\n typecheck: \"tsc --noEmit -p tsconfig.json\",\n },\n },\n null,\n 2,\n )}\\n`,\n\n \"tsconfig.json\": `${JSON.stringify(\n {\n compilerOptions: {\n target: \"es2023\",\n lib: [\"es2023\"],\n types: [\"node\"],\n module: \"nodenext\",\n moduleResolution: \"nodenext\",\n strict: true,\n experimentalDecorators: true,\n emitDecoratorMetadata: true,\n useDefineForClassFields: false,\n esModuleInterop: true,\n skipLibCheck: true,\n outDir: \"dist\",\n rootDir: \"src\",\n },\n include: [\"src\"],\n },\n null,\n 2,\n )}\\n`,\n\n \".gitignore\": \"node_modules\\ndist\\n\",\n\n \"README.md\": `# ${packageName}\n\nA [Blixis](https://blixis-io.github.io/framework/) app.\n\n\\`\\`\\`bash\nnpm run dev # rebuilds and restarts on every change\n# or: npm run build && npm start\ncurl http://localhost:3000/hello/world\n\\`\\`\\`\n\nDecorators need \\`tsc\\` (not tsx/esbuild) — see the\n[installation notes](https://blixis-io.github.io/framework/start-here/installation/).\n`,\n\n \"src/hello.service.ts\": `import { Injectable } from \"@blixis-io/di\";\n\n@Injectable()\nexport class HelloService {\n greet(name: string): string {\n return \\`Hello, \\${name}!\\`;\n }\n}\n`,\n\n \"src/hello.controller.ts\": `import { Controller, Get, Param } from \"@blixis-io/http\";\nimport { HelloService } from \"./hello.service.js\";\n\n@Controller(\"hello\")\nexport class HelloController {\n constructor(private readonly hello: HelloService) {}\n\n @Get(\":name\")\n greet(@Param(\"name\") name: string) {\n return { message: this.hello.greet(name) };\n }\n}\n`,\n\n \"src/app.module.ts\": `import { Module } from \"@blixis-io/core\";\nimport { HelloController } from \"./hello.controller.js\";\nimport { HelloService } from \"./hello.service.js\";\n\n@Module({\n providers: [HelloService],\n controllers: [HelloController],\n})\nexport class AppModule {}\n`,\n\n \"src/main.ts\": `import { createHttpApplication } from \"@blixis-io/http\";\nimport { AppModule } from \"./app.module.js\";\n\nconst app = await createHttpApplication(AppModule);\nconst port = Number(process.env[\"PORT\"] ?? 3000);\nawait app.listen(port);\n\nconsole.log(\\`Listening on http://localhost:\\${port}\\`);\n\nprocess.on(\"SIGTERM\", () => {\n void app.close(\"SIGTERM\").then(() => process.exit(0));\n});\n`,\n };\n}\n\nexport const RUNTIME_DEPENDENCIES = [\"@blixis-io/core\", \"@blixis-io/di\", \"@blixis-io/http\", \"zod\"] as const;\n/** Added only with --deploy: the CLI and its deploy plugin. */\nexport const DEPLOY_DEPENDENCIES = [\"@blixis-io/cli\", \"@blixis-io/deploy\"] as const;\nexport const DEV_DEPENDENCIES = [\"typescript\", \"@types/node\", \"concurrently\"] as const;\n","import { existsSync, mkdirSync, readdirSync, writeFileSync } from \"node:fs\";\nimport { basename, dirname, join, resolve } from \"node:path\";\nimport { templateFiles } from \"./template.js\";\n\nconst PACKAGE_NAME = /^[a-z0-9-~][a-z0-9-._~]*$/;\n\nexport class ScaffoldError extends Error {\n override readonly name = \"ScaffoldError\";\n}\n\nexport interface ScaffoldResult {\n directory: string;\n packageName: string;\n files: string[];\n}\n\n/** Writes the starter app into `cwd/<target>`. The directory may not exist yet, or must be empty. */\nexport function scaffold(cwd: string, target: string, packageManagerPin?: string): ScaffoldResult {\n const directory = resolve(cwd, target);\n const packageName = basename(directory);\n\n if (!PACKAGE_NAME.test(packageName)) {\n throw new ScaffoldError(\n `\"${packageName}\" is not a valid package name — use lowercase letters, digits, \"-\", \".\" or \"_\", starting with a letter or digit.`,\n );\n }\n if (existsSync(directory) && readdirSync(directory).length > 0) {\n throw new ScaffoldError(`${target} already exists and is not empty.`);\n }\n\n const files = Object.entries(templateFiles(packageName, packageManagerPin));\n for (const [path, content] of files) {\n const absolute = join(directory, path);\n mkdirSync(dirname(absolute), { recursive: true });\n writeFileSync(absolute, content);\n }\n\n return { directory, packageName, files: files.map(([path]) => path) };\n}\n","#!/usr/bin/env node\nimport { spawn } from \"node:child_process\";\nimport { realpathSync } from \"node:fs\";\nimport { relative } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { ScaffoldError, scaffold } from \"./scaffold.js\";\nimport { DEPLOY_DEPENDENCIES, DEV_DEPENDENCIES, RUNTIME_DEPENDENCIES } from \"./template.js\";\n\nconst USAGE = `create-blixis <directory> [--deploy <target>] [--ci <provider>] [--no-install]\n\n pnpm create blixis my-app\n npm create blixis@latest my-app\n pnpm create blixis my-app --deploy docker --ci github\n\n --deploy <target> also set up deployment (docker, vercel, netlify or cloudflare): installs\n @blixis-io/cli and @blixis-io/deploy and runs \\`blix deploy init\\`\n --ci <provider> with --deploy: also write the CI pipeline (github, gitlab or bitbucket)\n --no-install write the files only; print the install commands instead\n`;\n\nexport type PackageManager = \"pnpm\" | \"npm\" | \"yarn\" | \"bun\";\n\nexport interface CreateResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\n/** Runs one package-manager command; resolves with its exit code. Injected so tests never touch the network. */\nexport type InstallRunner = (command: string, args: readonly string[], cwd: string) => Promise<number>;\n\nexport interface CreateOptions {\n cwd: string;\n /** `npm_config_user_agent` — tells us which package manager invoked `create`. */\n userAgent?: string | undefined;\n install?: InstallRunner;\n}\n\nexport function detectPackageManager(userAgent: string | undefined): PackageManager {\n const name = userAgent?.split(\"/\")[0];\n return name === \"pnpm\" || name === \"yarn\" || name === \"bun\" ? name : \"npm\";\n}\n\n/** `\"pnpm@11.25.0\"` from an `npm_config_user_agent` like `pnpm/11.25.0 npm/? node/v24.0.0`, for the `packageManager` field. Bun isn't managed by corepack, so it gets none. */\nexport function packageManagerPin(userAgent: string | undefined): string | undefined {\n const match = /^(pnpm|npm|yarn)\\/(\\d+\\.\\d+\\.\\d+)/.exec(userAgent ?? \"\");\n return match ? `${match[1]}@${match[2]}` : undefined;\n}\n\nfunction addArgs(pm: PackageManager, dev: boolean, packages: readonly string[]): string[] {\n const verb = pm === \"npm\" ? \"install\" : \"add\";\n const devFlag = pm === \"bun\" ? \"-d\" : \"-D\";\n return [verb, ...(dev ? [devFlag] : []), ...packages];\n}\n\n/** The command that runs a locally installed binary (`blix`), per package manager. */\nfunction execBlix(pm: PackageManager, args: readonly string[]): { command: string; args: string[] } {\n switch (pm) {\n case \"pnpm\":\n return { command: \"pnpm\", args: [\"exec\", \"blix\", ...args] };\n case \"npm\":\n return { command: \"npx\", args: [\"blix\", ...args] };\n case \"yarn\":\n return { command: \"yarn\", args: [\"blix\", ...args] };\n case \"bun\":\n return { command: \"bunx\", args: [\"blix\", ...args] };\n /* v8 ignore start -- @preserve: exhaustiveness guard, unreachable while every package manager has a case */\n default: {\n const unreachable: never = pm;\n throw new Error(`Unknown package manager ${String(unreachable)}`);\n }\n /* v8 ignore stop */\n }\n}\n\ninterface ParsedArgs {\n positionals: string[];\n noInstall: boolean;\n help: boolean;\n deploy?: string | undefined;\n ci?: string | undefined;\n error?: string | undefined;\n}\n\nconst VALUE_FLAGS = new Set([\"deploy\", \"ci\"]);\n\nfunction parseArgs(argv: readonly string[]): ParsedArgs {\n const parsed: ParsedArgs = { positionals: [], noInstall: false, help: false };\n for (let index = 0; index < argv.length; index++) {\n const arg = argv[index];\n if (arg === undefined) {\n continue;\n }\n if (arg === \"--help\" || arg === \"-h\") {\n parsed.help = true;\n } else if (arg === \"--no-install\") {\n parsed.noInstall = true;\n } else if (arg.startsWith(\"--\")) {\n const [name = \"\", inline] = arg.slice(2).split(/=(.*)/s);\n if (!VALUE_FLAGS.has(name)) {\n parsed.error ??= `Unknown option \"${arg}\"`;\n continue;\n }\n const value = inline ?? argv[++index];\n if (value === undefined || value.startsWith(\"-\")) {\n parsed.error ??= `--${name} needs a value`;\n continue;\n }\n if (name === \"deploy\") {\n parsed.deploy = value;\n } else {\n parsed.ci = value;\n }\n } else if (arg.startsWith(\"-\")) {\n parsed.error ??= `Unknown option \"${arg}\"`;\n } else {\n parsed.positionals.push(arg);\n }\n }\n return parsed;\n}\n\nconst runWithInheritedStdio: InstallRunner = (command, args, cwd) =>\n new Promise((resolve, reject) => {\n const child = spawn(command, args, { cwd, stdio: \"inherit\", shell: process.platform === \"win32\" });\n child.once(\"error\", reject);\n child.once(\"close\", (code) => {\n resolve(code ?? 1);\n });\n });\n\n/** The whole CLI as a function of argv + environment — no process.exit()/console.log(), so it is directly testable. */\nexport async function runCreate(argv: readonly string[], options: CreateOptions): Promise<CreateResult> {\n const parsed = parseArgs(argv);\n const [target, ...extra] = parsed.positionals;\n\n if (parsed.help) {\n return { exitCode: 0, stdout: USAGE, stderr: \"\" };\n }\n if (parsed.error) {\n return { exitCode: 1, stdout: \"\", stderr: `${parsed.error}\\n\\n${USAGE}` };\n }\n if (!target || extra.length > 0) {\n return { exitCode: 1, stdout: \"\", stderr: `Usage: ${USAGE}` };\n }\n if (parsed.ci && !parsed.deploy) {\n return { exitCode: 1, stdout: \"\", stderr: `--ci only makes sense with --deploy <target>.\\n\\n${USAGE}` };\n }\n\n let result;\n try {\n result = scaffold(options.cwd, target, packageManagerPin(options.userAgent));\n } catch (error) {\n if (error instanceof ScaffoldError) {\n return { exitCode: 1, stdout: \"\", stderr: `${error.message}\\n` };\n }\n throw error;\n }\n\n const pm = detectPackageManager(options.userAgent);\n const runtime = addArgs(pm, false, RUNTIME_DEPENDENCIES);\n const dev = addArgs(pm, true, DEV_DEPENDENCIES);\n const deployDev = addArgs(pm, true, DEPLOY_DEPENDENCIES);\n const initArgs = parsed.deploy ? [\"deploy\", \"init\", \"--target\", parsed.deploy, ...(parsed.ci ? [\"--ci\", parsed.ci] : [])] : [];\n const blixInit = execBlix(pm, initArgs);\n const dir = relative(options.cwd, result.directory) || \".\";\n let stdout = `Created ${result.packageName} in ${dir}\\n`;\n\n if (parsed.noInstall) {\n stdout += `\\nNext:\\n cd ${dir}\\n ${pm} ${runtime.join(\" \")}\\n ${pm} ${dev.join(\" \")}\\n`;\n if (parsed.deploy) {\n stdout += ` ${pm} ${deployDev.join(\" \")}\\n ${blixInit.command} ${blixInit.args.join(\" \")}\\n`;\n }\n return { exitCode: 0, stdout, stderr: \"\" };\n }\n\n const install = options.install ?? runWithInheritedStdio;\n const steps: { command: string; args: readonly string[] }[] = [\n { command: pm, args: runtime },\n { command: pm, args: dev },\n ...(parsed.deploy ? [{ command: pm, args: deployDev }, blixInit] : []),\n ];\n for (const step of steps) {\n const code = await install(step.command, step.args, result.directory);\n if (code !== 0) {\n const isInit = parsed.deploy !== undefined && step === steps.at(-1);\n return {\n exitCode: code,\n stdout,\n stderr: `\\n\"${step.command} ${step.args.join(\" \")}\" failed (exit ${code}). The files are in ${dir}; ${\n isInit ? \"run `blix deploy init` yourself (the app itself is ready).\" : \"run the install yourself.\"\n }\\n`,\n };\n }\n }\n\n const run = pm === \"npm\" ? \"npm run\" : pm;\n stdout += `\\nNext:\\n cd ${dir}\\n ${run} dev\\n curl http://localhost:3000/hello/world\\n`;\n if (parsed.deploy) {\n const dryRun = execBlix(pm, [\"deploy\", \"--dry-run\"]);\n stdout += `\\nDeploy (${parsed.deploy}${parsed.ci ? `, ${parsed.ci}` : \"\"}):\\n review blix.config.ts, then\\n ${dryRun.command} ${dryRun.args.join(\" \")}\\n`;\n }\n return { exitCode: 0, stdout, stderr: \"\" };\n}\n\n// Same entry-point check as @blixis-io/cli: pathToFileURL(realpathSync(...)) so a\n// bin shim's symlink and a path with spaces both still match import.meta.url.\n/* v8 ignore start -- @preserve: process wiring, exercised by index.test.ts spawning the real built binary */\nif (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {\n const result = await runCreate(process.argv.slice(2), {\n cwd: process.cwd(),\n userAgent: process.env[\"npm_config_user_agent\"],\n });\n if (result.stdout) {\n process.stdout.write(result.stdout);\n }\n if (result.stderr) {\n process.stderr.write(result.stderr);\n }\n process.exitCode = result.exitCode;\n}\n/* v8 ignore stop */\n"],"mappings":";;;;;;;AACA,SAAgB,cAAc,aAAqB,mBAAoD;CACrG,OAAO;EACL,gBAAgB,GAAG,KAAK,UACtB;GACE,MAAM;GACN,SAAS;GACT,SAAS;GACT,MAAM;GAGN,GAAI,oBAAoB,EAAE,gBAAgB,kBAAkB,IAAI,CAAC;GACjE,SAAS,EAAE,MAAM,OAAO;GACxB,SAAS;IAGP,KAAK;IACL,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,GACA,MACA,CACF,EAAE;EAEF,iBAAiB,GAAG,KAAK,UACvB;GACE,iBAAiB;IACf,QAAQ;IACR,KAAK,CAAC,QAAQ;IACd,OAAO,CAAC,MAAM;IACd,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,wBAAwB;IACxB,uBAAuB;IACvB,yBAAyB;IACzB,iBAAiB;IACjB,cAAc;IACd,QAAQ;IACR,SAAS;GACX;GACA,SAAS,CAAC,KAAK;EACjB,GACA,MACA,CACF,EAAE;EAEF,cAAc;EAEd,aAAa,KAAK,YAAY;;;;;;;;;;;;;EAc9B,wBAAwB;;;;;;;;;EAUxB,2BAA2B;;;;;;;;;;;;;EAc3B,qBAAqB;;;;;;;;;;EAWrB,eAAe;;;;;;;;;;;;;CAajB;AACF;AAEA,MAAa,uBAAuB;CAAC;CAAmB;CAAiB;CAAmB;AAAK;;AAEjG,MAAa,sBAAsB,CAAC,kBAAkB,mBAAmB;AACzE,MAAa,mBAAmB;CAAC;CAAc;CAAe;AAAc;;;ACnH5E,MAAM,eAAe;AAErB,IAAa,gBAAb,cAAmC,MAAM;;;EACd,KAAA,OAAA;;AAC3B;;AASA,SAAgB,SAAS,KAAa,QAAgB,mBAA4C;CAChG,MAAM,YAAY,QAAQ,KAAK,MAAM;CACrC,MAAM,cAAc,SAAS,SAAS;CAEtC,IAAI,CAAC,aAAa,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M,YAAY,QAAQ,cAAc,aAAa,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM;CAC5F,MAAM,SAAS,MAAM,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG;EACpD,KAAK,QAAQ,IAAI;EACjB,WAAW,QAAQ,IAAI;CACzB,CAAC;CACD,IAAI,OAAO,QACT,QAAQ,OAAO,MAAM,OAAO,MAAM;CAEpC,IAAI,OAAO,QACT,QAAQ,OAAO,MAAM,OAAO,MAAM;CAEpC,QAAQ,WAAW,OAAO;AAC5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blixis",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Scaffold a new Blixis app: pnpm create blixis my-app. No @blixis-io/* runtime dependency.",
5
5
  "license": "MIT",
6
6
  "author": "Michael Voeten <michael@voeten.online>",