@tech4good/angular-schematics 21.5.0 → 21.7.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.
- package/CHANGELOG.md +44 -0
- package/README.md +266 -1
- package/package.json +34 -7
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +4 -5
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +1 -1
- package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +16 -7
- package/src/entity/files/__name@dasherize__/__name@dasherize__.model.ts.template +13 -6
- package/src/entity/files/__name@dasherize__/__name@dasherize__.store.ts.template +18 -10
- package/src/entity/index.js +61 -49
- package/src/entity/index.js.map +1 -1
- package/src/entity/schema.json +4 -0
- package/src/guard/files/__name@dasherize__.guard.spec.ts.template +0 -1
- package/src/ng-add/files/.github/workflows/angular-github-ci.yml.template +3 -0
- package/src/ng-add/files/.gitignore.template +5 -0
- package/src/ng-add/files/analytics/datasets.js.template +206 -0
- package/src/ng-add/files/analytics/entity_sources.js.template +58 -0
- package/src/ng-add/files/analytics/entity_sources.test.js.template +57 -0
- package/src/ng-add/files/analytics/lib/api_query.js.template +87 -0
- package/src/ng-add/files/analytics/lib/api_query.test.js.template +84 -0
- package/src/ng-add/files/analytics/lib/bigquery_query_compatibility.test.js.template +53 -0
- package/src/ng-add/files/analytics/lib/dataset_schema.js.template +53 -0
- package/src/ng-add/files/analytics/lib/dataset_schema.test.js.template +34 -0
- package/src/ng-add/files/analytics/lib/entity_sync.js.template +397 -0
- package/src/ng-add/files/analytics/lib/entity_sync.test.js.template +212 -0
- package/src/ng-add/files/analytics/lib/identifier_salt.js.template +57 -0
- package/src/ng-add/files/analytics/lib/identifier_salt.test.js.template +36 -0
- package/src/ng-add/files/analytics/lib/snapshot_files.js.template +46 -0
- package/src/ng-add/files/analytics/lib/snapshot_files.test.js.template +67 -0
- package/src/ng-add/files/analytics/lib/sqlite.js.template +92 -0
- package/src/ng-add/files/analytics/lib/upload_entities.js.template +81 -0
- package/src/ng-add/files/analytics/lib/upload_entities.test.js.template +86 -0
- package/src/ng-add/files/analytics/proxy.conf.json.template +7 -0
- package/src/ng-add/files/analytics/scripts/refresh_snapshot.js.template +518 -0
- package/src/ng-add/files/analytics/scripts/start.js.template +88 -0
- package/src/ng-add/files/analytics/server/server.js.template +212 -0
- package/src/ng-add/files/angular.json.template +80 -1
- package/src/ng-add/files/bigquery/queries/active_time_by_route.sql.template +27 -8
- package/src/ng-add/files/bigquery/queries/active_user_windows.sql.template +67 -0
- package/src/ng-add/files/bigquery/queries/dashboard_route_visits.sql.template +47 -0
- package/src/ng-add/files/bigquery/queries/data_quality.sql.template +323 -0
- package/src/ng-add/files/bigquery/queries/onboarding_funnel.sql.template +512 -0
- package/src/ng-add/files/bigquery/queries/onboarding_stage_observations.sql.template +134 -0
- package/src/ng-add/files/bigquery/queries/weekly_retention_cohorts.sql.template +90 -0
- package/src/ng-add/files/bigquery/scripts/export_entities.js.template +120 -0
- package/src/ng-add/files/bigquery/scripts/init_views.js.template +57 -0
- package/src/ng-add/files/bigquery/scripts/run_query.js.template +141 -0
- package/src/ng-add/files/bigquery/views/events_flat.sql.template +27 -12
- package/src/ng-add/files/bigquery/views/logs_latest.sql.template +16 -3
- package/src/ng-add/files/docs-infra/analytics-guide.md.template +270 -25
- package/src/ng-add/files/docs-infra/analytics-workbench-guide.md.template +307 -0
- package/src/ng-add/files/docs-infra/authentication-architecture.md.template +300 -0
- package/src/ng-add/files/docs-infra/email-infrastructure.md.template +43 -0
- package/src/ng-add/files/docs-infra/firestore-index-checker.md.template +87 -0
- package/src/ng-add/files/docs-infra/infrastructure-guide.md.template +123 -38
- package/src/ng-add/files/docs-infra/load-system-architecture.md.template +15 -1
- package/src/ng-add/files/docs-infra/querying-strategy.md.template +14 -0
- package/src/ng-add/files/docs-infra/stream-system-architecture.md.template +21 -7
- package/src/ng-add/files/eslint.config.js.template +22 -3
- package/src/ng-add/files/firebase.json.template +6 -0
- package/src/ng-add/files/firestore.indexes.json.template +23 -0
- package/src/ng-add/files/firestore.rules.spec.ts.template +84 -15
- package/src/ng-add/files/firestore.rules.template +29 -17
- package/src/ng-add/files/functions/.gitignore.template +3 -0
- package/src/ng-add/files/functions/package.json.template +13 -0
- package/src/ng-add/files/functions/src/email.ts.template +23 -0
- package/src/ng-add/files/functions/src/index.ts.template +44 -0
- package/src/ng-add/files/functions/tsconfig.json.template +13 -0
- package/src/ng-add/files/jest.config.ts.template +3 -2
- package/src/ng-add/files/package.json.template +41 -16
- package/src/ng-add/files/projects/analytics/src/app/analytics-api.service.ts.template +130 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.html.template +77 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.scss.template +240 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.ts.template +96 -0
- package/src/ng-add/files/projects/analytics/src/app/app.routes.ts.template +11 -0
- package/src/ng-add/files/projects/analytics/src/app/dashboard-pages.spec.ts.template +151 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.html.template +39 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.ts.template +95 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.html.template +47 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.ts.template +120 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.html.template +40 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.ts.template +98 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.html.template +35 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.ts.template +84 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.html.template +42 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.ts.template +110 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/analytics-utils.ts.template +43 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/chart-theme.ts.template +42 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-layout.scss.template +239 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.html.template +76 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.scss.template +128 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.spec.ts.template +31 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.ts.template +153 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.html.template +16 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.scss.template +63 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.ts.template +52 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.html.template +5 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.scss.template +56 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.spec.ts.template +30 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.ts.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.html.template +9 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.scss.template +43 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.ts.template +62 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.html.template +9 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.scss.template +33 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.ts.template +82 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.html.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.scss.template +45 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.ts.template +55 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.html.template +18 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.scss.template +45 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.ts.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/vega-chart/vega-chart.component.ts.template +121 -0
- package/src/ng-add/files/projects/analytics/src/index.html.template +19 -0
- package/src/ng-add/files/projects/analytics/src/main.ts.template +16 -0
- package/src/ng-add/files/projects/analytics/src/styles.scss.template +28 -0
- package/src/ng-add/files/projects/analytics/tsconfig.app.json.template +13 -0
- package/src/ng-add/files/projects/analytics/tsconfig.spec.json.template +15 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.html.template +3 -1
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +10 -13
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +2 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.spec.ts.template +11 -12
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +7 -7
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +8 -10
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +3 -2
- package/src/ng-add/files/src/app/app.component.html.template +3 -3
- package/src/ng-add/files/src/app/app.component.scss.template +1 -1
- package/src/ng-add/files/src/app/app.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/app.component.ts.template +3 -2
- package/src/ng-add/files/src/app/app.config.ts.template +21 -15
- package/src/ng-add/files/src/app/app.routes.ts.template +6 -0
- package/src/ng-add/files/src/app/auth-routing.spec.ts.template +13 -9
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.spec.ts.template +46 -29
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.ts.template +27 -18
- package/src/ng-add/files/src/app/core/auth/auth.providers.spec.ts.template +112 -0
- package/src/ng-add/files/src/app/core/auth/auth.providers.ts.template +48 -0
- package/src/ng-add/files/src/app/core/auth/auth.service.ts.template +14 -23
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.spec.ts.template +27 -0
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +3 -2
- package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +7 -2
- package/src/ng-add/files/src/app/core/firebase/data.providers.prod.ts.template +21 -0
- package/src/ng-add/files/src/app/core/firebase/data.providers.ts.template +13 -0
- package/src/ng-add/files/src/app/core/local-storage/session.service.spec.ts.template +43 -0
- package/src/ng-add/files/src/app/core/local-storage/session.service.ts.template +7 -0
- package/src/ng-add/files/src/app/core/store/app-data.spec.ts.template +76 -0
- package/src/ng-add/files/src/app/core/store/auth/auth.mock.ts.template +20 -82
- package/src/ng-add/files/src/app/core/store/auth/auth.store.spec.ts.template +217 -0
- package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +36 -172
- package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +18 -15
- package/src/ng-add/files/src/app/core/store/user/user.model.ts.template +7 -8
- package/src/ng-add/files/src/app/core/store/user/user.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +20 -8
- package/src/ng-add/files/src/app/core/store/user-context/user-context.model.ts.template +5 -6
- package/src/ng-add/files/src/app/core/store/user-context/user-context.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/store/user-private/user-private.mock.ts.template +20 -7
- package/src/ng-add/files/src/app/core/store/user-private/user-private.model.ts.template +6 -6
- package/src/ng-add/files/src/app/core/store/user-private/user-private.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/testing/app-mocks.ts.template +42 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.html.template +4 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.scss.template +1 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.ts.template +38 -0
- package/src/ng-add/files/src/app/first-time/consent/consent.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/consent/consent.component.scss.template +7 -3
- package/src/ng-add/files/src/app/first-time/consent/consent.component.spec.ts.template +31 -11
- package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +16 -1
- package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +5 -1
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template +27 -16
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +102 -49
- package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +5 -1
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.scss.template +7 -3
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.spec.ts.template +20 -6
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.ts.template +2 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.html.template +18 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.scss.template +2 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.spec.ts.template +56 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.ts.template +91 -0
- package/src/ng-add/files/src/app/first-time/first-time-routing.spec.ts.template +11 -7
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +19 -7
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +51 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +44 -5
- package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +12 -8
- package/src/ng-add/files/src/app/first-time/landing/landing.component.spec.ts.template +33 -10
- package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +6 -19
- package/src/ng-add/files/src/app/first-time/login/login.component.html.template +58 -6
- package/src/ng-add/files/src/app/first-time/login/login.component.scss.template +151 -22
- package/src/ng-add/files/src/app/first-time/login/login.component.spec.ts.template +30 -32
- package/src/ng-add/files/src/app/first-time/login/login.component.ts.template +85 -31
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.spec.ts.template +4 -2
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.ts.template +1 -1
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.html.template +12 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.scss.template +39 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.spec.ts.template +68 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.ts.template +20 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.html.template +24 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.scss.template +50 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.spec.ts.template +65 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.ts.template +59 -0
- package/src/ng-add/files/src/app/main/account-profile/guest-deletion-dialog.component.ts.template +51 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.html.template +50 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.scss.template +137 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.spec.ts.template +57 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.ts.template +59 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.html.template +133 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.scss.template +207 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.spec.ts.template +74 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.ts.template +130 -0
- package/src/ng-add/files/src/app/main/home/home.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/main/home/home.component.ts.template +1 -6
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.html.template +15 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.scss.template +79 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.spec.ts.template +59 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.ts.template +44 -0
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.html.template +45 -15
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.scss.template +103 -19
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.spec.ts.template +73 -9
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.ts.template +46 -18
- package/src/ng-add/files/src/environments/environment.prod.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.test.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.ts.template +1 -1
- package/src/ng-add/files/tsconfig.spec.json.template +3 -1
- package/src/ng-add/index.js +7 -0
- package/src/ng-add/index.js.map +1 -1
- package/src/shared/entity-registry.d.ts +8 -0
- package/src/shared/entity-registry.js +28 -0
- package/src/shared/entity-registry.js.map +1 -0
- package/tsconfig.json +2 -2
- package/.agents/skills/publish-npm/SKILL.md +0 -37
- package/.agents/skills/publish-npm/eval.yaml +0 -32
- package/.agents/skills/publish-npm/fixtures/package-v21.json.template +0 -8
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.t4g/agent-memory.db +0 -0
- package/src/component/index_spec.d.ts +0 -1
- package/src/component/index_spec.js +0 -68
- package/src/component/index_spec.js.map +0 -1
- package/src/entity/index_spec.d.ts +0 -1
- package/src/entity/index_spec.js +0 -153
- package/src/entity/index_spec.js.map +0 -1
- package/src/guard/index_spec.d.ts +0 -1
- package/src/guard/index_spec.js +0 -64
- package/src/guard/index_spec.js.map +0 -1
- package/src/ng-add/files/bigquery/scripts/export_entities.py.template +0 -143
- package/src/ng-add/files/bigquery/scripts/run_query.py.template +0 -167
- package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +0 -494
- package/src/ng-add/files/src/app/core/firebase/database.service.ts.template +0 -56
- package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +0 -366
- package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +0 -342
- package/src/ng-add/files/src/app/core/firebase/simulate-load.spec.ts.template +0 -104
- package/src/ng-add/files/src/app/core/firebase/simulate-stream.spec.ts.template +0 -127
- package/src/ng-add/files/src/app/core/firebase/simulation.mock.ts.template +0 -38
- package/src/ng-add/files/src/app/core/firebase/stream-multiplexer.ts.template +0 -445
- package/src/ng-add/files/src/app/core/logging/logging.service.spec.ts.template +0 -118
- package/src/ng-add/files/src/app/core/logging/logging.service.ts.template +0 -168
- package/src/ng-add/files/src/app/core/store/app.model.ts.template +0 -21
- package/src/ng-add/files/src/app/core/store/app.store.spec.ts.template +0 -920
- package/src/ng-add/files/src/app/core/store/app.store.ts.template +0 -1317
- package/src/ng-add/files/src/app/core/store/batch-write.firebase.service.ts.template +0 -58
- package/src/ng-add/files/src/app/core/store/batch-write.mock.service.ts.template +0 -105
- package/src/ng-add/files/src/app/core/store/batch-write.service.ts.template +0 -126
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +0 -9
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.scss.template +0 -46
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.spec.ts.template +0 -69
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +0 -39
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.spec.ts.template +0 -122
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +0 -88
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
## [21.7.0](https://github.com/tech4good-lab/angular-schematics/compare/v21.6.0...v21.7.0) (2026-11-20)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* **ng-add:** Entity generation now targets platform-data models and
|
|
6
|
+
stores. Existing applications must follow packages/data/MIGRATION.md before
|
|
7
|
+
using the updated entity schematic; old local infrastructure import paths
|
|
8
|
+
and resetAllStores are not compatibility APIs.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **ng-add:** add analytics workbench infrastructure to schematic template ([362f0e4](https://github.com/tech4good-lab/angular-schematics/commit/362f0e42e6d1b707a3b28f095e999831de1bfb84))
|
|
13
|
+
* **ng-add:** add firestore index validation ([9b9fc6e](https://github.com/tech4good-lab/angular-schematics/commit/9b9fc6edeb0360ebc8f8f186bf3b95e74ea71c36))
|
|
14
|
+
* **ng-add:** add telemetry tracking to auth and onboarding components ([5df7935](https://github.com/tech4good-lab/angular-schematics/commit/5df7935918093ada91285a729bc567609d99fa74))
|
|
15
|
+
* **ng-add:** generate apps with shared platform infrastructure ([bfff917](https://github.com/tech4good-lab/angular-schematics/commit/bfff917ddf983a1346d1046d0f47b2b0b18f7f18))
|
|
16
|
+
* **ng-add:** integrate platform email in generated functions ([2e40f5b](https://github.com/tech4good-lab/angular-schematics/commit/2e40f5b3cc28094668a8afefbbfe5bff3234e549))
|
|
17
|
+
* **ng-add:** use platform auth in generated applications ([cd3288e](https://github.com/tech4good-lab/angular-schematics/commit/cd3288e48d192ee912eaff9f95224902501f263b))
|
|
18
|
+
* **ng-add:** use platform ui in generated applications ([e96772b](https://github.com/tech4good-lab/angular-schematics/commit/e96772b3cc33d75095efb82c3d21dd290f4ff681))
|
|
19
|
+
* **shared:** add platform email package ([97fae7c](https://github.com/tech4good-lab/angular-schematics/commit/97fae7c12fbb62eea6583ec3ce4a6b6995e83a7a))
|
|
20
|
+
* **shared:** extract platform auth package ([e6c66cd](https://github.com/tech4good-lab/angular-schematics/commit/e6c66cd18b319ea8c5c556ce33991f474e81d41e))
|
|
21
|
+
* **shared:** extract platform data and runtime logging packages ([bde1d13](https://github.com/tech4good-lab/angular-schematics/commit/bde1d132410d5fc7775ca3a9e0137a088442ffef))
|
|
22
|
+
* **shared:** extract platform tooling package ([fda18e3](https://github.com/tech4good-lab/angular-schematics/commit/fda18e3ab5909a025552bc359e4bafcc12a5c10e))
|
|
23
|
+
* **shared:** extract platform ui package ([94f97c4](https://github.com/tech4good-lab/angular-schematics/commit/94f97c4f527a79f41c215e7e150b9049a32fab2e))
|
|
24
|
+
* **shared:** generate app entity registries with platform tooling ([89cbbeb](https://github.com/tech4good-lab/angular-schematics/commit/89cbbeb57001d2836fac5efbd0f29da9a55c280a))
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **ng-add:** replace remote icongr.am arrows with Material icons ([5496577](https://github.com/tech4good-lab/angular-schematics/commit/54965770949d8defa7f06e7c67c905ce5584da29))
|
|
29
|
+
## [21.6.0](https://github.com/tech4good-lab/angular-schematics/compare/v21.5.0...v21.6.0) (2026-07-28)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **entity:** support foreign key fields and automated composite firestore index generation ([99ae303](https://github.com/tech4good-lab/angular-schematics/commit/99ae303cd6eee6fae24fda7c994a178e0aa5be11))
|
|
34
|
+
* **ng-add:** add account profile, guest banner, and login UI components ([174d9a5](https://github.com/tech4good-lab/angular-schematics/commit/174d9a5f6d92a14e359e44193f98289bb30d9dac))
|
|
35
|
+
* **ng-add:** add cloud functions infrastructure and security rules ([9c65a61](https://github.com/tech4good-lab/angular-schematics/commit/9c65a6119880243c5f624ddb312ed61e287dbe47))
|
|
36
|
+
* **ng-add:** enhance auth services, stores, and guards ([3396eee](https://github.com/tech4good-lab/angular-schematics/commit/3396eee629a85865fd66f9965825aca4e564956a))
|
|
37
|
+
* **ng-add:** update auth token initialization and test environments ([9206c6b](https://github.com/tech4good-lab/angular-schematics/commit/9206c6b5e591d3aa77de82a37225094b724f1955))
|
|
38
|
+
* **ng-add:** update default firestore indexes and security rule state transitions ([28e851f](https://github.com/tech4good-lab/angular-schematics/commit/28e851fd5cdf9d9c441ceeebcd11080c87f69261))
|
|
39
|
+
* **ng-add:** update landing, hero, and early access component layouts ([78b8918](https://github.com/tech4good-lab/angular-schematics/commit/78b891855a5a0340384e339fb2a7e56bb12f6fd3))
|
|
40
|
+
* **shared:** align navbar component layout and avatar fallback ([9f80c5f](https://github.com/tech4good-lab/angular-schematics/commit/9f80c5f296ff5c2d0ba3245d5656031ead804683))
|
|
41
|
+
|
|
42
|
+
### Build System
|
|
43
|
+
|
|
44
|
+
* **ng-add:** bump template dependency for release ([5e0b098](https://github.com/tech4good-lab/angular-schematics/commit/5e0b0981629d0adddffc5b7d66e955d1cd9ae86e))
|
|
1
45
|
## [21.5.0](https://github.com/tech4good-lab/angular-schematics/compare/v21.4.0...v21.5.0) (2026-07-22)
|
|
2
46
|
|
|
3
47
|
### Features
|
package/README.md
CHANGED
|
@@ -34,7 +34,193 @@ ng generate @tech4good/angular-schematics:<schematic>
|
|
|
34
34
|
|
|
35
35
|
`npm run test` will run the unit tests, using Jasmine as a runner and test framework.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Run `npm run test:indexes` for the Firestore index checker regression and CLI
|
|
38
|
+
integration suites. The CLI tests generate temporary projects and run their real
|
|
39
|
+
`npm run check:indexes` and `npm run fix:indexes` commands. They verify exit codes,
|
|
40
|
+
missing-index diagnostics, correct index generation, configuration preservation,
|
|
41
|
+
idempotence, and failure handling for unresolved queries or invalid input.
|
|
42
|
+
Fixtures install locally packed tooling and TypeScript tarballs offline, then run
|
|
43
|
+
the compiled CLI in ESM and CommonJS projects. They do not use a TypeScript
|
|
44
|
+
loader or a symlink to the workspace package. No Firebase credentials, emulator,
|
|
45
|
+
or deployed database are required.
|
|
46
|
+
|
|
47
|
+
### Shared tooling package
|
|
48
|
+
|
|
49
|
+
The index checker is maintained in `packages/tooling` as `@tech4good/platform-tooling`.
|
|
50
|
+
New applications receive a versioned dev dependency and scripts that invoke
|
|
51
|
+
`t4g-check-firestore-indexes`; the checker implementation is no longer copied
|
|
52
|
+
into generated apps. See [the package README](packages/tooling/README.md) for
|
|
53
|
+
CLI options, API usage, limitations, and local adoption instructions.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install
|
|
57
|
+
npm run build:tooling
|
|
58
|
+
npm run test:indexes
|
|
59
|
+
npm run pack:tooling
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The pilot keeps the existing schematics package at the repository root and adds
|
|
63
|
+
one npm workspace. Moving schematics into `packages/schematics` and making the
|
|
64
|
+
root private can wait until further packages justify that restructuring.
|
|
65
|
+
|
|
66
|
+
The tooling version prepared here is `0.1.0-alpha.1`. Before releasing schematics
|
|
67
|
+
that reference it, publish that tooling version and verify registry availability.
|
|
68
|
+
Packaging locally does not publish anything. Use the tooling workspace for its
|
|
69
|
+
release; the existing root version/release scripts belong to schematics.
|
|
70
|
+
|
|
71
|
+
### Testing packages in another repo before publishing
|
|
72
|
+
|
|
73
|
+
Packages can be tested locally before their first npm release and while developing
|
|
74
|
+
updates. A version bump or alpha publication is not needed for each local edit.
|
|
75
|
+
|
|
76
|
+
**What the tooling command does**
|
|
77
|
+
|
|
78
|
+
From this repository, the following builds the index checker and runs it on MathPets:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm run build:tooling
|
|
82
|
+
node packages/tooling/dist/cli.js --project-root /path/to/math-pets
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`node` executes the compiled JavaScript CLI. `--project-root` is an option we
|
|
86
|
+
implemented in this checker: it selects the application whose `src/app` queries
|
|
87
|
+
and `firestore.indexes.json` are analyzed. This is a read-only index check. It does
|
|
88
|
+
not install the package into MathPets, start the application, or run MathPets'
|
|
89
|
+
tests. The flag is specific to this CLI, not a general npm package-testing feature.
|
|
90
|
+
See the [tooling development instructions](packages/tooling/README.md#run-against-mathpets-while-developing)
|
|
91
|
+
for watch mode and testing its installed executable.
|
|
92
|
+
|
|
93
|
+
**General workflows for any shared package**
|
|
94
|
+
|
|
95
|
+
For a runtime library such as `@tech4good/platform-data`, test the
|
|
96
|
+
library by making the consuming application use the local version, then building,
|
|
97
|
+
testing, and exercising that application.
|
|
98
|
+
|
|
99
|
+
| Method | What the application uses | When to use it |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| Local tarball (`npm pack` + `npm install`) | A snapshot of the package's distributable files | Default integration check and verification before publishing |
|
|
102
|
+
| Local link (`npm link`) | A filesystem link to the package's local build | Frequent edits across the package and application |
|
|
103
|
+
| Published alpha | A version downloaded from npm | Shared testing by teammates, CI, or deployments |
|
|
104
|
+
|
|
105
|
+
For our packages, start with local testing, verify a tarball before release, and
|
|
106
|
+
publish an alpha when other machines need to install a reproducible version.
|
|
107
|
+
Local linking and tarball installation are supported by
|
|
108
|
+
[npm link](https://docs.npmjs.com/cli/v11/commands/npm-link/) and
|
|
109
|
+
[npm install](https://docs.npmjs.com/cli/v10/commands/npm-install/).
|
|
110
|
+
|
|
111
|
+
The data-package examples below are illustrative; that package does not exist
|
|
112
|
+
yet. They assume MathPets imports the package's public API. During first adoption,
|
|
113
|
+
we must also update the relevant imports and provider setup to use the package.
|
|
114
|
+
Installing it alone does not replace the app's existing copied infrastructure.
|
|
115
|
+
|
|
116
|
+
**Option 1: Install a local tarball**
|
|
117
|
+
|
|
118
|
+
Build the package, then pack its publishable directory: the folder containing
|
|
119
|
+
its package manifest and built entry points. For tooling, use `npm run pack:tooling`
|
|
120
|
+
from this repository. For an Angular library built with `ng-packagr`, that
|
|
121
|
+
directory is usually its output folder, such as `dist/platform-data`.
|
|
122
|
+
|
|
123
|
+
After building the future data library, the workflow would be:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# In the package repository; use its actual build-output path.
|
|
127
|
+
npm pack /path/to/built-platform-data
|
|
128
|
+
|
|
129
|
+
# In a MathPets development checkout; use the archive path printed by npm pack.
|
|
130
|
+
cd /path/to/math-pets
|
|
131
|
+
npm install --no-save --package-lock=false /path/to/tech4good-platform-data-0.1.0-alpha.0.tgz
|
|
132
|
+
npm run build
|
|
133
|
+
npm test
|
|
134
|
+
npm start
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The application imports `@tech4good/platform-data` normally, and npm supplies
|
|
138
|
+
the local snapshot. Exercise the affected behavior in the running app as well
|
|
139
|
+
as its tests, such as store loading, updates, and subscription cleanup.
|
|
140
|
+
After another library change, rebuild, repack, reinstall, and rerun the relevant
|
|
141
|
+
checks. No npm publication is involved. Restart an already-running development
|
|
142
|
+
server after replacing the installed snapshot.
|
|
143
|
+
|
|
144
|
+
The install flags keep the local archive out of the application's manifest and
|
|
145
|
+
lockfile, while changing `node_modules`. A later `npm ci` restores dependencies
|
|
146
|
+
from the application's lockfile and removes the temporary installation. Use a
|
|
147
|
+
disposable checkout if you want to keep the main checkout's dependencies intact.
|
|
148
|
+
|
|
149
|
+
**Option 2: Link a local build for faster iteration**
|
|
150
|
+
|
|
151
|
+
Build the library once, then register and consume its publishable directory:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
cd /path/to/built-platform-data
|
|
155
|
+
npm link
|
|
156
|
+
|
|
157
|
+
cd /path/to/math-pets
|
|
158
|
+
npm link --no-save --package-lock=false @tech4good/platform-data
|
|
159
|
+
npm start
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The first command registers a link on your machine; the second makes MathPets
|
|
163
|
+
resolve the package through that link. Keep the library's build running in watch
|
|
164
|
+
mode in another terminal (for an Angular library, for example,
|
|
165
|
+
`ng build platform-data --watch` from its Angular workspace). Changes become
|
|
166
|
+
available after compilation; linking itself does not compile TypeScript. Restart
|
|
167
|
+
the app server if it does not detect rebuilt files.
|
|
168
|
+
|
|
169
|
+
Angular libraries should be linked from their built output and declare the
|
|
170
|
+
Angular packages they use as peer dependencies so the app supplies Angular.
|
|
171
|
+
Linked Angular libraries can also require consumer settings for symlink handling
|
|
172
|
+
and dev-server prebundling; configure these for the app's actual builder when
|
|
173
|
+
setting up the future data package. See
|
|
174
|
+
[Angular's library development guide](https://angular.dev/tools/libraries/creating-libraries#linking-libraries-for-local-development).
|
|
175
|
+
A successful linked run should be followed by a tarball trial, which also checks
|
|
176
|
+
the files and exports included in the distributable package.
|
|
177
|
+
|
|
178
|
+
To return MathPets to its recorded dependencies, run `npm ci` there. To remove
|
|
179
|
+
the corresponding global link when finished, run
|
|
180
|
+
`npm unlink --global @tech4good/platform-data`.
|
|
181
|
+
|
|
182
|
+
**Option 3: Publish an alpha for shared testing**
|
|
183
|
+
|
|
184
|
+
An alpha is useful when teammates or CI need to install a specific test version
|
|
185
|
+
without access to your local folders. Choose a new prerelease version, publish
|
|
186
|
+
with `--tag alpha`, and have consumers install that exact version. Each published
|
|
187
|
+
iteration needs a new version; local edits do not update an already-published
|
|
188
|
+
package. See the [release guide](packages/tooling/README.md#releasing-and-publishing)
|
|
189
|
+
for the current tooling package's concrete commands.
|
|
190
|
+
|
|
191
|
+
### Publishing @tech4good/platform-tooling
|
|
192
|
+
|
|
193
|
+
Run these commands from the repository root. This checkout is prepared for
|
|
194
|
+
`0.1.0-alpha.1`; it does not need another version bump to publish this release.
|
|
195
|
+
|
|
196
|
+
First validate the release and preview its package contents:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npm test
|
|
200
|
+
npm pack --workspace @tech4good/platform-tooling --dry-run
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Review and commit the release changes before publishing. Then log in with an
|
|
204
|
+
npm account that can publish under `@tech4good` and complete npm's authentication
|
|
205
|
+
prompts:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
npm login
|
|
209
|
+
npm publish --workspace @tech4good/platform-tooling --access public --tag alpha
|
|
210
|
+
npm view @tech4good/platform-tooling@0.1.0-alpha.1 version
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
`--workspace` selects tooling; `--access public` makes it publicly installable;
|
|
214
|
+
`--tag alpha` labels the pilot as a prerelease. Plain `npm publish` at this
|
|
215
|
+
repository root publishes angular-schematics. The tooling package's `prepack`
|
|
216
|
+
script builds its compiled output automatically during packing and publishing.
|
|
217
|
+
|
|
218
|
+
For later releases, use the [tooling release guide](packages/tooling/README.md#releasing-and-publishing)
|
|
219
|
+
to update its version, generated dependency, changelog, and Git tag. Tooling
|
|
220
|
+
versions are independent of the Angular/schematics version. Publish tooling and
|
|
221
|
+
verify its availability before publishing schematics that reference that version.
|
|
222
|
+
|
|
223
|
+
### Publishing @tech4good/angular-schematics
|
|
38
224
|
|
|
39
225
|
**Option 1: Agent-Assisted Workflow (Recommended)**
|
|
40
226
|
|
|
@@ -56,3 +242,82 @@ npm run build
|
|
|
56
242
|
npm login
|
|
57
243
|
npm publish # will ask for a OTP (see Google Authenticator: npm)
|
|
58
244
|
```
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
### Shared data infrastructure
|
|
248
|
+
|
|
249
|
+
`@tech4good/platform-data` is the Angular library for shared entity stores,
|
|
250
|
+
Firestore data access, mock collections, listeners and batch writes. Applications
|
|
251
|
+
continue to define their own entities, auth policy and Firebase configuration.
|
|
252
|
+
See the [package guide](packages/data/README.md),
|
|
253
|
+
[existing-app migration](packages/data/MIGRATION.md), and
|
|
254
|
+
[review/extraction plan](docs-plans/platform-data-extraction.md).
|
|
255
|
+
|
|
256
|
+
Run `npm run test:data` for the library or `npm test` for all packages/schematics.
|
|
257
|
+
`npm run pack:data` builds and packs an installable local tarball. Publish this
|
|
258
|
+
Angular library from `packages/data/dist`; its release guide includes the
|
|
259
|
+
required build and publication commands.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
Entity registration now lives beside each interface in `<entity>.model.ts` using
|
|
263
|
+
`defineEntity<T>({ collection: 'name' })`. The entity schematic refreshes generated
|
|
264
|
+
registries instead of editing `app.model.ts` or adding entries to the Firebase
|
|
265
|
+
mock facade. Tooling alpha.2 supplies `t4g-entities` for generation, watch mode,
|
|
266
|
+
and stale-output checks; generated apps integrate it with development and build
|
|
267
|
+
commands. See the [registry workflow](packages/tooling/README.md#entity-discovery-and-generated-registries)
|
|
268
|
+
and [existing-app migration](packages/data/MIGRATION.md).
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Shared runtime logging
|
|
272
|
+
|
|
273
|
+
`@tech4good/platform-logging` provides `injectLogger(namespace)` and app-wide
|
|
274
|
+
`providePlatformLogging(options)`. It owns namespace filtering, custom output,
|
|
275
|
+
and optional browser persistence/DevTools controls. `platform-data` consumes the
|
|
276
|
+
`data` namespace; logging is independent of the data and tooling packages.
|
|
277
|
+
|
|
278
|
+
Newly generated apps import the package directly. See the
|
|
279
|
+
[logging guide](packages/logging/README.md) for usage, migration, local tarball
|
|
280
|
+
testing and publishing instructions.
|
|
281
|
+
|
|
282
|
+
Run `npm run test:logging` or `npm run pack:logging` from this repository root.
|
|
283
|
+
Logging targets Angular 21 and starts at `0.1.0-alpha.0`. Publish it before data
|
|
284
|
+
or schematics versions requiring it. While testing unpublished packages, install
|
|
285
|
+
their local tarballs together to satisfy the logging peer dependency.
|
|
286
|
+
|
|
287
|
+
### Shared authentication
|
|
288
|
+
|
|
289
|
+
`@tech4good/platform-auth` provides auth operations, email-link context, shared
|
|
290
|
+
profile assurance and session coordination. Its `/firebase`, `/profiles` and
|
|
291
|
+
`/testing` entry points ship together. Generated apps retain their guards,
|
|
292
|
+
routes, profile defaults, logout dialogs and account-deletion backend.
|
|
293
|
+
|
|
294
|
+
Start with the [auth package README](packages/auth/README.md),
|
|
295
|
+
[existing-app migration](packages/auth/MIGRATION.md),
|
|
296
|
+
[behavior changes beyond extraction](packages/auth/EXTRACTION-CHANGES.md), and
|
|
297
|
+
[future work/adoption checks](packages/auth/FUTURE-WORK.md).
|
|
298
|
+
|
|
299
|
+
`npm run test:auth` builds the dependency packages and tests the public auth API.
|
|
300
|
+
`npm run pack:auth` produces a local installable tarball. Publish the built
|
|
301
|
+
`packages/auth/dist` directory with `--tag alpha`; the README includes complete
|
|
302
|
+
commands. The app template pins `0.1.0-alpha.0`, so publish that version before
|
|
303
|
+
releasing schematics that depend on it. MathPets and Mentor adoption remains a
|
|
304
|
+
separate migration.
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### Shared UI package
|
|
308
|
+
|
|
309
|
+
`@tech4good/platform-ui` starts with the redeployment warning and its polling
|
|
310
|
+
service. Generated apps import the standalone component from the package;
|
|
311
|
+
existing apps can replace their copied warning using the
|
|
312
|
+
[migration guide](packages/ui/MIGRATION.md). The UI package has no auth or data dependency.
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
npm run build:ui
|
|
316
|
+
npm run test:ui
|
|
317
|
+
npm run pack:ui
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
See the [UI package README](packages/ui/README.md) for integration, configuration,
|
|
321
|
+
and styling, and the [extraction decision](docs-plans/platform-ui-extraction.md)
|
|
322
|
+
for the pilot scope. The referenced UI alpha must be published before releasing
|
|
323
|
+
schematics that depend on it. These commands only build, test, and pack locally.
|
package/package.json
CHANGED
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tech4good/angular-schematics",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.7.0",
|
|
4
4
|
"description": "A set of schematics for generating modules, containers, components, and entities",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "
|
|
7
|
-
"test": "npm run build && jasmine src/**/*_spec.js",
|
|
6
|
+
"build": "npm run build:tooling && npm run build:email && npm run build:auth && npm run build:ui && npm run build:schematics",
|
|
7
|
+
"test": "npm run build && npm run test --workspace @tech4good/platform-tooling && npm run test --workspace @tech4good/platform-email && npm run test --workspace @tech4good/platform-logging && npm run test --workspace @tech4good/platform-data && npm run test --workspace @tech4good/platform-auth && npm run test --workspace @tech4good/platform-ui && jasmine \"src/**/*_spec.js\"",
|
|
8
|
+
"test:indexes": "npm run build && npm run test --workspace @tech4good/platform-tooling && jasmine src/ng-add/check-firestore-indexes-cli_spec.js",
|
|
8
9
|
"changelog": "conventional-changelog --config changelog.config.json -i CHANGELOG.md -s",
|
|
9
10
|
"changelog:all": "conventional-changelog -r 0 --config changelog.config.json -i CHANGELOG.md -s",
|
|
10
11
|
"version": "npm run changelog && git add CHANGELOG.md",
|
|
11
12
|
"release:patch": "npm version patch",
|
|
12
13
|
"release:minor": "npm version minor",
|
|
13
14
|
"release:major": "npm version major",
|
|
14
|
-
"prepare": "husky"
|
|
15
|
+
"prepare": "husky",
|
|
16
|
+
"build:schematics": "tsc -p tsconfig.json",
|
|
17
|
+
"build:tooling": "npm run build --workspace @tech4good/platform-tooling",
|
|
18
|
+
"pack:tooling": "npm pack --workspace @tech4good/platform-tooling",
|
|
19
|
+
"build:email": "npm run build --workspace @tech4good/platform-email",
|
|
20
|
+
"test:email": "npm run build:email && npm run test --workspace @tech4good/platform-email",
|
|
21
|
+
"pack:email": "npm pack --workspace @tech4good/platform-email",
|
|
22
|
+
"build:data": "npm run build:logging && npm run build --workspace @tech4good/platform-data",
|
|
23
|
+
"test:data": "npm run build:data && npm run test --workspace @tech4good/platform-data",
|
|
24
|
+
"pack:data": "npm run build:data && npm pack ./packages/data/dist",
|
|
25
|
+
"test:data:firestore": "npm run build:data && npm run test:firestore --workspace @tech4good/platform-data",
|
|
26
|
+
"build:logging": "npm run build --workspace @tech4good/platform-logging",
|
|
27
|
+
"test:logging": "npm run build:logging && npm run test --workspace @tech4good/platform-logging",
|
|
28
|
+
"pack:logging": "npm run build:logging && npm pack ./packages/logging/dist",
|
|
29
|
+
"build:auth": "npm run build:data && npm run build --workspace @tech4good/platform-auth",
|
|
30
|
+
"test:auth": "npm run build:auth && npm run test --workspace @tech4good/platform-auth",
|
|
31
|
+
"pack:auth": "npm run build:auth && npm pack ./packages/auth/dist",
|
|
32
|
+
"test:auth:emulator": "npm run build:auth && npm run test:emulator --workspace @tech4good/platform-auth",
|
|
33
|
+
"build:ui": "npm run build --workspace @tech4good/platform-ui",
|
|
34
|
+
"test:ui": "npm run build:ui && npm run test --workspace @tech4good/platform-ui",
|
|
35
|
+
"pack:ui": "npm run build:ui && npm pack ./packages/ui/dist"
|
|
15
36
|
},
|
|
16
37
|
"keywords": [
|
|
17
38
|
"schematics"
|
|
@@ -25,7 +46,8 @@
|
|
|
25
46
|
"@angular-devkit/schematics-cli": "^21.2.0",
|
|
26
47
|
"@schematics/angular": "^21.2.0",
|
|
27
48
|
"inquirer": "^13.2.5",
|
|
28
|
-
"typescript": "~5.
|
|
49
|
+
"typescript": "~5.9.3",
|
|
50
|
+
"@tech4good/platform-tooling": "0.1.0-alpha.2"
|
|
29
51
|
},
|
|
30
52
|
"devDependencies": {
|
|
31
53
|
"@commitlint/cli": "^21.0.1",
|
|
@@ -35,6 +57,11 @@
|
|
|
35
57
|
"conventional-changelog-cli": "^5.0.0",
|
|
36
58
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
37
59
|
"husky": "^9.1.7",
|
|
38
|
-
"jasmine": "^5.1.0"
|
|
39
|
-
|
|
60
|
+
"jasmine": "^5.1.0",
|
|
61
|
+
"ts-node": "^10.9.2",
|
|
62
|
+
"@angular/cli": "^21.2.0"
|
|
63
|
+
},
|
|
64
|
+
"workspaces": [
|
|
65
|
+
"packages/*"
|
|
66
|
+
]
|
|
40
67
|
}
|
package/src/component/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template
CHANGED
|
@@ -2,10 +2,9 @@ import { render } from '@testing-library/angular';
|
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
|
|
4
4
|
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
|
|
5
|
+
import { provideAppMocks } from 'src/app/core/testing/app-mocks';
|
|
6
|
+
import { BatchWriteMockService } from '@tech4good/platform-data/testing';
|
|
7
|
+
import { BATCH_WRITE_SERVICE } from '@tech4good/platform-data';
|
|
9
8
|
|
|
10
9
|
/** Sets up the testing environment for <%= classify(name) %>Component using render.*/
|
|
11
10
|
async function setup() {
|
|
@@ -15,7 +14,7 @@ async function setup() {
|
|
|
15
14
|
const view = await render(<%= classify(name) %>Component, {
|
|
16
15
|
imports: [],
|
|
17
16
|
providers: [
|
|
18
|
-
|
|
17
|
+
...provideAppMocks(),
|
|
19
18
|
{ provide: BATCH_WRITE_SERVICE, useClass: BatchWriteMockService },
|
|
20
19
|
],
|
|
21
20
|
componentInputs: {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, OnInit, ChangeDetectionStrategy, input, output, inject, WritableSignal, Signal, signal, computed, Inject, Injector } from '@angular/core';
|
|
2
2
|
import { User } from 'src/app/core/store/user/user.model';
|
|
3
3
|
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
4
|
-
import { BatchWriteService, BATCH_WRITE_SERVICE } from '
|
|
4
|
+
import { BatchWriteService, BATCH_WRITE_SERVICE } from '@tech4good/platform-data';
|
|
5
5
|
|
|
6
6
|
@Component({
|
|
7
7
|
selector: 'app-<%= dasherize(name) %>',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { <%= classify(name) %> } from './<%= dasherize(name) %>.model';
|
|
3
|
-
import { withEntitiesForMockDB } from '
|
|
1
|
+
import { dataTimestampNow } from '@tech4good/platform-data';
|
|
2
|
+
import { <%= classify(name) %>, <%= camelize(name) %>Entity } from './<%= dasherize(name) %>.model';
|
|
3
|
+
import { defineEntityMock, withEntitiesForMockDB } from '@tech4good/platform-data/testing';
|
|
4
4
|
import { signalStore } from '@ngrx/signals';
|
|
5
5
|
|
|
6
|
+
/** Mock backend storage, separate from the frontend store populated by load/stream. */
|
|
6
7
|
export const <%= classify(name) %>MockDB = signalStore(
|
|
7
8
|
{ providedIn: 'root' },
|
|
8
|
-
withEntitiesForMockDB<<%= classify(name) %>>(
|
|
9
|
+
withEntitiesForMockDB<<%= classify(name) %>>(<%= camelize(name) %>Entity.collection),
|
|
9
10
|
);
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -14,13 +15,21 @@ export const <%= classify(name) %>MockDB = signalStore(
|
|
|
14
15
|
*/
|
|
15
16
|
export function createMock<%= classify(name) %>(overrides?: Partial<<%= classify(name) %>>): <%= classify(name) %> {
|
|
16
17
|
return {
|
|
17
|
-
__id: '<%= dasherize(name) %>-default'
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
__id: '<%= dasherize(name) %>-default',<% if (parsedForeignKeys && parsedForeignKeys.length > 0) { parsedForeignKeys.forEach(function(fk) { %>
|
|
19
|
+
__<%= fk %>: '<%= fk %>-default',<% }); } %>
|
|
20
|
+
_createdAt: dataTimestampNow(),
|
|
21
|
+
_updatedAt: dataTimestampNow(),
|
|
20
22
|
_deleted: false,
|
|
21
23
|
...overrides,
|
|
22
24
|
};
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
/** Default development fixtures; tests can override this collection's records. */
|
|
25
28
|
export const <%= classify(name).toUpperCase() %>_DB: <%= classify(name) %>[] = [
|
|
26
29
|
];
|
|
30
|
+
|
|
31
|
+
/** Discovered by t4g-entities; keep mock imports in development/test provider composition. */
|
|
32
|
+
export const <%= camelize(name) %>Mock = defineEntityMock(<%= camelize(name) %>Entity, {
|
|
33
|
+
store: <%= classify(name) %>MockDB,
|
|
34
|
+
seeds: <%= classify(name).toUpperCase() %>_DB,
|
|
35
|
+
});
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataEntity, defineEntity } from '@tech4good/platform-data';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
_updatedAt?: Timestamp;
|
|
7
|
-
_deleted?: boolean;
|
|
3
|
+
/** Stored <%= classify(name) %> fields; DataEntity supplies required identity/timestamp/deletion metadata. */
|
|
4
|
+
export interface <%= classify(name) %> extends DataEntity {<% if (parsedForeignKeys && parsedForeignKeys.length > 0) { parsedForeignKeys.forEach(function(fk) { %>
|
|
5
|
+
__<%= fk %>: string;<% }); } %>
|
|
8
6
|
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Collection identity shared by the store and generated registries.
|
|
10
|
+
* Keep this exported literal in the model file so t4g-entities can discover it.
|
|
11
|
+
* Adding an entity needs no central type union or mock-service registration.
|
|
12
|
+
*/
|
|
13
|
+
export const <%= camelize(name) %>Entity = defineEntity<<%= classify(name) %>>({
|
|
14
|
+
collection: '<%= camelize(name) %>s',
|
|
15
|
+
});
|
|
@@ -1,41 +1,49 @@
|
|
|
1
1
|
import { inject, effect, WritableSignal } from '@angular/core';
|
|
2
2
|
import { signalStore, withState, withMethods } from '@ngrx/signals';
|
|
3
3
|
import { withEntities, removeEntity, updateEntity, setEntity, removeEntities, setEntities } from '@ngrx/signals/entities';
|
|
4
|
-
import { EntityLoadQuery, EntityStreamQuery, selectEntities, processLoadQueries, withEntitiesAndDBMethods } from '
|
|
5
|
-
import { QueryParams, QueryOptions
|
|
6
|
-
import {
|
|
4
|
+
import { EntityLoadQuery, EntityStreamQuery, selectEntities, processLoadQueries, withEntitiesAndDBMethods } from '@tech4good/platform-data';
|
|
5
|
+
import { QueryParams, QueryOptions } from '@tech4good/platform-data';
|
|
6
|
+
import { DataEntity } from '@tech4good/platform-data';
|
|
7
|
+
import { <%= classify(name) %>, <%= camelize(name) %>Entity } from './<%= dasherize(name) %>.model';
|
|
7
8
|
|
|
9
|
+
/** Describes a nested one-shot load; constructing it does not fetch data. */
|
|
8
10
|
export class Load<%= classify(name) %> extends EntityLoadQuery<<%= classify(name) %>> {
|
|
9
11
|
constructor(
|
|
10
12
|
store,
|
|
11
13
|
queryParams: QueryParams,
|
|
12
14
|
queryOptions: QueryOptions,
|
|
13
|
-
loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<
|
|
15
|
+
loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<DataEntity>[],
|
|
14
16
|
) {
|
|
15
|
-
super(
|
|
17
|
+
super(<%= camelize(name) %>Entity.collection, store, queryParams, queryOptions, loadQueries);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
static create(store, queryParams: QueryParams, queryOptions: QueryOptions, loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<
|
|
20
|
+
static create(store, queryParams: QueryParams, queryOptions: QueryOptions, loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<DataEntity>[]): Load<%= classify(name) %> {
|
|
19
21
|
return new Load<%= classify(name) %>(store, queryParams, queryOptions, loadQueries);
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
/** Describes a nested live query whose listener follows the calling component's lifetime. */
|
|
23
26
|
export class Stream<%= classify(name) %> extends EntityStreamQuery<<%= classify(name) %>> {
|
|
24
27
|
constructor(
|
|
25
28
|
store,
|
|
26
29
|
queryParams: QueryParams,
|
|
27
30
|
queryOptions: QueryOptions,
|
|
28
|
-
streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<
|
|
31
|
+
streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<DataEntity>[],
|
|
29
32
|
) {
|
|
30
|
-
super(
|
|
33
|
+
super(<%= camelize(name) %>Entity.collection, store, queryParams, queryOptions, streamQueries);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
static create(store, queryParams: QueryParams, queryOptions: QueryOptions, streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<
|
|
36
|
+
static create(store, queryParams: QueryParams, queryOptions: QueryOptions, streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<DataEntity>[]): Stream<%= classify(name) %> {
|
|
34
37
|
return new Stream<%= classify(name) %>(store, queryParams, queryOptions, streamQueries);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Frontend entity state plus shared selectors, loading, streaming and writes.
|
|
43
|
+
* The app's DATA_ACCESS provider selects the real or mock backend. Components
|
|
44
|
+
* share this root store; its records survive navigation and listener teardown.
|
|
45
|
+
*/
|
|
38
46
|
export const <%= classify(name) %>Store = signalStore(
|
|
39
47
|
{ providedIn: 'root' },
|
|
40
|
-
withEntitiesAndDBMethods<<%= classify(name) %>>(
|
|
48
|
+
withEntitiesAndDBMethods<<%= classify(name) %>>(<%= camelize(name) %>Entity.collection),
|
|
41
49
|
);
|