@kosdev-code/kos-nx-plugin 2.1.20 → 2.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +197 -5
- package/package.json +2 -2
- package/src/generators/kos-plugin-project/files/.kos.json.template +5 -0
- package/src/generators/kos-plugin-project/files/webpack.config.ts.template +25 -6
- package/src/generators/kos-plugin-project/generator.d.ts.map +1 -1
- package/src/generators/kos-plugin-project/generator.js +71 -0
- package/src/generators/kos-plugin-project/generator.js.map +1 -1
- package/src/generators/kos-plugin-project/schema.d.ts +1 -0
- package/src/generators/kos-plugin-project/schema.json +5 -0
- package/src/generators/preset/files/src/app/app.tsx.template +54 -21
- package/src/generators/preset/files/webpack.config.ts.template +61 -18
- package/src/generators/preset/generator.d.ts.map +1 -1
- package/src/generators/preset/generator.js +3 -0
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/root/.kos.json.template +19 -0
- package/src/generators/preset/schema.d.ts +2 -0
- package/src/generators/preset/schema.json +6 -1
- package/src/types/kos-config.d.ts +295 -0
- package/src/types/kos-config.d.ts.map +1 -0
- package/src/types/kos-config.js +12 -0
- package/src/types/kos-config.js.map +1 -0
- package/src/utils/kos-config-helpers.d.ts +72 -0
- package/src/utils/kos-config-helpers.d.ts.map +1 -0
- package/src/utils/kos-config-helpers.js +89 -0
- package/src/utils/kos-config-helpers.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,11 +1,203 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kosdev-code/kos-nx-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nx plugin providing generators and executors for KOS UI application development.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This plugin provides a complete development workflow for KOS applications, including:
|
|
8
|
+
|
|
9
|
+
- **Workspace Creation**: Bootstrap new KOS workspaces with data-driven plugin development
|
|
10
|
+
- **Plugin Development**: Create and manage UI plugins with automatic registration
|
|
11
|
+
- **Development Servers**: Metadata-driven development server orchestration via `kosui dev`
|
|
12
|
+
- **Model Generation**: Create KOS models with decorators and reactive state management
|
|
13
|
+
- **Component Generation**: Generate React components for KOS applications
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Create a New Workspace
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx create-nx-workspace@latest my-workspace --preset=@kosdev-code/kos-nx-plugin
|
|
21
|
+
cd my-workspace
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
During setup, you'll be prompted:
|
|
25
|
+
- Workspace name
|
|
26
|
+
- Whether to enable plugin support (default: yes)
|
|
27
|
+
|
|
28
|
+
This creates a workspace with:
|
|
29
|
+
- Host application configured for plugin development
|
|
30
|
+
- `.kos.json` with development metadata
|
|
31
|
+
- npm scripts for development workflow
|
|
32
|
+
|
|
33
|
+
### Start Development
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Interactive mode - select host and plugins
|
|
37
|
+
npm run dev
|
|
38
|
+
|
|
39
|
+
# Or specify host directly
|
|
40
|
+
kosui dev --host my-workspace-ui
|
|
41
|
+
|
|
42
|
+
# Verbose logging
|
|
43
|
+
npm run dev:verbose
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Plugin Development Workflow
|
|
47
|
+
|
|
48
|
+
### Creating Your First Plugin
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Create a new plugin
|
|
52
|
+
nx g @kosdev-code/kos-nx-plugin:kos-plugin-project my-plugin
|
|
53
|
+
|
|
54
|
+
# The generator will:
|
|
55
|
+
# 1. Prompt for which host to register with
|
|
56
|
+
# 2. Auto-assign a port from the host's range
|
|
57
|
+
# 3. Register plugin in .kos.json
|
|
58
|
+
# 4. Update plugin project.json with port
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Plugin Auto-Registration
|
|
62
|
+
|
|
63
|
+
When you create a plugin, it's automatically registered in `.kos.json`:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"development": {
|
|
68
|
+
"hosts": [
|
|
69
|
+
{
|
|
70
|
+
"name": "my-workspace-ui",
|
|
71
|
+
"plugins": [
|
|
72
|
+
{
|
|
73
|
+
"project": "my-plugin",
|
|
74
|
+
"port": 4201,
|
|
75
|
+
"alias": "my-plugin",
|
|
76
|
+
"enabled": true
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"portRanges": {
|
|
82
|
+
"my-workspace-ui": {
|
|
83
|
+
"start": 4200,
|
|
84
|
+
"next": 4202
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Development Modes
|
|
92
|
+
|
|
93
|
+
**Internal Development Mode** (Default)
|
|
94
|
+
- Starts host app + plugin dev servers
|
|
95
|
+
- Server-side plugin aggregation
|
|
96
|
+
- Hot module reloading for plugins
|
|
97
|
+
- Access at `http://localhost:4200`
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
kosui dev --host my-workspace-ui
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Third-Party Development Mode** (Plugins Only)
|
|
104
|
+
- For developing plugins without host source code
|
|
105
|
+
- Starts only plugin dev servers
|
|
106
|
+
- Connect to deployed device via query parameters
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
kosui dev --host my-workspace-ui --plugins-only
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Selective Plugin Loading**
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Start specific plugins
|
|
116
|
+
kosui dev --host my-workspace-ui --plugins my-plugin,another-plugin
|
|
117
|
+
|
|
118
|
+
# Disable specific plugins
|
|
119
|
+
kosui dev --host my-workspace-ui --disable my-plugin
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Available Generators
|
|
123
|
+
|
|
124
|
+
### Workspace & Projects
|
|
125
|
+
|
|
126
|
+
- `workspace` - Create new KOS workspace
|
|
127
|
+
- `project` - Create KOS UI app project
|
|
128
|
+
- `plugin` - Create KOS plugin project
|
|
129
|
+
- `i18n` - Create localization project
|
|
130
|
+
- `content` - Create content project
|
|
131
|
+
- `theme` - Create theme project
|
|
132
|
+
|
|
133
|
+
### Models
|
|
134
|
+
|
|
135
|
+
- `model` - Create KOS model
|
|
136
|
+
- `container` - Create container model
|
|
137
|
+
- `model:companion` - Create companion model
|
|
138
|
+
- `add-future` - Add Future support to model
|
|
139
|
+
|
|
140
|
+
### Components
|
|
141
|
+
|
|
142
|
+
- `component` - Create React component
|
|
143
|
+
- `context` - Create model React context
|
|
144
|
+
- `hook` - Create model React hook
|
|
145
|
+
|
|
146
|
+
### Plugin Components
|
|
147
|
+
|
|
148
|
+
- `plugin:utility` - Plugin utility contribution
|
|
149
|
+
- `plugin:setting` - Plugin settings contribution
|
|
150
|
+
- `plugin:nav` - Plugin navigation view
|
|
151
|
+
- `plugin:cui` - Plugin CUI configuration
|
|
152
|
+
- `plugin:cp` - Plugin control pour
|
|
153
|
+
- `plugin:setup` - Plugin setup step
|
|
154
|
+
- `plugin:custom` - Custom plugin contribution
|
|
155
|
+
|
|
156
|
+
### Development
|
|
157
|
+
|
|
158
|
+
- `dev` - Start development servers (via `kosui dev`)
|
|
159
|
+
- `serve` - Run serve target for a project
|
|
160
|
+
- `kab` - Run KAB packaging target
|
|
161
|
+
|
|
162
|
+
## Documentation
|
|
163
|
+
|
|
164
|
+
- [kosui dev Usage Guide](./docs/dev-script-usage.md) - Complete guide to development server
|
|
165
|
+
- [.kos.json Schema](./docs/kos-json-schema.md) - Configuration schema reference
|
|
166
|
+
- [Migration Guide](./docs/migration-to-data-driven.md) - Migrate existing workspaces
|
|
167
|
+
|
|
168
|
+
## Configuration
|
|
169
|
+
|
|
170
|
+
### .kos.json Root Configuration
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"type": "root",
|
|
175
|
+
"generator": {
|
|
176
|
+
"defaults": {
|
|
177
|
+
"model": "my-models",
|
|
178
|
+
"ui": "my-ui"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"development": {
|
|
182
|
+
"hosts": [...],
|
|
183
|
+
"portRanges": {...},
|
|
184
|
+
"logDir": "/tmp/my-workspace-logs"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
See [.kos.json Schema Documentation](./docs/kos-json-schema.md) for complete reference.
|
|
4
190
|
|
|
5
191
|
## Building
|
|
6
192
|
|
|
7
|
-
|
|
193
|
+
```bash
|
|
194
|
+
npx nx build @kosdev-code/kos-nx-plugin
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Publishing
|
|
198
|
+
|
|
199
|
+
This package is published to npm as part of the KOS SDK release process.
|
|
8
200
|
|
|
9
|
-
##
|
|
201
|
+
## Version
|
|
10
202
|
|
|
11
|
-
|
|
203
|
+
See package.json for current version. This plugin follows semantic versioning and is released alongside the KOS UI SDK.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-nx-plugin",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.22",
|
|
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": "
|
|
22
|
+
"gitHash": "14929950a1c351744473e8cb80a2b0ec2364c590"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { generatePluginConfiguration } from "@kosdev-code/kos-ui-plugin/utilities";
|
|
2
|
+
import { withKosConfig, withPluginDevServer } from "@kosdev-code/kos-ui-plugin/webpack";
|
|
3
|
+
import { withReact } from "@nx/react";
|
|
4
|
+
import { withModuleFederation } from "@nx/react/module-federation";
|
|
5
|
+
import { composePlugins, withNx } from "@nx/webpack";
|
|
6
|
+
import { readFileSync } from "fs";
|
|
7
|
+
import { join } from "path";
|
|
8
|
+
import * as webpack from "webpack";
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
const kosConfig = JSON.parse(
|
|
11
|
+
readFileSync(join(__dirname, "./.kos.json"), "utf-8")
|
|
12
|
+
);
|
|
13
|
+
const baseConfig = generatePluginConfiguration(kosConfig);
|
|
14
|
+
const config = {
|
|
15
|
+
...baseConfig,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default composePlugins(
|
|
19
|
+
withNx(),
|
|
20
|
+
withReact({}),
|
|
21
|
+
withModuleFederation(config),
|
|
22
|
+
withKosConfig(webpack),
|
|
23
|
+
withPluginDevServer({
|
|
24
|
+
verbose: process.env.VERBOSE_PLUGIN_DEV === 'true'
|
|
25
|
+
})
|
|
26
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-plugin-project/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-plugin-project/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAG3D,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,iBAgNzC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -6,9 +6,50 @@ const eslint_1 = require("@nx/eslint");
|
|
|
6
6
|
const react_1 = require("@nx/react");
|
|
7
7
|
const path = require("path");
|
|
8
8
|
const normalize_value_1 = require("../kos-model/lib/normalize-value");
|
|
9
|
+
const kos_config_helpers_1 = require("../../utils/kos-config-helpers");
|
|
9
10
|
async function kosPluginProjectGenerator(tree, options) {
|
|
11
|
+
// Read root .kos.json to get available hosts
|
|
12
|
+
let rootConfig;
|
|
13
|
+
let hostName = options.host;
|
|
14
|
+
if (tree.exists('.kos.json')) {
|
|
15
|
+
const rootConfigContent = tree.read('.kos.json', 'utf-8');
|
|
16
|
+
if (rootConfigContent) {
|
|
17
|
+
rootConfig = JSON.parse(rootConfigContent);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// Validate host if provided, or use first available host
|
|
21
|
+
if (rootConfig && (0, kos_config_helpers_1.hasDevelopmentConfig)(rootConfig)) {
|
|
22
|
+
if (hostName) {
|
|
23
|
+
// Validate that the specified host exists
|
|
24
|
+
const hostConfig = (0, kos_config_helpers_1.findHost)(rootConfig, hostName);
|
|
25
|
+
if (!hostConfig) {
|
|
26
|
+
const availableHosts = rootConfig.development.hosts.map(h => h.name).join(', ');
|
|
27
|
+
throw new Error(`Host '${hostName}' not found in .kos.json. Available hosts: ${availableHosts}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// Use first host as default if not specified
|
|
32
|
+
hostName = rootConfig.development.hosts[0].name;
|
|
33
|
+
console.log(`No host specified, using default host: ${hostName}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (hostName) {
|
|
37
|
+
// Host was specified but no development config exists
|
|
38
|
+
console.warn('Warning: Host specified but .kos.json has no development configuration. ' +
|
|
39
|
+
'Plugin will be created but not registered with a host.');
|
|
40
|
+
hostName = undefined;
|
|
41
|
+
}
|
|
42
|
+
// Get plugin context from host if available
|
|
43
|
+
let pluginContextValue = 'kosdev.ddk'; // Default
|
|
44
|
+
if (rootConfig && (0, kos_config_helpers_1.hasDevelopmentConfig)(rootConfig) && hostName) {
|
|
45
|
+
const hostConfig = (0, kos_config_helpers_1.findHost)(rootConfig, hostName);
|
|
46
|
+
if (hostConfig) {
|
|
47
|
+
pluginContextValue = hostConfig.pluginContext;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
10
50
|
const normalizedOptions = (0, normalize_value_1.normalizeAllValues)({
|
|
11
51
|
name: options.name,
|
|
52
|
+
pluginContext: pluginContextValue,
|
|
12
53
|
});
|
|
13
54
|
const normalized = {
|
|
14
55
|
...normalizedOptions,
|
|
@@ -38,6 +79,32 @@ async function kosPluginProjectGenerator(tree, options) {
|
|
|
38
79
|
interactionTests: false,
|
|
39
80
|
});
|
|
40
81
|
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, normalized.projectName);
|
|
82
|
+
// Auto-assign port and register plugin with host
|
|
83
|
+
let pluginPort;
|
|
84
|
+
if (rootConfig && (0, kos_config_helpers_1.hasDevelopmentConfig)(rootConfig) && hostName) {
|
|
85
|
+
const hostConfig = (0, kos_config_helpers_1.findHost)(rootConfig, hostName);
|
|
86
|
+
if (hostConfig) {
|
|
87
|
+
// Auto-assign port from host's port range
|
|
88
|
+
pluginPort = rootConfig.development.portRanges[hostName].next;
|
|
89
|
+
rootConfig.development.portRanges[hostName].next++;
|
|
90
|
+
// Generate plugin alias from project name
|
|
91
|
+
// Convert project name to kebab-case alias (e.g., "beverage-pour" -> "beverage")
|
|
92
|
+
const pluginAlias = normalized.nameDashCase.replace(/-plugin$/, '');
|
|
93
|
+
// Register plugin with host
|
|
94
|
+
hostConfig.plugins.push({
|
|
95
|
+
project: normalized.name,
|
|
96
|
+
port: pluginPort,
|
|
97
|
+
alias: pluginAlias,
|
|
98
|
+
enabled: true,
|
|
99
|
+
});
|
|
100
|
+
// Write updated .kos.json
|
|
101
|
+
tree.write('.kos.json', JSON.stringify(rootConfig, null, 2) + '\n');
|
|
102
|
+
console.log(`✓ Registered plugin '${normalized.name}' with host '${hostName}'`);
|
|
103
|
+
console.log(` - Port: ${pluginPort}`);
|
|
104
|
+
console.log(` - Alias: ${pluginAlias}`);
|
|
105
|
+
console.log(` - Context: ${normalized.pluginContext}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
41
108
|
const externalJson = {
|
|
42
109
|
kab: {
|
|
43
110
|
command: `node tools/scripts/kabtool.mjs build ${normalized.nameDashCase} && node tools/scripts/kabtool.mjs list ${normalized.nameDashCase} `,
|
|
@@ -73,6 +140,10 @@ async function kosPluginProjectGenerator(tree, options) {
|
|
|
73
140
|
if (json.targets?.build?.configurations?.production) {
|
|
74
141
|
json.targets.build.configurations.production.webpackConfig = `plugins/${normalized.nameDashCase}/webpack.config.prod.ts`;
|
|
75
142
|
}
|
|
143
|
+
// Update serve target with assigned port
|
|
144
|
+
if (pluginPort && json.targets?.serve?.options) {
|
|
145
|
+
json.targets.serve.options.port = pluginPort;
|
|
146
|
+
}
|
|
76
147
|
return json;
|
|
77
148
|
});
|
|
78
149
|
(0, devkit_1.updateJson)(tree, `${projectConfiguration.root}/tsconfig.json`, (json) => {
|
|
@@ -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;
|
|
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;AAGtE,uEAAgF;AACzE,KAAK,UAAU,yBAAyB,CAC7C,IAAU,EACV,OAAwC;IAExC,6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CAA4B,EAC1B,IAAI,EACJ;QACE,sBAAsB,EAAE,QAAQ;QAChC,iCAAiC,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;AAlND,8DAkNC;AAED,kBAAe,yBAAyB,CAAC"}
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"type": "string",
|
|
28
28
|
"description": "KAB type of UI",
|
|
29
29
|
"default": "ddk.ncui.plugin"
|
|
30
|
+
},
|
|
31
|
+
"host": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Which host application should this plugin serve?",
|
|
34
|
+
"x-prompt": "Which host app should this plugin serve?"
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
"required": ["name"]
|
|
@@ -4,7 +4,11 @@ import {
|
|
|
4
4
|
LoadingMessage,
|
|
5
5
|
getLogLevel,
|
|
6
6
|
initKosProvider,
|
|
7
|
-
} from "@kosdev-code/kos-ui-sdk"
|
|
7
|
+
} from "@kosdev-code/kos-ui-sdk";<% if (enablePlugins) { %>
|
|
8
|
+
import {
|
|
9
|
+
FloatingPluginExplorer,
|
|
10
|
+
KosPluginProvider,
|
|
11
|
+
} from "@kosdev-code/kos-ui-plugin";<% } %>
|
|
8
12
|
import log from "loglevel";
|
|
9
13
|
import { Suspense } from "react";
|
|
10
14
|
import { KosCoreContextProvider } from "./registration";
|
|
@@ -14,25 +18,54 @@ import { MainView } from "./components/main-view";
|
|
|
14
18
|
|
|
15
19
|
const level = getLogLevel();
|
|
16
20
|
|
|
17
|
-
log.setLevel(level)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
log.setLevel(level);<% if (enablePlugins) { %>
|
|
22
|
+
|
|
23
|
+
// Configure plugin loading based on environment and URL parameters
|
|
24
|
+
// This supports both internal development (via `kosui dev`) and third-party development (via query params)
|
|
25
|
+
const getPluginConfig = () => {
|
|
26
|
+
// Check environment variable (set by `kosui dev` command)
|
|
27
|
+
const useLocalPlugins = process.env.USE_LOCAL_PLUGINS === 'true';
|
|
28
|
+
|
|
29
|
+
// Check URL parameter for third-party dev: ?pluginDevServers=http://localhost:4201,...
|
|
30
|
+
const params = new URLSearchParams(window.location.search);
|
|
31
|
+
const devServers = params.get('pluginDevServers');
|
|
32
|
+
|
|
33
|
+
if (useLocalPlugins || devServers) {
|
|
34
|
+
return {
|
|
35
|
+
// Explicitly set pluginBaseUrl to prevent ?host= query param from overriding
|
|
36
|
+
pluginBaseUrl: window.location.origin,
|
|
37
|
+
pluginApiPath: '/api/kos/ui/plugins/contexts',
|
|
38
|
+
pluginContext: { group: '<%= nameDashCase %>' }, // Plugin context from .kos.json
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return undefined;
|
|
43
|
+
};<% } %>
|
|
44
|
+
|
|
45
|
+
const App = () => {<% if (enablePlugins) { %>
|
|
46
|
+
const pluginConfig = getPluginConfig();<% } %>
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<ErrorBoundaryWithFallback>
|
|
50
|
+
<Suspense fallback={<LoadingMessage theme={"dark"}></LoadingMessage>}>
|
|
51
|
+
<KosCoreContextProvider><% if (enablePlugins) { %>
|
|
52
|
+
<KosPluginProvider pluginConfig={pluginConfig}>
|
|
53
|
+
<FloatingPluginExplorer /><% } %>
|
|
54
|
+
<KosTranslationProvider>
|
|
55
|
+
<div className="App">
|
|
56
|
+
<Router window={window}>
|
|
57
|
+
<Routes>
|
|
58
|
+
<Route index element={<MainView />} />
|
|
59
|
+
<Route path="/main" element={<MainView />} />
|
|
60
|
+
</Routes>
|
|
61
|
+
</Router>
|
|
62
|
+
</div>
|
|
63
|
+
</KosTranslationProvider><% if (enablePlugins) { %>
|
|
64
|
+
</KosPluginProvider><% } %>
|
|
65
|
+
</KosCoreContextProvider>
|
|
66
|
+
</Suspense>
|
|
67
|
+
</ErrorBoundaryWithFallback>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
37
70
|
|
|
38
71
|
export default App;
|
|
@@ -2,8 +2,10 @@ import { composePlugins, withNx } from '@nx/webpack';
|
|
|
2
2
|
import { withReact } from '@nx/react';
|
|
3
3
|
import * as webpack from 'webpack';
|
|
4
4
|
import { withModuleFederation } from '@nx/react/module-federation';
|
|
5
|
+
import { merge } from 'webpack-merge';
|
|
5
6
|
|
|
6
|
-
import baseConfig from './module-federation.config'
|
|
7
|
+
import baseConfig from './module-federation.config';<% if (enablePlugins) { %>
|
|
8
|
+
import { withPluginDevAggregator } from '@kosdev-code/kos-ui-plugin/webpack';<% } %>
|
|
7
9
|
|
|
8
10
|
import * as dotenv from 'dotenv';
|
|
9
11
|
|
|
@@ -20,26 +22,67 @@ function getKosEnv() {
|
|
|
20
22
|
key.startsWith('KOS_')
|
|
21
23
|
);
|
|
22
24
|
return kosKeys;
|
|
23
|
-
}
|
|
25
|
+
}<% if (enablePlugins) { %>
|
|
26
|
+
|
|
27
|
+
// Configure plugin dev servers based on environment variables
|
|
28
|
+
// These are set automatically by `kosui dev` command
|
|
29
|
+
const useLocalPlugins = process.env.USE_LOCAL_PLUGINS === 'true';
|
|
30
|
+
const mergeWithBackend = process.env.MERGE_WITH_BACKEND === 'true';
|
|
31
|
+
|
|
32
|
+
// Plugin dev servers are configured via environment variables
|
|
33
|
+
// Format: <PLUGIN_ALIAS>_DEV=true where alias is from .kos.json
|
|
34
|
+
// Example: BEVERAGE_POUR_DEV=true
|
|
35
|
+
const pluginServers = Object.keys(process.env)
|
|
36
|
+
.filter(key => key.endsWith('_DEV') && process.env[key] === 'true')
|
|
37
|
+
.map(key => {
|
|
38
|
+
// Extract plugin alias from env var (e.g., BEVERAGE_POUR_DEV -> beverage-pour)
|
|
39
|
+
const alias = key.replace(/_DEV$/, '').toLowerCase().replace(/_/g, '-');
|
|
40
|
+
// Port is set via <PLUGIN_ALIAS>_PORT env var
|
|
41
|
+
const portKey = key.replace(/_DEV$/, '_PORT');
|
|
42
|
+
const port = process.env[portKey] || '4201';
|
|
43
|
+
return `http://localhost:${port}`;
|
|
44
|
+
});<% } %>
|
|
24
45
|
|
|
25
46
|
// Nx plugins for webpack to build config object from Nx options and context.
|
|
26
47
|
export default composePlugins(
|
|
27
48
|
withNx({}),
|
|
28
49
|
withReact(),
|
|
29
|
-
withModuleFederation(config)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
withModuleFederation(config),<% if (enablePlugins) { %>
|
|
51
|
+
// Add plugin dev aggregator for multi-plugin development
|
|
52
|
+
useLocalPlugins
|
|
53
|
+
? withPluginDevAggregator({
|
|
54
|
+
pluginServers,
|
|
55
|
+
mergeWithBackend,
|
|
56
|
+
fallbackToBackend: pluginServers.length === 0,
|
|
57
|
+
backendUrl: 'http://localhost:8081',
|
|
58
|
+
verbose: process.env.VERBOSE_PLUGIN_DEV === 'true',
|
|
59
|
+
})
|
|
60
|
+
: (config) => config,<% } %>
|
|
61
|
+
(config, { options, context }) =>
|
|
62
|
+
merge(config, {
|
|
63
|
+
resolve: {
|
|
64
|
+
fallback: {
|
|
65
|
+
path: false,
|
|
66
|
+
os: false,
|
|
67
|
+
crypto: false,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
module: {
|
|
71
|
+
rules: [
|
|
72
|
+
{
|
|
73
|
+
test: /\.svg$/i,
|
|
74
|
+
issuer: /\.[jt]sx?$/,
|
|
75
|
+
use: [{ loader: '@svgr/webpack' }],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
mode: (process.env.NODE_ENV || config.mode) as any,
|
|
80
|
+
plugins: [
|
|
81
|
+
new webpack.EnvironmentPlugin({
|
|
82
|
+
NODE_ENV: 'production',<% if (enablePlugins) { %>
|
|
83
|
+
USE_LOCAL_PLUGINS: 'false', // Default to false, set to 'true' in dev mode<% } %>
|
|
84
|
+
...Object.fromEntries(getKosEnv().map((key) => [key, process.env[key]])),
|
|
85
|
+
}),
|
|
86
|
+
],
|
|
87
|
+
})
|
|
45
88
|
);
|
|
@@ -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,
|
|
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,iBAyT/B;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -77,6 +77,7 @@ async function presetGenerator(tree, options) {
|
|
|
77
77
|
"@types/node": "^18.16.9",
|
|
78
78
|
archiver: "^5.3.1",
|
|
79
79
|
"openapi-typescript": "^7.6.1",
|
|
80
|
+
"webpack-merge": "^5.10.0",
|
|
80
81
|
});
|
|
81
82
|
// const configTxt = tree.read("nx.json", "utf-8") || "";
|
|
82
83
|
// const config = JSON.parse(configTxt);
|
|
@@ -256,6 +257,8 @@ async function presetGenerator(tree, options) {
|
|
|
256
257
|
"update:nx": "nx migrate @kosdev-code/kos-nx-plugin",
|
|
257
258
|
zip: "nx run-many --target=zip",
|
|
258
259
|
build: "nx run-many --target=build",
|
|
260
|
+
dev: "kosui dev",
|
|
261
|
+
"dev:verbose": "VERBOSE_PLUGIN_DEV=true kosui dev",
|
|
259
262
|
...json.scripts,
|
|
260
263
|
};
|
|
261
264
|
return json;
|
|
@@ -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;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,EAAE,KAAK;QACf,MAA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AAQ;QACnC,+BAA+B,EAAE,QAAQ;QACzC,gCAAgC,EAAE,QAAQ;QAC1C,0BAA0B,EAAE,QAAQ;QACpC,4BAA4B,EAAE,QAAQ;QACtC,oBAAoB,EAAE,SAAS;QAC/B,mBAAmB,EAAE,QAAQ;QAC7B,eAAe,EAAE,SAAS;QAC1B,8BAA8B,EAAE,SAAS;QACzC,OAAO,EAAE,SAAS;QAClB,kCAAkC,EAAE,QAAQ;QAC5C,sBAAsB,EAAE,QAAQ;QAChC,kBAAkB,EAAE,QAAQ;QAC5B,GAAG,EAAE,UAAU;KAChB,EACD;QACE,4BAA4B,EAAE,QAAQ;QACtC,aAAa,EAAE,UAAU;QACzB,QAAQ,EAAE,QAAQ;QAClB,oBAAoB,EAAE,QAAQ;
|
|
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;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Ae,CAAC,gBAAgB,GAAG,SAAS,CAAC;QAClD,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;AA3TD,0CA2TC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -6,5 +6,24 @@
|
|
|
6
6
|
"model-component": "model-components",
|
|
7
7
|
"ui": "<%= nameDashCase %>-ui"
|
|
8
8
|
}
|
|
9
|
+
},
|
|
10
|
+
"development": {
|
|
11
|
+
"hosts": [
|
|
12
|
+
{
|
|
13
|
+
"name": "<%= nameDashCase %>-ui",
|
|
14
|
+
"project": "<%= nameDashCase %>-ui",
|
|
15
|
+
"port": 4200,
|
|
16
|
+
"type": "cui",
|
|
17
|
+
"pluginContext": "<%= nameDashCase %>",
|
|
18
|
+
"plugins": []
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"portRanges": {
|
|
22
|
+
"<%= nameDashCase %>-ui": {
|
|
23
|
+
"start": 4200,
|
|
24
|
+
"next": 4201
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"logDir": "/tmp/<%= nameDashCase %>-logs"
|
|
9
28
|
}
|
|
10
29
|
}
|
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"name": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "",
|
|
9
|
+
"description": "The name of the workspace",
|
|
10
10
|
"x-prompt": "What name would you like to use?"
|
|
11
|
+
},
|
|
12
|
+
"enablePlugins": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "Enable plugin support for this workspace (includes plugin system, dev aggregator, and FloatingPluginExplorer)",
|
|
15
|
+
"default": true
|
|
11
16
|
}
|
|
12
17
|
},
|
|
13
18
|
"required": ["name"]
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KOS Configuration Schema
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for .kos.json files in KOS workspaces.
|
|
5
|
+
* Supports metadata-driven plugin development with automatic registration
|
|
6
|
+
* and port management.
|
|
7
|
+
*
|
|
8
|
+
* @module kos-config
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Port range configuration for automatic port allocation.
|
|
12
|
+
*
|
|
13
|
+
* Tracks available port ranges for a host application to prevent conflicts
|
|
14
|
+
* when multiple plugins are registered.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```json
|
|
18
|
+
* {
|
|
19
|
+
* "start": 4200,
|
|
20
|
+
* "next": 4203
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export interface PortRange {
|
|
25
|
+
/**
|
|
26
|
+
* Starting port number for this host's range.
|
|
27
|
+
* The host app typically uses this port.
|
|
28
|
+
*/
|
|
29
|
+
start: number;
|
|
30
|
+
/**
|
|
31
|
+
* Next available port to assign to a new plugin.
|
|
32
|
+
* Automatically incremented when plugins are registered.
|
|
33
|
+
*/
|
|
34
|
+
next: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Plugin configuration metadata.
|
|
38
|
+
*
|
|
39
|
+
* Defines how a plugin integrates with its host application,
|
|
40
|
+
* including dev server port assignment and CLI alias.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```json
|
|
44
|
+
* {
|
|
45
|
+
* "project": "beverage-pour",
|
|
46
|
+
* "port": 4201,
|
|
47
|
+
* "alias": "beverage",
|
|
48
|
+
* "enabled": true
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export interface PluginConfig {
|
|
53
|
+
/**
|
|
54
|
+
* NX project name of the plugin.
|
|
55
|
+
* Must match the project name in workspace.json/project.json.
|
|
56
|
+
*/
|
|
57
|
+
project: string;
|
|
58
|
+
/**
|
|
59
|
+
* Dev server port for this plugin.
|
|
60
|
+
* Auto-assigned from host's port range during plugin creation.
|
|
61
|
+
*/
|
|
62
|
+
port: number;
|
|
63
|
+
/**
|
|
64
|
+
* Short CLI-friendly alias for the plugin (kebab-case).
|
|
65
|
+
* Used with --plugins and --disable flags.
|
|
66
|
+
*
|
|
67
|
+
* @example "beverage", "pos", "crew"
|
|
68
|
+
*/
|
|
69
|
+
alias: string;
|
|
70
|
+
/**
|
|
71
|
+
* Whether this plugin should start by default.
|
|
72
|
+
* Can be overridden via CLI flags.
|
|
73
|
+
*
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Host application configuration.
|
|
80
|
+
*
|
|
81
|
+
* Defines a host application that can load plugins, including
|
|
82
|
+
* its dev server settings and associated plugin registrations.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```json
|
|
86
|
+
* {
|
|
87
|
+
* "name": "ddk-app",
|
|
88
|
+
* "project": "kos-ddk-app",
|
|
89
|
+
* "port": 4200,
|
|
90
|
+
* "type": "ncui",
|
|
91
|
+
* "pluginContext": "kosdev.ddk",
|
|
92
|
+
* "plugins": [
|
|
93
|
+
* {
|
|
94
|
+
* "project": "beverage-pour",
|
|
95
|
+
* "port": 4201,
|
|
96
|
+
* "alias": "beverage",
|
|
97
|
+
* "enabled": true
|
|
98
|
+
* }
|
|
99
|
+
* ]
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export interface HostConfig {
|
|
104
|
+
/**
|
|
105
|
+
* Identifier for this host (kebab-case).
|
|
106
|
+
* Used with --host flag in dev script.
|
|
107
|
+
*
|
|
108
|
+
* @example "ddk-app", "drive-thru-ui"
|
|
109
|
+
*/
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* NX project name of the host application.
|
|
113
|
+
* Must match the project name in workspace.json/project.json.
|
|
114
|
+
*/
|
|
115
|
+
project: string;
|
|
116
|
+
/**
|
|
117
|
+
* Dev server port for the host application.
|
|
118
|
+
*/
|
|
119
|
+
port: number;
|
|
120
|
+
/**
|
|
121
|
+
* Type/category of host application.
|
|
122
|
+
*
|
|
123
|
+
* Common values:
|
|
124
|
+
* - "cui" - Consumer User Interface
|
|
125
|
+
* - "ncui" - Non-Consumer User Interface (standard)
|
|
126
|
+
* - "ncui.compact" - Non-Consumer User Interface (compact mode)
|
|
127
|
+
* - "admin" - Administrative interface
|
|
128
|
+
*
|
|
129
|
+
* @example "ncui", "cui", "admin"
|
|
130
|
+
*/
|
|
131
|
+
type: string;
|
|
132
|
+
/**
|
|
133
|
+
* Plugin context group identifier.
|
|
134
|
+
*
|
|
135
|
+
* Determines which plugins are compatible with this host.
|
|
136
|
+
* Plugins register with a matching context in their .kos.json.
|
|
137
|
+
*
|
|
138
|
+
* @example "kosdev.ddk", "cui", "tccc.drive-thru"
|
|
139
|
+
*/
|
|
140
|
+
pluginContext: string;
|
|
141
|
+
/**
|
|
142
|
+
* Array of plugins registered for this host.
|
|
143
|
+
*
|
|
144
|
+
* Plugins are automatically added to this array when created
|
|
145
|
+
* via the plugin generator with --host flag.
|
|
146
|
+
*/
|
|
147
|
+
plugins: PluginConfig[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Development configuration section.
|
|
151
|
+
*
|
|
152
|
+
* Contains all metadata needed for the universal development script
|
|
153
|
+
* to start host applications and their plugins.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```json
|
|
157
|
+
* {
|
|
158
|
+
* "hosts": [
|
|
159
|
+
* {
|
|
160
|
+
* "name": "ddk-app",
|
|
161
|
+
* "project": "kos-ddk-app",
|
|
162
|
+
* "port": 4200,
|
|
163
|
+
* "type": "ncui",
|
|
164
|
+
* "pluginContext": "kosdev.ddk",
|
|
165
|
+
* "plugins": []
|
|
166
|
+
* }
|
|
167
|
+
* ],
|
|
168
|
+
* "portRanges": {
|
|
169
|
+
* "ddk-app": {
|
|
170
|
+
* "start": 4200,
|
|
171
|
+
* "next": 4201
|
|
172
|
+
* }
|
|
173
|
+
* },
|
|
174
|
+
* "logDir": "/tmp/ddk-logs"
|
|
175
|
+
* }
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
export interface DevelopmentConfig {
|
|
179
|
+
/**
|
|
180
|
+
* Array of host applications in this workspace.
|
|
181
|
+
*
|
|
182
|
+
* Multiple hosts can be defined for workspaces that contain
|
|
183
|
+
* different application types (CUI, NCUI, admin panels, etc.).
|
|
184
|
+
*/
|
|
185
|
+
hosts: HostConfig[];
|
|
186
|
+
/**
|
|
187
|
+
* Port range allocations for each host.
|
|
188
|
+
*
|
|
189
|
+
* Keys are host names, values are PortRange objects.
|
|
190
|
+
* Used to auto-assign ports when plugins are created.
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```json
|
|
194
|
+
* {
|
|
195
|
+
* "ddk-app": { "start": 4200, "next": 4203 },
|
|
196
|
+
* "drive-thru-ui": { "start": 4300, "next": 4306 }
|
|
197
|
+
* }
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
portRanges: Record<string, PortRange>;
|
|
201
|
+
/**
|
|
202
|
+
* Optional directory for dev server logs.
|
|
203
|
+
*
|
|
204
|
+
* If specified, stdout/stderr from dev servers will be
|
|
205
|
+
* written to files in this directory.
|
|
206
|
+
*
|
|
207
|
+
* @example "/tmp/ddk-logs", "./logs"
|
|
208
|
+
*/
|
|
209
|
+
logDir?: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Root KOS configuration.
|
|
213
|
+
*
|
|
214
|
+
* Complete schema for .kos.json files at workspace root.
|
|
215
|
+
* Extends the existing generator defaults with development metadata.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```json
|
|
219
|
+
* {
|
|
220
|
+
* "type": "root",
|
|
221
|
+
* "generator": {
|
|
222
|
+
* "defaults": {
|
|
223
|
+
* "model": "my-workspace-models",
|
|
224
|
+
* "model-component": "model-components",
|
|
225
|
+
* "ui": "my-workspace-ui"
|
|
226
|
+
* }
|
|
227
|
+
* },
|
|
228
|
+
* "development": {
|
|
229
|
+
* "hosts": [
|
|
230
|
+
* {
|
|
231
|
+
* "name": "my-workspace-ui",
|
|
232
|
+
* "project": "my-workspace-ui",
|
|
233
|
+
* "port": 4200,
|
|
234
|
+
* "type": "cui",
|
|
235
|
+
* "pluginContext": "my-workspace",
|
|
236
|
+
* "plugins": []
|
|
237
|
+
* }
|
|
238
|
+
* ],
|
|
239
|
+
* "portRanges": {
|
|
240
|
+
* "my-workspace-ui": {
|
|
241
|
+
* "start": 4200,
|
|
242
|
+
* "next": 4201
|
|
243
|
+
* }
|
|
244
|
+
* }
|
|
245
|
+
* }
|
|
246
|
+
* }
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export interface KosDevConfig {
|
|
250
|
+
/**
|
|
251
|
+
* Configuration type identifier.
|
|
252
|
+
* Must be "root" for workspace-level .kos.json files.
|
|
253
|
+
*/
|
|
254
|
+
type: "root";
|
|
255
|
+
/**
|
|
256
|
+
* Generator default configurations.
|
|
257
|
+
*
|
|
258
|
+
* Specifies default project names for different generator types.
|
|
259
|
+
*/
|
|
260
|
+
generator: {
|
|
261
|
+
/**
|
|
262
|
+
* Default project names by generator type.
|
|
263
|
+
*/
|
|
264
|
+
defaults: {
|
|
265
|
+
/**
|
|
266
|
+
* Default model project name.
|
|
267
|
+
*/
|
|
268
|
+
model?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Default model-component project name.
|
|
271
|
+
*/
|
|
272
|
+
"model-component"?: string;
|
|
273
|
+
/**
|
|
274
|
+
* Default UI project name.
|
|
275
|
+
*/
|
|
276
|
+
ui?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Default plugin project name.
|
|
279
|
+
*/
|
|
280
|
+
plugin?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Additional custom defaults.
|
|
283
|
+
*/
|
|
284
|
+
[key: string]: string | undefined;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Development configuration for plugin development workflow.
|
|
289
|
+
*
|
|
290
|
+
* Optional - if not present, workspace uses legacy development patterns.
|
|
291
|
+
* When present, enables metadata-driven development with universal dev script.
|
|
292
|
+
*/
|
|
293
|
+
development?: DevelopmentConfig;
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=kos-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kos-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugins/kos-nx-plugin/src/types/kos-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;OAUG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;IAEpB;;;;;;;;;;;;;OAaG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEtC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,QAAQ,EAAE;YACR;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAE3B;;eAEG;YACH,EAAE,CAAC,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;YAEhB;;eAEG;YACH,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;SACnC,CAAC;KACH,CAAC;IAEF;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* KOS Configuration Schema
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for .kos.json files in KOS workspaces.
|
|
6
|
+
* Supports metadata-driven plugin development with automatic registration
|
|
7
|
+
* and port management.
|
|
8
|
+
*
|
|
9
|
+
* @module kos-config
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
//# sourceMappingURL=kos-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kos-config.js","sourceRoot":"","sources":["../../../../../../packages/plugins/kos-nx-plugin/src/types/kos-config.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KOS Configuration Helper Functions
|
|
3
|
+
*
|
|
4
|
+
* Utility functions for working with .kos.json configuration files.
|
|
5
|
+
* Provides type-safe access to development configuration.
|
|
6
|
+
*
|
|
7
|
+
* @module kos-config-helpers
|
|
8
|
+
*/
|
|
9
|
+
import type { DevelopmentConfig, HostConfig, KosDevConfig, PluginConfig } from "../types/kos-config";
|
|
10
|
+
/**
|
|
11
|
+
* Type guard to check if a config has development section.
|
|
12
|
+
*
|
|
13
|
+
* @param config - Configuration object to check
|
|
14
|
+
* @returns True if config has development section with hosts
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* if (hasDevelopmentConfig(config)) {
|
|
19
|
+
* // Safe to access config.development.hosts
|
|
20
|
+
* const hosts = config.development.hosts;
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function hasDevelopmentConfig(config: KosDevConfig): config is KosDevConfig & {
|
|
25
|
+
development: DevelopmentConfig;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Find a host configuration by name.
|
|
29
|
+
*
|
|
30
|
+
* @param config - Root KOS configuration
|
|
31
|
+
* @param hostName - Name of the host to find
|
|
32
|
+
* @returns Host configuration or undefined if not found
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const host = findHost(config, 'ddk-app');
|
|
37
|
+
* if (host) {
|
|
38
|
+
* console.log(`Host ${host.name} runs on port ${host.port}`);
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function findHost(config: KosDevConfig, hostName: string): HostConfig | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Get all plugin aliases for a host.
|
|
45
|
+
*
|
|
46
|
+
* @param hostConfig - Host configuration
|
|
47
|
+
* @returns Array of plugin aliases
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const aliases = getPluginAliases(hostConfig);
|
|
52
|
+
* // ['beverage', 'ddk-standard', 'ddk-compact']
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function getPluginAliases(hostConfig: HostConfig): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Find a plugin configuration by alias within a host.
|
|
58
|
+
*
|
|
59
|
+
* @param hostConfig - Host configuration
|
|
60
|
+
* @param alias - Plugin alias to find
|
|
61
|
+
* @returns Plugin configuration or undefined if not found
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const plugin = findPluginByAlias(hostConfig, 'beverage');
|
|
66
|
+
* if (plugin) {
|
|
67
|
+
* console.log(`Plugin ${plugin.project} on port ${plugin.port}`);
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function findPluginByAlias(hostConfig: HostConfig, alias: string): PluginConfig | undefined;
|
|
72
|
+
//# sourceMappingURL=kos-config-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kos-config-helpers.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugins/kos-nx-plugin/src/utils/kos-config-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACb,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,GACnB,MAAM,IAAI,YAAY,GAAG;IAAE,WAAW,EAAE,iBAAiB,CAAA;CAAE,CAM7D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,GACf,UAAU,GAAG,SAAS,CAKxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CAEjE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,MAAM,GACZ,YAAY,GAAG,SAAS,CAE1B"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* KOS Configuration Helper Functions
|
|
4
|
+
*
|
|
5
|
+
* Utility functions for working with .kos.json configuration files.
|
|
6
|
+
* Provides type-safe access to development configuration.
|
|
7
|
+
*
|
|
8
|
+
* @module kos-config-helpers
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.findPluginByAlias = exports.getPluginAliases = exports.findHost = exports.hasDevelopmentConfig = void 0;
|
|
12
|
+
/**
|
|
13
|
+
* Type guard to check if a config has development section.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Configuration object to check
|
|
16
|
+
* @returns True if config has development section with hosts
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* if (hasDevelopmentConfig(config)) {
|
|
21
|
+
* // Safe to access config.development.hosts
|
|
22
|
+
* const hosts = config.development.hosts;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
function hasDevelopmentConfig(config) {
|
|
27
|
+
return (config.development !== undefined &&
|
|
28
|
+
Array.isArray(config.development.hosts) &&
|
|
29
|
+
config.development.hosts.length > 0);
|
|
30
|
+
}
|
|
31
|
+
exports.hasDevelopmentConfig = hasDevelopmentConfig;
|
|
32
|
+
/**
|
|
33
|
+
* Find a host configuration by name.
|
|
34
|
+
*
|
|
35
|
+
* @param config - Root KOS configuration
|
|
36
|
+
* @param hostName - Name of the host to find
|
|
37
|
+
* @returns Host configuration or undefined if not found
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const host = findHost(config, 'ddk-app');
|
|
42
|
+
* if (host) {
|
|
43
|
+
* console.log(`Host ${host.name} runs on port ${host.port}`);
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
function findHost(config, hostName) {
|
|
48
|
+
if (!hasDevelopmentConfig(config)) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return config.development.hosts.find((h) => h.name === hostName);
|
|
52
|
+
}
|
|
53
|
+
exports.findHost = findHost;
|
|
54
|
+
/**
|
|
55
|
+
* Get all plugin aliases for a host.
|
|
56
|
+
*
|
|
57
|
+
* @param hostConfig - Host configuration
|
|
58
|
+
* @returns Array of plugin aliases
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const aliases = getPluginAliases(hostConfig);
|
|
63
|
+
* // ['beverage', 'ddk-standard', 'ddk-compact']
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
function getPluginAliases(hostConfig) {
|
|
67
|
+
return hostConfig.plugins.map((p) => p.alias);
|
|
68
|
+
}
|
|
69
|
+
exports.getPluginAliases = getPluginAliases;
|
|
70
|
+
/**
|
|
71
|
+
* Find a plugin configuration by alias within a host.
|
|
72
|
+
*
|
|
73
|
+
* @param hostConfig - Host configuration
|
|
74
|
+
* @param alias - Plugin alias to find
|
|
75
|
+
* @returns Plugin configuration or undefined if not found
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const plugin = findPluginByAlias(hostConfig, 'beverage');
|
|
80
|
+
* if (plugin) {
|
|
81
|
+
* console.log(`Plugin ${plugin.project} on port ${plugin.port}`);
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
function findPluginByAlias(hostConfig, alias) {
|
|
86
|
+
return hostConfig.plugins.find((p) => p.alias === alias);
|
|
87
|
+
}
|
|
88
|
+
exports.findPluginByAlias = findPluginByAlias;
|
|
89
|
+
//# sourceMappingURL=kos-config-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kos-config-helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/kos-nx-plugin/src/utils/kos-config-helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AASH;;;;;;;;;;;;;GAaG;AACH,SAAgB,oBAAoB,CAClC,MAAoB;IAEpB,OAAO,CACL,MAAM,CAAC,WAAW,KAAK,SAAS;QAChC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC;QACvC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CACpC,CAAC;AACJ,CAAC;AARD,oDAQC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,QAAQ,CACtB,MAAoB,EACpB,QAAgB;IAEhB,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;AACnE,CAAC;AARD,4BAQC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,gBAAgB,CAAC,UAAsB;IACrD,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAFD,4CAEC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,iBAAiB,CAC/B,UAAsB,EACtB,KAAa;IAEb,OAAO,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAC3D,CAAC;AALD,8CAKC"}
|