@grafana/create-plugin 6.7.0 → 6.7.1-canary.2369.20789129388.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "6.7.0",
3
+ "version": "6.7.1-canary.2369.20789129388.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -55,5 +55,5 @@
55
55
  "engines": {
56
56
  "node": ">=20"
57
57
  },
58
- "gitHead": "64e06e63f0c050e9f06a2b63a2f531497b06959f"
58
+ "gitHead": "86a8dda0b9abceb324dc71b188653abd1f53cdf9"
59
59
  }
@@ -161,14 +161,10 @@ const config = async (env): Promise<Configuration> => {
161
161
  { from: 'plugin.json', to: '.' },
162
162
  { from: '../LICENSE', to: '.' },
163
163
  { from: '../CHANGELOG.md', to: '.', force: true },
164
- { from: '**/*.json', to: '.' }, // TODO<Add an error for checking the basic structure of the repo>
165
- { from: '**/*.svg', to: '.', noErrorOnMissing: true }, // Optional
166
- { from: '**/*.png', to: '.', noErrorOnMissing: true }, // Optional
167
- { from: '**/*.html', to: '.', noErrorOnMissing: true }, // Optional
168
- { from: 'img/**/*', to: '.', noErrorOnMissing: true }, // Optional
169
- { from: 'libs/**/*', to: '.', noErrorOnMissing: true }, // Optional
170
- { from: 'static/**/*', to: '.', noErrorOnMissing: true }, // Optional
171
- { from: '**/query_help.md', to: '.', noErrorOnMissing: true }, // Optional
164
+ { from: '**/*.json', to: '.' },
165
+ { from: 'img/logo.svg', to: '.', noErrorOnMissing: true },
166
+ { from: 'img/screenshots/**/*', to: '.', noErrorOnMissing: true },
167
+ { from: '**/query_help.md', to: '.', noErrorOnMissing: true },
172
168
  ],
173
169
  }),
174
170
  // Replace certain template-variables in the README and plugin.json
@@ -36,6 +36,18 @@ __webpack_public_path__ =
36
36
  `,
37
37
  });
38
38
 
39
+ const logoPaths = Array.from(
40
+ new Set([
41
+ pluginJson.info?.logos?.large,
42
+ pluginJson.info?.logos?.small,
43
+ ])
44
+ ).filter(Boolean);
45
+
46
+ const screenshotPaths =
47
+ Array.from(
48
+ new Set(pluginJson.info?.screenshots?.map((s) => s.path))
49
+ ).filter(Boolean) || [];
50
+
39
51
  export type Env = {
40
52
  [key: string]: true | string | Env;
41
53
  };
@@ -174,13 +186,10 @@ const config = async (env: Env): Promise<Configuration> => {
174
186
  { from: '../LICENSE', to: '.' },
175
187
  { from: '../CHANGELOG.md', to: '.', force: true },
176
188
  { from: '**/*.json', to: '.' },
177
- { from: '**/*.svg', to: '.', noErrorOnMissing: true },
178
- { from: '**/*.png', to: '.', noErrorOnMissing: true },
179
- { from: '**/*.html', to: '.', noErrorOnMissing: true },
180
- { from: 'img/**/*', to: '.', noErrorOnMissing: true },
181
- { from: 'libs/**/*', to: '.', noErrorOnMissing: true },
182
- { from: 'static/**/*', to: '.', noErrorOnMissing: true },
183
189
  { from: '**/query_help.md', to: '.', noErrorOnMissing: true },
190
+ ...logoPaths.map((logoPath) => ({ from: logoPath, to: '.', noErrorOnMissing: true })),
191
+ ...screenshotPaths.map((screenshotPath) => ({
192
+ from: screenshotPath, to: '.', noErrorOnMissing: true })),
184
193
  ],
185
194
  }),
186
195
  // Replace certain template-variables in the README and plugin.json