@revealui/cli 0.0.1-pre.1 → 0.2.0

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 (68) hide show
  1. package/LICENSE +22 -202
  2. package/README.md +86 -0
  3. package/bin/create-revealui.js +6 -0
  4. package/dist/cli.d.ts +14 -0
  5. package/dist/cli.js +1075 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/index.d.ts +11 -2
  8. package/dist/index.js +1071 -123
  9. package/dist/index.js.map +1 -0
  10. package/package.json +42 -44
  11. package/templates/minimal/.env.example +36 -0
  12. package/templates/minimal/_gitignore +26 -0
  13. package/templates/minimal/next.config.mjs +10 -0
  14. package/templates/minimal/package.json +34 -0
  15. package/templates/minimal/revealui.config.ts +18 -0
  16. package/templates/minimal/src/app/globals.css +15 -0
  17. package/templates/minimal/src/app/layout.tsx +15 -0
  18. package/templates/minimal/src/app/page.tsx +20 -0
  19. package/templates/minimal/tsconfig.json +11 -0
  20. package/dist/commands/add.d.ts +0 -28
  21. package/dist/commands/add.d.ts.map +0 -1
  22. package/dist/commands/add.js +0 -115
  23. package/dist/commands/check.d.ts +0 -7
  24. package/dist/commands/check.d.ts.map +0 -1
  25. package/dist/commands/check.js +0 -34
  26. package/dist/commands/doctor/checks/build.d.ts +0 -10
  27. package/dist/commands/doctor/checks/build.d.ts.map +0 -1
  28. package/dist/commands/doctor/checks/build.js +0 -74
  29. package/dist/commands/doctor/checks/config.d.ts +0 -14
  30. package/dist/commands/doctor/checks/config.d.ts.map +0 -1
  31. package/dist/commands/doctor/checks/config.js +0 -116
  32. package/dist/commands/doctor/checks/dependencies.d.ts +0 -14
  33. package/dist/commands/doctor/checks/dependencies.d.ts.map +0 -1
  34. package/dist/commands/doctor/checks/dependencies.js +0 -126
  35. package/dist/commands/doctor/checks/practices.d.ts +0 -14
  36. package/dist/commands/doctor/checks/practices.d.ts.map +0 -1
  37. package/dist/commands/doctor/checks/practices.js +0 -142
  38. package/dist/commands/doctor/checks/structure.d.ts +0 -14
  39. package/dist/commands/doctor/checks/structure.d.ts.map +0 -1
  40. package/dist/commands/doctor/checks/structure.js +0 -107
  41. package/dist/commands/doctor/fixes/index.d.ts +0 -26
  42. package/dist/commands/doctor/fixes/index.d.ts.map +0 -1
  43. package/dist/commands/doctor/fixes/index.js +0 -108
  44. package/dist/commands/doctor/index.d.ts +0 -11
  45. package/dist/commands/doctor/index.d.ts.map +0 -1
  46. package/dist/commands/doctor/index.js +0 -37
  47. package/dist/commands/doctor/print.d.ts +0 -6
  48. package/dist/commands/doctor/print.d.ts.map +0 -1
  49. package/dist/commands/doctor/print.js +0 -31
  50. package/dist/commands/doctor/types.d.ts +0 -16
  51. package/dist/commands/doctor/types.d.ts.map +0 -1
  52. package/dist/commands/doctor/types.js +0 -1
  53. package/dist/commands/fix.d.ts +0 -5
  54. package/dist/commands/fix.d.ts.map +0 -1
  55. package/dist/commands/fix.js +0 -129
  56. package/dist/commands/init.d.ts +0 -35
  57. package/dist/commands/init.d.ts.map +0 -1
  58. package/dist/commands/init.js +0 -104
  59. package/dist/commands/upgrade.d.ts +0 -9
  60. package/dist/commands/upgrade.d.ts.map +0 -1
  61. package/dist/commands/upgrade.js +0 -85
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/onLoad.d.ts +0 -3
  64. package/dist/onLoad.d.ts.map +0 -1
  65. package/dist/onLoad.js +0 -5
  66. package/dist/utils.d.ts +0 -3
  67. package/dist/utils.d.ts.map +0 -1
  68. package/dist/utils.js +0 -6
package/dist/index.js CHANGED
@@ -1,128 +1,1076 @@
1
- import pc from "@brillout/picocolors";
2
- import { assertUsage } from "@revealui/core/cli/assertions";
3
- import { assertWarning } from "@revealui/core/cli/assertions/warning";
4
- // Import from CLI-specific exports (these are properly configured)
5
- import { runPrerender_forceExit, runPrerenderFromCLI, } from "@revealui/core/cli/prerender";
6
- import { generateTypes, watchTypes } from "@revealui/core/cli/types";
7
- import { cac } from "cac";
8
- import { resolve } from "path";
9
- import { addPlugin } from "./commands/add.js";
10
- import { runCheck } from "./commands/check.js";
11
- import { printDiagnostics, runDiagnostics } from "./commands/doctor/index.js";
12
- import { runFix } from "./commands/fix.js";
13
- import { initProject } from "./commands/init.js";
14
- import { runUpgrade } from "./commands/upgrade.js";
15
- import { projectInfo } from "./utils.js";
16
- const cli = cac(projectInfo.projectName);
17
- cli
18
- .command("prerender", "Pre-render the HTML of your pages", {
19
- allowUnknownOptions: true,
20
- })
21
- .option("--configFile <path>", "[string] Path to vite.config.js")
22
- .action(async (options) => {
23
- assertOptions();
24
- const { partial, noExtraDir, base, parallel, outDir, configFile } = options;
25
- const root = options.root && resolve(options.root);
26
- await runPrerenderFromCLI({
27
- partial,
28
- noExtraDir,
29
- base,
30
- root,
31
- parallel,
32
- outDir,
33
- configFile,
34
- });
35
- runPrerender_forceExit();
36
- });
37
- cli
38
- .command("generate", "Generate types from routes and PayloadCMS collections")
39
- .option("--watch", "[boolean] Watch for changes and regenerate types")
40
- .option("--output <dir>", "[string] Output directory for generated types")
41
- .action(async (options) => {
42
- const outputDir = options.output
43
- ? resolve(options.output)
44
- : resolve(process.cwd(), ".reveal", "types");
45
- if (options.watch) {
46
- console.log(pc.cyan("Watching for changes..."));
47
- await watchTypes(outputDir, () => {
48
- console.log(pc.green("Types regenerated"));
49
- });
50
- }
51
- else {
52
- await generateTypes(outputDir);
53
- }
54
- });
55
- cli
56
- .command("init", "Initialize a new RevealUI project")
57
- .option("--template <name>", "[string] Project template (basic, blog, e-commerce, portfolio)")
58
- .option("--typescript", "[boolean] Use TypeScript")
59
- .option("--tailwind", "[boolean] Use Tailwind CSS")
60
- .option("--payload", "[boolean] Include PayloadCMS")
61
- .action(async (options) => {
62
- await initProject({
63
- template: options.template,
64
- useTypeScript: options.typescript,
65
- useTailwind: options.tailwind,
66
- usePayload: options.payload,
67
- });
1
+ #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __esm = (fn, res) => function __init() {
5
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
6
+ };
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+
12
+ // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.56.2_@types+node@25.3.0__@swc+core@1.15.11_@swc+h_406b258ea3c313c6308725a34065a5eb/node_modules/tsup/assets/esm_shims.js
13
+ import path from "path";
14
+ import { fileURLToPath } from "url";
15
+ var init_esm_shims = __esm({
16
+ "../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.56.2_@types+node@25.3.0__@swc+core@1.15.11_@swc+h_406b258ea3c313c6308725a34065a5eb/node_modules/tsup/assets/esm_shims.js"() {
17
+ "use strict";
18
+ }
19
+ });
20
+
21
+ // src/cli.ts
22
+ import { createLogger } from "@revealui/setup/utils";
23
+ import { Command } from "commander";
24
+ function createCli() {
25
+ const program = new Command();
26
+ program.name("create-revealui").description("Create a new RevealUI project").version("0.1.0").argument("[project-name]", "Name of the project").option("-t, --template <name>", "Template to use (basic-blog, e-commerce, portfolio)").option("--skip-git", "Skip git initialization", false).option("--skip-install", "Skip dependency installation", false).action(async (projectName, options) => {
27
+ logger.header("\u{1F680} Create RevealUI Project");
28
+ const { run: run2 } = await Promise.resolve().then(() => (init_index(), index_exports));
29
+ await run2(projectName, options);
30
+ });
31
+ return program;
32
+ }
33
+ var logger;
34
+ var init_cli = __esm({
35
+ "src/cli.ts"() {
36
+ "use strict";
37
+ init_esm_shims();
38
+ logger = createLogger({ prefix: "CLI" });
39
+ }
40
+ });
41
+
42
+ // src/validators/node-version.ts
43
+ import { createLogger as createLogger2 } from "@revealui/setup/utils";
44
+ function validateNodeVersion() {
45
+ const currentVersion = process.version.slice(1);
46
+ const [currentMajor, currentMinor] = currentVersion.split(".").map(Number);
47
+ const [requiredMajor, requiredMinor] = REQUIRED_NODE_VERSION.split(".").map(Number);
48
+ if (currentMajor < requiredMajor || currentMajor === requiredMajor && currentMinor < requiredMinor) {
49
+ logger2.error(
50
+ `Node.js ${REQUIRED_NODE_VERSION} or higher is required. You have ${currentVersion}.`
51
+ );
52
+ logger2.info("Please upgrade Node.js: https://nodejs.org/");
53
+ return false;
54
+ }
55
+ return true;
56
+ }
57
+ var logger2, REQUIRED_NODE_VERSION;
58
+ var init_node_version = __esm({
59
+ "src/validators/node-version.ts"() {
60
+ "use strict";
61
+ init_esm_shims();
62
+ logger2 = createLogger2({ prefix: "Setup" });
63
+ REQUIRED_NODE_VERSION = "24.12.0";
64
+ }
65
+ });
66
+
67
+ // src/generators/devbox.ts
68
+ import fs from "fs/promises";
69
+ import path2 from "path";
70
+ async function generateDevbox(projectPath) {
71
+ const devboxConfig = {
72
+ packages: ["nodejs@24.12.0", "pnpm@10.28.2", "postgresql@16", "stripe-cli@latest"],
73
+ shell: {
74
+ init_hook: [
75
+ "corepack enable",
76
+ 'echo "\u{1F680} RevealUI Devbox shell ready!"',
77
+ 'echo "Run: pnpm dev to start development"'
78
+ ],
79
+ scripts: {
80
+ dev: "pnpm dev",
81
+ setup: "pnpm install && pnpm db:init",
82
+ test: "pnpm test"
83
+ }
84
+ },
85
+ env: {
86
+ NODE_ENV: "development"
87
+ }
88
+ };
89
+ await fs.writeFile(
90
+ path2.join(projectPath, "devbox.json"),
91
+ JSON.stringify(devboxConfig, null, 2),
92
+ "utf-8"
93
+ );
94
+ }
95
+ var init_devbox = __esm({
96
+ "src/generators/devbox.ts"() {
97
+ "use strict";
98
+ init_esm_shims();
99
+ }
68
100
  });
69
- cli
70
- .command("add <plugin>", "Add a plugin to your project")
71
- .action(async (pluginName) => {
72
- if (!pluginName) {
73
- console.error(pc.red("Error: Plugin name is required"));
74
- console.log("Usage: reveal add <plugin-name>");
75
- process.exit(1);
76
- }
77
- await addPlugin({ pluginName });
78
- });
79
- cli
80
- .command("doctor", "Run health diagnostics on your project")
81
- .action(async () => {
82
- const results = await runDiagnostics();
83
- printDiagnostics(results);
84
- const hasFailures = results.some((r) => r.status === "fail");
85
- if (hasFailures) {
86
- process.exit(1);
87
- }
88
- });
89
- cli.command("check", "Quick health check (for CI/CD)").action(async () => {
90
- const exitCode = await runCheck();
91
- process.exit(exitCode);
92
- });
93
- cli.command("fix", "Automatically fix common issues").action(async () => {
94
- await runFix();
95
- });
96
- cli
97
- .command("upgrade", "Upgrade RevealUI Framework to the latest version")
98
- .action(async () => {
99
- await runUpgrade();
100
- });
101
- function assertOptions() {
102
- // Using process.argv because cac convert names to camelCase
103
- const rawOptions = process.argv.slice(3);
104
- Object.values(rawOptions).forEach((option) => {
105
- assertUsage(!option.startsWith("--") ||
106
- [
107
- "--root",
108
- "--partial",
109
- "--noExtraDir",
110
- "--clientRouter",
111
- "--base",
112
- "--parallel",
113
- "--outDir",
114
- "--configFile",
115
- ].includes(option), "Unknown option: " + option);
116
- assertWarning(false, `You set ${pc.cyan(option)}, but passing options to ${pc.cyan("$ reveal prerender")} is deprecated: use the config file instead. See https://reveal.dev/command-prerender.`, { onlyOnce: true });
101
+
102
+ // src/generators/devcontainer.ts
103
+ import fs2 from "fs/promises";
104
+ import path3 from "path";
105
+ async function generateDevContainer(projectPath) {
106
+ const devcontainerDir = path3.join(projectPath, ".devcontainer");
107
+ await fs2.mkdir(devcontainerDir, { recursive: true });
108
+ const devcontainerConfig = {
109
+ name: "RevealUI Development",
110
+ image: "mcr.microsoft.com/devcontainers/typescript-node:24",
111
+ features: {
112
+ "ghcr.io/devcontainers/features/common-utils:2": {
113
+ installZsh: true,
114
+ installOhMyZsh: true
115
+ }
116
+ },
117
+ forwardPorts: [3e3, 4e3, 5432],
118
+ portsAttributes: {
119
+ "3000": {
120
+ label: "Web App",
121
+ onAutoForward: "notify"
122
+ },
123
+ "4000": {
124
+ label: "CMS",
125
+ onAutoForward: "notify"
126
+ },
127
+ "5432": {
128
+ label: "PostgreSQL",
129
+ onAutoForward: "silent"
130
+ }
131
+ },
132
+ postCreateCommand: "corepack enable && pnpm install",
133
+ customizations: {
134
+ vscode: {
135
+ extensions: [
136
+ "dbaeumer.vscode-eslint",
137
+ "biomejs.biome",
138
+ "bradlc.vscode-tailwindcss",
139
+ "Prisma.prisma",
140
+ "ms-azuretools.vscode-docker",
141
+ "streetsidesoftware.code-spell-checker"
142
+ ],
143
+ settings: {
144
+ "editor.defaultFormatter": "biomejs.biome",
145
+ "editor.formatOnSave": true,
146
+ "editor.codeActionsOnSave": {
147
+ "quickfix.biome": "explicit",
148
+ "source.organizeImports.biome": "explicit"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ remoteUser: "node"
154
+ };
155
+ await fs2.writeFile(
156
+ path3.join(devcontainerDir, "devcontainer.json"),
157
+ JSON.stringify(devcontainerConfig, null, 2),
158
+ "utf-8"
159
+ );
160
+ const dockerCompose = `version: '3.8'
161
+
162
+ services:
163
+ app:
164
+ build:
165
+ context: ..
166
+ dockerfile: .devcontainer/Dockerfile
167
+ volumes:
168
+ - ..:/workspace:cached
169
+ command: sleep infinity
170
+ network_mode: service:db
171
+
172
+ db:
173
+ image: pgvector/pgvector:pg16
174
+ restart: unless-stopped
175
+ environment:
176
+ POSTGRES_USER: postgres
177
+ POSTGRES_PASSWORD: postgres
178
+ POSTGRES_DB: revealui
179
+ volumes:
180
+ - postgres-data:/var/lib/postgresql/data
181
+
182
+ volumes:
183
+ postgres-data:
184
+ `;
185
+ await fs2.writeFile(path3.join(devcontainerDir, "docker-compose.yml"), dockerCompose, "utf-8");
186
+ const dockerfile = `FROM mcr.microsoft.com/devcontainers/typescript-node:24
187
+
188
+ # Install additional tools
189
+ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \\
190
+ && apt-get -y install --no-install-recommends postgresql-client
191
+
192
+ # Enable pnpm
193
+ RUN corepack enable
194
+ `;
195
+ await fs2.writeFile(path3.join(devcontainerDir, "Dockerfile"), dockerfile, "utf-8");
196
+ const readme = `# Dev Container Setup
197
+
198
+ This directory contains the Dev Container configuration for RevealUI.
199
+
200
+ ## Usage
201
+
202
+ ### VS Code
203
+
204
+ 1. Install the "Dev Containers" extension
205
+ 2. Open this folder in VS Code
206
+ 3. Press F1 and select "Dev Containers: Reopen in Container"
207
+
208
+ ### GitHub Codespaces
209
+
210
+ 1. Click the green "Code" button on GitHub
211
+ 2. Select "Codespaces" tab
212
+ 3. Click "Create codespace on main"
213
+
214
+ ## What's Included
215
+
216
+ - Node.js 24.12.0
217
+ - pnpm package manager
218
+ - PostgreSQL 16 with pgvector
219
+ - VS Code extensions:
220
+ - ESLint
221
+ - Biome
222
+ - Tailwind CSS
223
+ - Prisma
224
+ - Docker
225
+ - Code Spell Checker
226
+
227
+ ## Environment Variables
228
+
229
+ Environment variables are loaded from \`.env.development.local\`.
230
+ For GitHub Codespaces, set secrets in your repository settings.
231
+
232
+ ## Ports
233
+
234
+ - 3000: Web application
235
+ - 4000: CMS
236
+ - 5432: PostgreSQL database
237
+ `;
238
+ await fs2.writeFile(path3.join(devcontainerDir, "README.md"), readme, "utf-8");
239
+ }
240
+ var init_devcontainer = __esm({
241
+ "src/generators/devcontainer.ts"() {
242
+ "use strict";
243
+ init_esm_shims();
244
+ }
245
+ });
246
+
247
+ // src/generators/readme.ts
248
+ import fs3 from "fs/promises";
249
+ import path4 from "path";
250
+ async function generateReadme(projectPath, projectConfig) {
251
+ const readme = `# ${projectConfig.projectName}
252
+
253
+ A RevealUI project created with @revealui/cli.
254
+
255
+ ## Getting Started
256
+
257
+ First, install dependencies:
258
+
259
+ \`\`\`bash
260
+ pnpm install
261
+ \`\`\`
262
+
263
+ Then, initialize the database:
264
+
265
+ \`\`\`bash
266
+ pnpm db:init
267
+ pnpm db:migrate
268
+ \`\`\`
269
+
270
+ Run the development server:
271
+
272
+ \`\`\`bash
273
+ pnpm dev
274
+ \`\`\`
275
+
276
+ Open [http://localhost:4000](http://localhost:4000) with your browser to access the CMS.
277
+
278
+ The web application runs on [http://localhost:3000](http://localhost:3000).
279
+
280
+ ## Development Environments
281
+
282
+ ### Standard Setup
283
+
284
+ Requirements:
285
+ - Node.js 24.12.0 or higher
286
+ - pnpm 10.28.2 or higher
287
+ - PostgreSQL 16
288
+
289
+ ### Dev Containers
290
+
291
+ Open in VS Code and select "Reopen in Container", or use GitHub Codespaces.
292
+
293
+ ### Devbox
294
+
295
+ Install Devbox:
296
+
297
+ \`\`\`bash
298
+ curl -fsSL https://get.jetpack.io/devbox | bash
299
+ \`\`\`
300
+
301
+ Then start the Devbox shell:
302
+
303
+ \`\`\`bash
304
+ devbox shell
305
+ pnpm dev
306
+ \`\`\`
307
+
308
+ ## Project Structure
309
+
310
+ \`\`\`
311
+ ${projectConfig.projectName}/
312
+ \u251C\u2500\u2500 apps/
313
+ \u2502 \u251C\u2500\u2500 cms/ # CMS application
314
+ \u2502 \u2514\u2500\u2500 web/ # Frontend application
315
+ \u251C\u2500\u2500 packages/
316
+ \u2502 \u251C\u2500\u2500 auth/ # Authentication
317
+ \u2502 \u251C\u2500\u2500 db/ # Database
318
+ \u2502 \u2514\u2500\u2500 ... # Other shared packages
319
+ \u251C\u2500\u2500 .devcontainer/ # Dev Container configuration
320
+ \u251C\u2500\u2500 devbox.json # Devbox configuration
321
+ \u2514\u2500\u2500 .env.development.local # Environment variables
322
+ \`\`\`
323
+
324
+ ## Available Scripts
325
+
326
+ - \`pnpm dev\` - Start development servers
327
+ - \`pnpm build\` - Build for production
328
+ - \`pnpm test\` - Run tests
329
+ - \`pnpm lint\` - Run linters
330
+ - \`pnpm typecheck\` - Type check
331
+ - \`pnpm db:init\` - Initialize database
332
+ - \`pnpm db:migrate\` - Run migrations
333
+ - \`pnpm db:seed\` - Seed database
334
+
335
+ ## Learn More
336
+
337
+ - [RevealUI Documentation](https://github.com/your-org/RevealUI)
338
+ - [Next.js Documentation](https://nextjs.org/docs)
339
+ - [Hono Documentation](https://hono.dev)
340
+
341
+ ## Template
342
+
343
+ This project was created using the **${projectConfig.template}** template.
344
+
345
+ ## License
346
+
347
+ MIT
348
+ `;
349
+ await fs3.writeFile(path4.join(projectPath, "README.md"), readme, "utf-8");
350
+ }
351
+ var init_readme = __esm({
352
+ "src/generators/readme.ts"() {
353
+ "use strict";
354
+ init_esm_shims();
355
+ }
356
+ });
357
+
358
+ // src/installers/dependencies.ts
359
+ import { createLogger as createLogger3 } from "@revealui/setup/utils";
360
+ import { execa } from "execa";
361
+ import ora from "ora";
362
+ async function installDependencies(projectPath) {
363
+ const spinner = ora("Installing dependencies with pnpm...").start();
364
+ try {
365
+ await execa("pnpm", ["install"], {
366
+ cwd: projectPath,
367
+ stdio: "pipe"
117
368
  });
369
+ spinner.succeed("Dependencies installed successfully");
370
+ } catch (error) {
371
+ spinner.fail("Failed to install dependencies");
372
+ logger3.error('Please run "pnpm install" manually');
373
+ throw error;
374
+ }
118
375
  }
119
- // Listen to unknown commands
120
- cli.on("command:*", () => {
121
- assertUsage(false, "Unknown command: " + cli.args.join(" "));
376
+ async function isPnpmInstalled() {
377
+ try {
378
+ await execa("pnpm", ["--version"]);
379
+ return true;
380
+ } catch {
381
+ return false;
382
+ }
383
+ }
384
+ var logger3;
385
+ var init_dependencies = __esm({
386
+ "src/installers/dependencies.ts"() {
387
+ "use strict";
388
+ init_esm_shims();
389
+ logger3 = createLogger3({ prefix: "Install" });
390
+ }
122
391
  });
123
- cli.help();
124
- cli.version(projectInfo.projectVersion);
125
- cli.parse(process.argv.length === 2 ? [...process.argv, "--help"] : process.argv);
126
- process.on("unhandledRejection", (rejectValue) => {
127
- throw rejectValue;
392
+
393
+ // src/utils/git.ts
394
+ import { createLogger as createLogger4 } from "@revealui/setup/utils";
395
+ import { execa as execa2 } from "execa";
396
+ async function initializeGitRepo(projectPath) {
397
+ try {
398
+ await execa2("git", ["init"], { cwd: projectPath });
399
+ logger4.success("Initialized git repository");
400
+ } catch (error) {
401
+ logger4.warn("Failed to initialize git repository");
402
+ throw error;
403
+ }
404
+ }
405
+ async function createInitialCommit(projectPath) {
406
+ try {
407
+ await execa2("git", ["add", "."], { cwd: projectPath });
408
+ await execa2("git", ["commit", "-m", "Initial commit from @revealui/cli"], { cwd: projectPath });
409
+ logger4.success("Created initial commit");
410
+ } catch (error) {
411
+ logger4.warn("Failed to create initial commit");
412
+ throw error;
413
+ }
414
+ }
415
+ async function isGitInstalled() {
416
+ try {
417
+ await execa2("git", ["--version"]);
418
+ return true;
419
+ } catch {
420
+ return false;
421
+ }
422
+ }
423
+ var logger4;
424
+ var init_git = __esm({
425
+ "src/utils/git.ts"() {
426
+ "use strict";
427
+ init_esm_shims();
428
+ logger4 = createLogger4({ prefix: "Git" });
429
+ }
430
+ });
431
+
432
+ // src/commands/create.ts
433
+ import crypto from "crypto";
434
+ import fs4 from "fs/promises";
435
+ import path5 from "path";
436
+ import { fileURLToPath as fileURLToPath2 } from "url";
437
+ import { createLogger as createLogger5 } from "@revealui/setup/utils";
438
+ import ora2 from "ora";
439
+ function buildEnvLocal(cfg) {
440
+ const lines = [
441
+ "# Generated by @revealui/cli \u2014 fill in the remaining placeholders before running `pnpm dev`",
442
+ "",
443
+ "# Core",
444
+ `REVEALUI_SECRET=${generateSecret()}`,
445
+ `REVEALUI_PUBLIC_SERVER_URL=http://localhost:4000`,
446
+ `NEXT_PUBLIC_SERVER_URL=http://localhost:4000`,
447
+ "",
448
+ "# Database"
449
+ ];
450
+ if (cfg.database.postgresUrl) {
451
+ lines.push(`POSTGRES_URL=${cfg.database.postgresUrl}`);
452
+ } else {
453
+ lines.push("POSTGRES_URL=postgresql://postgres:postgres@localhost:5432/revealui");
454
+ }
455
+ lines.push("", "# Storage (Vercel Blob)");
456
+ if (cfg.storage.provider === "vercel-blob" && cfg.storage.blobToken) {
457
+ lines.push(`BLOB_READ_WRITE_TOKEN=${cfg.storage.blobToken}`);
458
+ } else {
459
+ lines.push("BLOB_READ_WRITE_TOKEN=vercel_blob_rw_placeholder");
460
+ }
461
+ lines.push("", "# Stripe");
462
+ if (cfg.payment.enabled && cfg.payment.stripeSecretKey) {
463
+ lines.push(`STRIPE_SECRET_KEY=${cfg.payment.stripeSecretKey}`);
464
+ lines.push(`STRIPE_WEBHOOK_SECRET=${cfg.payment.stripeWebhookSecret || "whsec_placeholder"}`);
465
+ lines.push(
466
+ `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${cfg.payment.stripePublishableKey || "pk_test_placeholder"}`
467
+ );
468
+ } else {
469
+ lines.push("STRIPE_SECRET_KEY=sk_test_placeholder");
470
+ lines.push("STRIPE_WEBHOOK_SECRET=whsec_placeholder");
471
+ lines.push("NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_placeholder");
472
+ }
473
+ lines.push("", "# Admin bootstrap (used on first run only)");
474
+ lines.push("REVEALUI_ADMIN_EMAIL=admin@example.com");
475
+ lines.push("REVEALUI_ADMIN_PASSWORD=changeme-min-12-chars");
476
+ return `${lines.join("\n")}
477
+ `;
478
+ }
479
+ function generateSecret() {
480
+ return crypto.randomBytes(24).toString("hex");
481
+ }
482
+ async function copyTemplate(templateName, targetPath) {
483
+ const templatePath = path5.join(TEMPLATES_DIR, templateName);
484
+ try {
485
+ await fs4.access(templatePath);
486
+ } catch {
487
+ throw new Error(
488
+ `Template "${templateName}" not found at ${templatePath}. Available templates: minimal, basic-blog, e-commerce, portfolio`
489
+ );
490
+ }
491
+ await copyDir(templatePath, targetPath);
492
+ }
493
+ async function copyDir(src, dest) {
494
+ await fs4.mkdir(dest, { recursive: true });
495
+ const entries = await fs4.readdir(src, { withFileTypes: true });
496
+ for (const entry of entries) {
497
+ const srcPath = path5.join(src, entry.name);
498
+ const destName = entry.name === "_gitignore" ? ".gitignore" : entry.name;
499
+ const destPath = path5.join(dest, destName);
500
+ if (entry.isDirectory()) {
501
+ await copyDir(srcPath, destPath);
502
+ } else {
503
+ await fs4.copyFile(srcPath, destPath);
504
+ }
505
+ }
506
+ }
507
+ function resolveTemplateName(template) {
508
+ const map = {
509
+ "basic-blog": "minimal",
510
+ "e-commerce": "minimal",
511
+ portfolio: "minimal"
512
+ };
513
+ return map[template] ?? "minimal";
514
+ }
515
+ async function createProject(cfg) {
516
+ const { project, skipGit = false, skipInstall = false } = cfg;
517
+ const { projectPath, projectName, template } = project;
518
+ const spinner = ora2(`Copying template "${template}"...`).start();
519
+ try {
520
+ await copyTemplate(resolveTemplateName(template), projectPath);
521
+ spinner.succeed("Template files copied");
522
+ } catch (err) {
523
+ spinner.fail("Failed to copy template files");
524
+ throw err;
525
+ }
526
+ const pkgJsonPath = path5.join(projectPath, "package.json");
527
+ try {
528
+ const raw = await fs4.readFile(pkgJsonPath, "utf-8");
529
+ await fs4.writeFile(pkgJsonPath, raw.replaceAll("{{PROJECT_NAME}}", projectName), "utf-8");
530
+ } catch {
531
+ }
532
+ const envSpinner = ora2("Writing .env.local...").start();
533
+ try {
534
+ await fs4.writeFile(path5.join(projectPath, ".env.local"), buildEnvLocal(cfg), "utf-8");
535
+ envSpinner.succeed(".env.local written");
536
+ } catch (err) {
537
+ envSpinner.fail("Failed to write .env.local");
538
+ throw err;
539
+ }
540
+ await generateReadme(projectPath, project);
541
+ logger5.success("README.md generated");
542
+ if (cfg.devenv.createDevContainer) {
543
+ await generateDevContainer(projectPath);
544
+ logger5.success(".devcontainer/ generated");
545
+ }
546
+ if (cfg.devenv.createDevbox) {
547
+ await generateDevbox(projectPath);
548
+ logger5.success("devbox.json generated");
549
+ }
550
+ if (!skipInstall) {
551
+ const pnpmOk = await isPnpmInstalled();
552
+ if (!pnpmOk) {
553
+ logger5.warn("pnpm not found \u2014 skipping dependency installation. Run `pnpm install` manually.");
554
+ } else {
555
+ await installDependencies(projectPath);
556
+ }
557
+ } else {
558
+ logger5.info("Skipping dependency installation (--skip-install)");
559
+ }
560
+ if (!skipGit) {
561
+ const gitOk = await isGitInstalled();
562
+ if (!gitOk) {
563
+ logger5.warn("git not found \u2014 skipping repository initialisation.");
564
+ } else {
565
+ await initializeGitRepo(projectPath);
566
+ await createInitialCommit(projectPath);
567
+ }
568
+ } else {
569
+ logger5.info("Skipping git initialisation (--skip-git)");
570
+ }
571
+ }
572
+ var logger5, __filename2, __dirname2, TEMPLATES_DIR;
573
+ var init_create = __esm({
574
+ "src/commands/create.ts"() {
575
+ "use strict";
576
+ init_esm_shims();
577
+ init_devbox();
578
+ init_devcontainer();
579
+ init_readme();
580
+ init_dependencies();
581
+ init_git();
582
+ logger5 = createLogger5({ prefix: "Create" });
583
+ __filename2 = fileURLToPath2(import.meta.url);
584
+ __dirname2 = path5.dirname(__filename2);
585
+ TEMPLATES_DIR = path5.resolve(__dirname2, "../../templates");
586
+ }
587
+ });
588
+
589
+ // src/validators/credentials.ts
590
+ import { createLogger as createLogger6 } from "@revealui/setup/utils";
591
+ async function validateStripeKey(key) {
592
+ if (!(key.startsWith("sk_test_") || key.startsWith("sk_live_"))) {
593
+ return {
594
+ valid: false,
595
+ message: "Stripe key must start with sk_test_ or sk_live_"
596
+ };
597
+ }
598
+ return { valid: true };
599
+ }
600
+ async function validateNeonUrl(url) {
601
+ try {
602
+ const parsed = new URL(url);
603
+ if (!parsed.protocol.startsWith("postgres")) {
604
+ return {
605
+ valid: false,
606
+ message: "Database URL must use postgres:// or postgresql:// protocol"
607
+ };
608
+ }
609
+ return { valid: true };
610
+ } catch {
611
+ return {
612
+ valid: false,
613
+ message: "Invalid database URL format"
614
+ };
615
+ }
616
+ }
617
+ async function validateVercelToken(token) {
618
+ if (!token || token.length < 20) {
619
+ return {
620
+ valid: false,
621
+ message: "Vercel token appears invalid (too short)"
622
+ };
623
+ }
624
+ return { valid: true };
625
+ }
626
+ async function validateSupabaseUrl(url) {
627
+ try {
628
+ const parsed = new URL(url);
629
+ if (!parsed.hostname.includes("supabase")) {
630
+ logger6.warn("URL does not appear to be a Supabase URL");
631
+ }
632
+ return { valid: true };
633
+ } catch {
634
+ return {
635
+ valid: false,
636
+ message: "Invalid Supabase URL format"
637
+ };
638
+ }
639
+ }
640
+ var logger6;
641
+ var init_credentials = __esm({
642
+ "src/validators/credentials.ts"() {
643
+ "use strict";
644
+ init_esm_shims();
645
+ logger6 = createLogger6({ prefix: "Validator" });
646
+ }
647
+ });
648
+
649
+ // src/prompts/database.ts
650
+ import inquirer from "inquirer";
651
+ async function promptDatabaseConfig() {
652
+ const { provider } = await inquirer.prompt([
653
+ {
654
+ type: "list",
655
+ name: "provider",
656
+ message: "Which database provider would you like to use?",
657
+ choices: [
658
+ {
659
+ name: "NeonDB - Serverless PostgreSQL (recommended)",
660
+ value: "neon"
661
+ },
662
+ {
663
+ name: "Supabase - PostgreSQL with built-in features",
664
+ value: "supabase"
665
+ },
666
+ {
667
+ name: "Local PostgreSQL - Use existing local database",
668
+ value: "local"
669
+ },
670
+ {
671
+ name: "Skip - Configure later",
672
+ value: "skip"
673
+ }
674
+ ],
675
+ default: "neon"
676
+ }
677
+ ]);
678
+ if (provider === "skip") {
679
+ return { provider: "skip" };
680
+ }
681
+ if (provider === "local") {
682
+ const { postgresUrl: postgresUrl2 } = await inquirer.prompt([
683
+ {
684
+ type: "input",
685
+ name: "postgresUrl",
686
+ message: "Enter your PostgreSQL connection string:",
687
+ default: "postgresql://postgres:postgres@localhost:5432/revealui",
688
+ validate: async (input) => {
689
+ const result = await validateNeonUrl(input);
690
+ return result.valid ? true : result.message || "Invalid database URL";
691
+ }
692
+ }
693
+ ]);
694
+ return { provider: "local", postgresUrl: postgresUrl2 };
695
+ }
696
+ const { postgresUrl } = await inquirer.prompt([
697
+ {
698
+ type: "input",
699
+ name: "postgresUrl",
700
+ message: `Enter your ${provider === "neon" ? "Neon" : "Supabase"} database connection string:`,
701
+ validate: async (input) => {
702
+ if (!input || input.trim() === "") {
703
+ return "Database URL is required";
704
+ }
705
+ const result = await validateNeonUrl(input);
706
+ return result.valid ? true : result.message || "Invalid database URL";
707
+ }
708
+ }
709
+ ]);
710
+ return { provider, postgresUrl };
711
+ }
712
+ var init_database = __esm({
713
+ "src/prompts/database.ts"() {
714
+ "use strict";
715
+ init_esm_shims();
716
+ init_credentials();
717
+ }
718
+ });
719
+
720
+ // src/prompts/devenv.ts
721
+ import inquirer2 from "inquirer";
722
+ async function promptDevEnvConfig() {
723
+ const answers = await inquirer2.prompt([
724
+ {
725
+ type: "confirm",
726
+ name: "createDevContainer",
727
+ message: "Create Dev Container configuration for VS Code / GitHub Codespaces?",
728
+ default: true
729
+ },
730
+ {
731
+ type: "confirm",
732
+ name: "createDevbox",
733
+ message: "Create Devbox configuration for Nix-powered development?",
734
+ default: true
735
+ }
736
+ ]);
737
+ return answers;
738
+ }
739
+ var init_devenv = __esm({
740
+ "src/prompts/devenv.ts"() {
741
+ "use strict";
742
+ init_esm_shims();
743
+ }
744
+ });
745
+
746
+ // src/prompts/payments.ts
747
+ import inquirer3 from "inquirer";
748
+ async function promptPaymentConfig() {
749
+ const { enabled } = await inquirer3.prompt([
750
+ {
751
+ type: "confirm",
752
+ name: "enabled",
753
+ message: "Do you want to configure Stripe payments?",
754
+ default: true
755
+ }
756
+ ]);
757
+ if (!enabled) {
758
+ return { enabled: false };
759
+ }
760
+ const answers = await inquirer3.prompt([
761
+ {
762
+ type: "input",
763
+ name: "stripeSecretKey",
764
+ message: "Enter your Stripe secret key (sk_test_... or sk_live_...):",
765
+ validate: async (input) => {
766
+ if (!input || input.trim() === "") {
767
+ return "Stripe secret key is required";
768
+ }
769
+ const result = await validateStripeKey(input);
770
+ return result.valid ? true : result.message || "Invalid Stripe key";
771
+ }
772
+ },
773
+ {
774
+ type: "input",
775
+ name: "stripePublishableKey",
776
+ message: "Enter your Stripe publishable key (pk_test_... or pk_live_...):",
777
+ validate: (input) => {
778
+ if (!input || input.trim() === "") {
779
+ return "Stripe publishable key is required";
780
+ }
781
+ if (!(input.startsWith("pk_test_") || input.startsWith("pk_live_"))) {
782
+ return "Stripe publishable key must start with pk_test_ or pk_live_";
783
+ }
784
+ return true;
785
+ }
786
+ },
787
+ {
788
+ type: "input",
789
+ name: "stripeWebhookSecret",
790
+ message: "Enter your Stripe webhook secret (whsec_..., optional - press Enter to skip):",
791
+ default: ""
792
+ }
793
+ ]);
794
+ return {
795
+ enabled: true,
796
+ stripeSecretKey: answers.stripeSecretKey,
797
+ stripePublishableKey: answers.stripePublishableKey,
798
+ stripeWebhookSecret: answers.stripeWebhookSecret || void 0
799
+ };
800
+ }
801
+ var init_payments = __esm({
802
+ "src/prompts/payments.ts"() {
803
+ "use strict";
804
+ init_esm_shims();
805
+ init_credentials();
806
+ }
807
+ });
808
+
809
+ // src/prompts/project.ts
810
+ import fs5 from "fs";
811
+ import path6 from "path";
812
+ import inquirer4 from "inquirer";
813
+ async function promptProjectConfig(defaultName) {
814
+ const answers = await inquirer4.prompt([
815
+ {
816
+ type: "input",
817
+ name: "projectName",
818
+ message: "What is your project name?",
819
+ default: defaultName || "my-revealui-project",
820
+ validate: (input) => {
821
+ if (!/^[a-z0-9-]+$/.test(input)) {
822
+ return "Project name must contain only lowercase letters, numbers, and hyphens";
823
+ }
824
+ const projectPath = path6.resolve(process.cwd(), input);
825
+ if (fs5.existsSync(projectPath)) {
826
+ return `Directory "${input}" already exists`;
827
+ }
828
+ return true;
829
+ }
830
+ },
831
+ {
832
+ type: "list",
833
+ name: "template",
834
+ message: "Which template would you like to use?",
835
+ choices: [
836
+ {
837
+ name: "Basic Blog - A simple blog with posts and pages",
838
+ value: "basic-blog"
839
+ },
840
+ {
841
+ name: "E-commerce - Product catalog with checkout",
842
+ value: "e-commerce"
843
+ },
844
+ {
845
+ name: "Portfolio - Personal portfolio site",
846
+ value: "portfolio"
847
+ }
848
+ ],
849
+ default: "basic-blog"
850
+ }
851
+ ]);
852
+ return {
853
+ projectName: answers.projectName,
854
+ projectPath: path6.resolve(process.cwd(), answers.projectName),
855
+ template: answers.template
856
+ };
857
+ }
858
+ var init_project = __esm({
859
+ "src/prompts/project.ts"() {
860
+ "use strict";
861
+ init_esm_shims();
862
+ }
863
+ });
864
+
865
+ // src/prompts/storage.ts
866
+ import inquirer5 from "inquirer";
867
+ async function promptStorageConfig() {
868
+ const { provider } = await inquirer5.prompt([
869
+ {
870
+ type: "list",
871
+ name: "provider",
872
+ message: "Which storage provider would you like to use?",
873
+ choices: [
874
+ {
875
+ name: "Vercel Blob - Simple object storage (recommended)",
876
+ value: "vercel-blob"
877
+ },
878
+ {
879
+ name: "Supabase Storage - Integrated with Supabase",
880
+ value: "supabase"
881
+ },
882
+ {
883
+ name: "Skip - Configure later",
884
+ value: "skip"
885
+ }
886
+ ],
887
+ default: "vercel-blob"
888
+ }
889
+ ]);
890
+ if (provider === "skip") {
891
+ return { provider: "skip" };
892
+ }
893
+ if (provider === "vercel-blob") {
894
+ const { blobToken } = await inquirer5.prompt([
895
+ {
896
+ type: "input",
897
+ name: "blobToken",
898
+ message: "Enter your Vercel Blob read/write token:",
899
+ validate: async (input) => {
900
+ if (!input || input.trim() === "") {
901
+ return "Blob token is required";
902
+ }
903
+ const result = await validateVercelToken(input);
904
+ return result.valid ? true : result.message || "Invalid token";
905
+ }
906
+ }
907
+ ]);
908
+ return { provider: "vercel-blob", blobToken };
909
+ }
910
+ const answers = await inquirer5.prompt([
911
+ {
912
+ type: "input",
913
+ name: "supabaseUrl",
914
+ message: "Enter your Supabase project URL:",
915
+ validate: async (input) => {
916
+ if (!input || input.trim() === "") {
917
+ return "Supabase URL is required";
918
+ }
919
+ const result = await validateSupabaseUrl(input);
920
+ return result.valid ? true : result.message || "Invalid URL";
921
+ }
922
+ },
923
+ {
924
+ type: "input",
925
+ name: "supabaseAnonKey",
926
+ message: "Enter your Supabase anonymous key:",
927
+ validate: (input) => {
928
+ if (!input || input.trim() === "") {
929
+ return "Supabase anonymous key is required";
930
+ }
931
+ return true;
932
+ }
933
+ }
934
+ ]);
935
+ return {
936
+ provider: "supabase",
937
+ supabaseUrl: answers.supabaseUrl,
938
+ supabaseAnonKey: answers.supabaseAnonKey
939
+ };
940
+ }
941
+ var init_storage = __esm({
942
+ "src/prompts/storage.ts"() {
943
+ "use strict";
944
+ init_esm_shims();
945
+ init_credentials();
946
+ }
947
+ });
948
+
949
+ // src/index.ts
950
+ var index_exports = {};
951
+ __export(index_exports, {
952
+ run: () => run
953
+ });
954
+ import { readFileSync } from "fs";
955
+ import { homedir } from "os";
956
+ import { join } from "path";
957
+ import { createLogger as createLogger7 } from "@revealui/setup/utils";
958
+ function checkProLicense() {
959
+ let key = process.env.REVEALUI_LICENSE_KEY;
960
+ if (!key) {
961
+ try {
962
+ const licenseFile = join(homedir(), ".revealui", "license.json");
963
+ const parsed = JSON.parse(readFileSync(licenseFile, "utf8"));
964
+ key = parsed.key;
965
+ } catch {
966
+ }
967
+ }
968
+ if (!key) return false;
969
+ try {
970
+ const parts = key.split(".");
971
+ if (parts.length < 2) return false;
972
+ const payload = JSON.parse(Buffer.from(parts[1] ?? "", "base64").toString("utf8"));
973
+ const tier = payload.tier ?? "free";
974
+ return tier === "pro" || tier === "enterprise";
975
+ } catch {
976
+ return false;
977
+ }
978
+ }
979
+ async function run(projectName, _options) {
980
+ try {
981
+ logger7.info("[1/8] Validating Node.js version...");
982
+ if (!validateNodeVersion()) {
983
+ process.exit(1);
984
+ }
985
+ logger7.success(`Node.js version: ${process.version}`);
986
+ logger7.info("[2/8] Configure your project");
987
+ const projectConfig = await promptProjectConfig(projectName);
988
+ logger7.success(`Project: ${projectConfig.projectName}`);
989
+ logger7.success(`Template: ${projectConfig.template}`);
990
+ if (PRO_TEMPLATES.has(projectConfig.template)) {
991
+ if (!checkProLicense()) {
992
+ logger7.error(`The "${projectConfig.template}" template requires a RevealUI Pro license.`);
993
+ logger7.info("Get Pro at https://revealui.com/pricing");
994
+ logger7.info("Set your license key: export REVEALUI_LICENSE_KEY=<your-key>");
995
+ process.exit(2);
996
+ }
997
+ logger7.success("Pro license verified");
998
+ }
999
+ logger7.info("[3/8] Configure database");
1000
+ const databaseConfig = await promptDatabaseConfig();
1001
+ if (databaseConfig.provider !== "skip") {
1002
+ logger7.success(`Database: ${databaseConfig.provider}`);
1003
+ } else {
1004
+ logger7.info("Database configuration skipped");
1005
+ }
1006
+ logger7.info("[4/8] Configure storage");
1007
+ const storageConfig = await promptStorageConfig();
1008
+ if (storageConfig.provider !== "skip") {
1009
+ logger7.success(`Storage: ${storageConfig.provider}`);
1010
+ } else {
1011
+ logger7.info("Storage configuration skipped");
1012
+ }
1013
+ logger7.info("[5/8] Configure payments");
1014
+ const paymentConfig = await promptPaymentConfig();
1015
+ if (paymentConfig.enabled) {
1016
+ logger7.success("Stripe configured");
1017
+ } else {
1018
+ logger7.info("Payments disabled");
1019
+ }
1020
+ logger7.info("[6/8] Configure development environment");
1021
+ const devEnvConfig = await promptDevEnvConfig();
1022
+ logger7.success(
1023
+ `Dev Container: ${devEnvConfig.createDevContainer ? "Yes" : "No"}, Devbox: ${devEnvConfig.createDevbox ? "Yes" : "No"}`
1024
+ );
1025
+ logger7.info("[7/8] Creating project...");
1026
+ await createProject({
1027
+ project: projectConfig,
1028
+ database: databaseConfig,
1029
+ storage: storageConfig,
1030
+ payment: paymentConfig,
1031
+ devenv: devEnvConfig,
1032
+ skipGit: _options.skipGit,
1033
+ skipInstall: _options.skipInstall
1034
+ });
1035
+ logger7.success("Project created successfully");
1036
+ logger7.info("[8/8] Next steps");
1037
+ logger7.divider();
1038
+ logger7.info(`cd ${projectConfig.projectName}`);
1039
+ logger7.info("pnpm install");
1040
+ logger7.info("pnpm dev");
1041
+ logger7.divider();
1042
+ logger7.success(`\u{1F389} Project ${projectConfig.projectName} created successfully!`);
1043
+ } catch (error) {
1044
+ if (error instanceof Error) {
1045
+ logger7.error(`Failed to create project: ${error.message}`);
1046
+ } else {
1047
+ logger7.error("An unexpected error occurred");
1048
+ }
1049
+ process.exit(1);
1050
+ }
1051
+ }
1052
+ var logger7, PRO_TEMPLATES;
1053
+ var init_index = __esm({
1054
+ "src/index.ts"() {
1055
+ init_esm_shims();
1056
+ init_cli();
1057
+ init_node_version();
1058
+ init_create();
1059
+ init_database();
1060
+ init_devenv();
1061
+ init_payments();
1062
+ init_project();
1063
+ init_storage();
1064
+ logger7 = createLogger7({ prefix: "@revealui/cli" });
1065
+ PRO_TEMPLATES = /* @__PURE__ */ new Set(["e-commerce", "portfolio"]);
1066
+ if (import.meta.url === `file://${process.argv[1]}`) {
1067
+ const cli = createCli();
1068
+ cli.parse(process.argv);
1069
+ }
1070
+ }
128
1071
  });
1072
+ init_index();
1073
+ export {
1074
+ run
1075
+ };
1076
+ //# sourceMappingURL=index.js.map