@rancher/create-extension 1.0.2 → 2.0.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.
@@ -7,12 +7,10 @@ node_modules/
7
7
  .env
8
8
  .cache
9
9
  .next
10
- .nuxt
11
10
  dist
12
11
  dist-pkg
13
12
  .DS_Store
14
13
  dynamic-importer.js
15
14
  ksconfig.json
16
- nuxt.config.js
17
15
  shell/utils/dynamic-importer.js
18
16
  shell/assets/fonts
@@ -2,12 +2,8 @@ name: Build and Release Extension Catalog
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
5
- push:
6
- branches:
7
- - main
8
- pull_request:
9
- branches:
10
- - main
5
+ release:
6
+ types: [released]
11
7
 
12
8
  defaults:
13
9
  run:
@@ -12,7 +12,7 @@ defaults:
12
12
 
13
13
  jobs:
14
14
  build-extension-charts:
15
- uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@release-2.8
15
+ uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@release-2.9
16
16
  permissions:
17
17
  actions: write
18
18
  contents: write
@@ -8,7 +8,6 @@
8
8
  ".eslintignore": true,
9
9
  ".eslintrc.js": true,
10
10
  ".gitignore": true,
11
- ".nuxt*": true,
12
11
  ".nyc_output": true,
13
12
  ".vscode": true,
14
13
  "LICENSE": true,
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "esModuleInterop": true,
12
12
  "allowJs": true,
13
- "sourceMap": true,
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": "1.0.2",
4
+ "version": "2.0.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.3"
25
+ "@rancher/components": "0.2.1-alpha.0"
26
26
  }
27
27
  }
@@ -10,13 +10,13 @@
10
10
  "skipLibCheck": true,
11
11
  "esModuleInterop": true,
12
12
  "allowSyntheticDefaultImports": true,
13
- "sourceMap": true,
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) {
package/pkg/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "rancher": {
14
14
  "annotations": {
15
- "catalog.cattle.io/rancher-version": "< 2.9.0",
15
+ "catalog.cattle.io/rancher-version": ">= 2.9.0 < 2.10.0",
16
16
  "catalog.cattle.io/ui-extensions-version": "< 3.0.0"
17
17
  }
18
18
  },