@tech4good/angular-schematics 20.1.0 → 20.3.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/.agents/skills/publish-npm/SKILL.md +37 -0
- package/.agents/skills/publish-npm/eval.yaml +17 -0
- package/.t4g/agent-memory.db +0 -0
- package/CHANGELOG.md +66 -0
- package/README.md +16 -7
- package/changelog.config.json +19 -0
- package/contributing-docs/branches-and-releases.md +57 -0
- package/contributing-docs/commit-message.md +117 -0
- package/package.json +10 -2
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.scss.template +1 -0
- package/src/component/schema.json +1 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +1 -1
- package/src/entity/schema.json +1 -0
- package/src/ng-add/files/.gitignore.template +3 -0
- package/src/ng-add/files/package.json.template +3 -2
- package/src/ng-add/files/public/images/abstract.png +0 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.html.template +27 -22
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.scss.template +35 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +31 -75
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.html.template +25 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.scss.template +67 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.ts.template +74 -0
- 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 +4 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.html.template +4 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.scss.template +22 -0
- 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 +37 -0
- 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 +36 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.animations.ts.template +4 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.html.template +11 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.scss.template +22 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.spec.ts.template +37 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.ts.template +47 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.html.template +52 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.scss.template +66 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +220 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.animations.ts.template +4 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.html.template +81 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.scss.template +136 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +37 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +118 -0
- package/src/ng-add/files/src/app/app.component.html.template +2 -0
- package/src/ng-add/files/src/app/app.component.ts.template +2 -0
- package/src/ng-add/files/src/app/app.routes.ts.template +14 -18
- package/src/ng-add/files/src/app/core/auth/auth.service.ts.template +58 -0
- package/src/ng-add/files/src/app/core/auth/guards/admin-override.ts.template +9 -0
- package/src/ng-add/files/src/app/core/auth/guards/index.ts.template +11 -0
- package/src/ng-add/files/src/app/core/auth/guards/redirect-if-authenticated.guard.ts.template +42 -0
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +39 -0
- package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +69 -0
- package/src/ng-add/files/src/app/core/auth/guards/require-auth.guard.ts.template +35 -0
- package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +2 -17
- package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +1 -1
- package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +7 -1
- package/src/ng-add/files/src/app/core/store/app.model.ts.template +1 -1
- package/src/ng-add/files/src/app/core/store/app.store.ts.template +71 -6
- package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +94 -53
- package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +5 -5
- package/src/ng-add/files/src/app/core/store/user/user.model.ts.template +5 -7
- package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +3 -5
- package/src/ng-add/files/src/app/core/store/user-context/user-context.model.ts.template +2 -5
- package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +4 -3
- package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +54 -0
- package/src/ng-add/files/src/app/first-time/early-access/early-access.animations.ts.template +6 -0
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.html.template +70 -52
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.scss.template +73 -6
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +59 -111
- package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +44 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.animations.ts.template +15 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +12 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +79 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +20 -0
- package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +1 -1
- package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +11 -8
- package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +2 -0
- package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.html.template +3 -0
- package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.scss.template +26 -0
- package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.ts.template +52 -0
- package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.html.template +21 -0
- package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.scss.template +71 -0
- package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.ts.template +70 -0
- package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.ts.template +131 -0
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.html.template +1 -1
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +1 -1
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +2 -2
- package/src/ng-add/files/src/environments/environment.ts.template +1 -1
- package/src/ng-add/files/src/index.html.template +3 -2
- package/src/ng-add/files/src/styles/_variables.scss.template +1 -0
- package/src/ng-add/files/src/styles.scss.template +4 -2
- package/src/ng-add/schema.json +1 -0
- package/src/ng-add/files/src/app/core/auth/auth.guard.ts.template +0 -96
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: publish-npm
|
|
3
|
+
description: Automates semantic versioning and internal package.json.template updates for @tech4good/angular-schematics before npm publishing. Analyzes git history to recommend major/minor/patch bumps. Should trigger when user asks to publish to npm, release a new version, or bump versions. Should NOT trigger for standard git commits or if the user is asking about publishing in a different repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NPM Publish Skill
|
|
7
|
+
|
|
8
|
+
This skill assists with the process of publishing a new version of the `@tech4good/angular-schematics` package. Since sandbox constraints prevent the agent from running `npm` publish commands directly, this skill focuses on the preparation and hand-off.
|
|
9
|
+
|
|
10
|
+
## Step 1: Analyze Git Logs and Recommend Version Bump
|
|
11
|
+
1. Use the `mcp_git_git_log` tool to review the git commit history since the last git tag.
|
|
12
|
+
2. Analyze the commit messages to determine the appropriate semantic version bump:
|
|
13
|
+
- **Major**: If there are any `BREAKING CHANGE` footers or `!` in the type/scope (e.g., `feat!: ...`).
|
|
14
|
+
- **Minor**: If there are any new features (`feat: ...`).
|
|
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.
|
|
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
|
+
5. **Halt execution** and wait for the user to approve the version bump type.
|
|
19
|
+
|
|
20
|
+
## Step 2: Update the Internal Template
|
|
21
|
+
1. Once the user approves the version bump (and the resulting new version number), calculate the exact new version (e.g., `20.1.0` -> `20.1.1` for patch).
|
|
22
|
+
2. Use the `replace_file_content` tool to update the `@tech4good/angular-schematics` dependency version in `src/ng-add/files/package.json.template`.
|
|
23
|
+
- Ensure the prefix (like `^`) is preserved if it exists. For example, change `"@tech4good/angular-schematics": "^20.1.0"` to `"@tech4good/angular-schematics": "^20.1.1"`.
|
|
24
|
+
3. Trigger the `git-commit` skill to commit this template update (e.g., `build(ng-add): bump template dependency for release`). This is required because `npm version` requires a clean git working directory. Be sure to follow all `git-commit` artifact planning requirements.
|
|
25
|
+
|
|
26
|
+
## Step 3: Handoff Instructions
|
|
27
|
+
1. Inform the user that the template has been updated successfully.
|
|
28
|
+
2. Provide the user with the following exact commands to run in their local terminal to complete the release process:
|
|
29
|
+
```bash
|
|
30
|
+
npm run release:<type>
|
|
31
|
+
npm run build
|
|
32
|
+
npm login
|
|
33
|
+
npm publish
|
|
34
|
+
```
|
|
35
|
+
*(Replace `<type>` with the agreed-upon bump type: `patch`, `minor`, or `major`)*.
|
|
36
|
+
3. Remind them that `npm run release:<type>` will automatically bump the root `package.json`, update the `CHANGELOG.md`, stage the files, and create a new git tag.
|
|
37
|
+
4. Remind the user they must have access to the `@tech4good` organization to publish successfully.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: "1"
|
|
2
|
+
tasks:
|
|
3
|
+
- name: test-publish-npm-recommendation
|
|
4
|
+
instruction: |
|
|
5
|
+
Use the publish-npm skill to analyze the recent git history and recommend a semantic version bump, then update the template file based on my approval. I approve of a "patch" bump to "20.1.1".
|
|
6
|
+
workspace:
|
|
7
|
+
- src: src/ng-add/files/package.json.template
|
|
8
|
+
dest: src/ng-add/files/package.json.template
|
|
9
|
+
graders:
|
|
10
|
+
- type: llm_rubric
|
|
11
|
+
rubric: |
|
|
12
|
+
Did the agent correctly check the git logs?
|
|
13
|
+
Did the agent correctly recommend a version bump type and wait for user approval?
|
|
14
|
+
Did the agent correctly update the "@tech4good/angular-schematics" dependency version in "src/ng-add/files/package.json.template" while preserving the semver prefix?
|
|
15
|
+
Did the agent trigger the git-commit skill to commit the template update?
|
|
16
|
+
Did the agent provide the final npm run release, build, npm login, and npm publish commands?
|
|
17
|
+
weight: 1.0
|
|
Binary file
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
## [20.3.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.2.0...v20.3.0) (2026-05-26)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
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))
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
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))
|
|
23
|
+
|
|
24
|
+
### Code Refactoring
|
|
25
|
+
|
|
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))
|
|
31
|
+
|
|
32
|
+
### Tests
|
|
33
|
+
|
|
34
|
+
* update mock user data and component template styling ([ffc3ad8](https://github.com/tech4good-lab/angular-schematics/commit/ffc3ad83a530a57423403343086c3380269633b5))
|
|
35
|
+
|
|
36
|
+
### Build System
|
|
37
|
+
|
|
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))
|
|
40
|
+
|
|
41
|
+
### Chores
|
|
42
|
+
|
|
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))
|
|
45
|
+
## [20.2.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.1.0...v20.2.0) (2026-05-08)
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* automate conventional commits and npm release workflow ([e98525b](https://github.com/tech4good-lab/angular-schematics/commit/e98525b3805929090a1f592f36717344b6118767))
|
|
50
|
+
* **schematics:** add default true to interactive prompts ([9a753e0](https://github.com/tech4good-lab/angular-schematics/commit/9a753e0b3388cf1ce5c9ca1cb0bff67cfda84e3c))
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* **ng-add:** remove undefined entitiesToModify2 and entitiesToRemove2 ([284f852](https://github.com/tech4good-lab/angular-schematics/commit/284f852332b5371fcde270f5c1735c2b65e761c6))
|
|
55
|
+
* require git-commit skill for template updates in publish-npm ([4116998](https://github.com/tech4good-lab/angular-schematics/commit/4116998e20b3ed4ec2fac1cca617b3330232715c))
|
|
56
|
+
|
|
57
|
+
### Documentation
|
|
58
|
+
|
|
59
|
+
* add repository-specific commit message guidelines ([3af75e3](https://github.com/tech4good-lab/angular-schematics/commit/3af75e375c51706be71f8cf0c89862173aafff08))
|
|
60
|
+
* update README ([5931736](https://github.com/tech4good-lab/angular-schematics/commit/5931736caad5698adbea4b9c36b5fa1aaffa3fc2))
|
|
61
|
+
|
|
62
|
+
### Build System
|
|
63
|
+
|
|
64
|
+
* configure npm version lifecycle hooks and update docs ([ca0c625](https://github.com/tech4good-lab/angular-schematics/commit/ca0c62557e4cb1b712837eb19780dbc770e2c81f))
|
|
65
|
+
* **ng-add:** bump template dependency for release ([a806ca5](https://github.com/tech4good-lab/angular-schematics/commit/a806ca58fd5a0007c082b033a2a0b80b91f92950))
|
|
66
|
+
# Changelog
|
package/README.md
CHANGED
|
@@ -36,14 +36,23 @@ ng generate @tech4good/angular-schematics:<schematic>
|
|
|
36
36
|
|
|
37
37
|
### Publishing
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
**Option 1: Agent-Assisted Workflow (Recommended)**
|
|
40
|
+
|
|
41
|
+
You can trigger the `publish-npm` skill via your agent assistant, which will guide you through calculating the version bump, updating the internal template, and committing the changes. Once the agent is done, run the final commands below.
|
|
42
|
+
|
|
43
|
+
**Option 2: Manual Workflow**
|
|
44
|
+
|
|
45
|
+
1. Determine the appropriate version bump (`patch`, `minor`, or `major`) by analyzing recent git commits.
|
|
46
|
+
2. Update the `@tech4good/angular-schematics` dependency version in `src/ng-add/files/package.json.template` to match the upcoming version.
|
|
47
|
+
3. Commit the template update to git (e.g., `build(ng-add): bump template dependency for release`).
|
|
48
|
+
|
|
49
|
+
**Final Release Commands**
|
|
50
|
+
|
|
51
|
+
Whether using the agent or doing it manually, run the following commands in your local terminal to complete the release:
|
|
40
52
|
|
|
41
53
|
```bash
|
|
54
|
+
npm run release:<type> # E.g., patch, minor, or major
|
|
42
55
|
npm run build
|
|
56
|
+
npm login
|
|
43
57
|
npm publish # will ask for a OTP (see Google Authenticator: npm)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
That's it!
|
|
47
|
-
|
|
48
|
-
You can also use `npm version <version>` to update the version before publishing.
|
|
49
|
-
* Don't forget to also update `src/ng-add/files/package.json.template` so that the latest version of `@tech4good/anguar-schematics` is being used in the dependencies.
|
|
58
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"options": {
|
|
3
|
+
"preset": {
|
|
4
|
+
"name": "conventionalcommits",
|
|
5
|
+
"types": [
|
|
6
|
+
{ "type": "feat", "section": "Features", "hidden": false },
|
|
7
|
+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
|
|
8
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
9
|
+
{ "type": "style", "section": "Styles", "hidden": false },
|
|
10
|
+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
|
|
11
|
+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
|
|
12
|
+
{ "type": "test", "section": "Tests", "hidden": false },
|
|
13
|
+
{ "type": "build", "section": "Build System", "hidden": false },
|
|
14
|
+
{ "type": "ci", "section": "Continuous Integration", "hidden": false },
|
|
15
|
+
{ "type": "chore", "section": "Chores", "hidden": false }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Branches and Releases
|
|
2
|
+
|
|
3
|
+
This document outlines our branching strategy and release process.
|
|
4
|
+
|
|
5
|
+
## Branching Strategy
|
|
6
|
+
|
|
7
|
+
We use a simplified workflow. Our main branches are:
|
|
8
|
+
|
|
9
|
+
* **`main`**: The production-ready state of the application. Commits to this branch trigger production deployments.
|
|
10
|
+
* **`dev`** (or `develop`): The main development branch. All feature branches merge here first for testing and integration.
|
|
11
|
+
|
|
12
|
+
### Feature Branches
|
|
13
|
+
|
|
14
|
+
When starting work on a new feature, bug fix, or task, always create a new branch from `dev`.
|
|
15
|
+
|
|
16
|
+
Branch naming convention: `<type>/a-short-description`
|
|
17
|
+
|
|
18
|
+
Examples for Code Repositories:
|
|
19
|
+
* `feat/your-new-feature` (for new functionality)
|
|
20
|
+
* `fix/your-bug-fix` (for bug fixes)
|
|
21
|
+
* `chore/your-task-name` (for maintenance)
|
|
22
|
+
|
|
23
|
+
Examples for Text-Based Repositories:
|
|
24
|
+
* `add/new-chapter` (for new content)
|
|
25
|
+
* `edit/revise-introduction` (for substantive content edits)
|
|
26
|
+
* `fix/typo-correction` (for formatting or typo fixes)
|
|
27
|
+
* `reorg/move-images` (for structural changes)
|
|
28
|
+
|
|
29
|
+
## Release Process
|
|
30
|
+
|
|
31
|
+
We use conventional commits and automated changelog generation to manage our releases.
|
|
32
|
+
|
|
33
|
+
1. **Develop**: Work happens in feature branches and merges into `dev`.
|
|
34
|
+
2. **Version Bump**: When it's time to release, we use the npm version scripts to bump the version, which automatically updates the changelog.
|
|
35
|
+
3. **Merge to Main**: The `dev` branch is merged into `main`.
|
|
36
|
+
|
|
37
|
+
### Release Commands
|
|
38
|
+
|
|
39
|
+
You can trigger a release by running the following commands (depending on the type of change):
|
|
40
|
+
|
|
41
|
+
* **Patch Release** (for bug fixes):
|
|
42
|
+
```bash
|
|
43
|
+
npm run release:patch
|
|
44
|
+
```
|
|
45
|
+
* **Minor Release** (for backwards-compatible new features):
|
|
46
|
+
```bash
|
|
47
|
+
npm run release:minor
|
|
48
|
+
```
|
|
49
|
+
* **Major Release** (for breaking changes):
|
|
50
|
+
```bash
|
|
51
|
+
npm run release:major
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
These commands will:
|
|
55
|
+
1. Bump the version in `package.json`
|
|
56
|
+
2. Automatically generate and update `CHANGELOG.md` based on conventional commits
|
|
57
|
+
3. Stage the `CHANGELOG.md` for the commit
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
## Commit Message Format Resource
|
|
2
|
+
|
|
3
|
+
We imitate Angular's practices in formatting our Git commit messages precisely using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0). This format leads to **easier-to-read commit history**.
|
|
4
|
+
|
|
5
|
+
Each commit message consists of a **header**, a **body**, and a **footer**.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
<header>
|
|
9
|
+
<BLANK LINE>
|
|
10
|
+
<body>
|
|
11
|
+
<BLANK LINE>
|
|
12
|
+
<footer>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The `header` is mandatory and must conform to the Commit Message Header format.
|
|
16
|
+
|
|
17
|
+
The `body` is mandatory for all commits except for those of type "docs". When the body is present, it must be at least 20 characters long and must conform to the Commit Message Body format.
|
|
18
|
+
|
|
19
|
+
The `footer` is optional.
|
|
20
|
+
|
|
21
|
+
### Commit Message Header
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
<type>(<scope>): <short summary>
|
|
25
|
+
│ │ │
|
|
26
|
+
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
|
|
27
|
+
│ │
|
|
28
|
+
│ └─⫸ Commit Scope: ng-add|component|entity|shared
|
|
29
|
+
│
|
|
30
|
+
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The `<type>` and `<summary>` fields are mandatory; the `(<scope>)` field is optional.
|
|
34
|
+
|
|
35
|
+
#### Type
|
|
36
|
+
|
|
37
|
+
Will most commonly be either `feat` or `fix`, but can be drawn from any of the below:
|
|
38
|
+
|
|
39
|
+
- **build**: Changes that affect the build system or external dependencies
|
|
40
|
+
- **ci**: Changes to our CI configuration files and scripts
|
|
41
|
+
- **docs**: Documentation-only changes
|
|
42
|
+
- **feat**: A new feature
|
|
43
|
+
- **fix**: A bug fix
|
|
44
|
+
- **perf**: A code change that improves performance
|
|
45
|
+
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
|
46
|
+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
|
47
|
+
- **test**: Adding missing tests or correcting existing tests
|
|
48
|
+
|
|
49
|
+
#### Scope
|
|
50
|
+
|
|
51
|
+
The scope corresponds to the specific schematic or area of the repository being modified. For the `angular-schematics` repository, use one of the following specific scopes:
|
|
52
|
+
|
|
53
|
+
- **ng-add**: Changes related to the `ng-add` schematic (project initialization).
|
|
54
|
+
- **component**: Changes related to the `component` schematic.
|
|
55
|
+
- **entity**: Changes related to the `entity` schematic.
|
|
56
|
+
- **shared**: Changes to shared schematic utilities or helpers.
|
|
57
|
+
|
|
58
|
+
If the commit touches many different parts of the repository or is a global restructure (like a `reorg`), simply omit the scope entirely.
|
|
59
|
+
|
|
60
|
+
#### Summary
|
|
61
|
+
|
|
62
|
+
The summary contains a succinct description of the change:
|
|
63
|
+
|
|
64
|
+
* use the imperative, present tense: "change" not "changed" nor "changes"
|
|
65
|
+
* don't capitalize the first letter
|
|
66
|
+
* no dot (.) at the end
|
|
67
|
+
|
|
68
|
+
### Commit Message Body
|
|
69
|
+
|
|
70
|
+
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
|
|
71
|
+
|
|
72
|
+
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making this change. You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
|
|
73
|
+
|
|
74
|
+
**We require a specific template for the commit message body to ensure consistency:**
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
<Motivation/rationale for the change>
|
|
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.>
|
|
82
|
+
|
|
83
|
+
Steps Taken:
|
|
84
|
+
1. <Step 1>
|
|
85
|
+
2. <Step 2>
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
Triggered Skills: <Skill 1>, <Skill 2>, ...
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**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.
|
|
94
|
+
|
|
95
|
+
### Commit Message Footer
|
|
96
|
+
|
|
97
|
+
The footer can contain information about breaking changes and is also the place to reference GitHub issues and other PRs that this commit closes or is related to. For example:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
BREAKING CHANGE: <breaking change summary>
|
|
101
|
+
<BLANK LINE>
|
|
102
|
+
<breaking change description + migration instructions>
|
|
103
|
+
<BLANK LINE>
|
|
104
|
+
<BLANK LINE>
|
|
105
|
+
Fixes #<issue number>, Closes #<pr number>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
|
|
109
|
+
|
|
110
|
+
## Revert commits
|
|
111
|
+
|
|
112
|
+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
|
|
113
|
+
|
|
114
|
+
The content of the commit message body should contain:
|
|
115
|
+
|
|
116
|
+
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
|
|
117
|
+
- a clear description of the reason for reverting the commit message.
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tech4good/angular-schematics",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.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",
|
|
7
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
7
|
+
"test": "npm run build && jasmine src/**/*_spec.js",
|
|
8
|
+
"changelog": "conventional-changelog --config changelog.config.json -i CHANGELOG.md -s",
|
|
9
|
+
"changelog:all": "conventional-changelog -r 0 --config changelog.config.json -i CHANGELOG.md -s",
|
|
10
|
+
"version": "npm run changelog && git add CHANGELOG.md",
|
|
11
|
+
"release:patch": "npm version patch",
|
|
12
|
+
"release:minor": "npm version minor",
|
|
13
|
+
"release:major": "npm version major"
|
|
8
14
|
},
|
|
9
15
|
"keywords": [
|
|
10
16
|
"schematics"
|
|
@@ -23,6 +29,8 @@
|
|
|
23
29
|
"devDependencies": {
|
|
24
30
|
"@types/jasmine": "~5.1.0",
|
|
25
31
|
"@types/node": "^18.19.47",
|
|
32
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
33
|
+
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
26
34
|
"jasmine": "^5.1.0"
|
|
27
35
|
}
|
|
28
36
|
}
|
|
@@ -5,7 +5,7 @@ import { signalStore } from '@ngrx/signals';
|
|
|
5
5
|
|
|
6
6
|
export const <%= classify(name) %>MockDB = signalStore(
|
|
7
7
|
{ providedIn: 'root' },
|
|
8
|
-
withEntitiesForMockDB<<%= classify(name) %>>(),
|
|
8
|
+
withEntitiesForMockDB<<%= classify(name) %>>('<%= camelize(name) %>s'),
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
export const <%= classify(name).toUpperCase() %>_DB = [
|
package/src/entity/schema.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"test:watch": "jest --watch",
|
|
12
12
|
"test:coverage": "jest --coverage",
|
|
13
13
|
"lint": "ng lint",
|
|
14
|
-
"lintfix": "ng lint --fix"
|
|
14
|
+
"lintfix": "ng lint --fix",
|
|
15
|
+
"code-check": "ngc --noEmit && sass src:dist/css-check --no-source-map && rm -rf dist/css-check && npm run lintfix"
|
|
15
16
|
},
|
|
16
17
|
"private": true,
|
|
17
18
|
"dependencies": {
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"@angular/cli": "^20.3.2",
|
|
49
50
|
"@angular/compiler-cli": "^20.3.0",
|
|
50
51
|
"@ngx-env/builder": "^20.1.1",
|
|
51
|
-
"@tech4good/angular-schematics": "^20.
|
|
52
|
+
"@tech4good/angular-schematics": "^20.3.0",
|
|
52
53
|
"@types/estree": "^1.0.0",
|
|
53
54
|
"@types/jest": "^29.5.14",
|
|
54
55
|
"@types/node": "^18.19.47",
|
|
Binary file
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
<div class="admin-panel-container">
|
|
2
|
-
|
|
2
|
+
<!-- Tab Navigation -->
|
|
3
|
+
<div class="tab-bar">
|
|
4
|
+
<button
|
|
5
|
+
class="tab-button"
|
|
6
|
+
[class.active]="activeTab() === 'users'"
|
|
7
|
+
(click)="setTab('users')"
|
|
8
|
+
>
|
|
9
|
+
<mat-icon>people</mat-icon>
|
|
10
|
+
<span>Users</span>
|
|
11
|
+
</button>
|
|
12
|
+
<button
|
|
13
|
+
class="tab-button"
|
|
14
|
+
[class.active]="activeTab() === 'settings'"
|
|
15
|
+
(click)="setTab('settings')"
|
|
16
|
+
>
|
|
17
|
+
<mat-icon>settings</mat-icon>
|
|
18
|
+
<span>Settings</span>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
3
21
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<th mat-header-cell *matHeaderCellDef> Access State </th>
|
|
13
|
-
<td mat-cell *matCellDef="let user">
|
|
14
|
-
<span class="update-btn" [matMenuTriggerFor]="accessStateMenu" aria-label="accessState">{{ user.accessState }}</span>
|
|
15
|
-
<mat-menu #accessStateMenu="matMenu">
|
|
16
|
-
<button mat-menu-item (click)="updateState(user, 'accessState', option)" *ngFor="let option of accessOptions">{{ option }}</button>
|
|
17
|
-
</mat-menu>
|
|
18
|
-
</td>
|
|
19
|
-
</ng-container>
|
|
20
|
-
|
|
21
|
-
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
|
22
|
-
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
23
|
-
</table>
|
|
24
|
-
</div>
|
|
22
|
+
<!-- Tab Content -->
|
|
23
|
+
@if (activeTab() === 'users') {
|
|
24
|
+
<app-admin-user-list></app-admin-user-list>
|
|
25
|
+
}
|
|
26
|
+
@if (activeTab() === 'settings') {
|
|
27
|
+
<app-admin-settings></app-admin-settings>
|
|
28
|
+
}
|
|
29
|
+
</div>
|
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
|
|
3
4
|
.admin-panel-container {
|
|
4
5
|
width: 100%;
|
|
6
|
+
padding: 8px 24px;
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
.tab-bar {
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: 4px;
|
|
11
|
+
margin-bottom: 24px;
|
|
12
|
+
border-bottom: 1px solid #e0e0e0;
|
|
8
13
|
|
|
9
|
-
.
|
|
14
|
+
.tab-button {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 6px;
|
|
18
|
+
padding: 10px 20px;
|
|
19
|
+
border: none;
|
|
20
|
+
background: none;
|
|
10
21
|
cursor: pointer;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
color: #666;
|
|
25
|
+
border-bottom: 2px solid transparent;
|
|
26
|
+
transition: color 0.2s ease, border-color 0.2s ease;
|
|
27
|
+
|
|
28
|
+
mat-icon {
|
|
29
|
+
font-size: 20px;
|
|
30
|
+
width: 20px;
|
|
31
|
+
height: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
color: #333;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.active {
|
|
39
|
+
color: #1976d2;
|
|
40
|
+
border-bottom-color: #1976d2;
|
|
41
|
+
}
|
|
11
42
|
}
|
|
12
43
|
}
|
|
13
44
|
}
|
|
14
|
-
}
|
|
45
|
+
}
|