Skip to content

Commit e8f1acb

Browse files
authored
Merge pull request #22 from HarperFast/update-grafana-create-plugin-5.26.9
chore: bump @grafana/create-plugin configuration to 5.26.9
2 parents 5ec7662 + 7bab520 commit e8f1acb

File tree

8 files changed

+76
-71
lines changed

8 files changed

+76
-71
lines changed

.config/.cprc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "5.26.0"
2+
"version": "5.26.9"
33
}

.config/bundler/externals.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import type { Configuration, ExternalItemFunctionData } from 'webpack';
2+
3+
type ExternalsType = Configuration['externals'];
4+
5+
export const externals: ExternalsType = [
6+
// Required for dynamic publicPath resolution
7+
{ 'amd-module': 'module' },
8+
'lodash',
9+
'jquery',
10+
'moment',
11+
'slate',
12+
'emotion',
13+
'@emotion/react',
14+
'@emotion/css',
15+
'prismjs',
16+
'slate-plain-serializer',
17+
'@grafana/slate-react',
18+
'react',
19+
'react-dom',
20+
'react-redux',
21+
'redux',
22+
'rxjs',
23+
'i18next',
24+
'react-router',
25+
'react-router-dom',
26+
'd3',
27+
'angular',
28+
/^@grafana\/ui/i,
29+
/^@grafana\/runtime/i,
30+
/^@grafana\/data/i,
31+
32+
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
33+
({ request }: ExternalItemFunctionData, callback: (error?: Error, result?: string) => void) => {
34+
const prefix = 'grafana/';
35+
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
36+
const stripPrefix = (request: string) => request.slice(prefix.length);
37+
38+
if (request && hasPrefix(request)) {
39+
return callback(undefined, stripPrefix(request));
40+
}
41+
42+
callback();
43+
},
44+
];

.config/docker-compose-base.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
services:
22
grafana:
33
user: root
4-
container_name: 'harper-datasource'
4+
container_name: 'harperdb-datasource'
55

66
build:
77
context: .
88
args:
99
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
10-
grafana_version: ${GRAFANA_VERSION:-12.1.1}
10+
grafana_version: ${GRAFANA_VERSION:-12.2.0}
1111
development: ${DEVELOPMENT:-false}
1212
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
1313
ports:
@@ -19,13 +19,13 @@ services:
1919
cap_add:
2020
- SYS_PTRACE
2121
volumes:
22-
- ../dist:/var/lib/grafana/plugins/harper-datasource
22+
- ../dist:/var/lib/grafana/plugins/harperdb-datasource
2323
- ../provisioning:/etc/grafana/provisioning
24-
- ..:/root/harper-datasource
24+
- ..:/root/harperdb-datasource
2525

2626
environment:
2727
NODE_ENV: development
28-
GF_LOG_FILTERS: plugin.harper-datasource:debug
28+
GF_LOG_FILTERS: plugin.harperdb-datasource:debug
2929
GF_LOG_LEVEL: debug
3030
GF_DATAPROXY_LOGGING: 1
31-
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: harper-datasource
31+
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: harperdb-datasource

.config/supervisord/supervisord.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ user=root
55
[program:grafana]
66
user=root
77
directory=/var/lib/grafana
8-
command=bash -c 'while [ ! -f /root/harper-datasource/dist/gpx_harper_datasource* ]; do sleep 1; done; /run.sh'
8+
command=bash -c 'while [ ! -f /root/harperdb-datasource/dist/gpx_harper_datasource* ]; do sleep 1; done; /run.sh'
99
stdout_logfile=/dev/fd/1
1010
stdout_logfile_maxbytes=0
1111
redirect_stderr=true
@@ -26,7 +26,7 @@ autorestart=true
2626

2727
[program:build-watcher]
2828
user=root
29-
command=/bin/bash -c 'while inotifywait -e modify,create,delete -r /var/lib/grafana/plugins/harper-datasource; do echo "Change detected, restarting delve...";supervisorctl restart delve; done'
29+
command=/bin/bash -c 'while inotifywait -e modify,create,delete -r /var/lib/grafana/plugins/harperdb-datasource; do echo "Change detected, restarting delve...";supervisorctl restart delve; done'
3030
stdout_logfile=/dev/fd/1
3131
stdout_logfile_maxbytes=0
3232
redirect_stderr=true
@@ -37,8 +37,8 @@ autostart=true
3737
[program:mage-watcher]
3838
user=root
3939
environment=PATH="/usr/local/go/bin:/root/go/bin:%(ENV_PATH)s"
40-
directory=/root/harper-datasource
41-
command=/bin/bash -c 'git config --global --add safe.directory /root/harper-datasource && mage -v watch'
40+
directory=/root/harperdb-datasource
41+
command=/bin/bash -c 'git config --global --add safe.directory /root/harperdb-datasource && mage -v watch'
4242
stdout_logfile=/dev/fd/1
4343
stdout_logfile_maxbytes=0
4444
redirect_stderr=true

.config/webpack/webpack.config.ts

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ import VirtualModulesPlugin from 'webpack-virtual-modules';
1919
import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin.ts';
2020
import { DIST_DIR, SOURCE_DIR } from './constants.ts';
2121
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils.ts';
22+
import { externals } from '../bundler/externals.ts';
2223

2324
const pluginJson = getPluginJson();
2425
const cpVersion = getCPConfigVersion();
26+
const pluginVersion = getPackageJson().version;
2527

2628
const virtualPublicPath = new VirtualModulesPlugin({
2729
'node_modules/grafana-public-path.js': `
@@ -54,45 +56,7 @@ const config = async (env: Env): Promise<Configuration> => {
5456

5557
entry: await getEntries(),
5658

57-
externals: [
58-
// Required for dynamic publicPath resolution
59-
{ 'amd-module': 'module' },
60-
'lodash',
61-
'jquery',
62-
'moment',
63-
'slate',
64-
'emotion',
65-
'@emotion/react',
66-
'@emotion/css',
67-
'prismjs',
68-
'slate-plain-serializer',
69-
'@grafana/slate-react',
70-
'react',
71-
'react-dom',
72-
'react-redux',
73-
'redux',
74-
'rxjs',
75-
'react-router',
76-
'react-router-dom',
77-
'd3',
78-
'angular',
79-
/^@grafana\/ui/i,
80-
/^@grafana\/runtime/i,
81-
/^@grafana\/data/i,
82-
83-
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
84-
({ request }, callback) => {
85-
const prefix = 'grafana/';
86-
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
87-
const stripPrefix = (request: string) => request.substr(prefix.length);
88-
89-
if (request && hasPrefix(request)) {
90-
return callback(undefined, stripPrefix(request));
91-
}
92-
93-
callback();
94-
},
95-
],
59+
externals,
9660

9761
// Support WebAssembly according to latest spec - makes WebAssembly module async
9862
experiments: {
@@ -196,7 +160,8 @@ const config = async (env: Env): Promise<Configuration> => {
196160
virtualPublicPath,
197161
// Insert create plugin version information into the bundle
198162
new webpack.BannerPlugin({
199-
banner: '/* [create-plugin] version: ' + cpVersion + ' */',
163+
banner: `/* [create-plugin] version: ${cpVersion} */
164+
/* [create-plugin] plugin: ${pluginJson.id}@${pluginVersion} */`,
200165
raw: true,
201166
entryOnly: true,
202167
}),
@@ -226,7 +191,7 @@ const config = async (env: Env): Promise<Configuration> => {
226191
rules: [
227192
{
228193
search: /\%VERSION\%/g,
229-
replace: getPackageJson().version,
194+
replace: pluginVersion,
230195
},
231196
{
232197
search: /\%TODAY\%/g,

go.sum

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
22
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
33
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
44
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
5-
github.com/HarperDB/sdk-go v0.0.0-20250616174745-e54bbebd5ba0 h1:OuuJ8JjYlINZrryK3Pp5/R4d7Prrkg+OAp/j2ot8ZBA=
6-
github.com/HarperDB/sdk-go v0.0.0-20250616174745-e54bbebd5ba0/go.mod h1:U3SVYLzsS1S4abhWeHQUde1Fyh6p3utrhe1R+jS24MQ=
7-
github.com/HarperDB/sdk-go v0.0.0-20250917210228-c77ae7103436 h1:c2NNB0tYzGXzznEtff/Is1WYCku+7fpFoUVGiIjXAuI=
8-
github.com/HarperDB/sdk-go v0.0.0-20250917210228-c77ae7103436/go.mod h1:U3SVYLzsS1S4abhWeHQUde1Fyh6p3utrhe1R+jS24MQ=
9-
github.com/HarperDB/sdk-go v0.0.0-20250917211014-dbe8317c04eb h1:n6k/NVHznSk5DUMXD29r7dpiVeovvb99BdneVfxNx9M=
10-
github.com/HarperDB/sdk-go v0.0.0-20250917211014-dbe8317c04eb/go.mod h1:U3SVYLzsS1S4abhWeHQUde1Fyh6p3utrhe1R+jS24MQ=
115
github.com/HarperDB/sdk-go v0.0.0-20250919160759-08caf0a5f108 h1:QgexisqRCNl7t1iAM8U7xZQ+Np1kT/inewVQqu5KT9w=
126
github.com/HarperDB/sdk-go v0.0.0-20250919160759-08caf0a5f108/go.mod h1:U3SVYLzsS1S4abhWeHQUde1Fyh6p3utrhe1R+jS24MQ=
137
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"license": "Apache-2.0",
1818
"devDependencies": {
1919
"@babel/core": "^7.21.4",
20-
"@grafana/eslint-config": "^8.0.0",
21-
"@grafana/plugin-e2e": "^2.1.9",
20+
"@grafana/eslint-config": "^8.2.0",
21+
"@grafana/plugin-e2e": "^2.1.13",
2222
"@grafana/tsconfig": "^2.0.0",
2323
"@playwright/test": "^1.52.0",
2424
"@stylistic/eslint-plugin-ts": "^2.9.0",
@@ -70,13 +70,14 @@
7070
},
7171
"dependencies": {
7272
"@emotion/css": "11.10.6",
73-
"@grafana/data": "^12.1.0",
74-
"@grafana/runtime": "^12.1.0",
75-
"@grafana/schema": "^12.1.0",
76-
"@grafana/ui": "^12.1.0",
73+
"@grafana/data": "^12.2.0",
74+
"@grafana/runtime": "^12.2.0",
75+
"@grafana/schema": "^12.2.0",
76+
"@grafana/ui": "^12.2.0",
7777
"react": "18.2.0",
7878
"react-dom": "18.2.0",
79-
"tslib": "2.5.3"
79+
"tslib": "2.5.3",
80+
"@grafana/i18n": "^12.2.0"
8081
},
8182
"packageManager": "[email protected]"
8283
}

0 commit comments

Comments
 (0)