@grafana/create-plugin 4.14.1 → 4.14.2-canary.971.cf99ca0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.2-canary.971.cf99ca0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=20"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "cf99ca04b5540b15e128ef015024f3e6083ed354"
|
|
91
91
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
|
|
3
|
+
*
|
|
4
|
+
* This file dynamically sets the public path at runtime based on the location of the plugin's AMD module.
|
|
5
|
+
* It relies on the magic `module` which is defined by the AMD loader.
|
|
6
|
+
* https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#module
|
|
7
|
+
*
|
|
8
|
+
* We fallback to the plugin root so that older versions of Grafana will continue to load the plugin correctly.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// @ts-nocheck
|
|
12
|
+
import amdMetaModule from 'amd-module';
|
|
13
|
+
|
|
14
|
+
__webpack_public_path__ =
|
|
15
|
+
amdMetaModule && amdMetaModule.uri
|
|
16
|
+
? amdMetaModule.uri.slice(0, amdMetaModule.uri.lastIndexOf('/') + 1)
|
|
17
|
+
: 'public/plugins/{{ pluginId }}/';
|
|
@@ -36,6 +36,8 @@ const config = async (env): Promise<Configuration> => {
|
|
|
36
36
|
entry: await getEntries(),
|
|
37
37
|
|
|
38
38
|
externals: [
|
|
39
|
+
// Required for dynamic publicPath resolution
|
|
40
|
+
{ 'amd-module': 'module' },
|
|
39
41
|
'lodash',
|
|
40
42
|
'jquery',
|
|
41
43
|
'moment',
|
|
@@ -104,6 +106,17 @@ const config = async (env): Promise<Configuration> => {
|
|
|
104
106
|
},
|
|
105
107
|
},
|
|
106
108
|
},
|
|
109
|
+
{
|
|
110
|
+
test: /src\/(?:.*\/)?module\.tsx?$/,
|
|
111
|
+
use: [
|
|
112
|
+
{
|
|
113
|
+
loader: 'imports-loader',
|
|
114
|
+
options: {
|
|
115
|
+
imports: `side-effects ${path.join(__dirname, 'publicPath.ts')}`,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
107
120
|
{
|
|
108
121
|
test: /\.css$/,
|
|
109
122
|
use: ['style-loader', 'css-loader'],
|
|
@@ -116,9 +129,6 @@ const config = async (env): Promise<Configuration> => {
|
|
|
116
129
|
test: /\.(png|jpe?g|gif|svg)$/,
|
|
117
130
|
type: 'asset/resource',
|
|
118
131
|
generator: {
|
|
119
|
-
// Keep publicPath relative for host.com/grafana/ deployments
|
|
120
|
-
publicPath: `public/plugins/${pluginJson.id}/img/`,
|
|
121
|
-
outputPath: 'img/',
|
|
122
132
|
filename: Boolean(env.production) ? '[hash][ext]' : '[file]',
|
|
123
133
|
},
|
|
124
134
|
},
|
|
@@ -126,10 +136,7 @@ const config = async (env): Promise<Configuration> => {
|
|
|
126
136
|
test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
|
|
127
137
|
type: 'asset/resource',
|
|
128
138
|
generator: {
|
|
129
|
-
|
|
130
|
-
publicPath: `public/plugins/${pluginJson.id}/fonts/`,
|
|
131
|
-
outputPath: 'fonts/',
|
|
132
|
-
filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]',
|
|
139
|
+
filename: Boolean(env.production) ? '[hash][ext]' : '[file]',
|
|
133
140
|
},
|
|
134
141
|
},
|
|
135
142
|
],
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@babel/core": "^7.21.4",{{#if useCypress}}
|
|
23
|
-
"@grafana/e2e": "^
|
|
24
|
-
"@grafana/e2e-selectors": "^
|
|
23
|
+
"@grafana/e2e": "^11.0.1",
|
|
24
|
+
"@grafana/e2e-selectors": "^11.1.0",{{/if}}
|
|
25
25
|
"@grafana/eslint-config": "^7.0.0",{{#if usePlaywright}}
|
|
26
|
-
"@grafana/plugin-e2e": "^1.
|
|
26
|
+
"@grafana/plugin-e2e": "^1.6.0",{{/if}}
|
|
27
27
|
"@grafana/tsconfig": "^1.2.0-rc1",{{#if usePlaywright}}
|
|
28
28
|
"@playwright/test": "^1.41.2",{{/if}}
|
|
29
29
|
"@swc/core": "^1.3.90",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
44
44
|
"glob": "^10.2.7",
|
|
45
45
|
"identity-obj-proxy": "3.0.0",
|
|
46
|
+
"imports-loader": "^5.0.0",
|
|
46
47
|
"jest": "^29.5.0",
|
|
47
48
|
"jest-environment-jsdom": "^29.5.0",
|
|
48
49
|
"prettier": "^2.8.7",
|
|
@@ -63,11 +64,11 @@
|
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
66
|
"@emotion/css": "11.10.6",
|
|
66
|
-
"@grafana/data": "^
|
|
67
|
-
"@grafana/runtime": "^
|
|
68
|
-
"@grafana/ui": "^
|
|
67
|
+
"@grafana/data": "^11.1.0",
|
|
68
|
+
"@grafana/runtime": "^11.1.0",
|
|
69
|
+
"@grafana/ui": "^11.1.0",
|
|
69
70
|
"@grafana/schema": "^10.4.0",{{#if_eq pluginType "scenesapp"}}
|
|
70
|
-
"@grafana/scenes": "^3.
|
|
71
|
+
"@grafana/scenes": "^5.3.7",{{/if_eq}}
|
|
71
72
|
"react": "18.2.0",
|
|
72
73
|
"react-dom": "18.2.0",{{#if isAppType}}
|
|
73
74
|
"react-router-dom": "^{{ reactRouterVersion }}",
|