@kosdev-code/kos-codegen-core 0.1.0-next.871 → 0.1.0-next.888

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/index.d.ts +2 -2
  2. package/index.d.ts.map +1 -1
  3. package/index.js +854 -335
  4. package/index.js.map +1 -1
  5. package/index.mjs +855 -336
  6. package/index.mjs.map +1 -1
  7. package/lib/generators/add-container-support/generate-add-container-support.d.ts +14 -0
  8. package/lib/generators/add-container-support/generate-add-container-support.d.ts.map +1 -1
  9. package/lib/generators/add-parent-aware/generate-add-parent-aware.d.ts +15 -0
  10. package/lib/generators/add-parent-aware/generate-add-parent-aware.d.ts.map +1 -0
  11. package/lib/generators/add-parent-aware/index.d.ts +2 -0
  12. package/lib/generators/add-parent-aware/index.d.ts.map +1 -0
  13. package/lib/generators/augment/find-model-declaration.d.ts +11 -0
  14. package/lib/generators/augment/find-model-declaration.d.ts.map +1 -0
  15. package/lib/generators/augment/resolve-child-model.d.ts +16 -0
  16. package/lib/generators/augment/resolve-child-model.d.ts.map +1 -0
  17. package/lib/generators/augment/resolve-model-file.d.ts.map +1 -1
  18. package/lib/generators/augment/ts-toolkit.d.ts +19 -1
  19. package/lib/generators/augment/ts-toolkit.d.ts.map +1 -1
  20. package/lib/generators/generate-container-model.d.ts +7 -0
  21. package/lib/generators/generate-container-model.d.ts.map +1 -1
  22. package/lib/generators/generate-model-project.d.ts +36 -0
  23. package/lib/generators/generate-model-project.d.ts.map +1 -0
  24. package/lib/generators/generate-view-model.d.ts +35 -0
  25. package/lib/generators/generate-view-model.d.ts.map +1 -0
  26. package/lib/generators/index.d.ts +21 -16
  27. package/lib/generators/index.d.ts.map +1 -1
  28. package/lib/generators/member-mutators/add-child.d.ts +10 -2
  29. package/lib/generators/member-mutators/add-child.d.ts.map +1 -1
  30. package/lib/generators/registration/upsert-chain-entry.d.ts +13 -0
  31. package/lib/generators/registration/upsert-chain-entry.d.ts.map +1 -0
  32. package/package.json +2 -2
  33. package/templates/kos-container-model/model/types/index.d.ts.template +2 -2
  34. package/templates/kos-model-project/project/.eslintrc.json.template +33 -0
  35. package/templates/kos-model-project/project/.kos.json.template +14 -0
  36. package/templates/kos-model-project/project/README.md.template +7 -0
  37. package/templates/kos-model-project/project/package.json.template +9 -0
  38. package/templates/kos-model-project/project/project.json.template +35 -0
  39. package/templates/kos-model-project/project/src/index.ts.template +1 -0
  40. package/templates/kos-model-project/project/src/lib/__projectName__.ts.template +3 -0
  41. package/templates/kos-model-project/project/tsconfig.json.template +20 -0
  42. package/templates/kos-model-project/project/tsconfig.lib.json.template +10 -0
  43. package/templates/kos-model-project/project/vite.config.ts.template +47 -0
  44. package/templates/kos-view-model/__nameDashCase__-view-model.ts.template +30 -0
  45. package/templates/kos-view-model/index.ts.template +1 -0
@@ -11,6 +11,20 @@ export interface AddContainerSupportOptions {
11
11
  sortKey?: string;
12
12
  /** Explicit model file path (relative to root), overriding resolution. */
13
13
  modelPath?: string;
14
+ /**
15
+ * Module the `childType` is imported from, when it is a model type rather
16
+ * than the SDK default. Without it a caller naming a concrete child type
17
+ * produces a file that references a type it never imports.
18
+ */
19
+ childTypeModule?: string;
20
+ /**
21
+ * Name of the model the container holds. Resolves to `<ProperCase>Model` and
22
+ * to the module that exports it, so the caller does not have to know whether
23
+ * that is a relative path or the child project's package name.
24
+ */
25
+ childModel?: string;
26
+ /** Project owning `childModel`. Defaults to the container model's project. */
27
+ childModelProject?: string;
14
28
  }
15
29
  /**
16
30
  * Add `@kosContainerAware` support to an existing model file.
@@ -1 +1 @@
1
- {"version":3,"file":"generate-add-container-support.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/add-container-support/generate-add-container-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAcpE,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,0BAA0B,EACnC,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D3B"}
1
+ {"version":3,"file":"generate-add-container-support.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/add-container-support/generate-add-container-support.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAajC,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAeD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,0BAA0B,EACnC,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAgF3B"}
@@ -0,0 +1,15 @@
1
+ import { CodegenFileSystem } from '../../codegen-filesystem';
2
+ import { ProjectConfiguration } from '../../project-discovery';
3
+ export interface AddParentAwareOptions {
4
+ modelName: string;
5
+ modelProject: string;
6
+ /** Options key holding the parent id. Defaults to the SDK's own key. */
7
+ parentId?: string;
8
+ /** Explicit model file path (relative to root), overriding resolution. */
9
+ modelPath?: string;
10
+ }
11
+ export declare function addParentAwareToModel(codegenFs: CodegenFileSystem, options: AddParentAwareOptions, projects?: Map<string, ProjectConfiguration>): {
12
+ modelFilePath: string;
13
+ optionsFilePath?: string;
14
+ };
15
+ //# sourceMappingURL=generate-add-parent-aware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-add-parent-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/add-parent-aware/generate-add-parent-aware.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAUpE,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAsCrD"}
@@ -0,0 +1,2 @@
1
+ export * from './generate-add-parent-aware';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/add-parent-aware/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { CodegenFileSystem } from '../../codegen-filesystem';
2
+ /**
3
+ * Find the file declaring a model with one of `typeIds`.
4
+ *
5
+ * Returns the single match, or null when there is none or when the search would
6
+ * have to guess. Ambiguity THROWS rather than picking: two files declaring the
7
+ * same type id is a real workspace problem, and mutating the wrong model is
8
+ * worse than a named failure.
9
+ */
10
+ export declare function findModelDeclarationFile(codegenFs: CodegenFileSystem, searchRoot: string, typeIds: string[]): string | null;
11
+ //# sourceMappingURL=find-model-declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-model-declaration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/find-model-declaration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMlE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,iBAAiB,EAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,GAAG,IAAI,CA0Bf"}
@@ -0,0 +1,16 @@
1
+ import { CodegenFileSystem } from '../../codegen-filesystem';
2
+ import { ProjectConfiguration } from '../../project-discovery';
3
+ export interface ChildModelQuery {
4
+ /** Model the child is being added to; its file anchors a relative import. */
5
+ modelFilePath: string;
6
+ /** Project owning the model being edited. */
7
+ modelProject: string;
8
+ childModel: string;
9
+ /** Project owning `childModel`. Defaults to `modelProject`. */
10
+ childModelProject?: string;
11
+ }
12
+ export declare function resolveChildModelType(codegenFs: CodegenFileSystem, query: ChildModelQuery, projects?: Map<string, ProjectConfiguration>): {
13
+ childType: string;
14
+ childTypeModule?: string;
15
+ };
16
+ //# sourceMappingURL=resolve-child-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-child-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/resolve-child-model.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,eAAe,EACtB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CA2BjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-model-file.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/resolve-model-file.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,cAAc,EACrB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAiDnE"}
1
+ {"version":3,"file":"resolve-model-file.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/resolve-model-file.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,cAAc,EACrB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CA+DnE"}
@@ -1,4 +1,4 @@
1
- import { SourceFile, ClassDeclaration } from 'ts-morph';
1
+ import { ClassDeclaration, SourceFile } from 'ts-morph';
2
2
  import { CodegenFileSystem } from '../../codegen-filesystem';
3
3
  /**
4
4
  * Read a file via the filesystem abstraction, apply an AST mutation, write it back.
@@ -104,6 +104,24 @@ export declare function ensureExportedMapper(sourceFile: SourceFile, spec: {
104
104
  }): boolean;
105
105
  /** Add `export * from "<moduleSpecifier>"` unless the barrel already has it. */
106
106
  export declare function ensureBarrelExport(sourceFile: SourceFile, moduleSpecifier: string): boolean;
107
+ /**
108
+ * Add named exports for a module to a barrel, creating the export declaration
109
+ * when the module is not exported yet and appending only the missing names when
110
+ * it is. Value and type exports are kept as separate declarations so a type-only
111
+ * export is not widened into a value export.
112
+ *
113
+ * Returns true if the file changed.
114
+ */
115
+ export declare function ensureNamedExports(sourceFile: SourceFile, moduleSpecifier: string, names: string[], isTypeOnly?: boolean): boolean;
116
+ /**
117
+ * Add an exported interface to a declarations file, leaving any existing
118
+ * declaration untouched. Returns true if the interface was added.
119
+ */
120
+ export declare function ensureExportedInterface(sourceFile: SourceFile, name: string, properties?: {
121
+ name: string;
122
+ type: string;
123
+ hasQuestionToken?: boolean;
124
+ }[], extendsTypes?: string[]): boolean;
107
125
  /** A decorated method to add to a model class. */
108
126
  export interface DecoratedMethodSpec {
109
127
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ts-toolkit.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/augment/ts-toolkit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,GAC/B,IAAI,CAiBN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,CAAC,GAC7B,CAAC,CASH;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CAC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DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAaD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAWT;AAED,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAQD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAkBT;AAED,iDAAiD;AACjD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAW1E"}
@@ -5,6 +5,13 @@ export interface ContainerModelOptions extends KosBaseGeneratorOptions {
5
5
  modelName?: string;
6
6
  singleton?: boolean;
7
7
  autoRegister?: boolean;
8
+ /**
9
+ * The model folder already exists and holds a written model, so the container
10
+ * is ADDED to it: only the container model file is rendered, and the folder's
11
+ * types and barrel are edited in place. Rendering the whole template set here
12
+ * would overwrite the model's own options interface and barrel.
13
+ */
14
+ existingModel?: boolean;
8
15
  }
9
16
  /**
10
17
  * Generate a container model.
@@ -1 +1 @@
1
- {"version":3,"file":"generate-container-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/generate-container-model.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAUjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C,IAAI,CAyEN"}
1
+ {"version":3,"file":"generate-container-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/generate-container-model.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAS/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAOjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C,IAAI,CAsFN"}
@@ -0,0 +1,36 @@
1
+ import { CodegenFileSystem } from '../codegen-filesystem';
2
+ /** Directory model libraries live under when the workspace declares no libsDir. */
3
+ export declare const DEFAULT_MODEL_LIBS_DIR = "libs";
4
+ export interface ModelProjectOptions {
5
+ /** Base name; the `-models` suffix is appended unless already present. */
6
+ name: string;
7
+ /** Workspace `workspaceLayout.libsDir`, when the workspace declares one. */
8
+ libsDir?: string;
9
+ }
10
+ export interface ModelProjectLayout {
11
+ /** Nx project name, e.g. `acme-models`. */
12
+ projectName: string;
13
+ /** Project root relative to the workspace root, e.g. `libs/acme-models`. */
14
+ projectRoot: string;
15
+ /** TypeScript path alias the workspace maps to the lib, e.g. `@acme/acme-models`. */
16
+ importPath: string;
17
+ }
18
+ /**
19
+ * Resolve where a model project lands and what it is called.
20
+ *
21
+ * `importPath` needs the workspace's npm scope, so the root package.json is
22
+ * read when one is reachable; a workspace without a scoped name maps the lib
23
+ * under its bare project name, matching Nx's own import-path rule.
24
+ */
25
+ export declare function resolveModelProjectLayout(codegenFs: CodegenFileSystem | null, options: ModelProjectOptions): ModelProjectLayout;
26
+ /**
27
+ * Generate a KOS model project.
28
+ *
29
+ * @param codegenFs - Target filesystem
30
+ * @param templateDir - Absolute path to the template directory containing a
31
+ * `project/` subdirectory
32
+ * @param options - Generator options
33
+ * @returns Where the project landed, what it is named, and its import path
34
+ */
35
+ export declare function generateModelProject(codegenFs: CodegenFileSystem, templateDir: string, options: ModelProjectOptions): ModelProjectLayout;
36
+ //# sourceMappingURL=generate-model-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-model-project.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/generate-model-project.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ/D,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAS7C,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAepB;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAmBpB"}
@@ -0,0 +1,35 @@
1
+ import { CodegenFileSystem } from '../codegen-filesystem';
2
+ import { ProjectConfiguration } from '../project-discovery';
3
+ import { KosBaseGeneratorOptions } from './normalize-options';
4
+ /** A KOS data model the ViewModel is built over. */
5
+ export interface ViewModelSource {
6
+ /** Model name, e.g. `beverage-container`. */
7
+ model: string;
8
+ /** Project owning the model. Defaults to the ViewModel's own project. */
9
+ project?: string;
10
+ }
11
+ export interface ViewModelOptions extends KosBaseGeneratorOptions {
12
+ /** Models passed to the constructor, in declaration order. Empty is valid. */
13
+ models?: ViewModelSource[];
14
+ /** `@kosViewModel` typeId. Defaults to the dash-case name. */
15
+ typeId?: string;
16
+ /** Register the instance with KOS DevTools. */
17
+ devToolsEnabled?: boolean;
18
+ }
19
+ export interface ViewModelResult {
20
+ /** Path of the ViewModel file, whether or not this call wrote it. */
21
+ viewModelFilePath: string;
22
+ /** False when the file already existed, in which case nothing was written. */
23
+ created: boolean;
24
+ }
25
+ /**
26
+ * Generate a ViewModel.
27
+ *
28
+ * @param codegenFs - Target filesystem
29
+ * @param templateDir - Absolute path to the kos-view-model template directory
30
+ * @param options - Generator options
31
+ * @param cwd - Current working directory for project resolution
32
+ * @param projects - Optional pre-computed project map
33
+ */
34
+ export declare function generateViewModel(codegenFs: CodegenFileSystem, templateDir: string, options: ViewModelOptions, cwd: string, projects?: Map<string, ProjectConfiguration>): ViewModelResult;
35
+ //# sourceMappingURL=generate-view-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-view-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/generate-view-model.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAK/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAIjE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D,8EAA8E;IAC9E,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;CAClB;AAWD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C,eAAe,CA+FjB"}
@@ -1,33 +1,38 @@
1
1
  export { generateSplashProject, type SplashProjectOptions, } from './generate-splash-project';
2
+ export { DEFAULT_MODEL_LIBS_DIR, generateModelProject, resolveModelProjectLayout, type ModelProjectLayout, type ModelProjectOptions, } from './generate-model-project';
2
3
  export { generateInit, type KosInitOptions } from './generate-init';
3
4
  export { generatePolyglotWorkspace, type PolyglotWorkspaceOptions, type PolyglotWorkspaceResult, } from './generate-polyglot-workspace';
4
- export { syncCiManifests, discoverUiArtifacts, discoverJavaArtifacts, type CiSyncOptions, type CiSyncResult, type CiSyncManifestResult, type DiscoveredArtifact, } from './ci-sync';
5
- export { ensureJavaAggregatorPom, type EnsureJavaAggregatorOptions, finalizeArchetypeModule, type FinalizeArchetypeModuleOptions, addJavaArtifactToManifests, type AddJavaArtifactOptions, } from './java-workspace';
5
+ export { discoverJavaArtifacts, discoverUiArtifacts, syncCiManifests, type CiSyncManifestResult, type CiSyncOptions, type CiSyncResult, type DiscoveredArtifact, } from './ci-sync';
6
+ export { addJavaArtifactToManifests, ensureJavaAggregatorPom, finalizeArchetypeModule, type AddJavaArtifactOptions, type EnsureJavaAggregatorOptions, type FinalizeArchetypeModuleOptions, } from './java-workspace';
6
7
  export { normalizeOptions, type KosBaseGeneratorOptions, type NormalizedOptions, } from './normalize-options';
7
- export { buildKabTargets, buildSbomTarget, resolveKabPath, KAB_OUTPUT_DIR, KAB_OUTPUT_PATH, type KabTargetsOptions, type KabTargetDefinition, UPDATE_RELEASE_VERSION_SCRIPT_PATH, } from './kab-targets';
8
- export { listServiceCatalog, readServiceModuleOperations, type ServiceCatalogEntry, type ServiceCatalogQuery, type ServiceOperation, type CatalogMethod, } from './service-catalog';
8
+ export { buildKabTargets, buildSbomTarget, KAB_OUTPUT_DIR, KAB_OUTPUT_PATH, resolveKabPath, UPDATE_RELEASE_VERSION_SCRIPT_PATH, type KabTargetDefinition, type KabTargetsOptions, } from './kab-targets';
9
9
  export { UPDATE_RELEASE_VERSION_SCRIPT } from './release-version-script';
10
+ export { listServiceCatalog, readServiceModuleOperations, type CatalogMethod, type ServiceCatalogEntry, type ServiceCatalogQuery, type ServiceOperation, } from './service-catalog';
10
11
  export { appendBarrelExport } from './barrel-utils';
11
12
  export { updateModelIndex } from './update-model-index';
12
- export { generateHook, type HookOptions } from './generate-hook';
13
- export { generateContext, type ContextOptions } from './generate-context';
14
- export { generateContainerModel, type ContainerModelOptions, } from './generate-container-model';
15
13
  export { generateCompanionModel, type CompanionModelOptions, } from './generate-companion-model';
16
- export { generateModel, type ModelOptions, type GenerateModelParams, } from './generate-model';
14
+ export { generateContainerModel, type ContainerModelOptions, } from './generate-container-model';
15
+ export { generateContext, type ContextOptions } from './generate-context';
16
+ export { generateHook, type HookOptions } from './generate-hook';
17
+ export { generateModel, type GenerateModelParams, type ModelOptions, } from './generate-model';
18
+ export { generateViewModel, type ViewModelOptions, type ViewModelResult, type ViewModelSource, } from './generate-view-model';
17
19
  export { addFutureToModel, type AddFutureToModelOptions, type NormalizedAddFutureToModelOptions, } from './add-future-to-model';
18
20
  export { addContainerSupportToModel, type AddContainerSupportOptions, } from './add-container-support';
19
- export { addModelEffectToModel, type AddModelEffectOptions, addDependencyToModel, type AddDependencyOptions, addChildToModel, type AddChildOptions, type ChildShape, addTopicHandlerToModel, type AddTopicHandlerOptions, addConfigPropertyToModel, type AddConfigPropertyOptions, addServiceRequestToModel, type AddServiceRequestOptions, type AddServiceRequestResult, type ServiceRequestMockMode, type UntypedEndpointDetails, type UntypedEndpointError, addPropertyToModel, type AddPropertyOptions, addComputedToModel, type AddComputedOptions, } from './member-mutators';
21
+ export { addParentAwareToModel, type AddParentAwareOptions, } from './add-parent-aware';
20
22
  export { resolveModelFilePath, type ModelFileQuery, } from './augment/resolve-model-file';
21
- export { transformSourceFile, ensureNamedImport, resolveSdkModuleSpecifier, getModelClass, addClassDecorator, ensureDeclarationMerge, ensureFileEslintDisable, addDecoratedMethod, addDecoratedProperty, addPlainProperty, addGetter, } from './augment/ts-toolkit';
22
- export { validateModel, type ValidateModelOptions, type ValidationFinding, type ValidationResult, } from './validate';
23
- export { describeModel, type DescribeModelOptions, type DescribedMember, type ModelDescription, } from './describe';
23
+ export { addClassDecorator, addDecoratedMethod, addDecoratedProperty, addGetter, addPlainProperty, ensureDeclarationMerge, ensureFileEslintDisable, ensureNamedImport, getModelClass, resolveSdkModuleSpecifier, transformSourceFile, } from './augment/ts-toolkit';
24
+ export { describeModel, type DescribedMember, type DescribeModelOptions, type ModelDescription, } from './describe';
25
+ export { addChildToModel, addComputedToModel, addConfigPropertyToModel, addDependencyToModel, addModelEffectToModel, addPropertyToModel, addServiceRequestToModel, addTopicHandlerToModel, type AddChildOptions, type AddComputedOptions, type AddConfigPropertyOptions, type AddDependencyOptions, type AddModelEffectOptions, type AddPropertyOptions, type AddServiceRequestOptions, type AddServiceRequestResult, type AddTopicHandlerOptions, type ChildShape, type ServiceRequestMockMode, type UntypedEndpointDetails, type UntypedEndpointError, } from './member-mutators';
24
26
  export { lookupSdkType, type LookupSdkTypeOptions, type SdkSymbolDeclaration, type SdkTypeLookupResult, } from './types';
27
+ export { validateModel, type ValidateModelOptions, type ValidationFinding, type ValidationResult, } from './validate';
25
28
  export { generateComponent, type ComponentOptions, } from './component/generate-component';
26
- export type { NormalizedComponentOptions, PluginConfiguration, PluginContribution, ExperienceConfig, PluginType, } from './component/types';
27
- export { PLUGIN_TYPES, CONTRIBUTION_TYPE_MAP, LOCALIZED_PLUGIN_TYPES, KOS_JSON_PATHS, } from './component/types';
28
- export { PluginHandlerFactory } from './component/plugin-handlers/factory';
29
- export type { PluginHandler } from './component/plugin-handlers/base';
30
29
  export { BasePluginHandler } from './component/plugin-handlers/base';
30
+ export type { PluginHandler } from './component/plugin-handlers/base';
31
+ export { PluginHandlerFactory } from './component/plugin-handlers/factory';
32
+ export { CONTRIBUTION_TYPE_MAP, KOS_JSON_PATHS, LOCALIZED_PLUGIN_TYPES, PLUGIN_TYPES, } from './component/types';
33
+ export type { ExperienceConfig, NormalizedComponentOptions, PluginConfiguration, PluginContribution, PluginType, } from './component/types';
31
34
  export { KosConfigBuilder } from './component/utils/kos-config-builder';
32
35
  export { ValidationError } from './component/utils/validation';
36
+ export { countChainEntries, upsertChainEntry, } from './registration/upsert-chain-entry';
37
+ export type { UpsertChainEntryResult } from './registration/upsert-chain-entry';
33
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EACL,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uBAAuB,EACvB,KAAK,2BAA2B,EAChC,uBAAuB,EACvB,KAAK,8BAA8B,EACnC,0BAA0B,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,M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AgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-codegen-core/src/lib/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EACL,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,GACpC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,eAAe,EACf,cAAc,EACd,kCAAkC,EAClC,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAC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AmC,CAAC;AAC3C,YAAY,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -6,8 +6,16 @@ export interface AddChildOptions {
6
6
  modelProject: string;
7
7
  /** Property name that holds the child(ren), e.g. `pages`, `pump`, `sensors`. */
8
8
  propertyName: string;
9
- /** Child model TS type, e.g. `PageModel`. */
10
- childType: string;
9
+ /** Child model TS type, e.g. `PageModel`. Derived when `childModel` is given. */
10
+ childType?: string;
11
+ /**
12
+ * Name of the child model. Resolves to `<ProperCase>Model` and to the module
13
+ * that exports it, so the caller does not have to know whether that is a
14
+ * relative path or the child project's package name.
15
+ */
16
+ childModel?: string;
17
+ /** Project owning `childModel`. Defaults to the parent model's project. */
18
+ childModelProject?: string;
11
19
  /** How the child(ren) are held. Default `single`. */
12
20
  shape?: ChildShape;
13
21
  /** Package that owns the child model; when set, its type is imported from the root. */
@@ -1 +1 @@
1
- {"version":3,"file":"add-child.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/member-mutators/add-child.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAWpE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,YAAY,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAC7B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,eAAe,EACxB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAmE3B"}
1
+ {"version":3,"file":"add-child.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/member-mutators/add-child.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAYpE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,YAAY,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qDAAqD;IACrD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAC7B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,eAAe,EACxB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC3C;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAgF3B"}
@@ -0,0 +1,13 @@
1
+ export interface UpsertChainEntryResult {
2
+ changed: boolean;
3
+ /** The full file text after the edit (only when `changed`). */
4
+ content?: string;
5
+ /** Whether an import for the bean had to be added (only when `changed`). */
6
+ importAdded?: boolean;
7
+ note?: string;
8
+ error?: string;
9
+ }
10
+ /** Number of `.model(...)` entries in a chain file. */
11
+ export declare function countChainEntries(content: string): number;
12
+ export declare function upsertChainEntry(content: string, bean: string, importSpec: string): UpsertChainEntryResult;
13
+ //# sourceMappingURL=upsert-chain-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upsert-chain-entry.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-codegen-core/src/lib/generators/registration/upsert-chain-entry.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwCD,uDAAuD;AACvD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,sBAAsB,CA4CxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-codegen-core",
3
- "version": "0.1.0-next.871",
3
+ "version": "0.1.0-next.888",
4
4
  "type": "commonjs",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "kos": {
27
27
  "build": {
28
- "gitHash": "e137eed4b414b79d2a5afcde28f43544a56eb557"
28
+ "gitHash": "a5481c29ff5f1e4f0c89ed967aea9b0f0b9ee171"
29
29
  }
30
30
  }
31
31
  }
@@ -1,10 +1,10 @@
1
1
 
2
- <% if (parentAware) { %>import type {KosParentAware} from "@kosdev-code/kos-ui-sdk";<% } %>
2
+ <% if (locals.parentAware) { %>import type {KosParentAware} from "@kosdev-code/kos-ui-sdk";<% } %>
3
3
 
4
4
 
5
5
  // --------------- <%= modelNameProperCase %> ---------------
6
6
 
7
- export interface <%= modelNameProperCase %>Options <% if (parentAware) { %>extends KosParentAware<% } %> {
7
+ export interface <%= modelNameProperCase %>Options <% if (locals.parentAware) { %>extends KosParentAware<% } %> {
8
8
 
9
9
  }
10
10
 
@@ -0,0 +1,33 @@
1
+ {
2
+ "extends": ["<%= offsetFromRoot %>.eslintrc.json"],
3
+ "ignorePatterns": ["!**/*"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
+ "rules": {}
8
+ },
9
+ {
10
+ "files": ["*.ts", "*.tsx"],
11
+ "rules": {}
12
+ },
13
+ {
14
+ "files": ["*.js", "*.jsx"],
15
+ "rules": {}
16
+ },
17
+ {
18
+ "files": ["*.json"],
19
+ "parser": "jsonc-eslint-parser",
20
+ "rules": {
21
+ "@nx/dependency-checks": [
22
+ "error",
23
+ {
24
+ "ignoredFiles": [
25
+ "{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}",
26
+ "{projectRoot}/vite.config.{js,ts,mjs,mts}"
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "<%= projectName %>",
3
+ "type": "kos.model",
4
+ "version": "0.0.0-SNAPSHOT",
5
+ "models": {},
6
+ "generator": {
7
+ "projectType": "model",
8
+ "defaults": {
9
+ "model": {
10
+ "folder": "models"
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ # <%= projectName %>
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build <%= projectName %>` to build the library.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "<%= importPath %>",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "types": "./index.d.ts",
8
+ "dependencies": {}
9
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "<%= projectName %>",
3
+ "$schema": "<%= offsetFromRoot %>node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "<%= projectRoot %>/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "@nx/vite:build",
10
+ "outputs": ["{options.outputPath}"],
11
+ "defaultConfiguration": "production",
12
+ "options": {
13
+ "outputPath": "dist/<%= projectRoot %>"
14
+ },
15
+ "configurations": {
16
+ "development": {
17
+ "mode": "development"
18
+ },
19
+ "production": {
20
+ "mode": "production"
21
+ }
22
+ }
23
+ },
24
+ "lint": {
25
+ "executor": "@nx/eslint:lint"
26
+ },
27
+ "api": {
28
+ "command": "kosui api:generate --project=<%= projectName %>",
29
+ "options": {
30
+ "host": "http://127.0.0.1:8081",
31
+ "defaultVersion": "snapshot"
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1 @@
1
+ export * from './lib/<%= projectName %>';
@@ -0,0 +1,3 @@
1
+ export function <%= projectNameCamelCase %>(): string {
2
+ return '<%= projectName %>';
3
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "esnext",
5
+ "forceConsistentCasingInFileNames": true,
6
+ "strict": true,
7
+ "importHelpers": true,
8
+ "noImplicitOverride": true,
9
+ "noImplicitReturns": true,
10
+ "noFallthroughCasesInSwitch": true,
11
+ "noPropertyAccessFromIndexSignature": true
12
+ },
13
+ "files": [],
14
+ "include": [],
15
+ "references": [
16
+ {
17
+ "path": "./tsconfig.lib.json"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "declaration": true,
6
+ "types": ["node", "vite/client"],
7
+ "module": "esnext"
8
+ },
9
+ "include": ["src/**/*.ts"]
10
+ }