@spartan-ng/cli 0.0.1-alpha.506 → 0.0.1-alpha.508

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 (195) hide show
  1. package/generators.json +26 -0
  2. package/package.json +1 -1
  3. package/src/generators/base/lib/build-dependency-array.d.ts +0 -1
  4. package/src/generators/base/lib/build-dependency-array.js +1 -1
  5. package/src/generators/base/lib/build-dependency-array.js.map +1 -1
  6. package/src/generators/healthcheck/generator.js +4 -0
  7. package/src/generators/healthcheck/generator.js.map +1 -1
  8. package/src/generators/healthcheck/healthchecks/brn-separator.d.ts +2 -0
  9. package/src/generators/healthcheck/healthchecks/brn-separator.js +34 -0
  10. package/src/generators/healthcheck/healthchecks/brn-separator.js.map +1 -0
  11. package/src/generators/healthcheck/healthchecks/hlm.d.ts +2 -0
  12. package/src/generators/healthcheck/healthchecks/hlm.js +32 -0
  13. package/src/generators/healthcheck/healthchecks/hlm.js.map +1 -0
  14. package/src/generators/healthcheck/healthchecks.d.ts +1 -1
  15. package/src/generators/healthcheck/healthchecks.js.map +1 -1
  16. package/src/generators/migrate-hlm/compat.d.ts +2 -0
  17. package/src/generators/migrate-hlm/compat.js +7 -0
  18. package/src/generators/migrate-hlm/compat.js.map +1 -0
  19. package/src/generators/migrate-hlm/generator.d.ts +4 -0
  20. package/src/generators/migrate-hlm/generator.js +102 -0
  21. package/src/generators/migrate-hlm/generator.js.map +1 -0
  22. package/src/generators/migrate-hlm/schema.d.ts +4 -0
  23. package/src/generators/migrate-hlm/schema.json +14 -0
  24. package/src/generators/migrate-separator/compat.d.ts +2 -0
  25. package/src/generators/migrate-separator/compat.js +7 -0
  26. package/src/generators/migrate-separator/compat.js.map +1 -0
  27. package/src/generators/migrate-separator/generator.d.ts +4 -0
  28. package/src/generators/migrate-separator/generator.js +78 -0
  29. package/src/generators/migrate-separator/generator.js.map +1 -0
  30. package/src/generators/migrate-separator/schema.d.ts +3 -0
  31. package/src/generators/migrate-separator/schema.json +14 -0
  32. package/src/generators/theme/__snapshots__/generator.spec.ts.snap +40 -20
  33. package/src/generators/theme/libs/add-theme-to-application-styles.js +7 -7
  34. package/src/generators/theme/libs/add-theme-to-application-styles.js.map +1 -1
  35. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.ts.template +2 -2
  36. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.ts.template +1 -1
  37. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.ts.template +2 -2
  38. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.ts.template +2 -2
  39. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.ts.template +1 -1
  40. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.ts.template +3 -2
  41. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.ts.template +1 -1
  42. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.ts.template +1 -1
  43. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.ts.template +1 -1
  44. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.ts.template +3 -2
  45. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.ts.template +1 -1
  46. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.ts.template +1 -1
  47. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.ts.template +1 -1
  48. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.ts.template +3 -3
  49. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.ts.template +2 -2
  50. package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.ts.template +1 -1
  51. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.ts.template +2 -2
  52. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.ts.template +1 -1
  53. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.ts.template +5 -5
  54. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-ellipsis.ts.template +1 -1
  55. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-item.ts.template +1 -1
  56. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-link.ts.template +1 -1
  57. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-list.ts.template +2 -2
  58. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-page.ts.template +2 -2
  59. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-separator.ts.template +2 -2
  60. package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb.ts.template +1 -1
  61. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.ts.template +5 -5
  62. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.ts.template +13 -11
  63. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-range.ts.template +13 -11
  64. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.ts.template +13 -11
  65. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-action.ts.template +1 -1
  66. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.ts.template +1 -1
  67. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.ts.template +1 -1
  68. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.ts.template +2 -2
  69. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.ts.template +2 -2
  70. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.ts.template +2 -2
  71. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.ts.template +1 -1
  72. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.ts.template +1 -1
  73. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.ts.template +1 -1
  74. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.ts.template +1 -1
  75. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.ts.template +1 -1
  76. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.ts.template +1 -1
  77. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.ts.template +1 -1
  78. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.ts.template +2 -2
  79. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.ts.template +2 -2
  80. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.ts.template +2 -1
  81. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.ts.template +1 -1
  82. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group-label.ts.template +1 -1
  83. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.ts.template +2 -2
  84. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-icon.ts.template +1 -1
  85. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.ts.template +2 -2
  86. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.ts.template +2 -2
  87. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search-input.ts.template +1 -1
  88. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search.ts.template +1 -1
  89. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-separator.ts.template +2 -2
  90. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.ts.template +1 -1
  91. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.ts.template +1 -1
  92. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template +3 -3
  93. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.ts.template +3 -3
  94. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template +3 -3
  95. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.ts.template +2 -2
  96. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.ts.template +2 -2
  97. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.ts.template +2 -2
  98. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.ts.template +2 -2
  99. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.ts.template +2 -4
  100. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.ts.template +3 -2
  101. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.ts.template +3 -5
  102. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-error.ts.template +2 -2
  103. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.ts.template +2 -2
  104. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-hint.ts.template +2 -2
  105. package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.ts.template +3 -2
  106. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.ts.template +1 -1
  107. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.ts.template +2 -2
  108. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-group.ts.template +1 -1
  109. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-separator.ts.template +1 -1
  110. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-slot.ts.template +3 -3
  111. package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp.ts.template +2 -2
  112. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.ts.template +2 -2
  113. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.ts.template +2 -2
  114. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.ts.template +2 -2
  115. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.ts.template +2 -2
  116. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.ts.template +2 -2
  117. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.ts.template +1 -1
  118. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio-indicator.ts.template +2 -2
  119. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.ts.template +2 -2
  120. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.ts.template +1 -1
  121. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.ts.template +2 -2
  122. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.ts.template +1 -1
  123. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.ts.template +2 -2
  124. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.ts.template +1 -1
  125. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.ts.template +2 -2
  126. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.ts.template +2 -2
  127. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.ts.template +1 -1
  128. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.ts.template +1 -1
  129. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.ts.template +1 -1
  130. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.ts.template +1 -1
  131. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.ts.template +1 -1
  132. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.ts.template +1 -1
  133. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.ts.template +1 -1
  134. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.ts.template +2 -2
  135. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.ts.template +3 -2
  136. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.ts.template +1 -1
  137. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.ts.template +2 -2
  138. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.ts.template +1 -1
  139. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.ts.template +2 -2
  140. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.ts.template +1 -1
  141. package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.ts.template +1 -1
  142. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.ts.template +3 -2
  143. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.ts.template +1 -1
  144. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.ts.template +2 -2
  145. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.ts.template +2 -2
  146. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.ts.template +1 -1
  147. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.ts.template +1 -1
  148. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.ts.template +2 -2
  149. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.ts.template +2 -2
  150. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.ts.template +1 -1
  151. package/src/generators/ui/libs/ui-separator-helm/files/index.ts.template +4 -2
  152. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.ts.template +6 -7
  153. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.ts.template +2 -2
  154. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.ts.template +3 -2
  155. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.ts.template +1 -1
  156. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.ts.template +1 -1
  157. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.ts.template +1 -1
  158. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.ts.template +3 -2
  159. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.ts.template +1 -1
  160. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.ts.template +2 -2
  161. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.ts.template +1 -1
  162. package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.ts.template +1 -1
  163. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.ts.template +2 -2
  164. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.ts.template +2 -2
  165. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.ts.template +2 -2
  166. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.ts.template +1 -1
  167. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.ts.template +2 -2
  168. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.ts.template +3 -3
  169. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.ts.template +2 -2
  170. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.ts.template +2 -2
  171. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.ts.template +1 -1
  172. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-group.ts.template +2 -2
  173. package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-item.ts.template +6 -6
  174. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.ts.template +3 -3
  175. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.ts.template +1 -1
  176. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.ts.template +1 -1
  177. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.ts.template +1 -1
  178. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.ts.template +1 -1
  179. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.ts.template +1 -1
  180. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.ts.template +1 -1
  181. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.ts.template +1 -1
  182. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.ts.template +1 -1
  183. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.ts.template +1 -1
  184. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.ts.template +1 -1
  185. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.ts.template +1 -1
  186. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.ts.template +1 -1
  187. package/src/generators/ui/libs/ui-utils-helm/files/index.ts.template +1 -0
  188. package/src/generators/ui/libs/ui-utils-helm/files/lib/hlm.ts.template +6 -0
  189. package/src/generators/ui/libs/ui-utils-helm/generator.d.ts +3 -0
  190. package/src/generators/ui/libs/ui-utils-helm/generator.js +14 -0
  191. package/src/generators/ui/libs/ui-utils-helm/generator.js.map +1 -0
  192. package/src/generators/ui/primitive-deps.js +42 -41
  193. package/src/generators/ui/primitive-deps.js.map +1 -1
  194. package/src/generators/ui/primitives.d.ts +1 -1
  195. package/src/generators/ui/supported-ui-libraries.json +37 -44
package/generators.json CHANGED
@@ -64,6 +64,22 @@
64
64
  "factory": "./src/generators/migrate-progress/generator",
65
65
  "schema": "./src/generators/migrate-progress/schema.json",
66
66
  "description": "Migrate brn-progress to hlm-progress"
67
+ },
68
+
69
+ "migrate-date-picker": {
70
+ "factory": "./src/generators/migrate-date-picker/generator",
71
+ "schema": "./src/generators/migrate-date-picker/schema.json",
72
+ "description": "Migrate hlm-date-picker changed event to dateChange"
73
+ },
74
+ "migrate-hlm": {
75
+ "factory": "./src/generators/migrate-hlm/generator",
76
+ "schema": "./src/generators/migrate-hlm/schema.json",
77
+ "description": "Migrate hlm import from @spartan-ng/brain to @spartan-ng/helm/utils"
78
+ },
79
+ "migrate-separator": {
80
+ "factory": "./src/generators/migrate-separator/generator",
81
+ "schema": "./src/generators/migrate-separator/schema.json",
82
+ "description": "Migrate brn-separator to hlm-separator"
67
83
  }
68
84
  },
69
85
  "schematics": {
@@ -131,6 +147,16 @@
131
147
  "factory": "./src/generators/migrate-progress/compat",
132
148
  "schema": "./src/generators/migrate-progress/schema.json",
133
149
  "description": "Migrate brn-progress to hlm-progress"
150
+ },
151
+ "migrate-date-picker": {
152
+ "factory": "./src/generators/migrate-date-picker/compat",
153
+ "schema": "./src/generators/migrate-date-picker/schema.json",
154
+ "description": "Migrate hlm-date-picker changed event to dateChange"
155
+ },
156
+ "migrate-hlm": {
157
+ "factory": "./src/generators/migrate-hlm/compat",
158
+ "schema": "./src/generators/migrate-hlm/schema.json",
159
+ "description": "Migrate hlm import from @spartan-ng/brain to @spartan-ng/helm/utils"
134
160
  }
135
161
  }
136
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/cli",
3
- "version": "0.0.1-alpha.506",
3
+ "version": "0.0.1-alpha.508",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@nx/angular": ">=20.0.0",
@@ -1,7 +1,6 @@
1
1
  import type { HlmBaseGeneratorSchema } from '../schema';
2
2
  export declare function buildDependencyArray(options: HlmBaseGeneratorSchema, angularVersion: string, existingCdkVersion: string): Record<string, string>;
3
3
  export declare function buildDevDependencyArray(): {
4
- 'tailwind-merge': string;
5
4
  tailwindcss: string;
6
5
  'tailwindcss-animate': string;
7
6
  };
@@ -7,6 +7,7 @@ function buildDependencyArray(options, angularVersion, existingCdkVersion) {
7
7
  let dependencies = {
8
8
  '@angular/cdk': existingCdkVersion ?? angularVersion,
9
9
  '@spartan-ng/brain': versions_1.SPARTAN_BRAIN_VERSION,
10
+ 'tailwind-merge': versions_1.TAILWIND_MERGE_VERSION,
10
11
  };
11
12
  if (options.peerDependencies) {
12
13
  dependencies = { ...dependencies, ...options.peerDependencies };
@@ -18,7 +19,6 @@ function buildDependencyArray(options, angularVersion, existingCdkVersion) {
18
19
  }
19
20
  function buildDevDependencyArray() {
20
21
  return {
21
- 'tailwind-merge': versions_1.TAILWIND_MERGE_VERSION,
22
22
  tailwindcss: versions_1.TAILWINDCSS_VERSION,
23
23
  'tailwindcss-animate': versions_1.TAILWIND_ANIMATE_VERSION,
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build-dependency-array.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/base/lib/build-dependency-array.ts"],"names":[],"mappings":";;AASA,oDAkBC;AAED,0DAMC;AAlCD,0CAMqB;AAErB,SAAgB,oBAAoB,CACnC,OAA+B,EAC/B,cAAsB,EACtB,kBAA0B;IAE1B,IAAI,YAAY,GAA2B;QAC1C,cAAc,EAAE,kBAAkB,IAAI,cAAc;QACpD,mBAAmB,EAAE,gCAAqB;KAC1C,CAAC;IAEF,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9B,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IACjE,CAAC;IAED,IAAI,OAAO,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;QACtC,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,gBAAgB,EAAE,2BAAgB,EAAE,CAAC;IACxE,CAAC;IACD,OAAO,YAAY,CAAC;AACrB,CAAC;AAED,SAAgB,uBAAuB;IACtC,OAAO;QACN,gBAAgB,EAAE,iCAAsB;QACxC,WAAW,EAAE,8BAAmB;QAChC,qBAAqB,EAAE,mCAAwB;KAC/C,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"build-dependency-array.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/base/lib/build-dependency-array.ts"],"names":[],"mappings":";;AASA,oDAmBC;AAED,0DAKC;AAlCD,0CAMqB;AAErB,SAAgB,oBAAoB,CACnC,OAA+B,EAC/B,cAAsB,EACtB,kBAA0B;IAE1B,IAAI,YAAY,GAA2B;QAC1C,cAAc,EAAE,kBAAkB,IAAI,cAAc;QACpD,mBAAmB,EAAE,gCAAqB;QAC1C,gBAAgB,EAAE,iCAAsB;KACxC,CAAC;IAEF,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9B,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IACjE,CAAC;IAED,IAAI,OAAO,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;QACtC,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,gBAAgB,EAAE,2BAAgB,EAAE,CAAC;IACxE,CAAC;IACD,OAAO,YAAY,CAAC;AACrB,CAAC;AAED,SAAgB,uBAAuB;IACtC,OAAO;QACN,WAAW,EAAE,8BAAmB;QAChC,qBAAqB,EAAE,mCAAwB;KAC/C,CAAC;AACH,CAAC"}
@@ -5,9 +5,11 @@ const devkit_1 = require("@nx/devkit");
5
5
  const healthchecks_1 = require("./healthchecks");
6
6
  const brain_imports_1 = require("./healthchecks/brain-imports");
7
7
  const brn_radio_1 = require("./healthchecks/brn-radio");
8
+ const brn_separator_1 = require("./healthchecks/brn-separator");
8
9
  const brn_toggle_group_1 = require("./healthchecks/brn-toggle-group");
9
10
  const core_imports_1 = require("./healthchecks/core-imports");
10
11
  const helm_imports_1 = require("./healthchecks/helm-imports");
12
+ const hlm_1 = require("./healthchecks/hlm");
11
13
  const hlm_date_picker_1 = require("./healthchecks/hlm-date-picker");
12
14
  const hlm_icon_1 = require("./healthchecks/hlm-icon");
13
15
  const hlm_progress_1 = require("./healthchecks/hlm-progress");
@@ -33,6 +35,8 @@ async function healthcheckGenerator(tree, options) {
33
35
  naming_conventions_1.namingConventionHealthcheck,
34
36
  hlm_date_picker_1.datePickerHealthcheck,
35
37
  hlm_progress_1.progressHealthcheck,
38
+ hlm_1.hlmImportHealthcheck,
39
+ brn_separator_1.brainSeparatorHealthcheck,
36
40
  ];
37
41
  const failedReports = [];
38
42
  for (const healthcheck of healthchecks) {
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;AAmBA,oDA0CC;AA7DD,uCAAuD;AACvD,iDAAyG;AACzG,gEAAuE;AACvE,wDAAiE;AACjE,sEAAyE;AACzE,8DAAqE;AACrE,8DAAqE;AACrE,oEAAuE;AACvE,sDAA8D;AAC9D,8DAAkE;AAClE,oEAAuE;AACvE,0DAA8D;AAC9D,0EAAgF;AAChF,oDAA4D;AAE5D,2CAA4C;AAC5C,+CAA+C;AAC/C,2CAAgD;AAEzC,KAAK,UAAU,oBAAoB,CAAC,IAAU,EAAE,OAA8D;IACpH,eAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAEvC,MAAM,YAAY,GAAkB;QACnC,4BAAkB;QAClB,uCAAuB;QACvB,qCAAsB;QACtB,8BAAmB;QACnB,uCAAqB;QACrB,iCAAqB;QACrB,8BAAiB;QACjB,yCAAsB;QACtB,qCAAsB;QACtB,gDAA2B;QAC3B,uCAAqB;QACrB,kCAAmB;KACnB,CAAC;IAEF,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,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,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;YACxE,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"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;AAqBA,oDA4CC;AAjED,uCAAuD;AACvD,iDAAyG;AACzG,gEAAuE;AACvE,wDAAiE;AACjE,gEAAyE;AACzE,sEAAyE;AACzE,8DAAqE;AACrE,8DAAqE;AACrE,4CAA0D;AAC1D,oEAAuE;AACvE,sDAA8D;AAC9D,8DAAkE;AAClE,oEAAuE;AACvE,0DAA8D;AAC9D,0EAAgF;AAChF,oDAA4D;AAE5D,2CAA4C;AAC5C,+CAA+C;AAC/C,2CAAgD;AAEzC,KAAK,UAAU,oBAAoB,CAAC,IAAU,EAAE,OAA8D;IACpH,eAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAEvC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 export declare const brainSeparatorHealthcheck: Healthcheck;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.brainSeparatorHealthcheck = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = require("../../migrate-separator/generator");
6
+ const healthchecks_1 = require("../healthchecks");
7
+ exports.brainSeparatorHealthcheck = {
8
+ name: 'Brain Separator',
9
+ async detect(tree, failure) {
10
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
11
+ // if the file is a .ts or .htlm file, check for brain separator
12
+ if (!file.endsWith('.ts') && !file.endsWith('.html')) {
13
+ return;
14
+ }
15
+ // if it is the HlmSeparator itself skip it.
16
+ if (file.endsWith('hlm-separator.ts')) {
17
+ return;
18
+ }
19
+ const contents = tree.read(file, 'utf-8');
20
+ if (!contents) {
21
+ return;
22
+ }
23
+ if (contents.includes('<brn-separator')) {
24
+ failure(`The <brn-separator> component is deprecated. Please use the <hlm-separator> instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
25
+ }
26
+ });
27
+ },
28
+ fix: async (tree) => {
29
+ await (0, generator_1.migrateSeparatorGenerator)(tree, { skipFormat: true });
30
+ return true;
31
+ },
32
+ prompt: 'Would you like to migrate brain separator?',
33
+ };
34
+ //# sourceMappingURL=brn-separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brn-separator.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/brn-separator.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,iEAA8E;AAC9E,kDAAmE;AAEtD,QAAA,yBAAyB,GAAgB;IACrD,IAAI,EAAE,iBAAiB;IACvB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,gEAAgE;YAChE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtD,OAAO;YACR,CAAC;YAED,4CAA4C;YAC5C,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBACvC,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,gBAAgB,CAAC,EAAE,CAAC;gBACzC,OAAO,CACN,sFAAsF,EACtF,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,qCAAyB,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,4CAA4C;CACpD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Healthcheck } from '../healthchecks';
2
+ export declare const hlmImportHealthcheck: Healthcheck;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hlmImportHealthcheck = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const generator_1 = tslib_1.__importDefault(require("../../migrate-hlm/generator"));
7
+ const healthchecks_1 = require("../healthchecks");
8
+ exports.hlmImportHealthcheck = {
9
+ name: 'Helm imports',
10
+ async detect(tree, failure) {
11
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
12
+ // if the file is a .ts or .json file, check for helm imports/packages
13
+ if (!file.endsWith('.ts')) {
14
+ return;
15
+ }
16
+ const contents = tree.read(file, 'utf-8');
17
+ if (!contents) {
18
+ return;
19
+ }
20
+ // If any import from @spartan-ng/brain/core contains hlm
21
+ if (/import\s*{[^}]*\bhlm\b[^}]*}\s*from\s*['"]@spartan-ng\/brain\/core['"]/.test(contents)) {
22
+ failure(`The { hlm } import from '@spartan-ng/brain/core' is deprecated; import it from '@spartan-ng/helm/utils' instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
23
+ }
24
+ });
25
+ },
26
+ fix: async (tree, { angularCli }) => {
27
+ await (0, generator_1.default)(tree, { skipFormat: true, angularCli });
28
+ return true;
29
+ },
30
+ prompt: 'Would you like to migrate hlm import?',
31
+ };
32
+ //# sourceMappingURL=hlm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hlm.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/hlm.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,oFAA8D;AAC9D,kDAAmE;AAEtD,QAAA,oBAAoB,GAAgB;IAChD,IAAI,EAAE,cAAc;IACpB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO;QACzB,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,sEAAsE;YACtE,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;YAC1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,yDAAyD;YACzD,IAAI,wEAAwE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7F,OAAO,CACN,kHAAkH,EAClH,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACnC,MAAM,IAAA,mBAAmB,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EAAE,uCAAuC;CAC/C,CAAC"}
@@ -71,7 +71,7 @@ export interface HealthcheckIssue {
71
71
  */
72
72
  severity: HealthcheckSeverity;
73
73
  }
74
- interface HealthcheckContext {
74
+ export interface HealthcheckContext {
75
75
  angularCli?: boolean;
76
76
  }
77
77
  export {};
@@ -1 +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"}
1
+ {"version":3,"file":"healthchecks.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/healthchecks.ts"],"names":[],"mappings":";;;AA6CA,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,2 @@
1
+ declare const _default: (generatorOptions: import("./schema").MigrateHlmGeneratorSchema) => (tree: any, context: any) => Promise<any>;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = tslib_1.__importDefault(require("./generator"));
6
+ exports.default = (0, devkit_1.convertNxGenerator)(generator_1.default);
7
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-hlm/compat.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAiD;AAEjD,kBAAe,IAAA,2BAAkB,EAAC,mBAAsB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { MigrateHlmGeneratorSchema } from './schema';
3
+ export declare function migrateHlmGenerator(tree: Tree, { skipFormat, angularCli }: MigrateHlmGeneratorSchema): Promise<void>;
4
+ export default migrateHlmGenerator;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.migrateHlmGenerator = migrateHlmGenerator;
37
+ const devkit_1 = require("@nx/devkit");
38
+ const config_1 = require("../../utils/config");
39
+ const visit_files_1 = require("../../utils/visit-files");
40
+ const generator_1 = require("../ui/generator");
41
+ async function migrateHlmGenerator(tree, { skipFormat, angularCli }) {
42
+ await ensureHelmUtilsInstalled(tree, angularCli);
43
+ replaceHlmImport(tree);
44
+ if (!skipFormat) {
45
+ await (0, devkit_1.formatFiles)(tree);
46
+ }
47
+ }
48
+ async function ensureHelmUtilsInstalled(tree, angularCli) {
49
+ const tsconfigPath = tree.exists('tsconfig.base.json')
50
+ ? 'tsconfig.base.json'
51
+ : tree.exists('tsconfig.json')
52
+ ? 'tsconfig.json'
53
+ : null;
54
+ if (!tsconfigPath) {
55
+ throw new Error('Could not find tsconfig.base.json or tsconfig.json to verify @spartan-ng/helm/utils.');
56
+ }
57
+ const tsconfig = JSON.parse(tree.read(tsconfigPath, 'utf-8') || '{}');
58
+ // Check compilerOptions.paths for @spartan-ng/helm/utils
59
+ const paths = tsconfig.compilerOptions?.paths || {};
60
+ const hasHelmUtils = Object.keys(paths).some((pkg) => pkg === '@spartan-ng/helm/utils');
61
+ if (!hasHelmUtils) {
62
+ const supportedLibraries = (await Promise.resolve().then(() => __importStar(require('../ui/supported-ui-libraries.json'))).then((m) => m.default));
63
+ const config = await (0, config_1.getOrCreateConfig)(tree);
64
+ await (0, generator_1.createPrimitiveLibraries)({
65
+ primitives: ['utils'],
66
+ }, Object.keys(supportedLibraries), supportedLibraries, tree, { angularCli, installPeerDependencies: true }, config);
67
+ }
68
+ }
69
+ function replaceHlmImport(tree) {
70
+ (0, visit_files_1.visitFiles)(tree, '.', (path) => {
71
+ if (!path.endsWith('.ts'))
72
+ return;
73
+ let content = tree.read(path, 'utf-8');
74
+ if (!content)
75
+ return;
76
+ // Find imports from @spartan-ng/brain/core
77
+ const importRegex = /import\s*{\s*([^}]*)\s*}\s*from\s*['"]@spartan-ng\/brain\/core['"];?/g;
78
+ content = content.replace(importRegex, (match, imports) => {
79
+ // Split the import specifiers
80
+ const specifiers = imports
81
+ .split(',')
82
+ .map((s) => s.trim())
83
+ .filter(Boolean);
84
+ if (!specifiers.includes('hlm')) {
85
+ // nothing to change
86
+ return match;
87
+ }
88
+ // Remove hlm from the original import
89
+ const remaining = specifiers.filter((s) => s !== 'hlm');
90
+ let newImports = '';
91
+ if (remaining.length > 0) {
92
+ newImports = `import { ${remaining.join(', ')} } from '@spartan-ng/brain/core';\n`;
93
+ }
94
+ // Always add hlm import from new package
95
+ newImports += `import { hlm } from '@spartan-ng/helm/utils';`;
96
+ return newImports;
97
+ });
98
+ tree.write(path, content);
99
+ });
100
+ }
101
+ exports.default = migrateHlmGenerator;
102
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-hlm/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,kDAOC;AArBD,uCAA+C;AAC/C,+CAAuD;AACvD,yDAAqD;AACrD,+CAA2D;AAWpD,KAAK,UAAU,mBAAmB,CAAC,IAAU,EA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,CAAC;YAED,yCAAyC;YACzC,UAAU,IAAI,+CAA+C,CAAC;YAE9D,OAAO,UAAU,CAAC;QACnB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface MigrateHlmGeneratorSchema {
2
+ skipFormat?: boolean;
3
+ angularCli: boolean;
4
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "MigrateHLm",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "skipFormat": {
8
+ "type": "boolean",
9
+ "default": false,
10
+ "description": "Skip formatting files"
11
+ }
12
+ },
13
+ "required": []
14
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (generatorOptions: import("./schema").MigrateSeparatorGeneratorSchema) => (tree: any, context: any) => Promise<any>;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const generator_1 = tslib_1.__importDefault(require("./generator"));
6
+ exports.default = (0, devkit_1.convertNxGenerator)(generator_1.default);
7
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-separator/compat.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoD;AAEpD,kBAAe,IAAA,2BAAkB,EAAC,mBAAyB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { MigrateSeparatorGeneratorSchema } from './schema';
3
+ export declare function migrateSeparatorGenerator(tree: Tree, { skipFormat }: MigrateSeparatorGeneratorSchema): Promise<void>;
4
+ export default migrateSeparatorGenerator;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateSeparatorGenerator = migrateSeparatorGenerator;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const visit_files_1 = require("../../utils/visit-files");
6
+ async function migrateSeparatorGenerator(tree, { skipFormat }) {
7
+ updateImports(tree);
8
+ replaceSelector(tree);
9
+ if (!skipFormat) {
10
+ await (0, devkit_1.formatFiles)(tree);
11
+ }
12
+ }
13
+ function replaceSelector(tree) {
14
+ // if the element is `<brn-separator hlmSeparator` then we need to replace it with `<hlm-separator`
15
+ // we also need to replace the closing tag `</brn-separator>` with `</hlm-separator>`
16
+ (0, visit_files_1.visitFiles)(tree, '.', (path) => {
17
+ // if this is not an html file or typescript file (inline templates) then skip
18
+ if (!path.endsWith('.html') && !path.endsWith('.ts')) {
19
+ return;
20
+ }
21
+ let content = tree.read(path, 'utf-8');
22
+ if (!content) {
23
+ return;
24
+ }
25
+ // <brn-separator hlmSeparator but between
26
+ content = replaceBrnSeparator(content);
27
+ content = content.replace(/<\/brn-separator>/g, '</hlm-separator>');
28
+ tree.write(path, content);
29
+ });
30
+ }
31
+ function replaceBrnSeparator(input) {
32
+ // Split input to handle multiple tags separately
33
+ return input
34
+ .split(/(?=<)/)
35
+ .map((tag) => {
36
+ // Skip if not a brn-separator tag
37
+ if (!tag.startsWith('<brn-separator')) {
38
+ return tag;
39
+ }
40
+ // Remove line breaks, tabs, and other whitespace within the tag
41
+ // Replace with a single space
42
+ tag = tag.replace(/\s+/g, ' ');
43
+ // Check if standalone hlm attribute exists
44
+ const hasHlm = / hlmSeparator(?=[\s>])/.test(tag);
45
+ if (hasHlm) {
46
+ // Remove the hlm attribute and convert to hlm-separator
47
+ return tag
48
+ .replace(/<brn-separator/, '<hlm-separator')
49
+ .replace(/ hlmSeparator(?=[\s>])/, '')
50
+ .replace(/\s+>/g, '>')
51
+ .replace(/\s+/g, ' ');
52
+ }
53
+ return tag;
54
+ })
55
+ .join('');
56
+ }
57
+ /**
58
+ * Update imports remove BrnSeparator import
59
+ */
60
+ function updateImports(tree) {
61
+ (0, visit_files_1.visitFiles)(tree, '/', (path) => {
62
+ // skip HlmSeparator itself
63
+ if (path.endsWith('hlm-separator.ts')) {
64
+ return;
65
+ }
66
+ const content = tree.read(path).toString('utf-8');
67
+ if (content.includes('@spartan-ng/brain/separator') || content.includes('@spartan-ng/ui-separator-helm')) {
68
+ const updatedContent = content
69
+ // Handle `import { BrnSeparator } from '@spartan-ng/brain/separator';`
70
+ .replace("import { BrnSeparator } from '@spartan-ng/brain/separator';", '')
71
+ // Remove `BrnSeparator` with optional comma and whitespace
72
+ .replace(/BrnSeparator,?\s?/, '');
73
+ tree.write(path, updatedContent);
74
+ }
75
+ });
76
+ }
77
+ exports.default = migrateSeparatorGenerator;
78
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-separator/generator.ts"],"names":[],"mappings":";;AAIA,8DAOC;AAXD,uCAA+C;AAC/C,yDAAqD;AAG9C,KAAK,UAAU,yBAAyB,CAAC,IAAU,EAAE,EAAE,UAAU,EAAmC;IAC1G,aAAa,CAAC,IAAI,CAAC,CAAC;IACpB,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED,SAAS,eAAe,CAAC,IAAU;IAClC,mGAAmG;IACnG,qFAAqF;IACrF,IAAA,wBAAU,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;QAC9B,8EAA8E;QAC9E,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACtD,OAAO;QACR,CAAC;QAED,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EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;QAC9B,2BAA2B;QAC3B,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACvC,OAAO;QACR,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElD,IAAI,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,EAAE,CAAC;YAC1G,MAAM,cAAc,GAAG,OAAO;gBAC7B,uEAAuE;iBACtE,OAAO,CAAC,6DAA6D,EAAE,EAAE,CAAC;gBAC3E,2DAA2D;iBAC1D,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;YAEnC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAClC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export interface MigrateSeparatorGeneratorSchema {
2
+ skipFormat?: boolean;
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "MigrateSeparator",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "skipFormat": {
8
+ "type": "boolean",
9
+ "default": false,
10
+ "description": "Skip formatting files"
11
+ }
12
+ },
13
+ "required": []
14
+ }