@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
@@ -0,0 +1,45 @@
1
+ import { Router } from '@angular/router';
2
+ import { handleAccess } from './<%= dasherize(name) %>.guard';
3
+ import { User, AccessState } from 'src/app/core/store/user/user.model';
4
+ import { Timestamp } from '@angular/fire/firestore';
5
+
6
+ describe('<%= camelize(name) %> (handleAccess)', () => {
7
+ let router: Router;
8
+ let route: any;
9
+ let state: any;
10
+
11
+ function createUser(overrides?: Partial<User>): User {
12
+ return {
13
+ __id: 'user-1',
14
+ name: 'Test User',
15
+ email: 'test@test.com',
16
+ isAdmin: false,
17
+ isMentor: false,
18
+ accessState: AccessState.DONE,
19
+ consented: true,
20
+ _createdAt: Timestamp.now(),
21
+ _updatedAt: Timestamp.now(),
22
+ _deleted: false,
23
+ ...overrides,
24
+ };
25
+ }
26
+
27
+ beforeEach(() => {
28
+ router = {
29
+ navigate: jest.fn(),
30
+ } as unknown as Router;
31
+
32
+ route = { queryParams: {} };
33
+ // replace with url being guarded
34
+ state = { url: '/test-url' };
35
+ });
36
+
37
+ // replace with your guard functionality
38
+ it('allows access by default', () => {
39
+ const user = createUser();
40
+ const result = handleAccess(user, router, route, state);
41
+
42
+ expect(result).toBe(true);
43
+ expect(router.navigate).not.toHaveBeenCalled();
44
+ });
45
+ });
@@ -0,0 +1,32 @@
1
+ import { inject } from '@angular/core';
2
+ import { CanActivateFn, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
3
+ import { map } from 'rxjs/operators';
4
+ import { AuthService } from 'src/app/core/auth/auth.service';
5
+ import { User } from 'src/app/core/store/user/user.model';
6
+
7
+ /**
8
+ * Route guard access handler for <%= camelize(name) %>.
9
+ */
10
+ export function handleAccess(
11
+ user: User | null | undefined,
12
+ router: Router,
13
+ route: ActivatedRouteSnapshot,
14
+ state: RouterStateSnapshot,
15
+ ): boolean {
16
+ // TODO: Implement access checks for <%= camelize(name) %>
17
+ return true;
18
+ }
19
+
20
+ /**
21
+ * Route guard <%= camelize(name) %> that delegates to `handleAccess`.
22
+ */
23
+ export const <%= camelize(name) %>: CanActivateFn = (route, state) => {
24
+ const auth = inject(AuthService);
25
+ const router = inject(Router);
26
+
27
+ return auth.resolveUser().pipe(
28
+ map((user) => {
29
+ return handleAccess(user, router, route, state);
30
+ }),
31
+ );
32
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function guard(options: any): Rule;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.guard = guard;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const parse_name_1 = require("@schematics/angular/utility/parse-name");
6
+ const workspace_1 = require("@schematics/angular/utility/workspace");
7
+ const core_1 = require("@angular-devkit/core");
8
+ function guard(options) {
9
+ return async (tree, context) => {
10
+ // Make sure the command is executed in the directory where the guard should be generated
11
+ if (!options.inDirectory) {
12
+ context.logger.info("Please navigate to the directory where you want to generate the guard.");
13
+ return (0, schematics_1.noop)();
14
+ }
15
+ const workspace = await (0, workspace_1.getWorkspace)(tree);
16
+ const project = workspace.projects.get(options.project);
17
+ if (!project) {
18
+ throw new schematics_1.SchematicsException(`Project "${options.project}" does not exist.`);
19
+ }
20
+ if (options.path === undefined) {
21
+ options.path = (0, workspace_1.buildDefaultPath)(project);
22
+ }
23
+ const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
24
+ options.name = parsedPath.name;
25
+ options.path = parsedPath.path;
26
+ const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
27
+ (0, schematics_1.applyTemplates)({
28
+ ...core_1.strings,
29
+ ...options,
30
+ }),
31
+ (0, schematics_1.move)(parsedPath.path),
32
+ ]);
33
+ return (0, schematics_1.chain)([
34
+ (0, schematics_1.mergeWith)(templateSource)
35
+ ]);
36
+ };
37
+ }
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AASA,sBAoCC;AA7CD,2DAIoC;AACpC,uEAAmE;AACnE,qEAAuF;AACvF,+CAA+C;AAE/C,SAAgB,KAAK,CAAC,OAAY;IAChC,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QAErD,yFAAyF;QACzF,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;YAC9F,OAAO,IAAA,iBAAI,GAAE,CAAC;QAChB,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAiB,CAAC,CAAC;QAElE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,gCAAmB,CAAC,YAAY,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;QAChF,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,GAAG,IAAA,4BAAgB,EAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,UAAU,GAAG,IAAA,sBAAS,EAAC,OAAO,CAAC,IAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACnE,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC/B,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAE/B,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YAC3C,IAAA,2BAAc,EAAC;gBACb,GAAG,cAAO;gBACV,GAAG,OAAO;aACX,CAAC;YACF,IAAA,iBAAI,EAAC,UAAU,CAAC,IAAI,CAAC;SACtB,CAAC,CAAC;QAEH,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,sBAAS,EAAC,cAAc,CAAC;SAC1B,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const testing_1 = require("@angular-devkit/schematics/testing");
6
+ const path = tslib_1.__importStar(require("path"));
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
+ }
27
+ describe('guard', () => {
28
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
29
+ it('should generate guard files when given a name', async () => {
30
+ const tree = await runner.runSchematic('guard', {
31
+ name: 'require-profile',
32
+ project: 'test-app',
33
+ inDirectory: true,
34
+ path: 'src/app',
35
+ }, createWorkspaceTree());
36
+ // Verify the expected guard files are generated
37
+ expect(tree.files).toContain('/src/app/require-profile.guard.ts');
38
+ expect(tree.files).toContain('/src/app/require-profile.guard.spec.ts');
39
+ });
40
+ it('should use the camelized name in the guard export and handleAccess in spec', async () => {
41
+ const tree = await runner.runSchematic('guard', {
42
+ name: 'require-profile',
43
+ project: 'test-app',
44
+ inDirectory: true,
45
+ path: 'src/app',
46
+ }, createWorkspaceTree());
47
+ const guardContent = tree.readContent('/src/app/require-profile.guard.ts');
48
+ expect(guardContent).toContain('export const requireProfile: CanActivateFn');
49
+ expect(guardContent).toContain('export function handleAccess');
50
+ const specContent = tree.readContent('/src/app/require-profile.guard.spec.ts');
51
+ expect(specContent).toContain("describe('requireProfile (handleAccess)'");
52
+ });
53
+ it('should abort when inDirectory is false', async () => {
54
+ const tree = await runner.runSchematic('guard', {
55
+ name: 'require-profile',
56
+ project: 'test-app',
57
+ inDirectory: false,
58
+ path: 'src/app',
59
+ }, createWorkspaceTree());
60
+ // When inDirectory is false, the schematic returns noop โ€” no files generated
61
+ expect(tree.files).not.toContain('/src/app/require-profile.guard.ts');
62
+ });
63
+ });
64
+ //# sourceMappingURL=index_spec.js.map
@@ -0,0 +1 @@
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;;;GAGG;AACH,SAAS,mBAAmB;IAC1B,MAAM,IAAI,GAAG,IAAI,sBAAY,CAAC,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC5C,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE;YACR,UAAU,EAAE;gBACV,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,EAAE;gBACR,UAAU,EAAE,KAAK;gBACjB,MAAM,EAAE,KAAK;aACd;SACF;KACF,CAAC,CAAC,CAAC;IACJ,OAAO,IAAI,CAAC;AACd,CAAC;AAED,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAErE,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;YAC9C,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,SAAS;SAChB,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAE1B,gDAAgD;QAChD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;QAClE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,wCAAwC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4EAA4E,EAAE,KAAK,IAAI,EAAE;QAC1F,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;YAC9C,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,SAAS;SAChB,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAE1B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,mCAAmC,CAAC,CAAC;QAC3E,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,4CAA4C,CAAC,CAAC;QAC7E,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;QAE/D,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC;QAC/E,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,0CAA0C,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;YAC9C,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,SAAS;SAChB,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAE1B,6EAA6E;QAC7E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "GuardSchema",
4
+ "title": "Guard Schema",
5
+ "type": "object",
6
+ "description": "Creates a new route guard in the default project.",
7
+ "properties": {
8
+ "index": {
9
+ "type": "number",
10
+ "default": 1
11
+ },
12
+ "path": {
13
+ "type": "string",
14
+ "format": "path",
15
+ "description": "The path at which to create the guard file, relative to the current workspace.",
16
+ "visible": false,
17
+ "$default": {
18
+ "$source": "workingDirectory"
19
+ }
20
+ },
21
+ "project": {
22
+ "type": "string",
23
+ "description": "The name of the project.",
24
+ "$default": {
25
+ "$source": "projectName"
26
+ }
27
+ },
28
+ "name": {
29
+ "type": "string",
30
+ "description": "The name of the guard.",
31
+ "$default": {
32
+ "$source": "argv",
33
+ "index": 0
34
+ },
35
+ "x-prompt": "What name would you like to use for the guard?"
36
+ },
37
+ "inDirectory": {
38
+ "type": "boolean",
39
+ "default": true,
40
+ "x-prompt": "Are you currently in the directory where you want to generate the guard?"
41
+ }
42
+ },
43
+ "required": [
44
+ "name"
45
+ ]
46
+ }
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "projects": {
3
- "default": "<%= dasherize(project) %>",
4
- "dev": "<%= dasherize(project) %>-dev"
3
+ "default": "<%= dasherize(project) %>-dev",
4
+ "dev": "<%= dasherize(project) %>-dev",
5
+ "prod": "<%= dasherize(project) %>-prod"
5
6
  },
6
7
  "targets": {},
7
8
  "etags": {}
@@ -1,59 +1,125 @@
1
1
  # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run the linter on the relevant version of node
2
2
  # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
3
 
4
- name: Angular Github CI
4
+ name: โšก Angular Github CI
5
5
 
6
6
  on:
7
+ workflow_dispatch:
7
8
  push:
8
- branches: [ master, main, develop ]
9
+ branches: [master, main, develop]
9
10
  pull_request:
11
+ types: [opened, synchronize]
10
12
 
11
13
  jobs:
12
14
  build:
13
-
14
15
  runs-on: ubuntu-latest
16
+ timeout-minutes: 15
15
17
 
16
18
  strategy:
17
19
  matrix:
18
20
  node-version: [22.x]
19
21
 
20
22
  steps:
21
- - run: echo "๐ŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
22
- - run: echo "๐Ÿง This job is now running on a ${{ runner.os }} server hosted by GitHub!"
23
- - run: echo "๐Ÿ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
24
- - name: Check out repository code
25
- uses: actions/checkout@v2
26
- - run: echo "๐Ÿ’ก The ${{ github.repository }} repository has been cloned to the runner."
27
- - run: echo "๐Ÿ–ฅ๏ธ The workflow is now ready to test your code on the runner."
28
- - name: Use Node.js ${{ matrix.node-version }}
29
- uses: actions/setup-node@v2
23
+ - name: ๐Ÿš€ Start Job
24
+ run: echo "Job triggered by ${{ github.event_name }} event on ${{ github.ref }}"
25
+
26
+ - name: ๐Ÿ“‚ Checkout Repository
27
+ uses: actions/checkout@v4
28
+ with:
29
+ fetch-depth: 0
30
+
31
+ - name: ๐Ÿ”ง Setup Node.js ${{ matrix.node-version }}
32
+ uses: actions/setup-node@v4
30
33
  with:
31
34
  node-version: ${{ matrix.node-version }}
32
35
  cache: 'npm'
33
- - run: npm ci
34
- - run: npm run build
35
- - name: List files in distribution directory
36
- run: |
37
- ls -R ./dist
38
- - run: npm run lint
39
- - run: echo "๐Ÿ This job's status is ${{ job.status }}."
40
- - name: Send Slack notification on success
41
- if: ${{ success() }}
42
- uses: rtCamp/action-slack-notify@v2
43
- env:
44
- SLACK_CHANNEL: bots-<%= dasherize(project) %>
45
- SLACK_USERNAME: Github Actions
46
- SLACK_COLOR: ${{ job.status }}
47
- SLACK_MESSAGE: ":white_check_mark: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}"
48
- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
49
- MSG_MINIMAL: commit,actions url
50
- - name: Send Slack notification on failure
51
- if: ${{ failure() }}
52
- uses: rtCamp/action-slack-notify@v2
53
- env:
54
- SLACK_CHANNEL: bots-<%= dasherize(project) %>
55
- SLACK_USERNAME: Github Actions
56
- SLACK_COLOR: ${{ job.status }}
57
- SLACK_MESSAGE: ":x: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}"
58
- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
59
- MSG_MINIMAL: commit,actions url
36
+
37
+ - name: ๐Ÿ“Š Environment Info
38
+ run: |
39
+ echo "๐Ÿ–ฅ๏ธ Node version: $(node -v)"
40
+ echo "๐Ÿ“ฆ NPM version: $(npm -v)"
41
+ echo "๐Ÿ  Working directory: $(pwd)"
42
+
43
+ - name: โšก Cache Dependencies
44
+ uses: actions/cache@v4
45
+ id: npm-cache
46
+ with:
47
+ path: node_modules
48
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
49
+ restore-keys: |
50
+ ${{ runner.os }}-node-
51
+
52
+ - name: ๐Ÿ“ฆ Install Dependencies
53
+ if: steps.npm-cache.outputs.cache-hit != 'true'
54
+ run: npm ci
55
+
56
+ - name: ๐Ÿ” Lint Code
57
+ run: npm run lint
58
+
59
+ - name: ๐Ÿงช Test Code
60
+ run: npm run test
61
+
62
+ - name: ๐Ÿ›ก๏ธ Test Firestore Rules
63
+ run: npm run test:rules
64
+
65
+ - name: ๐Ÿ—๏ธ Build Project
66
+ run: npm run build
67
+
68
+ - name: ๐Ÿ“‹ List Distribution Files
69
+ run: ls -la ./dist
70
+
71
+ - name: ๐Ÿ’พ Cache Build
72
+ uses: actions/cache@v4
73
+ with:
74
+ path: ./dist
75
+ key: ${{ runner.os }}-build-${{ github.sha }}
76
+ restore-keys: |
77
+ ${{ runner.os }}-build-
78
+
79
+ - name: ๐Ÿ“ Generate Build Report
80
+ run: |
81
+ echo "### ๐Ÿ—๏ธ Build Summary" > build-report.md
82
+ echo "- ๐ŸŒŸ Branch: ${{ github.ref_name }}" >> build-report.md
83
+ echo "- ๐Ÿ”„ Commit: ${{ github.sha }}" >> build-report.md
84
+ echo "- ๐Ÿ‘ค Author: ${{ github.actor }}" >> build-report.md
85
+ echo "- โฑ๏ธ Time: $(date)" >> build-report.md
86
+
87
+ - name: ๐Ÿ“Œ Upload Build Artifacts
88
+ uses: actions/upload-artifact@v4
89
+ with:
90
+ name: production-build
91
+ path: dist/
92
+ retention-days: 1
93
+
94
+ - name: โœ… Notify Success
95
+ if: success()
96
+ uses: sarisia/actions-status-discord@v1
97
+ with:
98
+ webhook: ${{ secrets.DISCORD_WEBHOOK }}
99
+ title: โœ… Build Succeeded
100
+ description: |
101
+ PR: ${{ github.event.pull_request.number || 'N/A' }}
102
+ Title: ${{ github.event.pull_request.title || github.ref_name }}
103
+ Triggered by: ${{ github.actor }}
104
+ Link: ${{ github.event.pull_request.html_url || 'N/A' }}
105
+ color: 0x36a64f
106
+ username: ๐Ÿค– Github Actions
107
+ avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
108
+
109
+ - name: โŒ Notify Failure
110
+ if: failure()
111
+ uses: sarisia/actions-status-discord@v1
112
+ with:
113
+ webhook: ${{ secrets.DISCORD_WEBHOOK }}
114
+ title: โŒ Build Failed
115
+ description: |
116
+ PR: ${{ github.event.pull_request.number || 'N/A' }}
117
+ Title: ${{ github.event.pull_request.title || github.ref_name }}
118
+ Triggered by: ${{ github.actor }}
119
+ Link: ${{ github.event.pull_request.html_url || 'N/A' }}
120
+ color: 0xff0000
121
+ username: ๐Ÿค– Github Actions
122
+ avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
123
+
124
+ - name: ๐Ÿ Job Status
125
+ run: echo "๐Ÿ Job status is ${{ job.status }}"
@@ -56,5 +56,4 @@ Thumbs.db
56
56
  # .env
57
57
  .env
58
58
 
59
- # t4g skills data
60
- .t4g
59
+ .t4g/
@@ -31,7 +31,6 @@
31
31
  "index": "src/index.html",
32
32
  "browser": "src/main.ts",
33
33
  "polyfills": [
34
- "zone.js",
35
34
  "core-js/stable",
36
35
  "globalthis",
37
36
  "cross-fetch",
@@ -104,10 +103,7 @@
104
103
  "test": {
105
104
  "builder": "@ngx-env/builder-angular:jest",
106
105
  "options": {
107
- "polyfills": [
108
- "zone.js",
109
- "zone.js/testing"
110
- ],
106
+ "polyfills": [],
111
107
  "tsConfig": "tsconfig.spec.json",
112
108
  "inlineStyleLanguage": "scss",
113
109
  "assets": [