@hed-hog/cli 0.0.92 → 0.0.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/cli",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "description": "HedHog CLI tool",
5
5
  "author": "HedHog",
6
6
  "private": false,
@@ -14,6 +14,7 @@ export declare class DeveloperService {
14
14
  private readonly hedHogService;
15
15
  private verbose;
16
16
  private readonly processedSharedWidgets;
17
+ private readonly sharedWidgetsPathSegments;
17
18
  private readonly bootstrapIgnoredEntries;
18
19
  constructor(runner: RunnerService, fileSystem: FileSystemService, database: DatabaseService, hedHogService: HedHogService);
19
20
  log(...args: any[]): void;
@@ -36,6 +36,13 @@ let DeveloperService = class DeveloperService {
36
36
  hedHogService;
37
37
  verbose = false;
38
38
  processedSharedWidgets = new Set();
39
+ sharedWidgetsPathSegments = [
40
+ 'apps',
41
+ 'admin',
42
+ 'src',
43
+ 'components',
44
+ 'widgets',
45
+ ];
39
46
  bootstrapIgnoredEntries = new Set([
40
47
  '.git',
41
48
  'node_modules',
@@ -1272,15 +1279,15 @@ CMD ["sh", "-c", "${startCmd}"]
1272
1279
  {
1273
1280
  type: 'input',
1274
1281
  name: 'frontendUrls',
1275
- message: 'Enter FRONTEND_URLS for frontend runtime (optional, comma-separated if needed):',
1282
+ message: 'Enter FRONTEND_URL for API runtime (optional):',
1276
1283
  default: (answers) => answers.domain ? `https://${String(answers.domain).trim()}` : '',
1277
1284
  filter: (input) => String(input || '').trim(),
1278
- when: (answers) => (answers.apps || []).includes('admin'),
1285
+ when: (answers) => (answers.apps || []).includes('api'),
1279
1286
  },
1280
1287
  {
1281
1288
  type: 'input',
1282
1289
  name: 'apiDomain',
1283
- message: 'Enter the API external URL (used for ADMIN_API_BASE_URL):',
1290
+ message: 'Enter the API URL for admin runtime (used for NEXT_PUBLIC_API_BASE_URL and INTERNAL_API_URL):',
1284
1291
  default: (answers) => {
1285
1292
  const domain = String(answers.domain || '').trim();
1286
1293
  const appName = String(answers.appName || '').trim();
@@ -1293,13 +1300,12 @@ CMD ["sh", "-c", "${startCmd}"]
1293
1300
  },
1294
1301
  filter: (input) => String(input || '').trim(),
1295
1302
  validate: (input) => String(input || '').trim().length > 0 || 'API domain is required',
1296
- when: (answers) => (answers.apps || []).includes('admin') &&
1297
- String(answers.domain || '').trim().length > 0,
1303
+ when: (answers) => (answers.apps || []).includes('admin'),
1298
1304
  },
1299
1305
  {
1300
1306
  type: 'input',
1301
1307
  name: 'jwtExpiresIn',
1302
- message: 'JWT token expiry for API (API_JWT_EXPIRES_IN):',
1308
+ message: 'JWT token expiry for API (JWT_EXPIRES_IN):',
1303
1309
  default: '7d',
1304
1310
  filter: (input) => String(input || '').trim(),
1305
1311
  validate: (input) => String(input || '').trim().length > 0 || 'JWT expiry is required',
@@ -1692,7 +1698,7 @@ temp
1692
1698
  console.log(chalk.white('Domain: ') + chalk.cyan(config.domain));
1693
1699
  }
1694
1700
  if (config.frontendUrls) {
1695
- console.log(chalk.white('Frontend URLs: ') + chalk.cyan(config.frontendUrls));
1701
+ console.log(chalk.white('Frontend URL: ') + chalk.cyan(config.frontendUrls));
1696
1702
  }
1697
1703
  console.log(chalk.white('Apps: ') + chalk.cyan(config.apps.join(', ')));
1698
1704
  console.log(chalk.white('Replicas: ') +
@@ -2741,7 +2747,7 @@ temp
2741
2747
  await this.fileSystem.remove(frontendPublicLibrariesPath);
2742
2748
  this.log(chalk.blue(`Removed directory: ${frontendPublicLibrariesPath}`));
2743
2749
  }
2744
- const frontendWidgetsPath = pathModule.join(cwd, 'apps', 'admin', 'src', 'app', '(app)', '(libraries)', 'core', 'dashboard', 'components', 'widgets');
2750
+ const frontendWidgetsPath = pathModule.join(cwd, ...this.sharedWidgetsPathSegments);
2745
2751
  if ((0, fs_1.existsSync)(frontendWidgetsPath)) {
2746
2752
  await this.fileSystem.remove(frontendWidgetsPath);
2747
2753
  this.log(chalk.blue(`Removed directory: ${frontendWidgetsPath}`));
@@ -3462,8 +3468,8 @@ temp
3462
3468
  else {
3463
3469
  this.log(chalk.yellow(`Frontend public assets folder not found at ${publicSourcePath}`));
3464
3470
  }
3465
- // Copy shared dashboard widgets back into the correct library by filename prefix
3466
- const widgetsSourcePath = pathModule.join(cwd, 'apps', 'admin', 'src', 'app', '(app)', '(libraries)', 'core', 'dashboard', 'components', 'widgets');
3471
+ // Copy shared widgets back into the correct library by filename prefix
3472
+ const widgetsSourcePath = pathModule.join(cwd, ...this.sharedWidgetsPathSegments);
3467
3473
  const librariesRootPath = pathModule.join(cwd, 'libraries');
3468
3474
  if (await this.fileSystem.exists(widgetsSourcePath)) {
3469
3475
  if (!this.processedSharedWidgets.has(widgetsSourcePath)) {