@forgecart/cli 1.1.0 → 2.0.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 (180) hide show
  1. package/dist/bin/forgecart.d.ts +2 -0
  2. package/dist/bin/forgecart.js +4 -0
  3. package/dist/bin/forgecart.js.map +1 -0
  4. package/dist/src/cli.d.ts +14 -1
  5. package/dist/src/cli.js +30 -15
  6. package/dist/src/cli.js.map +1 -1
  7. package/dist/src/commands/init.d.ts +20 -2
  8. package/dist/src/commands/init.js +88 -307
  9. package/dist/src/commands/init.js.map +1 -1
  10. package/dist/src/commands/placeholders.d.ts +19 -0
  11. package/dist/src/commands/placeholders.js +109 -0
  12. package/dist/src/commands/placeholders.js.map +1 -0
  13. package/dist/src/output.d.ts +11 -0
  14. package/dist/src/output.js +16 -0
  15. package/dist/src/output.js.map +1 -0
  16. package/package.json +21 -11
  17. package/templates/storefront/.env.example +12 -0
  18. package/templates/storefront/.forgecartignore +2 -0
  19. package/templates/storefront/Procfile +1 -0
  20. package/templates/storefront/README.md +87 -0
  21. package/templates/storefront/next.config.js +14 -0
  22. package/templates/storefront/package.json +25 -0
  23. package/templates/storefront/postcss.config.js +6 -0
  24. package/templates/storefront/src/app/cart/page.tsx +110 -0
  25. package/templates/storefront/src/app/globals.css +13 -0
  26. package/templates/storefront/src/app/layout.tsx +30 -0
  27. package/templates/storefront/src/app/page.tsx +49 -0
  28. package/templates/storefront/src/app/products/[slug]/not-found.tsx +20 -0
  29. package/templates/storefront/src/app/products/[slug]/page.tsx +96 -0
  30. package/templates/storefront/src/app/products/page.tsx +27 -0
  31. package/templates/storefront/src/components/AddToCartButton.tsx +30 -0
  32. package/templates/storefront/src/components/Header.tsx +36 -0
  33. package/templates/storefront/src/components/ProductCard.tsx +43 -0
  34. package/templates/storefront/src/lib/cart-context.tsx +116 -0
  35. package/templates/storefront/src/lib/forgecart.ts +202 -0
  36. package/{dist/templates/storefront-additions → templates/storefront}/tailwind.config.js +1 -1
  37. package/templates/storefront/tsconfig.json +23 -0
  38. package/LICENSE +0 -21
  39. package/README.md +0 -179
  40. package/bin/forgecart.js +0 -3
  41. package/dist/package.json +0 -50
  42. package/dist/src/cli.d.ts.map +0 -1
  43. package/dist/src/commands/delete.d.ts +0 -3
  44. package/dist/src/commands/delete.d.ts.map +0 -1
  45. package/dist/src/commands/delete.js +0 -60
  46. package/dist/src/commands/delete.js.map +0 -1
  47. package/dist/src/commands/deploy.d.ts +0 -3
  48. package/dist/src/commands/deploy.d.ts.map +0 -1
  49. package/dist/src/commands/deploy.js +0 -243
  50. package/dist/src/commands/deploy.js.map +0 -1
  51. package/dist/src/commands/env.d.ts +0 -3
  52. package/dist/src/commands/env.d.ts.map +0 -1
  53. package/dist/src/commands/env.js +0 -158
  54. package/dist/src/commands/env.js.map +0 -1
  55. package/dist/src/commands/init.d.ts.map +0 -1
  56. package/dist/src/commands/list.d.ts +0 -3
  57. package/dist/src/commands/list.d.ts.map +0 -1
  58. package/dist/src/commands/list.js +0 -65
  59. package/dist/src/commands/list.js.map +0 -1
  60. package/dist/src/commands/login.d.ts +0 -3
  61. package/dist/src/commands/login.d.ts.map +0 -1
  62. package/dist/src/commands/login.js +0 -120
  63. package/dist/src/commands/login.js.map +0 -1
  64. package/dist/src/commands/logs.d.ts +0 -3
  65. package/dist/src/commands/logs.d.ts.map +0 -1
  66. package/dist/src/commands/logs.js +0 -88
  67. package/dist/src/commands/logs.js.map +0 -1
  68. package/dist/src/commands/scale.d.ts +0 -3
  69. package/dist/src/commands/scale.d.ts.map +0 -1
  70. package/dist/src/commands/scale.js +0 -49
  71. package/dist/src/commands/scale.js.map +0 -1
  72. package/dist/src/commands/status.d.ts +0 -3
  73. package/dist/src/commands/status.d.ts.map +0 -1
  74. package/dist/src/commands/status.js +0 -90
  75. package/dist/src/commands/status.js.map +0 -1
  76. package/dist/src/commands/whoami.d.ts +0 -3
  77. package/dist/src/commands/whoami.d.ts.map +0 -1
  78. package/dist/src/commands/whoami.js +0 -59
  79. package/dist/src/commands/whoami.js.map +0 -1
  80. package/dist/src/index.d.ts +0 -3
  81. package/dist/src/index.d.ts.map +0 -1
  82. package/dist/src/index.js +0 -5
  83. package/dist/src/index.js.map +0 -1
  84. package/dist/src/lib/api-client.d.ts +0 -34
  85. package/dist/src/lib/api-client.d.ts.map +0 -1
  86. package/dist/src/lib/api-client.js +0 -141
  87. package/dist/src/lib/api-client.js.map +0 -1
  88. package/dist/src/lib/archive.d.ts +0 -9
  89. package/dist/src/lib/archive.d.ts.map +0 -1
  90. package/dist/src/lib/archive.js +0 -118
  91. package/dist/src/lib/archive.js.map +0 -1
  92. package/dist/src/lib/config-updater.d.ts +0 -10
  93. package/dist/src/lib/config-updater.d.ts.map +0 -1
  94. package/dist/src/lib/config-updater.js +0 -34
  95. package/dist/src/lib/config-updater.js.map +0 -1
  96. package/dist/src/lib/config.d.ts +0 -53
  97. package/dist/src/lib/config.d.ts.map +0 -1
  98. package/dist/src/lib/config.js +0 -162
  99. package/dist/src/lib/config.js.map +0 -1
  100. package/dist/src/lib/env-sync.d.ts +0 -44
  101. package/dist/src/lib/env-sync.d.ts.map +0 -1
  102. package/dist/src/lib/env-sync.js +0 -207
  103. package/dist/src/lib/env-sync.js.map +0 -1
  104. package/dist/src/lib/logger.d.ts +0 -15
  105. package/dist/src/lib/logger.d.ts.map +0 -1
  106. package/dist/src/lib/logger.js +0 -54
  107. package/dist/src/lib/logger.js.map +0 -1
  108. package/dist/src/lib/nx-generator.d.ts +0 -22
  109. package/dist/src/lib/nx-generator.d.ts.map +0 -1
  110. package/dist/src/lib/nx-generator.js +0 -345
  111. package/dist/src/lib/nx-generator.js.map +0 -1
  112. package/dist/src/lib/standalone.d.ts +0 -28
  113. package/dist/src/lib/standalone.d.ts.map +0 -1
  114. package/dist/src/lib/standalone.js +0 -107
  115. package/dist/src/lib/standalone.js.map +0 -1
  116. package/dist/src/types/index.d.ts +0 -80
  117. package/dist/src/types/index.d.ts.map +0 -1
  118. package/dist/src/types/index.js +0 -14
  119. package/dist/src/types/index.js.map +0 -1
  120. package/dist/src/utils/spinner.d.ts +0 -16
  121. package/dist/src/utils/spinner.d.ts.map +0 -1
  122. package/dist/src/utils/spinner.js +0 -88
  123. package/dist/src/utils/spinner.js.map +0 -1
  124. package/dist/src/utils/validation.d.ts +0 -12
  125. package/dist/src/utils/validation.d.ts.map +0 -1
  126. package/dist/src/utils/validation.js +0 -82
  127. package/dist/src/utils/validation.js.map +0 -1
  128. package/dist/templates/application-additions/.forgecartignore +0 -37
  129. package/dist/templates/application-additions/Procfile +0 -1
  130. package/dist/templates/application-additions/src/app/app.module.ts +0 -16
  131. package/dist/templates/application-additions/src/services/forgecart.service.ts +0 -62
  132. package/dist/templates/application-additions/src/services/index.ts +0 -2
  133. package/dist/templates/application-additions/src/services/product-event-listener.service.ts +0 -150
  134. package/dist/templates/application-e2e-additions/src/support/global-setup.ts +0 -16
  135. package/dist/templates/application-e2e-additions/src/support/test-setup.ts +0 -9
  136. package/dist/templates/storefront-additions/.forgecartignore +0 -64
  137. package/dist/templates/storefront-additions/Procfile +0 -1
  138. package/dist/templates/storefront-additions/package.json +0 -11
  139. package/dist/templates/storefront-additions/postcss.config.js +0 -5
  140. package/dist/templates/storefront-additions/src/app/cart/page.tsx +0 -77
  141. package/dist/templates/storefront-additions/src/app/global.css +0 -1
  142. package/dist/templates/storefront-additions/src/app/layout.tsx +0 -25
  143. package/dist/templates/storefront-additions/src/app/page.tsx +0 -43
  144. package/dist/templates/storefront-additions/src/components/AddToCartButton.tsx +0 -29
  145. package/dist/templates/storefront-additions/src/components/CartItem.tsx +0 -82
  146. package/dist/templates/storefront-additions/src/components/Header.tsx +0 -42
  147. package/dist/templates/storefront-additions/src/components/ProductCard.tsx +0 -57
  148. package/dist/templates/storefront-additions/src/components/QuantitySelector.tsx +0 -35
  149. package/dist/templates/storefront-additions/src/context/CartContext.tsx +0 -158
  150. package/dist/templates/storefront-additions/src/lib/forgecart.ts +0 -22
  151. package/dist/templates/storefront-e2e-additions/playwright.config.ts +0 -26
  152. package/dist/templates/storefront-e2e-additions/src/example.spec.ts +0 -11
  153. package/dist/templates/workspace/.nxignore +0 -2
  154. package/templates/application-additions/.forgecartignore +0 -37
  155. package/templates/application-additions/Procfile +0 -1
  156. package/templates/application-additions/src/app/app.module.ts +0 -16
  157. package/templates/application-additions/src/services/forgecart.service.ts +0 -62
  158. package/templates/application-additions/src/services/index.ts +0 -2
  159. package/templates/application-additions/src/services/product-event-listener.service.ts +0 -150
  160. package/templates/application-e2e-additions/src/support/global-setup.ts +0 -16
  161. package/templates/application-e2e-additions/src/support/test-setup.ts +0 -9
  162. package/templates/storefront-additions/.forgecartignore +0 -64
  163. package/templates/storefront-additions/Procfile +0 -1
  164. package/templates/storefront-additions/package.json +0 -11
  165. package/templates/storefront-additions/postcss.config.js +0 -5
  166. package/templates/storefront-additions/src/app/cart/page.tsx +0 -77
  167. package/templates/storefront-additions/src/app/global.css +0 -1
  168. package/templates/storefront-additions/src/app/layout.tsx +0 -25
  169. package/templates/storefront-additions/src/app/page.tsx +0 -43
  170. package/templates/storefront-additions/src/components/AddToCartButton.tsx +0 -29
  171. package/templates/storefront-additions/src/components/CartItem.tsx +0 -82
  172. package/templates/storefront-additions/src/components/Header.tsx +0 -42
  173. package/templates/storefront-additions/src/components/ProductCard.tsx +0 -57
  174. package/templates/storefront-additions/src/components/QuantitySelector.tsx +0 -35
  175. package/templates/storefront-additions/src/context/CartContext.tsx +0 -158
  176. package/templates/storefront-additions/src/lib/forgecart.ts +0 -22
  177. package/templates/storefront-additions/tailwind.config.js +0 -8
  178. package/templates/storefront-e2e-additions/playwright.config.ts +0 -26
  179. package/templates/storefront-e2e-additions/src/example.spec.ts +0 -11
  180. package/templates/workspace/.nxignore +0 -2
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '../src/cli.js';
3
+ void run();
4
+ //# sourceMappingURL=forgecart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgecart.js","sourceRoot":"","sources":["../../bin/forgecart.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,KAAK,GAAG,EAAE,CAAC"}
package/dist/src/cli.d.ts CHANGED
@@ -1,3 +1,16 @@
1
1
  import { Command } from 'commander';
2
+ /** CLI version, kept in sync with `package.json`. */
3
+ export declare const CLI_VERSION = "2.0.0";
4
+ /**
5
+ * Build the `forgecart` commander program with the full command surface.
6
+ *
7
+ * `init` is fully implemented; the remaining commands are registered with their
8
+ * exact options/arguments but announce that they arrive with the publish
9
+ * pipeline.
10
+ */
2
11
  export declare function createProgram(): Command;
3
- //# sourceMappingURL=cli.d.ts.map
12
+ /**
13
+ * Parse argv and execute the program. Any thrown error is surfaced on stderr and
14
+ * the process exits with a non-zero status. Errors are never swallowed.
15
+ */
16
+ export declare function run(argv?: string[]): Promise<void>;
package/dist/src/cli.js CHANGED
@@ -1,32 +1,47 @@
1
1
  import { Command } from 'commander';
2
- import { createDeleteCommand } from './commands/delete.js';
3
- import { createDeployCommand } from './commands/deploy.js';
4
- import { createEnvCommand } from './commands/env.js';
5
- import { createInitApplicationCommand, createInitCommand, } from './commands/init.js';
6
- import { createListCommand } from './commands/list.js';
7
- import { createLoginCommand } from './commands/login.js';
8
- import { createLogsCommand } from './commands/logs.js';
9
- import { createScaleCommand } from './commands/scale.js';
10
- import { createStatusCommand } from './commands/status.js';
11
- import { createWhoamiCommand } from './commands/whoami.js';
2
+ import { createInitCommand } from './commands/init.js';
3
+ import { createDeleteCommand, createDeployCommand, createEnvCommand, createInitApplicationCommand, createListCommand, createLogsCommand, createScaleCommand, createStatusCommand, createWhoamiCommand, } from './commands/placeholders.js';
4
+ import { printError } from './output.js';
5
+ /** CLI version, kept in sync with `package.json`. */
6
+ export const CLI_VERSION = '2.0.0';
7
+ /**
8
+ * Build the `forgecart` commander program with the full command surface.
9
+ *
10
+ * `init` is fully implemented; the remaining commands are registered with their
11
+ * exact options/arguments but announce that they arrive with the publish
12
+ * pipeline.
13
+ */
12
14
  export function createProgram() {
13
15
  const program = new Command();
14
16
  program
15
17
  .name('forgecart')
16
- .description('CLI tool for deploying applications to ForgeCart')
17
- .version('1.0.0');
18
- // Add commands
19
- program.addCommand(createLoginCommand());
18
+ .description('CLI for scaffolding and operating ForgeCart channel storefronts')
19
+ .version(CLI_VERSION);
20
20
  program.addCommand(createInitCommand());
21
21
  program.addCommand(createInitApplicationCommand());
22
22
  program.addCommand(createDeployCommand());
23
23
  program.addCommand(createListCommand());
24
24
  program.addCommand(createStatusCommand());
25
+ program.addCommand(createLogsCommand());
25
26
  program.addCommand(createDeleteCommand());
26
27
  program.addCommand(createScaleCommand());
27
28
  program.addCommand(createEnvCommand());
28
- program.addCommand(createLogsCommand());
29
29
  program.addCommand(createWhoamiCommand());
30
30
  return program;
31
31
  }
32
+ /**
33
+ * Parse argv and execute the program. Any thrown error is surfaced on stderr and
34
+ * the process exits with a non-zero status. Errors are never swallowed.
35
+ */
36
+ export async function run(argv = process.argv) {
37
+ const program = createProgram();
38
+ try {
39
+ await program.parseAsync(argv);
40
+ }
41
+ catch (error) {
42
+ const message = error instanceof Error ? error.message : String(error);
43
+ printError(`Error: ${message}`);
44
+ process.exitCode = 1;
45
+ }
46
+ }
32
47
  //# sourceMappingURL=cli.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AA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AC,KAAK,UAAU,GAAG,CAAC,OAAiB,OAAO,CAAC,IAAI;IACrD,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,UAAU,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;QAChC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -1,4 +1,22 @@
1
1
  import { Command } from 'commander';
2
+ /** Default shop API base. Overridable via `--api-url`. */
3
+ export declare const DEFAULT_SHOP_API_URL = "https://api.forgecart.com";
4
+ /** Resolved options for `forgecart init`. */
5
+ export interface InitOptions {
6
+ /** Channel token (required). */
7
+ token?: string;
8
+ /** Shop API base URL. */
9
+ apiUrl: string;
10
+ /** Whether to also scaffold a NestJS application (planned for a later phase). */
11
+ application?: boolean;
12
+ }
13
+ /**
14
+ * Run `forgecart init`.
15
+ *
16
+ * Resolves the target directory, copies the bundled storefront template into it,
17
+ * writes the ForgeCart config and `.env.local`, then prints next steps. Throws a
18
+ * clear Error on any failure (missing token, missing template, copy failure).
19
+ */
20
+ export declare function runInit(name: string | undefined, options: InitOptions): Promise<void>;
21
+ /** Build the `init [name]` command. */
2
22
  export declare function createInitCommand(): Command;
3
- export declare function createInitApplicationCommand(): Command;
4
- //# sourceMappingURL=init.d.ts.map
@@ -1,319 +1,100 @@
1
- import * as path from 'path';
2
- import * as fs from 'fs';
3
- import inquirer from 'inquirer';
1
+ import { mkdir, cp, writeFile, stat } from 'node:fs/promises';
2
+ import { dirname, join, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
4
  import { Command } from 'commander';
5
- import logger from '../lib/logger.js';
6
- import { writeConfig, getDefaultConfig, configExists, readConfig, updateConfig, requireAuth, getGlobalApiUrl, } from '../lib/config.js';
7
- import { ForgecartApiClient } from '../lib/api-client.js';
8
- import { createNxWorkspace, generateNextApp, generateNestApp, installDependency, copyTemplateFiles, getCliTemplatesDir, addPackageScripts, appendEnvPatternsToGitignore, createEnvFile, DEFAULT_NX_VERSION, } from '../lib/nx-generator.js';
9
- import { isValidProjectName } from '../utils/validation.js';
10
- import { withSpinner } from '../utils/spinner.js';
11
- import { ensureStandaloneOutput } from '../lib/config-updater.js';
12
- export function createInitCommand() {
13
- const cmd = new Command('init')
14
- .description('Create a new ForgeCart project')
15
- .argument('[name]', 'Project name')
16
- .option('-t, --token <token>', 'ForgeCart channel token')
17
- .option('-a, --application', 'Include NestJS backend application')
18
- .option('--api-url <url>', 'ForgeCart API URL', 'https://api.forgecart.com')
19
- .option('--nx-version <version>', 'NX version to use', DEFAULT_NX_VERSION)
20
- .action(async (name, options) => {
21
- await initProject(name, options);
22
- });
23
- return cmd;
24
- }
25
- export function createInitApplicationCommand() {
26
- const cmd = new Command('init:application')
27
- .description('Add a NestJS backend application to an existing project')
28
- .action(async () => {
29
- await addApplication();
30
- });
31
- return cmd;
5
+ import { print } from '../output.js';
6
+ /** Default shop API base. Overridable via `--api-url`. */
7
+ export const DEFAULT_SHOP_API_URL = 'https://api.forgecart.com';
8
+ /**
9
+ * Absolute path to the bundled storefront scaffold.
10
+ *
11
+ * At runtime this file lives at `<pkg>/dist/src/commands/init.js`, so the
12
+ * `templates/` directory shipped alongside `dist/` is three levels up.
13
+ */
14
+ function getStorefrontTemplateDir() {
15
+ const here = dirname(fileURLToPath(import.meta.url));
16
+ return resolve(here, '..', '..', '..', 'templates', 'storefront');
32
17
  }
33
- async function initProject(name, options) {
34
- logger.title('ForgeCart Project Setup');
35
- // Check authentication first (set by `forgecart login`)
36
- const authToken = requireAuth();
37
- // Prompt for project name if not provided
38
- let projectName = name;
39
- if (!projectName) {
40
- const answers = await inquirer.prompt([
41
- {
42
- type: 'input',
43
- name: 'projectName',
44
- message: 'Project name:',
45
- validate: (input) => {
46
- if (!input)
47
- return 'Project name is required';
48
- if (!isValidProjectName(input)) {
49
- return 'Project name must start with a letter and contain only lowercase letters, numbers, and hyphens';
50
- }
51
- return true;
52
- },
53
- },
54
- ]);
55
- projectName = answers.projectName;
18
+ /** True if the path exists and is a directory. */
19
+ async function isDirectory(path) {
20
+ try {
21
+ const info = await stat(path);
22
+ return info.isDirectory();
56
23
  }
57
- // Validate project name
58
- if (!projectName || !isValidProjectName(projectName)) {
59
- logger.error('Invalid project name. Must start with a letter and contain only lowercase letters, numbers, and hyphens.');
60
- process.exit(1);
24
+ catch {
25
+ return false;
61
26
  }
62
- // Check if directory already exists
63
- const targetDir = path.join(process.cwd(), projectName);
64
- if (fs.existsSync(targetDir)) {
65
- logger.error(`Directory ${projectName} already exists`);
66
- process.exit(1);
67
- }
68
- // Prompt for channel token if not provided
69
- let channelToken = options.channelToken;
70
- if (!channelToken) {
71
- const answers = await inquirer.prompt([
72
- {
73
- type: 'input',
74
- name: 'channelToken',
75
- message: 'ForgeCart channel token:',
76
- validate: (input) => {
77
- if (!input)
78
- return 'Channel token is required';
79
- return true;
80
- },
81
- },
82
- ]);
83
- channelToken = answers.channelToken;
84
- }
85
- // Validate channel token
86
- if (!channelToken) {
87
- logger.error('Channel token is required');
88
- process.exit(1);
89
- }
90
- const apiUrl = options.apiUrl || getGlobalApiUrl();
91
- const apiClient = new ForgecartApiClient(apiUrl, channelToken, authToken);
92
- await withSpinner('Validating channel token...', 'Channel token validated', 'Invalid channel token', async () => {
93
- const isValid = await apiClient.validateChannelToken();
94
- if (!isValid) {
95
- throw new Error('Invalid channel token');
96
- }
97
- });
98
- // Prompt for application inclusion if not specified
99
- let withApplication = options.withApplication;
100
- if (withApplication === undefined) {
101
- const answers = await inquirer.prompt([
102
- {
103
- type: 'confirm',
104
- name: 'withApplication',
105
- message: 'Include NestJS backend application?',
106
- default: false,
107
- },
108
- ]);
109
- withApplication = answers.withApplication;
110
- }
111
- // Create NX workspace
112
- await withSpinner('Creating NX workspace...', 'NX workspace created', 'Failed to create NX workspace', async () => {
113
- const success = await createNxWorkspace(projectName, process.cwd(), options.nxVersion);
114
- if (!success) {
115
- throw new Error('Failed to create NX workspace');
116
- }
117
- });
118
- // Generate Next.js storefront
119
- await withSpinner('Generating Next.js storefront...', 'Storefront generated', 'Failed to generate storefront', async () => {
120
- const success = await generateNextApp('storefront', targetDir);
121
- if (!success) {
122
- throw new Error('Failed to generate storefront');
123
- }
124
- });
125
- // Install @forgecart/sdk
126
- await withSpinner('Installing @forgecart/sdk...', '@forgecart/sdk installed', 'Failed to install SDK', async () => {
127
- const success = await installDependency('@forgecart/sdk@^1.2.0', targetDir);
128
- if (!success) {
129
- throw new Error('Failed to install SDK');
130
- }
131
- });
132
- // Install Tailwind CSS
133
- await withSpinner('Installing Tailwind CSS...', 'Tailwind CSS installed', 'Failed to install Tailwind CSS', async () => {
134
- const success = await installDependency('tailwindcss @tailwindcss/postcss postcss autoprefixer -D', targetDir);
135
- if (!success) {
136
- throw new Error('Failed to install Tailwind CSS');
137
- }
138
- });
139
- // Copy storefront template additions
140
- logger.info('Applying storefront customizations...');
141
- const templatesDir = getCliTemplatesDir();
142
- const storefrontAdditionsDir = path.join(templatesDir, 'storefront-additions');
143
- const storefrontDir = path.join(targetDir, 'apps', 'storefront');
144
- copyTemplateFiles(storefrontAdditionsDir, storefrontDir);
145
- createEnvFile(storefrontDir, 'storefront', {
27
+ }
28
+ /** Build the `.forgecart/config.json` payload. */
29
+ function buildConfig(channelToken, options) {
30
+ return {
31
+ version: '2.0',
146
32
  channelToken,
147
- apiUrl,
148
- });
149
- // Configure storefront dev port to 4200
150
- const storefrontProjectJsonPath = path.join(storefrontDir, 'project.json');
151
- if (fs.existsSync(storefrontProjectJsonPath)) {
152
- const projectJson = JSON.parse(fs.readFileSync(storefrontProjectJsonPath, 'utf-8'));
153
- if (!projectJson.targets) {
154
- projectJson.targets = {};
155
- }
156
- if (!projectJson.targets.dev) {
157
- projectJson.targets.dev = {};
158
- }
159
- if (!projectJson.targets.dev.options) {
160
- projectJson.targets.dev.options = {};
161
- }
162
- projectJson.targets.dev.options.port = 4200;
163
- fs.writeFileSync(storefrontProjectJsonPath, JSON.stringify(projectJson, null, 2));
164
- logger.debug('Configured storefront dev port to 4200');
165
- }
166
- logger.success('Storefront customizations applied');
167
- // Copy storefront E2E template additions
168
- const storefrontE2eAdditionsDir = path.join(templatesDir, 'storefront-e2e-additions');
169
- const storefrontE2eDir = path.join(targetDir, 'apps', 'storefront-e2e');
170
- copyTemplateFiles(storefrontE2eAdditionsDir, storefrontE2eDir);
171
- logger.success('E2E test customizations applied');
172
- // Add .env patterns to .gitignore
173
- appendEnvPatternsToGitignore(targetDir);
174
- // Configure standalone output for deployment
175
- logger.info('Configuring standalone output...');
176
- const standaloneConfigured = ensureStandaloneOutput(storefrontDir);
177
- if (standaloneConfigured) {
178
- logger.success('Standalone output configured in next.config.js');
179
- }
180
- else {
181
- logger.warn('Could not auto-configure standalone output. Please add output: "standalone" to next.config.js manually.');
182
- }
183
- // Generate NestJS application if requested
184
- if (withApplication) {
185
- await withSpinner('Generating NestJS application...', 'Application generated', 'Failed to generate application', async () => {
186
- const success = await generateNestApp('application', targetDir);
187
- if (!success) {
188
- throw new Error('Failed to generate application');
189
- }
190
- });
191
- // Install @nestjs/config for environment variable management
192
- await withSpinner('Installing @nestjs/config...', '@nestjs/config installed', 'Failed to install @nestjs/config', async () => {
193
- const success = await installDependency('@nestjs/config', targetDir);
194
- if (!success) {
195
- throw new Error('Failed to install @nestjs/config');
196
- }
197
- });
198
- // Copy application template additions
199
- logger.info('Applying application customizations...');
200
- const applicationAdditionsDir = path.join(templatesDir, 'application-additions');
201
- const applicationDir = path.join(targetDir, 'apps', 'application');
202
- copyTemplateFiles(applicationAdditionsDir, applicationDir);
203
- createEnvFile(applicationDir, 'application', {
204
- channelToken,
205
- apiUrl,
206
- });
207
- logger.success('Application customizations applied');
208
- // Copy application E2E template additions
209
- const applicationE2eAdditionsDir = path.join(templatesDir, 'application-e2e-additions');
210
- const applicationE2eDir = path.join(targetDir, 'apps', 'application-e2e');
211
- copyTemplateFiles(applicationE2eAdditionsDir, applicationE2eDir);
212
- logger.success('Application E2E customizations applied');
213
- }
214
- // Add convenience scripts to package.json
215
- addPackageScripts(targetDir, withApplication || false);
216
- // Create ForgeCart config (authToken is stored globally in ~/.forgecart/)
217
- const config = getDefaultConfig();
218
- config.channelToken = channelToken;
219
- config.apiUrl = apiUrl;
220
- config.hasApplication = withApplication || false;
221
- config.storefrontPath = 'apps/storefront';
222
- if (withApplication) {
223
- config.applicationPath = 'apps/application';
224
- }
225
- writeConfig(config, targetDir);
226
- logger.success('ForgeCart configuration created');
227
- // Success message
228
- logger.newline();
229
- logger.box(`Project "${projectName}" created successfully!
230
-
231
- Next steps:
232
- cd ${projectName}
233
- forgecart deploy
234
-
235
- Your storefront will be available at:
236
- apps/storefront/` +
237
- (withApplication
238
- ? `
239
-
240
- Your application will be available at:
241
- apps/application/`
242
- : ''));
243
- // Cleanup and exit
244
- apiClient.dispose();
245
- process.exit(0);
33
+ apiUrl: options.apiUrl,
34
+ hasApplication: options.application ?? false,
35
+ storefrontPath: '.',
36
+ };
246
37
  }
247
- async function addApplication() {
248
- logger.title('Add NestJS Application');
249
- // Check if we're in a ForgeCart project
250
- if (!configExists()) {
251
- logger.error('Not in a ForgeCart project. Run "forgecart init" first.');
252
- process.exit(1);
38
+ /** Build the `.env.local` contents for the storefront SDK client. */
39
+ function buildEnvLocal(channelToken, apiUrl) {
40
+ return [
41
+ `FORGECART_CHANNEL_TOKEN=${channelToken}`,
42
+ `FORGECART_SHOP_API_URL=${apiUrl}`,
43
+ '',
44
+ ].join('\n');
45
+ }
46
+ /** Print the post-scaffold next steps. */
47
+ function printNextSteps(targetDir, application) {
48
+ print('');
49
+ print('Storefront scaffolded successfully.');
50
+ print('');
51
+ print('Next steps:');
52
+ print(` cd ${targetDir}`);
53
+ print(' npm install');
54
+ print(' npm run dev');
55
+ print('');
56
+ if (application) {
57
+ print('Note: --application was requested. A NestJS application scaffold arrives ' +
58
+ 'in a later phase (TODO).');
59
+ print('');
253
60
  }
254
- const config = readConfig();
255
- if (!config) {
256
- logger.error('Invalid ForgeCart configuration');
257
- process.exit(1);
61
+ }
62
+ /**
63
+ * Run `forgecart init`.
64
+ *
65
+ * Resolves the target directory, copies the bundled storefront template into it,
66
+ * writes the ForgeCart config and `.env.local`, then prints next steps. Throws a
67
+ * clear Error on any failure (missing token, missing template, copy failure).
68
+ */
69
+ export async function runInit(name, options) {
70
+ const channelToken = options.token?.trim();
71
+ if (!channelToken) {
72
+ throw new Error('A channel token is required. Pass it with --token <token> (or -t <token>).');
258
73
  }
259
- // Check if application already exists
260
- if (config.hasApplication) {
261
- logger.error('Application already exists in this project');
262
- process.exit(1);
74
+ const targetDir = name ? resolve(process.cwd(), name) : process.cwd();
75
+ const templateDir = getStorefrontTemplateDir();
76
+ if (!(await isDirectory(templateDir))) {
77
+ throw new Error(`Storefront template not found at ${templateDir}.`);
263
78
  }
264
- const projectRoot = process.cwd();
265
- // Generate NestJS application
266
- await withSpinner('Generating NestJS application...', 'Application generated', 'Failed to generate application', async () => {
267
- const success = await generateNestApp('application', projectRoot);
268
- if (!success) {
269
- throw new Error('Failed to generate application');
270
- }
271
- });
272
- // Install @forgecart/sdk in application
273
- await withSpinner('Installing @forgecart/sdk...', '@forgecart/sdk installed', 'Failed to install SDK', async () => {
274
- const success = await installDependency('@forgecart/sdk@^1.2.0', projectRoot);
275
- if (!success) {
276
- throw new Error('Failed to install SDK');
277
- }
278
- });
279
- // Install @nestjs/config for environment variable management
280
- await withSpinner('Installing @nestjs/config...', '@nestjs/config installed', 'Failed to install @nestjs/config', async () => {
281
- const success = await installDependency('@nestjs/config', projectRoot);
282
- if (!success) {
283
- throw new Error('Failed to install @nestjs/config');
284
- }
285
- });
286
- // Copy application template additions
287
- logger.info('Applying application customizations...');
288
- const templatesDir = getCliTemplatesDir();
289
- const applicationAdditionsDir = path.join(templatesDir, 'application-additions');
290
- const applicationDir = path.join(projectRoot, 'apps', 'application');
291
- copyTemplateFiles(applicationAdditionsDir, applicationDir);
292
- createEnvFile(applicationDir, 'application', {
293
- channelToken: config.channelToken,
294
- apiUrl: config.apiUrl,
295
- });
296
- logger.success('Application customizations applied');
297
- // Copy application E2E template additions
298
- const applicationE2eAdditionsDir = path.join(templatesDir, 'application-e2e-additions');
299
- const applicationE2eDir = path.join(projectRoot, 'apps', 'application-e2e');
300
- copyTemplateFiles(applicationE2eAdditionsDir, applicationE2eDir);
301
- logger.success('Application E2E customizations applied');
302
- // Update config
303
- updateConfig({
304
- hasApplication: true,
305
- applicationPath: 'apps/application',
79
+ await mkdir(targetDir, { recursive: true });
80
+ await cp(templateDir, targetDir, { recursive: true });
81
+ const configDir = join(targetDir, '.forgecart');
82
+ await mkdir(configDir, { recursive: true });
83
+ const config = buildConfig(channelToken, options);
84
+ await writeFile(join(configDir, 'config.json'), `${JSON.stringify(config, null, 2)}\n`, 'utf8');
85
+ await writeFile(join(targetDir, '.env.local'), buildEnvLocal(channelToken, options.apiUrl), 'utf8');
86
+ printNextSteps(name ?? '.', config.hasApplication);
87
+ }
88
+ /** Build the `init [name]` command. */
89
+ export function createInitCommand() {
90
+ return new Command('init')
91
+ .description('Scaffold a ForgeCart storefront in the target directory')
92
+ .argument('[name]', 'Target directory name (defaults to the current directory)')
93
+ .option('-t, --token <token>', 'ForgeCart channel token (required)')
94
+ .option('--api-url <url>', 'Shop API base URL written to the storefront environment', DEFAULT_SHOP_API_URL)
95
+ .option('-a, --application', 'Also scaffold a NestJS application (TODO: next phase)')
96
+ .action(async (name, options) => {
97
+ await runInit(name, options);
306
98
  });
307
- logger.success('Configuration updated');
308
- logger.newline();
309
- logger.box(`NestJS application added successfully!
310
-
311
- Your application is available at:
312
- apps/application/
313
-
314
- To deploy:
315
- cd apps/application
316
- forgecart deploy`);
317
- process.exit(0);
318
99
  }
319
100
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,EACb,kBAAkB,GACnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAGjE,MAAM,UAAU,iBAAiB;IAC/B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;SAC5B,WAAW,CAAC,gCAAgC,CAAC;SAC7C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;SAClC,MAAM,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;SACxD,MAAM,CAAC,mBAAmB,EAAE,oCAAoC,CAAC;SACjE,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,2BAA2B,CAAC;SAC3E,MAAM,CAAC,wBAAwB,EAAE,mBAAmB,EAAE,kBAAkB,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2
+ /** `init:application` — add a NestJS application to an existing project. */
3
+ export declare function createInitApplicationCommand(): Command;
4
+ /** `deploy` — deploy the current project. */
5
+ export declare function createDeployCommand(): Command;
6
+ /** `list` — list deployments for the channel. */
7
+ export declare function createListCommand(): Command;
8
+ /** `status [type]` — show deployment status. */
9
+ export declare function createStatusCommand(): Command;
10
+ /** `logs [type]` — view deployment logs. */
11
+ export declare function createLogsCommand(): Command;
12
+ /** `delete <type>` — delete a deployment. */
13
+ export declare function createDeleteCommand(): Command;
14
+ /** `scale <type> <instances>` — scale a deployment. */
15
+ export declare function createScaleCommand(): Command;
16
+ /** `env` — manage environment variables (get/set/unset). */
17
+ export declare function createEnvCommand(): Command;
18
+ /** `whoami` — show current channel information. */
19
+ export declare function createWhoamiCommand(): Command;