@hed-hog/cli 0.0.87 → 0.0.90
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 +1 -1
- package/dist/src/modules/developer/developer.service.d.ts +1 -0
- package/dist/src/modules/developer/developer.service.js +18 -14
- package/dist/src/modules/developer/developer.service.js.map +1 -1
- package/dist/src/modules/hedhog/hedhog.service.js +6 -7
- package/dist/src/modules/hedhog/hedhog.service.js.map +1 -1
- package/dist/src/modules/hedhog/services/file-system.service.d.ts +1 -0
- package/dist/src/modules/hedhog/services/file-system.service.js +38 -0
- package/dist/src/modules/hedhog/services/file-system.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -13,6 +13,7 @@ export declare class DeveloperService {
|
|
|
13
13
|
private readonly database;
|
|
14
14
|
private readonly hedHogService;
|
|
15
15
|
private verbose;
|
|
16
|
+
private readonly processedSharedWidgets;
|
|
16
17
|
private readonly bootstrapIgnoredEntries;
|
|
17
18
|
constructor(runner: RunnerService, fileSystem: FileSystemService, database: DatabaseService, hedHogService: HedHogService);
|
|
18
19
|
log(...args: any[]): void;
|
|
@@ -35,6 +35,7 @@ let DeveloperService = class DeveloperService {
|
|
|
35
35
|
database;
|
|
36
36
|
hedHogService;
|
|
37
37
|
verbose = false;
|
|
38
|
+
processedSharedWidgets = new Set();
|
|
38
39
|
bootstrapIgnoredEntries = new Set([
|
|
39
40
|
'.git',
|
|
40
41
|
'node_modules',
|
|
@@ -3401,25 +3402,28 @@ temp
|
|
|
3401
3402
|
else {
|
|
3402
3403
|
this.log(chalk.yellow(`Frontend public assets folder not found at ${publicSourcePath}`));
|
|
3403
3404
|
}
|
|
3404
|
-
// Copy dashboard widgets
|
|
3405
|
+
// Copy shared dashboard widgets back into the correct library by filename prefix
|
|
3405
3406
|
const widgetsSourcePath = pathModule.join(cwd, 'apps', 'admin', 'src', 'app', '(app)', '(libraries)', 'core', 'dashboard', 'components', 'widgets');
|
|
3406
|
-
const
|
|
3407
|
+
const librariesRootPath = pathModule.join(cwd, 'libraries');
|
|
3407
3408
|
if (await this.fileSystem.exists(widgetsSourcePath)) {
|
|
3408
|
-
this.
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
this.
|
|
3409
|
+
if (!this.processedSharedWidgets.has(widgetsSourcePath)) {
|
|
3410
|
+
this.processedSharedWidgets.add(widgetsSourcePath);
|
|
3411
|
+
this.log(`Found shared widgets at ${widgetsSourcePath}, exporting files by prefix to each library...`);
|
|
3412
|
+
try {
|
|
3413
|
+
spinner.text = 'Copying shared widgets to libraries...';
|
|
3414
|
+
const copiedWidgetsCount = await this.fileSystem.copyPrefixedFilesToLibrariesWithEjsExtension(widgetsSourcePath, librariesRootPath, ['hedhog', 'frontend', 'widgets']);
|
|
3415
|
+
if (copiedWidgetsCount > 0) {
|
|
3416
|
+
this.log(chalk.green(`${copiedWidgetsCount} widget(s) copied successfully to their library frontend/widgets directories`));
|
|
3417
|
+
}
|
|
3418
|
+
else {
|
|
3419
|
+
this.log(chalk.yellow(`No prefixed widgets found to export from ${widgetsSourcePath}`));
|
|
3420
|
+
}
|
|
3414
3421
|
}
|
|
3415
|
-
|
|
3416
|
-
this.log(chalk.
|
|
3422
|
+
catch (error) {
|
|
3423
|
+
this.log(chalk.red(`Error copying widgets: ${error.message}`));
|
|
3424
|
+
throw error;
|
|
3417
3425
|
}
|
|
3418
3426
|
}
|
|
3419
|
-
catch (error) {
|
|
3420
|
-
this.log(chalk.red(`Error copying widgets: ${error.message}`));
|
|
3421
|
-
throw error;
|
|
3422
|
-
}
|
|
3423
3427
|
}
|
|
3424
3428
|
else {
|
|
3425
3429
|
this.log(chalk.yellow(`Widgets folder not found at ${widgetsSourcePath}`));
|