@kosdev-code/kos-nx-plugin 2.0.41 → 2.1.1

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 (23) 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/kos-ui-project/files/src/app/app.css.template +1 -1
  17. package/src/generators/preset/files/src/app/app.css.template +1 -2
  18. package/src/generators/preset/generator.d.ts.map +1 -1
  19. package/src/generators/preset/generator.js +14 -5
  20. package/src/generators/preset/generator.js.map +1 -1
  21. package/src/generators/preset/tools/tools/scripts/update.mjs.template +29 -8
  22. package/src/generators/kos-container-model/files/model/__nameDashCase__-registration.ts.template +0 -113
  23. package/src/generators/kos-model/files/model/__nameDashCase__-registration.ts.template +0 -144
@@ -1,21 +1,21 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
1
2
  <% if (internal) {%>import {
2
3
  kosDependency,
3
4
  kosModel,
5
+ kosContainerAware,
4
6
  kosTopicHandler,
7
+ type KosContainerAware,
8
+ kosLoggerAware,
9
+ type KosLoggerAware,
5
10
  } from "../../../core/core/decorators";
6
- import {
7
- KosModelContainer,
8
- type IKosModelContainer,
9
- } from "../../../core/core/kos-container-model";
10
11
  import type {
11
- IKosDataModel,
12
- KosContextLogger,
13
- KosCreationContext,
12
+ IKosDataModel
14
13
  } from "../../../core/core/kosModel";
15
- import type { IKosIdentifiable, IKosModelHolder } from "../../../core/core/types";
14
+ import type { KosModelRegistrationType } from "../../../core/core/registration/model-registration";
15
+ import type { IKosIdentifiable } from "../../../core/core/types";
16
16
  import type { PublicModelInterface } from "../../../core/types";
17
- <% } else { %>import { kosModel, kosChild, KosModelContainer } from "@kosdev-code/kos-ui-sdk";
18
- import type { KosContextLogger, KosCreationContext, IKosModelContainer, IKosDataModel, IKosModelHolder, IKosIdentifiable, PublicModelInterface } from "@kosdev-code/kos-ui-sdk";<% } %>
17
+ <% } else { %>import { kosModel, kosContainerAware, type KosContainerAware } from "@kosdev-code/kos-ui-sdk";
18
+ import { type KosModelRegistrationType, IKosDataModel, IKosIdentifiable, PublicModelInterface, kosLoggerAware, type KosLoggerAware } from "@kosdev-code/kos-ui-sdk";<% } %>
19
19
 
20
20
 
21
21
  import type { <%= nameProperCase %>Options } from "./types";
@@ -26,42 +26,27 @@ export const MODEL_TYPE = "<%= nameDashCase %>-model";
26
26
 
27
27
  export type <%= nameProperCase %>Model = PublicModelInterface<<%= nameProperCase %>ModelImpl>;
28
28
 
29
- @kosModel(MODEL_TYPE)
30
- export class <%= nameProperCase %>ModelImpl implements IKosIdentifiable, IKosModelHolder<<%= modelNameProperCase %>Model>, IKosDataModel {
29
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
30
+ export interface <%= nameProperCase %>ModelImpl extends KosLoggerAware, KosContainerAware<<%= modelNameProperCase %>Model> {}
31
+
32
+ @kosModel({ modelTypeId: MODEL_TYPE, singleton: true<% if (autoRegister) { %>, autoRegister: true<% } %> })
33
+ @kosContainerAware<<%= modelNameProperCase %>Model>()
34
+ @kosLoggerAware()
35
+ export class <%= nameProperCase %>ModelImpl implements IKosIdentifiable, IKosDataModel {
36
+
37
+ // Registration property for type safety - actual value injected by @kosModel decorator
38
+ static Registration: KosModelRegistrationType<<%= nameProperCase %>Model, <%= nameProperCase %>Options>;
39
+
40
+
31
41
  id: string;
32
- private logger: KosContextLogger;
33
- @kosChild private _models: IKosModelContainer<<%= modelNameProperCase %>Model>;
34
- constructor(modelId: string, options: <%= nameProperCase %>Options, context: KosCreationContext) {
42
+ constructor(modelId: string, _options: <%= nameProperCase %>Options) {
35
43
  this.id = modelId;
36
- this.logger = context.logger;
37
- this._models = new KosModelContainer<<%= modelNameProperCase %>Model>({parentId: modelId});
38
- if (options) {
39
- // Assign options properties here.
40
- }
41
- }
42
-
43
- getModel(id: string) {
44
- return this._models.getModel(id);
45
- }
46
- get models () {
47
- return this._models;
48
- }
49
- get data() {
50
- return this._models.data;
44
+ // Container is automatically injected with parentId: modelId
51
45
  }
52
46
 
53
- updateModel(options: <%= nameProperCase %>Options): void {
47
+ updateModel(_options: <%= nameProperCase %>Options): void {
54
48
  // Update model properties here.
55
49
  }
56
-
57
- addModel(model: <%= modelNameProperCase %>Model) {
58
- this._models.addModel(model);
59
- };
60
-
61
-
62
- removeModel(id: string){
63
- this._models.removeModel(id);
64
- };
65
50
  // -------------------LIFECYCLE----------------------------
66
51
 
67
52
 
@@ -1,6 +1,21 @@
1
- export { <%= nameProperCase %> } from "./<%= nameDashCase %>-registration";
2
- export { <%= modelNameProperCase %> } from "./<%= modelNameDashCase %>-registration";
3
- export type * from "./types";
4
- export type { <%= modelNameProperCase %>Model } from "./<%= modelNameDashCase %>-model";
1
+ // Import implementation class but don't export it directly
2
+ import { <%= nameProperCase %>ModelImpl } from "./<%= nameDashCase %>-model";
3
+
4
+ // Import container implementation class but don't export it directly
5
+ import { <%= modelNameProperCase %>ModelImpl } from "./<%= modelNameDashCase %>-model";
6
+
7
+ // Export types
5
8
  export type { <%= nameProperCase %>Model } from "./<%= nameDashCase %>-model";
6
- <% if (dataServices) { %>export * as <%= modelNameProperCase %>Services from "./services";<% } %>
9
+ export type { <%= modelNameProperCase %>Model } from "./<%= modelNameDashCase %>-model";
10
+ export type * from "./types";
11
+
12
+ // Export Registration as the public API
13
+ export const <%= nameProperCase %> = <%= nameProperCase %>ModelImpl.Registration;
14
+
15
+ // Export Registration as the public API
16
+ export const <%= modelNameProperCase %> = <%= modelNameProperCase %>ModelImpl.Registration;
17
+
18
+ <% if (dataServices) { %>// Export services if configured
19
+ export * as <%= modelNameProperCase %>Services from "./services";<% } %>
20
+
21
+ <%= nameProperCase %>.addRelatedModel(<%= modelNameProperCase %>);
@@ -1,27 +1,24 @@
1
- <% const hasFutureSupport = futureAware && futureAware !== 'none'; %>
1
+ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
2
+ <% if (futureAware && futureAware !== 'none') { %>/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
3
+ <% } %><% const hasFutureSupport = futureAware && futureAware !== 'none'; %>
2
4
  <% const isCompleteFuture = futureAware === 'complete'; %>
3
5
  <% const isCompositionCompanion = companion && companionPattern === 'composition'; %>
4
6
  <% const isDecoratorCompanion = companion && companionPattern === 'decorator'; %>
5
- <% if (internal) { %>import { kosModel<% if (parentAware) { %>, kosParentAware<% } %><% if (hasFutureSupport) { %>, kosFuture<% } %> } from "../../../core/core/decorators";
7
+ <% if (internal) { %>import { kosModel<% if (parentAware) { %>, kosParentAware<% } %><% if (hasFutureSupport) { %>, kosFuture, kosFutureAware, Kos<% if (isCompleteFuture) { %>FutureAwareFull<% } else { %>FutureAwareMinimal<% } %><% } %>, kosLoggerAware, KosLoggerAware } from "../../../core/core/decorators";
6
8
  import type {
7
9
  IKosDataModel,
8
- KosContextLogger,
9
- KosCreationContext,
10
+ KosContextLogger
10
11
  } from "../../../core/core/kosModel";
12
+ import type { KosModelRegistrationType } from "../../../core/core/registration/model-registration";
11
13
  import type { IKosIdentifiable } from "../../../core/core/types";
12
14
  import type { PublicModelInterface } from "../../../core/types";
13
15
  <% if (hasFutureSupport) { %>import type {
14
16
  ExternalFutureInterface,
15
- FutureHandlerContainer<% if (isCompleteFuture) { %>,
16
- FutureStateAccessor,
17
- FutureUpdateHandler<% } %>,
18
- FutureAwareContainer,
19
17
  IFutureModel
20
- } from "../../../models/types/future-interfaces";
21
- import { setup<% if (isCompleteFuture) { %>Complete<% } else { %>Minimal<% } %>FutureSupport } from "../../../models/utils/kosmodel-compatible-future-mixin";<% } %>
22
- <% if (isDecoratorCompanion) { %>import { setupCompanionDecoratorMixin, CompanionWithMixin } from "../../../models/utils/kosmodel-interface-companion-mixin";<% } %>
23
- <% } else { %>import type { KosContextLogger, KosCreationContext, IKosDataModel, IKosIdentifiable, PublicModelInterface<% if (hasFutureSupport) { %>, ExternalFutureInterface, FutureHandlerContainer<% if (isCompleteFuture) { %>, FutureStateAccessor, FutureUpdateHandler<% } %>, FutureAwareContainer, IFutureModel<% } %><% if (isDecoratorCompanion) { %>, CompanionWithMixin<% } %> } from "@kosdev-code/kos-ui-sdk";
24
- import { kosModel<% if (parentAware) { %>, kosParentAware<% } %><% if (hasFutureSupport) { %>, kosFuture, setup<% if (isCompleteFuture) { %>Complete<% } else { %>Minimal<% } %>FutureSupport<% } %><% if (isDecoratorCompanion) { %>, setupCompanionDecoratorMixin<% } %> } from "@kosdev-code/kos-ui-sdk";
18
+ } from "../../../models/types/future-interfaces";<% } %>
19
+ <% if (isDecoratorCompanion) { %>import { KosCompanionDecorator } from "../../../core/core/decorators";<% } %>
20
+ <% } else { %>import type { IKosDataModel, IKosIdentifiable, PublicModelInterface, KosModelRegistrationType<% if (hasFutureSupport) { %>, ExternalFutureInterface, IFutureModel<% } %><% if (isDecoratorCompanion) { %>, KosCompanionDecorator<% } %> } from "@kosdev-code/kos-ui-sdk";
21
+ import { kosModel<% if (parentAware) { %>, kosParentAware<% } %><% if (hasFutureSupport) { %>, kosFuture, kosFutureAware, Kos<% if (isCompleteFuture) { %>FutureAwareFull<% } else { %>FutureAwareMinimal<% } %><% } %><% if (isDecoratorCompanion) { %>, kosCompanion<% } %>, kosLoggerAware, KosLoggerAware } from "@kosdev-code/kos-ui-sdk";
25
22
  <% } %>
26
23
  import type { <%= nameProperCase %>Options} from "./types";
27
24
  <% if (hasFutureSupport) { %>import type { <%= nameProperCase %>OperationProgress } from "./services";<% } %>
@@ -31,36 +28,41 @@ import type { <%= companionModelProperCase %>Model } from "<%= companionModelPro
31
28
  <% } %>
32
29
  export const MODEL_TYPE = "<%= nameDashCase %>-model";
33
30
 
34
- export type <%= nameProperCase %>Model = PublicModelInterface<<%= nameProperCase %>ModelImpl><% if (hasFutureSupport) { %> & ExternalFutureInterface<<%= nameProperCase %>OperationProgress><% } %><% if (isDecoratorCompanion) { %> & CompanionWithMixin<<%= companionModelProperCase %>Model><% } %>;
31
+ export type <%= nameProperCase %>Model = PublicModelInterface<<%= nameProperCase %>ModelImpl><% if (hasFutureSupport) { %> & ExternalFutureInterface<<%= nameProperCase %>OperationProgress><% } %>;
32
+
33
+ // Interface merging for decorator type safety
34
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
35
+ export interface <%= nameProperCase %>ModelImpl extends KosLoggerAware<% if (hasFutureSupport) { %>, Kos<% if (isCompleteFuture) { %>FutureAwareFull<% } else { %>FutureAwareMinimal<% } %><<%= nameProperCase %>OperationProgress><% } %><% if (isDecoratorCompanion) { %>, KosCompanionDecorator<<%= companionModelProperCase %>Model><% } %> {}
36
+
37
+ @kosModel({ modelTypeId: MODEL_TYPE<% if (singleton !== undefined) { %>, singleton: <%= singleton %><% } %><% if (autoRegister) { %>, autoRegister: true<% } %> })
38
+ <% if (parentAware && !isDecoratorCompanion) { %>@kosParentAware()<% } %>
39
+ <% if (hasFutureSupport) { %>@kosFutureAware(<% if (!isCompleteFuture) { %>{ mode: 'minimal' }<% } %>)<% } %>
40
+ <% if (isDecoratorCompanion) { %>@kosCompanion()<% } %>
41
+ @kosLoggerAware()
42
+ export class <%= nameProperCase %>ModelImpl implements IKosDataModel, IKosIdentifiable {
43
+ // Registration property for type safety - actual value injected by @kosModel decorator
44
+ static Registration: KosModelRegistrationType<<%= nameProperCase %>Model, <%= nameProperCase %>Options>;
35
45
 
36
- <% if (parentAware) { %>@kosParentAware()<% } %>
37
- @kosModel(MODEL_TYPE)
38
- export class <%= nameProperCase %>ModelImpl implements IKosDataModel, IKosIdentifiable<% if (isCompleteFuture) { %>, FutureUpdateHandler<% } %> {
39
46
  id: string;
40
- private logger: KosContextLogger;
47
+ // logger property is automatically provided by @kosLoggerAware decorator
41
48
  <% if (isCompositionCompanion) { %>
42
49
  // Composition pattern - explicit parent access
43
50
  public readonly parent: <%= companionModelProperCase %>Model;
44
51
  <% } %>
45
52
  <% if (hasFutureSupport) { %>
46
- // Future support properties - guaranteed by framework
47
- public futureHandler!: FutureAwareContainer<<%= nameProperCase %>OperationProgress>;<% if (isCompleteFuture) { %>
48
- public future?: IFutureModel<<%= nameProperCase %>OperationProgress>; // Used internally for progress checks and custom logic<% } %><% } %>
53
+ // Future support properties are provided via interface merging - no need to declare<% } %>
49
54
 
50
- constructor(modelId: string, options: <%= nameProperCase %>Options, context: KosCreationContext) {
55
+ constructor(modelId: string, options: <%= nameProperCase %>Options) {
51
56
  this.id = modelId;
52
- this.logger = context.logger;
57
+ // logger is automatically injected by @kosLoggerAware decorator
53
58
  <% if (isCompositionCompanion) { %>
54
59
  // Set parent from companionParent option for composition pattern
55
60
  this.parent = options.companionParent;
56
- <% } else if (isDecoratorCompanion) { %>
57
- // Setup decorator mixin for transparent parent access
58
- setupCompanionDecoratorMixin(this, options.companionParent);
59
61
  <% } %>
60
- <% if (hasFutureSupport) { %>
61
- // Initialize Future support
62
- setup<% if (isCompleteFuture) { %>Complete<% } else { %>Minimal<% } %>FutureSupport(this);
62
+ <% if (isDecoratorCompanion) { %>
63
+ // Companion decorator automatically provides getCompanionParent() and parent property proxying
63
64
  <% } %>
65
+ // Future support is automatically initialized by @kosFutureAware decorator
64
66
  if (options) {
65
67
  // Assign options properties here.
66
68
  }
@@ -81,17 +83,7 @@ export class <%= nameProperCase %>ModelImpl implements IKosDataModel, IKosIdent
81
83
  // This method should use a service that returns a Future for progress tracking
82
84
 
83
85
  this.logger.debug(`Starting long-running operation for ${this.id}`);
84
-
85
- // Example implementation pattern using services:
86
- // import { perform<%= nameProperCase %>Operation } from './services';
87
- //
88
- // try {
89
- // const future = await perform<%= nameProperCase %>Operation();
90
- // return this.futureHandler.setFuture(future);
91
- // } catch (error) {
92
- // this.logger.error(`Failed to start operation for ${this.id}:`, error);
93
- // throw error;
94
- // }
86
+
95
87
 
96
88
  // Placeholder that doesn't actually do anything
97
89
  await new Promise(resolve => setTimeout(resolve, 1000));
@@ -105,7 +97,7 @@ export class <%= nameProperCase %>ModelImpl implements IKosDataModel, IKosIdent
105
97
  * Optional: Custom Future update handling
106
98
  * Called whenever the Future state changes (progress, status, completion, etc.)
107
99
  */
108
- onFutureUpdate(update: IFutureModel<<%= nameProperCase %>OperationProgress>): void {
100
+ onFutureUpdate?(update: IFutureModel<<%= nameProperCase %>OperationProgress>): void {
109
101
  // Add custom Future update logic here
110
102
  // Examples:
111
103
  // - Log progress milestones
@@ -118,8 +110,8 @@ export class <%= nameProperCase %>ModelImpl implements IKosDataModel, IKosIdent
118
110
  status: update.status,
119
111
  endState: update.endState,
120
112
  // Access typed progress data:
121
- stage: update.data?.stage,
122
- percentComplete: update.data?.percentComplete
113
+ stage: update.clientData?.stage,
114
+ percentComplete: update.clientData?.percentComplete
123
115
  });
124
116
  }
125
117
  <% } %>
@@ -1,4 +1,12 @@
1
- export { <%= nameProperCase %> } from "./<%= nameDashCase %>-registration";
2
- export type * from "./types";
1
+ // Import implementation class but don't export it directly
2
+ import { <%= nameProperCase %>ModelImpl } from "./<%= nameDashCase %>-model";
3
+
4
+ // Export types
3
5
  export type { <%= nameProperCase %>Model } from "./<%= nameDashCase %>-model";
4
- <% if (dataServices) { %>export * as <%= nameProperCase %>Services from "./services";<% } %>
6
+ export type * from "./types";
7
+
8
+ // Export Registration as the public API
9
+ export const <%= nameProperCase %> = <%= nameProperCase %>ModelImpl.Registration;
10
+
11
+ <% if (dataServices) { %>// Export services if configured
12
+ export * as <%= nameProperCase %>Services from "./services";<% } %>
@@ -18,6 +18,7 @@ export interface KosModelGeneratorSchema extends KosBaseGeneratorSchema {
18
18
  container?: boolean;
19
19
  parentAware?: boolean;
20
20
  futureAware?: "none" | "minimal" | "complete";
21
+ autoRegister?: boolean;
21
22
  }
22
23
 
23
24
  export interface NormalizedKosBaseGeneratorSchema<
@@ -53,6 +53,11 @@
53
53
  "default": false,
54
54
  "description": "Is there a need for more than one instance of this model type"
55
55
  },
56
+ "autoRegister": {
57
+ "type": "boolean",
58
+ "default": false,
59
+ "description": "Automatically register the model with the framework (escape hatch for plugins)"
60
+ },
56
61
  "unitTests": {
57
62
  "type": "boolean",
58
63
  "default": false,
@@ -94,12 +94,12 @@ async function kosPluginProjectGenerator(tree, options) {
94
94
  tree.delete(`${projectConfiguration.root}/src/app/app.spec.tsx`);
95
95
  tree.delete(`${projectConfiguration.root}/.storybook/preview.ts`);
96
96
  (0, devkit_1.addDependenciesToPackageJson)(tree, {
97
- "@kosdev-code/kos-ddk": "^0.2.0",
98
- "@kosdev-code/kos-ddk-components": "^0.2.0",
99
- "@kosdev-code/kos-ddk-model-components": "^0.2.0",
100
- "@kosdev-code/kos-ddk-models": "^0.2.0",
101
- "@kosdev-code/kos-ddk-styles": "^0.2.0",
102
- "@kosdev-code/kos-ui-plugin": "^0.2.0",
97
+ "@kosdev-code/kos-ddk": "~2.0.0",
98
+ "@kosdev-code/kos-ddk-components": "~2.0.0",
99
+ "@kosdev-code/kos-ddk-model-components": "~2.0.0",
100
+ "@kosdev-code/kos-ddk-models": "~2.0.0",
101
+ "@kosdev-code/kos-ddk-styles": "~2.0.0",
102
+ "@kosdev-code/kos-ui-plugin-dev": "~2.0.0",
103
103
  }, {});
104
104
  await (0, devkit_1.formatFiles)(tree);
105
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-plugin-project/generator.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AACpB,uCAAoC;AACpC,qCAA6E;AAC7E,6BAA6B;AAC7B,sEAAsE;AAE/D,KAAK,UAAU,yBAAyB,CAC7C,IAAU,EACV,OAAwC;IAExC,MAAM,iBAAiB,GAAG,IAAA,oCAAkB,EAAC;QAC3C,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;IACH,MAAM,UAAU,GAAG;QACjB,GAAG,iBAAiB;QACpB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,OAAO,CAAC,IAAI;QACzB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,iBAAiB;KAC5C,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,SAAS,IAAI,SAAS,EAC9B,UAAU,CAAC,IAAI,CAChB,CAAC;IACF,MAAM,IAAA,uBAAe,EAAC,IAAI,EAAE;QAC1B,aAAa,EAAE,MAAM;QACrB,wBAAwB,EAAE,aAAa;QACvC,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,eAAM,CAAC,MAAM;QACrB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,SAAS,EAAE,WAAW;QACtB,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,KAAK;QACjB,uBAAuB,EAAE,IAAI;KAC9B,CAAC,CAAC;IAEH,MAAM,IAAA,uCAA+B,EAAC,IAAI,EAAE;QAC1C,OAAO,EAAE,UAAU,CAAC,IAAI;QACxB,eAAe,EAAE,KAAK;QACtB,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;IAEH,MAAM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;KACvC,EACD,EAAE,CACH,CAAC;IACF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AA/HD,8DA+HC;AAED,kBAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-plugin-project/generator.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AACpB,uCAAoC;AACpC,qCAA6E;AAC7E,6BAA6B;AAC7B,sEAAsE;AAE/D,KAAK,UAAU,yBAAyB,CAC7C,IAAU,EACV,OAAwC;IAExC,MAAM,iBAAiB,GAAG,IAAA,oCAAkB,EAAC;QAC3C,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;IACH,MAAM,UAAU,GAAG;QACjB,GAAG,iBAAiB;QACpB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,OAAO,CAAC,IAAI;QACzB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,iBAAiB;KAC5C,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,SAAS,IAAI,SAAS,EAC9B,UAAU,CAAC,IAAI,CAChB,CAAC;IACF,MAAM,IAAA,uBAAe,EAAC,IAAI,EAAE;QAC1B,aAAa,EAAE,MAAM;QACrB,wBAAwB,EAAE,aAAa;QACvC,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,eAAM,CAAC,MAAM;QACrB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,SAAS,EAAE,WAAW;QACtB,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,KAAK;QACjB,uBAAuB,EAAE,IAAI;KAC9B,CAAC,CAAC;IAEH,MAAM,IAAA,uCAA+B,EAAC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CAAiC,EAAE,QAAQ;QAC3C,uCAAuC,EAAE,QAAQ;QACjD,6BAA6B,EAAE,QAAQ;QACvC,6BAA6B,EAAE,QAAQ;QACvC,gCAAgC,EAAE,QAAQ;KAC3C,EACD,EAAE,CACH,CAAC;IACF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AA/HD,8DA+HC;AAED,kBAAe,yBAAyB,CAAC"}
@@ -101,7 +101,7 @@
101
101
 
102
102
  :root {
103
103
 
104
- // shell
104
+ /* shell */
105
105
  --kos-component-shell-width: 100vw;
106
106
  --kos-component-shell-height: 100vh;
107
107
  --kos-component-shell-height: 100vh;
@@ -100,8 +100,7 @@
100
100
  }
101
101
 
102
102
  :root {
103
-
104
- // shell
103
+ /* shell */
105
104
  --kos-component-shell-width: 100vw;
106
105
  --kos-component-shell-height: 100vh;
107
106
  --kos-component-shell-height: 100vh;
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/preset/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAOL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAYjD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,qBAAqB,iBA4S/B;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/preset/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAOL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAYjD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,qBAAqB,iBAsT/B;AAED,eAAe,eAAe,CAAC"}
@@ -58,10 +58,11 @@ async function presetGenerator(tree, options) {
58
58
  });
59
59
  // add the dependencies to the package.json
60
60
  (0, devkit_1.addDependenciesToPackageJson)(tree, {
61
- "@kosdev-code/kos-ui-sdk": "~2.0.0",
62
- "@kosdev-code/kos-dispense-sdk": "~2.0.0",
63
- "@kosdev-code/kos-freestyle-sdk": "~2.0.0",
64
- "@kosdev-code/kos-cms-sdk": "~2.0.0",
61
+ "@kosdev-code/kos-ui-sdk": "~2.1.0",
62
+ "@kosdev-code/kos-dispense-sdk": "~2.1.0",
63
+ "@kosdev-code/kos-freestyle-sdk": "~2.1.0",
64
+ "@kosdev-code/kos-cms-sdk": "~2.1.0",
65
+ "@kosdev-code/kos-ui-plugin": "~2.1.0",
65
66
  "@use-gesture/react": "^10.3.0",
66
67
  "@react-spring/web": "^9.7.3",
67
68
  "react-i18next": "^13.5.0",
@@ -70,8 +71,9 @@ async function presetGenerator(tree, options) {
70
71
  "i18next-browser-languagedetector": "^7.2.0",
71
72
  "i18next-http-backend": "^2.4.2",
72
73
  "reflect-metadata": "^0.2.1",
74
+ zod: "^3.25.76",
73
75
  }, {
74
- "@kosdev-code/kos-nx-plugin": "~2.0.0",
76
+ "@kosdev-code/kos-nx-plugin": "~2.1.0",
75
77
  "@types/node": "^18.16.9",
76
78
  archiver: "^5.3.1",
77
79
  "openapi-typescript": "^7.6.1",
@@ -258,6 +260,13 @@ async function presetGenerator(tree, options) {
258
260
  };
259
261
  return json;
260
262
  });
263
+ (0, devkit_1.updateJson)(tree, "tsconfig.base.json", (json) => {
264
+ if (!json.compilerOptions) {
265
+ json.compilerOptions = {};
266
+ }
267
+ json.compilerOptions.moduleResolution = "bundler";
268
+ return json;
269
+ });
261
270
  await (0, devkit_1.formatFiles)(tree);
262
271
  (0, devkit_1.installPackagesTask)(tree, true);
263
272
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/preset/generator.ts"],"names":[],"mappings":";;;AAAA,uCAQoB;AAEpB,yBAA0B;AA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AA2C;QAC3C,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,EAAE,0BAA0B;YAC/B,YAAY,EAAE,+CAA+C;YAC7D,YAAY,EAAE,wCAAwC;YACtD,WAAW,EAAE,uCAAuC;YACpD,GAAG,EAAE,0BAA0B;YAC/B,KAAK,EAAE,4BAA4B;YACnC,GAAG,IAAI,CAAC,OAAO;SAChB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACxB,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AA9SD,0CA8SC;AAED,kBAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/preset/generator.ts"],"names":[],"mappings":";;;AAAA,uCAQoB;AAEpB,yBAA0B;AAE1B,+BAAmE;AACnE,qCAA4D;AAE5D,uCAAoC;AACpC,+BAA4B;AAC5B,qDAAqD;AACrD,+CAA4C;AAC5C,iEAAiE;AAE1D,KAAK,UAAU,eAAe,CACnC,IAAU,EACV,OAA8B;IAE9B,eAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACjC,eAAM,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,IAAA,oCAAkB,EAAC,OAAO,CAAC,CAAC;IAE/C,6BAA6B;IAC7B,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,MAAM,EAAE,GAAG,UAAU,CAAC,YAAY,SAAS,CAAC,CAAC;IAC1E,MAAM,IAAA,qBAAqB,EAAC,IAAI,EAAE;QAChC,IAAI,EAAE,GAAG,UAAU,CAAC,YAAY,SAAS;QACzC,wBAAwB,EAAE,aAAa;QACvC,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,MAAM;QACf,QAAQ,E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,IAAI,CAAC,CAAC;IACxB,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAxTD,0CAwTC;AAED,kBAAe,eAAe,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import chalk from "chalk";
2
2
  import { execSync } from "child_process";
3
+ import { readFileSync, existsSync } from "fs";
3
4
  const [, , sdk, ddk] = process.argv;
4
5
  const kos = [
5
6
 
6
7
  "@kosdev-code/kos-dispense-sdk",
7
-
8
+ "@kosdev-code/kos-ui-plugin",
8
9
  "@kosdev-code/kos-ui-sdk",
9
10
 
10
11
  ]
@@ -23,22 +24,38 @@ const cms = [
23
24
  .map((dep) => `${dep}@${sdk}`)
24
25
  .join(" ");
25
26
 
26
- const ddkDeps = [
27
+ const ddkPackages = [
27
28
  "@kosdev-code/kos-ddk",
28
29
  "@kosdev-code/kos-ddk-components",
29
30
  "@kosdev-code/kos-ddk-models",
30
31
  "@kosdev-code/kos-ddk-model-components",
31
32
  "@kosdev-code/kos-ddk-styles",
32
- "@kosdev-code/kos-ui-plugin",
33
- ]
33
+ "@kosdev-code/kos-ui-plugin-dev"
34
+ ];
35
+
36
+ const ddkDeps = ddkPackages
34
37
  .map((dep) => `${dep}@${ddk}`)
35
38
  .join(" ");
36
39
 
40
+ // Check if package.json exists and contains any DDK dependencies
41
+ let hasDdkDeps = false;
42
+ if (existsSync("package.json")) {
43
+ const packageJson = JSON.parse(readFileSync("package.json", "utf8"));
44
+ const allDeps = {
45
+ ...packageJson.dependencies,
46
+ ...packageJson.devDependencies,
47
+ ...packageJson.peerDependencies
48
+ };
49
+
50
+ hasDdkDeps = ddkPackages.some(dep => allDeps[dep]);
51
+ }
52
+
37
53
  const flags = [
38
54
  "--loglevel error",
39
55
  "--no-progress",
40
56
  "--no-audit",
41
57
  "--no-fund",
58
+ "--save-prefix='~'",
42
59
  ].join(" ");
43
60
  console.log(chalk.green("Updating dependencies..."));
44
61
  console.log(chalk.green("Updating kos dependencies..."));
@@ -56,10 +73,14 @@ execSync(`npm i ${cms} --save ${flags}`, {
56
73
  stdio: "inherit",
57
74
  });
58
75
 
59
- console.log(chalk.green("Updating ddk dependencies..."));
60
- execSync(`npm i ${ddkDeps} --save ${flags}`, {
61
- stdio: "inherit",
62
- });
76
+ if (hasDdkDeps) {
77
+ console.log(chalk.green("Updating ddk dependencies..."));
78
+ execSync(`npm i ${ddkDeps} --save ${flags}`, {
79
+ stdio: "inherit",
80
+ });
81
+ } else {
82
+ console.log(chalk.yellow("Skipping DDK dependencies - none found in package.json"));
83
+ }
63
84
 
64
85
  console.log(chalk.green("Updating kos-ui-cli..."));
65
86
  execSync(`npm i -g @kosdev-code/kos-ui-cli@${sdk} ${flags}`, {
@@ -1,113 +0,0 @@
1
- import { <% if (singleton) { %>Singleton<% } %>KosModelRegistrationFactory } from "@kosdev-code/kos-ui-sdk";
2
- import type { <%= nameProperCase %>Options } from "./types";
3
- import { <%= modelNameProperCase %> } from "./<%= modelNameDashCase %>-registration";
4
- import { <%= nameProperCase %>ModelImpl, MODEL_TYPE } from "./<%= nameDashCase %>-model";
5
- import type { <%= nameProperCase %>Model } from "./<%= nameDashCase %>-model";
6
-
7
-
8
- /**
9
- * # <%= nameProperCase %>
10
- *
11
- * The registration bean includes convenience methods for creating and working with <%= nameProperCase %>Model instances.
12
- *
13
- * ## type
14
- * The type property is a string that identifies the model type.
15
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
16
- * used when declaring dependencies on models.
17
- *
18
- * @example
19
- * ```typescript
20
- *
21
- * @kosDependency({modelType: <%= nameProperCase %>.type, id: "<%= nameCamelCase %>Id"})
22
- * private <%= nameCamelCase %>Model: <%= nameProperCase %>Model;
23
- * ```
24
- *
25
- *
26
- * ## factory
27
- *
28
- * The factory method creates a factory function that can be used to create new <%= nameProperCase %>Model instances.
29
- *
30
- <% if (singleton) { %>
31
- * As this is a singleton model, the factory function accepts the model options as its argument.
32
- *
33
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
34
- * in this case and the existing model will be returned in its current state.
35
- *
36
- * @example
37
- * ```typescript
38
- * const model = <%= nameProperCase %>.factory({
39
- * // Add option data
40
- * });
41
- * ```
42
- <% } else { %>
43
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
44
- *
45
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
46
- * in this case and the existing model will be returned in its current state.
47
- *
48
- * @example
49
- * ```typescript
50
- * const model = <%= nameProperCase %>.factory("<%= nameCamelCase %>Id")({
51
- * // Add option data
52
- * });
53
- * ```
54
- <% } %>
55
-
56
- *
57
- * ## predicate
58
- *
59
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a <%= nameProperCase %>Model.
60
- *
61
- * @example
62
- * ```typescript
63
- *
64
- * const model: IKosDataModel = ...; // some model
65
- *
66
- * if (<%= nameProperCase %>.predicate(model)) {
67
- * // if the function evaluates to true, the model is narrowed down to <%= nameProperCase %>Model
68
- * // and the compiler will know that the model has the <%= nameProperCase %>Model interface
69
- * model.updateAvailability(false);
70
- * }
71
- * ```
72
- *
73
- * ## registration
74
- *
75
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
76
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
77
- *
78
- *
79
- * @example
80
- *
81
- * In an application registration file you can declare the model registration as follows:
82
- *
83
- * **registration.ts**
84
- * ```typescript
85
- * import { <%= nameProperCase %> } from "<%= importPath %>";
86
- * ...
87
- * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
88
- * export const kosModels: IKosRegistry["models"] = {
89
- * ...<%= nameProperCase %>.registration,
90
- * };
91
- * ```
92
- *
93
- * ## registration.singleton
94
- <% if (singleton) { %>
95
- * The <%= nameCamelCase %> model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
96
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
97
- *
98
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
99
- <% } else { %>
100
- * The <%= nameCamelCase %> model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
101
- * If the factory function is called with an ID that already exists, the existing model will be returned.
102
- <% } %>
103
- * */
104
- export const <%= nameProperCase %> = new <% if (singleton) { %>Singleton<% } %>KosModelRegistrationFactory<
105
- <%= nameProperCase %>Model,
106
- <%= nameProperCase %>Options
107
- >({
108
- class: <%= nameProperCase %>ModelImpl,
109
- type: MODEL_TYPE,
110
- });
111
-
112
-
113
- <%= nameProperCase %>.addRelatedModel(<%= modelNameProperCase %>);