@forgecart/cli 1.1.0 → 2.1.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 (181) 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 +39 -2
  8. package/dist/src/commands/init.js +173 -301
  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 +88 -0
  25. package/templates/storefront/src/app/globals.css +13 -0
  26. package/templates/storefront/src/app/layout.tsx +32 -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 +61 -0
  30. package/templates/storefront/src/app/products/page.tsx +27 -0
  31. package/templates/storefront/src/components/Header.tsx +47 -0
  32. package/templates/storefront/src/components/ProductCard.tsx +40 -0
  33. package/templates/storefront/src/components/ProductPurchase.tsx +91 -0
  34. package/templates/storefront/src/lib/cart-actions.ts +148 -0
  35. package/templates/storefront/src/lib/cart-context.tsx +88 -0
  36. package/templates/storefront/src/lib/forgecart.ts +187 -0
  37. package/{dist/templates/storefront-additions → templates/storefront}/tailwind.config.js +1 -1
  38. package/templates/storefront/tsconfig.json +23 -0
  39. package/LICENSE +0 -21
  40. package/README.md +0 -179
  41. package/bin/forgecart.js +0 -3
  42. package/dist/package.json +0 -50
  43. package/dist/src/cli.d.ts.map +0 -1
  44. package/dist/src/commands/delete.d.ts +0 -3
  45. package/dist/src/commands/delete.d.ts.map +0 -1
  46. package/dist/src/commands/delete.js +0 -60
  47. package/dist/src/commands/delete.js.map +0 -1
  48. package/dist/src/commands/deploy.d.ts +0 -3
  49. package/dist/src/commands/deploy.d.ts.map +0 -1
  50. package/dist/src/commands/deploy.js +0 -243
  51. package/dist/src/commands/deploy.js.map +0 -1
  52. package/dist/src/commands/env.d.ts +0 -3
  53. package/dist/src/commands/env.d.ts.map +0 -1
  54. package/dist/src/commands/env.js +0 -158
  55. package/dist/src/commands/env.js.map +0 -1
  56. package/dist/src/commands/init.d.ts.map +0 -1
  57. package/dist/src/commands/list.d.ts +0 -3
  58. package/dist/src/commands/list.d.ts.map +0 -1
  59. package/dist/src/commands/list.js +0 -65
  60. package/dist/src/commands/list.js.map +0 -1
  61. package/dist/src/commands/login.d.ts +0 -3
  62. package/dist/src/commands/login.d.ts.map +0 -1
  63. package/dist/src/commands/login.js +0 -120
  64. package/dist/src/commands/login.js.map +0 -1
  65. package/dist/src/commands/logs.d.ts +0 -3
  66. package/dist/src/commands/logs.d.ts.map +0 -1
  67. package/dist/src/commands/logs.js +0 -88
  68. package/dist/src/commands/logs.js.map +0 -1
  69. package/dist/src/commands/scale.d.ts +0 -3
  70. package/dist/src/commands/scale.d.ts.map +0 -1
  71. package/dist/src/commands/scale.js +0 -49
  72. package/dist/src/commands/scale.js.map +0 -1
  73. package/dist/src/commands/status.d.ts +0 -3
  74. package/dist/src/commands/status.d.ts.map +0 -1
  75. package/dist/src/commands/status.js +0 -90
  76. package/dist/src/commands/status.js.map +0 -1
  77. package/dist/src/commands/whoami.d.ts +0 -3
  78. package/dist/src/commands/whoami.d.ts.map +0 -1
  79. package/dist/src/commands/whoami.js +0 -59
  80. package/dist/src/commands/whoami.js.map +0 -1
  81. package/dist/src/index.d.ts +0 -3
  82. package/dist/src/index.d.ts.map +0 -1
  83. package/dist/src/index.js +0 -5
  84. package/dist/src/index.js.map +0 -1
  85. package/dist/src/lib/api-client.d.ts +0 -34
  86. package/dist/src/lib/api-client.d.ts.map +0 -1
  87. package/dist/src/lib/api-client.js +0 -141
  88. package/dist/src/lib/api-client.js.map +0 -1
  89. package/dist/src/lib/archive.d.ts +0 -9
  90. package/dist/src/lib/archive.d.ts.map +0 -1
  91. package/dist/src/lib/archive.js +0 -118
  92. package/dist/src/lib/archive.js.map +0 -1
  93. package/dist/src/lib/config-updater.d.ts +0 -10
  94. package/dist/src/lib/config-updater.d.ts.map +0 -1
  95. package/dist/src/lib/config-updater.js +0 -34
  96. package/dist/src/lib/config-updater.js.map +0 -1
  97. package/dist/src/lib/config.d.ts +0 -53
  98. package/dist/src/lib/config.d.ts.map +0 -1
  99. package/dist/src/lib/config.js +0 -162
  100. package/dist/src/lib/config.js.map +0 -1
  101. package/dist/src/lib/env-sync.d.ts +0 -44
  102. package/dist/src/lib/env-sync.d.ts.map +0 -1
  103. package/dist/src/lib/env-sync.js +0 -207
  104. package/dist/src/lib/env-sync.js.map +0 -1
  105. package/dist/src/lib/logger.d.ts +0 -15
  106. package/dist/src/lib/logger.d.ts.map +0 -1
  107. package/dist/src/lib/logger.js +0 -54
  108. package/dist/src/lib/logger.js.map +0 -1
  109. package/dist/src/lib/nx-generator.d.ts +0 -22
  110. package/dist/src/lib/nx-generator.d.ts.map +0 -1
  111. package/dist/src/lib/nx-generator.js +0 -345
  112. package/dist/src/lib/nx-generator.js.map +0 -1
  113. package/dist/src/lib/standalone.d.ts +0 -28
  114. package/dist/src/lib/standalone.d.ts.map +0 -1
  115. package/dist/src/lib/standalone.js +0 -107
  116. package/dist/src/lib/standalone.js.map +0 -1
  117. package/dist/src/types/index.d.ts +0 -80
  118. package/dist/src/types/index.d.ts.map +0 -1
  119. package/dist/src/types/index.js +0 -14
  120. package/dist/src/types/index.js.map +0 -1
  121. package/dist/src/utils/spinner.d.ts +0 -16
  122. package/dist/src/utils/spinner.d.ts.map +0 -1
  123. package/dist/src/utils/spinner.js +0 -88
  124. package/dist/src/utils/spinner.js.map +0 -1
  125. package/dist/src/utils/validation.d.ts +0 -12
  126. package/dist/src/utils/validation.d.ts.map +0 -1
  127. package/dist/src/utils/validation.js +0 -82
  128. package/dist/src/utils/validation.js.map +0 -1
  129. package/dist/templates/application-additions/.forgecartignore +0 -37
  130. package/dist/templates/application-additions/Procfile +0 -1
  131. package/dist/templates/application-additions/src/app/app.module.ts +0 -16
  132. package/dist/templates/application-additions/src/services/forgecart.service.ts +0 -62
  133. package/dist/templates/application-additions/src/services/index.ts +0 -2
  134. package/dist/templates/application-additions/src/services/product-event-listener.service.ts +0 -150
  135. package/dist/templates/application-e2e-additions/src/support/global-setup.ts +0 -16
  136. package/dist/templates/application-e2e-additions/src/support/test-setup.ts +0 -9
  137. package/dist/templates/storefront-additions/.forgecartignore +0 -64
  138. package/dist/templates/storefront-additions/Procfile +0 -1
  139. package/dist/templates/storefront-additions/package.json +0 -11
  140. package/dist/templates/storefront-additions/postcss.config.js +0 -5
  141. package/dist/templates/storefront-additions/src/app/cart/page.tsx +0 -77
  142. package/dist/templates/storefront-additions/src/app/global.css +0 -1
  143. package/dist/templates/storefront-additions/src/app/layout.tsx +0 -25
  144. package/dist/templates/storefront-additions/src/app/page.tsx +0 -43
  145. package/dist/templates/storefront-additions/src/components/AddToCartButton.tsx +0 -29
  146. package/dist/templates/storefront-additions/src/components/CartItem.tsx +0 -82
  147. package/dist/templates/storefront-additions/src/components/Header.tsx +0 -42
  148. package/dist/templates/storefront-additions/src/components/ProductCard.tsx +0 -57
  149. package/dist/templates/storefront-additions/src/components/QuantitySelector.tsx +0 -35
  150. package/dist/templates/storefront-additions/src/context/CartContext.tsx +0 -158
  151. package/dist/templates/storefront-additions/src/lib/forgecart.ts +0 -22
  152. package/dist/templates/storefront-e2e-additions/playwright.config.ts +0 -26
  153. package/dist/templates/storefront-e2e-additions/src/example.spec.ts +0 -11
  154. package/dist/templates/workspace/.nxignore +0 -2
  155. package/templates/application-additions/.forgecartignore +0 -37
  156. package/templates/application-additions/Procfile +0 -1
  157. package/templates/application-additions/src/app/app.module.ts +0 -16
  158. package/templates/application-additions/src/services/forgecart.service.ts +0 -62
  159. package/templates/application-additions/src/services/index.ts +0 -2
  160. package/templates/application-additions/src/services/product-event-listener.service.ts +0 -150
  161. package/templates/application-e2e-additions/src/support/global-setup.ts +0 -16
  162. package/templates/application-e2e-additions/src/support/test-setup.ts +0 -9
  163. package/templates/storefront-additions/.forgecartignore +0 -64
  164. package/templates/storefront-additions/Procfile +0 -1
  165. package/templates/storefront-additions/package.json +0 -11
  166. package/templates/storefront-additions/postcss.config.js +0 -5
  167. package/templates/storefront-additions/src/app/cart/page.tsx +0 -77
  168. package/templates/storefront-additions/src/app/global.css +0 -1
  169. package/templates/storefront-additions/src/app/layout.tsx +0 -25
  170. package/templates/storefront-additions/src/app/page.tsx +0 -43
  171. package/templates/storefront-additions/src/components/AddToCartButton.tsx +0 -29
  172. package/templates/storefront-additions/src/components/CartItem.tsx +0 -82
  173. package/templates/storefront-additions/src/components/Header.tsx +0 -42
  174. package/templates/storefront-additions/src/components/ProductCard.tsx +0 -57
  175. package/templates/storefront-additions/src/components/QuantitySelector.tsx +0 -35
  176. package/templates/storefront-additions/src/context/CartContext.tsx +0 -158
  177. package/templates/storefront-additions/src/lib/forgecart.ts +0 -22
  178. package/templates/storefront-additions/tailwind.config.js +0 -8
  179. package/templates/storefront-e2e-additions/playwright.config.ts +0 -26
  180. package/templates/storefront-e2e-additions/src/example.spec.ts +0 -11
  181. package/templates/workspace/.nxignore +0 -2
@@ -1,345 +0,0 @@
1
- import { spawn } from 'child_process';
2
- import * as path from 'path';
3
- import * as fs from 'fs';
4
- import logger from './logger.js';
5
- export const DEFAULT_NX_VERSION = '21.2.0';
6
- async function runCommand(command, args, cwd, silent = false) {
7
- return new Promise((resolve) => {
8
- const child = spawn(command, args, {
9
- cwd,
10
- shell: true,
11
- // Use 'ignore' for stdin to prevent waiting for input, inherit stdout/stderr
12
- stdio: silent ? 'pipe' : ['ignore', 'inherit', 'inherit'],
13
- env: {
14
- ...process.env,
15
- NX_DAEMON: 'false', // Disable Nx daemon to avoid cross-project issues
16
- CI: 'true', // Tell Nx we're in CI mode to avoid interactive prompts
17
- },
18
- });
19
- let output = '';
20
- let error = '';
21
- if (silent) {
22
- child.stdout?.on('data', (data) => {
23
- output += data.toString();
24
- });
25
- child.stderr?.on('data', (data) => {
26
- error += data.toString();
27
- });
28
- }
29
- child.on('close', (code) => {
30
- resolve({
31
- success: code === 0,
32
- output,
33
- error,
34
- });
35
- });
36
- child.on('error', (err) => {
37
- resolve({
38
- success: false,
39
- output,
40
- error: err.message,
41
- });
42
- });
43
- });
44
- }
45
- /**
46
- * Get the NX version from the project's package.json
47
- */
48
- function getNxVersion(projectRoot) {
49
- const packageJsonPath = path.join(projectRoot, 'package.json');
50
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
51
- // nx version is in devDependencies
52
- const nxVersion = packageJson.devDependencies?.nx || packageJson.dependencies?.nx;
53
- // Remove ^ or ~ prefix if present
54
- return nxVersion?.replace(/^[\^~]/, '') || 'latest';
55
- }
56
- export async function createNxWorkspace(projectName, targetDir, nxVersion = DEFAULT_NX_VERSION) {
57
- logger.info(`Creating NX workspace: ${projectName} (NX v${nxVersion})`);
58
- const result = await runCommand('npx', [
59
- `create-nx-workspace@${nxVersion}`,
60
- projectName,
61
- '--preset=apps',
62
- '--nxCloud=skip',
63
- '--packageManager=npm',
64
- ], targetDir);
65
- if (!result.success) {
66
- logger.error('Failed to create NX workspace');
67
- return false;
68
- }
69
- // Create tsconfig.base.json if it doesn't exist (required by @nx/next generator)
70
- const projectPath = path.join(targetDir, projectName);
71
- const tsconfigPath = path.join(projectPath, 'tsconfig.base.json');
72
- if (!fs.existsSync(tsconfigPath)) {
73
- const tsconfigContent = {
74
- compileOnSave: false,
75
- compilerOptions: {
76
- rootDir: '.',
77
- sourceMap: true,
78
- declaration: false,
79
- moduleResolution: 'node',
80
- emitDecoratorMetadata: true,
81
- experimentalDecorators: true,
82
- importHelpers: true,
83
- target: 'es2015',
84
- module: 'esnext',
85
- lib: ['es2020', 'dom'],
86
- skipLibCheck: true,
87
- skipDefaultLibCheck: true,
88
- baseUrl: '.',
89
- paths: {},
90
- },
91
- exclude: ['node_modules', 'tmp'],
92
- };
93
- fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfigContent, null, 2));
94
- logger.info('Created tsconfig.base.json');
95
- }
96
- // Copy workspace-level templates (like .nxignore)
97
- const templatesDir = getCliTemplatesDir();
98
- const workspaceTemplatesDir = path.join(templatesDir, 'workspace');
99
- if (fs.existsSync(workspaceTemplatesDir)) {
100
- copyTemplateFiles(workspaceTemplatesDir, projectPath);
101
- logger.debug('Copied workspace templates');
102
- }
103
- return true;
104
- }
105
- export async function generateNextApp(appName, projectRoot) {
106
- // Get the NX version from the workspace package.json
107
- const nxVersion = getNxVersion(projectRoot);
108
- // Install all required @nx/* plugins at the SAME version to avoid conflicts
109
- logger.info('Installing @nx plugins...');
110
- const plugins = [
111
- `@nx/next@${nxVersion}`,
112
- `@nx/react@${nxVersion}`,
113
- `@nx/jest@${nxVersion}`,
114
- `@nx/playwright@${nxVersion}`,
115
- `@nx/eslint@${nxVersion}`,
116
- ];
117
- const installResult = await runCommand('npm', ['install', '--save-dev', ...plugins], projectRoot);
118
- if (!installResult.success) {
119
- logger.error('Failed to install @nx plugins');
120
- return false;
121
- }
122
- logger.info(`Generating Next.js application: ${appName}`);
123
- const result = await runCommand('npx', [
124
- 'nx',
125
- 'g',
126
- '@nx/next:application',
127
- appName,
128
- '--directory=apps/' + appName,
129
- '--style=css',
130
- '--appDir=true',
131
- '--linter=eslint',
132
- '--e2eTestRunner=playwright',
133
- '--unitTestRunner=jest',
134
- '--src=true',
135
- ], projectRoot);
136
- if (!result.success) {
137
- logger.error('Failed to generate Next.js application');
138
- return false;
139
- }
140
- return true;
141
- }
142
- export async function generateNestApp(appName, projectRoot) {
143
- // Get the NX version from the workspace package.json
144
- const nxVersion = getNxVersion(projectRoot);
145
- // Install all required @nx/* plugins at the SAME version to avoid conflicts
146
- logger.info('Installing @nx plugins...');
147
- const plugins = [
148
- `@nx/nest@${nxVersion}`,
149
- `@nx/node@${nxVersion}`,
150
- `@nx/jest@${nxVersion}`,
151
- `@nx/eslint@${nxVersion}`,
152
- ];
153
- const installResult = await runCommand('npm', ['install', '--save-dev', ...plugins], projectRoot);
154
- if (!installResult.success) {
155
- logger.error('Failed to install @nx plugins');
156
- return false;
157
- }
158
- logger.info(`Generating NestJS application: ${appName}`);
159
- const result = await runCommand('npx', [
160
- 'nx',
161
- 'g',
162
- '@nx/nest:application',
163
- '--name=' + appName,
164
- '--directory=apps/' + appName,
165
- '--linter=eslint',
166
- '--e2eTestRunner=jest',
167
- '--unitTestRunner=jest',
168
- ], projectRoot);
169
- if (!result.success) {
170
- logger.error('Failed to generate NestJS application');
171
- return false;
172
- }
173
- return true;
174
- }
175
- export async function installDependency(packageName, projectRoot, dev = false) {
176
- logger.info(`Installing ${packageName}`);
177
- const args = ['install', packageName];
178
- if (dev) {
179
- args.push('--save-dev');
180
- }
181
- const result = await runCommand('npm', args, projectRoot);
182
- if (!result.success) {
183
- logger.error(`Failed to install ${packageName}`);
184
- return false;
185
- }
186
- return true;
187
- }
188
- export async function runNxBuild(appName, projectRoot) {
189
- logger.info(`Building ${appName}`);
190
- // Use npm run to ensure correct project context
191
- const result = await runCommand('npm', ['run', `build:${appName}`], projectRoot);
192
- if (!result.success) {
193
- logger.error(`Failed to build ${appName}`);
194
- return false;
195
- }
196
- return true;
197
- }
198
- export async function runNxBuildMany(appNames, projectRoot) {
199
- logger.info(`Building ${appNames.join(', ')}`);
200
- // Use nx run-many to build multiple projects
201
- const projects = appNames.join(',');
202
- const result = await runCommand('npx', ['nx', 'run-many', '--target=build', `--projects=${projects}`], projectRoot);
203
- if (!result.success) {
204
- logger.error(`Failed to build projects`);
205
- return false;
206
- }
207
- return true;
208
- }
209
- export function copyTemplateFiles(templateDir, targetDir, overwrite = true) {
210
- if (!fs.existsSync(templateDir)) {
211
- return;
212
- }
213
- const files = getAllFiles(templateDir);
214
- for (const file of files) {
215
- const relativePath = path.relative(templateDir, file);
216
- const targetPath = path.join(targetDir, relativePath);
217
- const targetDirPath = path.dirname(targetPath);
218
- if (!fs.existsSync(targetDirPath)) {
219
- fs.mkdirSync(targetDirPath, { recursive: true });
220
- }
221
- if (overwrite || !fs.existsSync(targetPath)) {
222
- fs.copyFileSync(file, targetPath);
223
- logger.debug(`Copied: ${relativePath}`);
224
- }
225
- }
226
- }
227
- function getAllFiles(dir) {
228
- const files = [];
229
- const items = fs.readdirSync(dir, { withFileTypes: true });
230
- for (const item of items) {
231
- const fullPath = path.join(dir, item.name);
232
- if (item.isDirectory()) {
233
- files.push(...getAllFiles(fullPath));
234
- }
235
- else {
236
- files.push(fullPath);
237
- }
238
- }
239
- return files;
240
- }
241
- export function addPackageScripts(projectRoot, withApplication) {
242
- const packageJsonPath = path.join(projectRoot, 'package.json');
243
- if (!fs.existsSync(packageJsonPath)) {
244
- logger.warn('package.json not found, skipping scripts addition');
245
- return;
246
- }
247
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
248
- packageJson.scripts = {
249
- ...packageJson.scripts,
250
- start: 'nx run storefront:dev',
251
- dev: 'npm start',
252
- 'dev:storefront': 'nx run storefront:dev',
253
- build: 'nx run-many --target=build',
254
- 'build:storefront': 'nx run storefront:build',
255
- test: 'nx run-many --target=test',
256
- lint: 'nx run-many --target=lint',
257
- e2e: 'nx run storefront-e2e:e2e',
258
- };
259
- if (withApplication) {
260
- packageJson.scripts['start:all'] =
261
- 'npx nx run-many --targets=dev,serve --projects=storefront,application --parallel';
262
- packageJson.scripts['dev:application'] = 'nx run application:serve';
263
- packageJson.scripts['build:application'] = 'nx run application:build';
264
- }
265
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
266
- logger.info('Added convenience scripts to package.json');
267
- }
268
- export function getCliTemplatesDir() {
269
- // When running from CLI package, templates can be in different locations:
270
- // 1. Development: apps/cli/templates (relative to src/lib)
271
- // 2. Installed: dist/templates (relative to dist/lib)
272
- const currentFileUrl = new URL(import.meta.url);
273
- const currentFilePath = currentFileUrl.pathname;
274
- const libDir = path.dirname(currentFilePath);
275
- // Try dist/templates first (installed package)
276
- const distTemplatesPath = path.resolve(libDir, '..', 'templates');
277
- if (fs.existsSync(distTemplatesPath)) {
278
- return distTemplatesPath;
279
- }
280
- // Try apps/cli/templates (development)
281
- const devTemplatesPath = path.resolve(libDir, '..', '..', 'templates');
282
- if (fs.existsSync(devTemplatesPath)) {
283
- return devTemplatesPath;
284
- }
285
- // Fallback - try to find templates directory
286
- logger.warn('Templates directory not found, using fallback path');
287
- return devTemplatesPath;
288
- }
289
- /**
290
- * Create .env file with actual values from init config
291
- */
292
- export function createEnvFile(targetDir, type, config) {
293
- const envPath = path.join(targetDir, '.env');
294
- let content;
295
- if (type === 'storefront') {
296
- content = `# ForgeCart API Configuration
297
- NEXT_PUBLIC_FORGECART_API_URL=${config.apiUrl}
298
- NEXT_PUBLIC_FORGECART_CHANNEL_TOKEN=${config.channelToken}
299
- `;
300
- }
301
- else {
302
- content = `# Server Configuration
303
- PORT=8080
304
- NODE_ENV=development
305
-
306
- # ForgeCart API Configuration
307
- FORGECART_API_URL=${config.apiUrl}
308
- FORGECART_CHANNEL_TOKEN=${config.channelToken}
309
-
310
- # ForgeCart Admin Credentials (optional - for event listeners)
311
- # If not set, product event listeners will be skipped
312
- # FORGECART_ADMIN_USERNAME=your-admin-username
313
- # FORGECART_ADMIN_PASSWORD=your-admin-password
314
- `;
315
- }
316
- fs.writeFileSync(envPath, content);
317
- logger.debug(`Created .env in ${targetDir}`);
318
- }
319
- /**
320
- * Append .env patterns to .gitignore if not already present
321
- */
322
- export function appendEnvPatternsToGitignore(projectRoot) {
323
- const gitignorePath = path.join(projectRoot, '.gitignore');
324
- const envPatterns = `
325
- # Environment files
326
- .env
327
- .env.local
328
- .env.*.local
329
- `;
330
- if (fs.existsSync(gitignorePath)) {
331
- const content = fs.readFileSync(gitignorePath, 'utf-8');
332
- // Check if .env patterns are already present
333
- if (!content.includes('# Environment files') &&
334
- !content.includes('.env.local')) {
335
- fs.appendFileSync(gitignorePath, envPatterns);
336
- logger.debug('Added .env patterns to .gitignore');
337
- }
338
- }
339
- else {
340
- // Create .gitignore with env patterns
341
- fs.writeFileSync(gitignorePath, envPatterns.trim() + '\n');
342
- logger.debug('Created .gitignore with .env patterns');
343
- }
344
- }
345
- //# sourceMappingURL=nx-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nx-generator.js","sourceRoot":"","sources":["../../../src/lib/nx-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAA;AAQ1C,KAAK,UAAU,UAAU,CACvB,OAAe,EACf,IAAc,EACd,GAAW,EACX,MAAM,GAAG,KAAK;IAEd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE;YACjC,GAAG;YACH,KAAK,EAAE,IAAI;YACX,6EAA6E;YAC7E,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;YACzD,GAAG,EAAE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,qBAAqB,CAAC;YACxC,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAC/B,CAAC;YACD,EAAE,CAAC,cAAc,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;YAC7C,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAA;QACnD,CAAC;IACH,CAAC;SAAM,CAAC;QACN,sCAAsC;QACtC,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,WAAW,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAA;IACvD,CAAC;AACH,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Prepares a Next.js standalone deployment by copying static and public files
3
- * to the correct location within the standalone output directory.
4
- *
5
- * In an Nx monorepo, the standalone output structure is:
6
- * .next/standalone/apps/storefront/server.js
7
- *
8
- * The server looks for static files relative to its location, so we need to copy:
9
- * - .next/static -> .next/standalone/apps/storefront/.next/static
10
- * - public -> .next/standalone/apps/storefront/public
11
- */
12
- export declare function prepareStandaloneDeployment(appDir: string): Promise<void>;
13
- /**
14
- * Prepares a NestJS application deployment by copying the built output
15
- * and required files to a deployment staging directory.
16
- *
17
- * In an Nx monorepo, the build output is at dist/apps/application/
18
- * We create a staging directory with:
19
- * - Built JS files from dist/apps/application
20
- * - Procfile from apps/application
21
- * - .env file from apps/application or project root
22
- *
23
- * @param appDir - The application source directory (apps/application)
24
- * @param projectRoot - The project root directory
25
- * @returns The path to the deployment staging directory
26
- */
27
- export declare function prepareApplicationDeployment(appDir: string, projectRoot: string): Promise<string>;
28
- //# sourceMappingURL=standalone.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../src/lib/standalone.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAgDjB"}
@@ -1,107 +0,0 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- /**
4
- * Prepares a Next.js standalone deployment by copying static and public files
5
- * to the correct location within the standalone output directory.
6
- *
7
- * In an Nx monorepo, the standalone output structure is:
8
- * .next/standalone/apps/storefront/server.js
9
- *
10
- * The server looks for static files relative to its location, so we need to copy:
11
- * - .next/static -> .next/standalone/apps/storefront/.next/static
12
- * - public -> .next/standalone/apps/storefront/public
13
- */
14
- export async function prepareStandaloneDeployment(appDir) {
15
- const nextDir = path.join(appDir, '.next');
16
- const standaloneDir = path.join(nextDir, 'standalone');
17
- // In Nx monorepo, standalone output is at .next/standalone/apps/storefront/
18
- const standaloneAppDir = path.join(standaloneDir, 'apps', 'storefront');
19
- if (!fs.existsSync(standaloneAppDir)) {
20
- throw new Error('Standalone build not found. Ensure next.config.js has output: "standalone"');
21
- }
22
- // Copy static files: .next/static -> .next/standalone/apps/storefront/.next/static
23
- const staticSrc = path.join(nextDir, 'static');
24
- const staticDest = path.join(standaloneAppDir, '.next', 'static');
25
- if (fs.existsSync(staticSrc)) {
26
- copyDirSync(staticSrc, staticDest);
27
- }
28
- // Copy public files: public -> .next/standalone/apps/storefront/public
29
- const publicSrc = path.join(appDir, 'public');
30
- const publicDest = path.join(standaloneAppDir, 'public');
31
- if (fs.existsSync(publicSrc)) {
32
- copyDirSync(publicSrc, publicDest);
33
- }
34
- }
35
- /**
36
- * Prepares a NestJS application deployment by copying the built output
37
- * and required files to a deployment staging directory.
38
- *
39
- * In an Nx monorepo, the build output is at dist/apps/application/
40
- * We create a staging directory with:
41
- * - Built JS files from dist/apps/application
42
- * - Procfile from apps/application
43
- * - .env file from apps/application or project root
44
- *
45
- * @param appDir - The application source directory (apps/application)
46
- * @param projectRoot - The project root directory
47
- * @returns The path to the deployment staging directory
48
- */
49
- export async function prepareApplicationDeployment(appDir, projectRoot) {
50
- const distDir = path.join(projectRoot, 'dist', 'apps', 'application');
51
- // Use .forgecart directory at project root to avoid Nx detecting it as a duplicate project
52
- const deployDir = path.join(projectRoot, '.forgecart', 'application-deploy');
53
- // Check if build output exists
54
- if (!fs.existsSync(distDir)) {
55
- throw new Error('Application build not found. Run the build first or check dist/apps/application exists.');
56
- }
57
- // Clean and create deploy directory
58
- if (fs.existsSync(deployDir)) {
59
- fs.rmSync(deployDir, { recursive: true });
60
- }
61
- fs.mkdirSync(deployDir, { recursive: true });
62
- // Copy built files from dist/apps/application
63
- copyDirSync(distDir, deployDir);
64
- // Remove project.json if copied (causes Nx duplicate project error)
65
- const projectJsonPath = path.join(deployDir, 'project.json');
66
- if (fs.existsSync(projectJsonPath)) {
67
- fs.unlinkSync(projectJsonPath);
68
- }
69
- // Copy Procfile
70
- const procfileSrc = path.join(appDir, 'Procfile');
71
- if (fs.existsSync(procfileSrc)) {
72
- fs.copyFileSync(procfileSrc, path.join(deployDir, 'Procfile'));
73
- }
74
- else {
75
- throw new Error('Procfile not found in application directory');
76
- }
77
- // Copy .env file - check app dir first, then project root
78
- const envSrcApp = path.join(appDir, '.env');
79
- const envSrcRoot = path.join(projectRoot, '.env');
80
- const envDest = path.join(deployDir, '.env');
81
- if (fs.existsSync(envSrcApp)) {
82
- fs.copyFileSync(envSrcApp, envDest);
83
- }
84
- else if (fs.existsSync(envSrcRoot)) {
85
- fs.copyFileSync(envSrcRoot, envDest);
86
- }
87
- // .env is optional - don't throw if not found
88
- return deployDir;
89
- }
90
- /**
91
- * Recursively copies a directory and its contents.
92
- */
93
- function copyDirSync(src, dest) {
94
- fs.mkdirSync(dest, { recursive: true });
95
- const entries = fs.readdirSync(src, { withFileTypes: true });
96
- for (const entry of entries) {
97
- const srcPath = path.join(src, entry.name);
98
- const destPath = path.join(dest, entry.name);
99
- if (entry.isDirectory()) {
100
- copyDirSync(srcPath, destPath);
101
- }
102
- else {
103
- fs.copyFileSync(srcPath, destPath);
104
- }
105
- }
106
- }
107
- //# sourceMappingURL=standalone.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../../src/lib/standalone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAc;IAEd,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1C,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAEtD,4EAA4E;IAC5E,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC,CAAA;IAEvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAA;IACH,CAAC;IAED,mFAAmF;IACnF,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC9C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;IAEjE,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7B,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IACpC,CAAC;IAED,uEAAuE;IACvE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IAExD,IAA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C,IAAI,CAAC,CAAA;QAE5C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QAChC,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,80 +0,0 @@
1
- export interface ForgecartConfig {
2
- version: string;
3
- channelToken: string;
4
- apiUrl: string;
5
- hasApplication: boolean;
6
- storefrontPath: string;
7
- applicationPath?: string;
8
- }
9
- export declare enum DeploymentType {
10
- STOREFRONT = "storefront",
11
- APPLICATION = "application"
12
- }
13
- export declare enum DeploymentStatus {
14
- PENDING = "PENDING",
15
- STAGING = "STAGING",
16
- RUNNING = "RUNNING",
17
- ERROR = "ERROR",
18
- STOPPED = "STOPPED"
19
- }
20
- export interface Deployment {
21
- id: string;
22
- type: DeploymentType;
23
- status: DeploymentStatus;
24
- url: string | null;
25
- instances: number;
26
- lastDeployedAt: string | null;
27
- errorMessage: string | null;
28
- }
29
- export interface ChannelInfo {
30
- id: string;
31
- code: string;
32
- name: string;
33
- domain: string;
34
- hasApplication: boolean;
35
- applicationName: string | null;
36
- }
37
- export interface DeploymentEnv {
38
- key: string;
39
- value: string;
40
- }
41
- export interface DeploymentLogEntry {
42
- timestamp: string;
43
- message: string;
44
- type: string;
45
- }
46
- export interface InitOptions {
47
- projectName?: string;
48
- channelToken?: string;
49
- withApplication?: boolean;
50
- apiUrl?: string;
51
- nxVersion?: string;
52
- }
53
- export interface DeployOptions {
54
- type?: DeploymentType;
55
- }
56
- export interface ScaleOptions {
57
- type: DeploymentType;
58
- instances: number;
59
- }
60
- export interface EnvGetOptions {
61
- type: DeploymentType;
62
- }
63
- export interface EnvSetOptions {
64
- type: DeploymentType;
65
- key: string;
66
- value: string;
67
- }
68
- export interface EnvUnsetOptions {
69
- type: DeploymentType;
70
- key: string;
71
- }
72
- export interface LogsOptions {
73
- type: DeploymentType;
74
- follow?: boolean;
75
- }
76
- export interface DeleteOptions {
77
- type: DeploymentType;
78
- force?: boolean;
79
- }
80
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,oBAAY,cAAc;IACxB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAED,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,gBAAgB,CAAA;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,cAAc,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB"}
@@ -1,14 +0,0 @@
1
- export var DeploymentType;
2
- (function (DeploymentType) {
3
- DeploymentType["STOREFRONT"] = "storefront";
4
- DeploymentType["APPLICATION"] = "application";
5
- })(DeploymentType || (DeploymentType = {}));
6
- export var DeploymentStatus;
7
- (function (DeploymentStatus) {
8
- DeploymentStatus["PENDING"] = "PENDING";
9
- DeploymentStatus["STAGING"] = "STAGING";
10
- DeploymentStatus["RUNNING"] = "RUNNING";
11
- DeploymentStatus["ERROR"] = "ERROR";
12
- DeploymentStatus["STOPPED"] = "STOPPED";
13
- })(DeploymentStatus || (DeploymentStatus = {}));
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,6CAA2B,CAAA;AAC7B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,uCAAmB,CAAA;AACrB,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B"}
@@ -1,16 +0,0 @@
1
- import { Ora } from 'ora';
2
- export declare function createSpinner(text: string): Ora;
3
- export declare function withSpinner<T>(text: string, successText: string, failText: string, fn: () => Promise<T>): Promise<T>;
4
- interface DeploymentLogEntry {
5
- timestamp: string;
6
- message: string;
7
- }
8
- /**
9
- * Displays a spinner with inline log streaming below it.
10
- * Logs are displayed as they arrive from the subscription.
11
- */
12
- export declare function withSpinnerAndLogs<T>(text: string, successText: string, failText: string, fn: () => Promise<T>, logStream?: AsyncIterableIterator<{
13
- deploymentLogs: DeploymentLogEntry;
14
- }>, onCancel?: () => void): Promise<T>;
15
- export {};
16
- //# sourceMappingURL=spinner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/utils/spinner.ts"],"names":[],"mappings":"AACA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAK/C;AAED,wBAAsB,WAAW,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EACxC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAAE,cAAc,EAAE,kBAAkB,CAAA;CAAE,CAAC,EACzE,QAAQ,CAAC,EAAE,MAAM,IAAI,GACpB,OAAO,CAAC,CAAC,CAAC,CAgEZ"}