@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.
@@ -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": "cbf24b16b6fbdcf7af2208d96e164db5d68e570c"
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
- pluginName: 'my-plugin',
15
- orgName: 'my-org',
16
- pluginDescription: 'Auto-generated app with backend',
17
- pluginType: 'app',
18
- hasBackend: true,
19
- hasGithubWorkflows: true,
20
- hasGithubLevitateWorkflow: true,
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();
@@ -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
- 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
- });
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
- 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
- });
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
- pluginName: 'my-plugin',
15
- orgName: 'my-org',
16
- pluginDescription: 'Auto-generated datasource',
17
- pluginType: 'datasource',
18
- hasBackend: false,
19
- hasGithubWorkflows: true,
20
- hasGithubLevitateWorkflow: true,
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
- pluginName: 'my-plugin',
15
- orgName: 'my-org',
16
- pluginDescription: 'Auto-generated panel',
17
- pluginType: 'panel',
18
- hasGithubWorkflows: true,
19
- hasGithubLevitateWorkflow: true,
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
- pluginName: 'my-plugin',
15
- orgName: 'my-org',
16
- pluginDescription: 'Auto-generated scenes app',
17
- pluginType: 'scenesapp',
18
- hasBackend: false,
19
- hasGithubWorkflows: true,
20
- hasGithubLevitateWorkflow: true,
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({
@@ -16,4 +16,5 @@ export type TemplateData = {
16
16
  packageManagerInstallCmd: string;
17
17
  packageManagerVersion: string;
18
18
  isAppType: boolean;
19
+ isNPM: boolean;
19
20
  };
@@ -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",