@backstage/cli 0.7.16 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -0
- package/config/jest.js +42 -14
- package/config/jestEsmTransform.js +4 -21
- package/config/jestSucraseTransform.js +66 -0
- package/dist/cjs/{build-adad8b22.cjs.js → build-5907bd33.cjs.js} +4 -3
- package/dist/cjs/{build-093508d5.cjs.js → build-73b8edfc.cjs.js} +4 -3
- package/dist/cjs/{build-d7862d7c.cjs.js → build-7571e64b.cjs.js} +4 -3
- package/dist/cjs/{build-292d259f.cjs.js → build-9e812f65.cjs.js} +6 -5
- package/dist/cjs/{buildImage-7e3cf320.cjs.js → buildImage-7b597eb4.cjs.js} +5 -4
- package/dist/cjs/{buildWorkspace-cfea104f.cjs.js → buildWorkspace-779679cc.cjs.js} +5 -4
- package/dist/cjs/{bump-27623ef3.cjs.js → bump-67695db2.cjs.js} +31 -8
- package/dist/cjs/{bundle-80c7cf66.cjs.js → bundle-561463d9.cjs.js} +6 -5
- package/dist/cjs/{clean-f750c0dc.cjs.js → clean-1156a89f.cjs.js} +3 -2
- package/dist/cjs/{config-3e7b308b.cjs.js → config-10d49423.cjs.js} +21 -6
- package/dist/cjs/create-b0f456f9.cjs.js +483 -0
- package/dist/cjs/{createPlugin-a03aceea.cjs.js → createPlugin-2c95815c.cjs.js} +11 -9
- package/dist/cjs/{dev-f7d06c3d.cjs.js → dev-a04f9251.cjs.js} +5 -4
- package/dist/cjs/{diff-fd2bda97.cjs.js → diff-d009aa81.cjs.js} +3 -2
- package/dist/cjs/{docs-8dde3bb5.cjs.js → docs-d4bb9d0c.cjs.js} +4 -3
- package/dist/cjs/{index-8ece1803.cjs.js → index-25ca4442.cjs.js} +172 -51
- package/dist/cjs/{index-07ce0d55.cjs.js → index-351d0371.cjs.js} +3 -2
- package/dist/cjs/{index-39056740.cjs.js → index-af2b13e0.cjs.js} +13 -11
- package/dist/cjs/{info-85a45abd.cjs.js → info-05aaf204.cjs.js} +4 -3
- package/dist/cjs/{install-8c0b53e3.cjs.js → install-5d8e8fe5.cjs.js} +5 -4
- package/dist/cjs/{lint-fffadef5.cjs.js → lint-85c90960.cjs.js} +4 -3
- package/dist/cjs/{lint-d2e5b1ca.cjs.js → lint-d1316de9.cjs.js} +4 -3
- package/dist/cjs/{pack-f73a4522.cjs.js → pack-58a2ab5d.cjs.js} +3 -2
- package/dist/cjs/{packager-e61b2b16.cjs.js → packager-b251454c.cjs.js} +2 -2
- package/dist/cjs/{packages-be161005.cjs.js → packages-4a2d7110.cjs.js} +3 -3
- package/dist/cjs/{paths-5e0e5ffc.cjs.js → paths-034708b3.cjs.js} +20 -5
- package/dist/cjs/{print-5df69d1b.cjs.js → print-5d03aebd.cjs.js} +6 -4
- package/dist/cjs/{removePlugin-865c314e.cjs.js → removePlugin-c64823bb.cjs.js} +13 -3
- package/dist/cjs/{run-cc82f277.cjs.js → run-924136d8.cjs.js} +9 -4
- package/dist/cjs/{schema-66b2f248.cjs.js → schema-d59459da.cjs.js} +4 -3
- package/dist/cjs/{serve-7656d962.cjs.js → serve-0f30d0fc.cjs.js} +7 -6
- package/dist/cjs/{serve-b1a08c13.cjs.js → serve-28c83157.cjs.js} +8 -7
- package/dist/cjs/{server-4f73b8b5.cjs.js → server-652ec9a3.cjs.js} +2 -2
- package/dist/cjs/{tasks-4d9e9b1f.cjs.js → tasks-802f087f.cjs.js} +78 -12
- package/dist/cjs/{testCommand-55c14530.cjs.js → testCommand-11d07d1b.cjs.js} +4 -3
- package/dist/cjs/{validate-1542a59a.cjs.js → validate-3cc188fa.cjs.js} +6 -4
- package/dist/index.cjs.js +2 -1
- package/package.json +21 -22
- package/templates/default-backend-plugin/package.json.hbs +39 -37
- package/templates/default-common-plugin-package/.eslintrc.js +3 -0
- package/templates/default-common-plugin-package/README.md.hbs +5 -0
- package/templates/default-common-plugin-package/package.json.hbs +34 -0
- package/templates/default-common-plugin-package/src/index.ts.hbs +19 -0
- package/templates/default-common-plugin-package/src/setupTests.ts +1 -0
- package/templates/default-common-plugin-package/tsconfig.json +9 -0
- package/templates/default-plugin/package.json.hbs +5 -3
- package/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +5 -2
- package/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +2 -2
- package/templates/scaffolder-module/.eslintrc.js +3 -0
- package/templates/scaffolder-module/README.md.hbs +5 -0
- package/templates/scaffolder-module/package.json.hbs +37 -0
- package/templates/scaffolder-module/src/actions/example/example.test.ts +50 -0
- package/templates/scaffolder-module/src/actions/example/example.ts +57 -0
- package/templates/scaffolder-module/src/actions/example/index.ts +1 -0
- package/templates/scaffolder-module/src/actions/index.ts +1 -0
- package/templates/scaffolder-module/src/index.ts.hbs +8 -0
- package/templates/scaffolder-module/tsconfig.json +9 -0
|
@@ -6,6 +6,7 @@ var fs = require('fs-extra');
|
|
|
6
6
|
var semver = require('semver');
|
|
7
7
|
var cliCommon = require('@backstage/cli-common');
|
|
8
8
|
var package_json = require('@backstage/config/package.json');
|
|
9
|
+
var errors = require('@backstage/errors');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
@@ -21,11 +22,7 @@ class CustomError extends Error {
|
|
|
21
22
|
}
|
|
22
23
|
class ExitCodeError extends CustomError {
|
|
23
24
|
constructor(code, command) {
|
|
24
|
-
|
|
25
|
-
super(`Command '${command}' exited with code ${code}`);
|
|
26
|
-
} else {
|
|
27
|
-
super(`Child exited with code ${code}`);
|
|
28
|
-
}
|
|
25
|
+
super(command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`);
|
|
29
26
|
this.code = code;
|
|
30
27
|
}
|
|
31
28
|
}
|
|
@@ -49,32 +46,153 @@ class NotFoundError extends CustomError {
|
|
|
49
46
|
|
|
50
47
|
const paths = cliCommon.findPaths(__dirname);
|
|
51
48
|
|
|
52
|
-
var version$
|
|
49
|
+
var version$9 = "0.9.10";
|
|
50
|
+
|
|
51
|
+
var version$8 = "0.9.0";
|
|
52
|
+
var dependencies = {
|
|
53
|
+
"@backstage/cli-common": "^0.1.6",
|
|
54
|
+
"@backstage/config": "^0.1.11",
|
|
55
|
+
"@backstage/config-loader": "^0.8.0",
|
|
56
|
+
"@backstage/errors": "^0.1.4",
|
|
57
|
+
"@backstage/types": "^0.1.1",
|
|
58
|
+
"@hot-loader/react-dom": "^16.13.0",
|
|
59
|
+
"@lerna/package-graph": "^4.0.0",
|
|
60
|
+
"@lerna/project": "^4.0.0",
|
|
61
|
+
"@octokit/request": "^5.4.12",
|
|
62
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
63
|
+
"@rollup/plugin-json": "^4.0.2",
|
|
64
|
+
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
65
|
+
"@rollup/plugin-yaml": "^3.0.0",
|
|
66
|
+
"@spotify/eslint-config-base": "^12.0.0",
|
|
67
|
+
"@spotify/eslint-config-react": "^12.0.0",
|
|
68
|
+
"@spotify/eslint-config-typescript": "^12.0.0",
|
|
69
|
+
"@sucrase/jest-plugin": "^2.1.1",
|
|
70
|
+
"@sucrase/webpack-loader": "^2.0.0",
|
|
71
|
+
"@svgr/plugin-jsx": "5.5.x",
|
|
72
|
+
"@svgr/plugin-svgo": "5.4.x",
|
|
73
|
+
"@svgr/rollup": "5.5.x",
|
|
74
|
+
"@svgr/webpack": "5.5.x",
|
|
75
|
+
"@types/webpack-env": "^1.15.2",
|
|
76
|
+
"@typescript-eslint/eslint-plugin": "^v4.30.0",
|
|
77
|
+
"@typescript-eslint/parser": "^v4.28.3",
|
|
78
|
+
"@yarnpkg/lockfile": "^1.1.0",
|
|
79
|
+
bfj: "^7.0.2",
|
|
80
|
+
buffer: "^6.0.3",
|
|
81
|
+
chalk: "^4.0.0",
|
|
82
|
+
chokidar: "^3.3.1",
|
|
83
|
+
commander: "^6.1.0",
|
|
84
|
+
"css-loader": "^5.2.6",
|
|
85
|
+
dashify: "^2.0.0",
|
|
86
|
+
diff: "^5.0.0",
|
|
87
|
+
esbuild: "^0.8.56",
|
|
88
|
+
eslint: "^7.30.0",
|
|
89
|
+
"eslint-config-prettier": "^8.3.0",
|
|
90
|
+
"eslint-formatter-friendly": "^7.0.0",
|
|
91
|
+
"eslint-plugin-import": "^2.20.2",
|
|
92
|
+
"eslint-plugin-jest": "^24.1.0",
|
|
93
|
+
"eslint-plugin-jsx-a11y": "^6.2.1",
|
|
94
|
+
"eslint-plugin-monorepo": "^0.3.2",
|
|
95
|
+
"eslint-plugin-react": "^7.12.4",
|
|
96
|
+
"eslint-plugin-react-hooks": "^4.0.0",
|
|
97
|
+
express: "^4.17.1",
|
|
98
|
+
"fork-ts-checker-webpack-plugin": "^4.0.5",
|
|
99
|
+
"fs-extra": "9.1.0",
|
|
100
|
+
glob: "^7.1.7",
|
|
101
|
+
handlebars: "^4.7.3",
|
|
102
|
+
"html-webpack-plugin": "^5.3.1",
|
|
103
|
+
inquirer: "^7.0.4",
|
|
104
|
+
jest: "^26.0.1",
|
|
105
|
+
"jest-css-modules": "^2.1.0",
|
|
106
|
+
"json-schema": "^0.4.0",
|
|
107
|
+
"jest-transform-yaml": "^0.1.1",
|
|
108
|
+
lodash: "^4.17.21",
|
|
109
|
+
"mini-css-extract-plugin": "^2.4.2",
|
|
110
|
+
"node-libs-browser": "^2.2.1",
|
|
111
|
+
ora: "^5.3.0",
|
|
112
|
+
postcss: "^8.1.0",
|
|
113
|
+
process: "^0.11.10",
|
|
114
|
+
react: "^16.0.0",
|
|
115
|
+
"react-dev-utils": "^11.0.4",
|
|
116
|
+
"react-hot-loader": "^4.12.21",
|
|
117
|
+
"recursive-readdir": "^2.2.2",
|
|
118
|
+
"replace-in-file": "^6.0.0",
|
|
119
|
+
rollup: "2.44.x",
|
|
120
|
+
"rollup-plugin-dts": "^3.0.1",
|
|
121
|
+
"rollup-plugin-esbuild": "2.6.x",
|
|
122
|
+
"rollup-plugin-peer-deps-external": "^2.2.2",
|
|
123
|
+
"rollup-plugin-postcss": "^4.0.0",
|
|
124
|
+
"rollup-pluginutils": "^2.8.2",
|
|
125
|
+
"run-script-webpack-plugin": "^0.0.11",
|
|
126
|
+
semver: "^7.3.2",
|
|
127
|
+
"style-loader": "^1.2.1",
|
|
128
|
+
sucrase: "^3.20.2",
|
|
129
|
+
tar: "^6.1.2",
|
|
130
|
+
"terser-webpack-plugin": "^5.1.3",
|
|
131
|
+
"ts-loader": "^8.0.17",
|
|
132
|
+
typescript: "^4.0.3",
|
|
133
|
+
util: "^0.12.3",
|
|
134
|
+
webpack: "^5.48.0",
|
|
135
|
+
"webpack-dev-server": "4.3.1",
|
|
136
|
+
"webpack-node-externals": "^3.0.0",
|
|
137
|
+
yaml: "^1.10.0",
|
|
138
|
+
"yml-loader": "^2.1.0",
|
|
139
|
+
yn: "^4.0.0"
|
|
140
|
+
};
|
|
141
|
+
var devDependencies = {
|
|
142
|
+
"@backstage/backend-common": "^0.9.10",
|
|
143
|
+
"@backstage/config": "^0.1.11",
|
|
144
|
+
"@backstage/core-components": "^0.7.4",
|
|
145
|
+
"@backstage/core-plugin-api": "^0.2.0",
|
|
146
|
+
"@backstage/core-app-api": "^0.1.21",
|
|
147
|
+
"@backstage/dev-utils": "^0.2.13",
|
|
148
|
+
"@backstage/test-utils": "^0.1.22",
|
|
149
|
+
"@backstage/theme": "^0.2.13",
|
|
150
|
+
"@types/diff": "^5.0.0",
|
|
151
|
+
"@types/express": "^4.17.6",
|
|
152
|
+
"@types/fs-extra": "^9.0.1",
|
|
153
|
+
"@types/http-proxy": "^1.17.4",
|
|
154
|
+
"@types/inquirer": "^7.3.1",
|
|
155
|
+
"@types/mock-fs": "^4.13.0",
|
|
156
|
+
"@types/node": "^14.14.32",
|
|
157
|
+
"@types/recursive-readdir": "^2.2.0",
|
|
158
|
+
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
|
|
159
|
+
"@types/rollup-plugin-postcss": "^2.0.0",
|
|
160
|
+
"@types/tar": "^4.0.3",
|
|
161
|
+
"@types/terser-webpack-plugin": "^5.0.4",
|
|
162
|
+
"@types/webpack": "^5.28.0",
|
|
163
|
+
"@types/webpack-dev-server": "^3.11.5",
|
|
164
|
+
"@types/yarnpkg__lockfile": "^1.1.4",
|
|
165
|
+
del: "^6.0.0",
|
|
166
|
+
"mock-fs": "^5.1.0",
|
|
167
|
+
nodemon: "^2.0.2",
|
|
168
|
+
"ts-node": "^10.0.0"
|
|
169
|
+
};
|
|
53
170
|
|
|
54
|
-
var version$7 = "0.
|
|
171
|
+
var version$7 = "0.1.21";
|
|
55
172
|
|
|
56
|
-
var version$6 = "0.
|
|
173
|
+
var version$6 = "0.7.4";
|
|
57
174
|
|
|
58
|
-
var version$5 = "0.
|
|
175
|
+
var version$5 = "0.2.0";
|
|
59
176
|
|
|
60
|
-
var version$4 = "0.
|
|
177
|
+
var version$4 = "0.2.13";
|
|
61
178
|
|
|
62
|
-
var version$3 = "0.
|
|
179
|
+
var version$3 = "0.1.22";
|
|
63
180
|
|
|
64
|
-
var version$2 = "0.
|
|
181
|
+
var version$2 = "0.2.13";
|
|
65
182
|
|
|
66
|
-
var version$1 = "0.
|
|
183
|
+
var version$1 = "0.15.13";
|
|
67
184
|
|
|
68
185
|
const packageVersions = {
|
|
69
|
-
"@backstage/backend-common": version$
|
|
70
|
-
"@backstage/cli": version$
|
|
186
|
+
"@backstage/backend-common": version$9,
|
|
187
|
+
"@backstage/cli": version$8,
|
|
71
188
|
"@backstage/config": package_json.version,
|
|
72
|
-
"@backstage/core-app-api": version$
|
|
73
|
-
"@backstage/core-components": version$
|
|
74
|
-
"@backstage/core-plugin-api": version$
|
|
75
|
-
"@backstage/dev-utils": version$
|
|
76
|
-
"@backstage/test-utils": version$
|
|
77
|
-
"@backstage/theme": version$
|
|
189
|
+
"@backstage/core-app-api": version$7,
|
|
190
|
+
"@backstage/core-components": version$6,
|
|
191
|
+
"@backstage/core-plugin-api": version$5,
|
|
192
|
+
"@backstage/dev-utils": version$4,
|
|
193
|
+
"@backstage/test-utils": version$3,
|
|
194
|
+
"@backstage/theme": version$2,
|
|
195
|
+
"@backstage/plugin-scaffolder-backend": version$1
|
|
78
196
|
};
|
|
79
197
|
function findVersion() {
|
|
80
198
|
const pkgContent = fs__default['default'].readFileSync(paths.resolveOwn("package.json"), "utf8");
|
|
@@ -116,33 +234,34 @@ function registerCommands(program) {
|
|
|
116
234
|
(opt, opts) => [...opts, opt],
|
|
117
235
|
Array()
|
|
118
236
|
];
|
|
119
|
-
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
120
|
-
program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-
|
|
121
|
-
program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
122
|
-
program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-
|
|
123
|
-
program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-
|
|
124
|
-
program.command("backend:dev").description("Start local development server with HMR for the backend").option("--check", "Enable type checking and linting").option("--inspect", "Enable debugger").option("--inspect-brk", "Enable debugger with await to attach debugger").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./dev-
|
|
125
|
-
program.command("create
|
|
126
|
-
program.command("
|
|
127
|
-
program.command("plugin
|
|
128
|
-
program.command("plugin:
|
|
129
|
-
program.command("plugin:
|
|
130
|
-
program.command("
|
|
131
|
-
program.command("
|
|
132
|
-
program.command("
|
|
133
|
-
program.command("
|
|
134
|
-
program.command("config:
|
|
135
|
-
program.command("config:
|
|
136
|
-
program.command("config:
|
|
137
|
-
program.command("
|
|
138
|
-
program.command("versions:
|
|
139
|
-
program.command("
|
|
140
|
-
program.command("
|
|
141
|
-
program.command("
|
|
142
|
-
program.command("
|
|
143
|
-
program.command("
|
|
144
|
-
program.command("
|
|
145
|
-
program.command("
|
|
237
|
+
program.command("app:build").description("Build an app for a production release").option("--stats", "Write bundle stats to output directory").option("--lax", "Do not require environment variables to be set").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./build-9e812f65.cjs.js'); }).then((m) => m.default)));
|
|
238
|
+
program.command("app:serve").description("Serve an app for local development").option("--check", "Enable type checking and linting").option(...configOption).action(lazy(() => Promise.resolve().then(function () { return require('./serve-28c83157.cjs.js'); }).then((m) => m.default)));
|
|
239
|
+
program.command("backend:build").description("Build a backend plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-7571e64b.cjs.js'); }).then((m) => m.default)));
|
|
240
|
+
program.command("backend:bundle").description("Bundle the backend into a deployment archive").option("--build-dependencies", "Build all local package dependencies before bundling the backend").action(lazy(() => Promise.resolve().then(function () { return require('./bundle-561463d9.cjs.js'); }).then((m) => m.default)));
|
|
241
|
+
program.command("backend:build-image").allowUnknownOption(true).helpOption(", --backstage-cli-help").option("--build", "Build packages before packing them into the image").description("Bundles the package into a docker image. This command is deprecated and will be removed.").action(lazy(() => Promise.resolve().then(function () { return require('./buildImage-7b597eb4.cjs.js'); }).then((m) => m.default)));
|
|
242
|
+
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-a04f9251.cjs.js'); }).then((m) => m.default)));
|
|
243
|
+
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-b0f456f9.cjs.js'); }).then((m) => m.default)));
|
|
244
|
+
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-2c95815c.cjs.js'); }).then((m) => m.default)));
|
|
245
|
+
program.command("remove-plugin").description("Removes plugin in the current repository").action(lazy(() => Promise.resolve().then(function () { return require('./removePlugin-c64823bb.cjs.js'); }).then((m) => m.default)));
|
|
246
|
+
program.command("plugin:build").description("Build a plugin").action(lazy(() => Promise.resolve().then(function () { return require('./build-5907bd33.cjs.js'); }).then((m) => m.default)));
|
|
247
|
+
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-0f30d0fc.cjs.js'); }).then((m) => m.default)));
|
|
248
|
+
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-d009aa81.cjs.js'); }).then((m) => m.default)));
|
|
249
|
+
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-73b8edfc.cjs.js'); }).then((m) => m.default)));
|
|
250
|
+
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-85c90960.cjs.js'); }).then((m) => m.default)));
|
|
251
|
+
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-11d07d1b.cjs.js'); }).then((m) => m.default)));
|
|
252
|
+
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-d4bb9d0c.cjs.js'); }).then((m) => m.default)));
|
|
253
|
+
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-5d03aebd.cjs.js'); }).then((m) => m.default)));
|
|
254
|
+
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-3cc188fa.cjs.js'); }).then((m) => m.default)));
|
|
255
|
+
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-d59459da.cjs.js'); }).then((m) => m.default)));
|
|
256
|
+
program.command("versions:bump").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-67695db2.cjs.js'); }).then((m) => m.default)));
|
|
257
|
+
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-d1316de9.cjs.js'); }).then((m) => m.default)));
|
|
258
|
+
program.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-58a2ab5d.cjs.js'); }).then((m) => m.pre)));
|
|
259
|
+
program.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-58a2ab5d.cjs.js'); }).then((m) => m.post)));
|
|
260
|
+
program.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-1156a89f.cjs.js'); }).then((m) => m.default)));
|
|
261
|
+
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-779679cc.cjs.js'); }).then((m) => m.default)));
|
|
262
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-351d0371.cjs.js'); }).then((m) => m.default)));
|
|
263
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-05aaf204.cjs.js'); }).then((m) => m.default)));
|
|
264
|
+
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-5d8e8fe5.cjs.js'); }).then((m) => m.default)));
|
|
146
265
|
}
|
|
147
266
|
function lazy(getActionFunc) {
|
|
148
267
|
return async (...args) => {
|
|
@@ -151,6 +270,7 @@ function lazy(getActionFunc) {
|
|
|
151
270
|
await actionFunc(...args);
|
|
152
271
|
process.exit(0);
|
|
153
272
|
} catch (error) {
|
|
273
|
+
errors.assertError(error);
|
|
154
274
|
exitWithError(error);
|
|
155
275
|
}
|
|
156
276
|
};
|
|
@@ -180,8 +300,9 @@ main(process.argv);
|
|
|
180
300
|
exports.ExitCodeError = ExitCodeError;
|
|
181
301
|
exports.NotFoundError = NotFoundError;
|
|
182
302
|
exports.createPackageVersionProvider = createPackageVersionProvider;
|
|
183
|
-
exports.
|
|
303
|
+
exports.dependencies = dependencies;
|
|
304
|
+
exports.devDependencies = devDependencies;
|
|
184
305
|
exports.paths = paths;
|
|
185
306
|
exports.version = version;
|
|
186
|
-
exports.version$1 = version$
|
|
187
|
-
//# sourceMappingURL=index-
|
|
307
|
+
exports.version$1 = version$8;
|
|
308
|
+
//# sourceMappingURL=index-25ca4442.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-25ca4442.cjs.js');
|
|
7
7
|
var crypto = require('crypto');
|
|
8
8
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
9
9
|
var request = require('@octokit/request');
|
|
@@ -12,6 +12,7 @@ require('commander');
|
|
|
12
12
|
require('semver');
|
|
13
13
|
require('@backstage/cli-common');
|
|
14
14
|
require('@backstage/config/package.json');
|
|
15
|
+
require('@backstage/errors');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
@@ -127,4 +128,4 @@ ${yaml.stringify(config)}`;
|
|
|
127
128
|
};
|
|
128
129
|
|
|
129
130
|
exports.default = index;
|
|
130
|
-
//# sourceMappingURL=index-
|
|
131
|
+
//# sourceMappingURL=index-351d0371.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-
|
|
8
|
-
var run = require('./run-
|
|
7
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
8
|
+
var run = require('./run-924136d8.cjs.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
@@ -13,9 +13,8 @@ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
|
13
13
|
var tar__default = /*#__PURE__*/_interopDefaultLegacy(tar);
|
|
14
14
|
|
|
15
15
|
const UNSAFE_PACKAGES = [
|
|
16
|
-
...Object.keys(index.
|
|
17
|
-
|
|
18
|
-
"@backstage/config-loader"
|
|
16
|
+
...Object.keys(index.dependencies),
|
|
17
|
+
...Object.keys(index.devDependencies)
|
|
19
18
|
];
|
|
20
19
|
async function createDistWorkspace(packageNames, options = {}) {
|
|
21
20
|
var _a, _b, _c;
|
|
@@ -23,11 +22,14 @@ async function createDistWorkspace(packageNames, options = {}) {
|
|
|
23
22
|
const targets = await findTargetPackages(packageNames);
|
|
24
23
|
if (options.buildDependencies) {
|
|
25
24
|
const exclude = (_b = options.buildExcludes) != null ? _b : [];
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
const toBuild = targets.filter((target) => !exclude.includes(target.name));
|
|
26
|
+
if (toBuild.length > 0) {
|
|
27
|
+
const scopeArgs = toBuild.flatMap((target) => ["--scope", target.name]);
|
|
28
|
+
const lernaArgs = options.parallel && Number.isInteger(options.parallel) ? ["--concurrency", options.parallel.toString()] : [];
|
|
29
|
+
await run.run("yarn", ["lerna", ...lernaArgs, "run", ...scopeArgs, "build"], {
|
|
30
|
+
cwd: index.paths.targetRoot
|
|
31
|
+
});
|
|
32
|
+
}
|
|
31
33
|
}
|
|
32
34
|
await moveToDistWorkspace(targetDir, targets);
|
|
33
35
|
const files = (_c = options.files) != null ? _c : ["yarn.lock", "package.json"];
|
|
@@ -118,4 +120,4 @@ async function findTargetPackages(pkgNames) {
|
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
exports.createDistWorkspace = createDistWorkspace;
|
|
121
|
-
//# sourceMappingURL=index-
|
|
123
|
+
//# sourceMappingURL=index-af2b13e0.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var run = require('./run-
|
|
5
|
+
var run = require('./run-924136d8.cjs.js');
|
|
6
6
|
var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
|
|
7
7
|
require('chalk');
|
|
8
8
|
require('commander');
|
|
@@ -10,6 +10,7 @@ require('fs-extra');
|
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
12
12
|
require('@backstage/config/package.json');
|
|
13
|
+
require('@backstage/errors');
|
|
13
14
|
require('child_process');
|
|
14
15
|
require('util');
|
|
15
16
|
require('@yarnpkg/lockfile');
|
|
@@ -40,4 +41,4 @@ var info = async () => {
|
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
exports.default = info;
|
|
43
|
-
//# sourceMappingURL=info-
|
|
44
|
+
//# sourceMappingURL=info-05aaf204.cjs.js.map
|
|
@@ -3,15 +3,16 @@
|
|
|
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-4a2d7110.cjs.js');
|
|
7
|
+
var index = require('./index-25ca4442.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-924136d8.cjs.js');
|
|
12
12
|
require('commander');
|
|
13
13
|
require('@backstage/cli-common');
|
|
14
14
|
require('@backstage/config/package.json');
|
|
15
|
+
require('@backstage/errors');
|
|
15
16
|
require('child_process');
|
|
16
17
|
require('util');
|
|
17
18
|
|
|
@@ -210,4 +211,4 @@ var install = async (pluginId, cmd) => {
|
|
|
210
211
|
};
|
|
211
212
|
|
|
212
213
|
exports.default = install;
|
|
213
|
-
//# sourceMappingURL=install-
|
|
214
|
+
//# sourceMappingURL=install-5d8e8fe5.cjs.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var run = require('./run-
|
|
4
|
-
var index = require('./index-
|
|
3
|
+
var run = require('./run-924136d8.cjs.js');
|
|
4
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
5
5
|
require('child_process');
|
|
6
6
|
require('util');
|
|
7
|
+
require('@backstage/errors');
|
|
7
8
|
require('commander');
|
|
8
9
|
require('chalk');
|
|
9
10
|
require('fs-extra');
|
|
@@ -25,4 +26,4 @@ var lint = async (cmd, cmdArgs) => {
|
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
exports.default = lint;
|
|
28
|
-
//# sourceMappingURL=lint-
|
|
29
|
+
//# sourceMappingURL=lint-85c90960.cjs.js.map
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Lockfile = require('./Lockfile-80f0eec4.cjs.js');
|
|
4
|
-
require('./run-
|
|
4
|
+
require('./run-924136d8.cjs.js');
|
|
5
5
|
require('chalk');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
7
7
|
var partition = require('lodash/partition');
|
|
8
8
|
require('fs-extra');
|
|
9
9
|
require('semver');
|
|
10
10
|
require('@yarnpkg/lockfile');
|
|
11
11
|
require('child_process');
|
|
12
12
|
require('util');
|
|
13
|
+
require('@backstage/errors');
|
|
13
14
|
require('commander');
|
|
14
15
|
require('@backstage/cli-common');
|
|
15
16
|
require('@backstage/config/package.json');
|
|
@@ -73,4 +74,4 @@ function logArray(arr, header, each) {
|
|
|
73
74
|
exports.default = lint;
|
|
74
75
|
exports.forbiddenDuplicatesFilter = forbiddenDuplicatesFilter;
|
|
75
76
|
exports.includedFilter = includedFilter;
|
|
76
|
-
//# sourceMappingURL=lint-
|
|
77
|
+
//# sourceMappingURL=lint-d1316de9.cjs.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
5
5
|
require('commander');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('semver');
|
|
8
8
|
require('@backstage/cli-common');
|
|
9
9
|
require('@backstage/config/package.json');
|
|
10
|
+
require('@backstage/errors');
|
|
10
11
|
|
|
11
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
13
|
|
|
@@ -38,4 +39,4 @@ const post = async () => {
|
|
|
38
39
|
|
|
39
40
|
exports.post = post;
|
|
40
41
|
exports.pre = pre;
|
|
41
|
-
//# sourceMappingURL=pack-
|
|
42
|
+
//# sourceMappingURL=pack-58a2ab5d.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-
|
|
7
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
8
8
|
var peerDepsExternal = require('rollup-plugin-peer-deps-external');
|
|
9
9
|
var commonjs = require('@rollup/plugin-commonjs');
|
|
10
10
|
var resolve = require('@rollup/plugin-node-resolve');
|
|
@@ -254,4 +254,4 @@ const buildPackage = async (options) => {
|
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
exports.buildPackage = buildPackage;
|
|
257
|
-
//# sourceMappingURL=packager-
|
|
257
|
+
//# sourceMappingURL=packager-b251454c.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var run = require('./run-
|
|
4
|
-
var index = require('./index-
|
|
3
|
+
var run = require('./run-924136d8.cjs.js');
|
|
4
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
5
5
|
|
|
6
6
|
const PREFIX = "@backstage";
|
|
7
7
|
const DEP_TYPES = [
|
|
@@ -47,4 +47,4 @@ async function mapDependencies(targetDir) {
|
|
|
47
47
|
|
|
48
48
|
exports.fetchPackageInfo = fetchPackageInfo;
|
|
49
49
|
exports.mapDependencies = mapDependencies;
|
|
50
|
-
//# sourceMappingURL=packages-
|
|
50
|
+
//# sourceMappingURL=packages-4a2d7110.cjs.js.map
|
|
@@ -13,8 +13,8 @@ var TerserPlugin = require('terser-webpack-plugin');
|
|
|
13
13
|
var parallel = require('./parallel-a4714c72.cjs.js');
|
|
14
14
|
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
15
15
|
var svgrTemplate = require('./svgrTemplate-2d0d15cf.cjs.js');
|
|
16
|
-
var index = require('./index-
|
|
17
|
-
var run = require('./run-
|
|
16
|
+
var index = require('./index-25ca4442.cjs.js');
|
|
17
|
+
var run = require('./run-924136d8.cjs.js');
|
|
18
18
|
var pickBy = require('lodash/pickBy');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -77,6 +77,15 @@ const optimization = (options) => {
|
|
|
77
77
|
const transforms = (options) => {
|
|
78
78
|
const {isDev} = options;
|
|
79
79
|
const extraTransforms = isDev ? ["react-hot-loader"] : [];
|
|
80
|
+
function insertBeforeJssStyles(element) {
|
|
81
|
+
const head = document.head;
|
|
82
|
+
const firstJssNode = head.querySelector("style[data-jss]");
|
|
83
|
+
if (!firstJssNode) {
|
|
84
|
+
head.appendChild(element);
|
|
85
|
+
} else {
|
|
86
|
+
head.insertBefore(element, firstJssNode);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
80
89
|
const loaders = [
|
|
81
90
|
{
|
|
82
91
|
test: /\.(tsx?)$/,
|
|
@@ -157,7 +166,12 @@ const transforms = (options) => {
|
|
|
157
166
|
{
|
|
158
167
|
test: /\.css$/i,
|
|
159
168
|
use: [
|
|
160
|
-
isDev ?
|
|
169
|
+
isDev ? {
|
|
170
|
+
loader: require.resolve("style-loader"),
|
|
171
|
+
options: {
|
|
172
|
+
insert: insertBeforeJssStyles
|
|
173
|
+
}
|
|
174
|
+
} : MiniCssExtractPlugin__default['default'].loader,
|
|
161
175
|
{
|
|
162
176
|
loader: require.resolve("css-loader"),
|
|
163
177
|
options: {
|
|
@@ -173,7 +187,8 @@ const transforms = (options) => {
|
|
|
173
187
|
} else {
|
|
174
188
|
plugins.push(new MiniCssExtractPlugin__default['default']({
|
|
175
189
|
filename: "static/[name].[contenthash:8].css",
|
|
176
|
-
chunkFilename: "static/[name].[id].[contenthash:8].css"
|
|
190
|
+
chunkFilename: "static/[name].[id].[contenthash:8].css",
|
|
191
|
+
insert: insertBeforeJssStyles
|
|
177
192
|
}));
|
|
178
193
|
}
|
|
179
194
|
return {loaders, plugins};
|
|
@@ -498,4 +513,4 @@ exports.createBackendConfig = createBackendConfig;
|
|
|
498
513
|
exports.createConfig = createConfig;
|
|
499
514
|
exports.resolveBaseUrl = resolveBaseUrl;
|
|
500
515
|
exports.resolveBundlingPaths = resolveBundlingPaths;
|
|
501
|
-
//# sourceMappingURL=paths-
|
|
516
|
+
//# sourceMappingURL=paths-034708b3.cjs.js.map
|
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
var yaml = require('yaml');
|
|
4
4
|
var config$1 = require('@backstage/config');
|
|
5
|
-
var config = require('./config-
|
|
5
|
+
var config = require('./config-10d49423.cjs.js');
|
|
6
6
|
require('@backstage/config-loader');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-25ca4442.cjs.js');
|
|
8
8
|
require('commander');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('fs-extra');
|
|
11
11
|
require('semver');
|
|
12
12
|
require('@backstage/cli-common');
|
|
13
13
|
require('@backstage/config/package.json');
|
|
14
|
+
require('@backstage/errors');
|
|
14
15
|
|
|
15
16
|
var print = async (cmd) => {
|
|
16
17
|
const {schema, appConfigs} = await config.loadCliConfig({
|
|
17
18
|
args: cmd.config,
|
|
18
19
|
fromPackage: cmd.package,
|
|
19
|
-
mockEnv: cmd.lax
|
|
20
|
+
mockEnv: cmd.lax,
|
|
21
|
+
fullVisibility: !cmd.frontend
|
|
20
22
|
});
|
|
21
23
|
const visibility = getVisibilityOption(cmd);
|
|
22
24
|
const data = serializeConfigData(appConfigs, schema, visibility);
|
|
@@ -55,4 +57,4 @@ function serializeConfigData(appConfigs, schema, visibility) {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
exports.default = print;
|
|
58
|
-
//# sourceMappingURL=print-
|
|
60
|
+
//# sourceMappingURL=print-5d03aebd.cjs.js.map
|