@backstage/cli 0.8.1 → 0.10.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 (60) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/config/jest.js +1 -0
  3. package/config/jestSucraseTransform.js +5 -1
  4. package/dist/cjs/{build-32289a53.cjs.js → build-555a7349.cjs.js} +3 -3
  5. package/dist/cjs/{build-7357e33b.cjs.js → build-8652aa69.cjs.js} +3 -3
  6. package/dist/cjs/{build-036a2109.cjs.js → build-b5fb2b35.cjs.js} +3 -3
  7. package/dist/cjs/{build-3192edeb.cjs.js → build-be463597.cjs.js} +8 -5
  8. package/dist/cjs/{buildWorkspace-794159d5.cjs.js → buildWorkspace-79c93924.cjs.js} +4 -4
  9. package/dist/cjs/{bump-ab142f88.cjs.js → bump-53a961f8.cjs.js} +28 -6
  10. package/dist/cjs/{bundle-faf5ad1e.cjs.js → bundle-64a797f5.cjs.js} +5 -5
  11. package/dist/cjs/{clean-e96f4b94.cjs.js → clean-a28705b5.cjs.js} +2 -2
  12. package/dist/cjs/{config-dab34362.cjs.js → config-3816244a.cjs.js} +21 -6
  13. package/dist/cjs/create-d5e65154.cjs.js +483 -0
  14. package/dist/cjs/{createPlugin-3c802c14.cjs.js → createPlugin-77a95bbd.cjs.js} +8 -9
  15. package/dist/cjs/{dev-5750e5cb.cjs.js → dev-3b68b882.cjs.js} +4 -4
  16. package/dist/cjs/{diff-86e1188b.cjs.js → diff-7238cc6c.cjs.js} +2 -2
  17. package/dist/cjs/{docs-34d3c7fe.cjs.js → docs-f46d6945.cjs.js} +3 -3
  18. package/dist/cjs/{index-69ec4ee3.cjs.js → index-05328067.cjs.js} +13 -11
  19. package/dist/cjs/{index-1db5f8d6.cjs.js → index-8a512334.cjs.js} +169 -51
  20. package/dist/cjs/{index-dc92c8f4.cjs.js → index-c8a3517a.cjs.js} +2 -2
  21. package/dist/cjs/{info-f1a293c8.cjs.js → info-a069f3b4.cjs.js} +3 -3
  22. package/dist/cjs/{install-40b1f07e.cjs.js → install-43a8076b.cjs.js} +4 -4
  23. package/dist/cjs/{lint-95a1066a.cjs.js → lint-0053aded.cjs.js} +3 -3
  24. package/dist/cjs/{lint-73e3cf0a.cjs.js → lint-60658813.cjs.js} +3 -3
  25. package/dist/cjs/{pack-a254b380.cjs.js → pack-a4246579.cjs.js} +2 -2
  26. package/dist/cjs/{packager-679f1af5.cjs.js → packager-b1a183ad.cjs.js} +2 -2
  27. package/dist/cjs/{packages-4fe3897c.cjs.js → packages-562fcd14.cjs.js} +3 -3
  28. package/dist/cjs/{paths-9f678df9.cjs.js → paths-f77bdf66.cjs.js} +20 -5
  29. package/dist/cjs/{print-b972c130.cjs.js → print-db876002.cjs.js} +5 -4
  30. package/dist/cjs/{removePlugin-dc596b42.cjs.js → removePlugin-1379b63a.cjs.js} +6 -3
  31. package/dist/cjs/{run-a312f9a6.cjs.js → run-bacdaaf1.cjs.js} +2 -2
  32. package/dist/cjs/{schema-463ba3bd.cjs.js → schema-3fe57ce7.cjs.js} +3 -3
  33. package/dist/cjs/{serve-7b531df5.cjs.js → serve-a9cf4184.cjs.js} +6 -6
  34. package/dist/cjs/{serve-3d293027.cjs.js → serve-e89d4ea4.cjs.js} +7 -7
  35. package/dist/cjs/{server-5582cec8.cjs.js → server-4f0e40d3.cjs.js} +2 -2
  36. package/dist/cjs/{tasks-d6b72c3c.cjs.js → tasks-29b7d09e.cjs.js} +78 -12
  37. package/dist/cjs/{testCommand-42b484a8.cjs.js → testCommand-5602a58f.cjs.js} +3 -3
  38. package/dist/cjs/{validate-4b57eb89.cjs.js → validate-9b1a5456.cjs.js} +5 -4
  39. package/dist/index.cjs.js +1 -1
  40. package/package.json +18 -18
  41. package/templates/default-backend-plugin/package.json.hbs +39 -37
  42. package/templates/default-backend-plugin/src/run.ts.hbs +1 -1
  43. package/templates/default-common-plugin-package/.eslintrc.js +3 -0
  44. package/templates/default-common-plugin-package/README.md.hbs +5 -0
  45. package/templates/default-common-plugin-package/package.json.hbs +34 -0
  46. package/templates/default-common-plugin-package/src/index.ts.hbs +19 -0
  47. package/templates/default-common-plugin-package/src/setupTests.ts +1 -0
  48. package/templates/default-common-plugin-package/tsconfig.json +9 -0
  49. package/templates/default-plugin/package.json.hbs +4 -2
  50. package/templates/default-plugin/src/routes.ts.hbs +1 -1
  51. package/templates/scaffolder-module/.eslintrc.js +3 -0
  52. package/templates/scaffolder-module/README.md.hbs +5 -0
  53. package/templates/scaffolder-module/package.json.hbs +37 -0
  54. package/templates/scaffolder-module/src/actions/example/example.test.ts +50 -0
  55. package/templates/scaffolder-module/src/actions/example/example.ts +57 -0
  56. package/templates/scaffolder-module/src/actions/example/index.ts +1 -0
  57. package/templates/scaffolder-module/src/actions/index.ts +1 -0
  58. package/templates/scaffolder-module/src/index.ts.hbs +8 -0
  59. package/templates/scaffolder-module/tsconfig.json +9 -0
  60. package/dist/cjs/buildImage-62344040.cjs.js +0 -77
@@ -22,11 +22,7 @@ class CustomError extends Error {
22
22
  }
23
23
  class ExitCodeError extends CustomError {
24
24
  constructor(code, command) {
25
- if (command) {
26
- super(`Command '${command}' exited with code ${code}`);
27
- } else {
28
- super(`Child exited with code ${code}`);
29
- }
25
+ super(command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`);
30
26
  this.code = code;
31
27
  }
32
28
  }
@@ -50,32 +46,153 @@ class NotFoundError extends CustomError {
50
46
 
51
47
  const paths = cliCommon.findPaths(__dirname);
52
48
 
53
- var version$8 = "0.9.8";
49
+ var version$9 = "0.9.12";
50
+
51
+ var version$8 = "0.10.0";
52
+ var dependencies = {
53
+ "@backstage/cli-common": "^0.1.6",
54
+ "@backstage/config": "^0.1.11",
55
+ "@backstage/config-loader": "^0.8.1",
56
+ "@backstage/errors": "^0.1.5",
57
+ "@backstage/types": "^0.1.1",
58
+ "@hot-loader/react-dom": "^16.13.0",
59
+ "@lerna/package-graph": "^4.0.0",
60
+ "@lerna/project": "^4.0.0",
61
+ "@octokit/request": "^5.4.12",
62
+ "@rollup/plugin-commonjs": "^21.0.1",
63
+ "@rollup/plugin-json": "^4.0.2",
64
+ "@rollup/plugin-node-resolve": "^13.0.0",
65
+ "@rollup/plugin-yaml": "^3.0.0",
66
+ "@spotify/eslint-config-base": "^12.0.0",
67
+ "@spotify/eslint-config-react": "^12.0.0",
68
+ "@spotify/eslint-config-typescript": "^12.0.0",
69
+ "@sucrase/jest-plugin": "^2.1.1",
70
+ "@sucrase/webpack-loader": "^2.0.0",
71
+ "@svgr/plugin-jsx": "5.5.x",
72
+ "@svgr/plugin-svgo": "5.4.x",
73
+ "@svgr/rollup": "5.5.x",
74
+ "@svgr/webpack": "5.5.x",
75
+ "@types/webpack-env": "^1.15.2",
76
+ "@typescript-eslint/eslint-plugin": "^v4.30.0",
77
+ "@typescript-eslint/parser": "^v4.28.3",
78
+ "@yarnpkg/lockfile": "^1.1.0",
79
+ bfj: "^7.0.2",
80
+ buffer: "^6.0.3",
81
+ chalk: "^4.0.0",
82
+ chokidar: "^3.3.1",
83
+ commander: "^6.1.0",
84
+ "css-loader": "^5.2.6",
85
+ dashify: "^2.0.0",
86
+ diff: "^5.0.0",
87
+ esbuild: "^0.8.56",
88
+ eslint: "^7.30.0",
89
+ "eslint-config-prettier": "^8.3.0",
90
+ "eslint-formatter-friendly": "^7.0.0",
91
+ "eslint-plugin-import": "^2.20.2",
92
+ "eslint-plugin-jest": "^24.1.0",
93
+ "eslint-plugin-jsx-a11y": "^6.2.1",
94
+ "eslint-plugin-monorepo": "^0.3.2",
95
+ "eslint-plugin-react": "^7.12.4",
96
+ "eslint-plugin-react-hooks": "^4.0.0",
97
+ express: "^4.17.1",
98
+ "fork-ts-checker-webpack-plugin": "^4.0.5",
99
+ "fs-extra": "9.1.0",
100
+ glob: "^7.1.7",
101
+ handlebars: "^4.7.3",
102
+ "html-webpack-plugin": "^5.3.1",
103
+ inquirer: "^7.0.4",
104
+ jest: "^26.0.1",
105
+ "jest-css-modules": "^2.1.0",
106
+ "json-schema": "^0.4.0",
107
+ "jest-transform-yaml": "^0.1.1",
108
+ lodash: "^4.17.21",
109
+ "mini-css-extract-plugin": "^2.4.2",
110
+ "node-libs-browser": "^2.2.1",
111
+ ora: "^5.3.0",
112
+ postcss: "^8.1.0",
113
+ process: "^0.11.10",
114
+ react: "^16.0.0",
115
+ "react-dev-utils": "^12.0.0-next.47",
116
+ "react-hot-loader": "^4.12.21",
117
+ "recursive-readdir": "^2.2.2",
118
+ "replace-in-file": "^6.0.0",
119
+ rollup: "2.44.x",
120
+ "rollup-plugin-dts": "^3.0.1",
121
+ "rollup-plugin-esbuild": "2.6.x",
122
+ "rollup-plugin-peer-deps-external": "^2.2.2",
123
+ "rollup-plugin-postcss": "^4.0.0",
124
+ "rollup-pluginutils": "^2.8.2",
125
+ "run-script-webpack-plugin": "^0.0.11",
126
+ semver: "^7.3.2",
127
+ "style-loader": "^3.3.1",
128
+ sucrase: "^3.20.2",
129
+ tar: "^6.1.2",
130
+ "terser-webpack-plugin": "^5.1.3",
131
+ "ts-loader": "^8.0.17",
132
+ typescript: "^4.0.3",
133
+ util: "^0.12.3",
134
+ webpack: "^5.48.0",
135
+ "webpack-dev-server": "4.3.1",
136
+ "webpack-node-externals": "^3.0.0",
137
+ yaml: "^1.10.0",
138
+ "yml-loader": "^2.1.0",
139
+ yn: "^4.0.0"
140
+ };
141
+ var devDependencies = {
142
+ "@backstage/backend-common": "^0.9.12",
143
+ "@backstage/config": "^0.1.11",
144
+ "@backstage/core-components": "^0.7.6",
145
+ "@backstage/core-plugin-api": "^0.2.2",
146
+ "@backstage/core-app-api": "^0.1.24",
147
+ "@backstage/dev-utils": "^0.2.13",
148
+ "@backstage/test-utils": "^0.1.23",
149
+ "@backstage/theme": "^0.2.14",
150
+ "@types/diff": "^5.0.0",
151
+ "@types/express": "^4.17.6",
152
+ "@types/fs-extra": "^9.0.1",
153
+ "@types/http-proxy": "^1.17.4",
154
+ "@types/inquirer": "^7.3.1",
155
+ "@types/mock-fs": "^4.13.0",
156
+ "@types/node": "^14.14.32",
157
+ "@types/recursive-readdir": "^2.2.0",
158
+ "@types/rollup-plugin-peer-deps-external": "^2.2.0",
159
+ "@types/rollup-plugin-postcss": "^2.0.0",
160
+ "@types/tar": "^4.0.3",
161
+ "@types/terser-webpack-plugin": "^5.0.4",
162
+ "@types/webpack": "^5.28.0",
163
+ "@types/webpack-dev-server": "^3.11.5",
164
+ "@types/yarnpkg__lockfile": "^1.1.4",
165
+ del: "^6.0.0",
166
+ "mock-fs": "^5.1.0",
167
+ nodemon: "^2.0.2",
168
+ "ts-node": "^10.0.0"
169
+ };
54
170
 
55
- var version$7 = "0.8.1";
171
+ var version$7 = "0.1.24";
56
172
 
57
- var version$6 = "0.1.19";
173
+ var version$6 = "0.7.6";
58
174
 
59
- var version$5 = "0.7.2";
175
+ var version$5 = "0.2.2";
60
176
 
61
- var version$4 = "0.1.12";
177
+ var version$4 = "0.2.13";
62
178
 
63
- var version$3 = "0.2.12";
179
+ var version$3 = "0.1.23";
64
180
 
65
- var version$2 = "0.1.20";
181
+ var version$2 = "0.2.14";
66
182
 
67
- var version$1 = "0.2.12";
183
+ var version$1 = "0.15.15";
68
184
 
69
185
  const packageVersions = {
70
- "@backstage/backend-common": version$8,
71
- "@backstage/cli": version$7,
186
+ "@backstage/backend-common": version$9,
187
+ "@backstage/cli": version$8,
72
188
  "@backstage/config": package_json.version,
73
- "@backstage/core-app-api": version$6,
74
- "@backstage/core-components": version$5,
75
- "@backstage/core-plugin-api": version$4,
76
- "@backstage/dev-utils": version$3,
77
- "@backstage/test-utils": version$2,
78
- "@backstage/theme": version$1
189
+ "@backstage/core-app-api": version$7,
190
+ "@backstage/core-components": version$6,
191
+ "@backstage/core-plugin-api": version$5,
192
+ "@backstage/dev-utils": version$4,
193
+ "@backstage/test-utils": version$3,
194
+ "@backstage/theme": version$2,
195
+ "@backstage/plugin-scaffolder-backend": version$1
79
196
  };
80
197
  function findVersion() {
81
198
  const pkgContent = fs__default['default'].readFileSync(paths.resolveOwn("package.json"), "utf8");
@@ -117,33 +234,33 @@ function registerCommands(program) {
117
234
  (opt, opts) => [...opts, opt],
118
235
  Array()
119
236
  ];
120
- 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-3192edeb.cjs.js'); }).then((m) => m.default)));
121
- 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-3d293027.cjs.js'); }).then((m) => m.default)));
122
- program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-7357e33b.cjs.js'); }).then((m) => m.default)));
123
- 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-faf5ad1e.cjs.js'); }).then((m) => m.default)));
124
- 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-62344040.cjs.js'); }).then((m) => m.default)));
125
- 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-5750e5cb.cjs.js'); }).then((m) => m.default)));
126
- 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-3c802c14.cjs.js'); }).then((m) => m.default)));
127
- program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-dc596b42.cjs.js'); }).then((m) => m.default)));
128
- program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-036a2109.cjs.js'); }).then((m) => m.default)));
129
- 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-7b531df5.cjs.js'); }).then((m) => m.default)));
130
- 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-86e1188b.cjs.js'); }).then((m) => m.default)));
131
- 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-32289a53.cjs.js'); }).then((m) => m.default)));
132
- 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-73e3cf0a.cjs.js'); }).then((m) => m.default)));
133
- 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-42b484a8.cjs.js'); }).then((m) => m.default)));
134
- 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-34d3c7fe.cjs.js'); }).then((m) => m.default)));
135
- 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-b972c130.cjs.js'); }).then((m) => m.default)));
136
- 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-4b57eb89.cjs.js'); }).then((m) => m.default)));
137
- 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-463ba3bd.cjs.js'); }).then((m) => m.default)));
138
- program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-ab142f88.cjs.js'); }).then((m) => m.default)));
139
- 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-95a1066a.cjs.js'); }).then((m) => m.default)));
140
- program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a254b380.cjs.js'); }).then((m) => m.pre)));
141
- program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a254b380.cjs.js'); }).then((m) => m.post)));
142
- program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-e96f4b94.cjs.js'); }).then((m) => m.default)));
143
- 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-794159d5.cjs.js'); }).then((m) => m.default)));
144
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-dc92c8f4.cjs.js'); }).then((m) => m.default)));
145
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-f1a293c8.cjs.js'); }).then((m) => m.default)));
146
- 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-40b1f07e.cjs.js'); }).then((m) => m.default)));
237
+ program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "[DEPRECATED] - Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-be463597.cjs.js'); }).then((m) => m.default)));
238
+ 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-e89d4ea4.cjs.js'); }).then((m) => m.default)));
239
+ program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-8652aa69.cjs.js'); }).then((m) => m.default)));
240
+ 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-64a797f5.cjs.js'); }).then((m) => m.default)));
241
+ 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-3b68b882.cjs.js'); }).then((m) => m.default)));
242
+ program.command("create").storeOptionsAsProperties(false).description("Open up an interactive guide to creating new things in your app").option("--select <name>", "Select the thing you want to be creating upfront").option("--option <name>=<value>", "Pre-fill options for the creation process", (opt, arr) => [...arr, opt], []).option("--scope <scope>", "The scope to use for new packages").option("--npm-registry <URL>", "The package registry to use for new packages").option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./create-d5e65154.cjs.js'); }).then((m) => m.default)));
243
+ 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-77a95bbd.cjs.js'); }).then((m) => m.default)));
244
+ program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-1379b63a.cjs.js'); }).then((m) => m.default)));
245
+ program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-b5fb2b35.cjs.js'); }).then((m) => m.default)));
246
+ 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-a9cf4184.cjs.js'); }).then((m) => m.default)));
247
+ 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-7238cc6c.cjs.js'); }).then((m) => m.default)));
248
+ 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-555a7349.cjs.js'); }).then((m) => m.default)));
249
+ 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-60658813.cjs.js'); }).then((m) => m.default)));
250
+ 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-5602a58f.cjs.js'); }).then((m) => m.default)));
251
+ 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-f46d6945.cjs.js'); }).then((m) => m.default)));
252
+ 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-db876002.cjs.js'); }).then((m) => m.default)));
253
+ 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("--frontend", "Only validate the frontend configuration").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-9b1a5456.cjs.js'); }).then((m) => m.default)));
254
+ 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-3fe57ce7.cjs.js'); }).then((m) => m.default)));
255
+ program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-53a961f8.cjs.js'); }).then((m) => m.default)));
256
+ 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-0053aded.cjs.js'); }).then((m) => m.default)));
257
+ program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a4246579.cjs.js'); }).then((m) => m.pre)));
258
+ program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a4246579.cjs.js'); }).then((m) => m.post)));
259
+ program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-a28705b5.cjs.js'); }).then((m) => m.default)));
260
+ 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-79c93924.cjs.js'); }).then((m) => m.default)));
261
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-c8a3517a.cjs.js'); }).then((m) => m.default)));
262
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-a069f3b4.cjs.js'); }).then((m) => m.default)));
263
+ 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-43a8076b.cjs.js'); }).then((m) => m.default)));
147
264
  }
148
265
  function lazy(getActionFunc) {
149
266
  return async (...args) => {
@@ -182,8 +299,9 @@ main(process.argv);
182
299
  exports.ExitCodeError = ExitCodeError;
183
300
  exports.NotFoundError = NotFoundError;
184
301
  exports.createPackageVersionProvider = createPackageVersionProvider;
185
- exports.packageVersions = packageVersions;
302
+ exports.dependencies = dependencies;
303
+ exports.devDependencies = devDependencies;
186
304
  exports.paths = paths;
187
305
  exports.version = version;
188
- exports.version$1 = version$7;
189
- //# sourceMappingURL=index-1db5f8d6.cjs.js.map
306
+ exports.version$1 = version$8;
307
+ //# sourceMappingURL=index-8a512334.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-1db5f8d6.cjs.js');
6
+ var index$1 = require('./index-8a512334.cjs.js');
7
7
  var crypto = require('crypto');
8
8
  var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var request = require('@octokit/request');
@@ -128,4 +128,4 @@ ${yaml.stringify(config)}`;
128
128
  };
129
129
 
130
130
  exports.default = index;
131
- //# sourceMappingURL=index-dc92c8f4.cjs.js.map
131
+ //# sourceMappingURL=index-c8a3517a.cjs.js.map
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-1db5f8d6.cjs.js');
3
+ var index = require('./index-8a512334.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-a312f9a6.cjs.js');
5
+ var run = require('./run-bacdaaf1.cjs.js');
6
6
  var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
7
7
  require('chalk');
8
8
  require('commander');
@@ -41,4 +41,4 @@ var info = async () => {
41
41
  };
42
42
 
43
43
  exports.default = info;
44
- //# sourceMappingURL=info-f1a293c8.cjs.js.map
44
+ //# sourceMappingURL=info-a069f3b4.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-4fe3897c.cjs.js');
7
- var index = require('./index-1db5f8d6.cjs.js');
6
+ var packages = require('./packages-562fcd14.cjs.js');
7
+ var index = require('./index-8a512334.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-a312f9a6.cjs.js');
11
+ var run = require('./run-bacdaaf1.cjs.js');
12
12
  require('commander');
13
13
  require('@backstage/cli-common');
14
14
  require('@backstage/config/package.json');
@@ -211,4 +211,4 @@ var install = async (pluginId, cmd) => {
211
211
  };
212
212
 
213
213
  exports.default = install;
214
- //# sourceMappingURL=install-40b1f07e.cjs.js.map
214
+ //# sourceMappingURL=install-43a8076b.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-a312f9a6.cjs.js');
4
+ require('./run-bacdaaf1.cjs.js');
5
5
  require('chalk');
6
- var index = require('./index-1db5f8d6.cjs.js');
6
+ var index = require('./index-8a512334.cjs.js');
7
7
  var partition = require('lodash/partition');
8
8
  require('fs-extra');
9
9
  require('semver');
@@ -74,4 +74,4 @@ function logArray(arr, header, each) {
74
74
  exports.default = lint;
75
75
  exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
76
76
  exports.includedFilter = includedFilter;
77
- //# sourceMappingURL=lint-95a1066a.cjs.js.map
77
+ //# sourceMappingURL=lint-0053aded.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-a312f9a6.cjs.js');
4
- var index = require('./index-1db5f8d6.cjs.js');
3
+ var run = require('./run-bacdaaf1.cjs.js');
4
+ var index = require('./index-8a512334.cjs.js');
5
5
  require('child_process');
6
6
  require('util');
7
7
  require('@backstage/errors');
@@ -26,4 +26,4 @@ var lint = async (cmd, cmdArgs) => {
26
26
  };
27
27
 
28
28
  exports.default = lint;
29
- //# sourceMappingURL=lint-73e3cf0a.cjs.js.map
29
+ //# sourceMappingURL=lint-60658813.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-1db5f8d6.cjs.js');
4
+ var index = require('./index-8a512334.cjs.js');
5
5
  require('commander');
6
6
  require('chalk');
7
7
  require('semver');
@@ -39,4 +39,4 @@ const post = async () => {
39
39
 
40
40
  exports.post = post;
41
41
  exports.pre = pre;
42
- //# sourceMappingURL=pack-a254b380.cjs.js.map
42
+ //# sourceMappingURL=pack-a4246579.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-1db5f8d6.cjs.js');
7
+ var index = require('./index-8a512334.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-679f1af5.cjs.js.map
257
+ //# sourceMappingURL=packager-b1a183ad.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-a312f9a6.cjs.js');
4
- var index = require('./index-1db5f8d6.cjs.js');
3
+ var run = require('./run-bacdaaf1.cjs.js');
4
+ var index = require('./index-8a512334.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-4fe3897c.cjs.js.map
50
+ //# sourceMappingURL=packages-562fcd14.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-1db5f8d6.cjs.js');
17
- var run = require('./run-a312f9a6.cjs.js');
16
+ var index = require('./index-8a512334.cjs.js');
17
+ var run = require('./run-bacdaaf1.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 }; }
@@ -77,6 +77,15 @@ const optimization = (options) => {
77
77
  const transforms = (options) => {
78
78
  const {isDev} = options;
79
79
  const extraTransforms = isDev ? ["react-hot-loader"] : [];
80
+ function insertBeforeJssStyles(element) {
81
+ const head = document.head;
82
+ const firstJssNode = head.querySelector("style[data-jss]");
83
+ if (!firstJssNode) {
84
+ head.appendChild(element);
85
+ } else {
86
+ head.insertBefore(element, firstJssNode);
87
+ }
88
+ }
80
89
  const loaders = [
81
90
  {
82
91
  test: /\.(tsx?)$/,
@@ -157,7 +166,12 @@ const transforms = (options) => {
157
166
  {
158
167
  test: /\.css$/i,
159
168
  use: [
160
- isDev ? require.resolve("style-loader") : MiniCssExtractPlugin__default['default'].loader,
169
+ isDev ? {
170
+ loader: require.resolve("style-loader"),
171
+ options: {
172
+ insert: insertBeforeJssStyles
173
+ }
174
+ } : MiniCssExtractPlugin__default['default'].loader,
161
175
  {
162
176
  loader: require.resolve("css-loader"),
163
177
  options: {
@@ -173,7 +187,8 @@ const transforms = (options) => {
173
187
  } else {
174
188
  plugins.push(new MiniCssExtractPlugin__default['default']({
175
189
  filename: "static/[name].[contenthash:8].css",
176
- chunkFilename: "static/[name].[id].[contenthash:8].css"
190
+ chunkFilename: "static/[name].[id].[contenthash:8].css",
191
+ insert: insertBeforeJssStyles
177
192
  }));
178
193
  }
179
194
  return {loaders, plugins};
@@ -498,4 +513,4 @@ exports.createBackendConfig = createBackendConfig;
498
513
  exports.createConfig = createConfig;
499
514
  exports.resolveBaseUrl = resolveBaseUrl;
500
515
  exports.resolveBundlingPaths = resolveBundlingPaths;
501
- //# sourceMappingURL=paths-9f678df9.cjs.js.map
516
+ //# sourceMappingURL=paths-f77bdf66.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-dab34362.cjs.js');
5
+ var config = require('./config-3816244a.cjs.js');
6
6
  require('@backstage/config-loader');
7
- require('./index-1db5f8d6.cjs.js');
7
+ require('./index-8a512334.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -17,7 +17,8 @@ var print = async (cmd) => {
17
17
  const {schema, appConfigs} = await config.loadCliConfig({
18
18
  args: cmd.config,
19
19
  fromPackage: cmd.package,
20
- mockEnv: cmd.lax
20
+ mockEnv: cmd.lax,
21
+ fullVisibility: !cmd.frontend
21
22
  });
22
23
  const visibility = getVisibilityOption(cmd);
23
24
  const data = serializeConfigData(appConfigs, schema, visibility);
@@ -56,4 +57,4 @@ function serializeConfigData(appConfigs, schema, visibility) {
56
57
  }
57
58
 
58
59
  exports.default = print;
59
- //# sourceMappingURL=print-b972c130.cjs.js.map
60
+ //# sourceMappingURL=print-db876002.cjs.js.map
@@ -4,12 +4,14 @@ 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-d6b72c3c.cjs.js');
8
- var index = require('./index-1db5f8d6.cjs.js');
7
+ var tasks = require('./tasks-29b7d09e.cjs.js');
8
+ var index = require('./index-8a512334.cjs.js');
9
9
  var errors = require('@backstage/errors');
10
10
  require('handlebars');
11
11
  require('ora');
12
+ require('util');
12
13
  require('recursive-readdir');
14
+ require('child_process');
13
15
  require('commander');
14
16
  require('semver');
15
17
  require('@backstage/cli-common');
@@ -109,6 +111,7 @@ const removeReferencesFromAppPackage = async (appPackageFile, pluginName) => {
109
111
  });
110
112
  };
111
113
  var removePlugin = async () => {
114
+ console.warn(chalk__default['default'].yellow("[DEPRECATED] - The remove-plugin command is deprecated and will be removed in the future."));
112
115
  const questions = [
113
116
  {
114
117
  type: "input",
@@ -169,4 +172,4 @@ exports.removePluginFromCodeOwners = removePluginFromCodeOwners;
169
172
  exports.removeReferencesFromAppPackage = removeReferencesFromAppPackage;
170
173
  exports.removeReferencesFromPluginsFile = removeReferencesFromPluginsFile;
171
174
  exports.removeSymLink = removeSymLink;
172
- //# sourceMappingURL=removePlugin-dc596b42.cjs.js.map
175
+ //# sourceMappingURL=removePlugin-1379b63a.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-1db5f8d6.cjs.js');
4
+ var index = require('./index-8a512334.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-a312f9a6.cjs.js.map
81
+ //# sourceMappingURL=run-bacdaaf1.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var yaml = require('yaml');
4
- var config = require('./config-dab34362.cjs.js');
4
+ var config = require('./config-3816244a.cjs.js');
5
5
  var configLoader = require('@backstage/config-loader');
6
6
  require('@backstage/config');
7
- require('./index-1db5f8d6.cjs.js');
7
+ require('./index-8a512334.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -32,4 +32,4 @@ var schema = async (cmd) => {
32
32
  };
33
33
 
34
34
  exports.default = schema;
35
- //# sourceMappingURL=schema-463ba3bd.cjs.js.map
35
+ //# sourceMappingURL=schema-3fe57ce7.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-1db5f8d6.cjs.js');
15
- require('./run-a312f9a6.cjs.js');
14
+ var index = require('./index-8a512334.cjs.js');
15
+ require('./run-bacdaaf1.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-5582cec8.cjs.js');
22
- var config = require('./config-dab34362.cjs.js');
21
+ var server = require('./server-4f0e40d3.cjs.js');
22
+ var config = require('./config-3816244a.cjs.js');
23
23
  require('commander');
24
24
  require('semver');
25
25
  require('@backstage/config/package.json');
@@ -28,7 +28,7 @@ require('child_process');
28
28
  require('util');
29
29
  require('webpack-dev-server');
30
30
  require('react-dev-utils/openBrowser');
31
- require('./paths-9f678df9.cjs.js');
31
+ require('./paths-f77bdf66.cjs.js');
32
32
  require('./parallel-a4714c72.cjs.js');
33
33
  require('./svgrTemplate-2d0d15cf.cjs.js');
34
34
  require('@backstage/config-loader');
@@ -53,4 +53,4 @@ var serve = async (cmd) => {
53
53
  };
54
54
 
55
55
  exports.default = serve;
56
- //# sourceMappingURL=serve-7b531df5.cjs.js.map
56
+ //# sourceMappingURL=serve-a9cf4184.cjs.js.map