@grafana/create-plugin 1.4.0-canary.246.a1ec25e.0 → 1.4.0
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/CHANGELOG.md +61 -0
- package/README.md +11 -11
- package/dist/constants.js +1 -1
- package/package.json +2 -2
- package/src/constants.ts +1 -1
- package/templates/app/src/components/AppConfig/AppConfig.tsx +1 -1
- package/templates/common/.config/webpack/webpack.config.ts +1 -1
- package/templates/common/package.json +21 -21
- package/templates/github/ci/.github/workflows/ci.yml +29 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
# v1.4.0 (Tue May 23 2023)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- Create Plugin: App plugins with Top Nav support [#246](https://github.com/grafana/plugin-tools/pull/246) ([@jackw](https://github.com/jackw))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v1.3.3 (Fri May 19 2023)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- create-plugin: updates for ci workflow [#242](https://github.com/grafana/plugin-tools/pull/242) ([@briangann](https://github.com/briangann))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Brian Gann ([@briangann](https://github.com/briangann))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# v1.3.2 (Thu May 18 2023)
|
|
26
|
+
|
|
27
|
+
#### 🐛 Bug Fix
|
|
28
|
+
|
|
29
|
+
- Chore: Update dev-dependencies [#232](https://github.com/grafana/plugin-tools/pull/232) ([@leventebalogh](https://github.com/leventebalogh) [@jackw](https://github.com/jackw))
|
|
30
|
+
- Fix fonts not loaded correctly on generated bundles [#251](https://github.com/grafana/plugin-tools/pull/251) ([@academo](https://github.com/academo))
|
|
31
|
+
|
|
32
|
+
#### 📝 Documentation
|
|
33
|
+
|
|
34
|
+
- Create Plugin: Update readme for supported package managers [#244](https://github.com/grafana/plugin-tools/pull/244) ([@jackw](https://github.com/jackw))
|
|
35
|
+
|
|
36
|
+
#### Authors: 3
|
|
37
|
+
|
|
38
|
+
- Esteban Beltran ([@academo](https://github.com/academo))
|
|
39
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
40
|
+
- Levente Balogh ([@leventebalogh](https://github.com/leventebalogh))
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# v1.3.1 (Mon May 15 2023)
|
|
45
|
+
|
|
46
|
+
#### 🐛 Bug Fix
|
|
47
|
+
|
|
48
|
+
- Create Plugin: Fix react types errors [#238](https://github.com/grafana/plugin-tools/pull/238) ([@jackw](https://github.com/jackw))
|
|
49
|
+
- chore: update grafanaDependency for datasources [#247](https://github.com/grafana/plugin-tools/pull/247) ([@sympatheticmoose](https://github.com/sympatheticmoose))
|
|
50
|
+
|
|
51
|
+
#### 📝 Documentation
|
|
52
|
+
|
|
53
|
+
- docs: readme update for windows [#240](https://github.com/grafana/plugin-tools/pull/240) ([@sympatheticmoose](https://github.com/sympatheticmoose))
|
|
54
|
+
|
|
55
|
+
#### Authors: 2
|
|
56
|
+
|
|
57
|
+
- David Harris ([@sympatheticmoose](https://github.com/sympatheticmoose))
|
|
58
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
1
62
|
# v1.3.0 (Fri Apr 28 2023)
|
|
2
63
|
|
|
3
64
|
#### 🚀 Enhancement
|
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ Create Grafana plugins with ease.
|
|
|
7
7
|
- [Grafana / Create Plugin](#grafana--create-plugin)
|
|
8
8
|
- [Create a new plugin](#create-a-new-plugin)
|
|
9
9
|
- [Quick overview](#quick-overview)
|
|
10
|
-
- [`yarn` (1.x)](#yarn-1x)
|
|
11
|
-
- [`yarn` (\> 2.x)](#yarn--2x)
|
|
12
10
|
- [`npx`](#npx)
|
|
13
11
|
- [`npm`](#npm)
|
|
12
|
+
- [`pnpm`](#pnpm)
|
|
13
|
+
- [`yarn` (1.x)](#yarn-1x)
|
|
14
14
|
- [Migrate your existing plugin](#migrate-your-existing-plugin)
|
|
15
15
|
- [Update your plugin build config](#update-your-plugin-build-config)
|
|
16
16
|
- [Customizing or extending the basic configs](#customizing-or-extending-the-basic-configs)
|
|
@@ -32,30 +32,30 @@ If you have questions or need help, please ask in [GitHub Discussions](https://g
|
|
|
32
32
|
|
|
33
33
|
Run the command in the folder where you want to store your plugins. The new plugin will be scaffolded in a sub-directory of the folder where you run the command.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Create Plugin can be used with NPM, PNPM or Yarn 1. The plugin will be scaffolded to use your preferred package manager. Run the command with the package manager of your choice:
|
|
36
36
|
|
|
37
|
-
#### [`
|
|
37
|
+
#### [`npx`](https://github.com/npm/npx)
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
|
|
40
|
+
npx @grafana/create-plugin@latest
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
#### [`
|
|
43
|
+
#### [`npm`](https://docs.npmjs.com/cli/v7/commands/npm-init)
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
npm init @grafana/plugin
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
#### [`
|
|
49
|
+
#### [`pnpm`](https://pnpm.io/cli/dlx)
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
|
|
52
|
+
pnpm dlx @grafana/create-plugin@latest
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
#### [`
|
|
55
|
+
#### [`yarn`](https://classic.yarnpkg.com/blog/2017/05/12/introducing-yarn/) (1.x)
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
|
|
58
|
+
yarn create @grafana/plugin
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
---
|
package/dist/constants.js
CHANGED
|
@@ -30,7 +30,7 @@ var PLUGIN_TYPES;
|
|
|
30
30
|
PLUGIN_TYPES["secretsmanager"] = "secretsmanager";
|
|
31
31
|
})(PLUGIN_TYPES = exports.PLUGIN_TYPES || (exports.PLUGIN_TYPES = {}));
|
|
32
32
|
exports.EXTRA_TEMPLATE_VARIABLES = {
|
|
33
|
-
grafanaVersion: '9.5.
|
|
33
|
+
grafanaVersion: '9.5.2'
|
|
34
34
|
};
|
|
35
35
|
exports.GRAFANA_FE_PACKAGES = [
|
|
36
36
|
'@grafana/data',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "1.4.0
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=16"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bd765873e928d1c305627e3b7224f3408db42863"
|
|
68
68
|
}
|
package/src/constants.ts
CHANGED
|
@@ -38,7 +38,7 @@ export enum PLUGIN_TYPES {
|
|
|
38
38
|
// and will be available to use in the templates.
|
|
39
39
|
// Example: "@grafana/ui": "{{ grafanaVersion }}"
|
|
40
40
|
export const EXTRA_TEMPLATE_VARIABLES = {
|
|
41
|
-
grafanaVersion: '9.5.
|
|
41
|
+
grafanaVersion: '9.5.2',
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export const GRAFANA_FE_PACKAGES = [
|
|
@@ -117,7 +117,7 @@ const config = async (env): Promise<Configuration> => ({
|
|
|
117
117
|
type: 'asset/resource',
|
|
118
118
|
generator: {
|
|
119
119
|
// Keep publicPath relative for host.com/grafana/ deployments
|
|
120
|
-
publicPath: `public/plugins/${pluginJson.id}/fonts
|
|
120
|
+
publicPath: `public/plugins/${pluginJson.id}/fonts/`,
|
|
121
121
|
outputPath: 'fonts/',
|
|
122
122
|
filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]',
|
|
123
123
|
},
|
|
@@ -18,39 +18,39 @@
|
|
|
18
18
|
"author": "{{ sentenceCase orgName }}",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@babel/core": "^7.
|
|
21
|
+
"@babel/core": "^7.21.4",
|
|
22
22
|
"@grafana/e2e": "{{ grafanaVersion }}",
|
|
23
23
|
"@grafana/e2e-selectors": "{{ grafanaVersion }}",
|
|
24
24
|
"@grafana/eslint-config": "^5.1.0",
|
|
25
25
|
"@grafana/tsconfig": "^1.2.0-rc1",
|
|
26
26
|
"@swc/core": "^1.3.51",
|
|
27
27
|
"@swc/helpers": "^0.5.0",
|
|
28
|
-
"@swc/jest": "^0.2.
|
|
29
|
-
"@testing-library/jest-dom": "^5.16.
|
|
28
|
+
"@swc/jest": "^0.2.26",
|
|
29
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
30
30
|
"@testing-library/react": "^12.1.4",
|
|
31
|
-
"@types/jest": "^29.
|
|
32
|
-
"@types/lodash": "^4.14.
|
|
33
|
-
"@types/node": "^18.11
|
|
31
|
+
"@types/jest": "^29.5.0",
|
|
32
|
+
"@types/lodash": "^4.14.194",
|
|
33
|
+
"@types/node": "^18.15.11",{{#if_eq pluginType "app"}}
|
|
34
34
|
"@types/react-router-dom": "^5.3.3",{{/if_eq}}
|
|
35
35
|
"copy-webpack-plugin": "^11.0.0",
|
|
36
|
-
"css-loader": "^6.7.
|
|
37
|
-
"eslint-webpack-plugin": "^
|
|
38
|
-
"fork-ts-checker-webpack-plugin": "^
|
|
39
|
-
"glob": "^10.
|
|
36
|
+
"css-loader": "^6.7.3",
|
|
37
|
+
"eslint-webpack-plugin": "^4.0.1",
|
|
38
|
+
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
39
|
+
"glob": "^10.1.0",
|
|
40
40
|
"identity-obj-proxy": "3.0.0",
|
|
41
|
-
"jest": "^29.
|
|
42
|
-
"jest-environment-jsdom": "^29.
|
|
43
|
-
"prettier": "^2.
|
|
41
|
+
"jest": "^29.5.0",
|
|
42
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
43
|
+
"prettier": "^2.8.7",
|
|
44
44
|
"replace-in-file-webpack-plugin": "^1.0.6",
|
|
45
|
-
"sass": "1.
|
|
46
|
-
"sass-loader": "13.2.
|
|
47
|
-
"style-loader": "3.3.
|
|
45
|
+
"sass": "1.62.1",
|
|
46
|
+
"sass-loader": "13.2.2",
|
|
47
|
+
"style-loader": "3.3.2",
|
|
48
48
|
"swc-loader": "^0.2.3",
|
|
49
|
-
"ts-node": "^10.
|
|
50
|
-
"tsconfig-paths": "^4.
|
|
51
|
-
"typescript": "
|
|
52
|
-
"webpack": "^5.
|
|
53
|
-
"webpack-cli": "^
|
|
49
|
+
"ts-node": "^10.9.1",
|
|
50
|
+
"tsconfig-paths": "^4.2.0",
|
|
51
|
+
"typescript": "4.8.4",
|
|
52
|
+
"webpack": "^5.79.0",
|
|
53
|
+
"webpack-cli": "^5.0.1",
|
|
54
54
|
"webpack-livereload-plugin": "^3.0.2"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
@@ -39,15 +39,6 @@ jobs:
|
|
|
39
39
|
- name: Build frontend
|
|
40
40
|
run: {{ packageManagerName }} run build
|
|
41
41
|
|
|
42
|
-
- name: Start grafana docker
|
|
43
|
-
run: docker-compose up -d
|
|
44
|
-
|
|
45
|
-
- name: Run e2e tests
|
|
46
|
-
run: {{ packageManagerName }} run e2e
|
|
47
|
-
|
|
48
|
-
- name: Stop grafana docker
|
|
49
|
-
run: docker-compose down
|
|
50
|
-
|
|
51
42
|
- name: Check for backend
|
|
52
43
|
id: check-for-backend
|
|
53
44
|
run: |
|
|
@@ -60,7 +51,7 @@ jobs:
|
|
|
60
51
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
61
52
|
uses: actions/setup-go@v3
|
|
62
53
|
with:
|
|
63
|
-
go-version: '1.
|
|
54
|
+
go-version: '1.20'
|
|
64
55
|
|
|
65
56
|
- name: Test backend
|
|
66
57
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
@@ -75,3 +66,31 @@ jobs:
|
|
|
75
66
|
with:
|
|
76
67
|
version: latest
|
|
77
68
|
args: buildAll
|
|
69
|
+
|
|
70
|
+
- name: Check for E2E
|
|
71
|
+
id: check-for-e2e
|
|
72
|
+
run: |
|
|
73
|
+
if [ -d "cypress" ]
|
|
74
|
+
then
|
|
75
|
+
echo "has-e2e=true" >> $GITHUB_OUTPUT
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
- name: Start grafana docker
|
|
79
|
+
if: steps.check-for-e2e.outputs.has-e2e == 'true'
|
|
80
|
+
run: docker-compose up -d
|
|
81
|
+
|
|
82
|
+
- name: Run e2e tests
|
|
83
|
+
if: steps.check-for-e2e.outputs.has-e2e == 'true'
|
|
84
|
+
run: {{ packageManagerName }} run e2e
|
|
85
|
+
|
|
86
|
+
- name: Stop grafana docker
|
|
87
|
+
if: steps.check-for-e2e.outputs.has-e2e == 'true'
|
|
88
|
+
run: docker-compose down
|
|
89
|
+
|
|
90
|
+
- name: Archive E2E output
|
|
91
|
+
uses: actions/upload-artifact@v3
|
|
92
|
+
if: steps.check-for-e2e.outputs.has-e2e == 'true' && steps.run-e2e-tests.outcome != 'success'
|
|
93
|
+
with:
|
|
94
|
+
name: cypress-videos
|
|
95
|
+
path: cypress/videos
|
|
96
|
+
retention-days: 5
|