@tech4good/angular-schematics 20.3.0 → 21.0.0

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 (147) hide show
  1. package/.agents/skills/publish-npm/SKILL.md +1 -1
  2. package/.agents/skills/publish-npm/eval.yaml +15 -0
  3. package/.agents/skills/publish-npm/fixtures/package-v21.json.template +8 -0
  4. package/.husky/commit-msg +1 -0
  5. package/.husky/pre-commit +1 -0
  6. package/.t4g/agent-memory.db +0 -0
  7. package/CHANGELOG.md +100 -26
  8. package/commitlint.config.js +15 -0
  9. package/contributing-docs/commit-message.md +3 -6
  10. package/package.json +10 -6
  11. package/src/collection.json +8 -0
  12. package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +1 -3
  13. package/src/component/index_spec.js +57 -4
  14. package/src/component/index_spec.js.map +1 -1
  15. package/src/entity/index.js +7 -1
  16. package/src/entity/index.js.map +1 -1
  17. package/src/entity/index_spec.js +108 -4
  18. package/src/entity/index_spec.js.map +1 -1
  19. package/src/guard/files/__name@dasherize__.guard.spec.ts.template +45 -0
  20. package/src/guard/files/__name@dasherize__.guard.ts.template +32 -0
  21. package/src/guard/index.d.ts +2 -0
  22. package/src/guard/index.js +38 -0
  23. package/src/guard/index.js.map +1 -0
  24. package/src/guard/index_spec.d.ts +1 -0
  25. package/src/guard/index_spec.js +64 -0
  26. package/src/guard/index_spec.js.map +1 -0
  27. package/src/guard/schema.json +46 -0
  28. package/src/ng-add/files/.firebaserc.template +3 -2
  29. package/src/ng-add/files/.github/workflows/angular-github-ci.yml.template +105 -39
  30. package/src/ng-add/files/.gitignore.template +1 -2
  31. package/src/ng-add/files/angular.json.template +1 -5
  32. package/src/ng-add/files/docs-infra/infrastructure-guide.md.template +390 -0
  33. package/src/ng-add/files/docs-infra/load-system-architecture.md.template +166 -0
  34. package/src/ng-add/files/docs-infra/querying-strategy.md.template +157 -0
  35. package/src/ng-add/files/docs-infra/stream-system-architecture.md.template +283 -0
  36. package/src/ng-add/files/eslint.config.js.template +4 -1
  37. package/src/ng-add/files/firebase.json.template +37 -0
  38. package/src/ng-add/files/firestore.rules.spec.ts.template +221 -0
  39. package/src/ng-add/files/firestore.rules.template +67 -0
  40. package/src/ng-add/files/jest.config.ts.template +6 -1
  41. package/src/ng-add/files/package.json.template +41 -31
  42. package/src/ng-add/files/setup-jest.ts.template +13 -5
  43. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +76 -12
  44. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +1 -3
  45. package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.spec.ts.template +90 -0
  46. package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.ts.template +1 -1
  47. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.spec.ts.template +12 -17
  48. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.ts.template +2 -4
  49. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.spec.ts.template +40 -19
  50. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.ts.template +3 -5
  51. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.html.template +2 -2
  52. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.spec.ts.template +108 -0
  53. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +11 -11
  54. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.html.template +6 -2
  55. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +136 -19
  56. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +8 -5
  57. package/src/ng-add/files/src/app/app.component.html.template +1 -1
  58. package/src/ng-add/files/src/app/app.component.scss.template +10 -0
  59. package/src/ng-add/files/src/app/app.component.ts.template +1 -1
  60. package/src/ng-add/files/src/app/app.config.ts.template +11 -11
  61. package/src/ng-add/files/src/app/auth-routing.spec.ts.template +101 -0
  62. package/src/ng-add/files/src/app/core/analytics/log.service.ts.template +5 -8
  63. package/src/ng-add/files/src/app/core/analytics/time-analytics.service.spec.ts.template +140 -0
  64. package/src/ng-add/files/src/app/core/analytics/time-analytics.service.ts.template +25 -7
  65. package/src/ng-add/files/src/app/core/auth/guards/redirect-if-authenticated.guard.ts.template +1 -1
  66. package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +1 -1
  67. package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +1 -1
  68. package/src/ng-add/files/src/app/core/auth/guards/require-auth.guard.ts.template +1 -1
  69. package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +229 -14
  70. package/src/ng-add/files/src/app/core/firebase/database.service.ts.template +1 -1
  71. package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +34 -9
  72. package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +4 -4
  73. package/src/ng-add/files/src/app/core/firebase/query-logger.ts.template +11 -0
  74. package/src/ng-add/files/src/app/core/firebase/simulate-load.spec.ts.template +104 -0
  75. package/src/ng-add/files/src/app/core/firebase/simulate-stream.spec.ts.template +127 -0
  76. package/src/ng-add/files/src/app/core/firebase/simulation.mock.ts.template +38 -0
  77. package/src/ng-add/files/src/app/core/firebase/stream-multiplexer.ts.template +443 -0
  78. package/src/ng-add/files/src/app/core/store/app.store.spec.ts.template +920 -0
  79. package/src/ng-add/files/src/app/core/store/app.store.ts.template +303 -137
  80. package/src/ng-add/files/src/app/core/store/auth/auth.mock.ts.template +65 -23
  81. package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +68 -67
  82. package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +46 -0
  83. package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +17 -0
  84. package/src/ng-add/files/src/app/core/testing/test-utils.ts.template +26 -0
  85. package/src/ng-add/files/src/app/first-time/consent/consent.component.html.template +3 -3
  86. package/src/ng-add/files/src/app/first-time/consent/consent.component.spec.ts.template +89 -13
  87. package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +46 -17
  88. package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +1 -1
  89. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.html.template +5 -63
  90. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.scss.template +1 -94
  91. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template +150 -14
  92. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +15 -42
  93. package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +2 -2
  94. package/src/ng-add/files/src/app/first-time/early-access/early-access.model.ts.template +5 -0
  95. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.html.template +42 -0
  96. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.scss.template +96 -0
  97. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.spec.ts.template +37 -0
  98. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.ts.template +63 -0
  99. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.html.template +16 -0
  100. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.scss.template +7 -0
  101. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.spec.ts.template +41 -0
  102. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.ts.template +26 -0
  103. package/src/ng-add/files/src/app/first-time/first-time-routing.spec.ts.template +123 -0
  104. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +11 -4
  105. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +17 -4
  106. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +5 -5
  107. package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +1 -1
  108. package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +0 -1
  109. package/src/ng-add/files/src/app/first-time/landing/landing.component.spec.ts.template +25 -17
  110. package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +4 -12
  111. package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.ts.template +1 -1
  112. package/src/ng-add/files/src/app/first-time/login/login.component.spec.ts.template +36 -16
  113. package/src/ng-add/files/src/app/first-time/login/login.component.ts.template +1 -1
  114. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.spec.ts.template +11 -15
  115. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.ts.template +1 -3
  116. package/src/ng-add/files/src/app/main/home/home.component.ts.template +1 -3
  117. package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.spec.ts.template +98 -0
  118. package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.ts.template +9 -3
  119. package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.spec.ts.template +164 -0
  120. package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.ts.template +20 -18
  121. package/src/ng-add/files/src/app/shared/navbar/navbar.component.spec.ts.template +38 -17
  122. package/src/ng-add/files/src/app/shared/navbar/navbar.component.ts.template +1 -1
  123. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +1 -1
  124. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.spec.ts.template +49 -10
  125. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +5 -5
  126. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.spec.ts.template +86 -0
  127. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +11 -9
  128. package/src/ng-add/files/src/environments/environment.prod.ts.template +1 -0
  129. package/src/ng-add/files/src/environments/environment.test.ts.template +1 -0
  130. package/src/ng-add/files/src/environments/environment.ts.template +2 -8
  131. package/src/ng-add/files/src/styles.scss.template +29 -1
  132. package/src/ng-add/files/tsconfig.app.json.template +6 -6
  133. package/src/ng-add/files/tsconfig.json.template +13 -8
  134. package/src/ng-add/files/tsconfig.spec.json.template +6 -5
  135. package/src/ng-add/index.js +19 -1
  136. package/src/ng-add/index.js.map +1 -1
  137. package/src/component/files/__name@dasherize__/__name@dasherize__.animations.ts.template +0 -4
  138. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.animations.ts.template +0 -4
  139. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.animations.ts.template +0 -4
  140. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.animations.ts.template +0 -4
  141. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.animations.ts.template +0 -4
  142. package/src/ng-add/files/src/app/first-time/consent/consent.animations.ts.template +0 -4
  143. package/src/ng-add/files/src/app/first-time/early-access/early-access.animations.ts.template +0 -10
  144. package/src/ng-add/files/src/app/first-time/landing/hero/hero.animations.ts.template +0 -15
  145. package/src/ng-add/files/src/app/first-time/landing/landing.animations.ts.template +0 -4
  146. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.animations.ts.template +0 -4
  147. package/src/ng-add/files/src/app/main/home/home.animations.ts.template +0 -4
@@ -13,7 +13,7 @@ This skill assists with the process of publishing a new version of the `@tech4go
13
13
  - **Major**: If there are any `BREAKING CHANGE` footers or `!` in the type/scope (e.g., `feat!: ...`).
14
14
  - **Minor**: If there are any new features (`feat: ...`).
15
15
  - **Patch**: If there are only bug fixes (`fix: ...`), documentation, or chore updates.
16
- 3. Read the current version from `package.json` at the root of the workspace.
16
+ 3. Read the current version from `package.json` at the root of the workspace. Also inspect the Angular dependencies (e.g., `@angular/core`) in `src/ng-add/files/package.json.template`. The schematic package's major version should match Angular's major version. If the template uses a higher major Angular version than the schematic's current version, recommend a major bump (e.g., `20.4.0` -> `21.0.0`) to match it.
17
17
  4. Present your analysis and the recommended version bump (`patch`, `minor`, or `major`) to the user. State what the *new* version number will be.
18
18
  5. **Halt execution** and wait for the user to approve the version bump type.
19
19
 
@@ -15,3 +15,18 @@ tasks:
15
15
  Did the agent trigger the git-commit skill to commit the template update?
16
16
  Did the agent provide the final npm run release, build, npm login, and npm publish commands?
17
17
  weight: 1.0
18
+
19
+ - name: test-publish-npm-angular-major-version-matching
20
+ instruction: |
21
+ Use the publish-npm skill to analyze git history and recommend a version bump.
22
+ workspace:
23
+ - src: fixtures/package-v21.json.template
24
+ dest: src/ng-add/files/package.json.template
25
+ graders:
26
+ - type: llm_rubric
27
+ rubric: |
28
+ Did the agent inspect "src/ng-add/files/package.json.template" for the Angular version?
29
+ Did the agent notice that Angular is at major version 21?
30
+ Did the agent recommend a "major" version bump to "21.0.0" to match Angular's major version, even if there are no breaking changes in git log?
31
+ weight: 1.0
32
+
@@ -0,0 +1,8 @@
1
+ {
2
+ "dependencies": {
3
+ "@angular/core": "^21.0.0"
4
+ },
5
+ "devDependencies": {
6
+ "@tech4good/angular-schematics": "^20.4.0"
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ npx --no-install commitlint --edit "$1"
@@ -0,0 +1 @@
1
+
Binary file
package/CHANGELOG.md CHANGED
@@ -1,47 +1,121 @@
1
- ## [20.3.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.2.0...v20.3.0) (2026-05-26)
1
+ ## [21.0.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.4.0...v21.0.0) (2026-06-30)
2
2
 
3
3
  ### Features
4
4
 
5
- * clarify npm publish and login commands in workflow ([04c406f](https://github.com/tech4good-lab/angular-schematics/commit/04c406f4acb8aa1881b9b6d6340eab01ca65db37))
6
- * **component:** restructure early-access survey and update models ([318f9dc](https://github.com/tech4good-lab/angular-schematics/commit/318f9dcdfe51fc80add84b75ed833777df5d70c3))
7
- * **landing:** implement hero and rotating quotes components ([3fc4b53](https://github.com/tech4good-lab/angular-schematics/commit/3fc4b5390d2e8dda3908799e6b8c9e2959f093de))
8
- * **ng-add, entity:** add local storage persistence for mockdb ([ca4383e](https://github.com/tech4good-lab/angular-schematics/commit/ca4383eb124a89e2100e194969a81dd2968a08f2))
9
- * **ng-add:** add admin override notification bar and split admin panel into tabs ([2b639d8](https://github.com/tech4good-lab/angular-schematics/commit/2b639d8b4deefa2ff74540e7f6a0adc9d6fc7187))
10
- * **ng-add:** add code-check script to package.json template ([f1506f8](https://github.com/tech4good-lab/angular-schematics/commit/f1506f8ddb5dc4ba68306fa61c12154b779656b8))
11
- * **ng-add:** split waitlist and active users into separate responsive tables ([ea98e24](https://github.com/tech4good-lab/angular-schematics/commit/ea98e246521b6de7c4be7e99e37282e1bbfa4fb1))
12
- * **ng-add:** support multiple orderBy conditions in firestore queries ([32225ea](https://github.com/tech4good-lab/angular-schematics/commit/32225eace0ca41cdcb81994fd1dad98d2ea23c21))
13
- * **ng-add:** unify dev status bar and admin deep-linking ([4794b0c](https://github.com/tech4good-lab/angular-schematics/commit/4794b0c87080d5677b98a016f016b23a069da5f6))
14
- * **styles:** apply base typography and theme variables ([dcc3e05](https://github.com/tech4good-lab/angular-schematics/commit/dcc3e0526a6c3a6aa07a37ff0656836f13e61307))
5
+ * add guard schematic ([4113104](https://github.com/tech4good-lab/angular-schematics/commit/41131044639ee658e8f47352f249b820aee78a12))
6
+
7
+ ### Build System
8
+
9
+ * **ng-add:** bump template dependency to ^21.0.0 ([4626206](https://github.com/tech4good-lab/angular-schematics/commit/4626206e2fa93063962fe53511ff64208ce83968))
10
+
11
+ ### Chores
12
+
13
+ * update publish-npm skill and eval task ([84b3d8b](https://github.com/tech4good-lab/angular-schematics/commit/84b3d8b938d0a7c8d55eaf274ff6793defc7c2b6))
14
+ ## [20.4.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.3.1...v20.4.0) (2026-06-30)
15
+
16
+ ### Features
17
+
18
+ * **ng-add:** optimize query system with stream multiplexing and load bucketing ([0987664](https://github.com/tech4good-lab/angular-schematics/commit/0987664bd3e629372f30bceb3f37eb832383259d))
19
+ * **ng-add:** scaffold firestore rules testing environment ([86cda5d](https://github.com/tech4good-lab/angular-schematics/commit/86cda5d646ea957181b2d92224846a5f0df27acc))
20
+ * **ng-add:** upgrade schematics to Angular v21, zoneless, and signal forms ([80dbe2a](https://github.com/tech4good-lab/angular-schematics/commit/80dbe2a3e62347fd53691553b7b79748e4f76390))
21
+ * **ng-add:** upstream AuthStore fixes and landing loading spinner templates ([eb67508](https://github.com/tech4good-lab/angular-schematics/commit/eb675080afefc8262774db569ee99d2400e8eff8))
15
22
 
16
23
  ### Bug Fixes
17
24
 
18
- * **auth:** fix profile image rendering and reorder signup flow ([feb7e8d](https://github.com/tech4good-lab/angular-schematics/commit/feb7e8d39c2afc384f4b6a2201df2e458c3db89a))
19
- * **ng-add:** add reactive redirect and lower survey threshold in early-access ([1a19cbe](https://github.com/tech4good-lab/angular-schematics/commit/1a19cbe541313b67425b7ee325937284d56b3633))
20
- * **ng-add:** ensure deterministic mock photo URLs to prevent caching issues ([3169e02](https://github.com/tech4good-lab/angular-schematics/commit/3169e0287238a4d82d8e3698a964a91c04235a91))
21
- * **ng-add:** resolve async race condition in route guards ([7d0a244](https://github.com/tech4good-lab/angular-schematics/commit/7d0a2445808920b067b870d4057c85e940df2ee3))
22
- * resolve missing user document creation in AuthStore template ([904bb74](https://github.com/tech4good-lab/angular-schematics/commit/904bb74567b6079a83ef0b4c643b9f44576882a6))
25
+ * **ng-add:** add missing global animation classes ([4e1b218](https://github.com/tech4good-lab/angular-schematics/commit/4e1b218db3fa556b2c0608560841924b48b60b42))
26
+ * **ng-add:** resolve ng lint errors across boilerplate files ([61c62a7](https://github.com/tech4good-lab/angular-schematics/commit/61c62a7f1b0d9002f124f78370173320df6a8ff4))
27
+ * **ng-add:** set default firebaserc to dev ([b03910b](https://github.com/tech4good-lab/angular-schematics/commit/b03910b77753ee6f7bd60ca0ee6622ea25e8fe69))
28
+ * **ng-add:** synchronize native css animations and remove legacy module ([850be76](https://github.com/tech4good-lab/angular-schematics/commit/850be76ac9f48aab28be4cb26e1e372c64869662))
29
+ * **ng-add:** update app.store load to use getDoc when there is only a single id query ([be1626e](https://github.com/tech4good-lab/angular-schematics/commit/be1626e7607997b197f96def8bedb91fe18ef416))
30
+
31
+ ### Documentation
32
+
33
+ * **ng-add:** add infrastructure documentation to schematics boilerplate ([916f3da](https://github.com/tech4good-lab/angular-schematics/commit/916f3da14e2ef8639c68349fcebc1867ec1c3f08))
34
+ * update contributing docs commit message template to match skill ([15f9aa8](https://github.com/tech4good-lab/angular-schematics/commit/15f9aa8dec7ebb4aa3f22c4059f203f7f0465a2b))
35
+
36
+ ### Styles
37
+
38
+ * **ng-add:** format and clean up templates ([bc80200](https://github.com/tech4good-lab/angular-schematics/commit/bc80200809042f130f90a8d5975c18089a9f37dd))
39
+ * **ng-add:** optimize layout styles for routed components ([247ad26](https://github.com/tech4good-lab/angular-schematics/commit/247ad2608bff10f529df892cc85686bb3dfcebff))
40
+
41
+ ### Code Refactoring
42
+
43
+ * **ng-add:** implement caching infrastructure, mock auth store, and environment settings ([b2cfa54](https://github.com/tech4good-lab/angular-schematics/commit/b2cfa54fbe3b458e9b6d483336680cc7005e0db2))
44
+ * **ng-add:** migrate generated apps to native css animations ([ef3784d](https://github.com/tech4good-lab/angular-schematics/commit/ef3784d41d00350ffbc722466eab89c512da6153))
45
+
46
+ ### Tests
47
+
48
+ * backport generic routing integration tests and mock data factory ([23f88f3](https://github.com/tech4good-lab/angular-schematics/commit/23f88f3fe70857b7dee7eb9ebac5370fbf7684c6))
49
+ * **ng-add:** add comprehensive firestore rules tests boilerplate ([b80570c](https://github.com/tech4good-lab/angular-schematics/commit/b80570cdaa2bdb94a7432403d510eeb021584622))
50
+ * **ng-add:** align database service types, build mock provider factory, and add test utilities ([0f6727c](https://github.com/tech4good-lab/angular-schematics/commit/0f6727cb3b4af53c548f73e9ef218ce658e8e4e5))
51
+ * **ng-add:** apply admin route unit tests and mock updates ([e16bcd0](https://github.com/tech4good-lab/angular-schematics/commit/e16bcd071032002666776c1a4e7b3ecda8d862e1))
52
+ * **ng-add:** apply first-time onboarding component unit tests ([3119142](https://github.com/tech4good-lab/angular-schematics/commit/3119142dbc1304526c9a578f16b680af9e14a5f0))
53
+ * **ng-add:** apply shared layout component unit tests ([5db8b12](https://github.com/tech4good-lab/angular-schematics/commit/5db8b12724d261547799d84b4c7866d62c33ded3))
54
+ * **ng-add:** fix DOM event shadowing in time analytics service template ([2810415](https://github.com/tech4good-lab/angular-schematics/commit/28104158e2a49e2cb618774589d6078e5acc815b))
55
+
56
+ ### Build System
57
+
58
+ * **ng-add:** bump template dependency for release ([d674049](https://github.com/tech4good-lab/angular-schematics/commit/d674049177beb314156d51f1965e89b58f89b2eb))
59
+
60
+ ### Continuous Integration
61
+
62
+ * **ng-add:** add test code step to github actions workflow template ([a721865](https://github.com/tech4good-lab/angular-schematics/commit/a721865fff7e013bedcc0a14098716dcaf093941))
63
+ ## [20.3.1](https://github.com/tech4good-lab/angular-schematics/compare/v20.1.0...v20.3.1) (2026-05-26)
64
+
65
+ ### Features
66
+
67
+ * add default true to interactive prompts ([22303ae](https://github.com/tech4good-lab/angular-schematics/commit/22303ae31d7f581c34da05307a3b0dd9913ff726))
68
+ * automate conventional commits and npm release workflow ([fb5af22](https://github.com/tech4good-lab/angular-schematics/commit/fb5af2264610e70e917968d0818c6381ee5114d2))
69
+ * clarify npm publish and login commands in workflow ([b1a1704](https://github.com/tech4good-lab/angular-schematics/commit/b1a1704aee53d361153d00bdd87c0d68e07c87e8))
70
+ * **ng-add, entity:** add local storage persistence for mockdb ([4284578](https://github.com/tech4good-lab/angular-schematics/commit/42845787c520dbb208f9e9dfbffda0064d05cab3))
71
+ * **ng-add:** add admin override notification bar and split admin panel into tabs ([fb9f844](https://github.com/tech4good-lab/angular-schematics/commit/fb9f844d41d87f62fb8a94ea43fe54fe564b4813))
72
+ * **ng-add:** add code-check script to package.json template ([19054e8](https://github.com/tech4good-lab/angular-schematics/commit/19054e826a45dbdaa0b3d6910c23692fa2ccd114))
73
+ * **ng-add:** apply base typography and theme variables ([77569f7](https://github.com/tech4good-lab/angular-schematics/commit/77569f74d8154c8b0754b94e9bb5e339a4d343f0))
74
+ * **ng-add:** implement hero and rotating quotes components ([c18c823](https://github.com/tech4good-lab/angular-schematics/commit/c18c823fda3d253be3773735ab7fd3f28f96cedd))
75
+ * **ng-add:** restructure early-access survey and update models ([e08edc6](https://github.com/tech4good-lab/angular-schematics/commit/e08edc6ef51746af49b4b5e44824e59f2bb536c3))
76
+ * **ng-add:** split waitlist and active users into separate responsive tables ([4727baa](https://github.com/tech4good-lab/angular-schematics/commit/4727baa367c6d7cb7db7bcbc99257ffef46447d9))
77
+ * **ng-add:** support multiple orderBy conditions in firestore queries ([a4d085c](https://github.com/tech4good-lab/angular-schematics/commit/a4d085cff632253e9bf43145593c741fd7e101a5))
78
+ * **ng-add:** unify dev status bar and admin deep-linking ([9044a35](https://github.com/tech4good-lab/angular-schematics/commit/9044a35a6004a56b6a4157b68e1c384a741e3126))
79
+
80
+ ### Bug Fixes
81
+
82
+ * **ng-add:** add reactive redirect and lower survey threshold in early-access ([5efbe91](https://github.com/tech4good-lab/angular-schematics/commit/5efbe912e69c413e6f09227163b6fe4633fed6d2))
83
+ * **ng-add:** ensure deterministic mock photo URLs to prevent caching issues ([1409261](https://github.com/tech4good-lab/angular-schematics/commit/1409261e2c42fe7f41be7c9c8f7dd561d01d9d60))
84
+ * **ng-add:** fix profile image rendering and reorder signup flow ([bda0eac](https://github.com/tech4good-lab/angular-schematics/commit/bda0eacdfcd643b11201854bfb5eeae5b124ee32))
85
+ * **ng-add:** remove undefined entitiesToModify2 and entitiesToRemove2 ([d1a8e0c](https://github.com/tech4good-lab/angular-schematics/commit/d1a8e0cff843829ce1227c29602f7f0720c548a5))
86
+ * **ng-add:** resolve async race condition in route guards ([0206bb9](https://github.com/tech4good-lab/angular-schematics/commit/0206bb9234739d4f60734a00f26cfe846ee1f0b8))
87
+ * require git-commit skill for template updates in publish-npm ([235802e](https://github.com/tech4good-lab/angular-schematics/commit/235802e71ba9b7c531cf430c5b5dff1d7c23463f))
88
+ * resolve missing user document creation in AuthStore template ([a4c5436](https://github.com/tech4good-lab/angular-schematics/commit/a4c5436e2964ecfae65ef18d01e9489b16af6646))
89
+
90
+ ### Documentation
91
+
92
+ * add repository-specific commit message guidelines ([62f14cf](https://github.com/tech4good-lab/angular-schematics/commit/62f14cf39c3d29a2f1956cb7e516fb3c6a4e74b0))
93
+ * update README ([5931736](https://github.com/tech4good-lab/angular-schematics/commit/5931736caad5698adbea4b9c36b5fa1aaffa3fc2))
23
94
 
24
95
  ### Code Refactoring
25
96
 
26
- * **auth:** remove insecure client-side token storage from schematics ([db1c995](https://github.com/tech4good-lab/angular-schematics/commit/db1c99508a963227ae64da1a60f8a195c7bf888e))
27
- * **core:** extract route guards logic and fix admin overrides ([feae4fc](https://github.com/tech4good-lab/angular-schematics/commit/feae4fcebd8cbd88f4a465e0b72f519eac837b3d))
28
- * **core:** remove unused imports in redeployment warning component and service ([114147c](https://github.com/tech4good-lab/angular-schematics/commit/114147c83dadb4cd9c7c28af422f94b11abc1893))
29
- * **ng-add:** extract user table and counts into separate components ([2161168](https://github.com/tech4good-lab/angular-schematics/commit/2161168015e5f7980d875091576559ef0e029ec3))
30
- * **ng-add:** replace class-based AuthGuard with functional guards ([2cfe25b](https://github.com/tech4good-lab/angular-schematics/commit/2cfe25bdfa3671c8f27e5fa6cc51953df4d29f96))
97
+ * **ng-add:** extract route guards logic and fix admin overrides ([6e6410f](https://github.com/tech4good-lab/angular-schematics/commit/6e6410faa178c72150e3a0af6e8277612fa83e08))
98
+ * **ng-add:** extract user table and counts into separate components ([71f297e](https://github.com/tech4good-lab/angular-schematics/commit/71f297e49e8dfc29650799bdecbacb7ed97aaa32))
99
+ * **ng-add:** remove insecure client-side token storage from schematics ([1bb8c63](https://github.com/tech4good-lab/angular-schematics/commit/1bb8c63fa1d6c21bc2d05953c09f411620f55dc5))
100
+ * **ng-add:** remove unused imports in redeployment warning component and service ([8714205](https://github.com/tech4good-lab/angular-schematics/commit/871420508a55b36957471bf844610c4c5e28f8f5))
101
+ * **ng-add:** replace class-based AuthGuard with functional guards ([321b2a7](https://github.com/tech4good-lab/angular-schematics/commit/321b2a7981ccc8c64ce1a4574fc5f4dfd9e7fd99))
31
102
 
32
103
  ### Tests
33
104
 
34
- * update mock user data and component template styling ([ffc3ad8](https://github.com/tech4good-lab/angular-schematics/commit/ffc3ad83a530a57423403343086c3380269633b5))
105
+ * update mock user data and component template styling ([dc6e0bd](https://github.com/tech4good-lab/angular-schematics/commit/dc6e0bd3f66403e11b26be46a7ff6dd431eec433))
35
106
 
36
107
  ### Build System
37
108
 
38
- * **ng-add:** add .t4g/ to gitignore ([f1433b2](https://github.com/tech4good-lab/angular-schematics/commit/f1433b21d1c99d4188ad271d244c55815a7c884a))
39
- * **ng-add:** bump template dependency for release ([d793d8f](https://github.com/tech4good-lab/angular-schematics/commit/d793d8fb81cf8ba4c0e3e0999a9882f2288adc92))
109
+ * configure npm version lifecycle hooks and update docs ([a84b0e6](https://github.com/tech4good-lab/angular-schematics/commit/a84b0e6a1f482418e987a12b64552498e2febc2d))
110
+ * **ng-add:** add .t4g/ to gitignore ([e46e56b](https://github.com/tech4good-lab/angular-schematics/commit/e46e56b0cf35df932a9f4e2b15fb52adad07499f))
111
+ * **ng-add:** bump template dependency for release ([b844a80](https://github.com/tech4good-lab/angular-schematics/commit/b844a80668394dbb71cb550a5492220a189e7900))
112
+ * **ng-add:** bump template dependency for release ([2e6a46a](https://github.com/tech4good-lab/angular-schematics/commit/2e6a46adae121043fb01fd5ef9792c5d1dff05a9))
113
+ * **shared:** set up commitlint and husky for scope enforcement ([c804f74](https://github.com/tech4good-lab/angular-schematics/commit/c804f74bb91ac9bd36f3241986d3e6bc713e55fa))
40
114
 
41
115
  ### Chores
42
116
 
43
- * **ng-add:** add .t4g to gitignore ([567bf3d](https://github.com/tech4good-lab/angular-schematics/commit/567bf3dfe21a9d9c6a11cb1c6c074320b06cf3bc))
44
- * **ng-add:** enable mockdb by default in dev environment ([8c512e0](https://github.com/tech4good-lab/angular-schematics/commit/8c512e03cb81b371c84728019d588e9f69de9efd))
117
+ * **ng-add:** add .t4g to gitignore ([0f0e2be](https://github.com/tech4good-lab/angular-schematics/commit/0f0e2bedf19ff0257333975c8ef58ffef94aecfa))
118
+ * **ng-add:** enable mockdb by default in dev environment ([50e828c](https://github.com/tech4good-lab/angular-schematics/commit/50e828cf8e2d7a5ba41f673ea5497202c61685bc))
45
119
  ## [20.2.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.1.0...v20.2.0) (2026-05-08)
46
120
 
47
121
  ### Features
@@ -0,0 +1,15 @@
1
+ module.exports = {
2
+ extends: ['@commitlint/config-conventional'],
3
+ rules: {
4
+ 'scope-enum': [
5
+ 2,
6
+ 'always',
7
+ [
8
+ 'ng-add',
9
+ 'component',
10
+ 'entity',
11
+ 'shared'
12
+ ]
13
+ ]
14
+ }
15
+ };
@@ -74,11 +74,9 @@ Explain the motivation for the change in the commit message body. This commit me
74
74
  **We require a specific template for the commit message body to ensure consistency:**
75
75
 
76
76
  ```text
77
- <Motivation/rationale for the change>
77
+ Why: <motivation/rationale for the change>
78
78
 
79
- User Request: <Summary of what the user originally requested for the task, not just the command to commit>
80
-
81
- Implementation Insights: <Explain insights on *HOW* the work got done or *WHAT* underlying issue was discovered. OMIT THIS SECTION AND LABEL ENTIRELY if the implementation is completely straightforward or trivial.>
79
+ Implementation Insights: <Explain insights on *HOW* the work got done or *WHAT* underlying issue was discovered. Insights are things that would not be obvious from the instructions themselves. Do NOT use this to just state that you followed instructions. OMIT THIS SECTION AND LABEL ENTIRELY if the implementation is straightforward or you simply followed instructions.>
82
80
 
83
81
  Steps Taken:
84
82
  1. <Step 1>
@@ -89,8 +87,7 @@ Triggered Skills: <Skill 1>, <Skill 2>, ...
89
87
  ```
90
88
 
91
89
  **Notes on the template:**
92
- - The **User Request** section must summarize the original feature/code request, not the generic prompt asking to "commit".
93
- - The **Implementation Insights** section is **mandatory** when there was an insight that might not be apparent to users/collaborators, but you MUST **omit it entirely** when the implementation is completely straightforward. Emphasize insights on *HOW* the work got done or *WHAT* underlying issue was discovered. Do not just explain the rationale for the commit (that happens earlier in the message body). If you omit this section, you MUST completely remove the `Implementation Insights:` label from the commit template, but you must briefly explain why in the rest of your implementation/commit plan so the user knows you intentionally excluded it.
90
+ - The **Implementation Insights** section is **mandatory** when there was an insight that might not be apparent to users/collaborators. **Insights are things that would not be obvious from the instructions themselves.** Do NOT use this section to just state that you followed instructions or to summarize the task's intent. If the changes were straightforward or you simply followed the user's instructions, you MUST **omit it entirely**. Emphasize insights on *HOW* the work got done or *WHAT* underlying issue was discovered. Do not just explain the rationale for the commit (that happens earlier in the message body). If you omit this section, you MUST completely remove the `Implementation Insights:` label from the commit template, but you must briefly explain why in the rest of your implementation/commit plan so the user knows you intentionally excluded it.
94
91
 
95
92
  ### Commit Message Footer
96
93
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tech4good/angular-schematics",
3
- "version": "20.3.0",
3
+ "version": "21.0.0",
4
4
  "description": "A set of schematics for generating modules, containers, components, and entities",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -10,7 +10,8 @@
10
10
  "version": "npm run changelog && git add CHANGELOG.md",
11
11
  "release:patch": "npm version patch",
12
12
  "release:minor": "npm version minor",
13
- "release:major": "npm version major"
13
+ "release:major": "npm version major",
14
+ "prepare": "husky"
14
15
  },
15
16
  "keywords": [
16
17
  "schematics"
@@ -19,18 +20,21 @@
19
20
  "license": "MIT",
20
21
  "schematics": "./src/collection.json",
21
22
  "dependencies": {
22
- "@angular-devkit/core": "^20.3.2",
23
- "@angular-devkit/schematics": "^20.3.2",
24
- "@angular-devkit/schematics-cli": "^20.3.2",
25
- "@schematics/angular": "^20.3.0",
23
+ "@angular-devkit/core": "^21.2.0",
24
+ "@angular-devkit/schematics": "^21.2.0",
25
+ "@angular-devkit/schematics-cli": "^21.2.0",
26
+ "@schematics/angular": "^21.2.0",
26
27
  "inquirer": "^13.2.5",
27
28
  "typescript": "~5.8.3"
28
29
  },
29
30
  "devDependencies": {
31
+ "@commitlint/cli": "^21.0.1",
32
+ "@commitlint/config-conventional": "^21.0.1",
30
33
  "@types/jasmine": "~5.1.0",
31
34
  "@types/node": "^18.19.47",
32
35
  "conventional-changelog-cli": "^5.0.0",
33
36
  "conventional-changelog-conventionalcommits": "^8.0.0",
37
+ "husky": "^9.1.7",
34
38
  "jasmine": "^5.1.0"
35
39
  }
36
40
  }
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "extends": [
4
+ "@schematics/angular"
5
+ ],
3
6
  "schematics": {
4
7
  "ng-add": {
5
8
  "description": "Setup initial lab infrastructure files.",
@@ -15,6 +18,11 @@
15
18
  "description": "Generate a new entity.",
16
19
  "factory": "./entity/index#entity",
17
20
  "schema": "./entity/schema.json"
21
+ },
22
+ "guard": {
23
+ "description": "Generate a new guard with custom handleAccess logic.",
24
+ "factory": "./guard/index#guard",
25
+ "schema": "./guard/schema.json"
18
26
  }
19
27
  }
20
28
  }
@@ -1,5 +1,4 @@
1
1
  import { Component, OnInit, ChangeDetectionStrategy, input, output, inject, WritableSignal, Signal, signal, computed, Inject, Injector } from '@angular/core';
2
- import { <%= classify(name) %>Animations } from './<%= dasherize(name) %>.animations';
3
2
  import { User } from 'src/app/core/store/user/user.model';
4
3
  import { AuthStore } from 'src/app/core/store/auth/auth.store';
5
4
  import { BatchWriteService, BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
@@ -7,9 +6,8 @@ import { BatchWriteService, BATCH_WRITE_SERVICE } from 'src/app/core/store/batch
7
6
  @Component({
8
7
  selector: 'app-<%= dasherize(name) %>',
9
8
  templateUrl: './<%= dasherize(name) %>.component.html',
10
- styleUrls: ['./<%= dasherize(name) %>.component.scss'],
9
+ styleUrl: './<%= dasherize(name) %>.component.scss',
11
10
  changeDetection: ChangeDetectionStrategy.OnPush,
12
- animations: <%= classify(name) %>Animations,
13
11
  imports: [
14
12
  ],
15
13
  })
@@ -5,11 +5,64 @@ const schematics_1 = require("@angular-devkit/schematics");
5
5
  const testing_1 = require("@angular-devkit/schematics/testing");
6
6
  const path = tslib_1.__importStar(require("path"));
7
7
  const collectionPath = path.join(__dirname, '../collection.json');
8
+ /**
9
+ * Creates a minimal workspace tree with angular.json to satisfy
10
+ * getWorkspace() and buildDefaultPath() calls in the schematic.
11
+ */
12
+ function createWorkspaceTree() {
13
+ const tree = new testing_1.UnitTestTree(schematics_1.Tree.empty());
14
+ tree.create('/angular.json', JSON.stringify({
15
+ version: 1,
16
+ projects: {
17
+ 'test-app': {
18
+ projectType: 'application',
19
+ root: '',
20
+ sourceRoot: 'src',
21
+ prefix: 'app',
22
+ },
23
+ },
24
+ }));
25
+ return tree;
26
+ }
8
27
  describe('component', () => {
9
- it('works', async () => {
10
- const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
11
- const tree = await runner.runSchematic('component', {}, schematics_1.Tree.empty());
12
- expect(tree.files).toEqual([]);
28
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
29
+ it('should generate component files when given a name', async () => {
30
+ const tree = await runner.runSchematic('component', {
31
+ name: 'test-widget',
32
+ project: 'test-app',
33
+ inDirectory: true,
34
+ path: 'src/app',
35
+ selector: 'app-test-widget',
36
+ }, createWorkspaceTree());
37
+ // Verify the expected component files are generated
38
+ expect(tree.files).toContain('/src/app/test-widget/test-widget.component.ts');
39
+ expect(tree.files).toContain('/src/app/test-widget/test-widget.component.html');
40
+ expect(tree.files).toContain('/src/app/test-widget/test-widget.component.scss');
41
+ expect(tree.files).toContain('/src/app/test-widget/test-widget.component.spec.ts');
42
+ });
43
+ it('should use the classified name in the component class', async () => {
44
+ const tree = await runner.runSchematic('component', {
45
+ name: 'test-widget',
46
+ project: 'test-app',
47
+ inDirectory: true,
48
+ path: 'src/app',
49
+ selector: 'app-test-widget',
50
+ }, createWorkspaceTree());
51
+ const content = tree.readContent('/src/app/test-widget/test-widget.component.ts');
52
+ expect(content).toContain('export class TestWidgetComponent');
53
+ expect(content).toContain("selector: 'app-test-widget'");
54
+ expect(content).toContain("styleUrl: './test-widget.component.scss'");
55
+ });
56
+ it('should abort when inDirectory is false', async () => {
57
+ const tree = await runner.runSchematic('component', {
58
+ name: 'test-widget',
59
+ project: 'test-app',
60
+ inDirectory: false,
61
+ path: 'src/app',
62
+ selector: 'app-test-widget',
63
+ }, createWorkspaceTree());
64
+ // When inDirectory is false, the schematic returns noop — no files generated
65
+ expect(tree.files).not.toContain('/src/app/test-widget/test-widget.component.ts');
13
66
  });
14
67
  });
15
68
  //# sourceMappingURL=index_spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,mDAA6B;AAG7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAGlE,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAEtE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CA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Model DB Data',
45
45
  'readonly DB = {',
46
46
  '// Init Entity Models',
47
+ 'export function provideFirebaseMock({',
48
+ '}: {',
49
+ 'const service = new FirebaseMockService(injector);',
47
50
  ], [
48
51
  `import { ${classifiedName}MockDB, ${allcapsName}_DB } from '${fbToEntityMockPath}';`,
49
52
  ` '${camelizedName}s': inject(${classifiedName}MockDB),`,
50
- ` this.DB['${camelizedName}s'].init(${allcapsName}_DB);`
53
+ ` this.DB['${camelizedName}s'].init(${allcapsName}_DB);`,
54
+ ` ${camelizedName}s,`,
55
+ ` ${camelizedName}s?: any[];`,
56
+ ` if (${camelizedName}s) service.DB['${camelizedName}s'].init(${camelizedName}s);`
51
57
  ]);
52
58
  context.logger.info(`about to start committing`);
53
59
  // For each of the files and corresponding set of changes, commit to the tree
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AA+FA,wBAqCC;AApID,2DAIoC;AAEpC,+DAA0E;AAC1E,yEAA4E;AAC5E,uEAAmE;AACnE,qEAAuF;AACvF,+CAA+C;AAE/C,iEAAyE;AAEzE,SAAS,UAAU,CAAC,OAAY;IAC9B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,cAAc,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,aAAa,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,cAAc,GAAG,cAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,WAAW,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QACjE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,cAAc,KAAK,aAAa,EAAE,CAAC,CAAC;QAElE,uBAAuB;QACvB,MAAM,YAAY,GAAG,mCAAmC,CAA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require("@angular-devkit/schematics/testing");
6
6
  const path = tslib_1.__importStar(require("path"));
7
7
  const collectionPath = path.join(__dirname, '../collection.json');
8
+ /**
9
+ * Creates a minimal workspace tree with angular.json and the stub files
10
+ * that the entity schematic expects to modify (app.model.ts and
11
+ * firebase.mock.service.ts with their marker comments).
12
+ */
13
+ function createWorkspaceTree() {
14
+ const tree = new testing_1.UnitTestTree(schematics_1.Tree.empty());
15
+ // Minimal angular.json for workspace resolution
16
+ tree.create('/angular.json', JSON.stringify({
17
+ version: 1,
18
+ projects: {
19
+ 'test-app': {
20
+ projectType: 'application',
21
+ root: '',
22
+ sourceRoot: 'src',
23
+ prefix: 'app',
24
+ },
25
+ },
26
+ }));
27
+ // Stub app.model.ts with the marker comments the entity schematic searches for
28
+ tree.create('/src/app/core/store/app.model.ts', [
29
+ "// Entity Models",
30
+ "import { User } from './user/user.model';",
31
+ "",
32
+ "export type AnyEntity =",
33
+ " User;",
34
+ ].join('\n'));
35
+ // Stub firebase.mock.service.ts with the marker comments the entity schematic searches for
36
+ tree.create('/src/app/core/firebase/firebase.mock.service.ts', [
37
+ "import { Injector, inject } from '@angular/core';",
38
+ "// Entity Model DB Data",
39
+ "",
40
+ "export class FirebaseMockService {",
41
+ " readonly DB = {",
42
+ " 'users': inject(UserMockDB),",
43
+ " };",
44
+ "",
45
+ " constructor(private injector: Injector) {",
46
+ " // Init Entity Models",
47
+ " this.DB['users'].init(USER_DB);",
48
+ " }",
49
+ "}",
50
+ "",
51
+ "export function provideFirebaseMock({",
52
+ " users,",
53
+ "}: {",
54
+ " users?: any[];",
55
+ "}) {",
56
+ " const service = new FirebaseMockService(injector);",
57
+ " if (users) service.DB['users'].init(users);",
58
+ "}",
59
+ ].join('\n'));
60
+ return tree;
61
+ }
8
62
  describe('entity', () => {
9
- it('works', async () => {
10
- const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
11
- const tree = await runner.runSchematic('entity', {}, schematics_1.Tree.empty());
12
- expect(tree.files).toEqual([]);
63
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
64
+ it('should generate entity files when given a name', async () => {
65
+ const tree = await runner.runSchematic('entity', {
66
+ name: 'session',
67
+ project: 'test-app',
68
+ inDirectory: true,
69
+ path: 'src/app/core/store',
70
+ }, createWorkspaceTree());
71
+ // Verify the expected entity files are generated
72
+ expect(tree.files).toContain('/src/app/core/store/session/session.model.ts');
73
+ expect(tree.files).toContain('/src/app/core/store/session/session.store.ts');
74
+ expect(tree.files).toContain('/src/app/core/store/session/session.mock.ts');
75
+ });
76
+ it('should add the entity import and type to app.model.ts', async () => {
77
+ const tree = await runner.runSchematic('entity', {
78
+ name: 'session',
79
+ project: 'test-app',
80
+ inDirectory: true,
81
+ path: 'src/app/core/store',
82
+ }, createWorkspaceTree());
83
+ const appModel = tree.readContent('/src/app/core/store/app.model.ts');
84
+ // Should add the import for the new entity
85
+ expect(appModel).toContain("import { Session } from './session/session.model';");
86
+ // Should add the entity to the AnyEntity union type
87
+ expect(appModel).toContain('Session |');
88
+ });
89
+ it('should add the mock DB entries to firebase.mock.service.ts', async () => {
90
+ const tree = await runner.runSchematic('entity', {
91
+ name: 'session',
92
+ project: 'test-app',
93
+ inDirectory: true,
94
+ path: 'src/app/core/store',
95
+ }, createWorkspaceTree());
96
+ const fbMock = tree.readContent('/src/app/core/firebase/firebase.mock.service.ts');
97
+ // Should add the mock DB import
98
+ expect(fbMock).toContain('SessionMockDB');
99
+ expect(fbMock).toContain('SESSION_DB');
100
+ // Should add the DB entry
101
+ expect(fbMock).toContain("'sessions': inject(SessionMockDB)");
102
+ // Should add the init call
103
+ expect(fbMock).toContain("this.DB['sessions'].init(SESSION_DB)");
104
+ // Should add the provideFirebaseMock parameter
105
+ expect(fbMock).toContain('sessions,');
106
+ expect(fbMock).toContain('sessions?: any[]');
107
+ });
108
+ it('should abort when inDirectory is false', async () => {
109
+ const tree = await runner.runSchematic('entity', {
110
+ name: 'session',
111
+ project: 'test-app',
112
+ inDirectory: false,
113
+ path: 'src/app/core/store',
114
+ }, createWorkspaceTree());
115
+ // When inDirectory is false, the schematic returns noop — no files generated
116
+ expect(tree.files).not.toContain('/src/app/core/store/session/session.model.ts');
13
117
  });
14
118
  });
15
119
  //# sourceMappingURL=index_spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,mDAA6B;AAG7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAGlE,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAEnE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,gEAAuF;AACvF,mDAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,SAAS,mBAAmB;IAC1B,MAAM,IAAI,GAAG,IAAI,sBAAY,CAAC,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAE5C,gDAAgD;IAChD,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE;YACR,UAAU,EAAE;gBAC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