@backstage/cli 0.18.0-next.2 → 0.18.1-next.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/cjs/{Lockfile-48dc675e.cjs.js → Lockfile-72b7072e.cjs.js} +25 -9
  3. package/dist/cjs/{PackageGraph-eed8a266.cjs.js → PackageGraph-6e1d4bd4.cjs.js} +17 -9
  4. package/dist/cjs/{build-90333828.cjs.js → build-3b11f7c9.cjs.js} +26 -15
  5. package/dist/cjs/{buildBackend-15dcc9d1.cjs.js → buildBackend-87996ad4.cjs.js} +61 -36
  6. package/dist/cjs/{buildWorkspace-09b15e59.cjs.js → buildWorkspace-425726da.cjs.js} +7 -7
  7. package/dist/cjs/{bump-19eae695.cjs.js → bump-f3c6b3cd.cjs.js} +88 -33
  8. package/dist/cjs/{clean-1999125e.cjs.js → clean-798512b5.cjs.js} +2 -2
  9. package/dist/cjs/{config-1ed90d1b.cjs.js → config-4a59f918.cjs.js} +15 -11
  10. package/dist/cjs/{create-75806130.cjs.js → create-a7269bb5.cjs.js} +80 -32
  11. package/dist/cjs/{createDistWorkspace-df9a4512.cjs.js → createDistWorkspace-cb9a9a84.cjs.js} +137 -65
  12. package/dist/cjs/{createPlugin-ef3ded6f.cjs.js → createPlugin-fca2c26e.cjs.js} +69 -30
  13. package/dist/cjs/{diff-50c4c806.cjs.js → diff-3dec490d.cjs.js} +68 -16
  14. package/dist/cjs/{docs-a206c58a.cjs.js → docs-e60d4fe7.cjs.js} +9 -5
  15. package/dist/cjs/{fix-c1a9161a.cjs.js → fix-b60a5395.cjs.js} +17 -7
  16. package/dist/cjs/{index-fb1178a3.cjs.js → index-131467e2.cjs.js} +10 -10
  17. package/dist/cjs/{index-5eb1b9d1.cjs.js → index-50703ee1.cjs.js} +162 -61
  18. package/dist/cjs/{index-f360881b.cjs.js → index-71d143d5.cjs.js} +57 -38
  19. package/dist/cjs/{index-c4f237a6.cjs.js → index-7efbd23e.cjs.js} +39 -12
  20. package/dist/cjs/{info-a38fff05.cjs.js → info-04610119.cjs.js} +20 -6
  21. package/dist/cjs/{install-9b4107af.cjs.js → install-589f1c25.cjs.js} +44 -17
  22. package/dist/cjs/{lint-3f8ff7a2.cjs.js → lint-41010f96.cjs.js} +37 -11
  23. package/dist/cjs/{lint-31ebf6d6.cjs.js → lint-6fcb9a70.cjs.js} +5 -3
  24. package/dist/cjs/{lint-1940d48c.cjs.js → lint-7f6b0d33.cjs.js} +4 -4
  25. package/dist/cjs/{list-deprecations-4f164324.cjs.js → list-deprecations-8aee2123.cjs.js} +3 -3
  26. package/dist/cjs/{pack-3c75d41f.cjs.js → pack-91881c2f.cjs.js} +17 -11
  27. package/dist/cjs/packageLintConfigs-f9e5fcc6.cjs.js +83 -0
  28. package/dist/cjs/packageRole-16eb6c89.cjs.js +59 -0
  29. package/dist/cjs/{packageRoles-55976918.cjs.js → packageRoles-96528891.cjs.js} +5 -3
  30. package/dist/cjs/packageScripts-eb2443c2.cjs.js +98 -0
  31. package/dist/cjs/{packages-afc2547c.cjs.js → packages-1b40c101.cjs.js} +17 -12
  32. package/dist/cjs/parallel-a8f6219c.cjs.js +187 -0
  33. package/dist/cjs/{paths-ed6a0ed3.cjs.js → paths-b34f135a.cjs.js} +100 -55
  34. package/dist/cjs/{print-79b2229c.cjs.js → print-e99d7c2e.cjs.js} +4 -4
  35. package/dist/cjs/{run-93365c94.cjs.js → run-722b1384.cjs.js} +2 -2
  36. package/dist/cjs/{schema-986415f5.cjs.js → schema-c636e913.cjs.js} +9 -5
  37. package/dist/cjs/{tasks-45f84735.cjs.js → tasks-4776baa6.cjs.js} +29 -12
  38. package/dist/cjs/{test-efcb2e7f.cjs.js → test-76539f57.cjs.js} +3 -3
  39. package/dist/cjs/{validate-79d8747b.cjs.js → validate-f9273594.cjs.js} +4 -4
  40. package/dist/index.cjs.js +1 -1
  41. package/package.json +22 -22
  42. package/templates/default-backend-plugin/package.json.hbs +1 -1
  43. package/templates/default-plugin/package.json.hbs +1 -1
  44. package/dist/cjs/packageLintConfigs-1ca98735.cjs.js +0 -74
  45. package/dist/cjs/packageRole-c532301f.cjs.js +0 -53
  46. package/dist/cjs/packageScripts-c1adcc9a.cjs.js +0 -96
  47. package/dist/cjs/parallel-8286d3fa.cjs.js +0 -171
@@ -2,8 +2,8 @@
2
2
 
3
3
  var minimatch = require('minimatch');
4
4
  var getPackages = require('@manypkg/get-packages');
5
- var run = require('./run-93365c94.cjs.js');
6
- var index = require('./index-5eb1b9d1.cjs.js');
5
+ var run = require('./run-722b1384.cjs.js');
6
+ var index = require('./index-50703ee1.cjs.js');
7
7
 
8
8
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
9
 
@@ -32,17 +32,22 @@ async function mapDependencies(targetDir, pattern) {
32
32
  packages.push(root);
33
33
  const dependencyMap = /* @__PURE__ */ new Map();
34
34
  for (const pkg of packages) {
35
- const deps = DEP_TYPES.flatMap((t) => {
36
- var _a2;
37
- return Object.entries((_a2 = pkg.packageJson[t]) != null ? _a2 : {});
38
- });
35
+ const deps = DEP_TYPES.flatMap(
36
+ (t) => {
37
+ var _a2;
38
+ return Object.entries((_a2 = pkg.packageJson[t]) != null ? _a2 : {});
39
+ }
40
+ );
39
41
  for (const [name, range] of deps) {
40
42
  if (minimatch__default["default"](name, pattern)) {
41
- dependencyMap.set(name, ((_a = dependencyMap.get(name)) != null ? _a : []).concat({
42
- range,
43
- name: pkg.packageJson.name,
44
- location: pkg.dir
45
- }));
43
+ dependencyMap.set(
44
+ name,
45
+ ((_a = dependencyMap.get(name)) != null ? _a : []).concat({
46
+ range,
47
+ name: pkg.packageJson.name,
48
+ location: pkg.dir
49
+ })
50
+ );
46
51
  }
47
52
  }
48
53
  }
@@ -51,4 +56,4 @@ async function mapDependencies(targetDir, pattern) {
51
56
 
52
57
  exports.fetchPackageInfo = fetchPackageInfo;
53
58
  exports.mapDependencies = mapDependencies;
54
- //# sourceMappingURL=packages-afc2547c.cjs.js.map
59
+ //# sourceMappingURL=packages-1b40c101.cjs.js.map
@@ -0,0 +1,187 @@
1
+ 'use strict';
2
+
3
+ var os = require('os');
4
+ var worker_threads = require('worker_threads');
5
+
6
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
+
8
+ var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
9
+
10
+ const defaultParallelism = Math.ceil(os__default["default"].cpus().length / 2);
11
+ const PARALLEL_ENV_VAR = "BACKSTAGE_CLI_BUILD_PARALLEL";
12
+ function parseParallelismOption(parallel) {
13
+ if (parallel === void 0 || parallel === null) {
14
+ return defaultParallelism;
15
+ } else if (typeof parallel === "boolean") {
16
+ return parallel ? defaultParallelism : 1;
17
+ } else if (typeof parallel === "number" && Number.isInteger(parallel)) {
18
+ if (parallel < 1) {
19
+ return 1;
20
+ }
21
+ return parallel;
22
+ } else if (typeof parallel === "string") {
23
+ if (parallel === "true") {
24
+ return parseParallelismOption(true);
25
+ } else if (parallel === "false") {
26
+ return parseParallelismOption(false);
27
+ }
28
+ const parsed = Number(parallel);
29
+ if (Number.isInteger(parsed)) {
30
+ return parseParallelismOption(parsed);
31
+ }
32
+ }
33
+ throw Error(
34
+ `Parallel option value '${parallel}' is not a boolean or integer`
35
+ );
36
+ }
37
+ function getEnvironmentParallelism() {
38
+ return parseParallelismOption(process.env[PARALLEL_ENV_VAR]);
39
+ }
40
+ async function runParallelWorkers(options) {
41
+ const { parallelismFactor = 1, parallelismSetting, items, worker } = options;
42
+ const parallelism = parallelismSetting ? parseParallelismOption(parallelismSetting) : getEnvironmentParallelism();
43
+ const sharedIterator = items[Symbol.iterator]();
44
+ const sharedIterable = {
45
+ [Symbol.iterator]: () => sharedIterator
46
+ };
47
+ const workerCount = Math.max(Math.floor(parallelismFactor * parallelism), 1);
48
+ return Promise.all(
49
+ Array(workerCount).fill(0).map(async () => {
50
+ for (const value of sharedIterable) {
51
+ await worker(value);
52
+ }
53
+ })
54
+ );
55
+ }
56
+ async function runWorkerQueueThreads(options) {
57
+ const items = Array.from(options.items);
58
+ const {
59
+ workerFactory,
60
+ workerData,
61
+ threadCount = Math.min(getEnvironmentParallelism(), items.length)
62
+ } = options;
63
+ const iterator = items[Symbol.iterator]();
64
+ const results = new Array();
65
+ let itemIndex = 0;
66
+ await Promise.all(
67
+ Array(threadCount).fill(0).map(async () => {
68
+ const thread = new worker_threads.Worker(`(${workerQueueThread})(${workerFactory})`, {
69
+ eval: true,
70
+ workerData
71
+ });
72
+ return new Promise((resolve, reject) => {
73
+ thread.on("message", (message) => {
74
+ if (message.type === "start" || message.type === "result") {
75
+ if (message.type === "result") {
76
+ results[message.index] = message.result;
77
+ }
78
+ const { value, done } = iterator.next();
79
+ if (done) {
80
+ thread.postMessage({ type: "done" });
81
+ } else {
82
+ thread.postMessage({
83
+ type: "item",
84
+ index: itemIndex,
85
+ item: value
86
+ });
87
+ itemIndex += 1;
88
+ }
89
+ } else if (message.type === "error") {
90
+ const error = new Error(message.error.message);
91
+ error.name = message.error.name;
92
+ error.stack = message.error.stack;
93
+ reject(error);
94
+ }
95
+ });
96
+ thread.on("error", reject);
97
+ thread.on("exit", (code) => {
98
+ if (code !== 0) {
99
+ reject(new Error(`Worker thread exited with code ${code}`));
100
+ } else {
101
+ resolve();
102
+ }
103
+ });
104
+ });
105
+ })
106
+ );
107
+ return results;
108
+ }
109
+ function workerQueueThread(workerFuncFactory) {
110
+ const { parentPort, workerData } = require("worker_threads");
111
+ Promise.resolve().then(() => workerFuncFactory(workerData)).then(
112
+ (workerFunc) => {
113
+ parentPort.on("message", async (message) => {
114
+ if (message.type === "done") {
115
+ parentPort.close();
116
+ return;
117
+ }
118
+ if (message.type === "item") {
119
+ try {
120
+ const result = await workerFunc(message.item);
121
+ parentPort.postMessage({
122
+ type: "result",
123
+ index: message.index,
124
+ result
125
+ });
126
+ } catch (error) {
127
+ parentPort.postMessage({ type: "error", error });
128
+ }
129
+ }
130
+ });
131
+ parentPort.postMessage({ type: "start" });
132
+ },
133
+ (error) => parentPort.postMessage({ type: "error", error })
134
+ );
135
+ }
136
+ async function runWorkerThreads(options) {
137
+ const { worker, workerData, threadCount = 1, onMessage } = options;
138
+ return Promise.all(
139
+ Array(threadCount).fill(0).map(async () => {
140
+ const thread = new worker_threads.Worker(`(${workerThread})(${worker})`, {
141
+ eval: true,
142
+ workerData
143
+ });
144
+ return new Promise((resolve, reject) => {
145
+ thread.on("message", (message) => {
146
+ if (message.type === "result") {
147
+ resolve(message.result);
148
+ } else if (message.type === "error") {
149
+ reject(message.error);
150
+ } else if (message.type === "message") {
151
+ onMessage == null ? void 0 : onMessage(message.message);
152
+ }
153
+ });
154
+ thread.on("error", reject);
155
+ thread.on("exit", (code) => {
156
+ reject(
157
+ new Error(`Unexpected worker thread exit with code ${code}`)
158
+ );
159
+ });
160
+ });
161
+ })
162
+ );
163
+ }
164
+ function workerThread(workerFunc) {
165
+ const { parentPort, workerData } = require("worker_threads");
166
+ const sendMessage = (message) => {
167
+ parentPort.postMessage({ type: "message", message });
168
+ };
169
+ workerFunc(workerData, sendMessage).then(
170
+ (result) => {
171
+ parentPort.postMessage({
172
+ type: "result",
173
+ index: 0,
174
+ result
175
+ });
176
+ },
177
+ (error) => {
178
+ parentPort.postMessage({ type: "error", error });
179
+ }
180
+ );
181
+ }
182
+
183
+ exports.getEnvironmentParallelism = getEnvironmentParallelism;
184
+ exports.runParallelWorkers = runParallelWorkers;
185
+ exports.runWorkerQueueThreads = runWorkerQueueThreads;
186
+ exports.runWorkerThreads = runWorkerThreads;
187
+ //# sourceMappingURL=parallel-a8f6219c.cjs.js.map
@@ -12,8 +12,8 @@ var cliCommon = require('@backstage/cli-common');
12
12
  var getPackages = require('@manypkg/get-packages');
13
13
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
14
14
  var svgrTemplate = require('./svgrTemplate-550efce6.cjs.js');
15
- var index = require('./index-5eb1b9d1.cjs.js');
16
- var run = require('./run-93365c94.cjs.js');
15
+ var index = require('./index-50703ee1.cjs.js');
16
+ var run = require('./run-722b1384.cjs.js');
17
17
  var ESLintPlugin = require('eslint-webpack-plugin');
18
18
  var pickBy = require('lodash/pickBy');
19
19
 
@@ -49,10 +49,14 @@ const optimization = (options) => {
49
49
  chunks: "initial",
50
50
  test(module) {
51
51
  var _a;
52
- return Boolean((_a = module == null ? void 0 : module.resource) == null ? void 0 : _a.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/));
52
+ return Boolean(
53
+ (_a = module == null ? void 0 : module.resource) == null ? void 0 : _a.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)
54
+ );
53
55
  },
54
56
  name(module) {
55
- const packageName = module.resource.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
57
+ const packageName = module.resource.match(
58
+ /[\\/]node_modules[\\/](.*?)([\\/]|$)/
59
+ )[1];
56
60
  return packageName.replace("@", "");
57
61
  },
58
62
  filename: isDev ? "module-[name].js" : "static/module-[name].[chunkhash:8].js",
@@ -185,11 +189,13 @@ const transforms = (options) => {
185
189
  if (isDev) {
186
190
  plugins.push(new webpack__default["default"].HotModuleReplacementPlugin());
187
191
  } else {
188
- plugins.push(new MiniCssExtractPlugin__default["default"]({
189
- filename: "static/[name].[contenthash:8].css",
190
- chunkFilename: "static/[name].[id].[contenthash:8].css",
191
- insert: insertBeforeJssStyles
192
- }));
192
+ plugins.push(
193
+ new MiniCssExtractPlugin__default["default"]({
194
+ filename: "static/[name].[contenthash:8].css",
195
+ chunkFilename: "static/[name].[id].[contenthash:8].css",
196
+ insert: insertBeforeJssStyles
197
+ })
198
+ );
193
199
  }
194
200
  return { loaders, plugins };
195
201
  };
@@ -200,24 +206,38 @@ class LinkedPackageResolvePlugin {
200
206
  this.packages = packages;
201
207
  }
202
208
  apply(resolver) {
203
- resolver.hooks.resolve.tapAsync("LinkedPackageResolvePlugin", (data, context, callback) => {
204
- var _a;
205
- const pkg = this.packages.find((pkge) => data.path && cliCommon.isChildPath(pkge.dir, data.path));
206
- if (!pkg) {
207
- callback();
208
- return;
209
+ resolver.hooks.resolve.tapAsync(
210
+ "LinkedPackageResolvePlugin",
211
+ (data, context, callback) => {
212
+ var _a;
213
+ const pkg = this.packages.find(
214
+ (pkge) => data.path && cliCommon.isChildPath(pkge.dir, data.path)
215
+ );
216
+ if (!pkg) {
217
+ callback();
218
+ return;
219
+ }
220
+ const modulesLocation = path.resolve(
221
+ this.targetModules,
222
+ pkg.packageJson.name
223
+ );
224
+ const newContext = ((_a = data.context) == null ? void 0 : _a.issuer) ? {
225
+ ...data.context,
226
+ issuer: data.context.issuer.replace(pkg.dir, modulesLocation)
227
+ } : data.context;
228
+ resolver.doResolve(
229
+ resolver.hooks.resolve,
230
+ {
231
+ ...data,
232
+ context: newContext,
233
+ path: data.path && data.path.replace(pkg.dir, modulesLocation)
234
+ },
235
+ `resolve ${data.request} in ${modulesLocation}`,
236
+ context,
237
+ callback
238
+ );
209
239
  }
210
- const modulesLocation = path.resolve(this.targetModules, pkg.packageJson.name);
211
- const newContext = ((_a = data.context) == null ? void 0 : _a.issuer) ? {
212
- ...data.context,
213
- issuer: data.context.issuer.replace(pkg.dir, modulesLocation)
214
- } : data.context;
215
- resolver.doResolve(resolver.hooks.resolve, {
216
- ...data,
217
- context: newContext,
218
- path: data.path && data.path.replace(pkg.dir, modulesLocation)
219
- }, `resolve ${data.request} in ${modulesLocation}`, context, callback);
220
- });
240
+ );
221
241
  }
222
242
  }
223
243
 
@@ -243,7 +263,9 @@ async function readBuildInfo() {
243
263
  } catch (error) {
244
264
  console.warn(`WARNING: Failed to describe git version, ${error}`);
245
265
  }
246
- const { version: packageVersion } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
266
+ const { version: packageVersion } = await fs__default["default"].readJson(
267
+ index.paths.resolveTarget("package.json")
268
+ );
247
269
  return {
248
270
  cliVersion: index.version,
249
271
  gitVersion,
@@ -261,31 +283,42 @@ async function createConfig(paths, options) {
261
283
  const validBaseUrl = new URL(baseUrl);
262
284
  const publicPath = validBaseUrl.pathname.replace(/\/$/, "");
263
285
  if (checksEnabled) {
264
- plugins.push(new ForkTsCheckerWebpackPlugin__default["default"]({
265
- typescript: { configFile: paths.targetTsConfig, memoryLimit: 4096 }
266
- }), new ESLintPlugin__default["default"]({
267
- context: paths.targetPath,
268
- files: ["**", "!**/__tests__/**", "!**/?(*.)(spec|test).*"]
269
- }));
286
+ plugins.push(
287
+ new ForkTsCheckerWebpackPlugin__default["default"]({
288
+ typescript: { configFile: paths.targetTsConfig, memoryLimit: 4096 }
289
+ }),
290
+ new ESLintPlugin__default["default"]({
291
+ context: paths.targetPath,
292
+ files: ["**", "!**/__tests__/**", "!**/?(*.)(spec|test).*"]
293
+ })
294
+ );
270
295
  }
271
- plugins.push(new webpack.ProvidePlugin({
272
- process: "process/browser",
273
- Buffer: ["buffer", "Buffer"]
274
- }));
275
- plugins.push(new webpack__default["default"].EnvironmentPlugin({
276
- APP_CONFIG: options.frontendAppConfigs
277
- }));
278
- plugins.push(new HtmlWebpackPlugin__default["default"]({
279
- template: paths.targetHtml,
280
- templateParameters: {
281
- publicPath,
282
- config: frontendConfig
283
- }
284
- }));
296
+ plugins.push(
297
+ new webpack.ProvidePlugin({
298
+ process: "process/browser",
299
+ Buffer: ["buffer", "Buffer"]
300
+ })
301
+ );
302
+ plugins.push(
303
+ new webpack__default["default"].EnvironmentPlugin({
304
+ APP_CONFIG: options.frontendAppConfigs
305
+ })
306
+ );
307
+ plugins.push(
308
+ new HtmlWebpackPlugin__default["default"]({
309
+ template: paths.targetHtml,
310
+ templateParameters: {
311
+ publicPath,
312
+ config: frontendConfig
313
+ }
314
+ })
315
+ );
285
316
  const buildInfo = await readBuildInfo();
286
- plugins.push(new webpack__default["default"].DefinePlugin({
287
- "process.env.BUILD_INFO": JSON.stringify(buildInfo)
288
- }));
317
+ plugins.push(
318
+ new webpack__default["default"].DefinePlugin({
319
+ "process.env.BUILD_INFO": JSON.stringify(buildInfo)
320
+ })
321
+ );
289
322
  const resolveAliases = {};
290
323
  try {
291
324
  const { version: reactDomVersion } = require("react-dom/package.json");
@@ -328,7 +361,10 @@ async function createConfig(paths, options) {
328
361
  },
329
362
  plugins: [
330
363
  new LinkedPackageResolvePlugin(paths.rootNodeModules, externalPkgs),
331
- new ModuleScopePlugin__default["default"]([paths.targetSrc, paths.targetDev], [paths.targetPackageJson])
364
+ new ModuleScopePlugin__default["default"](
365
+ [paths.targetSrc, paths.targetDev],
366
+ [paths.targetPackageJson]
367
+ )
332
368
  ],
333
369
  alias: resolveAliases
334
370
  },
@@ -341,7 +377,10 @@ async function createConfig(paths, options) {
341
377
  filename: isDev ? "[name].js" : "static/[name].[fullhash:8].js",
342
378
  chunkFilename: isDev ? "[name].chunk.js" : "static/[name].[chunkhash:8].chunk.js",
343
379
  ...isDev ? {
344
- devtoolModuleFilenameTemplate: (info) => `file:///${path.resolve(info.absoluteResourcePath).replace(/\\/g, "/")}`
380
+ devtoolModuleFilenameTemplate: (info) => `file:///${path.resolve(info.absoluteResourcePath).replace(
381
+ /\\/g,
382
+ "/"
383
+ )}`
345
384
  } : {}
346
385
  },
347
386
  plugins
@@ -398,7 +437,10 @@ async function createBackendConfig(paths, options) {
398
437
  modules: [paths.rootNodeModules, ...moduleDirs],
399
438
  plugins: [
400
439
  new LinkedPackageResolvePlugin(paths.rootNodeModules, externalPkgs),
401
- new ModuleScopePlugin__default["default"]([paths.targetSrc, paths.targetDev], [paths.targetPackageJson])
440
+ new ModuleScopePlugin__default["default"](
441
+ [paths.targetSrc, paths.targetDev],
442
+ [paths.targetPackageJson]
443
+ )
402
444
  ],
403
445
  alias: {
404
446
  "react-dom": "@hot-loader/react-dom"
@@ -412,7 +454,10 @@ async function createBackendConfig(paths, options) {
412
454
  filename: isDev ? "[name].js" : "[name].[hash:8].js",
413
455
  chunkFilename: isDev ? "[name].chunk.js" : "[name].[chunkhash:8].chunk.js",
414
456
  ...isDev ? {
415
- devtoolModuleFilenameTemplate: (info) => `file:///${path.resolve(info.absoluteResourcePath).replace(/\\/g, "/")}`
457
+ devtoolModuleFilenameTemplate: (info) => `file:///${path.resolve(info.absoluteResourcePath).replace(
458
+ /\\/g,
459
+ "/"
460
+ )}`
416
461
  } : {}
417
462
  },
418
463
  plugins: [
@@ -494,4 +539,4 @@ exports.createBackendConfig = createBackendConfig;
494
539
  exports.createConfig = createConfig;
495
540
  exports.resolveBaseUrl = resolveBaseUrl;
496
541
  exports.resolveBundlingPaths = resolveBundlingPaths;
497
- //# sourceMappingURL=paths-ed6a0ed3.cjs.js.map
542
+ //# sourceMappingURL=paths-b34f135a.cjs.js.map
@@ -2,9 +2,9 @@
2
2
 
3
3
  var yaml = require('yaml');
4
4
  var config$1 = require('@backstage/config');
5
- var config = require('./config-1ed90d1b.cjs.js');
5
+ var config = require('./config-4a59f918.cjs.js');
6
6
  require('@backstage/config-loader');
7
- require('./index-5eb1b9d1.cjs.js');
7
+ require('./index-50703ee1.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -12,7 +12,7 @@ require('semver');
12
12
  require('@backstage/cli-common');
13
13
  require('@backstage/errors');
14
14
  require('@manypkg/get-packages');
15
- require('./PackageGraph-eed8a266.cjs.js');
15
+ require('./PackageGraph-6e1d4bd4.cjs.js');
16
16
  require('path');
17
17
  require('child_process');
18
18
  require('util');
@@ -61,4 +61,4 @@ function serializeConfigData(appConfigs, schema, visibility) {
61
61
  }
62
62
 
63
63
  exports["default"] = print;
64
- //# sourceMappingURL=print-79b2229c.cjs.js.map
64
+ //# sourceMappingURL=print-e99d7c2e.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var child_process = require('child_process');
4
- var index = require('./index-5eb1b9d1.cjs.js');
4
+ var index = require('./index-50703ee1.cjs.js');
5
5
  var util = require('util');
6
6
  var errors = require('@backstage/errors');
7
7
 
@@ -78,4 +78,4 @@ async function waitForExit(child, name) {
78
78
  exports.run = run;
79
79
  exports.runCheck = runCheck;
80
80
  exports.runPlain = runPlain;
81
- //# sourceMappingURL=run-93365c94.cjs.js.map
81
+ //# sourceMappingURL=run-722b1384.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var yaml = require('yaml');
4
- var config = require('./config-1ed90d1b.cjs.js');
4
+ var config = require('./config-4a59f918.cjs.js');
5
5
  var configLoader = require('@backstage/config-loader');
6
6
  require('@backstage/config');
7
- require('./index-5eb1b9d1.cjs.js');
7
+ require('./index-50703ee1.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -12,7 +12,7 @@ require('semver');
12
12
  require('@backstage/cli-common');
13
13
  require('@backstage/errors');
14
14
  require('@manypkg/get-packages');
15
- require('./PackageGraph-eed8a266.cjs.js');
15
+ require('./PackageGraph-6e1d4bd4.cjs.js');
16
16
  require('path');
17
17
  require('child_process');
18
18
  require('util');
@@ -23,7 +23,11 @@ var schema = async (opts) => {
23
23
  fromPackage: opts.package,
24
24
  mockEnv: true
25
25
  });
26
- const merged = configLoader.mergeConfigSchemas(schema.serialize().schemas.map((_) => _.value));
26
+ const merged = configLoader.mergeConfigSchemas(
27
+ schema.serialize().schemas.map(
28
+ (_) => _.value
29
+ )
30
+ );
27
31
  merged.title = "Application Configuration Schema";
28
32
  merged.description = "This is the schema describing the structure of the app-config.yaml configuration file.";
29
33
  if (opts.format === "json") {
@@ -36,4 +40,4 @@ var schema = async (opts) => {
36
40
  };
37
41
 
38
42
  exports["default"] = schema;
39
- //# sourceMappingURL=schema-986415f5.cjs.js.map
43
+ //# sourceMappingURL=schema-c636e913.cjs.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
  var fs = require('fs-extra');
4
4
  var path = require('path');
5
- var index = require('./index-5eb1b9d1.cjs.js');
5
+ var index = require('./index-50703ee1.cjs.js');
6
6
  var chalk = require('chalk');
7
7
  var handlebars = require('handlebars');
8
8
  var ora = require('ora');
@@ -83,7 +83,10 @@ async function addCodeownersEntry(ownedPath, ownerStr, codeownersFilePath) {
83
83
  ownedPath: "*",
84
84
  ownerIds: [DEFAULT_OWNER]
85
85
  });
86
- const longestOwnedPath = newDeclarationEntries.reduce((length, entry) => Math.max(length, entry.ownedPath.length), 0);
86
+ const longestOwnedPath = newDeclarationEntries.reduce(
87
+ (length, entry) => Math.max(length, entry.ownedPath.length),
88
+ 0
89
+ );
87
90
  const newDeclarationLines = newDeclarationEntries.map((entry) => {
88
91
  const entryPath = entry.ownedPath + " ".repeat(longestOwnedPath - entry.ownedPath.length);
89
92
  return [entryPath, ...entry.ownerIds].join(" ");
@@ -147,7 +150,9 @@ ${chalk__default["default"].red(message)}
147
150
  if (options == null ? void 0 : options.optional) {
148
151
  Task.error(`Warning: Failed to execute command ${chalk__default["default"].cyan(command)}`);
149
152
  } else {
150
- throw new Error(`Failed to execute command '${chalk__default["default"].cyan(command)}', ${error}`);
153
+ throw new Error(
154
+ `Failed to execute command '${chalk__default["default"].cyan(command)}', ${error}`
155
+ );
151
156
  }
152
157
  }
153
158
  }
@@ -167,15 +172,23 @@ async function templatingTask(templateDir, destinationDir, context, versionProvi
167
172
  const compiled = handlebars__default["default"].compile(template.toString(), {
168
173
  strict: true
169
174
  });
170
- const contents = compiled({ name: path.basename(destination), ...context }, {
171
- helpers: {
172
- versionQuery(name, versionHint) {
173
- return versionProvider(name, typeof versionHint === "string" ? versionHint : void 0);
175
+ const contents = compiled(
176
+ { name: path.basename(destination), ...context },
177
+ {
178
+ helpers: {
179
+ versionQuery(name, versionHint) {
180
+ return versionProvider(
181
+ name,
182
+ typeof versionHint === "string" ? versionHint : void 0
183
+ );
184
+ }
174
185
  }
175
186
  }
176
- });
187
+ );
177
188
  await fs__default["default"].writeFile(destination, contents).catch((error) => {
178
- throw new Error(`Failed to create file: ${destination}: ${error.message}`);
189
+ throw new Error(
190
+ `Failed to create file: ${destination}: ${error.message}`
191
+ );
179
192
  });
180
193
  });
181
194
  } else {
@@ -185,7 +198,9 @@ async function templatingTask(templateDir, destinationDir, context, versionProvi
185
198
  await Task.forItem("copying", path.basename(file), async () => {
186
199
  await fs__default["default"].copyFile(file, destinationFile).catch((error) => {
187
200
  const destination = destinationFile;
188
- throw new Error(`Failed to copy file to ${destination} : ${error.message}`);
201
+ throw new Error(
202
+ `Failed to copy file to ${destination} : ${error.message}`
203
+ );
189
204
  });
190
205
  });
191
206
  }
@@ -198,7 +213,9 @@ async function addPackageDependency(path, options) {
198
213
  if (Object.keys(obj).length === 0) {
199
214
  return void 0;
200
215
  }
201
- return Object.fromEntries(Object.keys(obj).sort().map((key) => [key, obj[key]]));
216
+ return Object.fromEntries(
217
+ Object.keys(obj).sort().map((key) => [key, obj[key]])
218
+ );
202
219
  };
203
220
  pkgJson.dependencies = normalize({
204
221
  ...pkgJson.dependencies,
@@ -224,4 +241,4 @@ exports.addPackageDependency = addPackageDependency;
224
241
  exports.getCodeownersFilePath = getCodeownersFilePath;
225
242
  exports.parseOwnerIds = parseOwnerIds;
226
243
  exports.templatingTask = templatingTask;
227
- //# sourceMappingURL=tasks-45f84735.cjs.js.map
244
+ //# sourceMappingURL=tasks-4776baa6.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-5eb1b9d1.cjs.js');
4
- var run = require('./run-93365c94.cjs.js');
3
+ var index = require('./index-50703ee1.cjs.js');
4
+ var run = require('./run-722b1384.cjs.js');
5
5
  require('commander');
6
6
  require('chalk');
7
7
  require('fs-extra');
@@ -54,4 +54,4 @@ var test = async (_opts, cmd) => {
54
54
  };
55
55
 
56
56
  exports["default"] = test;
57
- //# sourceMappingURL=test-efcb2e7f.cjs.js.map
57
+ //# sourceMappingURL=test-76539f57.cjs.js.map