@grafana/create-plugin 1.5.0 → 1.5.1-canary.265.10fecde.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/dist/commands/generate.plopfile.js +2 -1
- package/package.json +2 -2
- package/scripts/generate-app-backend.js +14 -9
- package/scripts/generate-app.js +14 -9
- package/scripts/generate-datasource-with-backend.js +14 -9
- package/scripts/generate-datasource-without-backend.js +14 -9
- package/scripts/generate-panel.js +13 -8
- package/scripts/generate-scenes-app.js +14 -9
- package/src/commands/generate.plopfile.ts +1 -0
- package/src/commands/types.ts +1 -0
- package/templates/common/package.json +1 -1
|
@@ -106,7 +106,8 @@ function default_1(plop) {
|
|
|
106
106
|
packageManagerName: packageManagerName,
|
|
107
107
|
packageManagerInstallCmd: packageManagerInstallCmd,
|
|
108
108
|
packageManagerVersion: packageManagerVersion,
|
|
109
|
-
isAppType: isAppType
|
|
109
|
+
isAppType: isAppType,
|
|
110
|
+
isNPM: packageManagerName === 'npm'
|
|
110
111
|
};
|
|
111
112
|
var commonActions = getActionsForTemplateFolder({
|
|
112
113
|
folderPath: constants_1.TEMPLATE_PATHS.common,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "1.5.0",
|
|
3
|
+
"version": "1.5.1-canary.265.10fecde.0",
|
|
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": "
|
|
69
|
+
"gitHead": "10fecde3e766fd86391a3fa491d61ef7743c8533"
|
|
70
70
|
}
|
|
@@ -10,15 +10,20 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated app with backend',
|
|
18
|
+
pluginType: 'app',
|
|
19
|
+
hasBackend: true,
|
|
20
|
+
hasGithubWorkflows: true,
|
|
21
|
+
hasGithubLevitateWorkflow: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
onFailure: console.error,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
generate();
|
package/scripts/generate-app.js
CHANGED
|
@@ -10,15 +10,20 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated app',
|
|
18
|
+
pluginType: 'app',
|
|
19
|
+
hasBackend: false,
|
|
20
|
+
hasGithubWorkflows: true,
|
|
21
|
+
hasGithubLevitateWorkflow: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
onFailure: console.error,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
generate();
|
|
@@ -10,15 +10,20 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated datasource',
|
|
18
|
+
pluginType: 'datasource',
|
|
19
|
+
hasBackend: true,
|
|
20
|
+
hasGithubWorkflows: true,
|
|
21
|
+
hasGithubLevitateWorkflow: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
onFailure: console.error,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
generate();
|
|
@@ -10,15 +10,20 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated datasource',
|
|
18
|
+
pluginType: 'datasource',
|
|
19
|
+
hasBackend: false,
|
|
20
|
+
hasGithubWorkflows: true,
|
|
21
|
+
hasGithubLevitateWorkflow: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
onFailure: console.error,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
generate();
|
|
@@ -10,14 +10,19 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated panel',
|
|
18
|
+
pluginType: 'panel',
|
|
19
|
+
hasGithubWorkflows: true,
|
|
20
|
+
hasGithubLevitateWorkflow: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
onFailure: console.error,
|
|
24
|
+
}
|
|
25
|
+
);
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
generate();
|
|
@@ -10,15 +10,20 @@ async function generate() {
|
|
|
10
10
|
}
|
|
11
11
|
const plop = await nodePlop(plopFile);
|
|
12
12
|
const generator = plop.getGenerator('create-plugin');
|
|
13
|
-
await generator.runActions(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
await generator.runActions(
|
|
14
|
+
{
|
|
15
|
+
pluginName: 'my-plugin',
|
|
16
|
+
orgName: 'my-org',
|
|
17
|
+
pluginDescription: 'Auto-generated scenes app',
|
|
18
|
+
pluginType: 'scenesapp',
|
|
19
|
+
hasBackend: false,
|
|
20
|
+
hasGithubWorkflows: true,
|
|
21
|
+
hasGithubLevitateWorkflow: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
onFailure: console.error,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
generate();
|
|
@@ -95,6 +95,7 @@ export default function (plop: NodePlopAPI) {
|
|
|
95
95
|
packageManagerInstallCmd,
|
|
96
96
|
packageManagerVersion,
|
|
97
97
|
isAppType,
|
|
98
|
+
isNPM: packageManagerName === 'npm'
|
|
98
99
|
};
|
|
99
100
|
// Copy over files that are shared between plugins types
|
|
100
101
|
const commonActions = getActionsForTemplateFolder({
|
package/src/commands/types.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"test:ci": "jest --passWithNoTests --maxWorkers 4",
|
|
10
10
|
"typecheck": "tsc --noEmit",
|
|
11
11
|
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
|
|
12
|
-
"lint:fix": "{{ packageManagerName }} run lint --fix",
|
|
12
|
+
"lint:fix": "{{ packageManagerName }} run lint{{#if isNPM}} --{{/if}} --fix",
|
|
13
13
|
"e2e": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run",
|
|
14
14
|
"e2e:update": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run --update-screenshots",
|
|
15
15
|
"server": "docker-compose up --build",
|