From b845656f275338a63c7bf56bd04fcad3de634d49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Jun 2025 00:09:21 +0000 Subject: [PATCH] chore: update configuration to create-plugin 5.22.1 --- .config/.cprc.json | 2 +- .config/Dockerfile | 3 +- .config/README.md | 4 +- .config/docker-compose-base.yaml | 5 +- .config/types/bundler-rules.d.ts | 37 + .config/types/webpack-plugins.d.ts | 83 ++ .config/webpack/BuildModeWebpackPlugin.ts | 2 +- .config/webpack/utils.ts | 25 +- .config/webpack/webpack.config.ts | 93 +- package-lock.json | 1116 +++++++++------------ package.json | 12 +- 11 files changed, 698 insertions(+), 684 deletions(-) create mode 100644 .config/types/bundler-rules.d.ts create mode 100644 .config/types/webpack-plugins.d.ts diff --git a/.config/.cprc.json b/.config/.cprc.json index c27ce80..6fef94f 100644 --- a/.config/.cprc.json +++ b/.config/.cprc.json @@ -1,3 +1,3 @@ { - "version": "5.14.0" + "version": "5.22.1" } diff --git a/.config/Dockerfile b/.config/Dockerfile index 7f0b310..c55d9e1 100644 --- a/.config/Dockerfile +++ b/.config/Dockerfile @@ -1,6 +1,7 @@ ARG grafana_version=latest +ARG grafana_image=grafana-enterprise -FROM grafana/grafana:${grafana_version} +FROM grafana/${grafana_image}:${grafana_version} ARG anonymous_auth_enabled=true ARG development=false diff --git a/.config/README.md b/.config/README.md index 1478e3b..5ba3186 100644 --- a/.config/README.md +++ b/.config/README.md @@ -106,9 +106,9 @@ We are going to use [`webpack-merge`](https://github.com/survivejs/webpack-merge // webpack.config.ts import type { Configuration } from 'webpack'; import { merge } from 'webpack-merge'; -import grafanaConfig from './.config/webpack/webpack.config'; +import grafanaConfig, { type Env } from './.config/webpack/webpack.config'; -const config = async (env): Promise => { +const config = async (env: Env): Promise => { const baseConfig = await grafanaConfig(env); return merge(baseConfig, { diff --git a/.config/docker-compose-base.yaml b/.config/docker-compose-base.yaml index 31234a3..3e08ee2 100644 --- a/.config/docker-compose-base.yaml +++ b/.config/docker-compose-base.yaml @@ -6,11 +6,12 @@ services: build: context: . args: - grafana_version: ${GRAFANA_VERSION:-9.2.5} + grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise} + grafana_version: ${GRAFANA_VERSION:-11.5.3} development: ${DEVELOPMENT:-false} anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true} ports: - - 3001:3000/tcp + - 3000:3000/tcp volumes: - ../dist:/var/lib/grafana/plugins/target-dashboardtabs-panel - ../provisioning:/etc/grafana/provisioning diff --git a/.config/types/bundler-rules.d.ts b/.config/types/bundler-rules.d.ts new file mode 100644 index 0000000..e67197c --- /dev/null +++ b/.config/types/bundler-rules.d.ts @@ -0,0 +1,37 @@ +// Image declarations +declare module '*.gif' { + const src: string; + export default src; +} + +declare module '*.jpg' { + const src: string; + export default src; +} + +declare module '*.jpeg' { + const src: string; + export default src; +} + +declare module '*.png' { + const src: string; + export default src; +} + +declare module '*.webp' { + const src: string; + export default src; +} + +declare module '*.svg' { + const src: string; + export default src; +} + +// Font declarations +declare module '*.woff'; +declare module '*.woff2'; +declare module '*.eot'; +declare module '*.ttf'; +declare module '*.otf'; diff --git a/.config/types/webpack-plugins.d.ts b/.config/types/webpack-plugins.d.ts new file mode 100644 index 0000000..6dbab10 --- /dev/null +++ b/.config/types/webpack-plugins.d.ts @@ -0,0 +1,83 @@ +declare module 'replace-in-file-webpack-plugin' { + import { Compiler, Plugin } from 'webpack'; + + interface ReplaceRule { + search: string | RegExp; + replace: string | ((match: string) => string); + } + + interface ReplaceOption { + dir?: string; + files?: string[]; + test?: RegExp | RegExp[]; + rules: ReplaceRule[]; + } + + class ReplaceInFilePlugin extends Plugin { + constructor(options?: ReplaceOption[]); + options: ReplaceOption[]; + apply(compiler: Compiler): void; + } + + export = ReplaceInFilePlugin; +} + +declare module 'webpack-livereload-plugin' { + import { ServerOptions } from 'https'; + import { Compiler, Plugin, Stats, Compilation } from 'webpack'; + + interface Options extends Pick { + /** + * protocol for livereload `