@grafana/create-plugin 0.2.1 → 0.3.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/CONTRIBUTING.md +79 -0
- package/README.md +3 -3
- package/dist/commands/generate.plopfile.js +2 -1
- package/dist/commands/update.command.js +1 -1
- package/dist/constants.js +6 -3
- package/dist/utils/tests/utils.handlebars.test.js +3 -3
- package/dist/utils/tests/utils.plugin.test.js +1 -1
- package/dist/utils/utils.handlebars.js +4 -2
- package/fixtures/test-template/src/plugin.json +35 -0
- package/package.json +5 -5
- package/scripts/generate-app.js +24 -0
- package/scripts/generate-datasource.js +24 -0
- package/scripts/generate-panel.js +23 -0
- package/src/commands/generate.plopfile.ts +1 -0
- package/src/commands/update.command.ts +1 -1
- package/src/constants.ts +7 -2
- package/src/utils/tests/utils.handlebars.test.ts +3 -3
- package/src/utils/tests/utils.plugin.test.ts +2 -2
- package/src/utils/utils.handlebars.ts +5 -2
- package/templates/app/src/plugin.json +4 -1
- package/templates/backend/go.mod +55 -2
- package/templates/backend/go.sum +91 -4
- package/templates/common/.config/jest.config.js +5 -1
- package/templates/common/.config/webpack/webpack.config.ts +29 -16
- package/templates/common/.nvmrc +1 -1
- package/templates/common/package.json +6 -1
- package/templates/datasource/src/plugin.json +2 -2
- package/templates/github/ci/.github/workflows/ci.yml +11 -2
- package/templates/github/ci/.github/workflows/release.yml +1 -1
- package/templates/panel/src/plugin.json +1 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Contributing to Grafana / Create Plugin
|
|
2
|
+
|
|
3
|
+
We are always grateful to receive contribution!<br />
|
|
4
|
+
The following guidelines help you on how to start with the codebase and how to submit your work.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
### Prerequisites
|
|
9
|
+
|
|
10
|
+
You need to have `npm` or `yarn` installed.
|
|
11
|
+
|
|
12
|
+
### Installing
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone git@github.com:grafana/plugin-tools.git
|
|
16
|
+
cd plugin-tools
|
|
17
|
+
yarn install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
### Technologies
|
|
23
|
+
|
|
24
|
+
- [**`Plop`**](https://github.com/plopjs/plop) - we are using Plop for the CLI tool and for scaffolding
|
|
25
|
+
|
|
26
|
+
### Folder structure
|
|
27
|
+
|
|
28
|
+
`@grafana/create-plugin` consists of the following folder structure:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
├── src // Executable code
|
|
32
|
+
│ ├── bin // the entrypoint file
|
|
33
|
+
│ ├── commands // Code that runs commands
|
|
34
|
+
│ └── utils // Utilities used by commands
|
|
35
|
+
└── templates // Plop templates
|
|
36
|
+
├── _partials // Composable parts of a template
|
|
37
|
+
├── app // Templates specific to scaffolding an app plugin
|
|
38
|
+
├── backend // Templates specific to scaffolding backend plugin code
|
|
39
|
+
├── common // Common templates used by all plugin types (e.g. tooling config files)
|
|
40
|
+
├── datasource // Templates specific to scaffolding a datasource plugin
|
|
41
|
+
├── github // Templates for github workflows
|
|
42
|
+
└── panel // Templates specific to scaffolding a panel plugin
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
There are a collection of [commands](#commmands) to assist with developing `create-plugin`. Please read the main [contributing guide](../../CONTRIBUTING.md) before contributing any code changes to the project.
|
|
48
|
+
|
|
49
|
+
### Commmands
|
|
50
|
+
|
|
51
|
+
Below are the main commands used for developing `create-plugin`. They can be run by either `yarn workspace @grafana/create-plugin run <name_of_command>` or navigating to `packages/create-plugin` and running the command directly as detailed below.
|
|
52
|
+
|
|
53
|
+
```shell
|
|
54
|
+
yarn build # used to build @grafana/create-plugin
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
yarn dev # watches for changes to files and rebuilds @grafana/create-plugin automatically
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```shell
|
|
62
|
+
yarn dev-app # watches for changes and scaffolds an app plugin (in ./generated) for developing app configs
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
yarn dev-panel # watches for changes and scaffolds an app plugin (in ./generated) for developing panel configs
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```shell
|
|
70
|
+
yarn dev-datasource # watches for changes and scaffolds an app plugin (in ./generated) for developing datasource configs
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Conventions
|
|
74
|
+
|
|
75
|
+
_Work in progress._
|
|
76
|
+
|
|
77
|
+
### Developing the templates
|
|
78
|
+
|
|
79
|
+
The templates are used by Plop to scaffold Grafana plugins. Whilst they appear to be the intended filetype they are infact treated as markdown by Plop when it runs. As such we need to be mindful of syntax and to [escape particular characters](https://handlebarsjs.com/guide/expressions.html#whitespace-control) where necessary. The [github/ci.yml](./templates/github/ci/.github/workflows/ci.yml) file is a good example of this.
|
package/README.md
CHANGED
|
@@ -23,8 +23,8 @@ Create Grafana plugins with ease.
|
|
|
23
23
|
- [Plugin migration guide](https://grafana.com/docs/grafana/latest/developers/plugins/migration-guide/)
|
|
24
24
|
|
|
25
25
|
**`@grafana/create-plugin`** works on macOS, Windows and Linux.<br />
|
|
26
|
-
If something doesn't work, please [file an issue](https://github.com/grafana/
|
|
27
|
-
If you have questions or need help, please ask in [GitHub Discussions](https://github.com/grafana/
|
|
26
|
+
If something doesn't work, please [file an issue](https://github.com/grafana/plugin-tools/issues/new).<br />
|
|
27
|
+
If you have questions or need help, please ask in [GitHub Discussions](https://github.com/grafana/plugin-tools/discussions).
|
|
28
28
|
|
|
29
29
|
## Create a new plugin
|
|
30
30
|
|
|
@@ -103,4 +103,4 @@ You can read more about customizing or extending the basic configuration [here](
|
|
|
103
103
|
|
|
104
104
|
## Contributing
|
|
105
105
|
|
|
106
|
-
We are always grateful for
|
|
106
|
+
We are always grateful for contributions! See the [CONTRIBUTING.md](../CONTRIBUTING.md) for more information.
|
|
@@ -61,7 +61,8 @@ function default_1(plop) {
|
|
|
61
61
|
name: 'hasBackend',
|
|
62
62
|
type: 'confirm',
|
|
63
63
|
message: 'Do you want a backend part of your plugin?',
|
|
64
|
-
"default": false
|
|
64
|
+
"default": false,
|
|
65
|
+
when: function (answers) { return answers.pluginType !== constants_1.PLUGIN_TYPES.panel; }
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
68
|
name: 'hasGithubWorkflows',
|
|
@@ -48,7 +48,7 @@ var update = function () { return __awaiter(void 0, void 0, void 0, function ()
|
|
|
48
48
|
case 0:
|
|
49
49
|
_a.trys.push([0, 5, , 6]);
|
|
50
50
|
(0, utils_console_1.printMessage)(constants_1.TEXT.updateCommandWarning);
|
|
51
|
-
return [4, (0, utils_console_1.confirmPrompt)(constants_1.TEXT.
|
|
51
|
+
return [4, (0, utils_console_1.confirmPrompt)(constants_1.TEXT.updateConfigPrompt)];
|
|
52
52
|
case 1:
|
|
53
53
|
if (_a.sent()) {
|
|
54
54
|
(0, utils_templates_1.compileTemplateFiles)(constants_1.UDPATE_CONFIG.filesToOverride, (0, utils_templates_1.getTemplateData)());
|
package/dist/constants.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports.TEXT = exports.UDPATE_CONFIG = exports.MIGRATION_CONFIG = exports.EXTRA_TEMPLATE_VARIABLES = exports.PLUGIN_TYPES = exports.TEMPLATE_PATHS = exports.PARTIALS_DIR = exports.TEMPLATES_DIR = exports.DIST_DIR = exports.EXPORT_PATH_PREFIX = exports.DEV_EXPORT_DIR = exports.IS_DEV = void 0;
|
|
6
|
+
exports.TEXT = exports.UDPATE_CONFIG = exports.MIGRATION_CONFIG = exports.EXTRA_TEMPLATE_VARIABLES = exports.PLUGIN_TYPES = exports.TEMPLATE_PATHS = exports.FIXTURES_PATH = exports.PARTIALS_DIR = exports.TEMPLATES_DIR = exports.DIST_DIR = exports.EXPORT_PATH_PREFIX = exports.DEV_EXPORT_DIR = exports.IS_DEV = void 0;
|
|
7
7
|
var path_1 = __importDefault(require("path"));
|
|
8
8
|
exports.IS_DEV = process.env.CREATE_PLUGIN_DEV !== undefined;
|
|
9
9
|
exports.DEV_EXPORT_DIR = path_1["default"].join(__dirname, '..', 'generated');
|
|
@@ -11,6 +11,7 @@ exports.EXPORT_PATH_PREFIX = exports.IS_DEV ? exports.DEV_EXPORT_DIR : process.c
|
|
|
11
11
|
exports.DIST_DIR = path_1["default"].join(__dirname, 'dist');
|
|
12
12
|
exports.TEMPLATES_DIR = path_1["default"].join(__dirname, '..', 'templates');
|
|
13
13
|
exports.PARTIALS_DIR = path_1["default"].join(exports.TEMPLATES_DIR, '_partials');
|
|
14
|
+
exports.FIXTURES_PATH = path_1["default"].join(__dirname, '..', 'fixtures');
|
|
14
15
|
exports.TEMPLATE_PATHS = {
|
|
15
16
|
app: path_1["default"].join(exports.TEMPLATES_DIR, 'app'),
|
|
16
17
|
backend: path_1["default"].join(exports.TEMPLATES_DIR, 'backend'),
|
|
@@ -25,6 +26,7 @@ var PLUGIN_TYPES;
|
|
|
25
26
|
PLUGIN_TYPES["app"] = "app";
|
|
26
27
|
PLUGIN_TYPES["panel"] = "panel";
|
|
27
28
|
PLUGIN_TYPES["datasource"] = "datasource";
|
|
29
|
+
PLUGIN_TYPES["secretsmanager"] = "secretsmanager";
|
|
28
30
|
})(PLUGIN_TYPES = exports.PLUGIN_TYPES || (exports.PLUGIN_TYPES = {}));
|
|
29
31
|
exports.EXTRA_TEMPLATE_VARIABLES = {
|
|
30
32
|
grafanaVersion: '9.1.2'
|
|
@@ -64,11 +66,12 @@ exports.TEXT = {
|
|
|
64
66
|
removeNpmDependenciesPrompt: '**Would you like to remove the following possibly unnecessary NPM dependencies?**',
|
|
65
67
|
removeNpmDependenciesSuccess: 'Unnecessary NPM dependencies removed successfully.',
|
|
66
68
|
removeNpmDependenciesAborted: 'No NPM dependencies have been removed.',
|
|
69
|
+
updateConfigPrompt: "**Would you like to update the project's configuration?**",
|
|
67
70
|
updateNpmScriptsPrompt: '**Would you like to update the `{ scripts }` in your `package.json`?**',
|
|
68
71
|
updateNpmScriptsSuccess: 'NPM scripts updated successfully.',
|
|
69
72
|
updateNpmScriptsAborted: 'No NPM scripts have been added or updated.',
|
|
70
73
|
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.',
|
|
71
|
-
migrationCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/
|
|
74
|
+
migrationCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/plugin-tools.',
|
|
72
75
|
updateCommandWarning: '**⚠️ Warning!**\nThis is going to update files under the `.config/` folder.\nMake sure to commit your changes before running this script.',
|
|
73
|
-
updateCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/
|
|
76
|
+
updateCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/plugin-tools.'
|
|
74
77
|
};
|
|
@@ -8,19 +8,19 @@ describe('Handlebars helpers', function () {
|
|
|
8
8
|
var pluginName = 'my-plugin';
|
|
9
9
|
var orgName = 'my-org';
|
|
10
10
|
var actual = (0, utils_handlebars_1.normalizeId)(pluginName, orgName, type);
|
|
11
|
-
expect(actual).toEqual("
|
|
11
|
+
expect(actual).toEqual("myorg-myplugin-".concat(type));
|
|
12
12
|
});
|
|
13
13
|
test.each([constants_1.PLUGIN_TYPES.app, constants_1.PLUGIN_TYPES.datasource, constants_1.PLUGIN_TYPES.panel])('should not duplicate the type if it is already present', function (type) {
|
|
14
14
|
var pluginName = "my-plugin-".concat(type);
|
|
15
15
|
var orgName = 'my-org';
|
|
16
16
|
var actual = (0, utils_handlebars_1.normalizeId)(pluginName, orgName, type);
|
|
17
|
-
expect(actual).toEqual("
|
|
17
|
+
expect(actual).toEqual("myorg-myplugin-".concat(type));
|
|
18
18
|
});
|
|
19
19
|
test.each([constants_1.PLUGIN_TYPES.app, constants_1.PLUGIN_TYPES.datasource, constants_1.PLUGIN_TYPES.panel])('should not duplicate the type if it is already present (no dash before type)', function (type) {
|
|
20
20
|
var pluginName = "my-plugin".concat(type);
|
|
21
21
|
var orgName = 'my-org';
|
|
22
22
|
var actual = (0, utils_handlebars_1.normalizeId)(pluginName, orgName, type);
|
|
23
|
-
expect(actual).toEqual("
|
|
23
|
+
expect(actual).toEqual("myorg-myplugin-".concat(type));
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -5,7 +5,7 @@ var utils_plugin_1 = require("../utils.plugin");
|
|
|
5
5
|
describe('Utils / Plugins', function () {
|
|
6
6
|
describe('getPluginJson()', function () {
|
|
7
7
|
test('should return the parsed plugin JSON if the file exits', function () {
|
|
8
|
-
var srcDir = "".concat(constants_1.
|
|
8
|
+
var srcDir = "".concat(constants_1.FIXTURES_PATH, "/test-template/src");
|
|
9
9
|
var pluginJson = (0, utils_plugin_1.getPluginJson)(srcDir);
|
|
10
10
|
expect(pluginJson).toBeDefined();
|
|
11
11
|
expect(pluginJson.type).toBe('app');
|
|
@@ -39,8 +39,10 @@ var ifEq = function (a, b, options) {
|
|
|
39
39
|
exports.ifEq = ifEq;
|
|
40
40
|
var normalizeId = function (pluginName, orgName, type) {
|
|
41
41
|
var re = new RegExp("-?".concat(type, "$"), 'i');
|
|
42
|
-
var
|
|
43
|
-
|
|
42
|
+
var nameRegex = new RegExp('[^0-9a-z]', 'g');
|
|
43
|
+
var newPluginName = pluginName.replace(re, '').replace(nameRegex, '');
|
|
44
|
+
var newOrgName = orgName.replace(nameRegex, '');
|
|
45
|
+
return changeCase.lowerCase(newOrgName) + '-' + changeCase.lowerCase(newPluginName) + "-".concat(type);
|
|
44
46
|
};
|
|
45
47
|
exports.normalizeId = normalizeId;
|
|
46
48
|
function registerHandlebarsHelpers() {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
|
|
3
|
+
"type": "app",
|
|
4
|
+
"name": "{{ titleCase pluginName }}",
|
|
5
|
+
"id": "{{ normalize_id pluginName orgName 'app' }}",
|
|
6
|
+
"backend": true,
|
|
7
|
+
"executable": "gpx_{{ snakeCase pluginName }}",
|
|
8
|
+
"info": {
|
|
9
|
+
"description": "{{ sentenceCase pluginDescription }}",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "{{ sentenceCase orgName }}"
|
|
12
|
+
},
|
|
13
|
+
"logos": {
|
|
14
|
+
"small": "img/logo.svg",
|
|
15
|
+
"large": "img/logo.svg"
|
|
16
|
+
},
|
|
17
|
+
"screenshots": [],
|
|
18
|
+
"version": "%VERSION%",
|
|
19
|
+
"updated": "%TODAY%"
|
|
20
|
+
},
|
|
21
|
+
"includes": [
|
|
22
|
+
{
|
|
23
|
+
"type": "page",
|
|
24
|
+
"name": "Default",
|
|
25
|
+
"path": "/a/%PLUGIN_ID%",
|
|
26
|
+
"role": "Admin",
|
|
27
|
+
"addToNav": true,
|
|
28
|
+
"defaultNav": true
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"grafanaDependency": ">={{ grafanaVersion }}",
|
|
33
|
+
"plugins": []
|
|
34
|
+
}
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
7
|
-
"url": "git@github.com:grafana/
|
|
7
|
+
"url": "git@github.com:grafana/plugin-tools.git"
|
|
8
8
|
},
|
|
9
9
|
"author": "Grafana",
|
|
10
10
|
"license": "Apache-2.0",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"dev-app": "CREATE_PLUGIN_DEV=true nodemon --exec 'yarn generate-app'",
|
|
18
18
|
"dev-panel": "CREATE_PLUGIN_DEV=true nodemon --exec 'yarn generate-panel'",
|
|
19
19
|
"dev-datasource": "CREATE_PLUGIN_DEV=true nodemon --exec 'yarn generate-datasource'",
|
|
20
|
-
"generate-app": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./
|
|
21
|
-
"generate-panel": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./
|
|
22
|
-
"generate-datasource": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./
|
|
20
|
+
"generate-app": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./scripts/generate-app.js",
|
|
21
|
+
"generate-panel": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./scripts/generate-panel.js",
|
|
22
|
+
"generate-datasource": "tsc && yarn clean-generated && CREATE_PLUGIN_DEV=true node ./scripts/generate-datasource.js",
|
|
23
23
|
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
|
|
24
24
|
"lint:fix": "yarn lint --fix",
|
|
25
25
|
"test": "jest",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const nodePlop = require('node-plop');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
async function generatePanel() {
|
|
6
|
+
const plopFile = path.join(__dirname, '../dist/commands/generate.plopfile.js');
|
|
7
|
+
if (!fs.existsSync(plopFile)) {
|
|
8
|
+
console.error('Run build first');
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const plop = await nodePlop(plopFile);
|
|
12
|
+
const generator = plop.getGenerator('create-plugin');
|
|
13
|
+
await generator.runActions({
|
|
14
|
+
pluginName: 'my-plugin',
|
|
15
|
+
orgName: 'my-org',
|
|
16
|
+
pluginDescription: 'Auto-generated app',
|
|
17
|
+
pluginType: 'app',
|
|
18
|
+
hasBackend: false,
|
|
19
|
+
hasGithubWorkflows: true,
|
|
20
|
+
hasGithubLevitateWorkflow: true,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
generatePanel();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const nodePlop = require('node-plop');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
async function generatePanel() {
|
|
6
|
+
const plopFile = path.join(__dirname, '../dist/commands/generate.plopfile.js');
|
|
7
|
+
if (!fs.existsSync(plopFile)) {
|
|
8
|
+
console.error('Run build first');
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const plop = await nodePlop(plopFile);
|
|
12
|
+
const generator = plop.getGenerator('create-plugin');
|
|
13
|
+
await generator.runActions({
|
|
14
|
+
pluginName: 'my-plugin',
|
|
15
|
+
orgName: 'my-org',
|
|
16
|
+
pluginDescription: 'Auto-generated datasource',
|
|
17
|
+
pluginType: 'datasource',
|
|
18
|
+
hasBackend: true,
|
|
19
|
+
hasGithubWorkflows: true,
|
|
20
|
+
hasGithubLevitateWorkflow: true,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
generatePanel();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const nodePlop = require('node-plop');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
async function generatePanel() {
|
|
6
|
+
const plopFile = path.join(__dirname, '../dist/commands/generate.plopfile.js');
|
|
7
|
+
if (!fs.existsSync(plopFile)) {
|
|
8
|
+
console.error('Run build first');
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const plop = await nodePlop(plopFile);
|
|
12
|
+
const generator = plop.getGenerator('create-plugin');
|
|
13
|
+
await generator.runActions({
|
|
14
|
+
pluginName: 'my-plugin',
|
|
15
|
+
orgName: 'my-org',
|
|
16
|
+
pluginDescription: 'Auto-generated panel',
|
|
17
|
+
pluginType: 'panel',
|
|
18
|
+
hasGithubWorkflows: true,
|
|
19
|
+
hasGithubLevitateWorkflow: true,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
generatePanel();
|
|
@@ -16,7 +16,7 @@ export const update = async () => {
|
|
|
16
16
|
|
|
17
17
|
// 1. Add / update configuration files
|
|
18
18
|
// -----------------------------------
|
|
19
|
-
if (await confirmPrompt(TEXT.
|
|
19
|
+
if (await confirmPrompt(TEXT.updateConfigPrompt)) {
|
|
20
20
|
compileTemplateFiles(UDPATE_CONFIG.filesToOverride, getTemplateData());
|
|
21
21
|
printSuccessMessage(TEXT.overrideFilesSuccess);
|
|
22
22
|
} else {
|
package/src/constants.ts
CHANGED
|
@@ -14,6 +14,8 @@ export const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
|
|
|
14
14
|
// (they won't be copied over to the generated folder as they are)
|
|
15
15
|
export const PARTIALS_DIR = path.join(TEMPLATES_DIR, '_partials');
|
|
16
16
|
|
|
17
|
+
export const FIXTURES_PATH = path.join(__dirname, '..', 'fixtures');
|
|
18
|
+
|
|
17
19
|
export const TEMPLATE_PATHS: Record<string, string> = {
|
|
18
20
|
app: path.join(TEMPLATES_DIR, 'app'),
|
|
19
21
|
backend: path.join(TEMPLATES_DIR, 'backend'),
|
|
@@ -28,6 +30,7 @@ export enum PLUGIN_TYPES {
|
|
|
28
30
|
app = 'app',
|
|
29
31
|
panel = 'panel',
|
|
30
32
|
datasource = 'datasource',
|
|
33
|
+
secretsmanager = 'secretsmanager',
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
// This gets merged into variables coming from user prompts (when using Plop) or any other dynamic variables,
|
|
@@ -87,13 +90,15 @@ export const TEXT = {
|
|
|
87
90
|
removeNpmDependenciesSuccess: 'Unnecessary NPM dependencies removed successfully.',
|
|
88
91
|
removeNpmDependenciesAborted: 'No NPM dependencies have been removed.',
|
|
89
92
|
|
|
93
|
+
updateConfigPrompt: "**Would you like to update the project's configuration?**",
|
|
94
|
+
|
|
90
95
|
updateNpmScriptsPrompt: '**Would you like to update the `{ scripts }` in your `package.json`?**',
|
|
91
96
|
updateNpmScriptsSuccess: 'NPM scripts updated successfully.',
|
|
92
97
|
updateNpmScriptsAborted: 'No NPM scripts have been added or updated.',
|
|
93
98
|
|
|
94
99
|
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.',
|
|
95
|
-
migrationCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/
|
|
100
|
+
migrationCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/plugin-tools.',
|
|
96
101
|
|
|
97
102
|
updateCommandWarning: '**⚠️ Warning!**\nThis is going to update files under the `.config/` folder.\nMake sure to commit your changes before running this script.',
|
|
98
|
-
updateCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/
|
|
103
|
+
updateCommandSuccess: '**Done.**\nIf you have any questions please open an issue/discussion in https://github.com/grafana/plugin-tools.',
|
|
99
104
|
}
|
|
@@ -9,7 +9,7 @@ describe('Handlebars helpers', () => {
|
|
|
9
9
|
const pluginName = 'my-plugin';
|
|
10
10
|
const orgName = 'my-org';
|
|
11
11
|
const actual = normalizeId(pluginName, orgName, type);
|
|
12
|
-
expect(actual).toEqual(`
|
|
12
|
+
expect(actual).toEqual(`myorg-myplugin-${type}`);
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
test.each([PLUGIN_TYPES.app, PLUGIN_TYPES.datasource, PLUGIN_TYPES.panel])(
|
|
@@ -18,7 +18,7 @@ describe('Handlebars helpers', () => {
|
|
|
18
18
|
const pluginName = `my-plugin-${type}`;
|
|
19
19
|
const orgName = 'my-org';
|
|
20
20
|
const actual = normalizeId(pluginName, orgName, type);
|
|
21
|
-
expect(actual).toEqual(`
|
|
21
|
+
expect(actual).toEqual(`myorg-myplugin-${type}`);
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ describe('Handlebars helpers', () => {
|
|
|
28
28
|
const pluginName = `my-plugin${type}`;
|
|
29
29
|
const orgName = 'my-org';
|
|
30
30
|
const actual = normalizeId(pluginName, orgName, type);
|
|
31
|
-
expect(actual).toEqual(`
|
|
31
|
+
expect(actual).toEqual(`myorg-myplugin-${type}`);
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TEMPLATE_PATHS } from '../../constants';
|
|
1
|
+
import { FIXTURES_PATH, TEMPLATE_PATHS } from '../../constants';
|
|
2
2
|
import { getPluginJson } from '../utils.plugin';
|
|
3
3
|
|
|
4
4
|
describe('Utils / Plugins', () => {
|
|
5
5
|
describe('getPluginJson()', () => {
|
|
6
6
|
test('should return the parsed plugin JSON if the file exits', () => {
|
|
7
|
-
const srcDir = `${
|
|
7
|
+
const srcDir = `${FIXTURES_PATH}/test-template/src`;
|
|
8
8
|
const pluginJson = getPluginJson(srcDir);
|
|
9
9
|
|
|
10
10
|
expect(pluginJson).toBeDefined();
|
|
@@ -12,8 +12,11 @@ export const ifEq = (a: any, b: any, options: HelperOptions) => {
|
|
|
12
12
|
|
|
13
13
|
export const normalizeId = (pluginName: string, orgName: string, type: PLUGIN_TYPES) => {
|
|
14
14
|
const re = new RegExp(`-?${type}$`, 'i');
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const nameRegex = new RegExp('[^0-9a-z]', 'g');
|
|
16
|
+
|
|
17
|
+
const newPluginName = pluginName.replace(re, '').replace(nameRegex, '');
|
|
18
|
+
const newOrgName = orgName.replace(nameRegex, '');
|
|
19
|
+
return changeCase.lowerCase(newOrgName) + '-' + changeCase.lowerCase(newPluginName) + `-${type}`;
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
// Needed when we are rendering the templates outside of the context of Plop but still would like to support the same helpers
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
|
|
3
3
|
"type": "app",
|
|
4
4
|
"name": "{{ titleCase pluginName }}",
|
|
5
|
-
"id": "{{ normalize_id pluginName orgName 'app' }}",
|
|
5
|
+
"id": "{{ normalize_id pluginName orgName 'app' }}",{{#if hasBackend}}
|
|
6
|
+
"backend": true,
|
|
7
|
+
"executable": "gpx_{{ snakeCase pluginName }}",{{/if}}
|
|
6
8
|
"info": {
|
|
9
|
+
"keywords": ["app"],
|
|
7
10
|
"description": "{{ sentenceCase pluginDescription }}",
|
|
8
11
|
"author": {
|
|
9
12
|
"name": "{{ sentenceCase orgName }}"
|
package/templates/backend/go.mod
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}
|
|
2
2
|
|
|
3
|
-
go 1.
|
|
3
|
+
go 1.19
|
|
4
4
|
|
|
5
|
-
require github.com/grafana/grafana-plugin-sdk-go v0.
|
|
5
|
+
require github.com/grafana/grafana-plugin-sdk-go v0.141.0
|
|
6
|
+
|
|
7
|
+
require (
|
|
8
|
+
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
|
|
9
|
+
github.com/beorn7/perks v1.0.1 // indirect
|
|
10
|
+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
|
11
|
+
github.com/cheekybits/genny v1.0.0 // indirect
|
|
12
|
+
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2 // indirect
|
|
13
|
+
github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac // indirect
|
|
14
|
+
github.com/fatih/color v1.7.0 // indirect
|
|
15
|
+
github.com/getkin/kin-openapi v0.94.0 // indirect
|
|
16
|
+
github.com/ghodss/yaml v1.0.0 // indirect
|
|
17
|
+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
|
18
|
+
github.com/go-openapi/swag v0.19.15 // indirect
|
|
19
|
+
github.com/golang/protobuf v1.5.2 // indirect
|
|
20
|
+
github.com/golang/snappy v0.0.3 // indirect
|
|
21
|
+
github.com/google/flatbuffers v2.0.0+incompatible // indirect
|
|
22
|
+
github.com/google/go-cmp v0.5.7 // indirect
|
|
23
|
+
github.com/google/uuid v1.3.0 // indirect
|
|
24
|
+
github.com/gorilla/mux v1.8.0 // indirect
|
|
25
|
+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
|
26
|
+
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
|
27
|
+
github.com/hashicorp/go-hclog v0.14.1 // indirect
|
|
28
|
+
github.com/hashicorp/go-plugin v1.4.3 // indirect
|
|
29
|
+
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
|
|
30
|
+
github.com/josharian/intern v1.0.0 // indirect
|
|
31
|
+
github.com/json-iterator/go v1.1.12 // indirect
|
|
32
|
+
github.com/klauspost/compress v1.13.1 // indirect
|
|
33
|
+
github.com/magefile/mage v1.13.0 // indirect
|
|
34
|
+
github.com/mailru/easyjson v0.7.7 // indirect
|
|
35
|
+
github.com/mattetti/filebuffer v1.0.1 // indirect
|
|
36
|
+
github.com/mattn/go-colorable v0.1.4 // indirect
|
|
37
|
+
github.com/mattn/go-isatty v0.0.10 // indirect
|
|
38
|
+
github.com/mattn/go-runewidth v0.0.9 // indirect
|
|
39
|
+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
|
40
|
+
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
|
41
|
+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
42
|
+
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
43
|
+
github.com/oklog/run v1.0.0 // indirect
|
|
44
|
+
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
|
45
|
+
github.com/pierrec/lz4/v4 v4.1.8 // indirect
|
|
46
|
+
github.com/prometheus/client_golang v1.12.1 // indirect
|
|
47
|
+
github.com/prometheus/client_model v0.2.0 // indirect
|
|
48
|
+
github.com/prometheus/common v0.32.1 // indirect
|
|
49
|
+
github.com/prometheus/procfs v0.7.3 // indirect
|
|
50
|
+
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
|
|
51
|
+
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
|
|
52
|
+
golang.org/x/text v0.3.6 // indirect
|
|
53
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
|
54
|
+
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79 // indirect
|
|
55
|
+
google.golang.org/grpc v1.41.0 // indirect
|
|
56
|
+
google.golang.org/protobuf v1.27.1 // indirect
|
|
57
|
+
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
58
|
+
)
|
package/templates/backend/go.sum
CHANGED
|
@@ -41,14 +41,22 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
|
|
|
41
41
|
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
|
42
42
|
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
|
43
43
|
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
|
44
|
+
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 h1:q4dksr6ICHXqG5hm0ZW5IHyeEJXoIJSOZeBLmWPNeIQ=
|
|
44
45
|
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs=
|
|
45
46
|
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
|
46
47
|
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
|
48
|
+
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
|
47
49
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
|
48
50
|
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
|
49
51
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
|
50
52
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
|
53
|
+
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
|
54
|
+
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
|
55
|
+
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
|
|
51
56
|
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
|
|
57
|
+
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2 h1:XCdvHbz3LhewBHN7+mQPx0sg/Hxil/1USnBmxkjHcmY=
|
|
58
|
+
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2/go.mod h1:At5TxYYdxkbQL0TSefRjhLE3Q0lgvqKKMSFUglJ7i1U=
|
|
59
|
+
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
|
|
52
60
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
|
53
61
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
|
54
62
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
|
@@ -57,8 +65,14 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
|
|
|
57
65
|
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
|
58
66
|
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
|
59
67
|
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
|
68
|
+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
|
60
69
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
70
|
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
61
71
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
72
|
+
github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac h1:XDAn206aIqKPdF5YczuuJXSQPx+WOen0Pxbxp5Fq8Pg=
|
|
73
|
+
github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
|
74
|
+
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
|
|
75
|
+
github.com/elazarl/goproxy/ext v0.0.0-20220115173737-adb46da277ac h1:9yrT5tmn9Zc0ytWPASlaPwQfQMQYnRf0RSDe1XvHw0Q=
|
|
62
76
|
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
63
77
|
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
64
78
|
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
|
@@ -67,9 +81,13 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m
|
|
|
67
81
|
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
|
68
82
|
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
|
69
83
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
|
84
|
+
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
|
70
85
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
|
71
86
|
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
|
72
87
|
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
|
88
|
+
github.com/getkin/kin-openapi v0.94.0 h1:bAxg2vxgnHHHoeefVdmGbR+oxtJlcv5HsJJa3qmAHuo=
|
|
89
|
+
github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q=
|
|
90
|
+
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
|
73
91
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
|
74
92
|
github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g=
|
|
75
93
|
github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks=
|
|
@@ -85,6 +103,11 @@ github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2C
|
|
|
85
103
|
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
|
86
104
|
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
|
87
105
|
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
|
106
|
+
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
|
107
|
+
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
|
108
|
+
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
|
109
|
+
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
|
110
|
+
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
|
88
111
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
|
89
112
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
|
90
113
|
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
@@ -115,10 +138,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
|
|
|
115
138
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
116
139
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
117
140
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
|
141
|
+
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
|
118
142
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
|
143
|
+
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
|
|
119
144
|
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
120
145
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
|
121
146
|
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
|
147
|
+
github.com/google/flatbuffers v2.0.0+incompatible h1:dicJ2oXwypfwUGnB2/TYWYEKiuk9eYQlQO/AnOHl5mI=
|
|
122
148
|
github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
|
|
123
149
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
|
124
150
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
@@ -130,6 +156,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|
|
130
156
|
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
131
157
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
132
158
|
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
159
|
+
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
|
160
|
+
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
|
133
161
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
134
162
|
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
|
135
163
|
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
|
@@ -142,25 +170,38 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf
|
|
|
142
170
|
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
|
143
171
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
|
144
172
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
173
|
+
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
|
174
|
+
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
145
175
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
|
146
176
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
|
147
|
-
github.com/
|
|
148
|
-
github.com/
|
|
177
|
+
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
|
178
|
+
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
|
179
|
+
github.com/grafana/grafana-plugin-sdk-go v0.141.0 h1:BvoeJCjBxijGzujamVvmMTdb+Ex+vIxa4YGcf3GGsjo=
|
|
180
|
+
github.com/grafana/grafana-plugin-sdk-go v0.141.0/go.mod h1:srvRQ+de4C5h7FqA5lSFUkFCs5pJolWT+PGV2AyBOFk=
|
|
181
|
+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
|
|
149
182
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
|
|
183
|
+
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
|
150
184
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
|
151
185
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
|
186
|
+
github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU=
|
|
152
187
|
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
|
188
|
+
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
|
|
153
189
|
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
|
|
154
190
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
|
155
191
|
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
|
156
192
|
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
|
193
|
+
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
|
|
157
194
|
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
|
158
195
|
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
|
196
|
+
github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE=
|
|
159
197
|
github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74=
|
|
198
|
+
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
|
199
|
+
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
|
160
200
|
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
|
161
201
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
|
162
202
|
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
163
203
|
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
204
|
+
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
|
164
205
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
|
165
206
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
|
166
207
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
|
@@ -170,6 +211,7 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+
|
|
|
170
211
|
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
|
171
212
|
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
|
172
213
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
214
|
+
github.com/klauspost/compress v1.13.1 h1:wXr2uRxZTJXHLly6qhJabee5JqIhTRoLBhDOA74hDEQ=
|
|
173
215
|
github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
|
174
216
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
175
217
|
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
@@ -177,50 +219,79 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
|
|
|
177
219
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
|
178
220
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|
179
221
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|
180
|
-
github.com/
|
|
222
|
+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|
223
|
+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
|
224
|
+
github.com/magefile/mage v1.13.0 h1:XtLJl8bcCM7EFoO8FyH8XK3t7G5hQAeK+i4tq+veT9M=
|
|
225
|
+
github.com/magefile/mage v1.13.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
|
226
|
+
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
|
227
|
+
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
|
228
|
+
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
|
229
|
+
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
|
230
|
+
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
|
231
|
+
github.com/mattetti/filebuffer v1.0.1 h1:gG7pyfnSIZCxdoKq+cPa8T0hhYtD9NxCdI4D7PTjRLM=
|
|
181
232
|
github.com/mattetti/filebuffer v1.0.1/go.mod h1:YdMURNDOttIiruleeVr6f56OrMc+MydEnTcXwtkxNVs=
|
|
233
|
+
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
|
182
234
|
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
|
183
235
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
|
236
|
+
github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10=
|
|
184
237
|
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
|
238
|
+
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
|
185
239
|
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
|
240
|
+
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
|
186
241
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
|
187
242
|
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
|
243
|
+
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
|
|
188
244
|
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
|
189
|
-
github.com/mitchellh/reflectwalk v1.0.2
|
|
245
|
+
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
|
190
246
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
247
|
+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
|
191
248
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
192
249
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
193
250
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
251
|
+
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
|
194
252
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
|
195
253
|
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
|
196
254
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
|
255
|
+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
|
256
|
+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
|
257
|
+
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
|
|
197
258
|
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
|
259
|
+
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
|
198
260
|
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
|
199
261
|
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
|
200
262
|
github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY=
|
|
201
263
|
github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
|
264
|
+
github.com/pierrec/lz4/v4 v4.1.8 h1:ieHkV+i2BRzngO4Wd/3HGowuZStgq6QkPsD1eolNAO4=
|
|
202
265
|
github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
|
203
266
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
204
267
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
205
268
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
269
|
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
206
270
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
207
271
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
|
208
272
|
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
|
209
273
|
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
|
210
274
|
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
|
275
|
+
github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk=
|
|
276
|
+
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
|
211
277
|
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
|
212
278
|
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
213
279
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
280
|
+
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
|
214
281
|
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
215
282
|
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
|
216
283
|
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
|
217
284
|
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
|
285
|
+
github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
|
|
218
286
|
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
|
219
287
|
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
|
220
288
|
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
|
221
289
|
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
|
222
290
|
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
|
291
|
+
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
|
|
292
|
+
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
|
223
293
|
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
|
294
|
+
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
|
|
224
295
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
|
225
296
|
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
|
226
297
|
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
|
@@ -232,7 +303,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
|
|
|
232
303
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
233
304
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
|
234
305
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
306
|
+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
235
307
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
308
|
+
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
|
236
309
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
237
310
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
238
311
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
@@ -266,6 +339,7 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0
|
|
|
266
339
|
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
|
267
340
|
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
|
268
341
|
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
|
342
|
+
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=
|
|
269
343
|
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
|
270
344
|
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
|
271
345
|
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
|
@@ -328,6 +402,7 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
|
|
|
328
402
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
329
403
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
|
330
404
|
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
|
405
|
+
golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q=
|
|
331
406
|
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
|
332
407
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
|
333
408
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
|
@@ -388,6 +463,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
|
|
|
388
463
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
389
464
|
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
390
465
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
466
|
+
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
|
|
467
|
+
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
391
468
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
392
469
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
393
470
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
@@ -395,6 +472,7 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
|
|
|
395
472
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|
396
473
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
397
474
|
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
475
|
+
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
|
398
476
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
399
477
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
400
478
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
@@ -448,9 +526,11 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
|
448
526
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
449
527
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
450
528
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
529
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
451
530
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
452
531
|
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
|
453
532
|
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
|
|
533
|
+
gonum.org/v1/gonum v0.9.3 h1:DnoIG+QAMaF5NvxnGe/oKsgKcAc6PcUyl8q0VetfQ8s=
|
|
454
534
|
gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0=
|
|
455
535
|
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
|
456
536
|
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
|
|
@@ -509,6 +589,7 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
|
|
|
509
589
|
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
510
590
|
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
511
591
|
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
592
|
+
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79 h1:s1jFTXJryg4a1mew7xv03VZD8N9XjxFhk1o4Js4WvPQ=
|
|
512
593
|
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79/go.mod h1:yiaVoXHpRzHGyxV3o4DktVWY4mSUErTKaeEOq6C3t3U=
|
|
513
594
|
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
|
514
595
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
|
@@ -527,6 +608,7 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp
|
|
|
527
608
|
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
|
528
609
|
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
|
529
610
|
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
|
611
|
+
google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E=
|
|
530
612
|
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
|
|
531
613
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
532
614
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
@@ -540,11 +622,14 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|
|
540
622
|
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
|
541
623
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
|
542
624
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
625
|
+
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
|
543
626
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
544
627
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
|
545
628
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
546
629
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
547
630
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
631
|
+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
|
632
|
+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
548
633
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
|
549
634
|
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
550
635
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
@@ -552,9 +637,11 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
|
552
637
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
553
638
|
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
554
639
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
640
|
+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
555
641
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
556
642
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
557
643
|
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
644
|
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
|
558
645
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
559
646
|
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
560
647
|
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
|
+
moduleNameMapper: {
|
|
9
|
+
"\\.(css|scss|sass)$": "identity-obj-proxy",
|
|
10
|
+
},
|
|
11
|
+
modulePaths: ['<rootDir>/src'],
|
|
12
|
+
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
|
|
8
13
|
testEnvironment: 'jest-environment-jsdom',
|
|
9
14
|
testMatch: [
|
|
10
15
|
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
|
|
@@ -27,5 +32,4 @@ module.exports = {
|
|
|
27
32
|
},
|
|
28
33
|
],
|
|
29
34
|
},
|
|
30
|
-
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
|
|
31
35
|
};
|
|
@@ -60,7 +60,7 @@ const config = async (env): Promise<Configuration> => ({
|
|
|
60
60
|
const stripPrefix = (request) => request.substr(prefix.length);
|
|
61
61
|
|
|
62
62
|
if (hasPrefix(request)) {
|
|
63
|
-
return callback(
|
|
63
|
+
return callback(undefined, stripPrefix(request));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
callback();
|
|
@@ -91,35 +91,46 @@ const config = async (env): Promise<Configuration> => ({
|
|
|
91
91
|
},
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
|
+
{
|
|
95
|
+
test: /\.css$/,
|
|
96
|
+
use: ["style-loader", "css-loader"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
exclude: /(node_modules)/,
|
|
100
|
+
test: /\.s[ac]ss$/,
|
|
101
|
+
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
102
|
+
},
|
|
94
103
|
{
|
|
95
104
|
test: /\.(png|jpe?g|gif|svg)$/,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
+
type: 'asset/resource',
|
|
106
|
+
generator: {
|
|
107
|
+
// Keep publicPath relative for host.com/grafana/ deployments
|
|
108
|
+
publicPath: `public/plugins/${getPluginId()}/img/`,
|
|
109
|
+
outputPath: 'img/',
|
|
110
|
+
filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]',
|
|
111
|
+
},
|
|
105
112
|
},
|
|
106
113
|
{
|
|
107
114
|
test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
type: 'asset/resource',
|
|
116
|
+
generator: {
|
|
110
117
|
// Keep publicPath relative for host.com/grafana/ deployments
|
|
111
118
|
publicPath: `public/plugins/${getPluginId()}/fonts`,
|
|
112
|
-
outputPath: 'fonts',
|
|
113
|
-
|
|
119
|
+
outputPath: 'fonts/',
|
|
120
|
+
filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]',
|
|
114
121
|
},
|
|
115
122
|
},
|
|
116
123
|
],
|
|
117
124
|
},
|
|
118
125
|
|
|
119
126
|
output: {
|
|
120
|
-
clean:
|
|
127
|
+
clean: {
|
|
128
|
+
keep: /gpx_.*/,
|
|
129
|
+
},
|
|
121
130
|
filename: '[name].js',
|
|
122
|
-
|
|
131
|
+
library: {
|
|
132
|
+
type: 'amd',
|
|
133
|
+
},
|
|
123
134
|
path: path.resolve(process.cwd(), DIST_DIR),
|
|
124
135
|
publicPath: '/',
|
|
125
136
|
},
|
|
@@ -179,6 +190,8 @@ const config = async (env): Promise<Configuration> => ({
|
|
|
179
190
|
|
|
180
191
|
resolve: {
|
|
181
192
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
193
|
+
// handle resolving "rootDir" paths
|
|
194
|
+
modules: [path.resolve(process.cwd(), 'src'), 'node_modules'],
|
|
182
195
|
unsafeCache: true,
|
|
183
196
|
},
|
|
184
197
|
});
|
package/templates/common/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
36
36
|
"@typescript-eslint/parser": "^4.33.0",
|
|
37
37
|
"copy-webpack-plugin": "^10.0.0",
|
|
38
|
+
"css-loader": "6.7.1",
|
|
38
39
|
"eslint": "^7.32.0",
|
|
39
40
|
"eslint-config-prettier": "^8.3.0",
|
|
40
41
|
"eslint-plugin-jsdoc": "^36.1.0",
|
|
@@ -43,10 +44,14 @@
|
|
|
43
44
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
44
45
|
"eslint-webpack-plugin": "^3.1.1",
|
|
45
46
|
"glob": "^8.0.3",
|
|
47
|
+
"identity-obj-proxy": "3.0.0",
|
|
46
48
|
"jest": "27.5.0",
|
|
47
49
|
"fork-ts-checker-webpack-plugin": "^7.2.0",
|
|
48
50
|
"prettier": "^2.5.0",
|
|
49
51
|
"replace-in-file-webpack-plugin": "^1.0.6",
|
|
52
|
+
"sass": "1.55.0",
|
|
53
|
+
"sass-loader": "13.1.0",
|
|
54
|
+
"style-loader": "3.3.1",
|
|
50
55
|
"swc-loader": "^0.1.15",
|
|
51
56
|
"tsconfig-paths": "^3.12.0",
|
|
52
57
|
"ts-node": "^10.5.0",
|
|
@@ -56,7 +61,7 @@
|
|
|
56
61
|
"webpack-livereload-plugin": "^3.0.2"
|
|
57
62
|
},
|
|
58
63
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
64
|
+
"node": ">=16"
|
|
60
65
|
},
|
|
61
66
|
"dependencies": {
|
|
62
67
|
"@emotion/css": "^11.1.3",
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"type": "datasource",
|
|
4
4
|
"name": "{{ titleCase pluginName }}",
|
|
5
5
|
"id": "{{ normalize_id pluginName orgName 'datasource' }}",
|
|
6
|
-
"metrics": true,
|
|
6
|
+
"metrics": true,{{#if hasBackend}}
|
|
7
7
|
"backend": true,
|
|
8
|
-
"executable": "gpx_{{ snakeCase pluginName }}",
|
|
8
|
+
"executable": "gpx_{{ snakeCase pluginName }}",{{/if}}
|
|
9
9
|
"info": {
|
|
10
10
|
"description": "{{ sentenceCase pluginDescription }}",
|
|
11
11
|
"author": {
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
- name: Setup Node.js environment
|
|
18
18
|
uses: actions/setup-node@v2.1.2
|
|
19
19
|
with:
|
|
20
|
-
node-version: '
|
|
20
|
+
node-version: '16.x'
|
|
21
21
|
|
|
22
22
|
- name: Get yarn cache directory path
|
|
23
23
|
id: yarn-cache-dir-path
|
|
@@ -47,6 +47,15 @@ jobs:
|
|
|
47
47
|
- name: Build and test frontend
|
|
48
48
|
run: yarn build
|
|
49
49
|
|
|
50
|
+
- name: Start grafana docker
|
|
51
|
+
run: yarn server -d
|
|
52
|
+
|
|
53
|
+
- name: Run e2e tests
|
|
54
|
+
run: yarn e2e
|
|
55
|
+
|
|
56
|
+
- name: stop grafana docker
|
|
57
|
+
run: docker-compose down
|
|
58
|
+
|
|
50
59
|
- name: Check for backend
|
|
51
60
|
id: check-for-backend
|
|
52
61
|
run: |
|
|
@@ -59,7 +68,7 @@ jobs:
|
|
|
59
68
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|
|
60
69
|
uses: actions/setup-go@v2
|
|
61
70
|
with:
|
|
62
|
-
go-version: '1.
|
|
71
|
+
go-version: '1.19'
|
|
63
72
|
|
|
64
73
|
- name: Test backend
|
|
65
74
|
if: steps.check-for-backend.outputs.has-backend == 'true'
|