@backstage/cli 0.10.5 → 0.13.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 +197 -0
- package/config/eslint.js +4 -0
- package/dist/cjs/PackageGraph-7a0d3a83.cjs.js +73 -0
- package/dist/cjs/{build-b8486ea8.cjs.js → build-411cb39c.cjs.js} +8 -4
- package/dist/cjs/{build-9b61e21d.cjs.js → build-959e2ffa.cjs.js} +5 -4
- package/dist/cjs/{build-133af6d0.cjs.js → build-b4301c17.cjs.js} +11 -13
- package/dist/cjs/{build-b09ce39b.cjs.js → build-c7b2ea88.cjs.js} +5 -4
- package/dist/cjs/{buildWorkspace-674700ee.cjs.js → buildWorkspace-df8a4418.cjs.js} +6 -4
- package/dist/cjs/{bump-fc9f451d.cjs.js → bump-d7017b61.cjs.js} +6 -5
- package/dist/cjs/{bundle-2dd090df.cjs.js → bundle-a12319b7.cjs.js} +8 -6
- package/dist/cjs/{clean-fbe87564.cjs.js → clean-5638771f.cjs.js} +2 -2
- package/dist/cjs/{config-ac195003.cjs.js → config-199a492f.cjs.js} +15 -29
- package/dist/cjs/{create-b1277797.cjs.js → create-db02de74.cjs.js} +5 -4
- package/dist/cjs/{createPlugin-a20640b2.cjs.js → createPlugin-10786f3f.cjs.js} +5 -4
- package/dist/cjs/{dev-357f9a5b.cjs.js → dev-76979eca.cjs.js} +6 -6
- package/dist/cjs/{diff-2c9f0f5b.cjs.js → diff-49413933.cjs.js} +2 -2
- package/dist/cjs/{docs-c28d9fe6.cjs.js → docs-701e1b43.cjs.js} +5 -3
- package/dist/cjs/{index-15114177.cjs.js → index-34d6a6a3.cjs.js} +65 -68
- package/dist/cjs/{index-d778c391.cjs.js → index-d5e2da99.cjs.js} +2 -2
- package/dist/cjs/{index-ce6e84ad.cjs.js → index-de296eda.cjs.js} +21 -38
- package/dist/cjs/{info-fb86e821.cjs.js → info-82d6df9a.cjs.js} +4 -3
- package/dist/cjs/{install-0e40a4b5.cjs.js → install-c1cc1699.cjs.js} +5 -4
- package/dist/cjs/{lint-d03a1e28.cjs.js → lint-3a07e770.cjs.js} +3 -3
- package/dist/cjs/{lint-364632ce.cjs.js → lint-90b05512.cjs.js} +4 -3
- package/dist/cjs/pack-6d555709.cjs.js +69 -0
- package/dist/cjs/{packager-c484b561.cjs.js → packager-b384ddb4.cjs.js} +101 -8
- package/dist/cjs/{packages-37922fa4.cjs.js → packages-deee570e.cjs.js} +8 -9
- package/dist/cjs/{parallel-a4714c72.cjs.js → parallel-7e32a8d0.cjs.js} +1 -5
- package/dist/cjs/{paths-5901f4e6.cjs.js → paths-2c7f6dab.cjs.js} +40 -53
- package/dist/cjs/{print-2861b2bc.cjs.js → print-e49ed821.cjs.js} +5 -3
- package/dist/cjs/{run-0c9b9637.cjs.js → run-596a22b2.cjs.js} +2 -2
- package/dist/cjs/{schema-bd2de85b.cjs.js → schema-cd5d09d2.cjs.js} +5 -3
- package/dist/cjs/{serve-9d7083ef.cjs.js → serve-948b0129.cjs.js} +14 -13
- package/dist/cjs/{serve-1a01caf7.cjs.js → serve-a81d4924.cjs.js} +10 -9
- package/dist/cjs/{server-5605972b.cjs.js → server-11842d16.cjs.js} +6 -3
- package/dist/cjs/{tasks-abce8018.cjs.js → tasks-47ef8136.cjs.js} +2 -2
- package/dist/cjs/{testCommand-34249b0d.cjs.js → testCommand-c91c3e8a.cjs.js} +3 -3
- package/dist/cjs/{validate-c29f64b6.cjs.js → validate-ee0ea71a.cjs.js} +7 -4
- package/dist/index.cjs.js +1 -1
- package/package.json +39 -36
- package/templates/default-backend-plugin/src/service/standaloneServer.ts.hbs +1 -1
- package/dist/cjs/pack-cc9d3480.cjs.js +0 -42
- package/dist/cjs/removePlugin-299f58a3.cjs.js +0 -175
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,202 @@
|
|
|
1
1
|
# @backstage/cli
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1ddf6d9d5a: Removes the previously deprecated `remove-plugin` command alongside the `--lax` option to `app:build`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- c372a5032f: chore(deps): bump `jest-transform-yaml` from 0.1.1 to 1.0.0
|
|
12
|
+
- 1b4ab0d44c: Updated the dependency warning that is baked into `app:serve` to only warn about packages that are not allowed to have duplicates.
|
|
13
|
+
- dc46efa2cc: Switched the `WebpackDevServer` configuration to use client-side detection of the WebSocket protocol.
|
|
14
|
+
- 10086f5873: Upgraded `webpack`, `webpack-dev-server`,`fork-ts-checker-webpack-plugin`, `react-dev-utils`, and `react-hot-loader`. Since `ForkTsCheckerWebpackPlugin` no longer runs ESLint, we now include the `ESLintPlugin` from `eslint-webpack-plugin` if the `--check` flag is passed.
|
|
15
|
+
|
|
16
|
+
## 0.12.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 08fa6a604a: Removed the `typescript` dependency from the Backstage CLI in order to decouple the TypeScript version in Backstage projects. To keep using a specific TypeScript version, be sure to add an explicit dependency in your root `package.json`:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
"dependencies": {
|
|
24
|
+
...
|
|
25
|
+
"typescript": "~4.5.4",
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
We recommend using a `~` version range since TypeScript releases do not adhere to semver.
|
|
30
|
+
|
|
31
|
+
It may be the case that you end up with errors if you upgrade the TypeScript version. This is because there was a change to TypeScript not long ago that defaulted the type of errors caught in `catch` blocks to `unknown`. You can work around this by adding `"useUnknownInCatchVariables": false` to the `"compilerOptions"` in your `tsconfig.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
"compilerOptions": {
|
|
35
|
+
...
|
|
36
|
+
"useUnknownInCatchVariables": false
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Another option is to use the utilities from `@backstage/errors` to assert the type of errors caught in `catch` blocks:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { assertError, isError } from '@backstage/errors';
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
...
|
|
47
|
+
} catch (error) {
|
|
48
|
+
assertError(error);
|
|
49
|
+
...
|
|
50
|
+
// OR
|
|
51
|
+
if (isError(error)) {
|
|
52
|
+
...
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Yet another issue you might run into when upgrading TypeScript is incompatibilities in the types from `react-use`. The error you would run into looks something like this:
|
|
58
|
+
|
|
59
|
+
```plain
|
|
60
|
+
node_modules/react-use/lib/usePermission.d.ts:1:54 - error TS2304: Cannot find name 'DevicePermissionDescriptor'.
|
|
61
|
+
|
|
62
|
+
1 declare type PermissionDesc = PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If you encounter this error, the simplest fix is to replace full imports of `react-use` with more specific ones. For example, the following:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import { useAsync } from 'react-use';
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Would be converted into this:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- 6e34e2cfbf: Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
$ yarn backstage-cli config:check --lax --deprecated
|
|
83
|
+
config:check --lax --deprecated
|
|
84
|
+
Loaded config from app-config.yaml
|
|
85
|
+
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- f2fe4d240b: Switched to only apply `@hot-loader/react-dom` [Webpack aliasing](https://github.com/hot-loader/react-dom/tree/master/source#webpack) when using React 16.
|
|
89
|
+
- 2a42d573d2: Introduced a new `--experimental-type-build` option to the various package build commands. This option switches the type definition build to be executed using API Extractor rather than a `rollup` plugin. In order for this experimental switch to work, you must also have `@microsoft/api-extractor` installed within your project, as it is an optional peer dependency.
|
|
90
|
+
|
|
91
|
+
The biggest difference between the existing mode and the experimental one is that rather than just building a single `dist/index.d.ts` file, API Extractor will output `index.d.ts`, `index.beta.d.ts`, and `index.alpha.d.ts`, all in the `dist` directory. Each of these files will have exports from more unstable release stages stripped, meaning that `index.d.ts` will omit all exports marked with `@alpha` or `@beta`, while `index.beta.d.ts` will omit all exports marked with `@alpha`.
|
|
92
|
+
|
|
93
|
+
In addition, the `prepack` command now has support for `alphaTypes` and `betaTypes` fields in the `publishConfig` of `package.json`. These optional fields can be pointed to `dist/types.alpha.d.ts` and `dist/types.beta.d.ts` respectively, which will cause `<name>/alpha` and `<name>/beta` entry points to be generated for the package. See the [`@backstage/catalog-model`](https://github.com/backstage/backstage/blob/master/packages/catalog-model/package.json) package for an example of how this can be used in practice.
|
|
94
|
+
|
|
95
|
+
- Updated dependencies
|
|
96
|
+
- @backstage/config@0.1.13
|
|
97
|
+
- @backstage/config-loader@0.9.3
|
|
98
|
+
|
|
99
|
+
## 0.12.0-next.0
|
|
100
|
+
|
|
101
|
+
### Minor Changes
|
|
102
|
+
|
|
103
|
+
- 08fa6a604a: Removed the `typescript` dependency from the Backstage CLI in order to decouple the TypeScript version in Backstage projects. To keep using a specific TypeScript version, be sure to add an explicit dependency in your root `package.json`:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
"dependencies": {
|
|
107
|
+
...
|
|
108
|
+
"typescript": "~4.5.4",
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
We recommend using a `~` version range since TypeScript releases do not adhere to semver.
|
|
113
|
+
|
|
114
|
+
It may be the case that you end up with errors if you upgrade the TypeScript version. This is because there was a change to TypeScript not long ago that defaulted the type of errors caught in `catch` blocks to `unknown`. You can work around this by adding `"useUnknownInCatchVariables": false` to the `"compilerOptions"` in your `tsconfig.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
"compilerOptions": {
|
|
118
|
+
...
|
|
119
|
+
"useUnknownInCatchVariables": false
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Another option is to use the utilities from `@backstage/errors` to assert the type of errors caught in `catch` blocks:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
import { assertError, isError } from '@backstage/errors';
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
...
|
|
130
|
+
} catch (error) {
|
|
131
|
+
assertError(error);
|
|
132
|
+
...
|
|
133
|
+
// OR
|
|
134
|
+
if (isError(error)) {
|
|
135
|
+
...
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- 6e34e2cfbf: Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
$ yarn backstage-cli config:check --lax --deprecated
|
|
146
|
+
config:check --lax --deprecated
|
|
147
|
+
Loaded config from app-config.yaml
|
|
148
|
+
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- 2a42d573d2: Introduced a new `--experimental-type-build` option to the various package build commands. This option switches the type definition build to be executed using API Extractor rather than a `rollup` plugin. In order for this experimental switch to work, you must also have `@microsoft/api-extractor` installed within your project, as it is an optional peer dependency.
|
|
152
|
+
|
|
153
|
+
The biggest difference between the existing mode and the experimental one is that rather than just building a single `dist/index.d.ts` file, API Extractor will output `index.d.ts`, `index.beta.d.ts`, and `index.alpha.d.ts`, all in the `dist` directory. Each of these files will have exports from more unstable release stages stripped, meaning that `index.d.ts` will omit all exports marked with `@alpha` or `@beta`, while `index.beta.d.ts` will omit all exports marked with `@alpha`.
|
|
154
|
+
|
|
155
|
+
In addition, the `prepack` command now has support for `alphaTypes` and `betaTypes` fields in the `publishConfig` of `package.json`. These optional fields can be pointed to `dist/types.alpha.d.ts` and `dist/types.beta.d.ts` respectively, which will cause `<name>/alpha` and `<name>/beta` entry points to be generated for the package. See the [`@backstage/catalog-model`](https://github.com/backstage/backstage/blob/master/packages/catalog-model/package.json) package for an example of how this can be used in practice.
|
|
156
|
+
|
|
157
|
+
- Updated dependencies
|
|
158
|
+
- @backstage/config@0.1.13-next.0
|
|
159
|
+
- @backstage/config-loader@0.9.3-next.0
|
|
160
|
+
|
|
161
|
+
## 0.11.0
|
|
162
|
+
|
|
163
|
+
### Minor Changes
|
|
164
|
+
|
|
165
|
+
- 14e980acee: ESLint upgraded to version 8 and all it's plugins updated to newest version.
|
|
166
|
+
|
|
167
|
+
If you use any custom plugins for ESLint please check compatibility.
|
|
168
|
+
|
|
169
|
+
```diff
|
|
170
|
+
- "@typescript-eslint/eslint-plugin": "^v4.33.0",
|
|
171
|
+
- "@typescript-eslint/parser": "^v4.28.3",
|
|
172
|
+
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
173
|
+
+ "@typescript-eslint/parser": "^5.9.0",
|
|
174
|
+
- "eslint": "^7.30.0",
|
|
175
|
+
+ "eslint": "^8.6.0",
|
|
176
|
+
- "eslint-plugin-import": "^2.20.2",
|
|
177
|
+
- "eslint-plugin-jest": "^24.1.0",
|
|
178
|
+
- "eslint-plugin-jsx-a11y": "^6.2.1",
|
|
179
|
+
+ "eslint-plugin-import": "^2.25.4",
|
|
180
|
+
+ "eslint-plugin-jest": "^25.3.4",
|
|
181
|
+
+ "eslint-plugin-jsx-a11y": "^6.5.1",
|
|
182
|
+
- "eslint-plugin-react": "^7.12.4",
|
|
183
|
+
- "eslint-plugin-react-hooks": "^4.0.0",
|
|
184
|
+
+ "eslint-plugin-react": "^7.28.0",
|
|
185
|
+
+ "eslint-plugin-react-hooks": "^4.3.0",
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Please consult changelogs from packages if you find any problems.
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- f302d24d34: Switch Webpack minification to use `esbuild` instead of `terser`.
|
|
193
|
+
- bee7082094: Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well.
|
|
194
|
+
- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
|
|
195
|
+
- Updated dependencies
|
|
196
|
+
- @backstage/config@0.1.12
|
|
197
|
+
- @backstage/errors@0.2.0
|
|
198
|
+
- @backstage/config-loader@0.9.2
|
|
199
|
+
|
|
3
200
|
## 0.10.5
|
|
4
201
|
|
|
5
202
|
### Patch Changes
|
package/config/eslint.js
CHANGED
|
@@ -80,6 +80,10 @@ module.exports = {
|
|
|
80
80
|
name: '@material-ui/icons',
|
|
81
81
|
message: "Please import '@material-ui/icons/<Icon>' instead.",
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
name: '@material-ui/icons/', // because this is possible too ._.
|
|
85
|
+
message: "Please import '@material-ui/icons/<Icon>' instead.",
|
|
86
|
+
},
|
|
83
87
|
...require('module').builtinModules,
|
|
84
88
|
],
|
|
85
89
|
// Avoid cross-package imports
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class PackageGraph extends Map {
|
|
4
|
+
static fromPackages(packages) {
|
|
5
|
+
const graph = new PackageGraph();
|
|
6
|
+
for (const pkg of packages) {
|
|
7
|
+
const name = pkg.packageJson.name;
|
|
8
|
+
const existingPkg = graph.get(name);
|
|
9
|
+
if (existingPkg) {
|
|
10
|
+
throw new Error(`Duplicate package name '${name}' at ${pkg.dir} and ${existingPkg.dir}`);
|
|
11
|
+
}
|
|
12
|
+
graph.set(name, {
|
|
13
|
+
name,
|
|
14
|
+
dir: pkg.dir,
|
|
15
|
+
packageJson: pkg.packageJson,
|
|
16
|
+
allLocalDependencies: /* @__PURE__ */ new Map(),
|
|
17
|
+
publishedLocalDependencies: /* @__PURE__ */ new Map(),
|
|
18
|
+
localDependencies: /* @__PURE__ */ new Map(),
|
|
19
|
+
localDevDependencies: /* @__PURE__ */ new Map(),
|
|
20
|
+
localOptionalDependencies: /* @__PURE__ */ new Map()
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
for (const node of graph.values()) {
|
|
24
|
+
for (const depName of Object.keys(node.packageJson.dependencies || {})) {
|
|
25
|
+
const depPkg = graph.get(depName);
|
|
26
|
+
if (depPkg) {
|
|
27
|
+
node.allLocalDependencies.set(depName, depPkg);
|
|
28
|
+
node.publishedLocalDependencies.set(depName, depPkg);
|
|
29
|
+
node.localDependencies.set(depName, depPkg);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
for (const depName of Object.keys(node.packageJson.devDependencies || {})) {
|
|
33
|
+
const depPkg = graph.get(depName);
|
|
34
|
+
if (depPkg) {
|
|
35
|
+
node.allLocalDependencies.set(depName, depPkg);
|
|
36
|
+
node.localDevDependencies.set(depName, depPkg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
for (const depName of Object.keys(node.packageJson.optionalDependencies || {})) {
|
|
40
|
+
const depPkg = graph.get(depName);
|
|
41
|
+
if (depPkg) {
|
|
42
|
+
node.allLocalDependencies.set(depName, depPkg);
|
|
43
|
+
node.publishedLocalDependencies.set(depName, depPkg);
|
|
44
|
+
node.localOptionalDependencies.set(depName, depPkg);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return graph;
|
|
49
|
+
}
|
|
50
|
+
collectPackageNames(startingPackageNames, collectFn) {
|
|
51
|
+
const targets = /* @__PURE__ */ new Set();
|
|
52
|
+
const searchNames = startingPackageNames.slice();
|
|
53
|
+
while (searchNames.length) {
|
|
54
|
+
const name = searchNames.pop();
|
|
55
|
+
if (targets.has(name)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const node = this.get(name);
|
|
59
|
+
if (!node) {
|
|
60
|
+
throw new Error(`Package '${name}' not found`);
|
|
61
|
+
}
|
|
62
|
+
targets.add(name);
|
|
63
|
+
const collected = collectFn(node);
|
|
64
|
+
if (collected) {
|
|
65
|
+
searchNames.push(...collected);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return targets;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.PackageGraph = PackageGraph;
|
|
73
|
+
//# sourceMappingURL=PackageGraph-7a0d3a83.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
3
|
+
var packager = require('./packager-b384ddb4.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-34d6a6a3.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
@@ -37,8 +37,12 @@ var build = async (cmd) => {
|
|
|
37
37
|
} else {
|
|
38
38
|
outputs = /* @__PURE__ */ new Set([packager.Output.types, packager.Output.esm, packager.Output.cjs]);
|
|
39
39
|
}
|
|
40
|
-
await packager.buildPackage({
|
|
40
|
+
await packager.buildPackage({
|
|
41
|
+
outputs,
|
|
42
|
+
minify: cmd.minify,
|
|
43
|
+
useApiExtractor: cmd.experimentalTypeBuild
|
|
44
|
+
});
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
exports["default"] = build;
|
|
44
|
-
//# sourceMappingURL=build-
|
|
48
|
+
//# sourceMappingURL=build-411cb39c.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
3
|
+
var packager = require('./packager-b384ddb4.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-34d6a6a3.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
@@ -26,9 +26,10 @@ require('./svgrTemplate-f19e974c.cjs.js');
|
|
|
26
26
|
var build = async (cmd) => {
|
|
27
27
|
await packager.buildPackage({
|
|
28
28
|
outputs: /* @__PURE__ */ new Set([packager.Output.cjs, packager.Output.types]),
|
|
29
|
-
minify: cmd.minify
|
|
29
|
+
minify: cmd.minify,
|
|
30
|
+
useApiExtractor: cmd.experimentalTypeBuild
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
exports["default"] = build;
|
|
34
|
-
//# sourceMappingURL=build-
|
|
35
|
+
//# sourceMappingURL=build-959e2ffa.cjs.js.map
|
|
@@ -10,28 +10,30 @@ require('react-dev-utils/ModuleScopePlugin');
|
|
|
10
10
|
require('run-script-webpack-plugin');
|
|
11
11
|
require('webpack-node-externals');
|
|
12
12
|
require('@backstage/cli-common');
|
|
13
|
-
require('
|
|
14
|
-
var
|
|
13
|
+
require('@manypkg/get-packages');
|
|
14
|
+
var paths = require('./paths-2c7f6dab.cjs.js');
|
|
15
15
|
require('mini-css-extract-plugin');
|
|
16
|
-
var index = require('./index-
|
|
17
|
-
require('./run-
|
|
16
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
17
|
+
require('./run-596a22b2.cjs.js');
|
|
18
|
+
require('eslint-webpack-plugin');
|
|
18
19
|
require('lodash/pickBy');
|
|
19
20
|
var yn = require('yn');
|
|
20
21
|
var FileSizeReporter = require('react-dev-utils/FileSizeReporter');
|
|
21
22
|
var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
22
|
-
var paths = require('./paths-5901f4e6.cjs.js');
|
|
23
23
|
require('webpack-dev-server');
|
|
24
24
|
require('react-dev-utils/openBrowser');
|
|
25
|
-
var
|
|
25
|
+
var parallel = require('./parallel-7e32a8d0.cjs.js');
|
|
26
|
+
var config = require('./config-199a492f.cjs.js');
|
|
27
|
+
require('./svgrTemplate-f19e974c.cjs.js');
|
|
26
28
|
require('commander');
|
|
27
29
|
require('semver');
|
|
28
30
|
require('@backstage/config/package.json');
|
|
29
31
|
require('@backstage/errors');
|
|
30
32
|
require('child_process');
|
|
31
33
|
require('util');
|
|
32
|
-
require('./svgrTemplate-f19e974c.cjs.js');
|
|
33
34
|
require('@backstage/config-loader');
|
|
34
35
|
require('@backstage/config');
|
|
36
|
+
require('./PackageGraph-7a0d3a83.cjs.js');
|
|
35
37
|
|
|
36
38
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
37
39
|
|
|
@@ -122,9 +124,6 @@ async function build$1(compiler, isCi) {
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
var build = async (cmd) => {
|
|
125
|
-
if (cmd.lax) {
|
|
126
|
-
console.warn(chalk__default["default"].yellow(`[DEPRECATED] - The --lax option is deprecated and will be removed in the future. Please open an issue towards https://github.com/backstage/backstage that describes your use-case if you need the flag to stay around.`));
|
|
127
|
-
}
|
|
128
127
|
const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
|
|
129
128
|
await buildBundle({
|
|
130
129
|
entry: "src/index",
|
|
@@ -132,11 +131,10 @@ var build = async (cmd) => {
|
|
|
132
131
|
statsJsonEnabled: cmd.stats,
|
|
133
132
|
...await config.loadCliConfig({
|
|
134
133
|
args: cmd.config,
|
|
135
|
-
fromPackage: name
|
|
136
|
-
mockEnv: cmd.lax
|
|
134
|
+
fromPackage: name
|
|
137
135
|
})
|
|
138
136
|
});
|
|
139
137
|
};
|
|
140
138
|
|
|
141
139
|
exports["default"] = build;
|
|
142
|
-
//# sourceMappingURL=build-
|
|
140
|
+
//# sourceMappingURL=build-b4301c17.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('./packager-
|
|
3
|
+
var packager = require('./packager-b384ddb4.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-34d6a6a3.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('semver');
|
|
11
11
|
require('@backstage/cli-common');
|
|
@@ -26,9 +26,10 @@ require('./svgrTemplate-f19e974c.cjs.js');
|
|
|
26
26
|
var build = async (cmd) => {
|
|
27
27
|
await packager.buildPackage({
|
|
28
28
|
outputs: /* @__PURE__ */ new Set([packager.Output.esm, packager.Output.types]),
|
|
29
|
-
minify: cmd.minify
|
|
29
|
+
minify: cmd.minify,
|
|
30
|
+
useApiExtractor: cmd.experimentalTypeBuild
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
exports["default"] = build;
|
|
34
|
-
//# sourceMappingURL=build-
|
|
35
|
+
//# sourceMappingURL=build-c7b2ea88.cjs.js.map
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-de296eda.cjs.js');
|
|
5
5
|
require('path');
|
|
6
6
|
require('os');
|
|
7
7
|
require('tar');
|
|
8
|
-
require('./index-
|
|
8
|
+
require('./index-34d6a6a3.cjs.js');
|
|
9
9
|
require('commander');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('semver');
|
|
12
12
|
require('@backstage/cli-common');
|
|
13
13
|
require('@backstage/config/package.json');
|
|
14
14
|
require('@backstage/errors');
|
|
15
|
-
require('./run-
|
|
15
|
+
require('./run-596a22b2.cjs.js');
|
|
16
16
|
require('child_process');
|
|
17
17
|
require('util');
|
|
18
|
+
require('@manypkg/get-packages');
|
|
19
|
+
require('./PackageGraph-7a0d3a83.cjs.js');
|
|
18
20
|
|
|
19
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
22
|
|
|
@@ -30,4 +32,4 @@ var buildWorkspace = async (dir, _cmd, packages) => {
|
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
exports["default"] = buildWorkspace;
|
|
33
|
-
//# sourceMappingURL=buildWorkspace-
|
|
35
|
+
//# sourceMappingURL=buildWorkspace-df8a4418.cjs.js.map
|
|
@@ -6,17 +6,18 @@ var semver = require('semver');
|
|
|
6
6
|
var minimatch = require('minimatch');
|
|
7
7
|
var errors = require('@backstage/errors');
|
|
8
8
|
var path = require('path');
|
|
9
|
-
var run = require('./run-
|
|
10
|
-
var index = require('./index-
|
|
9
|
+
var run = require('./run-596a22b2.cjs.js');
|
|
10
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
11
11
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
12
|
-
var packages = require('./packages-
|
|
13
|
-
var lint = require('./lint-
|
|
12
|
+
var packages = require('./packages-deee570e.cjs.js');
|
|
13
|
+
var lint = require('./lint-90b05512.cjs.js');
|
|
14
14
|
var cliCommon = require('@backstage/cli-common');
|
|
15
15
|
require('child_process');
|
|
16
16
|
require('util');
|
|
17
17
|
require('commander');
|
|
18
18
|
require('@backstage/config/package.json');
|
|
19
19
|
require('@yarnpkg/lockfile');
|
|
20
|
+
require('@manypkg/get-packages');
|
|
20
21
|
require('lodash/partition');
|
|
21
22
|
|
|
22
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -236,4 +237,4 @@ async function workerThreads(count, items, fn) {
|
|
|
236
237
|
|
|
237
238
|
exports.bumpBackstageJsonVersion = bumpBackstageJsonVersion;
|
|
238
239
|
exports["default"] = bump;
|
|
239
|
-
//# sourceMappingURL=bump-
|
|
240
|
+
//# sourceMappingURL=bump-d7017b61.cjs.js.map
|
|
@@ -4,14 +4,16 @@ var os = require('os');
|
|
|
4
4
|
var fs = require('fs-extra');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var tar = require('tar');
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var parallel = require('./parallel-
|
|
10
|
-
var packager = require('./packager-
|
|
11
|
-
require('./run-
|
|
7
|
+
var index$1 = require('./index-de296eda.cjs.js');
|
|
8
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
9
|
+
var parallel = require('./parallel-7e32a8d0.cjs.js');
|
|
10
|
+
var packager = require('./packager-b384ddb4.cjs.js');
|
|
11
|
+
require('./run-596a22b2.cjs.js');
|
|
12
12
|
require('child_process');
|
|
13
13
|
require('util');
|
|
14
14
|
require('@backstage/errors');
|
|
15
|
+
require('@manypkg/get-packages');
|
|
16
|
+
require('./PackageGraph-7a0d3a83.cjs.js');
|
|
15
17
|
require('commander');
|
|
16
18
|
require('chalk');
|
|
17
19
|
require('semver');
|
|
@@ -67,4 +69,4 @@ var bundle = async (cmd) => {
|
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
exports["default"] = bundle;
|
|
70
|
-
//# sourceMappingURL=bundle-
|
|
72
|
+
//# sourceMappingURL=bundle-a12319b7.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-34d6a6a3.cjs.js');
|
|
5
5
|
require('commander');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('semver');
|
|
@@ -20,4 +20,4 @@ async function clean() {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
exports["default"] = clean;
|
|
23
|
-
//# sourceMappingURL=clean-
|
|
23
|
+
//# sourceMappingURL=clean-5638771f.cjs.js.map
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var configLoader = require('@backstage/config-loader');
|
|
4
4
|
var config = require('@backstage/config');
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
6
|
+
var getPackages = require('@manypkg/get-packages');
|
|
7
|
+
var PackageGraph = require('./PackageGraph-7a0d3a83.cjs.js');
|
|
6
8
|
|
|
7
9
|
function isValidUrl(url) {
|
|
8
10
|
try {
|
|
@@ -20,18 +22,22 @@ async function loadCliConfig(options) {
|
|
|
20
22
|
configTargets.push({ path: index.paths.resolveTarget(arg) });
|
|
21
23
|
}
|
|
22
24
|
});
|
|
23
|
-
const {
|
|
24
|
-
const project = new Project(index.paths.targetDir);
|
|
25
|
-
const packages = await project.getPackages();
|
|
25
|
+
const { packages } = await getPackages.getPackages(index.paths.targetDir);
|
|
26
26
|
let localPackageNames;
|
|
27
27
|
if (options.fromPackage) {
|
|
28
28
|
if (packages.length) {
|
|
29
|
-
|
|
29
|
+
const graph = PackageGraph.PackageGraph.fromPackages(packages);
|
|
30
|
+
localPackageNames = Array.from(graph.collectPackageNames([options.fromPackage], (node) => {
|
|
31
|
+
if (node.name === "@backstage/cli") {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
return node.localDependencies.keys();
|
|
35
|
+
}));
|
|
30
36
|
} else {
|
|
31
37
|
localPackageNames = [options.fromPackage];
|
|
32
38
|
}
|
|
33
39
|
} else {
|
|
34
|
-
localPackageNames = packages.map((p) => p.name);
|
|
40
|
+
localPackageNames = packages.map((p) => p.packageJson.name);
|
|
35
41
|
}
|
|
36
42
|
const schema = await configLoader.loadConfigSchema({
|
|
37
43
|
dependencies: localPackageNames,
|
|
@@ -47,7 +53,8 @@ async function loadCliConfig(options) {
|
|
|
47
53
|
try {
|
|
48
54
|
const frontendAppConfigs = schema.process(appConfigs, {
|
|
49
55
|
visibility: options.fullVisibility ? ["frontend", "backend", "secret"] : ["frontend"],
|
|
50
|
-
withFilteredKeys: options.withFilteredKeys
|
|
56
|
+
withFilteredKeys: options.withFilteredKeys,
|
|
57
|
+
withDeprecatedKeys: options.withDeprecatedKeys
|
|
51
58
|
});
|
|
52
59
|
const frontendConfig = config.ConfigReader.fromConfigs(frontendAppConfigs);
|
|
53
60
|
return {
|
|
@@ -67,27 +74,6 @@ async function loadCliConfig(options) {
|
|
|
67
74
|
throw error;
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
|
-
function findPackages(packages, fromPackage) {
|
|
71
|
-
const { PackageGraph } = require("@lerna/package-graph");
|
|
72
|
-
const graph = new PackageGraph(packages);
|
|
73
|
-
const targets = /* @__PURE__ */ new Set();
|
|
74
|
-
const searchNames = [fromPackage];
|
|
75
|
-
while (searchNames.length) {
|
|
76
|
-
const name = searchNames.pop();
|
|
77
|
-
if (targets.has(name)) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const node = graph.get(name);
|
|
81
|
-
if (!node) {
|
|
82
|
-
throw new Error(`Package '${name}' not found`);
|
|
83
|
-
}
|
|
84
|
-
targets.add(name);
|
|
85
|
-
if (name !== "@backstage/cli") {
|
|
86
|
-
searchNames.push(...node.localDependencies.keys());
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return Array.from(targets);
|
|
90
|
-
}
|
|
91
77
|
|
|
92
78
|
exports.loadCliConfig = loadCliConfig;
|
|
93
|
-
//# sourceMappingURL=config-
|
|
79
|
+
//# sourceMappingURL=config-199a492f.cjs.js.map
|
|
@@ -7,11 +7,12 @@ var chalk = require('chalk');
|
|
|
7
7
|
var inquirer = require('inquirer');
|
|
8
8
|
var camelCase = require('lodash/camelCase');
|
|
9
9
|
var upperFirst = require('lodash/upperFirst');
|
|
10
|
-
var index = require('./index-
|
|
11
|
-
var tasks = require('./tasks-
|
|
10
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
11
|
+
var tasks = require('./tasks-47ef8136.cjs.js');
|
|
12
12
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
13
13
|
require('minimatch');
|
|
14
|
-
require('
|
|
14
|
+
require('@manypkg/get-packages');
|
|
15
|
+
require('./run-596a22b2.cjs.js');
|
|
15
16
|
var partition = require('lodash/partition');
|
|
16
17
|
var errors = require('@backstage/errors');
|
|
17
18
|
require('commander');
|
|
@@ -481,4 +482,4 @@ var create = async (cmd) => {
|
|
|
481
482
|
};
|
|
482
483
|
|
|
483
484
|
exports["default"] = create;
|
|
484
|
-
//# sourceMappingURL=create-
|
|
485
|
+
//# sourceMappingURL=create-db02de74.cjs.js.map
|
|
@@ -10,11 +10,12 @@ var camelCase = require('lodash/camelCase');
|
|
|
10
10
|
var upperFirst = require('lodash/upperFirst');
|
|
11
11
|
var os = require('os');
|
|
12
12
|
var errors = require('@backstage/errors');
|
|
13
|
-
var tasks = require('./tasks-
|
|
14
|
-
var index = require('./index-
|
|
13
|
+
var tasks = require('./tasks-47ef8136.cjs.js');
|
|
14
|
+
var index = require('./index-34d6a6a3.cjs.js');
|
|
15
15
|
var Lockfile = require('./Lockfile-35661afa.cjs.js');
|
|
16
16
|
require('minimatch');
|
|
17
|
-
require('
|
|
17
|
+
require('@manypkg/get-packages');
|
|
18
|
+
require('./run-596a22b2.cjs.js');
|
|
18
19
|
require('handlebars');
|
|
19
20
|
require('ora');
|
|
20
21
|
require('recursive-readdir');
|
|
@@ -233,4 +234,4 @@ exports.addPluginExtensionToApp = addPluginExtensionToApp;
|
|
|
233
234
|
exports.capitalize = capitalize;
|
|
234
235
|
exports["default"] = createPlugin;
|
|
235
236
|
exports.movePlugin = movePlugin;
|
|
236
|
-
//# sourceMappingURL=createPlugin-
|
|
237
|
+
//# sourceMappingURL=createPlugin-10786f3f.cjs.js.map
|