@rancher/create-extension 0.1.1-rc.1 → 0.2.1-rc.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.
- package/app/files/.eslintignore +0 -2
- package/app/files/.github/workflows/build-extension-catalog.yml +2 -6
- package/app/files/.github/workflows/build-extension-charts.yml +2 -6
- package/app/files/.vscode/settings.json +0 -1
- package/app/files/tsconfig.json +2 -2
- package/app/init +2 -5
- package/package.json +2 -2
- package/pkg/files/tsconfig.json +3 -3
- package/pkg/init +12 -0
package/app/files/.eslintignore
CHANGED
package/app/files/tsconfig.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"esModuleInterop": true,
|
|
12
12
|
"allowJs": true,
|
|
13
|
-
"sourceMap":
|
|
13
|
+
"sourceMap": false,
|
|
14
14
|
"strict": true,
|
|
15
15
|
"noEmit": true,
|
|
16
16
|
"baseUrl": ".",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typeRoots": [
|
|
29
29
|
"./node_modules",
|
|
30
30
|
"./node_modules/@rancher/shell/types"
|
|
31
|
-
],
|
|
31
|
+
],
|
|
32
32
|
"types": [
|
|
33
33
|
"@types/node",
|
|
34
34
|
"cypress",
|
package/app/init
CHANGED
|
@@ -37,7 +37,6 @@ if (args.length === 3) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
let addGitlabWorkflow = false;
|
|
40
|
-
let addWorkflowFolder = true;
|
|
41
40
|
|
|
42
41
|
// Check for Gitlab integration option
|
|
43
42
|
if ( args.length >= 3 ) {
|
|
@@ -48,10 +47,6 @@ if ( args.length >= 3 ) {
|
|
|
48
47
|
case '-l':
|
|
49
48
|
addGitlabWorkflow = true;
|
|
50
49
|
break;
|
|
51
|
-
case '--skip-workflow':
|
|
52
|
-
case '-w':
|
|
53
|
-
addWorkflowFolder = false;
|
|
54
|
-
break;
|
|
55
50
|
default:
|
|
56
51
|
break;
|
|
57
52
|
}
|
|
@@ -62,6 +57,8 @@ if ( addGitlabWorkflow ) {
|
|
|
62
57
|
files.push('.gitlab-ci.yml');
|
|
63
58
|
}
|
|
64
59
|
|
|
60
|
+
// Check that there is a package file
|
|
61
|
+
|
|
65
62
|
let setName = false;
|
|
66
63
|
|
|
67
64
|
if (!fs.existsSync(path.join(appFolder, './package.json'))) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rancher/create-extension",
|
|
3
3
|
"description": "Rancher UI Extension generator",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.1-rc.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SUSE",
|
|
7
7
|
"packageManager": "yarn@4.4.1",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"core-js": "3.21.1",
|
|
23
23
|
"css-loader": "6.7.3",
|
|
24
24
|
"@types/lodash": "4.14.184",
|
|
25
|
-
"@rancher/components": "0.1.
|
|
25
|
+
"@rancher/components": "0.2.1-alpha.0"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/pkg/files/tsconfig.json
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"esModuleInterop": true,
|
|
12
12
|
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"sourceMap":
|
|
13
|
+
"sourceMap": false,
|
|
14
14
|
"baseUrl": ".",
|
|
15
15
|
"preserveSymlinks": true,
|
|
16
16
|
"typeRoots": [
|
|
17
17
|
"../../node_modules",
|
|
18
18
|
"../../node_modules/@rancher/shell/types"
|
|
19
|
-
],
|
|
19
|
+
],
|
|
20
20
|
"types": [
|
|
21
21
|
"node",
|
|
22
22
|
"webpack-env",
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
"exclude": [
|
|
51
51
|
"../../node_modules"
|
|
52
52
|
]
|
|
53
|
-
}
|
|
53
|
+
}
|
package/pkg/init
CHANGED
|
@@ -31,6 +31,8 @@ const typeFolders = [
|
|
|
31
31
|
'detail'
|
|
32
32
|
];
|
|
33
33
|
|
|
34
|
+
const shellPkgPath = 'node_modules/@rancher/shell';
|
|
35
|
+
|
|
34
36
|
console.log('');
|
|
35
37
|
console.log('Creating Skeleton UI Package');
|
|
36
38
|
|
|
@@ -47,6 +49,7 @@ let shellVersion = '';
|
|
|
47
49
|
|
|
48
50
|
let addTypeFolders = false;
|
|
49
51
|
let addWorkflowFolder = false;
|
|
52
|
+
let ignoreShellPkgPathCheck = false;
|
|
50
53
|
|
|
51
54
|
if ( args.length >= 3 ) {
|
|
52
55
|
shellVersion = args[3];
|
|
@@ -59,12 +62,21 @@ if ( args.length >= 3 ) {
|
|
|
59
62
|
case '-w':
|
|
60
63
|
addWorkflowFolder = true;
|
|
61
64
|
break;
|
|
65
|
+
case '-i':
|
|
66
|
+
ignoreShellPkgPathCheck = true;
|
|
67
|
+
break;
|
|
62
68
|
default:
|
|
63
69
|
break;
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
if (!ignoreShellPkgPathCheck && !fs.existsSync(path.join(pkgFolder, `../../${ shellPkgPath }/package.json`))) {
|
|
75
|
+
console.log('');
|
|
76
|
+
console.log('@rancher/shell not found in node_modules! Please do "yarn install" and make sure you run this command from the base folder of your app');
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
|
|
68
80
|
const isNodeModulesShell = !fs.existsSync(path.join(folder, 'shell'));
|
|
69
81
|
|
|
70
82
|
if (!isNodeModulesShell) {
|