@grafana/create-plugin 1.12.2-canary.383.c40bea1.0 → 1.12.2

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 CHANGED
@@ -1,3 +1,19 @@
1
+ # v1.12.2 (Thu Sep 07 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - fix: update dockerfile with platform [#383](https://github.com/grafana/plugin-tools/pull/383) ([@sympatheticmoose](https://github.com/sympatheticmoose))
6
+ - chore: update links to developer portal [#382](https://github.com/grafana/plugin-tools/pull/382) ([@sympatheticmoose](https://github.com/sympatheticmoose))
7
+ - Create plugin: Use latest Grafana version [#309](https://github.com/grafana/plugin-tools/pull/309) ([@dprokop](https://github.com/dprokop) [@academo](https://github.com/academo))
8
+
9
+ #### Authors: 3
10
+
11
+ - David Harris ([@sympatheticmoose](https://github.com/sympatheticmoose))
12
+ - Dominik Prokop ([@dprokop](https://github.com/dprokop))
13
+ - Esteban Beltran ([@academo](https://github.com/academo))
14
+
15
+ ---
16
+
1
17
  # v1.12.1 (Fri Aug 25 2023)
2
18
 
3
19
  :tada: This release contains work from a new contributor! :tada:
package/README.md CHANGED
@@ -18,9 +18,7 @@ Create Grafana plugins with ease.
18
18
 
19
19
  **Links**
20
20
 
21
- - [Plugin Tools docs](https://grafana.github.io/plugin-tools/)
22
- - [Plugin developer docs](https://grafana.com/docs/grafana/latest/developers/plugins/)
23
- - [Plugin migration guide](https://grafana.com/docs/grafana/latest/developers/plugins/migration-guide)
21
+ - [Plugin developer docs](https://grafana.com/developers/plugin-tools)
24
22
 
25
23
  **`@grafana/create-plugin`** works on macOS, Linux and Windows Subsystem for Linux (WSL).<br />
26
24
  If something doesn't work, please [file an issue](https://github.com/grafana/plugin-tools/issues/new).<br />
@@ -74,7 +72,7 @@ cd ./my-plugin
74
72
  npx @grafana/create-plugin@latest migrate
75
73
  ```
76
74
 
77
- For more information see [here](https://grafana.github.io/plugin-tools/docs/migrating-from-toolkit)
75
+ For more information see [here](https://grafana.com/developers/plugin-tools/migration-guides/migrate-from-toolkit)
78
76
 
79
77
  ---
80
78
 
@@ -93,13 +91,13 @@ cd ./my-plugin
93
91
  npx @grafana/create-plugin@latest update
94
92
  ```
95
93
 
96
- For more information see [here](https://grafana.github.io/plugin-tools/docs/updating-to-new-releases)
94
+ For more information see [here](https://grafana.com/developers/plugin-tools/migration-guides/update-create-plugin-versions)
97
95
 
98
96
  ---
99
97
 
100
98
  ## Customizing or extending the basic configs
101
99
 
102
- You can read more about customizing or extending the basic configuration [here](https://grafana.github.io/plugin-tools/docs/advanced-configuration/)
100
+ You can read more about customizing or extending the basic configuration [here](https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations)
103
101
 
104
102
  ## Contributing
105
103
 
@@ -28,7 +28,7 @@ function printGenerateSuccessMessage(answers) {
28
28
  '- `docker-compose up` to start a grafana development server. Restart this command after each time you run mage to run your new backend code.',
29
29
  '- Open http://localhost:3000 in your browser to create a dashboard to begin developing your plugin.',
30
30
  ], false);
31
- var msg = "\nCongratulations on scaffolding a Grafana ".concat(answers.pluginType, " plugin! \uD83D\uDE80\n\n## What's next?\n\nRun the following commands to get started:\n").concat(commands.map(function (command) { return command; }).join('\n'), "\n\n_Note: We strongly recommend creating a new Git repository by running `git init` in ./").concat(directory, " before continuing._\n\n- View create-plugin documentation at https://grafana.github.io/plugin-tools/\n- Learn more about Grafana Plugins at https://grafana.com/docs/grafana/latest/plugins/developing/development/\n");
31
+ var msg = "\nCongratulations on scaffolding a Grafana ".concat(answers.pluginType, " plugin! \uD83D\uDE80\n\n## What's next?\n\nRun the following commands to get started:\n").concat(commands.map(function (command) { return command; }).join('\n'), "\n\n_Note: We strongly recommend creating a new Git repository by running `git init` in ./").concat(directory, " before continuing._\n\n- Learn more about Grafana Plugin Development at https://grafana.com/developers/plugin-tools\n");
32
32
  return (0, utils_console_1.displayAsMarkdown)(msg);
33
33
  }
34
34
  exports.printGenerateSuccessMessage = printGenerateSuccessMessage;
package/dist/constants.js CHANGED
@@ -32,7 +32,7 @@ var PLUGIN_TYPES;
32
32
  PLUGIN_TYPES["scenes"] = "scenesapp";
33
33
  })(PLUGIN_TYPES = exports.PLUGIN_TYPES || (exports.PLUGIN_TYPES = {}));
34
34
  exports.EXTRA_TEMPLATE_VARIABLES = {
35
- grafanaVersion: '9.5.3',
35
+ grafanaVersion: '10.0.3',
36
36
  grafanaImage: 'grafana-enterprise'
37
37
  };
38
38
  exports.GRAFANA_FE_PACKAGES = [
@@ -83,7 +83,7 @@ exports.TEXT = {
83
83
  updateNpmScriptsSuccess: 'NPM scripts updated successfully.',
84
84
  updateNpmScriptsAborted: 'No NPM scripts have been added or updated.',
85
85
  migrationCommandWarning: '**⚠️ Warning!**\nThis is going to change files in your current project to make it up-to-date with the latest plugin configuration.\nPlease make sure that you have backed up your changes.',
86
- migrationCommandSuccess: "\n## What's next?\n * Run `yarn install` to install the latest dependencies.\n * Check your tsconfig.json. You might need to update if you had a custom configuration.\n * If you have a custom webpack configuration you might need to update it too.\n * Run `yarn build` and observe the output for any errors.\n * Test your plugin in grafana and make sure everything works as expected.\n\nSee instructions on how to customize your configuration here https://grafana.github.io/plugin-tools/docs/advanced-configuration/\n ",
86
+ migrationCommandSuccess: "\n## What's next?\n * Run `yarn install` to install the latest dependencies.\n * Check your tsconfig.json. You might need to update if you had a custom configuration.\n * If you have a custom webpack configuration you might need to update it too.\n * Run `yarn build` and observe the output for any errors.\n * Test your plugin in grafana and make sure everything works as expected.\n\nSee instructions on how to customize your configuration here https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations\n ",
87
87
  updateCommandWarning: '**⚠️ Warning!**\nThis is going to update files under the `.config/` folder.\nMake sure to commit your changes before running this script.',
88
88
  updateCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/plugin-tools.'
89
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "1.12.2-canary.383.c40bea1.0",
3
+ "version": "1.12.2",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "directory": "packages/create-plugin",
@@ -66,5 +66,5 @@
66
66
  "engines": {
67
67
  "node": ">=16"
68
68
  },
69
- "gitHead": "c40bea125db7e370af69c9bcf9e25d5dbb457976"
69
+ "gitHead": "a9af24493908592b90c952c224bfc8c96d2b340d"
70
70
  }
@@ -29,8 +29,7 @@ ${commands.map((command) => command).join('\n')}
29
29
 
30
30
  _Note: We strongly recommend creating a new Git repository by running \`git init\` in ./${directory} before continuing._
31
31
 
32
- - View create-plugin documentation at https://grafana.github.io/plugin-tools/
33
- - Learn more about Grafana Plugins at https://grafana.com/docs/grafana/latest/plugins/developing/development/
32
+ - Learn more about Grafana Plugin Development at https://grafana.com/developers/plugin-tools
34
33
  `;
35
34
 
36
35
  return displayAsMarkdown(msg);
package/src/constants.ts CHANGED
@@ -40,7 +40,7 @@ export enum PLUGIN_TYPES {
40
40
  // and will be available to use in the templates.
41
41
  // Example: "@grafana/ui": "{{ grafanaVersion }}"
42
42
  export const EXTRA_TEMPLATE_VARIABLES = {
43
- grafanaVersion: '9.5.3',
43
+ grafanaVersion: '10.0.3',
44
44
  grafanaImage: 'grafana-enterprise',
45
45
  };
46
46
 
@@ -118,7 +118,7 @@ export const TEXT = {
118
118
  * Run \`yarn build\` and observe the output for any errors.
119
119
  * Test your plugin in grafana and make sure everything works as expected.
120
120
 
121
- See instructions on how to customize your configuration here https://grafana.github.io/plugin-tools/docs/advanced-configuration/
121
+ See instructions on how to customize your configuration here https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations
122
122
  `,
123
123
 
124
124
  updateCommandWarning: '**⚠️ Warning!**\nThis is going to update files under the `.config/` folder.\nMake sure to commit your changes before running this script.',
@@ -2,7 +2,7 @@
2
2
  * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
3
  *
4
4
  * In order to extend the configuration follow the steps in
5
- * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-eslint-config
5
+ * https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-eslint-config
6
6
  */
7
7
  {
8
8
  "extends": ["@grafana/eslint-config"],
@@ -1,7 +1,7 @@
1
1
  ARG grafana_version=latest
2
2
  ARG grafana_image=grafana-enterprise
3
3
 
4
- FROM --platform=linux/amd64 grafana/${grafana_image}:${grafana_version}
4
+ FROM grafana/${grafana_image}:${grafana_version}
5
5
 
6
6
  # Make it as simple as possible to access the grafana instance for development purposes
7
7
  # Do NOT enable these settings in a public facing / production grafana instance
@@ -2,7 +2,7 @@
2
2
  * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
3
  *
4
4
  * In order to extend the configuration follow the steps in
5
- * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-jest-config
5
+ * https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-jest-config
6
6
  */
7
7
 
8
8
  import '@testing-library/jest-dom';
@@ -2,7 +2,7 @@
2
2
  * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
3
  *
4
4
  * In order to extend the configuration follow the steps in
5
- * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-jest-config
5
+ * https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-jest-config
6
6
  */
7
7
 
8
8
  const path = require('path');
@@ -2,7 +2,7 @@
2
2
  * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
3
  *
4
4
  * In order to extend the configuration follow the steps in
5
- * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-typescript-config
5
+ * https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-typescript-config
6
6
  */
7
7
  {
8
8
  "compilerOptions": {
@@ -2,7 +2,7 @@
2
2
  * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
3
  *
4
4
  * In order to extend the configuration follow the steps in
5
- * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-webpack-config
5
+ * https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-webpack-config
6
6
  */
7
7
 
8
8
  import CopyWebpackPlugin from 'copy-webpack-plugin';
@@ -3,10 +3,9 @@ version: '3.0'
3
3
  services:
4
4
  grafana:
5
5
  container_name: '{{ pluginId }}'
6
+ platform: "linux/amd64"
6
7
  build:
7
8
  context: ./.config
8
- platforms:
9
- - "linux/amd64"
10
9
  args:
11
10
  grafana_image: ${GRAFANA_IMAGE:-{{~grafanaImage~}} }
12
11
  grafana_version: ${GRAFANA_VERSION:-{{~grafanaVersion~}} }
@@ -61,8 +61,8 @@
61
61
  "@grafana/data": "{{ grafanaVersion }}",
62
62
  "@grafana/runtime": "{{ grafanaVersion }}",
63
63
  "@grafana/ui": "{{ grafanaVersion }}",{{#if_eq pluginType "scenesapp"}}
64
- "@grafana/schema": "10.0.1",
65
- "@grafana/scenes": "^0.19.0",{{/if_eq}}
64
+ "@grafana/schema": "{{ grafanaVersion }}",
65
+ "@grafana/scenes": "0.27.0",{{/if_eq}}
66
66
  "react": "17.0.2",
67
67
  "react-dom": "17.0.2",{{#if isAppType}}
68
68
  "react-router-dom": "^5.2.0",
@@ -1,6 +1,6 @@
1
1
  # Grafana Scenes App Plugin Template
2
2
 
3
- This template is a starting point for building an app plugin with [scenes](https://grafana.github.io/scenes) for Grafana.
3
+ This template is a starting point for building an app plugin with [scenes](https://grafana.com/developers/scenes) for Grafana.
4
4
 
5
5
  ## What are Grafana app plugins?
6
6
 
@@ -10,7 +10,7 @@ App plugins can let you create a custom out-of-the-box monitoring experience by
10
10
 
11
11
  [@grafana/scenes](https://github.com/grafana/scenes) is a framework to enable versatile app plugins implementation. It provides an easy way to build apps that resemble Grafana's dashboarding experience, including template variables support, versatile layouts, panels rendering and more.
12
12
 
13
- To learn more about @grafana/scenes usage please refer to the [documentation](https://grafana.github.io/scenes)
13
+ To learn more about @grafana/scenes usage please refer to the [documentation](https://grafana.com/developers/scenes)
14
14
 
15
15
  ## What does this template contain?
16
16