@pattern-stack/codegen 0.27.2 → 0.27.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pattern-stack/codegen",
3
- "version": "0.27.2",
3
+ "version": "0.27.3",
4
4
  "description": "Entity-driven code generation for full-stack TypeScript applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,6 +14,12 @@ export const <%= classNames.outputSchema %> = z.object({
14
14
  <%_ clpOutputDtoFields.forEach(field => { _%>
15
15
  <%= field.camelName %>: <%- field.zodChainOutput %>,
16
16
  <%_ }) _%>
17
+ <%_ if (hasExternalIdTracking) { _%>
18
+ // external_id_tracking behavior — external_id is the public cross-entity join
19
+ // key (a referenced entity exposes it so consumers can join), so it rides the
20
+ // output DTO read-only. provider / provider_metadata stay internal.
21
+ externalId: z.string().nullable(),
22
+ <%_ } _%>
17
23
  <%_ if (hasTimestamps) { _%>
18
24
  createdAt: z.coerce.date(),
19
25
  updatedAt: z.coerce.date(),