@backstage/cli 0.0.0-nightly-202191122352 → 0.0.0-nightly-202191622432

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 (43) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/config/eslint.backend.js +11 -6
  3. package/config/jest.js +45 -16
  4. package/config/jestSucraseTransform.js +66 -0
  5. package/dist/cjs/{build-c66663e0.cjs.js → build-093508d5.cjs.js} +3 -3
  6. package/dist/cjs/{build-4d23c32c.cjs.js → build-292d259f.cjs.js} +5 -5
  7. package/dist/cjs/{build-5faf8eab.cjs.js → build-adad8b22.cjs.js} +3 -3
  8. package/dist/cjs/{build-0bf2333c.cjs.js → build-d7862d7c.cjs.js} +3 -3
  9. package/dist/cjs/{buildImage-a0aadb1d.cjs.js → buildImage-7e3cf320.cjs.js} +4 -4
  10. package/dist/cjs/{buildWorkspace-76d10a14.cjs.js → buildWorkspace-cfea104f.cjs.js} +4 -4
  11. package/dist/cjs/{bump-e5775c44.cjs.js → bump-27623ef3.cjs.js} +5 -5
  12. package/dist/cjs/{bundle-c070e1d0.cjs.js → bundle-80c7cf66.cjs.js} +5 -5
  13. package/dist/cjs/{clean-ed8ab0b8.cjs.js → clean-f750c0dc.cjs.js} +2 -2
  14. package/dist/cjs/{config-c4bab0a4.cjs.js → config-3e7b308b.cjs.js} +2 -2
  15. package/dist/cjs/{createPlugin-4f5580cf.cjs.js → createPlugin-a03aceea.cjs.js} +4 -4
  16. package/dist/cjs/{dev-b9087e35.cjs.js → dev-f7d06c3d.cjs.js} +4 -4
  17. package/dist/cjs/{diff-18c84c66.cjs.js → diff-fd2bda97.cjs.js} +2 -2
  18. package/dist/cjs/{docs-502f1aa8.cjs.js → docs-8dde3bb5.cjs.js} +3 -3
  19. package/dist/cjs/{index-eaf30dd1.cjs.js → index-07ce0d55.cjs.js} +2 -2
  20. package/dist/cjs/{index-0890107d.cjs.js → index-39056740.cjs.js} +3 -3
  21. package/dist/cjs/{index-93747048.cjs.js → index-8ece1803.cjs.js} +34 -34
  22. package/dist/cjs/{info-c2d551c7.cjs.js → info-85a45abd.cjs.js} +3 -3
  23. package/dist/cjs/{install-eecff7b6.cjs.js → install-8c0b53e3.cjs.js} +4 -4
  24. package/dist/cjs/{lint-557d0761.cjs.js → lint-d2e5b1ca.cjs.js} +3 -3
  25. package/dist/cjs/{lint-bbfe6f75.cjs.js → lint-fffadef5.cjs.js} +3 -3
  26. package/dist/cjs/{pack-fa56665a.cjs.js → pack-f73a4522.cjs.js} +2 -2
  27. package/dist/cjs/{packager-aa2d50f0.cjs.js → packager-e61b2b16.cjs.js} +2 -2
  28. package/dist/cjs/{packages-0b0b08c0.cjs.js → packages-be161005.cjs.js} +3 -3
  29. package/dist/cjs/{paths-47004d9d.cjs.js → paths-5e0e5ffc.cjs.js} +8 -5
  30. package/dist/cjs/{print-02e7ee9a.cjs.js → print-5df69d1b.cjs.js} +3 -3
  31. package/dist/cjs/{removePlugin-c77c6d6e.cjs.js → removePlugin-865c314e.cjs.js} +3 -3
  32. package/dist/cjs/{run-24fb7653.cjs.js → run-cc82f277.cjs.js} +2 -2
  33. package/dist/cjs/{schema-f0dbdc35.cjs.js → schema-66b2f248.cjs.js} +3 -3
  34. package/dist/cjs/{serve-487cdbe9.cjs.js → serve-7656d962.cjs.js} +6 -6
  35. package/dist/cjs/{serve-b53e4cce.cjs.js → serve-b1a08c13.cjs.js} +7 -7
  36. package/dist/cjs/{server-bf4580a1.cjs.js → server-4f73b8b5.cjs.js} +2 -2
  37. package/dist/cjs/{tasks-a248ef13.cjs.js → tasks-4d9e9b1f.cjs.js} +2 -2
  38. package/dist/cjs/{testCommand-7b6062c3.cjs.js → testCommand-55c14530.cjs.js} +3 -3
  39. package/dist/cjs/{validate-e01a94da.cjs.js → validate-1542a59a.cjs.js} +3 -3
  40. package/dist/index.cjs.js +1 -1
  41. package/package.json +10 -13
  42. package/templates/default-plugin/src/setupTests.ts +1 -1
  43. package/config/jestEsmTransform.js +0 -36
package/CHANGELOG.md CHANGED
@@ -1,11 +1,35 @@
1
1
  # @backstage/cli
2
2
 
3
- ## 0.0.0-nightly-202191122352
3
+ ## 0.0.0-nightly-202191622432
4
+
5
+ ### Minor Changes
6
+
7
+ - b486adb8c6: The Jest configuration that's included with the Backstage CLI has received several changes.
8
+
9
+ As a part of migrating to more widespread usage of ESM modules, the default configuration now transforms all source files everywhere, including those within `node_modules`. Due to this change the existing `transformModules` option has been removed and will be ignored. There is also a list of known packages that do not require transforms in the CLI, which will evolve over time. If needed there will also be an option to add packages to this list in the future, but it is not included yet to avoid clutter.
10
+
11
+ To counteract the slowdown of the additional transforms that have been introduced, the default configuration has also been reworked to enable caching across different packages. Previously each package in a Backstage monorepo would have its own isolated Jest cache, but it is now shared between packages that have a similar enough Jest configuration.
12
+
13
+ Another change that will speed up test execution is that the transformer for `.esm.js` files has been switched. It used to be an ESM transformer based on Babel, but it is also done by sucrase now since it is significantly faster.
14
+
15
+ The changes above are not strictly breaking as all tests should still work. It may however cause excessive slowdowns in projects that have configured custom transforms in the `jest` field within `package.json` files. In this case it is either best to consider removing the custom transforms, or overriding the `transformIgnorePatterns` to instead use Jest's default `'/node_modules/'` pattern.
16
+
17
+ This change also removes the `@backstage/cli/config/jestEsmTransform.js` transform, which can be replaced by using the `@backstage/cli/config/sucraseEsmTransform.js` transform instead.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @backstage/config-loader@0.0.0-nightly-202191622432
23
+
24
+ ## 0.7.16
4
25
 
5
26
  ### Patch Changes
6
27
 
7
28
  - 53bdc66623: add a --from <location> option to the plugin install command
8
29
  - 84e24fcdaf: Bump sucrase to version 3.20.2
30
+ - 6583c6ac40: Add semicolon in template to make prettier happy
31
+ - c6f927d819: Bump mini-css-extract-plugin to v2
32
+ - 16f044cb6b: Update default backend ESLint configuration to allow usage of `__dirname` in tests.
9
33
  - 1ef9e64901: Add an experimental `install <plugin>` command.
10
34
 
11
35
  Given a `pluginId`, the command looks for NPM packages matching `@backstage/plugin-{pluginId}` or `backstage-plugin-{pluginId}` or `{pluginId}`. It looks for the `experimentalInstallationRecipe` in their `package.json` for the steps of installation. Detailed documentation and API Spec to follow (and to be decided as well).
@@ -14,6 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ const globalRestrictedSyntax = [
18
+ {
19
+ message:
20
+ 'Default import from winston is not allowed, import `* as winston` instead.',
21
+ selector:
22
+ 'ImportDeclaration[source.value="winston"] ImportDefaultSpecifier',
23
+ },
24
+ ];
25
+
17
26
  module.exports = {
18
27
  extends: [
19
28
  '@spotify/eslint-config-base',
@@ -69,17 +78,12 @@ module.exports = {
69
78
  // Avoid default import from winston as it breaks at runtime
70
79
  'no-restricted-syntax': [
71
80
  'error',
72
- {
73
- message:
74
- 'Default import from winston is not allowed, import `* as winston` instead.',
75
- selector:
76
- 'ImportDeclaration[source.value="winston"] ImportDefaultSpecifier',
77
- },
78
81
  {
79
82
  message:
80
83
  "`__dirname` doesn't refer to the same dir in production builds, try `resolvePackagePath()` from `@backstage/backend-common` instead.",
81
84
  selector: 'Identifier[name="__dirname"]',
82
85
  },
86
+ ...globalRestrictedSyntax,
83
87
  ],
84
88
  },
85
89
  overrides: [
@@ -103,6 +107,7 @@ module.exports = {
103
107
  bundledDependencies: true,
104
108
  },
105
109
  ],
110
+ 'no-restricted-syntax': ['error', ...globalRestrictedSyntax],
106
111
  },
107
112
  },
108
113
  ],
package/config/jest.js CHANGED
@@ -16,9 +16,27 @@
16
16
 
17
17
  const fs = require('fs-extra');
18
18
  const path = require('path');
19
+ const crypto = require('crypto');
19
20
  const glob = require('util').promisify(require('glob'));
20
-
21
- async function getProjectConfig(targetPath) {
21
+ const { version } = require('../package.json');
22
+
23
+ const transformIgnorePattern = [
24
+ '@material-ui',
25
+ '@rjsf',
26
+ 'ajv',
27
+ 'core-js',
28
+ 'jest-.*',
29
+ 'jsdom',
30
+ 'knex',
31
+ 'react',
32
+ 'react-dom',
33
+ 'highlight\\.js',
34
+ 'prismjs',
35
+ 'react-use',
36
+ 'typescript',
37
+ ].join('|');
38
+
39
+ async function getProjectConfig(targetPath, displayName) {
22
40
  const configJsPath = path.resolve(targetPath, 'jest.config.js');
23
41
  const configTsPath = path.resolve(targetPath, 'jest.config.ts');
24
42
  // If the package has it's own jest config, we use that instead.
@@ -58,10 +76,7 @@ async function getProjectConfig(targetPath) {
58
76
  currentPath = newPath;
59
77
  }
60
78
 
61
- // We add an additional Jest config parameter only known by the Backstage CLI
62
- // called `transformModules`. It's a list of modules that we want to apply
63
- // our configured jest transformations for.
64
- // This is useful when packages are published in untranspiled ESM or TS form.
79
+ // This is an old deprecated option that is no longer used.
65
80
  const transformModules = pkgJsonConfigs
66
81
  .flatMap(conf => {
67
82
  const modules = conf.transformModules || [];
@@ -70,9 +85,14 @@ async function getProjectConfig(targetPath) {
70
85
  })
71
86
  .map(name => `${name}/`)
72
87
  .join('|');
73
- const transformModulePattern = transformModules && `(?!${transformModules})`;
88
+ if (transformModules.length > 0) {
89
+ console.warn(
90
+ 'The Backstage CLI jest transformModules option is no longer used and will be ignored. All modules are now always transformed.',
91
+ );
92
+ }
74
93
 
75
94
  const options = {
95
+ ...(displayName && { displayName }),
76
96
  rootDir: path.resolve(targetPath, 'src'),
77
97
  coverageDirectory: path.resolve(targetPath, 'coverage'),
78
98
  collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'],
@@ -81,8 +101,7 @@ async function getProjectConfig(targetPath) {
81
101
  },
82
102
 
83
103
  transform: {
84
- '\\.esm\\.js$': require.resolve('./jestEsmTransform.js'), // See jestEsmTransform.js
85
- '\\.(js|jsx|ts|tsx)$': require.resolve('@sucrase/jest-plugin'),
104
+ '\\.(js|jsx|ts|tsx)$': require.resolve('./jestSucraseTransform.js'),
86
105
  '\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$':
87
106
  require.resolve('./jestFileTransform.js'),
88
107
  '\\.(yaml)$': require.resolve('jest-transform-yaml'),
@@ -91,11 +110,7 @@ async function getProjectConfig(targetPath) {
91
110
  // A bit more opinionated
92
111
  testMatch: ['**/?(*.)test.{js,jsx,mjs,ts,tsx}'],
93
112
 
94
- // Default behaviour is to not apply transforms for node_modules, but we still want
95
- // to apply the esm-transformer to .esm.js files, since that's what we use in backstage packages.
96
- transformIgnorePatterns: [
97
- `/node_modules/${transformModulePattern}.*\\.(?:(?<!esm\\.)js|json)$`,
98
- ],
113
+ transformIgnorePatterns: [`/node_modules/(?:${transformIgnorePattern})/`],
99
114
  };
100
115
 
101
116
  // Use src/setupTests.ts as the default location for configuring test env
@@ -103,7 +118,21 @@ async function getProjectConfig(targetPath) {
103
118
  options.setupFilesAfterEnv = ['<rootDir>/setupTests.ts'];
104
119
  }
105
120
 
106
- return Object.assign(options, ...pkgJsonConfigs);
121
+ const config = Object.assign(options, ...pkgJsonConfigs);
122
+
123
+ // The config name is a cache key that lets us share the jest cache across projects.
124
+ // If no explicit name was configured, generated one based on the configuration.
125
+ if (!config.name) {
126
+ const configHash = crypto
127
+ .createHash('md5')
128
+ .update(version)
129
+ .update(Buffer.alloc(1))
130
+ .update(JSON.stringify(config.transform))
131
+ .digest('hex');
132
+ config.name = `backstage_cli_${configHash}`;
133
+ }
134
+
135
+ return config;
107
136
  }
108
137
 
109
138
  // This loads the root jest config, which in turn will either refer to a single
@@ -143,7 +172,7 @@ async function getRootConfig() {
143
172
  const packageData = await fs.readJson(packagePath);
144
173
  const testScript = packageData.scripts && packageData.scripts.test;
145
174
  if (testScript && testScript.includes('backstage-cli test')) {
146
- return await getProjectConfig(projectPath);
175
+ return await getProjectConfig(projectPath, packageData.name);
147
176
  }
148
177
 
149
178
  return undefined;
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright 2021 The Backstage Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ const { createHash } = require('crypto');
18
+ const { transform } = require('sucrase');
19
+ const sucrasePkg = require('sucrase/package.json');
20
+ const sucrasePluginPkg = require('@sucrase/jest-plugin/package.json');
21
+
22
+ const ESM_REGEX = /\b(?:import|export)\b/;
23
+
24
+ function process(source, filePath) {
25
+ let transforms;
26
+
27
+ if (filePath.endsWith('.esm.js')) {
28
+ transforms = ['imports'];
29
+ } else if (filePath.endsWith('.js')) {
30
+ // This is a very rough filter to avoid transforming things that we quickly
31
+ // can be sure are definitely not ESM modules.
32
+ if (ESM_REGEX.test(source)) {
33
+ transforms = ['imports', 'jsx']; // JSX within .js is currently allowed
34
+ }
35
+ } else if (filePath.endsWith('.jsx')) {
36
+ transforms = ['jsx', 'imports'];
37
+ } else if (filePath.endsWith('.ts')) {
38
+ transforms = ['typescript', 'imports'];
39
+ } else if (filePath.endsWith('.tsx')) {
40
+ transforms = ['typescript', 'jsx', 'imports'];
41
+ }
42
+
43
+ // Only apply the jest transform to the test files themselves
44
+ if (transforms && filePath.includes('.test.')) {
45
+ transforms.push('jest');
46
+ }
47
+
48
+ if (transforms) {
49
+ return transform(source, { transforms, filePath }).code;
50
+ }
51
+
52
+ return source;
53
+ }
54
+
55
+ // TODO: contribute something like this to @sucrase/jest-plugin
56
+ function getCacheKey(sourceText) {
57
+ return createHash('md5')
58
+ .update(sourceText)
59
+ .update(Buffer.alloc(1))
60
+ .update(sucrasePkg.version)
61
+ .update(Buffer.alloc(1))
62
+ .update(sucrasePluginPkg.version)
63
+ .digest('hex');
64
+ }
65
+
66
+ module.exports = { process, getCacheKey };
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var packager = require('./packager-aa2d50f0.cjs.js');
3
+ var packager = require('./packager-e61b2b16.cjs.js');
4
4
  require('fs-extra');
5
5
  require('rollup');
6
6
  require('chalk');
7
7
  require('path');
8
- require('./index-93747048.cjs.js');
8
+ require('./index-8ece1803.cjs.js');
9
9
  require('commander');
10
10
  require('semver');
11
11
  require('@backstage/cli-common');
@@ -40,4 +40,4 @@ var build = async (cmd) => {
40
40
  };
41
41
 
42
42
  exports.default = build;
43
- //# sourceMappingURL=build-c66663e0.cjs.js.map
43
+ //# sourceMappingURL=build-093508d5.cjs.js.map
@@ -12,17 +12,17 @@ require('@backstage/cli-common');
12
12
  require('terser-webpack-plugin');
13
13
  var parallel = require('./parallel-a4714c72.cjs.js');
14
14
  require('mini-css-extract-plugin');
15
- var index = require('./index-93747048.cjs.js');
16
- require('./run-24fb7653.cjs.js');
15
+ var index = require('./index-8ece1803.cjs.js');
16
+ require('./run-cc82f277.cjs.js');
17
17
  require('lodash/pickBy');
18
18
  var yn = require('yn');
19
19
  var FileSizeReporter = require('react-dev-utils/FileSizeReporter');
20
20
  var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
21
- var paths = require('./paths-47004d9d.cjs.js');
21
+ var paths = require('./paths-5e0e5ffc.cjs.js');
22
22
  var chalk = require('chalk');
23
23
  require('webpack-dev-server');
24
24
  require('react-dev-utils/openBrowser');
25
- var config = require('./config-c4bab0a4.cjs.js');
25
+ var config = require('./config-3e7b308b.cjs.js');
26
26
  require('commander');
27
27
  require('semver');
28
28
  require('@backstage/config/package.json');
@@ -135,4 +135,4 @@ var build = async (cmd) => {
135
135
  };
136
136
 
137
137
  exports.default = build;
138
- //# sourceMappingURL=build-4d23c32c.cjs.js.map
138
+ //# sourceMappingURL=build-292d259f.cjs.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var packager = require('./packager-aa2d50f0.cjs.js');
3
+ var packager = require('./packager-e61b2b16.cjs.js');
4
4
  require('fs-extra');
5
5
  require('rollup');
6
6
  require('chalk');
7
7
  require('path');
8
- require('./index-93747048.cjs.js');
8
+ require('./index-8ece1803.cjs.js');
9
9
  require('commander');
10
10
  require('semver');
11
11
  require('@backstage/cli-common');
@@ -29,4 +29,4 @@ var build = async () => {
29
29
  };
30
30
 
31
31
  exports.default = build;
32
- //# sourceMappingURL=build-5faf8eab.cjs.js.map
32
+ //# sourceMappingURL=build-adad8b22.cjs.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var packager = require('./packager-aa2d50f0.cjs.js');
3
+ var packager = require('./packager-e61b2b16.cjs.js');
4
4
  require('fs-extra');
5
5
  require('rollup');
6
6
  require('chalk');
7
7
  require('path');
8
- require('./index-93747048.cjs.js');
8
+ require('./index-8ece1803.cjs.js');
9
9
  require('commander');
10
10
  require('semver');
11
11
  require('@backstage/cli-common');
@@ -29,4 +29,4 @@ var build = async () => {
29
29
  };
30
30
 
31
31
  exports.default = build;
32
- //# sourceMappingURL=build-0bf2333c.cjs.js.map
32
+ //# sourceMappingURL=build-d7862d7c.cjs.js.map
@@ -3,9 +3,9 @@
3
3
  var chalk = require('chalk');
4
4
  var fs = require('fs-extra');
5
5
  var path = require('path');
6
- var index$1 = require('./index-0890107d.cjs.js');
7
- var index = require('./index-93747048.cjs.js');
8
- var run = require('./run-24fb7653.cjs.js');
6
+ var index$1 = require('./index-39056740.cjs.js');
7
+ var index = require('./index-8ece1803.cjs.js');
8
+ var run = require('./run-cc82f277.cjs.js');
9
9
  var parallel = require('./parallel-a4714c72.cjs.js');
10
10
  require('os');
11
11
  require('tar');
@@ -73,4 +73,4 @@ async function findAppConfigs() {
73
73
  }
74
74
 
75
75
  exports.default = buildImage;
76
- //# sourceMappingURL=buildImage-a0aadb1d.cjs.js.map
76
+ //# sourceMappingURL=buildImage-7e3cf320.cjs.js.map
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-0890107d.cjs.js');
4
+ var index = require('./index-39056740.cjs.js');
5
5
  require('path');
6
6
  require('os');
7
7
  require('tar');
8
- require('./index-93747048.cjs.js');
8
+ require('./index-8ece1803.cjs.js');
9
9
  require('commander');
10
10
  require('chalk');
11
11
  require('semver');
12
12
  require('@backstage/cli-common');
13
13
  require('@backstage/config/package.json');
14
- require('./run-24fb7653.cjs.js');
14
+ require('./run-cc82f277.cjs.js');
15
15
  require('child_process');
16
16
  require('util');
17
17
 
@@ -29,4 +29,4 @@ var buildWorkspace = async (dir, _cmd, packages) => {
29
29
  };
30
30
 
31
31
  exports.default = buildWorkspace;
32
- //# sourceMappingURL=buildWorkspace-76d10a14.cjs.js.map
32
+ //# sourceMappingURL=buildWorkspace-cfea104f.cjs.js.map
@@ -4,11 +4,11 @@ var fs = require('fs-extra');
4
4
  var chalk = require('chalk');
5
5
  var semver = require('semver');
6
6
  var path = require('path');
7
- var run = require('./run-24fb7653.cjs.js');
8
- var index = require('./index-93747048.cjs.js');
7
+ var run = require('./run-cc82f277.cjs.js');
8
+ var index = require('./index-8ece1803.cjs.js');
9
9
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
10
- var packages = require('./packages-0b0b08c0.cjs.js');
11
- var lint = require('./lint-557d0761.cjs.js');
10
+ var packages = require('./packages-be161005.cjs.js');
11
+ var lint = require('./lint-d2e5b1ca.cjs.js');
12
12
  require('child_process');
13
13
  require('util');
14
14
  require('commander');
@@ -202,4 +202,4 @@ async function workerThreads(count, items, fn) {
202
202
  }
203
203
 
204
204
  exports.default = bump;
205
- //# sourceMappingURL=bump-e5775c44.cjs.js.map
205
+ //# sourceMappingURL=bump-27623ef3.cjs.js.map
@@ -4,11 +4,11 @@ var os = require('os');
4
4
  var fs = require('fs-extra');
5
5
  var path = require('path');
6
6
  var tar = require('tar');
7
- var index$1 = require('./index-0890107d.cjs.js');
8
- var index = require('./index-93747048.cjs.js');
7
+ var index$1 = require('./index-39056740.cjs.js');
8
+ var index = require('./index-8ece1803.cjs.js');
9
9
  var parallel = require('./parallel-a4714c72.cjs.js');
10
- var packager = require('./packager-aa2d50f0.cjs.js');
11
- require('./run-24fb7653.cjs.js');
10
+ var packager = require('./packager-e61b2b16.cjs.js');
11
+ require('./run-cc82f277.cjs.js');
12
12
  require('child_process');
13
13
  require('util');
14
14
  require('commander');
@@ -66,4 +66,4 @@ var bundle = async (cmd) => {
66
66
  };
67
67
 
68
68
  exports.default = bundle;
69
- //# sourceMappingURL=bundle-c070e1d0.cjs.js.map
69
+ //# sourceMappingURL=bundle-80c7cf66.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-93747048.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
  require('commander');
6
6
  require('chalk');
7
7
  require('semver');
@@ -19,4 +19,4 @@ async function clean() {
19
19
  }
20
20
 
21
21
  exports.default = clean;
22
- //# sourceMappingURL=clean-ed8ab0b8.cjs.js.map
22
+ //# sourceMappingURL=clean-f750c0dc.cjs.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var config = require('@backstage/config');
5
- var index = require('./index-93747048.cjs.js');
5
+ var index = require('./index-8ece1803.cjs.js');
6
6
 
7
7
  async function loadCliConfig(options) {
8
8
  const configPaths = options.args.map((arg) => index.paths.resolveTarget(arg));
@@ -67,4 +67,4 @@ function findPackages(packages, fromPackage) {
67
67
  }
68
68
 
69
69
  exports.loadCliConfig = loadCliConfig;
70
- //# sourceMappingURL=config-c4bab0a4.cjs.js.map
70
+ //# sourceMappingURL=config-3e7b308b.cjs.js.map
@@ -9,10 +9,10 @@ var path = require('path');
9
9
  var camelCase = require('lodash/camelCase');
10
10
  var upperFirst = require('lodash/upperFirst');
11
11
  var os = require('os');
12
- var tasks = require('./tasks-a248ef13.cjs.js');
13
- var index = require('./index-93747048.cjs.js');
12
+ var tasks = require('./tasks-4d9e9b1f.cjs.js');
13
+ var index = require('./index-8ece1803.cjs.js');
14
14
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
15
- require('./run-24fb7653.cjs.js');
15
+ require('./run-cc82f277.cjs.js');
16
16
  require('handlebars');
17
17
  require('ora');
18
18
  require('recursive-readdir');
@@ -230,4 +230,4 @@ exports.addPluginExtensionToApp = addPluginExtensionToApp;
230
230
  exports.capitalize = capitalize;
231
231
  exports.default = createPlugin;
232
232
  exports.movePlugin = movePlugin;
233
- //# sourceMappingURL=createPlugin-4f5580cf.cjs.js.map
233
+ //# sourceMappingURL=createPlugin-a03aceea.cjs.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-93747048.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
  var webpack = require('webpack');
6
- var paths = require('./paths-47004d9d.cjs.js');
6
+ var paths = require('./paths-5e0e5ffc.cjs.js');
7
7
  require('commander');
8
8
  require('chalk');
9
9
  require('semver');
@@ -19,7 +19,7 @@ require('terser-webpack-plugin');
19
19
  require('./parallel-a4714c72.cjs.js');
20
20
  require('mini-css-extract-plugin');
21
21
  require('./svgrTemplate-2d0d15cf.cjs.js');
22
- require('./run-24fb7653.cjs.js');
22
+ require('./run-cc82f277.cjs.js');
23
23
  require('child_process');
24
24
  require('util');
25
25
  require('lodash/pickBy');
@@ -66,4 +66,4 @@ var dev = async (cmd) => {
66
66
  };
67
67
 
68
68
  exports.default = dev;
69
- //# sourceMappingURL=dev-b9087e35.cjs.js.map
69
+ //# sourceMappingURL=dev-f7d06c3d.cjs.js.map
@@ -7,7 +7,7 @@ var path = require('path');
7
7
  var inquirer = require('inquirer');
8
8
  var handlebars = require('handlebars');
9
9
  var recursive = require('recursive-readdir');
10
- var index = require('./index-93747048.cjs.js');
10
+ var index = require('./index-8ece1803.cjs.js');
11
11
  require('commander');
12
12
  require('semver');
13
13
  require('@backstage/cli-common');
@@ -373,4 +373,4 @@ async function readPluginData() {
373
373
  }
374
374
 
375
375
  exports.default = diff;
376
- //# sourceMappingURL=diff-18c84c66.cjs.js.map
376
+ //# sourceMappingURL=diff-fd2bda97.cjs.js.map
@@ -2,9 +2,9 @@
2
2
 
3
3
  var configLoader = require('@backstage/config-loader');
4
4
  var openBrowser = require('react-dev-utils/openBrowser');
5
- var config = require('./config-c4bab0a4.cjs.js');
5
+ var config = require('./config-3e7b308b.cjs.js');
6
6
  require('@backstage/config');
7
- require('./index-93747048.cjs.js');
7
+ require('./index-8ece1803.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -28,4 +28,4 @@ var docs = async (cmd) => {
28
28
  };
29
29
 
30
30
  exports.default = docs;
31
- //# sourceMappingURL=docs-502f1aa8.cjs.js.map
31
+ //# sourceMappingURL=docs-8dde3bb5.cjs.js.map
@@ -3,7 +3,7 @@
3
3
  var fs = require('fs-extra');
4
4
  var chalk = require('chalk');
5
5
  var yaml = require('yaml');
6
- var index$1 = require('./index-93747048.cjs.js');
6
+ var index$1 = require('./index-8ece1803.cjs.js');
7
7
  var crypto = require('crypto');
8
8
  var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var request = require('@octokit/request');
@@ -127,4 +127,4 @@ ${yaml.stringify(config)}`;
127
127
  };
128
128
 
129
129
  exports.default = index;
130
- //# sourceMappingURL=index-eaf30dd1.cjs.js.map
130
+ //# sourceMappingURL=index-07ce0d55.cjs.js.map
@@ -4,8 +4,8 @@ var fs = require('fs-extra');
4
4
  var path = require('path');
5
5
  var os = require('os');
6
6
  var tar = require('tar');
7
- var index = require('./index-93747048.cjs.js');
8
- var run = require('./run-24fb7653.cjs.js');
7
+ var index = require('./index-8ece1803.cjs.js');
8
+ var run = require('./run-cc82f277.cjs.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
@@ -118,4 +118,4 @@ async function findTargetPackages(pkgNames) {
118
118
  }
119
119
 
120
120
  exports.createDistWorkspace = createDistWorkspace;
121
- //# sourceMappingURL=index-0890107d.cjs.js.map
121
+ //# sourceMappingURL=index-39056740.cjs.js.map
@@ -51,19 +51,19 @@ const paths = cliCommon.findPaths(__dirname);
51
51
 
52
52
  var version$8 = "0.9.6";
53
53
 
54
- var version$7 = "0.7.15";
54
+ var version$7 = "0.7.16";
55
55
 
56
- var version$6 = "0.1.16";
56
+ var version$6 = "0.1.17";
57
57
 
58
- var version$5 = "0.6.1";
58
+ var version$5 = "0.7.0";
59
59
 
60
60
  var version$4 = "0.1.10";
61
61
 
62
- var version$3 = "0.2.11";
62
+ var version$3 = "0.2.12";
63
63
 
64
- var version$2 = "0.1.18";
64
+ var version$2 = "0.1.19";
65
65
 
66
- var version$1 = "0.2.10";
66
+ var version$1 = "0.2.11";
67
67
 
68
68
  const packageVersions = {
69
69
  "@backstage/backend-common": version$8,
@@ -116,33 +116,33 @@ function registerCommands(program) {
116
116
  (opt, opts) => [...opts, opt],
117
117
  Array()
118
118
  ];
119
- program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-4d23c32c.cjs.js'); }).then((m) => m.default)));
120
- program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-b53e4cce.cjs.js'); }).then((m) => m.default)));
121
- program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-0bf2333c.cjs.js'); }).then((m) => m.default)));
122
- program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-c070e1d0.cjs.js'); }).then((m) => m.default)));
123
- program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-a0aadb1d.cjs.js'); }).then((m) => m.default)));
124
- program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-b9087e35.cjs.js'); }).then((m) => m.default)));
125
- program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-4f5580cf.cjs.js'); }).then((m) => m.default)));
126
- program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-c77c6d6e.cjs.js'); }).then((m) => m.default)));
127
- program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-5faf8eab.cjs.js'); }).then((m) => m.default)));
128
- program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-487cdbe9.cjs.js'); }).then((m) => m.default)));
129
- program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-18c84c66.cjs.js'); }).then((m) => m.default)));
130
- program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").action(lazy(() => Promise.resolve().then(function () { return require('./build-c66663e0.cjs.js'); }).then((m) => m.default)));
131
- program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-bbfe6f75.cjs.js'); }).then((m) => m.default)));
132
- program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./testCommand-7b6062c3.cjs.js'); }).then((m) => m.default)));
133
- program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-502f1aa8.cjs.js'); }).then((m) => m.default)));
134
- program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-02e7ee9a.cjs.js'); }).then((m) => m.default)));
135
- program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-e01a94da.cjs.js'); }).then((m) => m.default)));
136
- program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-f0dbdc35.cjs.js'); }).then((m) => m.default)));
137
- program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-e5775c44.cjs.js'); }).then((m) => m.default)));
138
- program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-557d0761.cjs.js'); }).then((m) => m.default)));
139
- program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-fa56665a.cjs.js'); }).then((m) => m.pre)));
140
- program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-fa56665a.cjs.js'); }).then((m) => m.post)));
141
- program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-ed8ab0b8.cjs.js'); }).then((m) => m.default)));
142
- program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-76d10a14.cjs.js'); }).then((m) => m.default)));
143
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-eaf30dd1.cjs.js'); }).then((m) => m.default)));
144
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-c2d551c7.cjs.js'); }).then((m) => m.default)));
145
- program.command("install [plugin-id]", {hidden: true}).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-eecff7b6.cjs.js'); }).then((m) => m.default)));
119
+ program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-292d259f.cjs.js'); }).then((m) => m.default)));
120
+ program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-b1a08c13.cjs.js'); }).then((m) => m.default)));
121
+ program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-d7862d7c.cjs.js'); }).then((m) => m.default)));
122
+ program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-80c7cf66.cjs.js'); }).then((m) => m.default)));
123
+ program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-7e3cf320.cjs.js'); }).then((m) => m.default)));
124
+ program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-f7d06c3d.cjs.js'); }).then((m) => m.default)));
125
+ program.command("create-plugin").option("--backend", "Create plugin with the backend dependencies as default").description("Creates a new plugin in the current repository").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(lazy(() => Promise.resolve().then(function () { return require('./createPlugin-a03aceea.cjs.js'); }).then((m) => m.default)));
126
+ program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-865c314e.cjs.js'); }).then((m) => m.default)));
127
+ program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-adad8b22.cjs.js'); }).then((m) => m.default)));
128
+ program.command("plugin:serve").description("Serves the dev/ folder of a plugin").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-7656d962.cjs.js'); }).then((m) => m.default)));
129
+ program.command("plugin:diff").option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description("Diff an existing plugin with the creation template").action(lazy(() => Promise.resolve().then(function () { return require('./diff-fd2bda97.cjs.js'); }).then((m) => m.default)));
130
+ program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").action(lazy(() => Promise.resolve().then(function () { return require('./build-093508d5.cjs.js'); }).then((m) => m.default)));
131
+ program.command("lint").option("--format <format>", "Lint report output format", "eslint-formatter-friendly").option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-fffadef5.cjs.js'); }).then((m) => m.default)));
132
+ program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./testCommand-55c14530.cjs.js'); }).then((m) => m.default)));
133
+ program.command("config:docs").option("--package <name>", "Only include the schema that applies to the given package").description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-8dde3bb5.cjs.js'); }).then((m) => m.default)));
134
+ program.command("config:print").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option("--format <format>", "Format to print the configuration in, either json or yaml [yaml]").option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-5df69d1b.cjs.js'); }).then((m) => m.default)));
135
+ program.command("config:check").option("--package <name>", "Only load config schema that applies to the given package").option("--lax", "Do not require environment variables to be set").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-1542a59a.cjs.js'); }).then((m) => m.default)));
136
+ program.command("config:schema").option("--package <name>", "Only output config schema that applies to the given package").option("--format <format>", "Format to print the schema in, either json or yaml [yaml]").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-66b2f248.cjs.js'); }).then((m) => m.default)));
137
+ program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-27623ef3.cjs.js'); }).then((m) => m.default)));
138
+ program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-d2e5b1ca.cjs.js'); }).then((m) => m.default)));
139
+ program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f73a4522.cjs.js'); }).then((m) => m.pre)));
140
+ program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f73a4522.cjs.js'); }).then((m) => m.post)));
141
+ program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-f750c0dc.cjs.js'); }).then((m) => m.default)));
142
+ program.command("build-workspace <workspace-dir> ...<packages>").description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-cfea104f.cjs.js'); }).then((m) => m.default)));
143
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-07ce0d55.cjs.js'); }).then((m) => m.default)));
144
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-85a45abd.cjs.js'); }).then((m) => m.default)));
145
+ program.command("install [plugin-id]", {hidden: true}).option("--from <packageJsonFilePath>", "Install from a local package.json containing the installation recipe").description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-8c0b53e3.cjs.js'); }).then((m) => m.default)));
146
146
  }
147
147
  function lazy(getActionFunc) {
148
148
  return async (...args) => {
@@ -184,4 +184,4 @@ exports.packageVersions = packageVersions;
184
184
  exports.paths = paths;
185
185
  exports.version = version;
186
186
  exports.version$1 = version$7;
187
- //# sourceMappingURL=index-93747048.cjs.js.map
187
+ //# sourceMappingURL=index-8ece1803.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-93747048.cjs.js');
3
+ var index = require('./index-8ece1803.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-24fb7653.cjs.js');
5
+ var run = require('./run-cc82f277.cjs.js');
6
6
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
7
7
  require('chalk');
8
8
  require('commander');
@@ -40,4 +40,4 @@ var info = async () => {
40
40
  };
41
41
 
42
42
  exports.default = info;
43
- //# sourceMappingURL=info-c2d551c7.cjs.js.map
43
+ //# sourceMappingURL=info-85a45abd.cjs.js.map
@@ -3,12 +3,12 @@
3
3
  var fs = require('fs-extra');
4
4
  require('semver');
5
5
  require('@yarnpkg/lockfile');
6
- var packages = require('./packages-0b0b08c0.cjs.js');
7
- var index = require('./index-93747048.cjs.js');
6
+ var packages = require('./packages-be161005.cjs.js');
7
+ var index = require('./index-8ece1803.cjs.js');
8
8
  var chalk = require('chalk');
9
9
  var sortBy = require('lodash/sortBy');
10
10
  var groupBy = require('lodash/groupBy');
11
- var run = require('./run-24fb7653.cjs.js');
11
+ var run = require('./run-cc82f277.cjs.js');
12
12
  require('commander');
13
13
  require('@backstage/cli-common');
14
14
  require('@backstage/config/package.json');
@@ -210,4 +210,4 @@ var install = async (pluginId, cmd) => {
210
210
  };
211
211
 
212
212
  exports.default = install;
213
- //# sourceMappingURL=install-eecff7b6.cjs.js.map
213
+ //# sourceMappingURL=install-8c0b53e3.cjs.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
4
- require('./run-24fb7653.cjs.js');
4
+ require('./run-cc82f277.cjs.js');
5
5
  require('chalk');
6
- var index = require('./index-93747048.cjs.js');
6
+ var index = require('./index-8ece1803.cjs.js');
7
7
  var partition = require('lodash/partition');
8
8
  require('fs-extra');
9
9
  require('semver');
@@ -73,4 +73,4 @@ function logArray(arr, header, each) {
73
73
  exports.default = lint;
74
74
  exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
75
75
  exports.includedFilter = includedFilter;
76
- //# sourceMappingURL=lint-557d0761.cjs.js.map
76
+ //# sourceMappingURL=lint-d2e5b1ca.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-24fb7653.cjs.js');
4
- var index = require('./index-93747048.cjs.js');
3
+ var run = require('./run-cc82f277.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
  require('child_process');
6
6
  require('util');
7
7
  require('commander');
@@ -25,4 +25,4 @@ var lint = async (cmd, cmdArgs) => {
25
25
  };
26
26
 
27
27
  exports.default = lint;
28
- //# sourceMappingURL=lint-bbfe6f75.cjs.js.map
28
+ //# sourceMappingURL=lint-fffadef5.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
- var index = require('./index-93747048.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
  require('commander');
6
6
  require('chalk');
7
7
  require('semver');
@@ -38,4 +38,4 @@ const post = async () => {
38
38
 
39
39
  exports.post = post;
40
40
  exports.pre = pre;
41
- //# sourceMappingURL=pack-fa56665a.cjs.js.map
41
+ //# sourceMappingURL=pack-f73a4522.cjs.js.map
@@ -4,7 +4,7 @@ var fs = require('fs-extra');
4
4
  var rollup = require('rollup');
5
5
  var chalk = require('chalk');
6
6
  var path = require('path');
7
- var index = require('./index-93747048.cjs.js');
7
+ var index = require('./index-8ece1803.cjs.js');
8
8
  var peerDepsExternal = require('rollup-plugin-peer-deps-external');
9
9
  var commonjs = require('@rollup/plugin-commonjs');
10
10
  var resolve = require('@rollup/plugin-node-resolve');
@@ -254,4 +254,4 @@ const buildPackage = async (options) => {
254
254
  };
255
255
 
256
256
  exports.buildPackage = buildPackage;
257
- //# sourceMappingURL=packager-aa2d50f0.cjs.js.map
257
+ //# sourceMappingURL=packager-e61b2b16.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-24fb7653.cjs.js');
4
- var index = require('./index-93747048.cjs.js');
3
+ var run = require('./run-cc82f277.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
 
6
6
  const PREFIX = "@backstage";
7
7
  const DEP_TYPES = [
@@ -47,4 +47,4 @@ async function mapDependencies(targetDir) {
47
47
 
48
48
  exports.fetchPackageInfo = fetchPackageInfo;
49
49
  exports.mapDependencies = mapDependencies;
50
- //# sourceMappingURL=packages-0b0b08c0.cjs.js.map
50
+ //# sourceMappingURL=packages-be161005.cjs.js.map
@@ -13,8 +13,8 @@ var TerserPlugin = require('terser-webpack-plugin');
13
13
  var parallel = require('./parallel-a4714c72.cjs.js');
14
14
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
15
15
  var svgrTemplate = require('./svgrTemplate-2d0d15cf.cjs.js');
16
- var index = require('./index-93747048.cjs.js');
17
- var run = require('./run-24fb7653.cjs.js');
16
+ var index = require('./index-8ece1803.cjs.js');
17
+ var run = require('./run-cc82f277.cjs.js');
18
18
  var pickBy = require('lodash/pickBy');
19
19
 
20
20
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -47,9 +47,12 @@ const optimization = (options) => {
47
47
  default: false,
48
48
  packages: {
49
49
  chunks: "initial",
50
- test: /[\\/]node_modules[\\/]/,
50
+ test(module) {
51
+ var _a;
52
+ return Boolean((_a = module == null ? void 0 : module.resource) == null ? void 0 : _a.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/));
53
+ },
51
54
  name(module) {
52
- const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
55
+ const packageName = module.resource.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
53
56
  return packageName.replace("@", "");
54
57
  },
55
58
  filename: isDev ? "module-[name].js" : "static/module-[name].[chunkhash:8].js",
@@ -495,4 +498,4 @@ exports.createBackendConfig = createBackendConfig;
495
498
  exports.createConfig = createConfig;
496
499
  exports.resolveBaseUrl = resolveBaseUrl;
497
500
  exports.resolveBundlingPaths = resolveBundlingPaths;
498
- //# sourceMappingURL=paths-47004d9d.cjs.js.map
501
+ //# sourceMappingURL=paths-5e0e5ffc.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-c4bab0a4.cjs.js');
5
+ var config = require('./config-3e7b308b.cjs.js');
6
6
  require('@backstage/config-loader');
7
- require('./index-93747048.cjs.js');
7
+ require('./index-8ece1803.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -55,4 +55,4 @@ function serializeConfigData(appConfigs, schema, visibility) {
55
55
  }
56
56
 
57
57
  exports.default = print;
58
- //# sourceMappingURL=print-02e7ee9a.cjs.js.map
58
+ //# sourceMappingURL=print-5df69d1b.cjs.js.map
@@ -4,8 +4,8 @@ var fs = require('fs-extra');
4
4
  var path = require('path');
5
5
  var chalk = require('chalk');
6
6
  var inquirer = require('inquirer');
7
- var tasks = require('./tasks-a248ef13.cjs.js');
8
- var index = require('./index-93747048.cjs.js');
7
+ var tasks = require('./tasks-4d9e9b1f.cjs.js');
8
+ var index = require('./index-8ece1803.cjs.js');
9
9
  require('handlebars');
10
10
  require('ora');
11
11
  require('recursive-readdir');
@@ -161,4 +161,4 @@ exports.removePluginFromCodeOwners = removePluginFromCodeOwners;
161
161
  exports.removeReferencesFromAppPackage = removeReferencesFromAppPackage;
162
162
  exports.removeReferencesFromPluginsFile = removeReferencesFromPluginsFile;
163
163
  exports.removeSymLink = removeSymLink;
164
- //# sourceMappingURL=removePlugin-c77c6d6e.cjs.js.map
164
+ //# sourceMappingURL=removePlugin-865c314e.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-93747048.cjs.js');
4
+ var index = require('./index-8ece1803.cjs.js');
5
5
  var util = require('util');
6
6
 
7
7
  const execFile = util.promisify(child_process.execFile);
@@ -73,4 +73,4 @@ async function waitForExit(child, name) {
73
73
  exports.run = run;
74
74
  exports.runCheck = runCheck;
75
75
  exports.runPlain = runPlain;
76
- //# sourceMappingURL=run-24fb7653.cjs.js.map
76
+ //# sourceMappingURL=run-cc82f277.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var yaml = require('yaml');
4
- var config = require('./config-c4bab0a4.cjs.js');
4
+ var config = require('./config-3e7b308b.cjs.js');
5
5
  var configLoader = require('@backstage/config-loader');
6
6
  require('@backstage/config');
7
- require('./index-93747048.cjs.js');
7
+ require('./index-8ece1803.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -31,4 +31,4 @@ var schema = async (cmd) => {
31
31
  };
32
32
 
33
33
  exports.default = schema;
34
- //# sourceMappingURL=schema-f0dbdc35.cjs.js.map
34
+ //# sourceMappingURL=schema-66b2f248.cjs.js.map
@@ -11,15 +11,15 @@ require('webpack-node-externals');
11
11
  require('@backstage/cli-common');
12
12
  require('terser-webpack-plugin');
13
13
  require('mini-css-extract-plugin');
14
- var index = require('./index-93747048.cjs.js');
15
- require('./run-24fb7653.cjs.js');
14
+ var index = require('./index-8ece1803.cjs.js');
15
+ require('./run-cc82f277.cjs.js');
16
16
  require('lodash/pickBy');
17
17
  require('yn');
18
18
  require('react-dev-utils/FileSizeReporter');
19
19
  require('react-dev-utils/formatWebpackMessages');
20
20
  require('chalk');
21
- var server = require('./server-bf4580a1.cjs.js');
22
- var config = require('./config-c4bab0a4.cjs.js');
21
+ var server = require('./server-4f73b8b5.cjs.js');
22
+ var config = require('./config-3e7b308b.cjs.js');
23
23
  require('commander');
24
24
  require('semver');
25
25
  require('@backstage/config/package.json');
@@ -27,7 +27,7 @@ require('child_process');
27
27
  require('util');
28
28
  require('webpack-dev-server');
29
29
  require('react-dev-utils/openBrowser');
30
- require('./paths-47004d9d.cjs.js');
30
+ require('./paths-5e0e5ffc.cjs.js');
31
31
  require('./parallel-a4714c72.cjs.js');
32
32
  require('./svgrTemplate-2d0d15cf.cjs.js');
33
33
  require('@backstage/config-loader');
@@ -52,4 +52,4 @@ var serve = async (cmd) => {
52
52
  };
53
53
 
54
54
  exports.default = serve;
55
- //# sourceMappingURL=serve-487cdbe9.cjs.js.map
55
+ //# sourceMappingURL=serve-7656d962.cjs.js.map
@@ -13,16 +13,16 @@ require('webpack-node-externals');
13
13
  require('@backstage/cli-common');
14
14
  require('terser-webpack-plugin');
15
15
  require('mini-css-extract-plugin');
16
- var index = require('./index-93747048.cjs.js');
17
- require('./run-24fb7653.cjs.js');
16
+ var index = require('./index-8ece1803.cjs.js');
17
+ require('./run-cc82f277.cjs.js');
18
18
  require('lodash/pickBy');
19
19
  require('yn');
20
20
  require('react-dev-utils/FileSizeReporter');
21
21
  require('react-dev-utils/formatWebpackMessages');
22
- var server = require('./server-bf4580a1.cjs.js');
23
- var config = require('./config-c4bab0a4.cjs.js');
22
+ var server = require('./server-4f73b8b5.cjs.js');
23
+ var config = require('./config-3e7b308b.cjs.js');
24
24
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
25
- var lint = require('./lint-557d0761.cjs.js');
25
+ var lint = require('./lint-d2e5b1ca.cjs.js');
26
26
  require('commander');
27
27
  require('semver');
28
28
  require('@backstage/config/package.json');
@@ -30,7 +30,7 @@ require('child_process');
30
30
  require('util');
31
31
  require('webpack-dev-server');
32
32
  require('react-dev-utils/openBrowser');
33
- require('./paths-47004d9d.cjs.js');
33
+ require('./paths-5e0e5ffc.cjs.js');
34
34
  require('./parallel-a4714c72.cjs.js');
35
35
  require('./svgrTemplate-2d0d15cf.cjs.js');
36
36
  require('@backstage/config-loader');
@@ -74,4 +74,4 @@ var serve = async (cmd) => {
74
74
  };
75
75
 
76
76
  exports.default = serve;
77
- //# sourceMappingURL=serve-b53e4cce.cjs.js.map
77
+ //# sourceMappingURL=serve-b1a08c13.cjs.js.map
@@ -4,7 +4,7 @@ var fs = require('fs-extra');
4
4
  var webpack = require('webpack');
5
5
  var WebpackDevServer = require('webpack-dev-server');
6
6
  var openBrowser = require('react-dev-utils/openBrowser');
7
- var paths = require('./paths-47004d9d.cjs.js');
7
+ var paths = require('./paths-5e0e5ffc.cjs.js');
8
8
 
9
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
10
 
@@ -70,4 +70,4 @@ async function serveBundle(options) {
70
70
  }
71
71
 
72
72
  exports.serveBundle = serveBundle;
73
- //# sourceMappingURL=server-bf4580a1.cjs.js.map
73
+ //# sourceMappingURL=server-4f73b8b5.cjs.js.map
@@ -6,7 +6,7 @@ var chalk = require('chalk');
6
6
  var handlebars = require('handlebars');
7
7
  var ora = require('ora');
8
8
  var recursive = require('recursive-readdir');
9
- var index = require('./index-93747048.cjs.js');
9
+ var index = require('./index-8ece1803.cjs.js');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
@@ -158,4 +158,4 @@ exports.addCodeownersEntry = addCodeownersEntry;
158
158
  exports.getCodeownersFilePath = getCodeownersFilePath;
159
159
  exports.parseOwnerIds = parseOwnerIds;
160
160
  exports.templatingTask = templatingTask;
161
- //# sourceMappingURL=tasks-a248ef13.cjs.js.map
161
+ //# sourceMappingURL=tasks-4d9e9b1f.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-93747048.cjs.js');
4
- var run = require('./run-24fb7653.cjs.js');
3
+ var index = require('./index-8ece1803.cjs.js');
4
+ var run = require('./run-cc82f277.cjs.js');
5
5
  require('commander');
6
6
  require('chalk');
7
7
  require('fs-extra');
@@ -44,4 +44,4 @@ var testCommand = async (cmd) => {
44
44
  };
45
45
 
46
46
  exports.default = testCommand;
47
- //# sourceMappingURL=testCommand-7b6062c3.cjs.js.map
47
+ //# sourceMappingURL=testCommand-55c14530.cjs.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var config = require('./config-c4bab0a4.cjs.js');
3
+ var config = require('./config-3e7b308b.cjs.js');
4
4
  require('@backstage/config-loader');
5
5
  require('@backstage/config');
6
- require('./index-93747048.cjs.js');
6
+ require('./index-8ece1803.cjs.js');
7
7
  require('commander');
8
8
  require('chalk');
9
9
  require('fs-extra');
@@ -20,4 +20,4 @@ var validate = async (cmd) => {
20
20
  };
21
21
 
22
22
  exports.default = validate;
23
- //# sourceMappingURL=validate-e01a94da.cjs.js.map
23
+ //# sourceMappingURL=validate-1542a59a.cjs.js.map
package/dist/index.cjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('commander');
4
4
  require('chalk');
5
- require('./cjs/index-93747048.cjs.js');
5
+ require('./cjs/index-8ece1803.cjs.js');
6
6
  require('fs-extra');
7
7
  require('semver');
8
8
  require('@backstage/cli-common');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
3
  "description": "CLI for developing Backstage plugins and apps",
4
- "version": "0.0.0-nightly-202191122352",
4
+ "version": "0.0.0-nightly-202191622432",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -28,11 +28,9 @@
28
28
  "backstage-cli": "bin/backstage-cli"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/core": "^7.4.4",
32
- "@babel/plugin-transform-modules-commonjs": "^7.4.4",
33
31
  "@backstage/cli-common": "^0.1.4",
34
32
  "@backstage/config": "^0.1.10",
35
- "@backstage/config-loader": "^0.6.10",
33
+ "@backstage/config-loader": "^0.0.0-nightly-202191622432",
36
34
  "@hot-loader/react-dom": "^16.13.0",
37
35
  "@lerna/package-graph": "^4.0.0",
38
36
  "@lerna/project": "^4.0.0",
@@ -54,7 +52,6 @@
54
52
  "@typescript-eslint/eslint-plugin": "^v4.30.0",
55
53
  "@typescript-eslint/parser": "^v4.28.3",
56
54
  "@yarnpkg/lockfile": "^1.1.0",
57
- "babel-plugin-dynamic-import-node": "^2.3.3",
58
55
  "bfj": "^7.0.2",
59
56
  "buffer": "^6.0.3",
60
57
  "chalk": "^4.0.0",
@@ -85,7 +82,7 @@
85
82
  "json-schema": "^0.3.0",
86
83
  "jest-transform-yaml": "^0.1.1",
87
84
  "lodash": "^4.17.21",
88
- "mini-css-extract-plugin": "^1.4.1",
85
+ "mini-css-extract-plugin": "^2.4.2",
89
86
  "node-libs-browser": "^2.2.1",
90
87
  "ora": "^5.3.0",
91
88
  "postcss": "^8.1.0",
@@ -118,14 +115,14 @@
118
115
  "yn": "^4.0.0"
119
116
  },
120
117
  "devDependencies": {
121
- "@backstage/backend-common": "^0.9.6",
118
+ "@backstage/backend-common": "^0.0.0-nightly-202191622432",
122
119
  "@backstage/config": "^0.1.10",
123
- "@backstage/core-components": "^0.0.0-nightly-202191122352",
124
- "@backstage/core-plugin-api": "^0.1.10",
125
- "@backstage/core-app-api": "^0.1.16",
126
- "@backstage/dev-utils": "^0.2.11",
127
- "@backstage/test-utils": "^0.1.18",
128
- "@backstage/theme": "^0.2.10",
120
+ "@backstage/core-components": "^0.0.0-nightly-202191622432",
121
+ "@backstage/core-plugin-api": "^0.0.0-nightly-202191622432",
122
+ "@backstage/core-app-api": "^0.0.0-nightly-202191622432",
123
+ "@backstage/dev-utils": "^0.0.0-nightly-202191622432",
124
+ "@backstage/test-utils": "^0.0.0-nightly-202191622432",
125
+ "@backstage/theme": "^0.0.0-nightly-202191622432",
129
126
  "@types/diff": "^5.0.0",
130
127
  "@types/express": "^4.17.6",
131
128
  "@types/fs-extra": "^9.0.1",
@@ -1,2 +1,2 @@
1
1
  import '@testing-library/jest-dom';
2
- import 'cross-fetch/polyfill'
2
+ import 'cross-fetch/polyfill';
@@ -1,36 +0,0 @@
1
- /*
2
- * Copyright 2020 The Backstage Authors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- const babel = require('@babel/core');
18
-
19
- // We build .esm.js files with plugin:build, so to be able to load these in tests they need to be transformed
20
- // TODO: jest is working on module support, it's possible that we can remove this in the future
21
- module.exports = {
22
- process(src) {
23
- const result = babel.transform(src, {
24
- babelrc: false,
25
- compact: false,
26
- plugins: [
27
- // This transforms the regular ESM syntax, import and export statements
28
- require.resolve('@babel/plugin-transform-modules-commonjs'),
29
- // This transforms dynamic `import()`, which is not supported yet in the Node.js VM API
30
- require.resolve('babel-plugin-dynamic-import-node'),
31
- ],
32
- });
33
-
34
- return result.code;
35
- },
36
- };