@backstage/cli 0.10.1 → 0.10.5

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 (41) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/config/jest.js +5 -3
  3. package/dist/cjs/{build-574ad84f.cjs.js → build-133af6d0.cjs.js} +7 -7
  4. package/dist/cjs/{build-c587cc8c.cjs.js → build-9b61e21d.cjs.js} +3 -3
  5. package/dist/cjs/{build-dc2484e7.cjs.js → build-b09ce39b.cjs.js} +3 -3
  6. package/dist/cjs/{build-4c85e374.cjs.js → build-b8486ea8.cjs.js} +4 -4
  7. package/dist/cjs/{buildWorkspace-29b42a0b.cjs.js → buildWorkspace-674700ee.cjs.js} +4 -4
  8. package/dist/cjs/{bump-24057de2.cjs.js → bump-fc9f451d.cjs.js} +20 -9
  9. package/dist/cjs/{bundle-854deefb.cjs.js → bundle-2dd090df.cjs.js} +5 -5
  10. package/dist/cjs/{clean-ecf90e6b.cjs.js → clean-fbe87564.cjs.js} +2 -2
  11. package/dist/cjs/{config-91083c1e.cjs.js → config-ac195003.cjs.js} +12 -4
  12. package/dist/cjs/{create-89dd36f0.cjs.js → create-b1277797.cjs.js} +5 -4
  13. package/dist/cjs/{createPlugin-a8527ca3.cjs.js → createPlugin-a20640b2.cjs.js} +5 -4
  14. package/dist/cjs/{dev-3713f802.cjs.js → dev-357f9a5b.cjs.js} +4 -4
  15. package/dist/cjs/{diff-79e33159.cjs.js → diff-2c9f0f5b.cjs.js} +2 -2
  16. package/dist/cjs/{docs-a8506fde.cjs.js → docs-c28d9fe6.cjs.js} +3 -3
  17. package/dist/cjs/{index-b2152549.cjs.js → index-15114177.cjs.js} +49 -49
  18. package/dist/cjs/{index-33d9cbba.cjs.js → index-ce6e84ad.cjs.js} +3 -3
  19. package/dist/cjs/{index-9cf6e421.cjs.js → index-d778c391.cjs.js} +2 -2
  20. package/dist/cjs/{info-d8ce894c.cjs.js → info-fb86e821.cjs.js} +4 -3
  21. package/dist/cjs/{install-9e5b8576.cjs.js → install-0e40a4b5.cjs.js} +43 -15
  22. package/dist/cjs/{lint-a78b8bb6.cjs.js → lint-364632ce.cjs.js} +4 -3
  23. package/dist/cjs/{lint-955bc62d.cjs.js → lint-d03a1e28.cjs.js} +4 -4
  24. package/dist/cjs/{pack-f474f79b.cjs.js → pack-cc9d3480.cjs.js} +2 -2
  25. package/dist/cjs/{packager-6c80f203.cjs.js → packager-c484b561.cjs.js} +2 -2
  26. package/dist/cjs/{packages-bcde9079.cjs.js → packages-37922fa4.cjs.js} +10 -6
  27. package/dist/cjs/{paths-f9c22b94.cjs.js → paths-5901f4e6.cjs.js} +30 -14
  28. package/dist/cjs/{print-5e70799c.cjs.js → print-2861b2bc.cjs.js} +3 -3
  29. package/dist/cjs/{removePlugin-891ec166.cjs.js → removePlugin-299f58a3.cjs.js} +3 -3
  30. package/dist/cjs/{run-8388d249.cjs.js → run-0c9b9637.cjs.js} +2 -2
  31. package/dist/cjs/{schema-80516b43.cjs.js → schema-bd2de85b.cjs.js} +3 -3
  32. package/dist/cjs/{serve-6c335165.cjs.js → serve-1a01caf7.cjs.js} +7 -7
  33. package/dist/cjs/{serve-1b0ace54.cjs.js → serve-9d7083ef.cjs.js} +8 -7
  34. package/dist/cjs/{server-b2f87b69.cjs.js → server-5605972b.cjs.js} +2 -2
  35. package/dist/cjs/{tasks-f12b95ba.cjs.js → tasks-abce8018.cjs.js} +2 -2
  36. package/dist/cjs/{testCommand-1c515cf7.cjs.js → testCommand-34249b0d.cjs.js} +3 -3
  37. package/dist/cjs/{validate-9907afbb.cjs.js → validate-c29f64b6.cjs.js} +3 -3
  38. package/dist/index.cjs.js +1 -1
  39. package/package.json +15 -15
  40. package/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +1 -1
  41. package/templates/serve_index.html +1 -1
@@ -46,13 +46,13 @@ class NotFoundError extends CustomError {
46
46
 
47
47
  const paths = cliCommon.findPaths(__dirname);
48
48
 
49
- var version$9 = "0.9.13";
49
+ var version$9 = "0.10.2";
50
50
 
51
- var version$8 = "0.10.1";
51
+ var version$8 = "0.10.5";
52
52
  var dependencies = {
53
53
  "@backstage/cli-common": "^0.1.6",
54
54
  "@backstage/config": "^0.1.11",
55
- "@backstage/config-loader": "^0.8.1",
55
+ "@backstage/config-loader": "^0.9.1",
56
56
  "@backstage/errors": "^0.1.5",
57
57
  "@backstage/types": "^0.1.1",
58
58
  "@hot-loader/react-dom": "^16.13.0",
@@ -73,7 +73,7 @@ var dependencies = {
73
73
  "@svgr/rollup": "5.5.x",
74
74
  "@svgr/webpack": "5.5.x",
75
75
  "@types/webpack-env": "^1.15.2",
76
- "@typescript-eslint/eslint-plugin": "^v4.30.0",
76
+ "@typescript-eslint/eslint-plugin": "^v4.33.0",
77
77
  "@typescript-eslint/parser": "^v4.28.3",
78
78
  "@yarnpkg/lockfile": "^1.1.0",
79
79
  bfj: "^7.0.2",
@@ -81,8 +81,7 @@ var dependencies = {
81
81
  chalk: "^4.0.0",
82
82
  chokidar: "^3.3.1",
83
83
  commander: "^6.1.0",
84
- "css-loader": "^5.2.6",
85
- dashify: "^2.0.0",
84
+ "css-loader": "^6.5.1",
86
85
  diff: "^5.0.0",
87
86
  esbuild: "^0.14.1",
88
87
  eslint: "^7.30.0",
@@ -106,6 +105,7 @@ var dependencies = {
106
105
  "json-schema": "^0.4.0",
107
106
  "jest-transform-yaml": "^0.1.1",
108
107
  lodash: "^4.17.21",
108
+ minimatch: "3.0.4",
109
109
  "mini-css-extract-plugin": "^2.4.2",
110
110
  "node-libs-browser": "^2.2.1",
111
111
  ora: "^5.3.0",
@@ -127,7 +127,6 @@ var dependencies = {
127
127
  sucrase: "^3.20.2",
128
128
  tar: "^6.1.2",
129
129
  "terser-webpack-plugin": "^5.1.3",
130
- "ts-loader": "^8.0.17",
131
130
  typescript: "^4.0.3",
132
131
  util: "^0.12.3",
133
132
  webpack: "^5.48.0",
@@ -138,25 +137,26 @@ var dependencies = {
138
137
  yn: "^4.0.0"
139
138
  };
140
139
  var devDependencies = {
141
- "@backstage/backend-common": "^0.9.13",
140
+ "@backstage/backend-common": "^0.10.2",
142
141
  "@backstage/config": "^0.1.11",
143
- "@backstage/core-components": "^0.8.0",
144
- "@backstage/core-plugin-api": "^0.3.0",
145
- "@backstage/core-app-api": "^0.2.0",
146
- "@backstage/dev-utils": "^0.2.14",
147
- "@backstage/test-utils": "^0.1.24",
142
+ "@backstage/core-components": "^0.8.3",
143
+ "@backstage/core-plugin-api": "^0.4.1",
144
+ "@backstage/core-app-api": "^0.3.1",
145
+ "@backstage/dev-utils": "^0.2.16",
146
+ "@backstage/test-utils": "^0.2.1",
148
147
  "@backstage/theme": "^0.2.14",
149
148
  "@types/diff": "^5.0.0",
150
149
  "@types/express": "^4.17.6",
151
150
  "@types/fs-extra": "^9.0.1",
152
151
  "@types/http-proxy": "^1.17.4",
153
- "@types/inquirer": "^7.3.1",
152
+ "@types/inquirer": "^8.1.3",
153
+ "@types/minimatch": "^3.0.5",
154
154
  "@types/mock-fs": "^4.13.0",
155
155
  "@types/node": "^14.14.32",
156
156
  "@types/recursive-readdir": "^2.2.0",
157
157
  "@types/rollup-plugin-peer-deps-external": "^2.2.0",
158
158
  "@types/rollup-plugin-postcss": "^2.0.0",
159
- "@types/tar": "^4.0.3",
159
+ "@types/tar": "^6.1.1",
160
160
  "@types/terser-webpack-plugin": "^5.0.4",
161
161
  "@types/webpack": "^5.28.0",
162
162
  "@types/webpack-dev-server": "^3.11.5",
@@ -167,19 +167,19 @@ var devDependencies = {
167
167
  "ts-node": "^10.0.0"
168
168
  };
169
169
 
170
- var version$7 = "0.2.0";
170
+ var version$7 = "0.3.1";
171
171
 
172
- var version$6 = "0.8.0";
172
+ var version$6 = "0.8.3";
173
173
 
174
- var version$5 = "0.3.0";
174
+ var version$5 = "0.4.1";
175
175
 
176
- var version$4 = "0.2.14";
176
+ var version$4 = "0.2.16";
177
177
 
178
- var version$3 = "0.1.24";
178
+ var version$3 = "0.2.1";
179
179
 
180
180
  var version$2 = "0.2.14";
181
181
 
182
- var version$1 = "0.15.16";
182
+ var version$1 = "0.15.19";
183
183
 
184
184
  const packageVersions = {
185
185
  "@backstage/backend-common": version$9,
@@ -233,33 +233,33 @@ function registerCommands(program) {
233
233
  (opt, opts) => [...opts, opt],
234
234
  Array()
235
235
  ];
236
- 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-574ad84f.cjs.js'); }).then((m) => m.default)));
237
- 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-1b0ace54.cjs.js'); }).then((m) => m.default)));
238
- program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-c587cc8c.cjs.js'); }).then((m) => m.default)));
239
- 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-854deefb.cjs.js'); }).then((m) => m.default)));
240
- 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-3713f802.cjs.js'); }).then((m) => m.default)));
241
- 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-89dd36f0.cjs.js'); }).then((m) => m.default)));
242
- 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-a8527ca3.cjs.js'); }).then((m) => m.default)));
243
- program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-891ec166.cjs.js'); }).then((m) => m.default)));
244
- program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-dc2484e7.cjs.js'); }).then((m) => m.default)));
245
- 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-6c335165.cjs.js'); }).then((m) => m.default)));
246
- 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-79e33159.cjs.js'); }).then((m) => m.default)));
247
- 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-4c85e374.cjs.js'); }).then((m) => m.default)));
248
- 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-955bc62d.cjs.js'); }).then((m) => m.default)));
249
- 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-1c515cf7.cjs.js'); }).then((m) => m.default)));
250
- 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-a8506fde.cjs.js'); }).then((m) => m.default)));
251
- 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-5e70799c.cjs.js'); }).then((m) => m.default)));
252
- 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-9907afbb.cjs.js'); }).then((m) => m.default)));
253
- 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-80516b43.cjs.js'); }).then((m) => m.default)));
254
- program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-24057de2.cjs.js'); }).then((m) => m.default)));
255
- 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-a78b8bb6.cjs.js'); }).then((m) => m.default)));
256
- program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f474f79b.cjs.js'); }).then((m) => m.pre)));
257
- program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-f474f79b.cjs.js'); }).then((m) => m.post)));
258
- program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-ecf90e6b.cjs.js'); }).then((m) => m.default)));
259
- 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-29b42a0b.cjs.js'); }).then((m) => m.default)));
260
- program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-9cf6e421.cjs.js'); }).then((m) => m.default)));
261
- program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-d8ce894c.cjs.js'); }).then((m) => m.default)));
262
- 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-9e5b8576.cjs.js'); }).then((m) => m.default)));
236
+ 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-133af6d0.cjs.js'); }).then((m) => m.default)));
237
+ 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-9d7083ef.cjs.js'); }).then((m) => m.default)));
238
+ program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-9b61e21d.cjs.js'); }).then((m) => m.default)));
239
+ 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-2dd090df.cjs.js'); }).then((m) => m.default)));
240
+ 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-357f9a5b.cjs.js'); }).then((m) => m.default)));
241
+ 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-b1277797.cjs.js'); }).then((m) => m.default)));
242
+ 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-a20640b2.cjs.js'); }).then((m) => m.default)));
243
+ program.command("remove-plugin").description("[DEPRECATED] - Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-299f58a3.cjs.js'); }).then((m) => m.default)));
244
+ program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-b09ce39b.cjs.js'); }).then((m) => m.default)));
245
+ 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-1a01caf7.cjs.js'); }).then((m) => m.default)));
246
+ 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-2c9f0f5b.cjs.js'); }).then((m) => m.default)));
247
+ program.command("build").description("Build a package for publishing").option("--outputs <formats>", "List of formats to output [types,cjs,esm]").option("--minify", "Minify the generated code").action(lazy(() => Promise.resolve().then(function () { return require('./build-b8486ea8.cjs.js'); }).then((m) => m.default)));
248
+ 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-d03a1e28.cjs.js'); }).then((m) => m.default)));
249
+ 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-34249b0d.cjs.js'); }).then((m) => m.default)));
250
+ 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-c28d9fe6.cjs.js'); }).then((m) => m.default)));
251
+ 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-2861b2bc.cjs.js'); }).then((m) => m.default)));
252
+ 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-c29f64b6.cjs.js'); }).then((m) => m.default)));
253
+ 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-bd2de85b.cjs.js'); }).then((m) => m.default)));
254
+ program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-fc9f451d.cjs.js'); }).then((m) => m.default)));
255
+ 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-364632ce.cjs.js'); }).then((m) => m.default)));
256
+ program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-cc9d3480.cjs.js'); }).then((m) => m.pre)));
257
+ program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-cc9d3480.cjs.js'); }).then((m) => m.post)));
258
+ program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-fbe87564.cjs.js'); }).then((m) => m.default)));
259
+ 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-674700ee.cjs.js'); }).then((m) => m.default)));
260
+ program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-d778c391.cjs.js'); }).then((m) => m.default)));
261
+ program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-fb86e821.cjs.js'); }).then((m) => m.default)));
262
+ 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-0e40a4b5.cjs.js'); }).then((m) => m.default)));
263
263
  }
264
264
  function lazy(getActionFunc) {
265
265
  return async (...args) => {
@@ -303,4 +303,4 @@ exports.devDependencies = devDependencies;
303
303
  exports.paths = paths;
304
304
  exports.version = version;
305
305
  exports.version$1 = version$8;
306
- //# sourceMappingURL=index-b2152549.cjs.js.map
306
+ //# sourceMappingURL=index-15114177.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-b2152549.cjs.js');
8
- var run = require('./run-8388d249.cjs.js');
7
+ var index = require('./index-15114177.cjs.js');
8
+ var run = require('./run-0c9b9637.cjs.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
@@ -120,4 +120,4 @@ async function findTargetPackages(pkgNames) {
120
120
  }
121
121
 
122
122
  exports.createDistWorkspace = createDistWorkspace;
123
- //# sourceMappingURL=index-33d9cbba.cjs.js.map
123
+ //# sourceMappingURL=index-ce6e84ad.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-b2152549.cjs.js');
6
+ var index$1 = require('./index-15114177.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-9cf6e421.cjs.js.map
131
+ //# sourceMappingURL=index-d778c391.cjs.js.map
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-b2152549.cjs.js');
3
+ var index = require('./index-15114177.cjs.js');
4
4
  var os = require('os');
5
- var run = require('./run-8388d249.cjs.js');
5
+ var run = require('./run-0c9b9637.cjs.js');
6
6
  var Lockfile = require('./Lockfile-35661afa.cjs.js');
7
+ require('minimatch');
7
8
  require('chalk');
8
9
  require('commander');
9
10
  require('fs-extra');
@@ -41,4 +42,4 @@ var info = async () => {
41
42
  };
42
43
 
43
44
  exports["default"] = info;
44
- //# sourceMappingURL=info-d8ce894c.cjs.js.map
45
+ //# sourceMappingURL=info-fb86e821.cjs.js.map
@@ -3,12 +3,13 @@
3
3
  var fs = require('fs-extra');
4
4
  require('semver');
5
5
  require('@yarnpkg/lockfile');
6
- var packages = require('./packages-bcde9079.cjs.js');
7
- var index = require('./index-b2152549.cjs.js');
6
+ var packages = require('./packages-37922fa4.cjs.js');
7
+ var index = require('./index-15114177.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-8388d249.cjs.js');
11
+ var run = require('./run-0c9b9637.cjs.js');
12
+ require('minimatch');
12
13
  require('commander');
13
14
  require('@backstage/cli-common');
14
15
  require('@backstage/config/package.json');
@@ -161,7 +162,7 @@ class PluginInstaller {
161
162
  constructor(steps) {
162
163
  this.steps = steps;
163
164
  }
164
- static async resolveSteps(pkg) {
165
+ static async resolveSteps(pkg, versionToInstall) {
165
166
  var _a, _b;
166
167
  const steps = [];
167
168
  const dependencies$1 = [];
@@ -169,7 +170,7 @@ class PluginInstaller {
169
170
  target: "packages/app",
170
171
  type: "dependencies",
171
172
  name: pkg.name,
172
- query: `^${pkg.version}`
173
+ query: versionToInstall || `^${pkg.version}`
173
174
  });
174
175
  steps.push({
175
176
  type: "dependencies",
@@ -196,19 +197,46 @@ class PluginInstaller {
196
197
  }
197
198
  }
198
199
  }
200
+ async function installPluginAndPeerPlugins(pkg) {
201
+ const pluginDeps = /* @__PURE__ */ new Map();
202
+ pluginDeps.set(pkg.name, { pkg });
203
+ await loadPeerPluginDeps(pkg, pluginDeps);
204
+ console.log(`Installing ${pkg.name} AND any peer plugin dependencies.`);
205
+ for (const [_pluginDepName, pluginDep] of pluginDeps.entries()) {
206
+ const { pkg: pluginDepPkg, versionToInstall } = pluginDep;
207
+ console.log(`Installing plugin: ${pluginDepPkg.name}: ${versionToInstall || pluginDepPkg.version}`);
208
+ const steps = await PluginInstaller.resolveSteps(pluginDepPkg, versionToInstall);
209
+ const installer = new PluginInstaller(steps);
210
+ await installer.run();
211
+ }
212
+ }
213
+ async function loadPackageJson(plugin) {
214
+ if (plugin.endsWith("package.json")) {
215
+ return await fs__default["default"].readJson(plugin);
216
+ }
217
+ return await fetchPluginPackage(plugin);
218
+ }
219
+ async function loadPeerPluginDeps(pkg, pluginMap) {
220
+ var _a, _b;
221
+ for (const [pluginId, pluginVersion] of Object.entries((_b = (_a = pkg.experimentalInstallationRecipe) == null ? void 0 : _a.peerPluginDependencies) != null ? _b : {})) {
222
+ const depPkg = await loadPackageJson(pluginId);
223
+ if (!pluginMap.get(depPkg.name)) {
224
+ pluginMap.set(depPkg.name, {
225
+ pkg: depPkg,
226
+ versionToInstall: pluginVersion
227
+ });
228
+ await loadPeerPluginDeps(depPkg, pluginMap);
229
+ }
230
+ }
231
+ }
199
232
  var install = async (pluginId, cmd) => {
200
- let pkg;
201
- if (pluginId) {
202
- pkg = await fetchPluginPackage(pluginId);
203
- } else if (cmd == null ? void 0 : cmd.from) {
204
- pkg = await fs__default["default"].readJson(cmd.from);
205
- } else {
233
+ const from = pluginId || (cmd == null ? void 0 : cmd.from);
234
+ if (!from) {
206
235
  throw new Error("Missing both <plugin-id> or a package.json file path in the --from flag.");
207
236
  }
208
- const steps = await PluginInstaller.resolveSteps(pkg);
209
- const installer = new PluginInstaller(steps);
210
- await installer.run();
237
+ const pkg = await loadPackageJson(from);
238
+ await installPluginAndPeerPlugins(pkg);
211
239
  };
212
240
 
213
241
  exports["default"] = install;
214
- //# sourceMappingURL=install-9e5b8576.cjs.js.map
242
+ //# sourceMappingURL=install-0e40a4b5.cjs.js.map
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var Lockfile = require('./Lockfile-35661afa.cjs.js');
4
- require('./run-8388d249.cjs.js');
4
+ require('minimatch');
5
+ require('./run-0c9b9637.cjs.js');
5
6
  require('chalk');
6
- var index = require('./index-b2152549.cjs.js');
7
+ var index = require('./index-15114177.cjs.js');
7
8
  var partition = require('lodash/partition');
8
9
  require('fs-extra');
9
10
  require('semver');
@@ -74,4 +75,4 @@ function logArray(arr, header, each) {
74
75
  exports["default"] = lint;
75
76
  exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
76
77
  exports.includedFilter = includedFilter;
77
- //# sourceMappingURL=lint-a78b8bb6.cjs.js.map
78
+ //# sourceMappingURL=lint-364632ce.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-8388d249.cjs.js');
4
- var index = require('./index-b2152549.cjs.js');
3
+ var run = require('./run-0c9b9637.cjs.js');
4
+ var index = require('./index-15114177.cjs.js');
5
5
  require('child_process');
6
6
  require('util');
7
7
  require('@backstage/errors');
@@ -14,7 +14,7 @@ require('@backstage/config/package.json');
14
14
 
15
15
  var lint = async (cmd, cmdArgs) => {
16
16
  const args = [
17
- "--ext=js,jsx,ts,tsx",
17
+ "--ext=js,jsx,ts,tsx,mjs,cjs",
18
18
  "--max-warnings=0",
19
19
  `--format=${cmd.format}`,
20
20
  ...cmdArgs != null ? cmdArgs : [index.paths.targetDir]
@@ -26,4 +26,4 @@ var lint = async (cmd, cmdArgs) => {
26
26
  };
27
27
 
28
28
  exports["default"] = lint;
29
- //# sourceMappingURL=lint-955bc62d.cjs.js.map
29
+ //# sourceMappingURL=lint-d03a1e28.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-b2152549.cjs.js');
4
+ var index = require('./index-15114177.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-f474f79b.cjs.js.map
42
+ //# sourceMappingURL=pack-cc9d3480.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-b2152549.cjs.js');
7
+ var index = require('./index-15114177.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');
@@ -256,4 +256,4 @@ const buildPackage = async (options) => {
256
256
 
257
257
  exports.Output = Output;
258
258
  exports.buildPackage = buildPackage;
259
- //# sourceMappingURL=packager-6c80f203.cjs.js.map
259
+ //# sourceMappingURL=packager-c484b561.cjs.js.map
@@ -1,9 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var run = require('./run-8388d249.cjs.js');
4
- var index = require('./index-b2152549.cjs.js');
3
+ var minimatch = require('minimatch');
4
+ var run = require('./run-0c9b9637.cjs.js');
5
+ var index = require('./index-15114177.cjs.js');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch);
5
10
 
6
- const PREFIX = "@backstage";
7
11
  const DEP_TYPES = [
8
12
  "dependencies",
9
13
  "devDependencies",
@@ -21,7 +25,7 @@ async function fetchPackageInfo(name) {
21
25
  }
22
26
  return info.data;
23
27
  }
24
- async function mapDependencies(targetDir) {
28
+ async function mapDependencies(targetDir, pattern) {
25
29
  var _a;
26
30
  const { Project } = require("@lerna/project");
27
31
  const project = new Project(targetDir);
@@ -33,7 +37,7 @@ async function mapDependencies(targetDir) {
33
37
  return Object.entries((_a2 = pkg.get(t)) != null ? _a2 : {});
34
38
  });
35
39
  for (const [name, range] of deps) {
36
- if (name.startsWith(PREFIX)) {
40
+ if (minimatch__default["default"](name, pattern)) {
37
41
  dependencyMap.set(name, ((_a = dependencyMap.get(name)) != null ? _a : []).concat({
38
42
  range,
39
43
  name: pkg.name,
@@ -47,4 +51,4 @@ async function mapDependencies(targetDir) {
47
51
 
48
52
  exports.fetchPackageInfo = fetchPackageInfo;
49
53
  exports.mapDependencies = mapDependencies;
50
- //# sourceMappingURL=packages-bcde9079.cjs.js.map
54
+ //# sourceMappingURL=packages-37922fa4.cjs.js.map
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var fs = require('fs-extra');
4
+ var chalk = require('chalk');
4
5
  var path = require('path');
5
6
  var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
6
7
  var HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -13,13 +14,14 @@ var TerserPlugin = require('terser-webpack-plugin');
13
14
  var parallel = require('./parallel-a4714c72.cjs.js');
14
15
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
15
16
  var svgrTemplate = require('./svgrTemplate-f19e974c.cjs.js');
16
- var index = require('./index-b2152549.cjs.js');
17
- var run = require('./run-8388d249.cjs.js');
17
+ var index = require('./index-15114177.cjs.js');
18
+ var run = require('./run-0c9b9637.cjs.js');
18
19
  var pickBy = require('lodash/pickBy');
19
20
 
20
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
22
 
22
23
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
24
+ var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
23
25
  var ForkTsCheckerWebpackPlugin__default = /*#__PURE__*/_interopDefaultLegacy(ForkTsCheckerWebpackPlugin);
24
26
  var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefaultLegacy(HtmlWebpackPlugin);
25
27
  var ModuleScopePlugin__default = /*#__PURE__*/_interopDefaultLegacy(ModuleScopePlugin);
@@ -98,7 +100,7 @@ const transforms = (options) => {
98
100
  }
99
101
  },
100
102
  {
101
- test: /\.(jsx?|mjs)$/,
103
+ test: /\.(jsx?|mjs|cjs)$/,
102
104
  exclude: /node_modules/,
103
105
  loader: require.resolve("@sucrase/webpack-loader"),
104
106
  options: {
@@ -108,7 +110,7 @@ const transforms = (options) => {
108
110
  }
109
111
  },
110
112
  {
111
- test: /\.m?js/,
113
+ test: /\.(js|mjs|cjs)/,
112
114
  resolve: {
113
115
  fullySpecified: false
114
116
  }
@@ -286,21 +288,35 @@ async function createConfig(paths, options) {
286
288
  plugins.push(new webpack__default["default"].EnvironmentPlugin({
287
289
  APP_CONFIG: options.frontendAppConfigs
288
290
  }));
291
+ const appParamDeprecationMsg = chalk__default["default"].red('DEPRECATION WARNING: using `app.<key>` in the index.html template is deprecated, use `config.getString("app.<key>")` instead.');
289
292
  plugins.push(new HtmlWebpackPlugin__default["default"]({
290
293
  template: paths.targetHtml,
291
294
  templateParameters: {
292
295
  publicPath: validBaseUrl.pathname.replace(/\/$/, ""),
293
296
  app: {
294
- title: frontendConfig.getString("app.title"),
295
- baseUrl: validBaseUrl.href,
296
- googleAnalyticsTrackingId: frontendConfig.getOptionalString("app.googleAnalyticsTrackingId"),
297
- datadogRum: {
298
- env: frontendConfig.getOptionalString("app.datadogRum.env"),
299
- clientToken: frontendConfig.getOptionalString("app.datadogRum.clientToken"),
300
- applicationId: frontendConfig.getOptionalString("app.datadogRum.applicationId"),
301
- site: frontendConfig.getOptionalString("app.datadogRum.site")
297
+ get title() {
298
+ console.warn(appParamDeprecationMsg);
299
+ return frontendConfig.getString("app.title");
300
+ },
301
+ get baseUrl() {
302
+ console.warn(appParamDeprecationMsg);
303
+ return validBaseUrl.href;
304
+ },
305
+ get googleAnalyticsTrackingId() {
306
+ console.warn(appParamDeprecationMsg);
307
+ return frontendConfig.getOptionalString("app.googleAnalyticsTrackingId");
308
+ },
309
+ get datadogRum() {
310
+ console.warn(appParamDeprecationMsg);
311
+ return {
312
+ env: frontendConfig.getOptionalString("app.datadogRum.env"),
313
+ clientToken: frontendConfig.getOptionalString("app.datadogRum.clientToken"),
314
+ applicationId: frontendConfig.getOptionalString("app.datadogRum.applicationId"),
315
+ site: frontendConfig.getOptionalString("app.datadogRum.site")
316
+ };
302
317
  }
303
- }
318
+ },
319
+ config: frontendConfig
304
320
  }
305
321
  }));
306
322
  const buildInfo = await readBuildInfo();
@@ -513,4 +529,4 @@ exports.createBackendConfig = createBackendConfig;
513
529
  exports.createConfig = createConfig;
514
530
  exports.resolveBaseUrl = resolveBaseUrl;
515
531
  exports.resolveBundlingPaths = resolveBundlingPaths;
516
- //# sourceMappingURL=paths-f9c22b94.cjs.js.map
532
+ //# sourceMappingURL=paths-5901f4e6.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-91083c1e.cjs.js');
5
+ var config = require('./config-ac195003.cjs.js');
6
6
  require('@backstage/config-loader');
7
- require('./index-b2152549.cjs.js');
7
+ require('./index-15114177.cjs.js');
8
8
  require('commander');
9
9
  require('chalk');
10
10
  require('fs-extra');
@@ -57,4 +57,4 @@ function serializeConfigData(appConfigs, schema, visibility) {
57
57
  }
58
58
 
59
59
  exports["default"] = print;
60
- //# sourceMappingURL=print-5e70799c.cjs.js.map
60
+ //# sourceMappingURL=print-2861b2bc.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-f12b95ba.cjs.js');
8
- var index = require('./index-b2152549.cjs.js');
7
+ var tasks = require('./tasks-abce8018.cjs.js');
8
+ var index = require('./index-15114177.cjs.js');
9
9
  var errors = require('@backstage/errors');
10
10
  require('handlebars');
11
11
  require('ora');
@@ -172,4 +172,4 @@ exports.removePluginFromCodeOwners = removePluginFromCodeOwners;
172
172
  exports.removeReferencesFromAppPackage = removeReferencesFromAppPackage;
173
173
  exports.removeReferencesFromPluginsFile = removeReferencesFromPluginsFile;
174
174
  exports.removeSymLink = removeSymLink;
175
- //# sourceMappingURL=removePlugin-891ec166.cjs.js.map
175
+ //# sourceMappingURL=removePlugin-299f58a3.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-b2152549.cjs.js');
4
+ var index = require('./index-15114177.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-8388d249.cjs.js.map
81
+ //# sourceMappingURL=run-0c9b9637.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var yaml = require('yaml');
4
- var config = require('./config-91083c1e.cjs.js');
4
+ var config = require('./config-ac195003.cjs.js');
5
5
  var configLoader = require('@backstage/config-loader');
6
6
  require('@backstage/config');
7
- require('./index-b2152549.cjs.js');
7
+ require('./index-15114177.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-80516b43.cjs.js.map
35
+ //# sourceMappingURL=schema-bd2de85b.cjs.js.map