adminforth 1.3.54-next.10 → 1.3.54-next.12

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.
@@ -478,12 +478,20 @@ class CodeInjector {
478
478
  process.env.HEAVY_DEBUG && console.log('🪲Hash file does not exist, proceeding with npm ci/install');
479
479
  }
480
480
  yield this.runNpmShell({ command: 'ci', cwd: CodeInjector.SPA_TMP_PATH });
481
- if (iconPackageNames.length) {
482
- const npmInstallCommand = `install ${[
483
- ...iconPackageNames,
484
- ...usersPackages,
485
- ...pluginPackages.map(({ packages }) => packages.join(' ')),
486
- ].join(' ')}`;
481
+ const allPacks = [
482
+ ...iconPackageNames,
483
+ ...usersPackages,
484
+ ...pluginPackages.map(({ packages }) => packages.join(' ')),
485
+ ];
486
+ const EXCLUDE_PACKS = ['@iconify-prerendered/vue-flowbite'];
487
+ const allPacksFiltered = allPacks.filter((pack) => {
488
+ // split at last @ because of scoped packages
489
+ const packName = pack.split('@').slice(0, -1).join('@');
490
+ return !EXCLUDE_PACKS.includes(packName);
491
+ });
492
+ const allPacksUnique = Array.from(new Set(allPacksFiltered));
493
+ if (allPacks.length) {
494
+ const npmInstallCommand = `install ${allPacksUnique.join(' ')}`;
487
495
  yield this.runNpmShell({ command: npmInstallCommand, cwd: CodeInjector.SPA_TMP_PATH });
488
496
  }
489
497
  yield fs.promises.writeFile(hashPath, fullHash);
@@ -551,13 +551,23 @@ class CodeInjector implements ICodeInjector {
551
551
  }
552
552
 
553
553
  await this.runNpmShell({command: 'ci', cwd: CodeInjector.SPA_TMP_PATH});
554
-
555
- if (iconPackageNames.length) {
556
- const npmInstallCommand = `install ${[
557
- ...iconPackageNames,
558
- ...usersPackages,
559
- ...pluginPackages.map(({ packages }) => packages.join(' ')),
560
- ].join(' ')}`;
554
+
555
+ const allPacks = [
556
+ ...iconPackageNames,
557
+ ...usersPackages,
558
+ ...pluginPackages.map(({ packages }) => packages.join(' ')),
559
+ ];
560
+ const EXCLUDE_PACKS = ['@iconify-prerendered/vue-flowbite'];
561
+
562
+ const allPacksFiltered = allPacks.filter((pack) => {
563
+ // split at last @ because of scoped packages
564
+ const packName = pack.split('@').slice(0, -1).join('@');
565
+ return !EXCLUDE_PACKS.includes(packName);
566
+ })
567
+ const allPacksUnique = Array.from(new Set(allPacksFiltered));
568
+
569
+ if (allPacks.length) {
570
+ const npmInstallCommand = `install ${allPacksUnique.join(' ')}`;
561
571
  await this.runNpmShell({command: npmInstallCommand, cwd: CodeInjector.SPA_TMP_PATH});
562
572
  }
563
573
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.3.54-next.10",
3
+ "version": "1.3.54-next.12",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@ import { initFlowbite } from 'flowbite';
21
21
  const visualValue = computed(() => {
22
22
  // if lenght is more then 8, show only first 4 and last 4 characters, ... in the middle
23
23
  const val = props.record[props.column.name];
24
- if (val.length > 8) {
24
+ if (val && val.length > 8) {
25
25
  return `${val.substr(0, 4)}...${val.substr(val.length - 4)}`;
26
26
  }
27
27
  return val;