@backstage/cli 0.13.1-next.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/config/eslint.backend.js +1 -12
- package/config/eslint.js +6 -17
- package/dist/cjs/{PackageGraph-7a0d3a83.cjs.js → PackageGraph-f7218931.cjs.js} +8 -1
- package/dist/cjs/backend-93c17f0a.cjs.js +36 -0
- package/dist/cjs/{build-5d1cb969.cjs.js → build-009e73a3.cjs.js} +7 -3
- package/dist/cjs/{build-be81c94d.cjs.js → build-36589e8a.cjs.js} +7 -3
- package/dist/cjs/build-8188b3a4.cjs.js +173 -0
- package/dist/cjs/build-ba38de45.cjs.js +57 -0
- package/dist/cjs/buildBackend-85df229c.cjs.js +83 -0
- package/dist/cjs/buildWorkspace-44672ad9.cjs.js +54 -0
- package/dist/cjs/bump-9aca460c.cjs.js +302 -0
- package/dist/cjs/{build-669ecde7.cjs.js → bundle-c36a33a5.cjs.js} +10 -49
- package/dist/cjs/{bundle-b573b38a.cjs.js → bundle-c676710a.cjs.js} +15 -10
- package/dist/cjs/{clean-780112f6.cjs.js → clean-fb5eabab.cjs.js} +2 -2
- package/dist/cjs/{config-ee0c4a83.cjs.js → config-2045332a.cjs.js} +3 -3
- package/dist/cjs/{create-48c86908.cjs.js → create-d576afd6.cjs.js} +4 -4
- package/dist/cjs/createDistWorkspace-1949b495.cjs.js +205 -0
- package/dist/cjs/{createPlugin-7d56930f.cjs.js → createPlugin-6b9a37d7.cjs.js} +4 -4
- package/dist/cjs/{dev-3c88dd2a.cjs.js → dev-a43bf6c5.cjs.js} +7 -32
- package/dist/cjs/{diff-df7c9a0c.cjs.js → diff-8090cb39.cjs.js} +4 -8
- package/dist/cjs/{docs-c11c4103.cjs.js → docs-8134e3d2.cjs.js} +4 -4
- package/dist/cjs/index-0c3a82e2.cjs.js +94 -0
- package/dist/cjs/{index-621ba6c9.cjs.js → index-4605496f.cjs.js} +75 -48
- package/dist/cjs/index-603a246b.cjs.js +125 -0
- package/dist/cjs/{index-18554f1c.cjs.js → index-a932d832.cjs.js} +2 -2
- package/dist/cjs/{info-db368553.cjs.js → info-9187be16.cjs.js} +3 -3
- package/dist/cjs/{install-b711cea1.cjs.js → install-30028f72.cjs.js} +4 -4
- package/dist/cjs/{lint-fb6d3fe7.cjs.js → lint-753ca24f.cjs.js} +3 -3
- package/dist/cjs/lint-d863cb88.cjs.js +35 -0
- package/dist/cjs/{build-380254f7.cjs.js → oldBuild-f1abef0d.cjs.js} +9 -5
- package/dist/cjs/{pack-0225b8ee.cjs.js → pack-a51c7cf8.cjs.js} +2 -2
- package/dist/cjs/packageRole-6f48a89c.cjs.js +54 -0
- package/dist/cjs/packageRoles-a2eecabc.cjs.js +158 -0
- package/dist/cjs/packageScripts-69fbc72e.cjs.js +61 -0
- package/dist/cjs/{packager-03db0c91.cjs.js → packager-57263112.cjs.js} +181 -74
- package/dist/cjs/{packages-ea22fb5a.cjs.js → packages-ef539958.cjs.js} +3 -3
- package/dist/cjs/parallel-e73a4058.cjs.js +48 -0
- package/dist/cjs/{paths-f1f75c0e.cjs.js → paths-2db88422.cjs.js} +19 -18
- package/dist/cjs/{print-23333c9a.cjs.js → print-0be864a4.cjs.js} +4 -4
- package/dist/cjs/{run-615f671f.cjs.js → run-43a2e0bb.cjs.js} +2 -2
- package/dist/cjs/{schema-47f19cb7.cjs.js → schema-899242a2.cjs.js} +4 -4
- package/dist/cjs/{serve-0d165973.cjs.js → serve-b5a89a22.cjs.js} +7 -7
- package/dist/cjs/{serve-c7a64437.cjs.js → serve-b69389e9.cjs.js} +8 -8
- package/dist/cjs/{server-d167ef2f.cjs.js → server-d8c1f8fd.cjs.js} +2 -2
- package/dist/cjs/{tasks-0a084d00.cjs.js → tasks-096c80eb.cjs.js} +2 -2
- package/dist/cjs/{testCommand-53436344.cjs.js → testCommand-1bd885b0.cjs.js} +3 -3
- package/dist/cjs/{validate-aa20bf78.cjs.js → validate-e670ef09.cjs.js} +4 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +14 -9
- package/dist/cjs/buildWorkspace-5c2e178b.cjs.js +0 -35
- package/dist/cjs/bump-2cfa8a5a.cjs.js +0 -240
- package/dist/cjs/index-cb0ecebc.cjs.js +0 -106
- package/dist/cjs/lint-2d7a9bdc.cjs.js +0 -29
- package/dist/cjs/parallel-7e32a8d0.cjs.js +0 -25
|
@@ -46,14 +46,15 @@ class NotFoundError extends CustomError {
|
|
|
46
46
|
|
|
47
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
48
48
|
|
|
49
|
-
var version$9 = "0.10.
|
|
49
|
+
var version$9 = "0.10.7";
|
|
50
50
|
|
|
51
|
-
var version$8 = "0.13.
|
|
51
|
+
var version$8 = "0.13.2";
|
|
52
52
|
var dependencies = {
|
|
53
53
|
"@backstage/cli-common": "^0.1.6",
|
|
54
54
|
"@backstage/config": "^0.1.13",
|
|
55
55
|
"@backstage/config-loader": "^0.9.3",
|
|
56
56
|
"@backstage/errors": "^0.2.0",
|
|
57
|
+
"@backstage/release-manifests": "^0.0.1",
|
|
57
58
|
"@backstage/types": "^0.1.1",
|
|
58
59
|
"@hot-loader/react-dom": "^16.13.0",
|
|
59
60
|
"@manypkg/get-packages": "^1.1.3",
|
|
@@ -100,7 +101,7 @@ var dependencies = {
|
|
|
100
101
|
glob: "^7.1.7",
|
|
101
102
|
handlebars: "^4.7.3",
|
|
102
103
|
"html-webpack-plugin": "^5.3.1",
|
|
103
|
-
inquirer: "^
|
|
104
|
+
inquirer: "^8.2.0",
|
|
104
105
|
jest: "^26.0.1",
|
|
105
106
|
"jest-css-modules": "^2.1.0",
|
|
106
107
|
"json-schema": "^0.4.0",
|
|
@@ -108,6 +109,7 @@ var dependencies = {
|
|
|
108
109
|
lodash: "^4.17.21",
|
|
109
110
|
minimatch: "3.0.4",
|
|
110
111
|
"mini-css-extract-plugin": "^2.4.2",
|
|
112
|
+
"npm-packlist": "^3.0.0",
|
|
111
113
|
"node-libs-browser": "^2.2.1",
|
|
112
114
|
ora: "^5.3.0",
|
|
113
115
|
postcss: "^8.1.0",
|
|
@@ -134,16 +136,17 @@ var dependencies = {
|
|
|
134
136
|
"webpack-node-externals": "^3.0.0",
|
|
135
137
|
yaml: "^1.10.0",
|
|
136
138
|
"yml-loader": "^2.1.0",
|
|
137
|
-
yn: "^4.0.0"
|
|
139
|
+
yn: "^4.0.0",
|
|
140
|
+
zod: "^3.11.6"
|
|
138
141
|
};
|
|
139
142
|
var devDependencies = {
|
|
140
|
-
"@backstage/backend-common": "^0.10.
|
|
143
|
+
"@backstage/backend-common": "^0.10.7",
|
|
141
144
|
"@backstage/config": "^0.1.13",
|
|
142
|
-
"@backstage/core-components": "^0.8.
|
|
145
|
+
"@backstage/core-components": "^0.8.8",
|
|
143
146
|
"@backstage/core-plugin-api": "^0.6.0",
|
|
144
|
-
"@backstage/core-app-api": "^0.5.
|
|
145
|
-
"@backstage/dev-utils": "^0.2.
|
|
146
|
-
"@backstage/test-utils": "^0.2.
|
|
147
|
+
"@backstage/core-app-api": "^0.5.2",
|
|
148
|
+
"@backstage/dev-utils": "^0.2.21",
|
|
149
|
+
"@backstage/test-utils": "^0.2.4",
|
|
147
150
|
"@backstage/theme": "^0.2.14",
|
|
148
151
|
"@types/diff": "^5.0.0",
|
|
149
152
|
"@types/express": "^4.17.6",
|
|
@@ -153,6 +156,7 @@ var devDependencies = {
|
|
|
153
156
|
"@types/minimatch": "^3.0.5",
|
|
154
157
|
"@types/mock-fs": "^4.13.0",
|
|
155
158
|
"@types/node": "^14.14.32",
|
|
159
|
+
"@types/npm-packlist": "^1.1.2",
|
|
156
160
|
"@types/recursive-readdir": "^2.2.0",
|
|
157
161
|
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
|
|
158
162
|
"@types/rollup-plugin-postcss": "^2.0.0",
|
|
@@ -162,22 +166,23 @@ var devDependencies = {
|
|
|
162
166
|
del: "^6.0.0",
|
|
163
167
|
"mock-fs": "^5.1.0",
|
|
164
168
|
nodemon: "^2.0.2",
|
|
165
|
-
"ts-node": "^10.0.0"
|
|
169
|
+
"ts-node": "^10.0.0",
|
|
170
|
+
msw: "^0.35.0"
|
|
166
171
|
};
|
|
167
172
|
|
|
168
|
-
var version$7 = "0.5.
|
|
173
|
+
var version$7 = "0.5.2";
|
|
169
174
|
|
|
170
|
-
var version$6 = "0.8.
|
|
175
|
+
var version$6 = "0.8.8";
|
|
171
176
|
|
|
172
177
|
var version$5 = "0.6.0";
|
|
173
178
|
|
|
174
|
-
var version$4 = "0.2.
|
|
179
|
+
var version$4 = "0.2.21";
|
|
175
180
|
|
|
176
|
-
var version$3 = "0.2.
|
|
181
|
+
var version$3 = "0.2.4";
|
|
177
182
|
|
|
178
183
|
var version$2 = "0.2.14";
|
|
179
184
|
|
|
180
|
-
var version$1 = "0.15.
|
|
185
|
+
var version$1 = "0.15.24";
|
|
181
186
|
|
|
182
187
|
const packageVersions = {
|
|
183
188
|
"@backstage/backend-common": version$9,
|
|
@@ -224,39 +229,61 @@ function createPackageVersionProvider(lockfile) {
|
|
|
224
229
|
};
|
|
225
230
|
}
|
|
226
231
|
|
|
232
|
+
const configOption = [
|
|
233
|
+
"--config <path>",
|
|
234
|
+
"Config files to load instead of app-config.yaml",
|
|
235
|
+
(opt, opts) => [...opts, opt],
|
|
236
|
+
Array()
|
|
237
|
+
];
|
|
238
|
+
function registerRepoCommand(program) {
|
|
239
|
+
const command = program.command("repo [command]", { hidden: true }).description("Command that run across an entire Backstage project [EXPERIMENTAL]");
|
|
240
|
+
command.command("build").description("Build packages in the project, excluding bundled app and backend packages.").option("--all", "Build all packages, including bundled app and backend packages.").action(lazy(() => Promise.resolve().then(function () { return require('./build-8188b3a4.cjs.js'); }).then((m) => m.command)));
|
|
241
|
+
}
|
|
242
|
+
function registerScriptCommand(program) {
|
|
243
|
+
const command = program.command("script [command]", { hidden: true }).description("Lifecycle scripts for Backstage packages [EXPERIMENTAL]");
|
|
244
|
+
command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect", "Enable debugger in Node.js environments").option("--inspect-brk", "Enable debugger in Node.js environments, breaking before code starts").action(lazy(() => Promise.resolve().then(function () { return require('./index-603a246b.cjs.js'); }).then((m) => m.command)));
|
|
245
|
+
command.command("build").description("Build a package for production deployment or publishing").option("--minify", "Minify the generated code. Does not apply to app or backend packages.").option("--experimental-type-build", "Enable experimental type build. Does not apply to app or backend packages.").option("--skip-build-dependencies", "Skip the automatic building of local dependencies. Applies to backend packages only.").option("--stats", "If bundle stats are available, write them to the output directory. Applies to app packages only.").option("--config <path>", "Config files to load instead of app-config.yaml. Applies to app packages only.", (opt, opts) => [...opts, opt], Array()).action(lazy(() => Promise.resolve().then(function () { return require('./index-0c3a82e2.cjs.js'); }).then((m) => m.command)));
|
|
246
|
+
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-d863cb88.cjs.js'); }).then((m) => m.default)));
|
|
247
|
+
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-1bd885b0.cjs.js'); }).then((m) => m.default)));
|
|
248
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-fb5eabab.cjs.js'); }).then((m) => m.default)));
|
|
249
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.pre)));
|
|
250
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.post)));
|
|
251
|
+
}
|
|
252
|
+
function registerMigrateCommand(program) {
|
|
253
|
+
const command = program.command("migrate [command]", { hidden: true }).description("Migration utilities [EXPERIMENTAL]");
|
|
254
|
+
command.command("package-role").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-6f48a89c.cjs.js'); }).then((m) => m.default)));
|
|
255
|
+
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy(() => Promise.resolve().then(function () { return require('./packageScripts-69fbc72e.cjs.js'); }).then((m) => m.command)));
|
|
256
|
+
}
|
|
227
257
|
function registerCommands(program) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
];
|
|
234
|
-
program.command("
|
|
235
|
-
program.command("
|
|
236
|
-
program.command("
|
|
237
|
-
program.command("
|
|
238
|
-
program.command("
|
|
239
|
-
program.command("
|
|
240
|
-
program.command("
|
|
241
|
-
program.command("
|
|
242
|
-
program.command("
|
|
243
|
-
program.command("
|
|
244
|
-
program.command("
|
|
245
|
-
program
|
|
246
|
-
program
|
|
247
|
-
program
|
|
248
|
-
program.command("
|
|
249
|
-
program.command("
|
|
250
|
-
program.command("
|
|
251
|
-
program.command("
|
|
252
|
-
program.command("
|
|
253
|
-
program.command("
|
|
254
|
-
program.command("
|
|
255
|
-
program.command("
|
|
256
|
-
program.command("
|
|
257
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-18554f1c.cjs.js'); }).then((m) => m.default)));
|
|
258
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-db368553.cjs.js'); }).then((m) => m.default)));
|
|
259
|
-
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-b711cea1.cjs.js'); }).then((m) => m.default)));
|
|
258
|
+
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-ba38de45.cjs.js'); }).then((m) => m.default)));
|
|
259
|
+
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-b69389e9.cjs.js'); }).then((m) => m.default)));
|
|
260
|
+
program.command("backend:build").description("Build a backend plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-36589e8a.cjs.js'); }).then((m) => m.default)));
|
|
261
|
+
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-c676710a.cjs.js'); }).then((m) => m.default)));
|
|
262
|
+
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-a43bf6c5.cjs.js'); }).then((m) => m.default)));
|
|
263
|
+
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-d576afd6.cjs.js'); }).then((m) => m.default)));
|
|
264
|
+
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-6b9a37d7.cjs.js'); }).then((m) => m.default)));
|
|
265
|
+
program.command("plugin:build").description("Build a plugin").option("--minify", "Minify the generated code").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./build-009e73a3.cjs.js'); }).then((m) => m.default)));
|
|
266
|
+
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-b5a89a22.cjs.js'); }).then((m) => m.default)));
|
|
267
|
+
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-8090cb39.cjs.js'); }).then((m) => m.default)));
|
|
268
|
+
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").option("--experimental-type-build", "Enable experimental type build").action(lazy(() => Promise.resolve().then(function () { return require('./oldBuild-f1abef0d.cjs.js'); }).then((m) => m.default)));
|
|
269
|
+
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-d863cb88.cjs.js'); }).then((m) => m.default)));
|
|
270
|
+
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-1bd885b0.cjs.js'); }).then((m) => m.default)));
|
|
271
|
+
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-8134e3d2.cjs.js'); }).then((m) => m.default)));
|
|
272
|
+
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-0be864a4.cjs.js'); }).then((m) => m.default)));
|
|
273
|
+
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("--deprecated", "Output deprecated configuration settings").option(...configOption).description("Validate that the given configuration loads and matches schema").action(lazy(() => Promise.resolve().then(function () { return require('./validate-e670ef09.cjs.js'); }).then((m) => m.default)));
|
|
274
|
+
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-899242a2.cjs.js'); }).then((m) => m.default)));
|
|
275
|
+
registerRepoCommand(program);
|
|
276
|
+
registerScriptCommand(program);
|
|
277
|
+
registerMigrateCommand(program);
|
|
278
|
+
program.command("versions:bump").option("--pattern <glob>", "Override glob for matching packages to upgrade").option("--release <version|next|main>", "Bump to a specific Backstage release line or version", "main").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-9aca460c.cjs.js'); }).then((m) => m.default)));
|
|
279
|
+
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-753ca24f.cjs.js'); }).then((m) => m.default)));
|
|
280
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.pre)));
|
|
281
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-a51c7cf8.cjs.js'); }).then((m) => m.post)));
|
|
282
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-fb5eabab.cjs.js'); }).then((m) => m.default)));
|
|
283
|
+
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-44672ad9.cjs.js'); }).then((m) => m.default)));
|
|
284
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-a932d832.cjs.js'); }).then((m) => m.default)));
|
|
285
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-9187be16.cjs.js'); }).then((m) => m.default)));
|
|
286
|
+
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-30028f72.cjs.js'); }).then((m) => m.default)));
|
|
260
287
|
}
|
|
261
288
|
function lazy(getActionFunc) {
|
|
262
289
|
return async (...args) => {
|
|
@@ -300,4 +327,4 @@ exports.devDependencies = devDependencies;
|
|
|
300
327
|
exports.paths = paths;
|
|
301
328
|
exports.version = version;
|
|
302
329
|
exports.version$1 = version$8;
|
|
303
|
-
//# sourceMappingURL=index-
|
|
330
|
+
//# sourceMappingURL=index-4605496f.cjs.js.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fs = require('fs-extra');
|
|
4
|
+
var index = require('./index-4605496f.cjs.js');
|
|
5
|
+
var backend = require('./backend-93c17f0a.cjs.js');
|
|
6
|
+
require('yn');
|
|
7
|
+
require('path');
|
|
8
|
+
require('webpack');
|
|
9
|
+
require('react-dev-utils/FileSizeReporter');
|
|
10
|
+
require('react-dev-utils/formatWebpackMessages');
|
|
11
|
+
var chalk = require('chalk');
|
|
12
|
+
require('fork-ts-checker-webpack-plugin');
|
|
13
|
+
require('html-webpack-plugin');
|
|
14
|
+
require('react-dev-utils/ModuleScopePlugin');
|
|
15
|
+
require('run-script-webpack-plugin');
|
|
16
|
+
require('webpack-node-externals');
|
|
17
|
+
require('@backstage/cli-common');
|
|
18
|
+
require('@manypkg/get-packages');
|
|
19
|
+
require('./paths-2db88422.cjs.js');
|
|
20
|
+
require('mini-css-extract-plugin');
|
|
21
|
+
require('./run-43a2e0bb.cjs.js');
|
|
22
|
+
require('eslint-webpack-plugin');
|
|
23
|
+
require('lodash/pickBy');
|
|
24
|
+
require('webpack-dev-server');
|
|
25
|
+
require('react-dev-utils/openBrowser');
|
|
26
|
+
var uniq = require('lodash/uniq');
|
|
27
|
+
var server = require('./server-d8c1f8fd.cjs.js');
|
|
28
|
+
var config = require('./config-2045332a.cjs.js');
|
|
29
|
+
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
30
|
+
require('minimatch');
|
|
31
|
+
var lint = require('./lint-753ca24f.cjs.js');
|
|
32
|
+
var packageRoles = require('./packageRoles-a2eecabc.cjs.js');
|
|
33
|
+
require('commander');
|
|
34
|
+
require('semver');
|
|
35
|
+
require('@backstage/config/package.json');
|
|
36
|
+
require('@backstage/errors');
|
|
37
|
+
require('./svgrTemplate-f19e974c.cjs.js');
|
|
38
|
+
require('child_process');
|
|
39
|
+
require('util');
|
|
40
|
+
require('@backstage/config-loader');
|
|
41
|
+
require('@backstage/config');
|
|
42
|
+
require('./PackageGraph-f7218931.cjs.js');
|
|
43
|
+
require('@yarnpkg/lockfile');
|
|
44
|
+
require('lodash/partition');
|
|
45
|
+
require('zod');
|
|
46
|
+
|
|
47
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
|
+
|
|
49
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
50
|
+
var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
|
|
51
|
+
var uniq__default = /*#__PURE__*/_interopDefaultLegacy(uniq);
|
|
52
|
+
|
|
53
|
+
async function startBackend(options) {
|
|
54
|
+
await fs__default["default"].remove(index.paths.resolveTarget("dist"));
|
|
55
|
+
const waitForExit = await backend.serveBackend({
|
|
56
|
+
entry: "src/index",
|
|
57
|
+
checksEnabled: options.checksEnabled,
|
|
58
|
+
inspectEnabled: options.inspectEnabled,
|
|
59
|
+
inspectBrkEnabled: options.inspectBrkEnabled
|
|
60
|
+
});
|
|
61
|
+
await waitForExit();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function startFrontend(options) {
|
|
65
|
+
if (options.verifyVersions) {
|
|
66
|
+
const lockfile = await Lockfile.Lockfile.load(index.paths.resolveTargetRoot("yarn.lock"));
|
|
67
|
+
const result = lockfile.analyze({
|
|
68
|
+
filter: lint.includedFilter
|
|
69
|
+
});
|
|
70
|
+
const problemPackages = [...result.newVersions, ...result.newRanges].map(({ name: name2 }) => name2);
|
|
71
|
+
if (problemPackages.length > 1) {
|
|
72
|
+
console.log(chalk__default["default"].yellow(`\u26A0\uFE0F Some of the following packages may be outdated or have duplicate installations:
|
|
73
|
+
|
|
74
|
+
${uniq__default["default"](problemPackages).join(", ")}
|
|
75
|
+
`));
|
|
76
|
+
console.log(chalk__default["default"].yellow(`\u26A0\uFE0F This can be resolved using the following command:
|
|
77
|
+
|
|
78
|
+
yarn backstage-cli versions:check --fix
|
|
79
|
+
`));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
|
|
83
|
+
const waitForExit = await server.serveBundle({
|
|
84
|
+
entry: options.entry,
|
|
85
|
+
checksEnabled: options.checksEnabled,
|
|
86
|
+
...await config.loadCliConfig({
|
|
87
|
+
args: options.configPaths,
|
|
88
|
+
fromPackage: name,
|
|
89
|
+
withFilteredKeys: true
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
await waitForExit();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function command(cmd) {
|
|
96
|
+
const role = await packageRoles.findRoleFromCommand(cmd);
|
|
97
|
+
const options = {
|
|
98
|
+
configPaths: cmd.config,
|
|
99
|
+
checksEnabled: Boolean(cmd.check),
|
|
100
|
+
inspectEnabled: Boolean(cmd.inspect),
|
|
101
|
+
inspectBrkEnabled: Boolean(cmd.inspectBrk)
|
|
102
|
+
};
|
|
103
|
+
switch (role) {
|
|
104
|
+
case "backend":
|
|
105
|
+
case "plugin-backend":
|
|
106
|
+
case "plugin-backend-module":
|
|
107
|
+
case "node-library":
|
|
108
|
+
return startBackend(options);
|
|
109
|
+
case "app":
|
|
110
|
+
return startFrontend({
|
|
111
|
+
...options,
|
|
112
|
+
entry: "src/index",
|
|
113
|
+
verifyVersions: true
|
|
114
|
+
});
|
|
115
|
+
case "web-library":
|
|
116
|
+
case "plugin-frontend":
|
|
117
|
+
case "plugin-frontend-module":
|
|
118
|
+
return startFrontend({ entry: "dev/index", ...options });
|
|
119
|
+
default:
|
|
120
|
+
throw new Error(`Start command is not supported for package role '${role}'`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
exports.command = command;
|
|
125
|
+
//# sourceMappingURL=index-603a246b.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-
|
|
6
|
+
var index$1 = require('./index-4605496f.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-
|
|
131
|
+
//# sourceMappingURL=index-a932d832.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-4605496f.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
5
|
+
var run = require('./run-43a2e0bb.cjs.js');
|
|
6
6
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
7
7
|
require('minimatch');
|
|
8
8
|
require('@manypkg/get-packages');
|
|
@@ -43,4 +43,4 @@ var info = async () => {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
exports["default"] = info;
|
|
46
|
-
//# sourceMappingURL=info-
|
|
46
|
+
//# sourceMappingURL=info-9187be16.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-
|
|
7
|
-
var index = require('./index-
|
|
6
|
+
var packages = require('./packages-ef539958.cjs.js');
|
|
7
|
+
var index = require('./index-4605496f.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-
|
|
11
|
+
var run = require('./run-43a2e0bb.cjs.js');
|
|
12
12
|
require('minimatch');
|
|
13
13
|
require('@manypkg/get-packages');
|
|
14
14
|
require('commander');
|
|
@@ -240,4 +240,4 @@ var install = async (pluginId, cmd) => {
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
exports["default"] = install;
|
|
243
|
-
//# sourceMappingURL=install-
|
|
243
|
+
//# sourceMappingURL=install-30028f72.cjs.js.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
4
4
|
require('minimatch');
|
|
5
5
|
require('@manypkg/get-packages');
|
|
6
|
-
require('./run-
|
|
6
|
+
require('./run-43a2e0bb.cjs.js');
|
|
7
7
|
require('chalk');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-4605496f.cjs.js');
|
|
9
9
|
var partition = require('lodash/partition');
|
|
10
10
|
require('fs-extra');
|
|
11
11
|
require('semver');
|
|
@@ -76,4 +76,4 @@ function logArray(arr, header, each) {
|
|
|
76
76
|
exports["default"] = lint;
|
|
77
77
|
exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
|
|
78
78
|
exports.includedFilter = includedFilter;
|
|
79
|
-
//# sourceMappingURL=lint-
|
|
79
|
+
//# sourceMappingURL=lint-753ca24f.cjs.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-4605496f.cjs.js');
|
|
4
|
+
var eslint = require('eslint');
|
|
5
|
+
require('commander');
|
|
6
|
+
require('chalk');
|
|
7
|
+
require('fs-extra');
|
|
8
|
+
require('semver');
|
|
9
|
+
require('@backstage/cli-common');
|
|
10
|
+
require('@backstage/config/package.json');
|
|
11
|
+
require('@backstage/errors');
|
|
12
|
+
|
|
13
|
+
var lint = async (cmd, cmdArgs) => {
|
|
14
|
+
const eslint$1 = new eslint.ESLint({
|
|
15
|
+
cwd: index.paths.targetDir,
|
|
16
|
+
fix: cmd.fix,
|
|
17
|
+
extensions: ["js", "jsx", "ts", "tsx", "mjs", "cjs"]
|
|
18
|
+
});
|
|
19
|
+
const results = await eslint$1.lintFiles(cmdArgs != null ? cmdArgs : ["."]);
|
|
20
|
+
if (cmd.fix) {
|
|
21
|
+
await eslint.ESLint.outputFixes(results);
|
|
22
|
+
}
|
|
23
|
+
const formatter = await eslint$1.loadFormatter(cmd.format);
|
|
24
|
+
if (cmd.format === "eslint-formatter-friendly") {
|
|
25
|
+
process.chdir(index.paths.targetRoot);
|
|
26
|
+
}
|
|
27
|
+
const resultText = formatter.format(results);
|
|
28
|
+
if (resultText) {
|
|
29
|
+
console.log(resultText);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports["default"] = lint;
|
|
35
|
+
//# sourceMappingURL=lint-d863cb88.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
3
|
+
var packager = require('./packager-57263112.cjs.js');
|
|
4
4
|
require('fs-extra');
|
|
5
5
|
require('rollup');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('path');
|
|
8
|
-
require('./index-
|
|
8
|
+
require('./index-4605496f.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
@@ -22,8 +22,12 @@ require('@rollup/plugin-json');
|
|
|
22
22
|
require('@rollup/plugin-yaml');
|
|
23
23
|
require('rollup-pluginutils');
|
|
24
24
|
require('./svgrTemplate-f19e974c.cjs.js');
|
|
25
|
+
require('worker_threads');
|
|
26
|
+
require('./packageRoles-a2eecabc.cjs.js');
|
|
27
|
+
require('zod');
|
|
28
|
+
require('./parallel-e73a4058.cjs.js');
|
|
25
29
|
|
|
26
|
-
var
|
|
30
|
+
var oldBuild = async (cmd) => {
|
|
27
31
|
let outputs = /* @__PURE__ */ new Set();
|
|
28
32
|
const { outputs: outputsStr } = cmd;
|
|
29
33
|
if (outputsStr) {
|
|
@@ -44,5 +48,5 @@ var build = async (cmd) => {
|
|
|
44
48
|
});
|
|
45
49
|
};
|
|
46
50
|
|
|
47
|
-
exports["default"] =
|
|
48
|
-
//# sourceMappingURL=
|
|
51
|
+
exports["default"] = oldBuild;
|
|
52
|
+
//# sourceMappingURL=oldBuild-f1abef0d.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-
|
|
4
|
+
var index = require('./index-4605496f.cjs.js');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
require('commander');
|
|
7
7
|
require('chalk');
|
|
@@ -66,4 +66,4 @@ const post = async () => {
|
|
|
66
66
|
|
|
67
67
|
exports.post = post;
|
|
68
68
|
exports.pre = pre;
|
|
69
|
-
//# sourceMappingURL=pack-
|
|
69
|
+
//# sourceMappingURL=pack-a51c7cf8.cjs.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fs = require('fs-extra');
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var getPackages = require('@manypkg/get-packages');
|
|
6
|
+
var index = require('./index-4605496f.cjs.js');
|
|
7
|
+
var packageRoles = require('./packageRoles-a2eecabc.cjs.js');
|
|
8
|
+
require('commander');
|
|
9
|
+
require('chalk');
|
|
10
|
+
require('semver');
|
|
11
|
+
require('@backstage/cli-common');
|
|
12
|
+
require('@backstage/config/package.json');
|
|
13
|
+
require('@backstage/errors');
|
|
14
|
+
require('zod');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
19
|
+
|
|
20
|
+
var packageRole = async () => {
|
|
21
|
+
const { packages } = await getPackages.getPackages(index.paths.targetDir);
|
|
22
|
+
await Promise.all(packages.map(async ({ dir, packageJson: pkg }) => {
|
|
23
|
+
const { name } = pkg;
|
|
24
|
+
const existingRole = packageRoles.getRoleFromPackage(pkg);
|
|
25
|
+
if (existingRole) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const detectedRole = packageRoles.detectRoleFromPackage(pkg);
|
|
29
|
+
if (!detectedRole) {
|
|
30
|
+
console.error(`No role detected for package ${name}`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
console.log(`Detected package role of ${name} as ${detectedRole}`);
|
|
34
|
+
let newPkg = pkg;
|
|
35
|
+
const pkgKeys = Object.keys(pkg);
|
|
36
|
+
if (pkgKeys.includes("backstage")) {
|
|
37
|
+
newPkg.backstage = {
|
|
38
|
+
...newPkg.backstage,
|
|
39
|
+
role: detectedRole
|
|
40
|
+
};
|
|
41
|
+
} else {
|
|
42
|
+
const index = Math.max(pkgKeys.indexOf("version"), pkgKeys.indexOf("private"), pkgKeys.indexOf("publishConfig")) + 1 || pkgKeys.length;
|
|
43
|
+
const pkgEntries = Object.entries(pkg);
|
|
44
|
+
pkgEntries.splice(index, 0, ["backstage", { role: detectedRole }]);
|
|
45
|
+
newPkg = Object.fromEntries(pkgEntries);
|
|
46
|
+
}
|
|
47
|
+
await fs__default["default"].writeJson(path.resolve(dir, "package.json"), newPkg, {
|
|
48
|
+
spaces: 2
|
|
49
|
+
});
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports["default"] = packageRole;
|
|
54
|
+
//# sourceMappingURL=packageRole-6f48a89c.cjs.js.map
|