@kosdev-code/kos-nx-plugin 2.0.41 → 2.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.
Files changed (21) hide show
  1. package/package.json +2 -2
  2. package/src/generators/kos-add-future-to-model/generator.d.ts.map +1 -1
  3. package/src/generators/kos-add-future-to-model/generator.js.map +1 -1
  4. package/src/generators/kos-add-future-to-model/lib/model-transformer.d.ts +8 -3
  5. package/src/generators/kos-add-future-to-model/lib/model-transformer.d.ts.map +1 -1
  6. package/src/generators/kos-add-future-to-model/lib/model-transformer.js +191 -155
  7. package/src/generators/kos-add-future-to-model/lib/model-transformer.js.map +1 -1
  8. package/src/generators/kos-container-model/files/model/__nameDashCase__-model.ts.template +25 -40
  9. package/src/generators/kos-container-model/files/model/index.ts.template +20 -5
  10. package/src/generators/kos-model/files/model/__nameDashCase__-model.ts.template +35 -43
  11. package/src/generators/kos-model/files/model/index.ts__template__ +11 -3
  12. package/src/generators/kos-model/schema.d.ts +1 -0
  13. package/src/generators/kos-model/schema.json +5 -0
  14. package/src/generators/kos-plugin-project/generator.js +6 -6
  15. package/src/generators/kos-plugin-project/generator.js.map +1 -1
  16. package/src/generators/preset/generator.d.ts.map +1 -1
  17. package/src/generators/preset/generator.js +7 -5
  18. package/src/generators/preset/generator.js.map +1 -1
  19. package/src/generators/preset/tools/tools/scripts/update.mjs.template +29 -8
  20. package/src/generators/kos-container-model/files/model/__nameDashCase__-registration.ts.template +0 -113
  21. package/src/generators/kos-model/files/model/__nameDashCase__-registration.ts.template +0 -144
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-nx-plugin",
3
- "version": "2.0.41",
3
+ "version": "2.1.0",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  "main": "./src/index.js",
20
20
  "kos": {
21
21
  "build": {
22
- "gitHash": "82f501e94dcc050e3ec05bb9fd68f2671112823d"
22
+ "gitHash": "82fe4f624fff667405f0cd0cc6eb874031e807f4"
23
23
  }
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,iBAiFnC;AAED,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,YAAY,CAAC;AAO/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,iBAiFnC;AAED,eAAe,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/generator.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,+CAA4C;AAC5C,+DAA+D;AAC/D,+DAA2D;AAC3D,6EAA6E;AAC7E,mEAAmE;AAG5D,KAAK,UAAU,4BAA4B,CAChD,IAAU,EACV,OAAkC;IAElC,MAAM,UAAU,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEnD,eAAM,CAAC,IAAI,CACT,UAAU,UAAU,CAAC,UAAU,6BAA6B,UAAU,CAAC,SAAS,EAAE,CACnF,CAAC;IAEF,kCAAkC;IAClC,IAAI,CAAC,IAAI,CAAC,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AAG,IAAI,sDAA2B,CAC7D,IAAI,EACJ,UAAU,CACX,CAAC;YACF,uBAAuB,CAAC,SAAS,EAAE,CAAC;QACtC,CAAC;QAED,eAAM,CAAC,IAAI,CACT,wBAAwB,UAAU,CAAC,UAAU,sBAAsB,UAAU,CAAC,SAAS,EAAE,CAC1F,CAAC;QACF,eAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,eAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,eAAM,CAAC,IAAI,CACT,+EAA+E,CAChF,CAAC;QACF,eAAM,CAAC,IAAI,CACT,gEAAgE,CACjE,CAAC;QACF,eAAM,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;QACjE,IAAI,UAAU,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACzC,eAAM,CAAC,IAAI,CACT,gEAAgE,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAnFD,oEAmFC;AAED,kBAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/generator.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,+CAA4C;AAE5C,+DAA+D;AAC/D,+DAA2D;AAC3D,6EAA6E;AAC7E,mEAAmE;AAG5D,KAAK,UAAU,4BAA4B,CAChD,IAAU,EACV,OAAkC;IAElC,MAAM,UAAU,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEnD,eAAM,CAAC,IAAI,CACT,UAAU,UAAU,CAAC,UAAU,6BAA6B,UAAU,CAAC,SAAS,EAAE,CACnF,CAA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oBAAoB,EAAE,CACrE,CAAC;YACF,MAAM,uBAAuB,GAAG,IAAI,sDAA2B,CAC7D,IAAI,EACJ,UAAU,CACX,CAAC;YACF,uBAAuB,CAAC,SAAS,EAAE,CAAC;QACtC,CAAC;QAED,eAAM,CAAC,IAAI,CACT,wBAAwB,UAAU,CAAC,UAAU,sBAAsB,UAAU,CAAC,SAAS,EAAE,CAC1F,CAAC;QACF,eAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,eAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,eAAM,CAAC,IAAI,CACT,+EAA+E,CAChF,CAAC;QACF,eAAM,CAAC,IAAI,CACT,gEAAgE,CACjE,CAAC;QACF,eAAM,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;QACjE,IAAI,UAAU,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACzC,eAAM,CAAC,IAAI,CACT,gEAAgE,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAnFD,oEAmFC;AAED,kBAAe,4BAA4B,CAAC"}
@@ -1,17 +1,22 @@
1
1
  import { Tree } from "@nx/devkit";
2
2
  import { NormalizedKosAddFutureToModelSchema } from "../schema";
3
+ /**
4
+ * Transformer that updates existing models to use the new @kosFutureAware decorator pattern
5
+ * with TypeScript interface merging for type safety.
6
+ */
3
7
  export declare class ModelFileTransformer {
4
8
  private tree;
5
9
  private options;
6
10
  constructor(tree: Tree, options: NormalizedKosAddFutureToModelSchema);
7
11
  transform(): void;
12
+ private addESLintDisable;
8
13
  private addImports;
9
14
  private addServiceImport;
15
+ private addInterfaceMerging;
16
+ private addDecorator;
10
17
  private updatePublicType;
11
- private addFutureProperties;
12
- private addMixinSetup;
18
+ private removeLegacySetup;
13
19
  private addFutureMethod;
14
- private addFutureUpdateHandler;
15
20
  private addOnFutureUpdateMethod;
16
21
  }
17
22
  //# sourceMappingURL=model-transformer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/lib/model-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAEhE,qBAAa,oBAAoB;IAE7B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;gBADP,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mCAAmC;IAGtD,SAAS,IAAI,IAAI;IAwBjB,OAAO,CAAC,UAAU;IA2FlB,OAAO,CAAC,gBAAgB;IAmExB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,aAAa;IA0BrB,OAAO,CAAC,eAAe;IAsCvB,OAAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,uBAAuB;CAiChC"}
1
+ {"version":3,"file":"model-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/lib/model-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAEhE;;;GAGG;AACH,qBAAa,oBAAoB;IAE7B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;gBADP,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mCAAmC;IAGtD,SAAS,IAAI,IAAI;IAyBjB,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,UAAU;IA6GlB,OAAO,CAAC,gBAAgB;IA+CxB,OAAO,CAAC,mBAAmB;IAqC3B,OAAO,CAAC,YAAY;IA2BpB,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,eAAe;IA+DvB,OAAO,CAAC,uBAAuB;CA8ChC"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModelFileTransformer = void 0;
4
+ /**
5
+ * Transformer that updates existing models to use the new @kosFutureAware decorator pattern
6
+ * with TypeScript interface merging for type safety.
7
+ */
4
8
  class ModelFileTransformer {
5
9
  tree;
6
10
  options;
@@ -14,18 +18,28 @@ class ModelFileTransformer {
14
18
  throw new Error(`Model file not found: ${modelFilePath}`);
15
19
  }
16
20
  let content = this.tree.read(modelFilePath, "utf-8");
21
+ content = this.addESLintDisable(content);
17
22
  content = this.addImports(content);
18
23
  content = this.addServiceImport(content);
24
+ content = this.addInterfaceMerging(content);
25
+ content = this.addDecorator(content);
19
26
  content = this.updatePublicType(content);
20
- content = this.addFutureProperties(content);
21
- content = this.addMixinSetup(content);
27
+ content = this.removeLegacySetup(content);
22
28
  content = this.addFutureMethod(content);
23
29
  if (this.options.futureType === "complete") {
24
- content = this.addFutureUpdateHandler(content);
25
30
  content = this.addOnFutureUpdateMethod(content);
26
31
  }
27
32
  this.tree.write(modelFilePath, content);
28
33
  }
34
+ addESLintDisable(content) {
35
+ // Check if ESLint disable comment already exists
36
+ if (content.includes("@typescript-eslint/no-unsafe-declaration-merging")) {
37
+ return content;
38
+ }
39
+ // Add the ESLint disable comment at the top of the file
40
+ const eslintDisable = "/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\n";
41
+ return eslintDisable + content;
42
+ }
29
43
  addImports(content) {
30
44
  const { internal, futureType } = this.options;
31
45
  const isComplete = futureType === "complete";
@@ -38,16 +52,23 @@ class ModelFileTransformer {
38
52
  const existingImportsStr = kosModelMatch[1] || "";
39
53
  const newImports = [
40
54
  "kosFuture",
41
- `setup${isComplete ? "Complete" : "Minimal"}FutureSupport`,
55
+ "kosFutureAware",
56
+ isComplete ? "KosFutureAwareFull" : "KosFutureAwareMinimal",
42
57
  ];
43
58
  // Parse existing imports and add new ones
44
59
  const existingImports = existingImportsStr
45
60
  .split(",")
46
61
  .map((s) => s.trim())
47
62
  .filter(Boolean);
63
+ // Remove old setup functions if they exist
64
+ const importsToRemove = [
65
+ "setupCompleteFutureSupport",
66
+ "setupMinimalFutureSupport",
67
+ ];
68
+ const cleanedImports = existingImports.filter((imp) => !importsToRemove.includes(imp));
48
69
  // Only add imports that don't already exist
49
- const importsToAdd = newImports.filter((imp) => !existingImports.includes(imp));
50
- const allImports = [...existingImports, ...importsToAdd];
70
+ const importsToAdd = newImports.filter((imp) => !cleanedImports.includes(imp));
71
+ const allImports = [...cleanedImports, ...importsToAdd];
51
72
  const newImportLine = internal
52
73
  ? `import { ${allImports.join(", ")} } from "../../../core/core/decorators"`
53
74
  : `import { ${allImports.join(", ")} } from "@kosdev-code/kos-ui-sdk"`;
@@ -57,14 +78,7 @@ class ModelFileTransformer {
57
78
  const typeImportsBase = internal
58
79
  ? "../../../models/types/future-interfaces"
59
80
  : "@kosdev-code/kos-ui-sdk";
60
- const futureTypeImports = [
61
- "ExternalFutureInterface",
62
- "FutureAwareContainer",
63
- "IFutureModel",
64
- ];
65
- if (isComplete) {
66
- futureTypeImports.push("FutureUpdateHandler");
67
- }
81
+ const futureTypeImports = ["ExternalFutureInterface", "IFutureModel"];
68
82
  // Find existing type import or add new one
69
83
  const typeImportRegex = internal
70
84
  ? /import type {([^}]*)} from "\.\.\/\.\.\/\.\.\/models\/types\/future-interfaces"/
@@ -73,13 +87,20 @@ class ModelFileTransformer {
73
87
  if (typeImportMatch) {
74
88
  // Update existing import
75
89
  const existingTypes = typeImportMatch[1] || "";
76
- const allTypes = [
77
- ...existingTypes
78
- .split(",")
79
- .map((s) => s.trim())
80
- .filter(Boolean),
81
- ...futureTypeImports,
82
- ].join(", ");
90
+ const existingTypesList = existingTypes
91
+ .split(",")
92
+ .map((s) => s.trim())
93
+ .filter(Boolean);
94
+ // Remove old types that are no longer needed
95
+ const typesToRemove = [
96
+ "FutureAwareContainer",
97
+ "FutureHandlerContainer",
98
+ "FutureStateAccessor",
99
+ "FutureUpdateHandler",
100
+ ];
101
+ const cleanedTypes = existingTypesList.filter((type) => !typesToRemove.includes(type));
102
+ const typesToAdd = futureTypeImports.filter((type) => !cleanedTypes.includes(type));
103
+ const allTypes = [...cleanedTypes, ...typesToAdd].join(", ");
83
104
  const newTypeImport = `import type { ${allTypes} } from "${typeImportsBase}"`;
84
105
  content = content.replace(typeImportRegex, newTypeImport);
85
106
  }
@@ -105,172 +126,187 @@ class ModelFileTransformer {
105
126
  if (content.includes(`${nameProperCase}OperationProgress`)) {
106
127
  return content;
107
128
  }
108
- // Look for existing "./services" import (handle multiline)
129
+ // Look for existing "./services" import
109
130
  const servicesImportRegex = /import\s*{([^}]*)}\s*from\s*["']\.\/services["'];?/s;
110
131
  const servicesMatch = content.match(servicesImportRegex);
111
132
  if (servicesMatch) {
112
133
  // Add to existing services import
113
134
  const existingImports = servicesMatch[1];
114
- if (existingImports.includes(`${nameProperCase}OperationProgress`)) {
115
- return content; // Already imported
116
- }
117
- // Clean up existing imports - remove trailing commas and normalize
118
135
  const cleanedImports = existingImports
119
136
  .split(",")
120
- .map((imp) => imp.trim())
121
- .filter((imp) => imp.length > 0)
122
- .join(",\n ");
123
- const newImports = cleanedImports
124
- ? `${cleanedImports},\n type ${nameProperCase}OperationProgress`
125
- : `type ${nameProperCase}OperationProgress`;
126
- const newImportStatement = `import {\n ${newImports}\n} from "./services";`;
127
- return content.replace(servicesImportRegex, newImportStatement);
137
+ .map((s) => s.trim())
138
+ .filter(Boolean);
139
+ cleanedImports.push(`${nameProperCase}OperationProgress`);
140
+ const newImport = `import { ${cleanedImports.join(", ")} } from "./services";`;
141
+ content = content.replace(servicesImportRegex, newImport);
128
142
  }
129
143
  else {
130
- // Add new service import after all imports
131
- const lines = content.split("\n");
132
- let lastImportIndex = -1;
133
- // Find the actual last import line (accounting for multi-line imports)
134
- for (let i = 0; i < lines.length; i++) {
135
- const line = lines[i].trim();
136
- if (line.startsWith("import")) {
137
- // Find the end of this import statement
138
- let j = i;
139
- while (j < lines.length && !lines[j].includes(";")) {
140
- j++;
141
- }
142
- lastImportIndex = j;
143
- i = j; // Skip to end of current import
144
- }
145
- }
146
- if (lastImportIndex >= 0) {
147
- const serviceImport = `import type { ${nameProperCase}OperationProgress } from "./services";`;
148
- lines.splice(lastImportIndex + 1, 0, serviceImport);
149
- return lines.join("\n");
144
+ // Add new services import after types import
145
+ const typesImportRegex = /import\s+type\s+{[^}]*}\s+from\s+["']\.\/types["'];?/;
146
+ const typesMatch = content.match(typesImportRegex);
147
+ if (typesMatch) {
148
+ const newImport = `\nimport type { ${nameProperCase}OperationProgress } from "./services";`;
149
+ content = content.replace(typesMatch[0], typesMatch[0] + newImport);
150
150
  }
151
151
  }
152
152
  return content;
153
153
  }
154
- updatePublicType(content) {
155
- const { nameProperCase, updateServices } = this.options;
156
- const typeRegex = new RegExp(`export type ${nameProperCase}Model = PublicModelInterface<${nameProperCase}ModelImpl>;`);
157
- // Use 'any' for progress type if services are not being updated
158
- const progressType = updateServices
159
- ? `${nameProperCase}OperationProgress`
160
- : "any";
161
- const newType = `export type ${nameProperCase}Model = PublicModelInterface<${nameProperCase}ModelImpl> & ExternalFutureInterface<${progressType}>;`;
162
- return content.replace(typeRegex, newType);
163
- }
164
- addFutureProperties(content) {
165
- const { nameProperCase, futureType, updateServices } = this.options;
154
+ addInterfaceMerging(content) {
155
+ const { nameProperCase, futureType } = this.options;
166
156
  const isComplete = futureType === "complete";
167
- const progressType = updateServices
157
+ const interfaceType = isComplete
158
+ ? "KosFutureAwareFull"
159
+ : "KosFutureAwareMinimal";
160
+ const progressType = this.options.updateServices
168
161
  ? `${nameProperCase}OperationProgress`
169
- : "any";
170
- // Find the class declaration and add properties after the constructor
171
- const classRegex = new RegExp(`export class ${nameProperCase}ModelImpl[^{]*{`);
162
+ : "Record<string, unknown>";
163
+ // Find the class declaration
164
+ const classRegex = new RegExp(`(@kosModel[^\\n]*\\n)([^\\n]*export\\s+class\\s+${nameProperCase}ModelImpl)`, "m");
172
165
  const classMatch = content.match(classRegex);
173
166
  if (classMatch) {
174
- const futureProps = [
175
- "",
176
- " // Future support properties - guaranteed by framework",
177
- ` public futureHandler!: FutureAwareContainer<${progressType}>;`,
178
- ];
179
- if (isComplete) {
180
- futureProps.push(` public future?: IFutureModel<${progressType}>; // Used internally for progress checks and custom logic`);
167
+ // Check if interface merging already exists
168
+ const interfaceRegex = new RegExp(`interface\\s+${nameProperCase}ModelImpl\\s+extends`);
169
+ if (!content.match(interfaceRegex)) {
170
+ // Add interface merging before the class declaration
171
+ const interfaceMerging = `\n// Interface merging for Future Container type safety\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ${nameProperCase}ModelImpl extends ${interfaceType}<${progressType}> {}\n\n`;
172
+ content = content.replace(classMatch[0], interfaceMerging + classMatch[0]);
181
173
  }
182
- const insertAfter = classMatch[0];
183
- const replacement = insertAfter + futureProps.join("\n");
184
- return content.replace(classMatch[0], replacement);
185
174
  }
186
175
  return content;
187
176
  }
188
- addMixinSetup(content) {
189
- const { futureType } = this.options;
177
+ addDecorator(content) {
178
+ const { nameProperCase, futureType } = this.options;
190
179
  const isComplete = futureType === "complete";
191
- // Find constructor and add mixin setup call at the end
192
- const constructorRegex = /constructor\([^)]*\)[^{]*{([^}]*)}/s;
193
- const constructorMatch = content.match(constructorRegex);
194
- if (constructorMatch) {
195
- const constructorBody = constructorMatch[1];
196
- const setupCall = `\n \n // Initialize Future support\n setup${isComplete ? "Complete" : "Minimal"}FutureSupport(this);`;
197
- const newConstructorBody = constructorBody + setupCall;
198
- const newConstructor = constructorMatch[0].replace(constructorBody, newConstructorBody);
199
- return content.replace(constructorMatch[0], newConstructor);
180
+ // Find the class declaration with existing decorators
181
+ const classRegex = new RegExp(`(@kosModel[^\\n]*\\n)((?:@[^\\n]*\\n)*)([^\\n]*export\\s+class\\s+${nameProperCase}ModelImpl)`, "m");
182
+ const classMatch = content.match(classRegex);
183
+ if (classMatch) {
184
+ // Check if @kosFutureAware already exists
185
+ if (!classMatch[2].includes("@kosFutureAware")) {
186
+ const decoratorOptions = isComplete ? "" : "{ mode: 'minimal' }";
187
+ const futureDecorator = `@kosFutureAware(${decoratorOptions})\n`;
188
+ content = content.replace(classMatch[0], classMatch[1] + classMatch[2] + futureDecorator + classMatch[3]);
189
+ }
200
190
  }
201
191
  return content;
202
192
  }
203
- addFutureMethod(content) {
204
- const { nameProperCase } = this.options;
205
- const futureMethod = `
206
- /**
207
- * Placeholder method for Future operations
208
- * Replace this with your actual long-running operation
209
- */
210
- @kosFuture()
211
- async performLongRunningOperation(): Promise<void> {
212
- // TODO: Implement your long-running operation here
213
- // This method should use a service that returns a Future for progress tracking
214
-
215
- this.logger.debug(\`Starting long-running operation for \${this.id}\`);
216
-
217
- // Example implementation pattern using services:
218
- // import { perform${nameProperCase}Operation } from './services';
219
- //
220
- // try {
221
- // const future = await perform${nameProperCase}Operation();
222
- // return this.futureHandler.setFuture(future);
223
- // } catch (error) {
224
- // this.logger.error(\`Failed to start operation for \${this.id}:\`, error);
225
- // throw error;
226
- // }
227
-
228
- // Placeholder that doesn't actually do anything
229
- await new Promise(resolve => setTimeout(resolve, 1000));
230
-
231
- this.logger.debug(\`Completed long-running operation for \${this.id}\`);
232
- }`;
233
- // Add method before the lifecycle section
234
- const lifecycleRegex = /(\s+\/\/ -------------------LIFECYCLE----------------------------)/;
235
- return content.replace(lifecycleRegex, futureMethod + "\n$1");
193
+ updatePublicType(content) {
194
+ const { nameProperCase, updateServices } = this.options;
195
+ const progressType = updateServices
196
+ ? `${nameProperCase}OperationProgress`
197
+ : "Record<string, unknown>";
198
+ // Find the public type declaration
199
+ const typeRegex = new RegExp(`export\\s+type\\s+${nameProperCase}Model\\s*=\\s*PublicModelInterface<${nameProperCase}ModelImpl>([^;]*);`, "s");
200
+ const typeMatch = content.match(typeRegex);
201
+ if (typeMatch) {
202
+ // Check if ExternalFutureInterface is already added
203
+ if (!typeMatch[1].includes("ExternalFutureInterface")) {
204
+ const newType = `export type ${nameProperCase}Model = PublicModelInterface<${nameProperCase}ModelImpl> & ExternalFutureInterface<${progressType}>;`;
205
+ content = content.replace(typeMatch[0], newType);
206
+ }
207
+ }
208
+ return content;
236
209
  }
237
- addFutureUpdateHandler(content) {
210
+ removeLegacySetup(content) {
211
+ // Remove old setup function calls from constructor
212
+ const setupRegex = /\s*setup(Complete|Minimal)FutureSupport\(this\);?\s*/g;
213
+ content = content.replace(setupRegex, "");
214
+ // Remove old property declarations
215
+ const propertyRegex = /\s*(public|private|protected)?\s*(declare\s+)?futureHandler[!?]?:\s*FutureAwareContainer[^;]*;\s*/g;
216
+ content = content.replace(propertyRegex, "");
217
+ const futurePropertyRegex = /\s*(public|private|protected)?\s*(declare\s+)?future\??:\s*IFutureModel[^;]*;\s*/g;
218
+ content = content.replace(futurePropertyRegex, "");
219
+ // Remove old interface implementations
220
+ const implementsRegex = new RegExp(`(implements\\s+[^{]*?)\\s*,?\\s*(FutureUpdateHandler|FutureHandlerContainer|FutureStateAccessor)`, "g");
221
+ content = content.replace(implementsRegex, "$1");
222
+ // Clean up duplicate commas in implements clause
223
+ content = content.replace(/,\s*,/g, ",");
224
+ content = content.replace(/implements\s*,/g, "implements");
225
+ return content;
226
+ }
227
+ addFutureMethod(content) {
238
228
  const { nameProperCase } = this.options;
239
- // Update class implements clause
240
- const implementsRegex = new RegExp(`export class ${nameProperCase}ModelImpl implements\\s+IKosDataModel,\\s+IKosIdentifiable`);
241
- const newImplements = `export class ${nameProperCase}ModelImpl implements IKosDataModel, IKosIdentifiable, FutureUpdateHandler`;
242
- return content.replace(implementsRegex, newImplements);
229
+ // Check if a @kosFuture method already exists
230
+ if (content.includes("@kosFuture()")) {
231
+ return content;
232
+ }
233
+ // Find the end of the class to add the method
234
+ const classRegex = new RegExp(`class\\s+${nameProperCase}ModelImpl[^{]*{([\\s\\S]*)}\\s*$`, "m");
235
+ const classMatch = content.match(classRegex);
236
+ if (classMatch) {
237
+ const methodCode = `
238
+ /**
239
+ * Placeholder method for Future operations
240
+ * Replace this with your actual long-running operation
241
+ */
242
+ @kosFuture()
243
+ async performLongRunningOperation(): Promise<void> {
244
+ // TODO: Implement your long-running operation here
245
+ // This method should use a service that returns a Future for progress tracking
246
+
247
+ this.logger.debug(\`Starting long-running operation for \${this.id}\`);
248
+
249
+ // Example implementation pattern using services:
250
+ // import { perform${nameProperCase}Operation } from './services';
251
+ //
252
+ // const future = await perform${nameProperCase}Operation();
253
+ // return this.futureHandler.setFuture(future);
254
+
255
+ // Placeholder that doesn't actually do anything
256
+ await new Promise(resolve => setTimeout(resolve, 1000));
257
+
258
+ this.logger.debug(\`Completed long-running operation for \${this.id}\`);
259
+ }
260
+ `;
261
+ // Insert before the closing brace
262
+ const classContent = classMatch[1];
263
+ const lastBraceIndex = classContent.lastIndexOf("}");
264
+ if (lastBraceIndex >= 0) {
265
+ const updatedContent = classContent.slice(0, lastBraceIndex) +
266
+ methodCode +
267
+ classContent.slice(lastBraceIndex);
268
+ content = content.replace(classMatch[0], `class ${nameProperCase}ModelImpl${classMatch[0].match(/[^{]*/)?.[0]}{${updatedContent}}`);
269
+ }
270
+ }
271
+ return content;
243
272
  }
244
273
  addOnFutureUpdateMethod(content) {
245
274
  const { nameProperCase, updateServices } = this.options;
246
275
  const progressType = updateServices
247
276
  ? `${nameProperCase}OperationProgress`
248
- : "any";
249
- const onFutureUpdateMethod = `
250
- /**
251
- * Optional: Custom Future update handling
252
- * Called whenever the Future state changes (progress, status, completion, etc.)
253
- */
254
- onFutureUpdate(update: IFutureModel<${progressType}>): void {
255
- // Add custom Future update logic here
256
- // Examples:
257
- // - Log progress milestones
258
- // - Update derived state based on progress
259
- // - Handle specific error conditions
260
- // - Trigger notifications at certain thresholds
261
-
262
- this.logger.debug(\`Future update for \${this.id}:\`, {
263
- progress: update.progress,
264
- status: update.status,
265
- endState: update.endState,
266
- // Access typed progress data:
267
- stage: update.data?.stage,
268
- percentComplete: update.data?.percentComplete
269
- });
270
- }`;
271
- // Add method before the @kosFuture method
272
- const futureMethodRegex = /(\s+@kosFuture\(\))/;
273
- return content.replace(futureMethodRegex, onFutureUpdateMethod + "\n$1");
277
+ : "Record<string, unknown>";
278
+ // Check if onFutureUpdate already exists
279
+ if (content.includes("onFutureUpdate")) {
280
+ return content;
281
+ }
282
+ // Find a good place to add the method (after performLongRunningOperation if it exists)
283
+ const futureMethodRegex = /@kosFuture\(\)[^}]*}/s;
284
+ const futureMethodMatch = content.match(futureMethodRegex);
285
+ if (futureMethodMatch) {
286
+ const methodCode = `
287
+
288
+ /**
289
+ * Optional: Custom Future update handling
290
+ * Called whenever the Future state changes (progress, status, completion, etc.)
291
+ */
292
+ onFutureUpdate?(update: IFutureModel<${progressType}>): void {
293
+ // Add custom Future update logic here
294
+ // Examples:
295
+ // - Log progress milestones
296
+ // - Update derived state based on progress
297
+ // - Handle specific error conditions
298
+ // - Trigger notifications at certain thresholds
299
+
300
+ this.logger.debug(\`Future update for \${this.id}:\`, {
301
+ progress: update.progress,
302
+ status: update.status,
303
+ endState: update.endState,
304
+ clientData: update.clientData
305
+ });
306
+ }`;
307
+ content = content.replace(futureMethodMatch[0], futureMethodMatch[0] + methodCode);
308
+ }
309
+ return content;
274
310
  }
275
311
  }
276
312
  exports.ModelFileTransformer = ModelFileTransformer;
@@ -1 +1 @@
1
- {"version":3,"file":"model-transformer.js","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/lib/model-transformer.ts"],"names":[],"mappings":";;;AAGA,MAAa,oBAAoB;IAErB;IACA;IAFV,YACU,IAAU,EACV,OAA4C;QAD5C,SAAI,GAAJ,IAAI,CAAM;QACV,YAAO,GAAP,OAAO,CAAqC;IACnD,CAAC;IAEJ,SA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O,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC;IAEO,uBAAuB,CAAC,OAAe;QAC7C,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxD,MAAM,YAAY,GAAG,cAAc;YACjC,CAAC,CAAC,GAAG,cAAc,mBAAmB;YACtC,CAAC,CAAC,KAAK,CAAC;QAEV,MAAM,oBAAoB,GAAG;;;;;0CAKS,YAAY;;;;;;;;;;;;;;;;MAgBhD,CAAC;QAEH,0CAA0C;QAC1C,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;QAChD,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,MAAM,CAAC,CAAC;IAC3E,CAAC;CACF;AA7VD,oDA6VC"}
1
+ {"version":3,"file":"model-transformer.js","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-add-future-to-model/lib/model-transformer.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,oBAAoB;IAErB;IACA;IAFV,YACU,IAAU,EACV,OAA4C;QAD5C,SAAI,GAAJ,IAAI,CAAM;QACV,YAAO,GAAP,OAAO,CAAqC;IACnD,CAAC;IAEJ,SAAS;QACP,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAEvC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,yBAAyB,aAAa,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAE,CAAC;QAEtD,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;Q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