@grafana/create-plugin 7.7.0 → 7.8.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 +341 -316
- package/package.json +5 -6
- package/templates/backend/go.mod +7 -7
- package/templates/backend-app/go.mod +7 -7
- package/templates/common/.claude/skills/build-plugin/SKILL.md +1 -1
- package/templates/common/.claude/skills/validate-plugin/SKILL.md +1 -1
- package/templates/common/.codex/skills/build-plugin/SKILL.md +1 -1
- package/templates/common/.codex/skills/validate-plugin/SKILL.md +1 -1
- package/templates/common/.config/docker-compose-base.yaml +1 -1
- package/templates/common/_package.json +6 -6
- package/templates/github/workflows/ci.yml +5 -5
- package/templates/github/workflows/is-compatible.yml +2 -2
- package/vitest.config.ts +6 -2
- package/templates/backend/.vscode/launch.json +0 -33
- package/templates/backend-app/.vscode/launch.json +0 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"jsonc-parser": "3.3.1",
|
|
38
38
|
"minimist": "1.2.8",
|
|
39
39
|
"recast": "0.23.11",
|
|
40
|
-
"semver": "7.
|
|
40
|
+
"semver": "7.8.2",
|
|
41
41
|
"title-case": "4.3.2",
|
|
42
|
-
"valibot": "1.
|
|
42
|
+
"valibot": "1.4.1",
|
|
43
43
|
"which": "6.0.1",
|
|
44
44
|
"yaml": "2.9.0"
|
|
45
45
|
},
|
|
@@ -51,10 +51,9 @@
|
|
|
51
51
|
"@types/semver": "7.7.1",
|
|
52
52
|
"@types/tmp": "0.2.6",
|
|
53
53
|
"@types/which": "3.0.4",
|
|
54
|
-
"tmp": "0.2.
|
|
54
|
+
"tmp": "0.2.6"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20"
|
|
58
|
-
}
|
|
59
|
-
"gitHead": "57e7611bcbbd068694bda70df57fa86008dd3353"
|
|
58
|
+
}
|
|
60
59
|
}
|
package/templates/backend/go.mod
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
go 1.
|
|
4
|
+
go 1.26.3
|
|
5
5
|
|
|
6
6
|
require github.com/grafana/grafana-plugin-sdk-go v0.285.0
|
|
7
7
|
|
|
@@ -72,13 +72,13 @@ require (
|
|
|
72
72
|
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
|
|
73
73
|
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
|
74
74
|
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect
|
|
75
|
-
golang.org/x/mod v0.
|
|
76
|
-
golang.org/x/net v0.
|
|
77
|
-
golang.org/x/sync v0.
|
|
78
|
-
golang.org/x/sys v0.
|
|
75
|
+
golang.org/x/mod v0.35.0 // indirect
|
|
76
|
+
golang.org/x/net v0.55.0 // indirect
|
|
77
|
+
golang.org/x/sync v0.20.0 // indirect
|
|
78
|
+
golang.org/x/sys v0.45.0 // indirect
|
|
79
79
|
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
|
|
80
|
-
golang.org/x/text v0.
|
|
81
|
-
golang.org/x/tools v0.
|
|
80
|
+
golang.org/x/text v0.37.0 // indirect
|
|
81
|
+
golang.org/x/tools v0.44.0 // indirect
|
|
82
82
|
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
|
|
83
83
|
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79 // indirect
|
|
84
84
|
google.golang.org/grpc v1.78.0 // indirect
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
go 1.
|
|
4
|
+
go 1.26.3
|
|
5
5
|
|
|
6
6
|
require github.com/grafana/grafana-plugin-sdk-go v0.285.0
|
|
7
7
|
|
|
@@ -72,13 +72,13 @@ require (
|
|
|
72
72
|
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
|
|
73
73
|
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
|
74
74
|
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect
|
|
75
|
-
golang.org/x/mod v0.
|
|
76
|
-
golang.org/x/net v0.
|
|
77
|
-
golang.org/x/sync v0.
|
|
78
|
-
golang.org/x/sys v0.
|
|
75
|
+
golang.org/x/mod v0.35.0 // indirect
|
|
76
|
+
golang.org/x/net v0.55.0 // indirect
|
|
77
|
+
golang.org/x/sync v0.20.0 // indirect
|
|
78
|
+
golang.org/x/sys v0.45.0 // indirect
|
|
79
79
|
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
|
|
80
|
-
golang.org/x/text v0.
|
|
81
|
-
golang.org/x/tools v0.
|
|
80
|
+
golang.org/x/text v0.37.0 // indirect
|
|
81
|
+
golang.org/x/tools v0.44.0 // indirect
|
|
82
82
|
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
|
|
83
83
|
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79 // indirect
|
|
84
84
|
google.golang.org/grpc v1.78.0 // indirect
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@../../../.config/AGENTS/skills/build-plugin.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@../../../.config/AGENTS/skills/validate-plugin.md
|
|
@@ -7,7 +7,7 @@ services:
|
|
|
7
7
|
context: .
|
|
8
8
|
args:
|
|
9
9
|
grafana_image: ${GRAFANA_IMAGE:-{{~grafanaImage~}} }
|
|
10
|
-
grafana_version: ${GRAFANA_VERSION:-
|
|
10
|
+
grafana_version: ${GRAFANA_VERSION:-13.0.2}
|
|
11
11
|
development: ${DEVELOPMENT:-false}
|
|
12
12
|
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
|
|
13
13
|
ports:
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/ws": "^8.18.1",{{/if}}
|
|
37
37
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
38
38
|
"@typescript-eslint/parser": "^8.38.0",{{#unless useExperimentalRspack}}
|
|
39
|
-
"copy-webpack-plugin": "^
|
|
39
|
+
"copy-webpack-plugin": "^14.0.0",{{/unless}}
|
|
40
40
|
"css-loader": "^7.1.0",
|
|
41
41
|
"eslint": "^9.32.0",
|
|
42
42
|
"eslint-config-prettier": "^10.1.0",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@emotion/css": "11.10.6",
|
|
77
|
-
"@grafana/data": "
|
|
78
|
-
"@grafana/i18n": "
|
|
79
|
-
"@grafana/runtime": "
|
|
80
|
-
"@grafana/ui": "
|
|
81
|
-
"@grafana/schema": "
|
|
77
|
+
"@grafana/data": "13.0.2",
|
|
78
|
+
"@grafana/i18n": "13.0.2",
|
|
79
|
+
"@grafana/runtime": "13.0.2",
|
|
80
|
+
"@grafana/ui": "13.0.2",
|
|
81
|
+
"@grafana/schema": "13.0.2",{{#if_eq pluginType "scenesapp" }}
|
|
82
82
|
"@grafana/scenes": "{{ scenesVersion }}",{{/if_eq}}
|
|
83
83
|
"react": "^18.3.0",
|
|
84
84
|
"react-dom": "^18.3.0"{{#if isAppType}},
|
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
{{#if_eq packageManagerName "pnpm"}}
|
|
33
33
|
# pnpm action uses the packageManager field in package.json to
|
|
34
34
|
# understand which version to install.
|
|
35
|
-
- uses: pnpm/action-setup@
|
|
35
|
+
- uses: pnpm/action-setup@v6
|
|
36
36
|
{{/if_eq}}
|
|
37
37
|
- name: Setup Node.js environment
|
|
38
38
|
uses: actions/setup-node@v6
|
|
@@ -68,21 +68,21 @@ jobs:
|
|
|
68
68
|
|
|
69
69
|
- name: Lint backend
|
|
70
70
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
71
|
-
uses: golangci/golangci-lint-action@
|
|
71
|
+
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1
|
|
72
72
|
with:
|
|
73
73
|
version: latest
|
|
74
74
|
args: ./...
|
|
75
75
|
|
|
76
76
|
- name: Build backend
|
|
77
77
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
78
|
-
uses: magefile/mage-action@
|
|
78
|
+
uses: magefile/mage-action@a662bd8c29d8106879588cfff83b2faf6e6f59db # v4.0.0
|
|
79
79
|
with:
|
|
80
80
|
version: latest
|
|
81
81
|
args: buildAll
|
|
82
82
|
|
|
83
83
|
- name: Test backend
|
|
84
84
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
85
|
-
uses: magefile/mage-action@
|
|
85
|
+
uses: magefile/mage-action@a662bd8c29d8106879588cfff83b2faf6e6f59db # v4.0.0
|
|
86
86
|
with:
|
|
87
87
|
version: latest
|
|
88
88
|
args: test
|
|
@@ -182,7 +182,7 @@ jobs:
|
|
|
182
182
|
{{#if_eq packageManagerName "pnpm"}}
|
|
183
183
|
# pnpm action uses the packageManager field in package.json to
|
|
184
184
|
# understand which version to install.
|
|
185
|
-
- uses: pnpm/action-setup@
|
|
185
|
+
- uses: pnpm/action-setup@v6
|
|
186
186
|
{{/if_eq}}
|
|
187
187
|
- name: Setup Node.js environment
|
|
188
188
|
uses: actions/setup-node@v6
|
|
@@ -14,11 +14,11 @@ jobs:
|
|
|
14
14
|
{{#if_eq packageManagerName "pnpm"}}
|
|
15
15
|
# pnpm action uses the packageManager field in package.json to
|
|
16
16
|
# understand which version to install.
|
|
17
|
-
- uses: pnpm/action-setup@
|
|
17
|
+
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
18
18
|
{{/if_eq}}
|
|
19
19
|
|
|
20
20
|
- name: Setup Node.js environment
|
|
21
|
-
uses: actions/setup-node@
|
|
21
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
22
22
|
with:
|
|
23
23
|
node-version: '22'
|
|
24
24
|
cache: '{{ packageManagerName }}'
|
package/vitest.config.ts
CHANGED
|
@@ -10,8 +10,7 @@ export default mergeConfig(
|
|
|
10
10
|
setupFiles: ['./vitest.setup.ts'],
|
|
11
11
|
},
|
|
12
12
|
plugins: [
|
|
13
|
-
//
|
|
14
|
-
// https://vitest.dev/guide/mocking/modules.html#mocking-non-existing-module
|
|
13
|
+
// Convince Vitest the mocked virtual migrations exist (vitest 4.1+ needs both resolveId and load for dynamic bare-specifier imports).
|
|
15
14
|
{
|
|
16
15
|
name: 'virtual-migrations',
|
|
17
16
|
resolveId(id) {
|
|
@@ -19,6 +18,11 @@ export default mergeConfig(
|
|
|
19
18
|
return id;
|
|
20
19
|
}
|
|
21
20
|
},
|
|
21
|
+
load(id) {
|
|
22
|
+
if (id === 'virtual-test-migration.js' || id === 'virtual-test-migration2.js') {
|
|
23
|
+
return 'export default () => {};';
|
|
24
|
+
}
|
|
25
|
+
},
|
|
22
26
|
},
|
|
23
27
|
],
|
|
24
28
|
})
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"name": "Standalone debug mode",
|
|
6
|
-
"type": "go",
|
|
7
|
-
"request": "launch",
|
|
8
|
-
"mode": "debug",
|
|
9
|
-
"program": "${workspaceFolder}/pkg",
|
|
10
|
-
"env": {},
|
|
11
|
-
"args": [
|
|
12
|
-
"-standalone"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "Attach to plugin backend in docker",
|
|
17
|
-
"type": "go",
|
|
18
|
-
"request": "attach",
|
|
19
|
-
"mode": "remote",
|
|
20
|
-
"port": 2345,
|
|
21
|
-
"host": "127.0.0.1",
|
|
22
|
-
"showLog": true,
|
|
23
|
-
"trace": "log",
|
|
24
|
-
"logOutput": "rpc",
|
|
25
|
-
"substitutePath": [
|
|
26
|
-
{
|
|
27
|
-
"from": "${workspaceFolder}",
|
|
28
|
-
"to": "/root/{{ pluginId }}"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"name": "Standalone debug mode",
|
|
6
|
-
"type": "go",
|
|
7
|
-
"request": "launch",
|
|
8
|
-
"mode": "debug",
|
|
9
|
-
"program": "${workspaceFolder}/pkg",
|
|
10
|
-
"env": {},
|
|
11
|
-
"args": [
|
|
12
|
-
"-standalone"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "Attach to plugin backend in docker",
|
|
17
|
-
"type": "go",
|
|
18
|
-
"request": "attach",
|
|
19
|
-
"mode": "remote",
|
|
20
|
-
"port": 2345,
|
|
21
|
-
"host": "127.0.0.1",
|
|
22
|
-
"showLog": true,
|
|
23
|
-
"trace": "log",
|
|
24
|
-
"logOutput": "rpc",
|
|
25
|
-
"substitutePath": [
|
|
26
|
-
{
|
|
27
|
-
"from": "${workspaceFolder}",
|
|
28
|
-
"to": "/root/{{ pluginId }}"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|