@grafana/create-plugin 5.5.4-canary.1201.c562de9.0 → 5.6.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 +26 -0
- package/dist/utils/utils.templates.js +2 -3
- package/package.json +3 -5
- package/src/utils/utils.templates.ts +2 -3
- package/templates/backend/go.mod +1 -1
- package/templates/backend-app/go.mod +1 -1
- package/templates/github/workflows/ci.yml +3 -8
- package/templates/github/workflows/cp-update.yml +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# v5.6.0 (Fri Oct 18 2024)
|
|
2
|
+
|
|
3
|
+
:tada: This release contains work from a new contributor! :tada:
|
|
4
|
+
|
|
5
|
+
Thank you, Syerikjan Kh ([@s4kh](https://github.com/s4kh)), for all your work!
|
|
6
|
+
|
|
7
|
+
#### 🚀 Enhancement
|
|
8
|
+
|
|
9
|
+
- Create Plugin: Introduce create plugin update workflow [#1211](https://github.com/grafana/plugin-tools/pull/1211) ([@jackw](https://github.com/jackw))
|
|
10
|
+
- chore: bump go version to 1.22 [#1212](https://github.com/grafana/plugin-tools/pull/1212) ([@s4kh](https://github.com/s4kh))
|
|
11
|
+
|
|
12
|
+
#### 🐛 Bug Fix
|
|
13
|
+
|
|
14
|
+
- Update dependency @types/which to v3 [#1193](https://github.com/grafana/plugin-tools/pull/1193) ([@renovate[bot]](https://github.com/renovate[bot]))
|
|
15
|
+
- Create Plugin: Remove mkdirp package [#1210](https://github.com/grafana/plugin-tools/pull/1210) ([@jackw](https://github.com/jackw))
|
|
16
|
+
- Update dependency @types/mkdirp to v2 [#1192](https://github.com/grafana/plugin-tools/pull/1192) ([@renovate[bot]](https://github.com/renovate[bot]))
|
|
17
|
+
- Update dependency @grafana/scenes to v5.19.1 [#1189](https://github.com/grafana/plugin-tools/pull/1189) ([@renovate[bot]](https://github.com/renovate[bot]))
|
|
18
|
+
|
|
19
|
+
#### Authors: 3
|
|
20
|
+
|
|
21
|
+
- [@renovate[bot]](https://github.com/renovate[bot])
|
|
22
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
23
|
+
- Syerikjan Kh ([@s4kh](https://github.com/s4kh))
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
1
27
|
# v5.5.3 (Wed Oct 09 2024)
|
|
2
28
|
|
|
3
29
|
#### 🐛 Bug Fix
|
|
@@ -2,7 +2,6 @@ import { lt as semverLt } from 'semver';
|
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import fs from 'node:fs';
|
|
5
|
-
import { mkdirp } from 'mkdirp';
|
|
6
5
|
import createDebug from 'debug';
|
|
7
6
|
import { filterOutCommonFiles, isFile, isFileStartingWith } from './utils.files.js';
|
|
8
7
|
import { normalizeId, renderHandlebarsTemplate } from './utils.handlebars.js';
|
|
@@ -39,7 +38,7 @@ export function compileSingleTemplateFile(pluginType, templateFile, data) {
|
|
|
39
38
|
const rendered = renderTemplateFromFile(templateFile, data);
|
|
40
39
|
const relativeExportPath = templateFile.replace(TEMPLATE_PATHS.common, '').replace(TEMPLATE_PATHS[pluginType], '');
|
|
41
40
|
const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
|
|
42
|
-
|
|
41
|
+
fs.mkdirSync(path.dirname(exportPath), { recursive: true });
|
|
43
42
|
fs.writeFileSync(exportPath, rendered);
|
|
44
43
|
}
|
|
45
44
|
export function compileProvisioningTemplateFile(pluginType, templateFile, data) {
|
|
@@ -49,7 +48,7 @@ export function compileProvisioningTemplateFile(pluginType, templateFile, data)
|
|
|
49
48
|
const rendered = renderTemplateFromFile(templateFile, data);
|
|
50
49
|
const relativeExportPath = templateFile.replace(TEMPLATE_PATHS[pluginType], '.');
|
|
51
50
|
const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
|
|
52
|
-
|
|
51
|
+
fs.mkdirSync(path.dirname(exportPath), { recursive: true });
|
|
53
52
|
fs.writeFileSync(exportPath, rendered);
|
|
54
53
|
}
|
|
55
54
|
export function renderTemplateFromFile(templateFile, data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/marked-terminal": "^6.0.1",
|
|
45
45
|
"@types/minimist": "^1.2.2",
|
|
46
|
-
"@types/mkdirp": "^1.0.2",
|
|
47
46
|
"@types/semver": "^7.3.9",
|
|
48
|
-
"@types/which": "^
|
|
47
|
+
"@types/which": "^3.0.0",
|
|
49
48
|
"boxen": "^7.1.1",
|
|
50
49
|
"chalk": "^5.3.0",
|
|
51
50
|
"change-case": "^5.4.0",
|
|
@@ -57,7 +56,6 @@
|
|
|
57
56
|
"marked": "^10.0.0",
|
|
58
57
|
"marked-terminal": "^7.0.0",
|
|
59
58
|
"minimist": "^1.2.8",
|
|
60
|
-
"mkdirp": "^3.0.1",
|
|
61
59
|
"semver": "^7.3.5",
|
|
62
60
|
"title-case": "^4.3.0",
|
|
63
61
|
"which": "^4.0.0"
|
|
@@ -88,5 +86,5 @@
|
|
|
88
86
|
"engines": {
|
|
89
87
|
"node": ">=20"
|
|
90
88
|
},
|
|
91
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "6e147dcb3af44550009cad0be302b319899c9d51"
|
|
92
90
|
}
|
|
@@ -2,7 +2,6 @@ import { lt as semverLt } from 'semver';
|
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import fs from 'node:fs';
|
|
5
|
-
import { mkdirp } from 'mkdirp';
|
|
6
5
|
import createDebug from 'debug';
|
|
7
6
|
import { filterOutCommonFiles, isFile, isFileStartingWith } from './utils.files.js';
|
|
8
7
|
import { normalizeId, renderHandlebarsTemplate } from './utils.handlebars.js';
|
|
@@ -72,7 +71,7 @@ export function compileSingleTemplateFile(pluginType: string, templateFile: stri
|
|
|
72
71
|
const relativeExportPath = templateFile.replace(TEMPLATE_PATHS.common, '').replace(TEMPLATE_PATHS[pluginType], '');
|
|
73
72
|
const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
fs.mkdirSync(path.dirname(exportPath), { recursive: true });
|
|
76
75
|
fs.writeFileSync(exportPath, rendered);
|
|
77
76
|
}
|
|
78
77
|
|
|
@@ -85,7 +84,7 @@ export function compileProvisioningTemplateFile(pluginType: string, templateFile
|
|
|
85
84
|
const relativeExportPath = templateFile.replace(TEMPLATE_PATHS[pluginType], '.');
|
|
86
85
|
const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
fs.mkdirSync(path.dirname(exportPath), { recursive: true });
|
|
89
88
|
fs.writeFileSync(exportPath, rendered);
|
|
90
89
|
}
|
|
91
90
|
|
package/templates/backend/go.mod
CHANGED
|
@@ -61,7 +61,7 @@ jobs:
|
|
|
61
61
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
62
62
|
uses: actions/setup-go@v5
|
|
63
63
|
with:
|
|
64
|
-
go-version: '1.
|
|
64
|
+
go-version: '1.22'
|
|
65
65
|
|
|
66
66
|
- name: Test backend
|
|
67
67
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
@@ -172,13 +172,8 @@ jobs:
|
|
|
172
172
|
docker compose pull
|
|
173
173
|
DEVELOPMENT=false GRAFANA_VERSION=$\{{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=$\{{ matrix.GRAFANA_IMAGE.NAME }} docker compose up -d
|
|
174
174
|
|
|
175
|
-
- name: Wait for
|
|
176
|
-
uses:
|
|
177
|
-
with:
|
|
178
|
-
url: 'http://localhost:3000/'
|
|
179
|
-
responseCode: 200
|
|
180
|
-
timeout: 60000
|
|
181
|
-
interval: 500
|
|
175
|
+
- name: Wait for grafana server
|
|
176
|
+
uses: grafana/plugin-actions/wait-for-grafana@main
|
|
182
177
|
|
|
183
178
|
- name: Install Playwright Browsers
|
|
184
179
|
run: {{ packageManagerName }} exec playwright install chromium --with-deps
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Create Plugin Update
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '0 0 1 * *' # run once a month on the 1st day
|
|
7
|
+
|
|
8
|
+
# To use the default github token with the following elevated permissions make sure to check:
|
|
9
|
+
# **Allow GitHub Actions to create and approve pull requests** in https://github.com/ORG_NAME/REPO_NAME/settings/actions.
|
|
10
|
+
# Alternatively create a fine-grained personal access token for your repository with
|
|
11
|
+
# `contents: read and write` and `pull requests: read and write` and pass it to the action.
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
pull-requests: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: grafana/plugin-actions/create-plugin-update@main
|
|
22
|
+
# Uncomment to use a fine-grained personal access token instead of default github token
|
|
23
|
+
# (For more info on how to generate the token see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
|
|
24
|
+
# with:
|
|
25
|
+
# Make sure to save the token in your repository secrets
|
|
26
|
+
# token: ${{ secrets.GH_PAT_TOKEN }}
|