@tech4good/angular-schematics 21.0.0 → 21.1.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 CHANGED
@@ -1,3 +1,12 @@
1
+ ## [21.1.0](https://github.com/tech4good-lab/angular-schematics/compare/v21.0.0...v21.1.0) (2026-07-01)
2
+
3
+ ### Features
4
+
5
+ * **entity:** add createMock factory to entity mock template ([19585e7](https://github.com/tech4good-lab/angular-schematics/commit/19585e74b5164f03ded573d53c8b50499c0c8213))
6
+
7
+ ### Build System
8
+
9
+ * **ng-add:** bump template dependency to ^21.1.0 ([96bc4fd](https://github.com/tech4good-lab/angular-schematics/commit/96bc4fd8b99bca8acfd6c50bd3ad4f4817db10c1))
1
10
  ## [21.0.0](https://github.com/tech4good-lab/angular-schematics/compare/v20.4.0...v21.0.0) (2026-06-30)
2
11
 
3
12
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tech4good/angular-schematics",
3
- "version": "21.0.0",
3
+ "version": "21.1.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",
@@ -8,5 +8,19 @@ export const <%= classify(name) %>MockDB = signalStore(
8
8
  withEntitiesForMockDB<<%= classify(name) %>>('<%= camelize(name) %>s'),
9
9
  );
10
10
 
11
- export const <%= classify(name).toUpperCase() %>_DB = [
11
+ /**
12
+ * Factory function to create a mock <%= classify(name) %> with sensible defaults.
13
+ * Any property can be overridden via the `overrides` parameter.
14
+ */
15
+ export function createMock<%= classify(name) %>(overrides?: Partial<<%= classify(name) %>>): <%= classify(name) %> {
16
+ return {
17
+ __id: '<%= dasherize(name) %>-default',
18
+ _createdAt: Timestamp.now(),
19
+ _updatedAt: Timestamp.now(),
20
+ _deleted: false,
21
+ ...overrides,
22
+ };
23
+ }
24
+
25
+ export const <%= classify(name).toUpperCase() %>_DB: <%= classify(name) %>[] = [
12
26
  ];
@@ -53,7 +53,7 @@
53
53
  "@firebase/rules-unit-testing": "^5.0.1",
54
54
  "firebase-tools": "^14.27.0",
55
55
  "@ngx-env/builder": "^21.0.1",
56
- "@tech4good/angular-schematics": "^21.0.0",
56
+ "@tech4good/angular-schematics": "^21.1.0",
57
57
  "@types/estree": "^1.0.0",
58
58
  "@types/jest": "^30.0.0",
59
59
  "@types/node": "^18.19.47",