@spartan-ng/cli 0.0.1-alpha.390 → 0.0.1-alpha.391

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 (47) hide show
  1. package/generators.json +10 -0
  2. package/package.json +2 -1
  3. package/src/generators/healthcheck/compat.d.ts +2 -0
  4. package/src/generators/healthcheck/compat.js +6 -0
  5. package/src/generators/healthcheck/compat.js.map +1 -0
  6. package/src/generators/healthcheck/generator.d.ts +4 -0
  7. package/src/generators/healthcheck/generator.js +46 -0
  8. package/src/generators/healthcheck/generator.js.map +1 -0
  9. package/src/generators/healthcheck/healthchecks/brain-imports.d.ts +2 -0
  10. package/src/generators/healthcheck/healthchecks/brain-imports.js +34 -0
  11. package/src/generators/healthcheck/healthchecks/brain-imports.js.map +1 -0
  12. package/src/generators/healthcheck/healthchecks/core-imports.d.ts +2 -0
  13. package/src/generators/healthcheck/healthchecks/core-imports.js +30 -0
  14. package/src/generators/healthcheck/healthchecks/core-imports.js.map +1 -0
  15. package/src/generators/healthcheck/healthchecks/hlm-icon.d.ts +2 -0
  16. package/src/generators/healthcheck/healthchecks/hlm-icon.js +30 -0
  17. package/src/generators/healthcheck/healthchecks/hlm-icon.js.map +1 -0
  18. package/src/generators/healthcheck/healthchecks/hlm-scroll-area.d.ts +2 -0
  19. package/src/generators/healthcheck/healthchecks/hlm-scroll-area.js +30 -0
  20. package/src/generators/healthcheck/healthchecks/hlm-scroll-area.js.map +1 -0
  21. package/src/generators/healthcheck/healthchecks/version.d.ts +2 -0
  22. package/src/generators/healthcheck/healthchecks/version.js +66 -0
  23. package/src/generators/healthcheck/healthchecks/version.js.map +1 -0
  24. package/src/generators/healthcheck/healthchecks.d.ts +74 -0
  25. package/src/generators/healthcheck/healthchecks.js +22 -0
  26. package/src/generators/healthcheck/healthchecks.js.map +1 -0
  27. package/src/generators/healthcheck/schema.d.ts +4 -0
  28. package/src/generators/healthcheck/schema.json +19 -0
  29. package/src/generators/healthcheck/utils/prompt.d.ts +1 -0
  30. package/src/generators/healthcheck/utils/prompt.js +23 -0
  31. package/src/generators/healthcheck/utils/prompt.js.map +1 -0
  32. package/src/generators/healthcheck/utils/reporter.d.ts +2 -0
  33. package/src/generators/healthcheck/utils/reporter.js +39 -0
  34. package/src/generators/healthcheck/utils/reporter.js.map +1 -0
  35. package/src/generators/healthcheck/utils/runner.d.ts +3 -0
  36. package/src/generators/healthcheck/utils/runner.js +32 -0
  37. package/src/generators/healthcheck/utils/runner.js.map +1 -0
  38. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +0 -1
  39. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +0 -1
  40. package/src/generators/ui/libs/ui-checkbox-helm/files/index.ts.template +1 -3
  41. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +29 -22
  42. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog.service.ts.template +2 -3
  43. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.directive.ts.template +1 -6
  44. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +1 -1
  45. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +7 -6
  46. package/src/generators/ui/supported-ui-libraries.json +36 -36
  47. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +0 -35
package/generators.json CHANGED
@@ -29,6 +29,11 @@
29
29
  "factory": "./src/generators/migrate-core/generator",
30
30
  "schema": "./src/generators/migrate-core/schema.json",
31
31
  "description": "Migrate core library to brain core entrypoing"
32
+ },
33
+ "healthcheck": {
34
+ "factory": "./src/generators/healthcheck/generator",
35
+ "schema": "./src/generators/healthcheck/schema.json",
36
+ "description": "Run a healthcheck on the project to identify any potential issues or outdated code."
32
37
  }
33
38
  },
34
39
  "schematics": {
@@ -61,6 +66,11 @@
61
66
  "factory": "./src/generators/migrate-scroll-area/compat",
62
67
  "schema": "./src/generators/migrate-core/schema.json",
63
68
  "description": "Migrate core library to brain core entrypoing"
69
+ },
70
+ "healthcheck": {
71
+ "factory": "./src/generators/healthcheck/compat",
72
+ "schema": "./src/generators/healthcheck/schema.json",
73
+ "description": "Run a healthcheck on the project to identify any potential issues or outdated code."
64
74
  }
65
75
  }
66
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/cli",
3
- "version": "0.0.1-alpha.390",
3
+ "version": "0.0.1-alpha.391",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@nx/angular": ">=20.0.0",
@@ -10,6 +10,7 @@
10
10
  "enquirer": "2.3.6",
11
11
  "jsonc-eslint-parser": "^2.1.0",
12
12
  "nx": ">=20.0.0",
13
+ "picocolors": "^1.1.1",
13
14
  "semver": "7.5.4",
14
15
  "typescript": ">=5.0.0"
15
16
  },
@@ -0,0 +1,2 @@
1
+ declare const _default: (generatorOptions: import("./schema").HealthcheckGeneratorSchema) => (tree: any, context: any) => Promise<any>;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const generator_1 = require("./generator");
5
+ exports.default = (0, devkit_1.convertNxGenerator)(generator_1.healthcheckGenerator);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/compat.ts"],"names":[],"mappings":";;AAAA,uCAAgD;AAChD,2CAAmD;AAEnD,kBAAe,IAAA,2BAAkB,EAAC,gCAAoB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { HealthcheckGeneratorSchema } from './schema';
3
+ export declare function healthcheckGenerator(tree: Tree, options: HealthcheckGeneratorSchema): Promise<void>;
4
+ export default healthcheckGenerator;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.healthcheckGenerator = healthcheckGenerator;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const healthchecks_1 = require("./healthchecks");
6
+ const brain_imports_1 = require("./healthchecks/brain-imports");
7
+ const core_imports_1 = require("./healthchecks/core-imports");
8
+ const hlm_icon_1 = require("./healthchecks/hlm-icon");
9
+ const hlm_scroll_area_1 = require("./healthchecks/hlm-scroll-area");
10
+ const version_1 = require("./healthchecks/version");
11
+ const prompt_1 = require("./utils/prompt");
12
+ const reporter_1 = require("./utils/reporter");
13
+ const runner_1 = require("./utils/runner");
14
+ async function healthcheckGenerator(tree, options) {
15
+ devkit_1.logger.info('Running healthchecks...');
16
+ const healthchecks = [
17
+ version_1.versionHealthcheck,
18
+ brain_imports_1.brainImportsHealthcheck,
19
+ core_imports_1.coreImportsHealthcheck,
20
+ hlm_icon_1.helmIconHealthcheck,
21
+ hlm_scroll_area_1.scrollAreaHealthcheck,
22
+ ];
23
+ // store all the failed healthchecks that can be fixed
24
+ const failedReports = [];
25
+ for (const healthcheck of healthchecks) {
26
+ const report = await (0, runner_1.runHealthcheck)(tree, healthcheck);
27
+ (0, reporter_1.printReport)(report);
28
+ if (report.status === healthchecks_1.HealthcheckStatus.Failure) {
29
+ failedReports.push(report);
30
+ }
31
+ }
32
+ // if there are some failed healthchecks that can be fixed, ask the user if they want to fix them
33
+ for (const report of failedReports) {
34
+ if (report.fixable && (0, healthchecks_1.isHealthcheckFixable)(report.healthcheck)) {
35
+ const fix = options.autoFix || (await (0, prompt_1.promptUser)(report.healthcheck.prompt));
36
+ if (fix) {
37
+ await report.healthcheck.fix(tree);
38
+ }
39
+ }
40
+ }
41
+ if (!options.skipFormat) {
42
+ await (0, devkit_1.formatFiles)(tree);
43
+ }
44
+ }
45
+ exports.default = healthcheckGenerator;
46
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;AAYA,oDAqCC;AAjDD,uCAAuD;AACvD,iDAAyG;AACzG,gEAAuE;AACvE,8DAAqE;AACrE,sDAA8D;AAC9D,oEAAuE;AACvE,oDAA4D;AAE5D,2CAA4C;AAC5C,+CAA+C;AAC/C,2CAAgD;AAEzC,KAAK,UAAU,oBAAoB,CAAC,IAAU,EAAE,OAAmC;IACzF,eAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAEvC,MAAM,YAAY,GAAkB;QACnC,4BAAkB;QAClB,uCAAuB;QACvB,qCAAsB;QACtB,8BAAmB;QACnB,uCAAqB;KACrB,CAAC;IAEF,sDAAsD;IACtD,MAAM,aAAa,GAAwB,EAAE,CAAC;IAE9C,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAc,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvD,IAAA,sBAAW,EAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,MAAM,CAAC,MAAM,KAAK,gCAAiB,CAAC,OAAO,EAAE,CAAC;YACjD,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACF,CAAC;IAED,iGAAiG;IACjG,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,OAAO,IAAI,IAAA,mCAAoB,EAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;YAChE,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,MAAM,IAAA,mBAAU,EAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAE7E,IAAI,GAAG,EAAE,CAAC;gBACT,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACzB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const brainImportsHealthcheck: Healthcheck;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.brainImportsHealthcheck = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const generator_1 = require("../../migrate-brain-imports/generator");
7
+ const import_map_1 = tslib_1.__importDefault(require("../../migrate-brain-imports/import-map"));
8
+ const healthchecks_1 = require("../healthchecks");
9
+ exports.brainImportsHealthcheck = {
10
+ name: 'Brain imports',
11
+ async detect(tree, failure) {
12
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
13
+ // if the file is a .ts or .json file, check for brain imports/packages
14
+ if (!file.endsWith('.ts') || file.endsWith('.json')) {
15
+ return;
16
+ }
17
+ const contents = tree.read(file, 'utf-8');
18
+ if (!contents) {
19
+ return;
20
+ }
21
+ for (const [importPath, brainPackage] of Object.entries(import_map_1.default)) {
22
+ if (contents.includes(importPath)) {
23
+ failure(`The import ${importPath} is deprecated. Please use the ${brainPackage} package instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
24
+ }
25
+ }
26
+ });
27
+ },
28
+ fix: async (tree) => {
29
+ await (0, generator_1.migrateBrainImportsGenerator)(tree, { skipFormat: true });
30
+ return true;
31
+ },
32
+ prompt: 'Would you like to migrate brain imports?',
33
+ };
34
+ //# sourceMappingURL=brain-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brain-imports.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/brain-imports.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,qEAAqF;AACrF,gGAA+D;AAC/D,kDAAmE;AAEtD,QAAA,uBAAuB,GAAgB;IACnD,IAAI,EAAE,eAAe;IACrB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,uEAAuE;YACvE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACrD,OAAO;YACR,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,oBAAS,CAAC,EAAE,CAAC;gBACpE,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBACnC,OAAO,CACN,cAAc,UAAU,kCAAkC,YAAY,mBAAmB,EACzF,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;gBACH,CAAC;YACF,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,IAAA,wCAA4B,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,0CAA0C;CAClD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const coreImportsHealthcheck: Healthcheck;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.coreImportsHealthcheck = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = require("../../migrate-core/generator");
6
+ const healthchecks_1 = require("../healthchecks");
7
+ exports.coreImportsHealthcheck = {
8
+ name: 'Core imports',
9
+ async detect(tree, failure) {
10
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
11
+ // if the file is a .ts file, check for core imports
12
+ if (!file.endsWith('.ts')) {
13
+ return;
14
+ }
15
+ const contents = tree.read(file, 'utf-8');
16
+ if (!contents) {
17
+ return;
18
+ }
19
+ if (contents.includes('@spartan-ng/ui-core')) {
20
+ failure(`The import @spartan-ng/ui-core is deprecated. Please use the @spartan-ng/brain/core package instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
21
+ }
22
+ });
23
+ },
24
+ fix: async (tree) => {
25
+ await (0, generator_1.migrateCoreGenerator)(tree, { skipFormat: true });
26
+ return true;
27
+ },
28
+ prompt: 'Would you like to migrate core imports?',
29
+ };
30
+ //# sourceMappingURL=core-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-imports.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/core-imports.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,4DAAoE;AACpE,kDAAmE;AAEtD,QAAA,sBAAsB,GAAgB;IAClD,IAAI,EAAE,cAAc;IACpB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,oDAAoD;YACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC3B,OAAO;YACR,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;gBAC9C,OAAO,CACN,sGAAsG,EACtG,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,IAAA,gCAAoB,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,yCAAyC;CACjD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const helmIconHealthcheck: Healthcheck;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.helmIconHealthcheck = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = require("../../migrate-icon/generator");
6
+ const healthchecks_1 = require("../healthchecks");
7
+ exports.helmIconHealthcheck = {
8
+ name: 'Helm Icons',
9
+ async detect(tree, failure) {
10
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
11
+ // if the file is a .ts or .htlm file, check for helm icons
12
+ if (!file.endsWith('.ts') && !file.endsWith('.html')) {
13
+ return;
14
+ }
15
+ const contents = tree.read(file, 'utf-8');
16
+ if (!contents) {
17
+ return;
18
+ }
19
+ if (contents.includes('<hlm-icon')) {
20
+ failure(`The <hlm-icon> component is deprecated. Please use the <ng-icon hlm> instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
21
+ }
22
+ });
23
+ },
24
+ fix: async (tree) => {
25
+ await (0, generator_1.migrateIconGenerator)(tree, { skipFormat: true });
26
+ return true;
27
+ },
28
+ prompt: 'Would you like to migrate helm icons?',
29
+ };
30
+ //# sourceMappingURL=hlm-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hlm-icon.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/hlm-icon.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,4DAAoE;AACpE,kDAAmE;AAEtD,QAAA,mBAAmB,GAAgB;IAC/C,IAAI,EAAE,YAAY;IAClB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,2DAA2D;YAC3D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtD,OAAO;YACR,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,OAAO,CACN,+EAA+E,EAC/E,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,IAAA,gCAAoB,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,uCAAuC;CAC/C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const scrollAreaHealthcheck: Healthcheck;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scrollAreaHealthcheck = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = require("../../migrate-scroll-area/generator");
6
+ const healthchecks_1 = require("../healthchecks");
7
+ exports.scrollAreaHealthcheck = {
8
+ name: 'Helm Scroll Area',
9
+ async detect(tree, failure) {
10
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
11
+ // if the file is a .ts or .htlm file, check for helm icons
12
+ if (!file.endsWith('.ts') && !file.endsWith('.html')) {
13
+ return;
14
+ }
15
+ const contents = tree.read(file, 'utf-8');
16
+ if (!contents) {
17
+ return;
18
+ }
19
+ if (contents.includes('<hlm-scroll-area')) {
20
+ failure(`The <hlm-scroll-area> component is deprecated. Please use the <ng-scrollbar hlm> instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
21
+ }
22
+ });
23
+ },
24
+ fix: async (tree) => {
25
+ await (0, generator_1.migrateScrollAreaGenerator)(tree, { skipFormat: true });
26
+ return true;
27
+ },
28
+ prompt: 'Would you like to migrate helm scroll areas?',
29
+ };
30
+ //# sourceMappingURL=hlm-scroll-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hlm-scroll-area.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/hlm-scroll-area.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,mEAAiF;AACjF,kDAAmE;AAEtD,QAAA,qBAAqB,GAAgB;IACjD,IAAI,EAAE,kBAAkB;IACxB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,2DAA2D;YAC3D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtD,OAAO;YACR,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBAC3C,OAAO,CACN,2FAA2F,EAC3F,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,IAAA,sCAA0B,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,8CAA8C;CACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const versionHealthcheck: Healthcheck;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.versionHealthcheck = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const semver = tslib_1.__importStar(require("semver"));
7
+ const healthchecks_1 = require("../healthchecks");
8
+ exports.versionHealthcheck = {
9
+ name: 'Spartan - Dependency Check',
10
+ async detect(tree, failure, skip) {
11
+ // If there is no package.json, skip this healthcheck
12
+ if (!tree.exists('package.json')) {
13
+ skip('No package.json found.');
14
+ return;
15
+ }
16
+ // read the package.json
17
+ const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
18
+ // merge the dependencies and devDependencies
19
+ const dependencies = { ...packageJson.dependencies, ...packageJson.devDependencies };
20
+ const dependenciesToCheck = ['@spartan-ng/brain', '@spartan-ng/cli'];
21
+ for (const dep of dependenciesToCheck) {
22
+ if (!dependencies[dep]) {
23
+ failure(`The dependency ${dep} is not installed.`, healthchecks_1.HealthcheckSeverity.Error, true);
24
+ continue;
25
+ }
26
+ const installedVersion = dependencies[dep];
27
+ // check if the installed version is the latest version
28
+ const request = await fetch(`https://registry.npmjs.org/${dep}/latest`);
29
+ if (!request.ok) {
30
+ failure(`Failed to fetch metadata for ${dep}.`, healthchecks_1.HealthcheckSeverity.Error, false);
31
+ continue;
32
+ }
33
+ const metadata = (await request.json());
34
+ if (!semver.satisfies(metadata.version, installedVersion)) {
35
+ failure(`The installed version of ${dep} is not the latest version. The latest version is ${metadata.version}.`, healthchecks_1.HealthcheckSeverity.Warning, true);
36
+ continue;
37
+ }
38
+ }
39
+ },
40
+ fix: async (tree) => {
41
+ const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
42
+ const dependencies = { ...packageJson.dependencies, ...packageJson.devDependencies };
43
+ const dependenciesToCheck = ['@spartan-ng/brain', '@spartan-ng/cli'];
44
+ for (const dep of dependenciesToCheck) {
45
+ if (!dependencies[dep]) {
46
+ return false;
47
+ }
48
+ const request = await fetch(`https://registry.npmjs.org/${dep}/latest`);
49
+ if (!request.ok) {
50
+ return false;
51
+ }
52
+ const metadata = (await request.json());
53
+ // update the dependency to the latest version in the respective section
54
+ if (packageJson.dependencies[dep]) {
55
+ packageJson.dependencies[dep] = `^${metadata.version}`;
56
+ }
57
+ else {
58
+ packageJson.devDependencies[dep] = `^${metadata.version}`;
59
+ }
60
+ }
61
+ tree.write('package.json', JSON.stringify(packageJson, null, 2));
62
+ return true;
63
+ },
64
+ prompt: 'Would you like to update to the latest versions of the dependencies?',
65
+ };
66
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/version.ts"],"names":[],"mappings":";;;;AAAA,uCAAsC;AAEtC,uDAAiC;AACjC,kDAAmE;AAEtD,QAAA,kBAAkB,GAAgB;IAC9C,IAAI,EAAE,4BAA4B;IAClC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI;QAC/B,qDAAqD;QACrD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC/B,OAAO;QACR,CAAC;QAED,wBAAwB;QACxB,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAEnD,6CAA6C;QAC7C,MAAM,YAAY,GAAG,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;QAErF,MAAM,mBAAmB,GAAG,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;QAErE,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;gBACxB,OAAO,CAAC,kBAAkB,GAAG,oBAAoB,EAAE,kCAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACpF,SAAS;YACV,CAAC;YAED,MAAM,gBAAgB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YAE3C,uDAAuD;YACvD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,8BAA8B,GAAG,SAAS,CAAC,CAAC;YAExE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,CAAC,gCAAgC,GAAG,GAAG,EAAE,kCAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAClF,SAAS;YACV,CAAC;YAED,MAAM,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAgB,CAAC;YAEvD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAE,CAAC;gBAC3D,OAAO,CACN,4BAA4B,GAAG,qDAAqD,QAAQ,CAAC,OAAO,GAAG,EACvG,kCAAmB,CAAC,OAAO,EAC3B,IAAI,CACJ,CAAC;gBACF,SAAS;YACV,CAAC;QACF,CAAC;IACF,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;QACrF,MAAM,mBAAmB,GAAG,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;QAErE,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;gBACxB,OAAO,KAAK,CAAC;YACd,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,8BAA8B,GAAG,SAAS,CAAC,CAAC;YAExE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,KAAK,CAAC;YACd,CAAC;YAED,MAAM,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAgB,CAAC;YAEvD,wEAAwE;YACxE,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACP,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC3D,CAAC;QACF,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAEjE,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,sEAAsE;CAC9E,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export type Healthcheck = StandardHealthcheck | FixableHealthcheck;
3
+ interface StandardHealthcheck {
4
+ /**
5
+ * The name of the healthcheck.
6
+ */
7
+ name: string;
8
+ /**
9
+ * Determine whether or not anything in the project needs to be fixed.
10
+ */
11
+ detect(tree: Tree, failure: HealthcheckFailureFn, skip: HealthcheckSkippedFn): void | Promise<void>;
12
+ }
13
+ interface FixableHealthcheck extends StandardHealthcheck {
14
+ /**
15
+ * Fix any issues found by the check method. Return true if the issue was fixed, false if it was not.
16
+ */
17
+ fix(tree: Tree): boolean | Promise<boolean>;
18
+ /**
19
+ * The auto fix prompt message.
20
+ */
21
+ prompt: string;
22
+ }
23
+ export declare enum HealthcheckStatus {
24
+ Success = 0,
25
+ Failure = 1,
26
+ Skipped = 2
27
+ }
28
+ export declare enum HealthcheckSeverity {
29
+ Error = 0,
30
+ Warning = 1
31
+ }
32
+ export type HealthcheckFailureFn = (issue: string, severity: HealthcheckSeverity, fixable: boolean) => void;
33
+ export type HealthcheckSkippedFn = (reason: string) => void;
34
+ /**
35
+ * Determine if a healthcheck is fixable.
36
+ */
37
+ export declare function isHealthcheckFixable(healthcheck: Healthcheck): healthcheck is FixableHealthcheck;
38
+ export interface HealthcheckReport {
39
+ /**
40
+ * The name of the healthcheck.
41
+ */
42
+ name: string;
43
+ /**
44
+ * The healthcheck.
45
+ */
46
+ healthcheck: Healthcheck;
47
+ /**
48
+ * The status of the healthcheck.
49
+ */
50
+ status: HealthcheckStatus;
51
+ /**
52
+ * The list of issues that were found by the healthcheck.
53
+ */
54
+ issues?: HealthcheckIssue[];
55
+ /**
56
+ * If the healthcheck was skipped, this message will be displayed to the user.
57
+ */
58
+ reason?: string;
59
+ /**
60
+ * Whether or not the healthcheck can be fixed.
61
+ */
62
+ fixable: boolean;
63
+ }
64
+ export interface HealthcheckIssue {
65
+ /**
66
+ * The details of the issue that was found by the healthcheck.
67
+ */
68
+ details: string;
69
+ /**
70
+ * The severity of the issue.
71
+ */
72
+ severity: HealthcheckSeverity;
73
+ }
74
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthcheckSeverity = exports.HealthcheckStatus = void 0;
4
+ exports.isHealthcheckFixable = isHealthcheckFixable;
5
+ var HealthcheckStatus;
6
+ (function (HealthcheckStatus) {
7
+ HealthcheckStatus[HealthcheckStatus["Success"] = 0] = "Success";
8
+ HealthcheckStatus[HealthcheckStatus["Failure"] = 1] = "Failure";
9
+ HealthcheckStatus[HealthcheckStatus["Skipped"] = 2] = "Skipped";
10
+ })(HealthcheckStatus || (exports.HealthcheckStatus = HealthcheckStatus = {}));
11
+ var HealthcheckSeverity;
12
+ (function (HealthcheckSeverity) {
13
+ HealthcheckSeverity[HealthcheckSeverity["Error"] = 0] = "Error";
14
+ HealthcheckSeverity[HealthcheckSeverity["Warning"] = 1] = "Warning";
15
+ })(HealthcheckSeverity || (exports.HealthcheckSeverity = HealthcheckSeverity = {}));
16
+ /**
17
+ * Determine if a healthcheck is fixable.
18
+ */
19
+ function isHealthcheckFixable(healthcheck) {
20
+ return 'fix' in healthcheck;
21
+ }
22
+ //# sourceMappingURL=healthchecks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthchecks.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/healthchecks.ts"],"names":[],"mappings":";;;AA4CA,oDAEC;AAnBD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,+DAAO,CAAA;IACP,+DAAO,CAAA;IACP,+DAAO,CAAA;AACR,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,+DAAK,CAAA;IACL,mEAAO,CAAA;AACR,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAKD;;GAEG;AACH,SAAgB,oBAAoB,CAAC,WAAwB;IAC5D,OAAO,KAAK,IAAI,WAAW,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface HealthcheckGeneratorSchema {
2
+ autoFix?: boolean;
3
+ skipFormat?: boolean;
4
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "Healthcheck",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "autoFix": {
8
+ "type": "boolean",
9
+ "default": false,
10
+ "description": "Automatically fix any issues"
11
+ },
12
+ "skipFormat": {
13
+ "type": "boolean",
14
+ "default": false,
15
+ "description": "Skip formatting files"
16
+ }
17
+ },
18
+ "required": []
19
+ }
@@ -0,0 +1 @@
1
+ export declare function promptUser(question: string): Promise<boolean>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.promptUser = promptUser;
4
+ function promptUser(question) {
5
+ return new Promise((resolve) => {
6
+ process.stdout.write(`${question} (y/n): `);
7
+ process.stdin.setEncoding('utf8');
8
+ process.stdin.once('data', (data) => {
9
+ const answer = data.toString().trim().toLowerCase();
10
+ if (['yes', 'y'].includes(answer)) {
11
+ resolve(true);
12
+ }
13
+ else if (['no', 'n'].includes(answer)) {
14
+ resolve(false);
15
+ }
16
+ else {
17
+ console.log('Invalid response. Please answer with "yes" or "no".');
18
+ resolve(promptUser(question));
19
+ }
20
+ });
21
+ });
22
+ }
23
+ //# sourceMappingURL=prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/utils/prompt.ts"],"names":[],"mappings":";;AAAA,gCAiBC;AAjBD,SAAgB,UAAU,CAAC,QAAgB;IAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,UAAU,CAAC,CAAC;QAE5C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACpD,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,IAAI,CAAC,CAAC;YACf,CAAC;iBAAM,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;gBACnE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC/B,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { HealthcheckReport } from '../healthchecks';
2
+ export declare function printReport(report: HealthcheckReport): void;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.printReport = printReport;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const picocolors_1 = tslib_1.__importDefault(require("picocolors"));
7
+ const healthchecks_1 = require("../healthchecks");
8
+ function printReport(report) {
9
+ devkit_1.logger.log(`${getStatus(report.status)} ${report.name}`);
10
+ // if this was a failure log the instructions
11
+ if (report.status === healthchecks_1.HealthcheckStatus.Failure) {
12
+ for (const issue of report.issues) {
13
+ devkit_1.logger.log(`\t\t ${getSeverity(issue.severity)} ${issue.details}`);
14
+ }
15
+ }
16
+ // if the healthcheck was skipped, log the reason
17
+ if (report.status === healthchecks_1.HealthcheckStatus.Skipped) {
18
+ devkit_1.logger.log(`\t\t ${picocolors_1.default.yellow(report.reason)}`);
19
+ }
20
+ }
21
+ function getStatus(result) {
22
+ switch (result) {
23
+ case healthchecks_1.HealthcheckStatus.Success:
24
+ return picocolors_1.default.green('[ ✔ ]');
25
+ case healthchecks_1.HealthcheckStatus.Failure:
26
+ return picocolors_1.default.red('[ ✖ ]');
27
+ case healthchecks_1.HealthcheckStatus.Skipped:
28
+ return picocolors_1.default.yellow('[ ! ]');
29
+ }
30
+ }
31
+ function getSeverity(severity) {
32
+ switch (severity) {
33
+ case healthchecks_1.HealthcheckSeverity.Error:
34
+ return picocolors_1.default.red('✖');
35
+ case healthchecks_1.HealthcheckSeverity.Warning:
36
+ return picocolors_1.default.yellow('!');
37
+ }
38
+ }
39
+ //# sourceMappingURL=reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/utils/reporter.ts"],"names":[],"mappings":";;AAIA,kCAcC;;AAlBD,uCAAoC;AACpC,oEAA4B;AAC5B,kDAA4F;AAE5F,SAAgB,WAAW,CAAC,MAAyB;IACpD,eAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAEzD,6CAA6C;IAC7C,IAAI,MAAM,CAAC,MAAM,KAAK,gCAAiB,CAAC,OAAO,EAAE,CAAC;QACjD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YACnC,eAAM,CAAC,GAAG,CAAC,QAAQ,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;IAED,iDAAiD;IACjD,IAAI,MAAM,CAAC,MAAM,KAAK,gCAAiB,CAAC,OAAO,EAAE,CAAC;QACjD,eAAM,CAAC,GAAG,CAAC,QAAQ,oBAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;AACF,CAAC;AAED,SAAS,SAAS,CAAC,MAAyB;IAC3C,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,gCAAiB,CAAC,OAAO;YAC7B,OAAO,oBAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,gCAAiB,CAAC,OAAO;YAC7B,OAAO,oBAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxB,KAAK,gCAAiB,CAAC,OAAO;YAC7B,OAAO,oBAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;AACF,CAAC;AAED,SAAS,WAAW,CAAC,QAA6B;IACjD,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,kCAAmB,CAAC,KAAK;YAC7B,OAAO,oBAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpB,KAAK,kCAAmB,CAAC,OAAO;YAC/B,OAAO,oBAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { Healthcheck, HealthcheckReport } from '../healthchecks';
3
+ export declare function runHealthcheck(tree: Tree, healthcheck: Healthcheck): Promise<HealthcheckReport>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runHealthcheck = runHealthcheck;
4
+ const healthchecks_1 = require("../healthchecks");
5
+ async function runHealthcheck(tree, healthcheck) {
6
+ const report = {
7
+ name: healthcheck.name,
8
+ status: healthchecks_1.HealthcheckStatus.Success,
9
+ fixable: false,
10
+ healthcheck,
11
+ };
12
+ const failure = (details, severity, fixable) => {
13
+ // check if this issue already exists
14
+ if (report.issues?.some((issue) => issue.details === details)) {
15
+ return;
16
+ }
17
+ report.status = healthchecks_1.HealthcheckStatus.Failure;
18
+ report.issues ??= [];
19
+ report.issues.push({ details, severity });
20
+ report.fixable = report.fixable || (fixable && (0, healthchecks_1.isHealthcheckFixable)(healthcheck));
21
+ };
22
+ const skip = (reason) => {
23
+ report.status = healthchecks_1.HealthcheckStatus.Skipped;
24
+ report.reason = reason;
25
+ };
26
+ await coercePromise(healthcheck.detect(tree, failure, skip));
27
+ return report;
28
+ }
29
+ function coercePromise(value) {
30
+ return value instanceof Promise ? value : Promise.resolve(value);
31
+ }
32
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/utils/runner.ts"],"names":[],"mappings":";;AAUA,wCA4BC;AArCD,kDAOyB;AAElB,KAAK,UAAU,cAAc,CAAC,IAAU,EAAE,WAAwB;IACxE,MAAM,MAAM,GAAsB;QACjC,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,MAAM,EAAE,gCAAiB,CAAC,OAAO;QACjC,OAAO,EAAE,KAAK;QACd,WAAW;KACX,CAAC;IAEF,MAAM,OAAO,GAAyB,CAAC,OAAe,EAAE,QAA6B,EAAE,OAAgB,EAAE,EAAE;QAC1G,qCAAqC;QACrC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC,EAAE,CAAC;YAC/D,OAAO;QACR,CAAC;QAED,MAAM,CAAC,MAAM,GAAG,gCAAiB,CAAC,OAAO,CAAC;QAC1C,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,IAAA,mCAAoB,EAAC,WAAW,CAAC,CAAC,CAAC;IACnF,CAAC,CAAC;IAEF,MAAM,IAAI,GAAG,CAAC,MAAc,EAAE,EAAE;QAC/B,MAAM,CAAC,MAAM,GAAG,gCAAiB,CAAC,OAAO,CAAC;QAC1C,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7D,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAI,KAAqB;IAC9C,OAAO,KAAK,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC"}
@@ -17,7 +17,6 @@ import type { ClassValue } from 'clsx';
17
17
  import { HlmCarouselComponent } from './hlm-carousel.component';
18
18
 
19
19
  @Component({
20
- // eslint-disable-next-line @angular-eslint/component-selector
21
20
  selector: 'button[hlm-carousel-next], button[hlmCarouselNext]',
22
21
  standalone: true,
23
22
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -17,7 +17,6 @@ import type { ClassValue } from 'clsx';
17
17
  import { HlmCarouselComponent } from './hlm-carousel.component';
18
18
 
19
19
  @Component({
20
- // eslint-disable-next-line @angular-eslint/component-selector
21
20
  selector: 'button[hlm-carousel-previous], button[hlmCarouselPrevious]',
22
21
  standalone: true,
23
22
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1,12 +1,10 @@
1
1
  import { NgModule } from '@angular/core';
2
2
 
3
- import { HlmCheckboxCheckIconComponent } from './lib/hlm-checkbox-checkicon.component';
4
3
  import { HlmCheckboxComponent } from './lib/hlm-checkbox.component';
5
4
 
6
- export * from './lib/hlm-checkbox-checkicon.component';
7
5
  export * from './lib/hlm-checkbox.component';
8
6
 
9
- export const HlmCheckboxImports = [HlmCheckboxComponent, HlmCheckboxCheckIconComponent] as const;
7
+ export const HlmCheckboxImports = [HlmCheckboxComponent] as const;
10
8
  @NgModule({
11
9
  imports: [...HlmCheckboxImports],
12
10
  exports: [...HlmCheckboxImports],
@@ -1,9 +1,12 @@
1
1
  import { Component, booleanAttribute, computed, forwardRef, input, model, output, signal } from '@angular/core';
2
2
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { NgIcon, provideIcons } from '@ng-icons/core';
4
+ import { lucideCheck } from '@ng-icons/lucide';
3
5
  import { BrnCheckboxComponent } from '@spartan-ng/brain/checkbox';
4
6
  import { hlm } from '@spartan-ng/brain/core';
7
+ import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
8
+ import { HlmIconDirective } from '@spartan-ng/ui-icon-helm';
5
9
  import type { ClassValue } from 'clsx';
6
- import { HlmCheckboxCheckIconComponent } from './hlm-checkbox-checkicon.component';
7
10
 
8
11
  export const HLM_CHECKBOX_VALUE_ACCESSOR = {
9
12
  provide: NG_VALUE_ACCESSOR,
@@ -14,7 +17,7 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
14
17
  @Component({
15
18
  selector: 'hlm-checkbox',
16
19
  standalone: true,
17
- imports: [BrnCheckboxComponent, HlmCheckboxCheckIconComponent],
20
+ imports: [BrnCheckboxComponent, NgIcon, HlmIconDirective],
18
21
  template: `
19
22
  <brn-checkbox
20
23
  [id]="id()"
@@ -27,9 +30,9 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
27
30
  [aria-labelledby]="ariaLabelledby()"
28
31
  [aria-describedby]="ariaDescribedby()"
29
32
  (changed)="_handleChange()"
30
- (touched)="_onTouched()"
33
+ (touched)="_onTouched?.()"
31
34
  >
32
- <hlm-checkbox-checkicon [class]="checkIconClass()" [iconName]="checkIconName()" />
35
+ <ng-icon [class]="_computedIconClass()" hlm size="sm" name="lucideCheck" />
33
36
  </brn-checkbox>
34
37
  `,
35
38
  host: {
@@ -40,10 +43,12 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
40
43
  '[attr.aria-describedby]': 'null',
41
44
  },
42
45
  providers: [HLM_CHECKBOX_VALUE_ACCESSOR],
46
+ viewProviders: [provideIcons({ lucideCheck })],
43
47
  })
44
48
  export class HlmCheckboxComponent {
45
49
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
46
- protected _computedClass = computed(() =>
50
+
51
+ protected readonly _computedClass = computed(() =>
47
52
  hlm(
48
53
  'group inline-flex border border-foreground shrink-0 cursor-pointer items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring' +
49
54
  ' focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:text-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-background',
@@ -52,6 +57,10 @@ export class HlmCheckboxComponent {
52
57
  ),
53
58
  );
54
59
 
60
+ protected readonly _computedIconClass = computed(() =>
61
+ hlm('leading-none group-data-[state=unchecked]:opacity-0', this.checked() === 'indeterminate' ? 'opacity-50' : ''),
62
+ );
63
+
55
64
  /** Used to set the id on the underlying brn element. */
56
65
  public readonly id = input<string | null>(null);
57
66
 
@@ -64,50 +73,46 @@ export class HlmCheckboxComponent {
64
73
  /** Used to set the aria-describedby attribute on the underlying brn element. */
65
74
  public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });
66
75
 
67
- public readonly checked = model<boolean | 'indeterminate'>(false);
76
+ /** The checked state of the checkbox. */
77
+ public readonly checked = model<CheckboxValue>(false);
68
78
 
79
+ /** The name attribute of the checkbox. */
69
80
  public readonly name = input<string | null>(null);
81
+
82
+ /** Whether the checkbox is required. */
70
83
  public readonly required = input(false, { transform: booleanAttribute });
71
84
 
85
+ /** Whether the checkbox is disabled. */
72
86
  public readonly disabled = input(false, { transform: booleanAttribute });
73
87
 
74
88
  protected readonly state = computed(() => ({
75
89
  disabled: signal(this.disabled()),
76
90
  }));
77
91
 
78
- // icon inputs
79
- public readonly checkIconName = input<string>('lucideCheck');
80
- public readonly checkIconClass = input<ClassValue>('');
81
-
82
92
  public readonly changed = output<boolean>();
83
93
 
94
+ protected _onChange?: ChangeFn<CheckboxValue>;
95
+ protected _onTouched?: TouchFn;
96
+
84
97
  protected _handleChange(): void {
85
98
  if (this.state().disabled()) return;
86
99
 
87
100
  const previousChecked = this.checked();
88
101
  this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);
89
- this._onChange(!previousChecked);
102
+ this._onChange?.(!previousChecked);
90
103
  this.changed.emit(!previousChecked);
91
104
  }
92
105
 
93
106
  /** CONROL VALUE ACCESSOR */
94
-
95
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
- writeValue(value: any): void {
107
+ writeValue(value: CheckboxValue): void {
97
108
  this.checked.set(!!value);
98
109
  }
99
- // eslint-disable-next-line @typescript-eslint/no-empty-function,,@typescript-eslint/no-explicit-any
100
- protected _onChange = (_: any) => {};
101
- // eslint-disable-next-line @typescript-eslint/no-empty-function
102
- protected _onTouched = () => {};
103
110
 
104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
- registerOnChange(fn: any): void {
111
+ registerOnChange(fn: ChangeFn<CheckboxValue>): void {
106
112
  this._onChange = fn;
107
113
  }
108
114
 
109
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
- registerOnTouched(fn: any): void {
115
+ registerOnTouched(fn: TouchFn): void {
111
116
  this._onTouched = fn;
112
117
  }
113
118
 
@@ -115,3 +120,5 @@ export class HlmCheckboxComponent {
115
120
  this.state().disabled.set(isDisabled);
116
121
  }
117
122
  }
123
+
124
+ type CheckboxValue = boolean | 'indeterminate';
@@ -9,8 +9,7 @@ import {
9
9
  import { HlmDialogContentComponent } from './hlm-dialog-content.component';
10
10
  import { hlmDialogOverlayClass } from './hlm-dialog-overlay.directive';
11
11
 
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- export type HlmDialogOptions<DialogContext = any> = BrnDialogOptions & {
12
+ export type HlmDialogOptions<DialogContext = unknown> = BrnDialogOptions & {
14
13
  contentClass?: string;
15
14
  context?: DialogContext;
16
15
  };
@@ -28,7 +27,7 @@ export class HlmDialogService {
28
27
 
29
28
  ...(options ?? {}),
30
29
  backdropClass: cssClassesToArray(`${hlmDialogOverlayClass} ${options?.backdropClass ?? ''}`),
31
- context: { ...options?.context, $component: component, $dynamicComponentClass: options?.contentClass },
30
+ context: { ...(options?.context ?? {}), $component: component, $dynamicComponentClass: options?.contentClass },
32
31
  };
33
32
 
34
33
  return this._brnDialogService.open(HlmDialogContentComponent, undefined, mergedOptions.context, mergedOptions);
@@ -1,12 +1,7 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { injectHlmIconConfig } from './hlm-icon.token';
3
3
 
4
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
- const DEFINED_SIZES = ['xs', 'sm', 'base', 'lg', 'xl', 'none'] as const;
6
-
7
- type DefinedSizes = (typeof DEFINED_SIZES)[number];
8
-
9
- export type IconSize = DefinedSizes | (Record<never, never> & string);
4
+ export type IconSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'none' | (Record<never, never> & string);
10
5
 
11
6
  @Directive({
12
7
  selector: 'ng-icon[hlm]',
@@ -40,7 +40,7 @@ export const sheetVariants = cva(
40
40
  <ng-content />
41
41
  <button brnSheetClose hlm>
42
42
  <span class="sr-only">Close</span>
43
- <ng-icon hlm class="flex h-4 w-4" size="100%" name="lucideX" />
43
+ <ng-icon hlm class="flex h-4 w-4" name="lucideX" />
44
44
  </button>
45
45
  `,
46
46
  })
@@ -28,7 +28,7 @@ export const HLM_SWITCH_VALUE_ACCESSOR = {
28
28
  [class]="_computedClass()"
29
29
  [checked]="checked()"
30
30
  (changed)="handleChange($event)"
31
- (touched)="_onTouched()"
31
+ (touched)="_onTouched?.()"
32
32
  [disabled]="disabled()"
33
33
  [id]="id()"
34
34
  [aria-label]="ariaLabel()"
@@ -50,8 +50,10 @@ export class HlmSwitchComponent {
50
50
  ),
51
51
  );
52
52
 
53
+ /** The checked state of the switch. */
53
54
  public readonly checked = model<boolean>(false);
54
55
 
56
+ /** The disabled state of the switch. */
55
57
  public readonly disabled = input<boolean, BooleanInput>(false, {
56
58
  transform: booleanAttribute,
57
59
  });
@@ -68,16 +70,15 @@ export class HlmSwitchComponent {
68
70
  /** Used to set the aria-describedby attribute on the underlying brn element. */
69
71
  public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });
70
72
 
73
+ /** Emits when the checked state of the switch changes. */
71
74
  public readonly changed = output<boolean>();
72
75
 
73
- // eslint-disable-next-line @typescript-eslint/no-empty-function
74
- protected _onChange: ChangeFn<boolean> = () => {};
75
- // eslint-disable-next-line @typescript-eslint/no-empty-function
76
- protected _onTouched: TouchFn = () => {};
76
+ protected _onChange?: ChangeFn<boolean>;
77
+ protected _onTouched?: TouchFn;
77
78
 
78
79
  protected handleChange(value: boolean): void {
79
80
  this.checked.set(value);
80
- this._onChange(value);
81
+ this._onChange?.(value);
81
82
  this.changed.emit(value);
82
83
  }
83
84
 
@@ -5,7 +5,7 @@
5
5
  "@angular/core": ">=18.0.0",
6
6
  "@ng-icons/core": ">=29.0.0",
7
7
  "@ng-icons/lucide": ">=29.0.0",
8
- "@spartan-ng/brain": "0.0.1-alpha.390",
8
+ "@spartan-ng/brain": "0.0.1-alpha.391",
9
9
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
10
10
  "clsx": "^2.1.1"
11
11
  }
@@ -14,7 +14,7 @@
14
14
  "internalName": "ui-alert-helm",
15
15
  "peerDependencies": {
16
16
  "@angular/core": ">=18.0.0",
17
- "@spartan-ng/brain": "0.0.1-alpha.390",
17
+ "@spartan-ng/brain": "0.0.1-alpha.391",
18
18
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
19
19
  "class-variance-authority": "^0.7.0",
20
20
  "clsx": "^2.1.1"
@@ -24,7 +24,7 @@
24
24
  "internalName": "ui-alert-dialog-helm",
25
25
  "peerDependencies": {
26
26
  "@angular/core": ">=18.0.0",
27
- "@spartan-ng/brain": "0.0.1-alpha.390",
27
+ "@spartan-ng/brain": "0.0.1-alpha.391",
28
28
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
29
29
  "clsx": "^2.1.1"
30
30
  }
@@ -34,7 +34,7 @@
34
34
  "peerDependencies": {
35
35
  "@angular/cdk": ">=18.0.0",
36
36
  "@angular/core": ">=18.0.0",
37
- "@spartan-ng/brain": "0.0.1-alpha.390",
37
+ "@spartan-ng/brain": "0.0.1-alpha.391",
38
38
  "clsx": "^2.1.1"
39
39
  }
40
40
  },
@@ -42,7 +42,7 @@
42
42
  "internalName": "ui-avatar-helm",
43
43
  "peerDependencies": {
44
44
  "@angular/core": ">=18.0.0",
45
- "@spartan-ng/brain": "0.0.1-alpha.390",
45
+ "@spartan-ng/brain": "0.0.1-alpha.391",
46
46
  "class-variance-authority": "^0.7.0",
47
47
  "clsx": "^2.1.1"
48
48
  }
@@ -52,7 +52,7 @@
52
52
  "peerDependencies": {
53
53
  "@angular/cdk": ">=18.0.0",
54
54
  "@angular/core": ">=18.0.0",
55
- "@spartan-ng/brain": "0.0.1-alpha.390",
55
+ "@spartan-ng/brain": "0.0.1-alpha.391",
56
56
  "class-variance-authority": "^0.7.0",
57
57
  "clsx": "^2.1.1"
58
58
  }
@@ -64,7 +64,7 @@
64
64
  "@angular/router": "18.2.5",
65
65
  "@ng-icons/core": ">=29.0.0",
66
66
  "@ng-icons/lucide": ">=29.0.0",
67
- "@spartan-ng/brain": "0.0.1-alpha.390",
67
+ "@spartan-ng/brain": "0.0.1-alpha.391",
68
68
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
69
69
  "clsx": "^2.1.1"
70
70
  }
@@ -73,7 +73,7 @@
73
73
  "internalName": "ui-button-helm",
74
74
  "peerDependencies": {
75
75
  "@angular/core": ">=18.0.0",
76
- "@spartan-ng/brain": "0.0.1-alpha.390",
76
+ "@spartan-ng/brain": "0.0.1-alpha.391",
77
77
  "class-variance-authority": "^0.7.0",
78
78
  "clsx": "^2.1.1"
79
79
  }
@@ -85,7 +85,7 @@
85
85
  "@angular/core": ">=18.0.0",
86
86
  "@ng-icons/core": ">=29.0.0",
87
87
  "@ng-icons/lucide": ">=29.0.0",
88
- "@spartan-ng/brain": "0.0.1-alpha.390",
88
+ "@spartan-ng/brain": "0.0.1-alpha.391",
89
89
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
90
90
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381"
91
91
  }
@@ -94,7 +94,7 @@
94
94
  "internalName": "ui-card-helm",
95
95
  "peerDependencies": {
96
96
  "@angular/core": ">=18.0.0",
97
- "@spartan-ng/brain": "0.0.1-alpha.390",
97
+ "@spartan-ng/brain": "0.0.1-alpha.391",
98
98
  "class-variance-authority": "^0.7.0",
99
99
  "clsx": "^2.1.1"
100
100
  }
@@ -103,7 +103,7 @@
103
103
  "internalName": "ui-command-helm",
104
104
  "peerDependencies": {
105
105
  "@angular/core": ">=18.0.0",
106
- "@spartan-ng/brain": "0.0.1-alpha.390",
106
+ "@spartan-ng/brain": "0.0.1-alpha.391",
107
107
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
108
108
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
109
109
  "clsx": "^2.1.1"
@@ -117,7 +117,7 @@
117
117
  "@angular/core": ">=18.0.0",
118
118
  "@ng-icons/core": ">=29.0.0",
119
119
  "@ng-icons/lucide": ">=29.0.0",
120
- "@spartan-ng/brain": "0.0.1-alpha.390",
120
+ "@spartan-ng/brain": "0.0.1-alpha.391",
121
121
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
122
122
  "clsx": "^2.1.1"
123
123
  }
@@ -133,7 +133,7 @@
133
133
  "peerDependencies": {
134
134
  "@angular/core": ">=18.0.0",
135
135
  "@angular/forms": ">=18.0.0",
136
- "@spartan-ng/brain": "0.0.1-alpha.390",
136
+ "@spartan-ng/brain": "0.0.1-alpha.391",
137
137
  "class-variance-authority": "^0.7.0",
138
138
  "clsx": "^2.1.1"
139
139
  }
@@ -142,7 +142,7 @@
142
142
  "internalName": "ui-label-helm",
143
143
  "peerDependencies": {
144
144
  "@angular/core": ">=18.0.0",
145
- "@spartan-ng/brain": "0.0.1-alpha.390",
145
+ "@spartan-ng/brain": "0.0.1-alpha.391",
146
146
  "class-variance-authority": "^0.7.0",
147
147
  "clsx": "^2.1.1"
148
148
  }
@@ -153,7 +153,7 @@
153
153
  "@angular/core": ">=18.0.0",
154
154
  "@ng-icons/core": ">=29.0.0",
155
155
  "@ng-icons/lucide": ">=29.0.0",
156
- "@spartan-ng/brain": "0.0.1-alpha.390",
156
+ "@spartan-ng/brain": "0.0.1-alpha.391",
157
157
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
158
158
  "class-variance-authority": "^0.7.0",
159
159
  "clsx": "^2.1.1"
@@ -163,7 +163,7 @@
163
163
  "internalName": "ui-popover-helm",
164
164
  "peerDependencies": {
165
165
  "@angular/core": ">=18.0.0",
166
- "@spartan-ng/brain": "0.0.1-alpha.390",
166
+ "@spartan-ng/brain": "0.0.1-alpha.391",
167
167
  "clsx": "^2.1.1"
168
168
  }
169
169
  },
@@ -171,7 +171,7 @@
171
171
  "internalName": "ui-progress-helm",
172
172
  "peerDependencies": {
173
173
  "@angular/core": ">=18.0.0",
174
- "@spartan-ng/brain": "0.0.1-alpha.390",
174
+ "@spartan-ng/brain": "0.0.1-alpha.391",
175
175
  "clsx": "^2.1.1"
176
176
  }
177
177
  },
@@ -179,7 +179,7 @@
179
179
  "internalName": "ui-radio-group-helm",
180
180
  "peerDependencies": {
181
181
  "@angular/core": ">=18.0.0",
182
- "@spartan-ng/brain": "0.0.1-alpha.390",
182
+ "@spartan-ng/brain": "0.0.1-alpha.391",
183
183
  "clsx": "^2.1.1"
184
184
  }
185
185
  },
@@ -187,7 +187,7 @@
187
187
  "internalName": "ui-scroll-area-helm",
188
188
  "peerDependencies": {
189
189
  "@angular/core": ">=18.0.0",
190
- "@spartan-ng/brain": "0.0.1-alpha.390",
190
+ "@spartan-ng/brain": "0.0.1-alpha.391",
191
191
  "clsx": "^2.1.1",
192
192
  "ngx-scrollbar": ">=16.0.0"
193
193
  }
@@ -196,7 +196,7 @@
196
196
  "internalName": "ui-separator-helm",
197
197
  "peerDependencies": {
198
198
  "@angular/core": ">=18.0.0",
199
- "@spartan-ng/brain": "0.0.1-alpha.390",
199
+ "@spartan-ng/brain": "0.0.1-alpha.391",
200
200
  "clsx": "^2.1.1"
201
201
  }
202
202
  },
@@ -206,7 +206,7 @@
206
206
  "@angular/core": ">=18.0.0",
207
207
  "@ng-icons/core": ">=29.0.0",
208
208
  "@ng-icons/lucide": ">=29.0.0",
209
- "@spartan-ng/brain": "0.0.1-alpha.390",
209
+ "@spartan-ng/brain": "0.0.1-alpha.391",
210
210
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
211
211
  "class-variance-authority": "^0.7.0",
212
212
  "clsx": "^2.1.1"
@@ -216,7 +216,7 @@
216
216
  "internalName": "ui-skeleton-helm",
217
217
  "peerDependencies": {
218
218
  "@angular/core": ">=18.0.0",
219
- "@spartan-ng/brain": "0.0.1-alpha.390",
219
+ "@spartan-ng/brain": "0.0.1-alpha.391",
220
220
  "clsx": "^2.1.1"
221
221
  }
222
222
  },
@@ -224,7 +224,7 @@
224
224
  "internalName": "ui-spinner-helm",
225
225
  "peerDependencies": {
226
226
  "@angular/core": ">=18.0.0",
227
- "@spartan-ng/brain": "0.0.1-alpha.390",
227
+ "@spartan-ng/brain": "0.0.1-alpha.391",
228
228
  "class-variance-authority": "^0.7.0",
229
229
  "clsx": "^2.1.1"
230
230
  }
@@ -235,7 +235,7 @@
235
235
  "@angular/cdk": ">=18.0.0",
236
236
  "@angular/core": ">=18.0.0",
237
237
  "@angular/forms": ">=18.0.0",
238
- "@spartan-ng/brain": "0.0.1-alpha.390",
238
+ "@spartan-ng/brain": "0.0.1-alpha.391",
239
239
  "clsx": "^2.1.1"
240
240
  }
241
241
  },
@@ -246,7 +246,7 @@
246
246
  "@angular/core": ">=18.0.0",
247
247
  "@ng-icons/core": ">=29.0.0",
248
248
  "@ng-icons/lucide": ">=29.0.0",
249
- "@spartan-ng/brain": "0.0.1-alpha.390",
249
+ "@spartan-ng/brain": "0.0.1-alpha.391",
250
250
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
251
251
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
252
252
  "class-variance-authority": "^0.7.0",
@@ -257,7 +257,7 @@
257
257
  "internalName": "ui-toggle-helm",
258
258
  "peerDependencies": {
259
259
  "@angular/core": ">=18.0.0",
260
- "@spartan-ng/brain": "0.0.1-alpha.390",
260
+ "@spartan-ng/brain": "0.0.1-alpha.391",
261
261
  "class-variance-authority": "^0.7.0",
262
262
  "clsx": "^2.1.1"
263
263
  }
@@ -266,7 +266,7 @@
266
266
  "internalName": "ui-typography-helm",
267
267
  "peerDependencies": {
268
268
  "@angular/core": ">=18.0.0",
269
- "@spartan-ng/brain": "0.0.1-alpha.390",
269
+ "@spartan-ng/brain": "0.0.1-alpha.391",
270
270
  "clsx": "^2.1.1"
271
271
  }
272
272
  },
@@ -275,7 +275,7 @@
275
275
  "peerDependencies": {
276
276
  "@angular/common": ">=18.0.0",
277
277
  "@angular/core": ">=18.0.0",
278
- "@spartan-ng/brain": "0.0.1-alpha.390",
278
+ "@spartan-ng/brain": "0.0.1-alpha.391",
279
279
  "clsx": "^2.1.1"
280
280
  }
281
281
  },
@@ -283,7 +283,7 @@
283
283
  "internalName": "ui-hover-card-helm",
284
284
  "peerDependencies": {
285
285
  "@angular/core": ">=18.0.0",
286
- "@spartan-ng/brain": "0.0.1-alpha.390",
286
+ "@spartan-ng/brain": "0.0.1-alpha.391",
287
287
  "clsx": "^2.1.1"
288
288
  }
289
289
  },
@@ -294,7 +294,7 @@
294
294
  "@angular/forms": ">=18.0.0",
295
295
  "@ng-icons/core": ">=29.0.0",
296
296
  "@ng-icons/lucide": ">=29.0.0",
297
- "@spartan-ng/brain": "0.0.1-alpha.390",
297
+ "@spartan-ng/brain": "0.0.1-alpha.391",
298
298
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
299
299
  "clsx": "^2.1.1"
300
300
  }
@@ -303,7 +303,7 @@
303
303
  "internalName": "ui-tooltip-helm",
304
304
  "peerDependencies": {
305
305
  "@angular/core": ">=18.0.0",
306
- "@spartan-ng/brain": "0.0.1-alpha.390"
306
+ "@spartan-ng/brain": "0.0.1-alpha.391"
307
307
  }
308
308
  },
309
309
  "pagination": {
@@ -315,7 +315,7 @@
315
315
  "@angular/router": ">=18.0.0",
316
316
  "@ng-icons/core": ">=29.0.0",
317
317
  "@ng-icons/lucide": ">=29.0.0",
318
- "@spartan-ng/brain": "0.0.1-alpha.390",
318
+ "@spartan-ng/brain": "0.0.1-alpha.391",
319
319
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
320
320
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
321
321
  "@spartan-ng/ui-select-helm": "0.0.1-alpha.381",
@@ -329,7 +329,7 @@
329
329
  "@angular/core": ">=18.0.0",
330
330
  "@ng-icons/core": ">=29.0.0",
331
331
  "@ng-icons/lucide": ">=29.0.0",
332
- "@spartan-ng/brain": "0.0.1-alpha.390",
332
+ "@spartan-ng/brain": "0.0.1-alpha.391",
333
333
  "@spartan-ng/ui-button-helm": "0.0.1-alpha.381",
334
334
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
335
335
  "clsx": "^2.1.1",
@@ -342,7 +342,7 @@
342
342
  "@angular/core": ">=18.0.0",
343
343
  "@ng-icons/core": ">=29.0.0",
344
344
  "@ng-icons/lucide": ">=29.0.0",
345
- "@spartan-ng/brain": "0.0.1-alpha.390",
345
+ "@spartan-ng/brain": "0.0.1-alpha.391",
346
346
  "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381",
347
347
  "class-variance-authority": "^0.7.0",
348
348
  "clsx": "^2.1.1"
@@ -363,14 +363,14 @@
363
363
  "internalName": "ui-form-field-helm",
364
364
  "peerDependencies": {
365
365
  "@angular/core": ">=18.0.0",
366
- "@spartan-ng/brain": "0.0.1-alpha.390"
366
+ "@spartan-ng/brain": "0.0.1-alpha.391"
367
367
  }
368
368
  },
369
369
  "slider": {
370
370
  "internalName": "ui-slider-helm",
371
371
  "peerDependencies": {
372
372
  "@angular/core": ">=18.0.0",
373
- "@spartan-ng/brain": "0.0.1-alpha.390",
373
+ "@spartan-ng/brain": "0.0.1-alpha.391",
374
374
  "clsx": "^2.1.1"
375
375
  }
376
376
  }
@@ -1,35 +0,0 @@
1
- import { Component, computed, inject, input } from '@angular/core';
2
- import { NgIcon, provideIcons } from '@ng-icons/core';
3
- import { lucideCheck } from '@ng-icons/lucide';
4
- import { BrnCheckboxComponent } from '@spartan-ng/brain/checkbox';
5
- import { hlm } from '@spartan-ng/brain/core';
6
- import { HlmIconDirective } from '@spartan-ng/ui-icon-helm';
7
- import type { ClassValue } from 'clsx';
8
-
9
- @Component({
10
- selector: 'hlm-checkbox-checkicon',
11
- standalone: true,
12
- imports: [NgIcon, HlmIconDirective],
13
- providers: [provideIcons({ lucideCheck })],
14
- host: {
15
- '[class]': '_computedClass()',
16
- },
17
- template: `
18
- <ng-icon hlm size="sm" [name]="iconName()" />
19
- `,
20
- })
21
- export class HlmCheckboxCheckIconComponent {
22
- private readonly _brnCheckbox = inject(BrnCheckboxComponent);
23
- protected _checked = this._brnCheckbox?.isChecked;
24
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
25
-
26
- public readonly iconName = input<string>('lucideCheck');
27
-
28
- protected _computedClass = computed(() =>
29
- hlm(
30
- 'h-4 w-4 leading-none group-data-[state=unchecked]:opacity-0',
31
- this._checked() === 'indeterminate' ? 'opacity-50' : '',
32
- this.userClass(),
33
- ),
34
- );
35
- }