@kosdev-code/kos-ui-cli 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-ui-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"bin": {
|
|
5
5
|
"kosui": "./src/lib/cli.mjs"
|
|
6
6
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": "./src/index.js",
|
|
22
22
|
"kos": {
|
|
23
23
|
"build": {
|
|
24
|
-
"gitHash": "
|
|
24
|
+
"gitHash": "22bfa6b003918abbc473ab6b5cae1728e473a7e9"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
@@ -66,8 +66,8 @@ export const metadata = [
|
|
|
66
66
|
componentProject: "componentProject"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
{
|
|
70
|
-
key: "plugin:cp",
|
|
69
|
+
{
|
|
70
|
+
key: "plugin:cp",
|
|
71
71
|
name: "KOS UI Plugin Control Pour",
|
|
72
72
|
namedArguments: {
|
|
73
73
|
name: "componentName",
|
|
@@ -76,6 +76,17 @@ export const metadata = [
|
|
|
76
76
|
componentProject: "componentProject"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
key: "plugin:custom",
|
|
81
|
+
name: "KOS UI Plugin Custom (User-Specified Contribution)",
|
|
82
|
+
namedArguments: {
|
|
83
|
+
name: "componentName",
|
|
84
|
+
componentName: "componentName",
|
|
85
|
+
project: "componentProject",
|
|
86
|
+
componentProject: "componentProject",
|
|
87
|
+
contributionKey: "contributionKey"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
79
90
|
];
|
|
80
91
|
|
|
81
92
|
export default async function (plop) {
|
|
@@ -84,7 +95,12 @@ export default async function (plop) {
|
|
|
84
95
|
plop.setActionType("createPluginComponent", async function (answers) {
|
|
85
96
|
const pluginType = answers.extensionPoint;
|
|
86
97
|
|
|
87
|
-
|
|
98
|
+
let command = `npx nx generate @kosdev-code/kos-nx-plugin:kos-component --name=${answers.componentName} --group=${answers.group} --appProject=${answers.componentProject} --pluginType=${pluginType} --type=components --no-interactive`;
|
|
99
|
+
|
|
100
|
+
// Add contributionKey for custom plugin types
|
|
101
|
+
if (pluginType === 'custom' && answers.contributionKey) {
|
|
102
|
+
command = `npx nx generate @kosdev-code/kos-nx-plugin:kos-component --name=${answers.componentName} --contributionKey=${answers.contributionKey} --appProject=${answers.componentProject} --pluginType=${pluginType} --type=components --no-interactive`;
|
|
103
|
+
}
|
|
88
104
|
|
|
89
105
|
try {
|
|
90
106
|
await execute(command);
|
|
@@ -116,6 +132,7 @@ export default async function (plop) {
|
|
|
116
132
|
{ key: "plugin:setting", name: "setting" },
|
|
117
133
|
{ key: "plugin:nav", name: "nav" },
|
|
118
134
|
{ key: "plugin:cp", name: "controlPour" },
|
|
135
|
+
{ key: "plugin:custom", name: "custom" },
|
|
119
136
|
];
|
|
120
137
|
|
|
121
138
|
// Generic plugin component
|
|
@@ -146,6 +163,16 @@ export default async function (plop) {
|
|
|
146
163
|
},
|
|
147
164
|
]
|
|
148
165
|
: []),
|
|
166
|
+
...(name === "custom"
|
|
167
|
+
? [
|
|
168
|
+
{
|
|
169
|
+
type: "input",
|
|
170
|
+
name: "contributionKey",
|
|
171
|
+
message: "What contribution key should be used in .kos.json? (e.g., 'menus', 'panels', 'commands', etc.)",
|
|
172
|
+
validate: required,
|
|
173
|
+
},
|
|
174
|
+
]
|
|
175
|
+
: []),
|
|
149
176
|
{
|
|
150
177
|
type: "input",
|
|
151
178
|
name: "extensionPoint",
|