@backstage/cli 0.26.0 → 0.26.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 +45 -0
- package/config/jest.js +1 -1
- package/dist/cjs/{Lockfile-eced6070.cjs.js → Lockfile-C7rtIlD6.cjs.js} +13 -13
- package/dist/cjs/{build-dd1760ba.cjs.js → build-CbpeZplP.cjs.js} +15 -15
- package/dist/cjs/{buildBackend-93008edd.cjs.js → buildBackend-Dba-NxON.cjs.js} +33 -33
- package/dist/cjs/{buildWorkspace-537eb788.cjs.js → buildWorkspace-CqQibS-q.cjs.js} +12 -12
- package/dist/cjs/{bump-aee0496e.cjs.js → bump-D0vhUSFQ.cjs.js} +38 -38
- package/dist/cjs/clean-CnL36FfN.cjs.js +22 -0
- package/dist/cjs/{clean-6ccda488.cjs.js → clean-D_vLzFNg.cjs.js} +10 -10
- package/dist/cjs/{codeowners-b305c16a.cjs.js → codeowners-BMLEHluX.cjs.js} +12 -12
- package/dist/cjs/{config-9d068fb3.cjs.js → config-C0JsopsB.cjs.js} +2 -2
- package/dist/cjs/{createDistWorkspace-521b8e20.cjs.js → createDistWorkspace-yv_is5dr.cjs.js} +54 -53
- package/dist/cjs/{createPlugin-5b733848.cjs.js → createPlugin-DmtKz0ob.cjs.js} +41 -41
- package/dist/cjs/{diff-ffcf1ddd.cjs.js → diff-r_x8vq2Y.cjs.js} +27 -27
- package/dist/cjs/{docs-62f456dc.cjs.js → docs-DZLOofxw.cjs.js} +7 -7
- package/dist/cjs/{entryPoints-0cc55995.cjs.js → entryPoints-CoHH4lBA.cjs.js} +1 -1
- package/dist/cjs/{fix-c9486e20.cjs.js → fix-BT7c1STH.cjs.js} +5 -5
- package/dist/cjs/{index-f42e533f.cjs.js → index-BD9P1D2C.cjs.js} +62 -62
- package/dist/cjs/{index-34be8e16.cjs.js → index-B_y2XKYV.cjs.js} +27 -27
- package/dist/cjs/{index-959685eb.cjs.js → index-CCiS1ueY.cjs.js} +56 -57
- package/dist/cjs/{index-14d17c46.cjs.js → index-DFh2xfbC.cjs.js} +13 -13
- package/dist/cjs/{index-7a73b7d7.cjs.js → index-De_z6iz7.cjs.js} +44 -62
- package/dist/cjs/{info-ecbe826f.cjs.js → info-DFqP7KTl.cjs.js} +13 -13
- package/dist/cjs/{install-27e2fe5d.cjs.js → install-BDXQInuw.cjs.js} +19 -19
- package/dist/cjs/{lint-748f9c9d.cjs.js → lint-C1YMli4t.cjs.js} +6 -6
- package/dist/cjs/{lint-813542b6.cjs.js → lint-Dte-ewjD.cjs.js} +3 -3
- package/dist/cjs/{lint-cadb3a1e.cjs.js → lint-JfiB81FZ.cjs.js} +10 -10
- package/dist/cjs/{list-deprecations-a9347f75.cjs.js → list-deprecations-DFphTrGE.cjs.js} +5 -5
- package/dist/cjs/{new-7cca705d.cjs.js → new-D7rT3xUd.cjs.js} +54 -54
- package/dist/cjs/{pack-7abdf1e1.cjs.js → pack-C0_X_p6V.cjs.js} +4 -4
- package/dist/cjs/{packageDetection-8d19bd36.cjs.js → packageDetection-B2m9eHD3.cjs.js} +46 -46
- package/dist/cjs/{packageExports-84600a62.cjs.js → packageExports-reitRRRU.cjs.js} +3 -3
- package/dist/cjs/{packageLintConfigs-f1239915.cjs.js → packageLintConfigs-DFol07fj.cjs.js} +8 -8
- package/dist/cjs/{packageRole-b982f1e6.cjs.js → packageRole-YikhskBv.cjs.js} +6 -6
- package/dist/cjs/{packageScripts-bb7b6de2.cjs.js → packageScripts-CPnlPBBs.cjs.js} +4 -4
- package/dist/cjs/{packages-9e5204b8.cjs.js → packages-B_ex0KMV.cjs.js} +4 -4
- package/dist/cjs/{parallel-2d9d247e.cjs.js → parallel-BszNaKyc.cjs.js} +4 -4
- package/dist/cjs/{print-33cb8274.cjs.js → print-CO3_0-Pg.cjs.js} +4 -4
- package/dist/cjs/{productionPack-8b9ac9b7.cjs.js → productionPack-DotlEIE2.cjs.js} +19 -19
- package/dist/cjs/{reactRouterDeps-a2bb1d62.cjs.js → reactRouterDeps-BBKc6o07.cjs.js} +4 -4
- package/dist/cjs/{role-26dc0550.cjs.js → role-BwQHC-rB.cjs.js} +5 -5
- package/dist/cjs/{run-8f756fce.cjs.js → run-BLyOtvgh.cjs.js} +2 -2
- package/dist/cjs/{schema-13e89347.cjs.js → schema-BoT3ItlL.cjs.js} +4 -4
- package/dist/cjs/{svgrTemplate-3549ea1c.cjs.js → svgrTemplate-BTjBQ3by.cjs.js} +1 -1
- package/dist/cjs/{tasks-84de240c.cjs.js → tasks-mGXy8WjR.cjs.js} +23 -23
- package/dist/cjs/{test-7076bd21.cjs.js → test-CSdRFsmC.cjs.js} +6 -6
- package/dist/cjs/{test-52dfdc79.cjs.js → test-D6PPN8Mr.cjs.js} +4 -4
- package/dist/cjs/{validate-2e4a0b12.cjs.js → validate-DwUJ3F9z.cjs.js} +4 -4
- package/dist/cjs/{yarn-6cd89e16.cjs.js → yarn-BDZCENk5.cjs.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +11 -11
- package/templates/default-backend-plugin/README.md.hbs +1 -1
- package/templates/default-backend-plugin/src/plugin.ts.hbs +4 -0
- package/dist/cjs/clean-8a505ab4.cjs.js +0 -22
|
@@ -7,11 +7,11 @@ var semver = require('semver');
|
|
|
7
7
|
var cliCommon = require('@backstage/cli-common');
|
|
8
8
|
var errors = require('@backstage/errors');
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
12
|
-
var chalk__default = /*#__PURE__*/
|
|
13
|
-
var fs__default = /*#__PURE__*/
|
|
14
|
-
var semver__default = /*#__PURE__*/
|
|
12
|
+
var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
|
|
13
|
+
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
14
|
+
var semver__default = /*#__PURE__*/_interopDefaultCompat(semver);
|
|
15
15
|
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -36,13 +36,13 @@ class ExitCodeError extends CustomError {
|
|
|
36
36
|
function exitWithError(error) {
|
|
37
37
|
if (error instanceof ExitCodeError) {
|
|
38
38
|
process.stderr.write(`
|
|
39
|
-
${chalk__default
|
|
39
|
+
${chalk__default.default.red(error.message)}
|
|
40
40
|
|
|
41
41
|
`);
|
|
42
42
|
process.exit(error.code);
|
|
43
43
|
} else {
|
|
44
44
|
process.stderr.write(`
|
|
45
|
-
${chalk__default
|
|
45
|
+
${chalk__default.default.red(`${error}`)}
|
|
46
46
|
|
|
47
47
|
`);
|
|
48
48
|
process.exit(1);
|
|
@@ -53,13 +53,13 @@ class NotFoundError extends CustomError {
|
|
|
53
53
|
|
|
54
54
|
const paths = cliCommon.findPaths(__dirname);
|
|
55
55
|
|
|
56
|
-
var version$f = "0.21.
|
|
56
|
+
var version$f = "0.21.6";
|
|
57
57
|
|
|
58
|
-
var version$e = "0.6.
|
|
58
|
+
var version$e = "0.6.16";
|
|
59
59
|
|
|
60
|
-
var version$d = "0.3.
|
|
60
|
+
var version$d = "0.3.6";
|
|
61
61
|
|
|
62
|
-
var version$c = "0.26.
|
|
62
|
+
var version$c = "0.26.2";
|
|
63
63
|
var dependencies = {
|
|
64
64
|
"@backstage/catalog-model": "workspace:^",
|
|
65
65
|
"@backstage/cli-common": "workspace:^",
|
|
@@ -151,9 +151,9 @@ var dependencies = {
|
|
|
151
151
|
"react-dev-utils": "^12.0.0-next.60",
|
|
152
152
|
"react-refresh": "^0.14.0",
|
|
153
153
|
"recursive-readdir": "^2.2.2",
|
|
154
|
-
rollup: "^
|
|
155
|
-
"rollup-plugin-dts": "^
|
|
156
|
-
"rollup-plugin-esbuild": "^
|
|
154
|
+
rollup: "^4.0.0",
|
|
155
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
156
|
+
"rollup-plugin-esbuild": "^6.1.1",
|
|
157
157
|
"rollup-plugin-postcss": "^4.0.0",
|
|
158
158
|
"rollup-pluginutils": "^2.8.2",
|
|
159
159
|
"run-script-webpack-plugin": "^0.2.0",
|
|
@@ -210,25 +210,25 @@ var devDependencies = {
|
|
|
210
210
|
|
|
211
211
|
var version$b = "1.2.0";
|
|
212
212
|
|
|
213
|
-
var version$a = "1.12.
|
|
213
|
+
var version$a = "1.12.3";
|
|
214
214
|
|
|
215
|
-
var version$9 = "0.14.
|
|
215
|
+
var version$9 = "0.14.3";
|
|
216
216
|
|
|
217
217
|
var version$8 = "1.9.1";
|
|
218
218
|
|
|
219
|
-
var version$7 = "1.0.
|
|
219
|
+
var version$7 = "1.0.30";
|
|
220
220
|
|
|
221
|
-
var version$6 = "1.5.
|
|
221
|
+
var version$6 = "1.5.3";
|
|
222
222
|
|
|
223
|
-
var version$5 = "0.4.
|
|
223
|
+
var version$5 = "0.4.2";
|
|
224
224
|
|
|
225
|
-
var version$4 = "0.22.
|
|
225
|
+
var version$4 = "0.22.3";
|
|
226
226
|
|
|
227
|
-
var version$3 = "0.1.
|
|
227
|
+
var version$3 = "0.1.2";
|
|
228
228
|
|
|
229
229
|
var version$2 = "0.5.2";
|
|
230
230
|
|
|
231
|
-
var version$1 = "0.2.
|
|
231
|
+
var version$1 = "0.2.16";
|
|
232
232
|
|
|
233
233
|
const packageVersions = {
|
|
234
234
|
"@backstage/backend-common": version$f,
|
|
@@ -248,11 +248,11 @@ const packageVersions = {
|
|
|
248
248
|
"@backstage/plugin-auth-backend-module-guest-provider": version$3
|
|
249
249
|
};
|
|
250
250
|
function findVersion() {
|
|
251
|
-
const pkgContent = fs__default
|
|
251
|
+
const pkgContent = fs__default.default.readFileSync(paths.resolveOwn("package.json"), "utf8");
|
|
252
252
|
return JSON.parse(pkgContent).version;
|
|
253
253
|
}
|
|
254
254
|
const version = findVersion();
|
|
255
|
-
fs__default
|
|
255
|
+
fs__default.default.pathExistsSync(paths.resolveOwn("src"));
|
|
256
256
|
function createPackageVersionProvider(lockfile) {
|
|
257
257
|
return (name, versionHint) => {
|
|
258
258
|
var _a;
|
|
@@ -272,7 +272,7 @@ function createPackageVersionProvider(lockfile) {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter(
|
|
275
|
-
(entry) => semver__default
|
|
275
|
+
(entry) => semver__default.default.satisfies(targetVersion, entry.range)
|
|
276
276
|
);
|
|
277
277
|
const highestRange = validRanges == null ? void 0 : validRanges.slice(-1)[0];
|
|
278
278
|
if (highestRange == null ? void 0 : highestRange.range) {
|
|
@@ -281,7 +281,7 @@ function createPackageVersionProvider(lockfile) {
|
|
|
281
281
|
if (packageVersion) {
|
|
282
282
|
return `^${packageVersion}`;
|
|
283
283
|
}
|
|
284
|
-
if ((_a = semver__default
|
|
284
|
+
if ((_a = semver__default.default.parse(versionHint)) == null ? void 0 : _a.prerelease.length) {
|
|
285
285
|
return versionHint;
|
|
286
286
|
}
|
|
287
287
|
return (versionHint == null ? void 0 : versionHint.match(/^[\d\.]+$/)) ? `^${versionHint}` : versionHint;
|
|
@@ -295,7 +295,7 @@ const configOption = [
|
|
|
295
295
|
Array()
|
|
296
296
|
];
|
|
297
297
|
function registerOnboardCommand(program) {
|
|
298
|
-
program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
298
|
+
program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-CCiS1ueY.cjs.js'); }).then((m) => m.command)));
|
|
299
299
|
}
|
|
300
300
|
function registerRepoCommand(program) {
|
|
301
301
|
const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
|
|
@@ -307,7 +307,7 @@ function registerRepoCommand(program) {
|
|
|
307
307
|
).option(
|
|
308
308
|
"--since <ref>",
|
|
309
309
|
"Only build packages and their dev dependents that changed since the specified ref"
|
|
310
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
310
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./build-CbpeZplP.cjs.js'); }).then((m) => m.command)));
|
|
311
311
|
command.command("lint").description("Lint all packages in the project").option(
|
|
312
312
|
"--format <format>",
|
|
313
313
|
"Lint report output format",
|
|
@@ -315,14 +315,14 @@ function registerRepoCommand(program) {
|
|
|
315
315
|
).option(
|
|
316
316
|
"--since <ref>",
|
|
317
317
|
"Only lint packages that changed since the specified ref"
|
|
318
|
-
).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
318
|
+
).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-C1YMli4t.cjs.js'); }).then((m) => m.command)));
|
|
319
319
|
command.command("fix").description("Automatically fix packages in the project").option(
|
|
320
320
|
"--check",
|
|
321
321
|
"Fail if any packages would have been changed by the command"
|
|
322
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./fix-
|
|
323
|
-
command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
322
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./fix-BT7c1STH.cjs.js'); }).then((m) => m.command)));
|
|
323
|
+
command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-D_vLzFNg.cjs.js'); }).then((m) => m.command)));
|
|
324
324
|
command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
|
|
325
|
-
lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-
|
|
325
|
+
lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-DFphTrGE.cjs.js'); }).then((m) => m.command))
|
|
326
326
|
);
|
|
327
327
|
command.command("test").allowUnknownOption(true).option(
|
|
328
328
|
"--since <ref>",
|
|
@@ -330,14 +330,14 @@ function registerRepoCommand(program) {
|
|
|
330
330
|
).option(
|
|
331
331
|
"--jest-help",
|
|
332
332
|
"Show help for Jest CLI options, which are passed through"
|
|
333
|
-
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-
|
|
333
|
+
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-CSdRFsmC.cjs.js'); }).then((m) => m.command)));
|
|
334
334
|
}
|
|
335
335
|
function registerScriptCommand(program) {
|
|
336
336
|
const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
|
|
337
337
|
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 [host]", "Enable debugger in Node.js environments").option(
|
|
338
338
|
"--inspect-brk [host]",
|
|
339
339
|
"Enable debugger in Node.js environments, breaking before code starts"
|
|
340
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
340
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./index-De_z6iz7.cjs.js'); }).then((m) => m.command)));
|
|
341
341
|
command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
|
|
342
342
|
"--minify",
|
|
343
343
|
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
@@ -352,35 +352,35 @@ function registerScriptCommand(program) {
|
|
|
352
352
|
"Config files to load instead of app-config.yaml. Applies to app packages only.",
|
|
353
353
|
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
354
354
|
Array()
|
|
355
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
355
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./index-DFh2xfbC.cjs.js'); }).then((m) => m.command)));
|
|
356
356
|
command.command("lint [directories...]").option(
|
|
357
357
|
"--format <format>",
|
|
358
358
|
"Lint report output format",
|
|
359
359
|
"eslint-formatter-friendly"
|
|
360
|
-
).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
361
|
-
command.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('./test-
|
|
362
|
-
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
363
|
-
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
364
|
-
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
360
|
+
).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-Dte-ewjD.cjs.js'); }).then((m) => m.default)));
|
|
361
|
+
command.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('./test-D6PPN8Mr.cjs.js'); }).then((m) => m.default)));
|
|
362
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-CnL36FfN.cjs.js'); }).then((m) => m.default)));
|
|
363
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-C0_X_p6V.cjs.js'); }).then((m) => m.pre)));
|
|
364
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-C0_X_p6V.cjs.js'); }).then((m) => m.post)));
|
|
365
365
|
}
|
|
366
366
|
function registerMigrateCommand(program) {
|
|
367
367
|
const command = program.command("migrate [command]").description("Migration utilities");
|
|
368
|
-
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-
|
|
368
|
+
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-YikhskBv.cjs.js'); }).then((m) => m.default)));
|
|
369
369
|
command.command("package-scripts").description("Set package scripts according to each package role").action(
|
|
370
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageScripts-
|
|
370
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageScripts-CPnlPBBs.cjs.js'); }).then((m) => m.command))
|
|
371
371
|
);
|
|
372
372
|
command.command("package-exports").description("Synchronize package subpath export definitions").action(
|
|
373
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageExports-
|
|
373
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageExports-reitRRRU.cjs.js'); }).then((m) => m.command))
|
|
374
374
|
);
|
|
375
375
|
command.command("package-lint-configs").description(
|
|
376
376
|
"Migrates all packages to use @backstage/cli/config/eslint-factory"
|
|
377
377
|
).action(
|
|
378
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-
|
|
378
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-DFol07fj.cjs.js'); }).then((m) => m.command))
|
|
379
379
|
);
|
|
380
380
|
command.command("react-router-deps").description(
|
|
381
381
|
"Migrates the react-router dependencies for all packages to be peer dependencies"
|
|
382
382
|
).action(
|
|
383
|
-
lazy(() => Promise.resolve().then(function () { return require('./reactRouterDeps-
|
|
383
|
+
lazy(() => Promise.resolve().then(function () { return require('./reactRouterDeps-BBKc6o07.cjs.js'); }).then((m) => m.command))
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
386
|
function registerCommands(program) {
|
|
@@ -400,7 +400,7 @@ function registerCommands(program) {
|
|
|
400
400
|
).option(
|
|
401
401
|
"--baseVersion <version>",
|
|
402
402
|
"The version to use for any new packages (default: 0.1.0)"
|
|
403
|
-
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-
|
|
403
|
+
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-D7rT3xUd.cjs.js'); }).then((m) => m.default)));
|
|
404
404
|
program.command("create", { hidden: true }).storeOptionsAsProperties(false).description(
|
|
405
405
|
"Open up an interactive guide to creating new things in your app [DEPRECATED]"
|
|
406
406
|
).option(
|
|
@@ -414,30 +414,30 @@ function registerCommands(program) {
|
|
|
414
414
|
).option("--scope <scope>", "The scope to use for new packages").option(
|
|
415
415
|
"--npm-registry <URL>",
|
|
416
416
|
"The package registry to use for new packages"
|
|
417
|
-
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-
|
|
417
|
+
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-D7rT3xUd.cjs.js'); }).then((m) => m.default)));
|
|
418
418
|
program.command("create-plugin", { hidden: true }).option(
|
|
419
419
|
"--backend",
|
|
420
420
|
"Create plugin with the backend dependencies as default"
|
|
421
421
|
).description("Creates a new plugin in the current repository [DEPRECATED]").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(
|
|
422
|
-
lazy(() => Promise.resolve().then(function () { return require('./createPlugin-
|
|
422
|
+
lazy(() => Promise.resolve().then(function () { return require('./createPlugin-DmtKz0ob.cjs.js'); }).then((m) => m.default))
|
|
423
423
|
);
|
|
424
424
|
program.command("plugin:diff", { hidden: true }).option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description(
|
|
425
425
|
"Diff an existing plugin with the creation template [DEPRECATED]"
|
|
426
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./diff-
|
|
426
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./diff-r_x8vq2Y.cjs.js'); }).then((m) => m.default)));
|
|
427
427
|
program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
|
|
428
428
|
"Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
|
|
429
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./test-
|
|
429
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./test-D6PPN8Mr.cjs.js'); }).then((m) => m.default)));
|
|
430
430
|
program.command("config:docs").option(
|
|
431
431
|
"--package <name>",
|
|
432
432
|
"Only include the schema that applies to the given package"
|
|
433
|
-
).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-
|
|
433
|
+
).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-DZLOofxw.cjs.js'); }).then((m) => m.default)));
|
|
434
434
|
program.command("config:print").option(
|
|
435
435
|
"--package <name>",
|
|
436
436
|
"Only load config schema that applies to the given package"
|
|
437
437
|
).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(
|
|
438
438
|
"--format <format>",
|
|
439
439
|
"Format to print the configuration in, either json or yaml [yaml]"
|
|
440
|
-
).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-
|
|
440
|
+
).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-CO3_0-Pg.cjs.js'); }).then((m) => m.default)));
|
|
441
441
|
program.command("config:check").option(
|
|
442
442
|
"--package <name>",
|
|
443
443
|
"Only load config schema that applies to the given package"
|
|
@@ -446,14 +446,14 @@ function registerCommands(program) {
|
|
|
446
446
|
"Enable strict config validation, forbidding errors and unknown keys"
|
|
447
447
|
).option(...configOption).description(
|
|
448
448
|
"Validate that the given configuration loads and matches schema"
|
|
449
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./validate-
|
|
449
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./validate-DwUJ3F9z.cjs.js'); }).then((m) => m.default)));
|
|
450
450
|
program.command("config:schema").option(
|
|
451
451
|
"--package <name>",
|
|
452
452
|
"Only output config schema that applies to the given package"
|
|
453
453
|
).option(
|
|
454
454
|
"--format <format>",
|
|
455
455
|
"Format to print the schema in, either json or yaml [yaml]"
|
|
456
|
-
).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-
|
|
456
|
+
).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-BoT3ItlL.cjs.js'); }).then((m) => m.default)));
|
|
457
457
|
registerRepoCommand(program);
|
|
458
458
|
registerScriptCommand(program);
|
|
459
459
|
registerMigrateCommand(program);
|
|
@@ -465,19 +465,19 @@ function registerCommands(program) {
|
|
|
465
465
|
"--release <version|next|main>",
|
|
466
466
|
"Bump to a specific Backstage release line or version",
|
|
467
467
|
"main"
|
|
468
|
-
).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-
|
|
469
|
-
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-
|
|
470
|
-
program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
468
|
+
).option("--skip-install", "Skips yarn install step").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-D0vhUSFQ.cjs.js'); }).then((m) => m.default)));
|
|
469
|
+
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-JfiB81FZ.cjs.js'); }).then((m) => m.default)));
|
|
470
|
+
program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-CnL36FfN.cjs.js'); }).then((m) => m.default)));
|
|
471
471
|
program.command("build-workspace <workspace-dir> [packages...]").option(
|
|
472
472
|
"--alwaysYarnPack",
|
|
473
473
|
"Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
|
|
474
|
-
).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-
|
|
475
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
476
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-
|
|
474
|
+
).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-CqQibS-q.cjs.js'); }).then((m) => m.default)));
|
|
475
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-B_y2XKYV.cjs.js'); }).then((m) => m.default)));
|
|
476
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-DFqP7KTl.cjs.js'); }).then((m) => m.default)));
|
|
477
477
|
program.command("install [plugin-id]", { hidden: true }).option(
|
|
478
478
|
"--from <packageJsonFilePath>",
|
|
479
479
|
"Install from a local package.json containing the installation recipe"
|
|
480
|
-
).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-
|
|
480
|
+
).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-BDXQInuw.cjs.js'); }).then((m) => m.default)));
|
|
481
481
|
}
|
|
482
482
|
function lazy(getActionFunc) {
|
|
483
483
|
return async (...args) => {
|
|
@@ -497,7 +497,7 @@ const main = (argv) => {
|
|
|
497
497
|
registerCommands(commander.program);
|
|
498
498
|
commander.program.on("command:*", () => {
|
|
499
499
|
console.log();
|
|
500
|
-
console.log(chalk__default
|
|
500
|
+
console.log(chalk__default.default.red(`Invalid command: ${commander.program.args.join(" ")}`));
|
|
501
501
|
console.log();
|
|
502
502
|
commander.program.outputHelp();
|
|
503
503
|
process.exit(1);
|
|
@@ -521,4 +521,4 @@ exports.devDependencies = devDependencies;
|
|
|
521
521
|
exports.paths = paths;
|
|
522
522
|
exports.version = version;
|
|
523
523
|
exports.version$1 = version$c;
|
|
524
|
-
//# sourceMappingURL=index-
|
|
524
|
+
//# sourceMappingURL=index-BD9P1D2C.cjs.js.map
|
|
@@ -4,7 +4,7 @@ var fs = require('fs-extra');
|
|
|
4
4
|
var chalk = require('chalk');
|
|
5
5
|
var yaml = require('yaml');
|
|
6
6
|
var inquirer = require('inquirer');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-BD9P1D2C.cjs.js');
|
|
8
8
|
var crypto = require('crypto');
|
|
9
9
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
10
10
|
var request = require('@octokit/request');
|
|
@@ -15,15 +15,15 @@ require('semver');
|
|
|
15
15
|
require('@backstage/cli-common');
|
|
16
16
|
require('@backstage/errors');
|
|
17
17
|
|
|
18
|
-
function
|
|
18
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
19
19
|
|
|
20
|
-
var fs__default = /*#__PURE__*/
|
|
21
|
-
var chalk__default = /*#__PURE__*/
|
|
22
|
-
var inquirer__default = /*#__PURE__*/
|
|
23
|
-
var crypto__default = /*#__PURE__*/
|
|
24
|
-
var openBrowser__default = /*#__PURE__*/
|
|
25
|
-
var express__default = /*#__PURE__*/
|
|
26
|
-
var fetch__default = /*#__PURE__*/
|
|
20
|
+
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
21
|
+
var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
|
|
22
|
+
var inquirer__default = /*#__PURE__*/_interopDefaultCompat(inquirer);
|
|
23
|
+
var crypto__default = /*#__PURE__*/_interopDefaultCompat(crypto);
|
|
24
|
+
var openBrowser__default = /*#__PURE__*/_interopDefaultCompat(openBrowser);
|
|
25
|
+
var express__default = /*#__PURE__*/_interopDefaultCompat(express);
|
|
26
|
+
var fetch__default = /*#__PURE__*/_interopDefaultCompat(fetch);
|
|
27
27
|
|
|
28
28
|
var __defProp = Object.defineProperty;
|
|
29
29
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -83,7 +83,7 @@ class GithubCreateAppServer {
|
|
|
83
83
|
res.setHeader("content-type", "text/html");
|
|
84
84
|
res.send(body);
|
|
85
85
|
});
|
|
86
|
-
const webhookId = crypto__default
|
|
86
|
+
const webhookId = crypto__default.default.randomBytes(15).toString("base64").replace(/[\+\/]/g, "");
|
|
87
87
|
this.webhookUrl = `https://smee.io/${webhookId}`;
|
|
88
88
|
}
|
|
89
89
|
static async run(options) {
|
|
@@ -93,7 +93,7 @@ class GithubCreateAppServer {
|
|
|
93
93
|
return server.start();
|
|
94
94
|
}
|
|
95
95
|
async start() {
|
|
96
|
-
const app = express__default
|
|
96
|
+
const app = express__default.default();
|
|
97
97
|
app.get("/", this.formHandler);
|
|
98
98
|
const callPromise = new Promise((resolve, reject) => {
|
|
99
99
|
app.get("/callback", (req, res) => {
|
|
@@ -117,7 +117,7 @@ class GithubCreateAppServer {
|
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
this.baseUrl = await this.listen(app);
|
|
120
|
-
openBrowser__default
|
|
120
|
+
openBrowser__default.default(this.baseUrl);
|
|
121
121
|
return callPromise;
|
|
122
122
|
}
|
|
123
123
|
async listen(app) {
|
|
@@ -136,7 +136,7 @@ class GithubCreateAppServer {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
var index = async (org) => {
|
|
139
|
-
const answers = await inquirer__default
|
|
139
|
+
const answers = await inquirer__default.default.prompt({
|
|
140
140
|
name: "appType",
|
|
141
141
|
type: "checkbox",
|
|
142
142
|
message: "Select permissions [required] (these can be changed later but then require approvals in all installations)",
|
|
@@ -158,7 +158,7 @@ var index = async (org) => {
|
|
|
158
158
|
]
|
|
159
159
|
});
|
|
160
160
|
if (answers.appType.length === 0) {
|
|
161
|
-
console.log(chalk__default
|
|
161
|
+
console.log(chalk__default.default.red("You must select at least one permission"));
|
|
162
162
|
process.exit(1);
|
|
163
163
|
}
|
|
164
164
|
await verifyGithubOrg(org);
|
|
@@ -169,10 +169,10 @@ var index = async (org) => {
|
|
|
169
169
|
const fileName = `github-app-${slug}-credentials.yaml`;
|
|
170
170
|
const content = `# Name: ${name}
|
|
171
171
|
${yaml.stringify(config)}`;
|
|
172
|
-
await fs__default
|
|
173
|
-
console.log(`GitHub App configuration written to ${chalk__default
|
|
172
|
+
await fs__default.default.writeFile(index$1.paths.resolveTargetRoot(fileName), content);
|
|
173
|
+
console.log(`GitHub App configuration written to ${chalk__default.default.cyan(fileName)}`);
|
|
174
174
|
console.log(
|
|
175
|
-
chalk__default
|
|
175
|
+
chalk__default.default.yellow(
|
|
176
176
|
"This file contains sensitive credentials, it should not be committed to version control and handled with care!"
|
|
177
177
|
)
|
|
178
178
|
);
|
|
@@ -180,7 +180,7 @@ ${yaml.stringify(config)}`;
|
|
|
180
180
|
"Here's an example on how to update the integrations section in app-config.yaml"
|
|
181
181
|
);
|
|
182
182
|
console.log(
|
|
183
|
-
chalk__default
|
|
183
|
+
chalk__default.default.green(`
|
|
184
184
|
integrations:
|
|
185
185
|
github:
|
|
186
186
|
- host: github.com
|
|
@@ -191,12 +191,12 @@ integrations:
|
|
|
191
191
|
async function verifyGithubOrg(org) {
|
|
192
192
|
let response;
|
|
193
193
|
try {
|
|
194
|
-
response = await fetch__default
|
|
194
|
+
response = await fetch__default.default(
|
|
195
195
|
`https://api.github.com/orgs/${encodeURIComponent(org)}`
|
|
196
196
|
);
|
|
197
197
|
} catch (e) {
|
|
198
198
|
console.log(
|
|
199
|
-
chalk__default
|
|
199
|
+
chalk__default.default.yellow(
|
|
200
200
|
"Warning: Unable to verify existence of GitHub organization. ",
|
|
201
201
|
e
|
|
202
202
|
)
|
|
@@ -207,21 +207,21 @@ async function verifyGithubOrg(org) {
|
|
|
207
207
|
{
|
|
208
208
|
type: "confirm",
|
|
209
209
|
name: "shouldCreateOrg",
|
|
210
|
-
message: `GitHub organization ${chalk__default
|
|
210
|
+
message: `GitHub organization ${chalk__default.default.cyan(
|
|
211
211
|
org
|
|
212
212
|
)} does not exist. Would you like to create a new Organization instead?`
|
|
213
213
|
}
|
|
214
214
|
];
|
|
215
|
-
const answers = await inquirer__default
|
|
215
|
+
const answers = await inquirer__default.default.prompt(questions);
|
|
216
216
|
if (!answers.shouldCreateOrg) {
|
|
217
217
|
console.log(
|
|
218
|
-
chalk__default
|
|
218
|
+
chalk__default.default.yellow("GitHub organization must exist to create GitHub app")
|
|
219
219
|
);
|
|
220
220
|
process.exit(1);
|
|
221
221
|
}
|
|
222
|
-
openBrowser__default
|
|
222
|
+
openBrowser__default.default("https://github.com/account/organizations/new");
|
|
223
223
|
console.log(
|
|
224
|
-
chalk__default
|
|
224
|
+
chalk__default.default.yellow(
|
|
225
225
|
"Please re-run this command when you have created your new organization"
|
|
226
226
|
)
|
|
227
227
|
);
|
|
@@ -229,5 +229,5 @@ async function verifyGithubOrg(org) {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
exports
|
|
233
|
-
//# sourceMappingURL=index-
|
|
232
|
+
exports.default = index;
|
|
233
|
+
//# sourceMappingURL=index-B_y2XKYV.cjs.js.map
|