@backstage/cli 0.30.0-next.3 → 0.30.1-next.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 +78 -0
- package/dist/commands/index.cjs.js +11 -83
- package/dist/commands/pack.cjs.js +1 -1
- package/dist/commands/start/command.cjs.js +26 -0
- package/dist/commands/start/startFrontend.cjs.js +4 -4
- package/dist/lib/new/execution/installNewPackage.cjs.js +4 -4
- package/dist/{commands → modules/build/commands/package}/build/command.cjs.js +7 -7
- package/dist/{commands → modules/build/commands}/repo/build.cjs.js +5 -5
- package/dist/modules/build/index.cjs.js +52 -0
- package/dist/{commands/build → modules/build/lib}/buildBackend.cjs.js +4 -4
- package/dist/{commands/build → modules/build/lib}/buildFrontend.cjs.js +9 -9
- package/dist/{lib → modules/build/lib}/builder/config.cjs.js +3 -3
- package/dist/{lib → modules/build/lib}/builder/packager.cjs.js +2 -2
- package/dist/{lib → modules/build/lib}/bundler/config.cjs.js +4 -4
- package/dist/{lib → modules/build/lib}/bundler/hasReactDomClient.cjs.js +1 -1
- package/dist/{lib → modules/build/lib}/bundler/linkWorkspaces.cjs.js +1 -1
- package/dist/{lib → modules/build/lib}/bundler/moduleFederation.cjs.js +2 -2
- package/dist/{lib → modules/build/lib}/bundler/packageDetection.cjs.js +1 -1
- package/dist/{lib → modules/build/lib}/bundler/paths.cjs.js +1 -1
- package/dist/{lib → modules/build/lib}/bundler/server.cjs.js +2 -2
- package/dist/{lib → modules/build/lib}/bundler/transforms.cjs.js +1 -1
- package/dist/{lib → modules/build/lib}/packager/createDistWorkspace.cjs.js +5 -5
- package/dist/{lib → modules/build/lib}/packager/productionPack.cjs.js +2 -2
- package/dist/{commands → modules/info/commands}/info.cjs.js +5 -5
- package/dist/modules/info/index.cjs.js +10 -0
- package/dist/{commands/migrate → modules/migrate/commands}/packageExports.cjs.js +1 -1
- package/dist/{commands/migrate → modules/migrate/commands}/packageLintConfigs.cjs.js +1 -1
- package/dist/{commands/migrate → modules/migrate/commands}/packageRole.cjs.js +1 -1
- package/dist/{commands → modules/migrate/commands}/versions/bump.cjs.js +6 -6
- package/dist/{commands → modules/migrate/commands}/versions/migrate.cjs.js +1 -1
- package/dist/modules/migrate/index.cjs.js +36 -0
- package/dist/{commands/versions → modules/migrate/lib}/utils.cjs.js +1 -1
- package/dist/{commands → modules/test/commands/package}/test.cjs.js +2 -2
- package/dist/{commands → modules/test/commands}/repo/test.cjs.js +3 -3
- package/dist/modules/test/index.cjs.js +26 -0
- package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
- package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
- package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
- package/dist/packages/cli/package.json.cjs.js +2 -2
- package/dist/packages/core-app-api/package.json.cjs.js +1 -1
- package/dist/packages/core-components/package.json.cjs.js +1 -1
- package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
- package/dist/packages/dev-utils/package.json.cjs.js +1 -1
- package/dist/packages/test-utils/package.json.cjs.js +1 -1
- package/dist/packages/theme/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
- package/package.json +17 -17
- /package/dist/{commands → modules/build/commands}/buildWorkspace.cjs.js +0 -0
- /package/dist/{commands → modules/build/commands/package}/build/index.cjs.js +0 -0
- /package/dist/{lib → modules/build/lib}/builder/plugins.cjs.js +0 -0
- /package/dist/{lib → modules/build/lib}/builder/types.cjs.js +0 -0
- /package/dist/{lib → modules/build/lib}/bundler/ConfigInjectingHtmlWebpackPlugin.cjs.js +0 -0
- /package/dist/{lib → modules/build/lib}/bundler/bundle.cjs.js +0 -0
- /package/dist/{lib → modules/build/lib}/bundler/optimization.cjs.js +0 -0
- /package/dist/{commands/migrate → modules/migrate/commands}/packageScripts.cjs.js +0 -0
- /package/dist/{commands/migrate → modules/migrate/commands}/reactRouterDeps.cjs.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
# @backstage/cli
|
|
2
2
|
|
|
3
|
+
## 0.30.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0586d4c: Internal change to move the `migrate` and `version:*` commands into a new migrate module.
|
|
8
|
+
- 485b3ba: Internal update to move `test` commands to a separate module.
|
|
9
|
+
- 8df78bf: Internal update to move build commands to a CLI module.
|
|
10
|
+
- d0fc357: Internal update to move `info` commands to a separate module.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/catalog-model@1.7.3
|
|
13
|
+
- @backstage/cli-common@0.1.15
|
|
14
|
+
- @backstage/cli-node@0.2.13
|
|
15
|
+
- @backstage/config@1.3.2
|
|
16
|
+
- @backstage/config-loader@1.9.6
|
|
17
|
+
- @backstage/errors@1.2.7
|
|
18
|
+
- @backstage/eslint-plugin@0.1.10
|
|
19
|
+
- @backstage/integration@1.16.1
|
|
20
|
+
- @backstage/release-manifests@0.0.12
|
|
21
|
+
- @backstage/types@1.2.1
|
|
22
|
+
|
|
23
|
+
## 0.30.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- cb76663: **BREAKING**: Add support for native ESM in Node.js code. This changes the behavior of dynamic import expressions in Node.js code. Typically this can be fixed by replacing `import(...)` with `require(...)`, with an `as typeof import(...)` cast if needed for types. This is because dynamic imports will no longer be transformed to `require(...)` calls, but instead be left as-is. This in turn allows you to load ESM modules from CommonJS code using `import(...)`.
|
|
28
|
+
|
|
29
|
+
This change adds support for the following in Node.js packages, across type checking, package builds, runtime transforms and Jest tests:
|
|
30
|
+
|
|
31
|
+
- Dynamic imports that load ESM modules from CommonJS code.
|
|
32
|
+
- Both `.mjs` and `.mts` files as explicit ESM files, as well as `.cjs` and `.cts` as explicit CommonJS files.
|
|
33
|
+
- Support for the `"type": "module"` field in `package.json` to indicate that the package is an ESM package.
|
|
34
|
+
|
|
35
|
+
There are a few caveats to be aware of:
|
|
36
|
+
|
|
37
|
+
- To enable support for native ESM in tests, you need to run the tests with the `--experimental-vm-modules` flag enabled, typically via `NODE_OPTIONS='--experimental-vm-modules'`.
|
|
38
|
+
- Declaring a package as `"type": "module"` in `package.json` is supported, but in tests it will cause all local transitive dependencies to also be treated as ESM, regardless of whether they declare `"type": "module"` or not.
|
|
39
|
+
- Node.js has an [ESM interoperability layer with CommonJS](https://nodejs.org/docs/latest-v22.x/api/esm.html#interoperability-with-commonjs) that allows for imports from ESM to identify named exports in CommonJS packages. This interoperability layer is **only** enabled when importing packages with a `.cts` or `.cjs` extension. This is because the interoperability layer is not fully compatible with the NPM ecosystem, and would break package if it was enabled for `.js` files.
|
|
40
|
+
- Dynamic imports of CommonJS packages will vary in shape depending on the runtime, i.e. test vs local development, etc. It is therefore recommended to avoid dynamic imports of CommonJS packages and instead use `require`, or to use the explicit CommonJS extensions as mentioned above. If you do need to dynamically import CommonJS packages, avoid using `default` exports, as the shape of them vary across different environments and you would otherwise need to manually unwrap the import based on the shape of the module object.
|
|
41
|
+
|
|
42
|
+
- b30e788: The `new` command is now powered by a new template system that allows you to define your own templates in a declarative way, as well as import existing templates from external sources. See the [CLI templates documentation](https://backstage.io/docs/tooling/cli/templates) for more information.
|
|
43
|
+
|
|
44
|
+
The following flags for the `new` command have been deprecated and will be removed in a future release:
|
|
45
|
+
|
|
46
|
+
- `--license=<license>`: Configure the global `license` instead.
|
|
47
|
+
- `--no-private`: Configure the global `private` instead.
|
|
48
|
+
- `--baseVersion=<version>`: Configure the global `version` instead.
|
|
49
|
+
- `--npmRegistry=<url>`: Configure the global `publishRegistry` instead.
|
|
50
|
+
- `--scope=<scope>`: Configure the global `namePrefix` and/or `namePluginInfix` instead.
|
|
51
|
+
|
|
52
|
+
As part of this change the template IDs and their options have changed. The following backwards compatibility mappings for the `--select` and `--option` flags are enabled when using the default set of templates, but they will also be removed in the future:
|
|
53
|
+
|
|
54
|
+
- `--select=plugin` is mapped to `--select=frontend-plugin` instead.
|
|
55
|
+
- `--option=id=<id>` is mapped to `--option=pluginId=<id>` instead.
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- f17ef61: The `versions:bump` command will now reject `*` as a pattern.
|
|
60
|
+
- 86c72c1: The packing process when running `build-workspace` with the `--alwaysYarnPack` flag now respects the `BACKSTAGE_CLI_BUILD_PARALLEL` environment variable, defaulting parallel work limits based on CPU availability.
|
|
61
|
+
- 2167afc: Treat static file assets as always being free from side effects in package builds.
|
|
62
|
+
- f54eed0: Fixed an issue where default feature type information wasn't being added to package.json/exports before publishing if exports didn't exist beforehand
|
|
63
|
+
- 90a1edf: Add check to make sure that the `--link` option for the `start` command is a valid workspace.
|
|
64
|
+
- 207f88f: Fixed the file path pattern of many static assets output as part of the frontend build process, where there was an extra `.` before the extension, leading to names like `image-af7946b..png`.
|
|
65
|
+
- 9638f6d: Only allow pass through of `.mjs` in Jest transform if static ESM is supported.
|
|
66
|
+
- 9d49e04: Replaced dependency `node-libs-browser` with `node-stdlib-browser`
|
|
67
|
+
- 2c14147: Corrected path when trying to add dependency to respective `package.json` when using `yarn new` templates
|
|
68
|
+
- f21b125: Ensure that both global-agent and undici agents are enabled when proxying is enabled.
|
|
69
|
+
- Updated dependencies
|
|
70
|
+
- @backstage/cli-node@0.2.13
|
|
71
|
+
- @backstage/config-loader@1.9.6
|
|
72
|
+
- @backstage/catalog-model@1.7.3
|
|
73
|
+
- @backstage/cli-common@0.1.15
|
|
74
|
+
- @backstage/config@1.3.2
|
|
75
|
+
- @backstage/errors@1.2.7
|
|
76
|
+
- @backstage/eslint-plugin@0.1.10
|
|
77
|
+
- @backstage/integration@1.16.1
|
|
78
|
+
- @backstage/release-manifests@0.0.12
|
|
79
|
+
- @backstage/types@1.2.1
|
|
80
|
+
|
|
3
81
|
## 0.30.0-next.3
|
|
4
82
|
|
|
5
83
|
### Minor Changes
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var commander = require('commander');
|
|
4
3
|
var lazy = require('../lib/lazy.cjs.js');
|
|
5
4
|
var index = require('../modules/config/index.cjs.js');
|
|
5
|
+
var index$2 = require('../modules/build/index.cjs.js');
|
|
6
|
+
var index$3 = require('../modules/info/index.cjs.js');
|
|
7
|
+
var index$1 = require('../modules/migrate/index.cjs.js');
|
|
8
|
+
var index$4 = require('../modules/test/index.cjs.js');
|
|
6
9
|
|
|
7
10
|
function registerRepoCommand(program) {
|
|
8
11
|
const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
).option(
|
|
12
|
-
"--all",
|
|
13
|
-
"Build all packages, including bundled app and backend packages."
|
|
14
|
-
).option(
|
|
15
|
-
"--since <ref>",
|
|
16
|
-
"Only build packages and their dev dependents that changed since the specified ref"
|
|
17
|
-
).option(
|
|
18
|
-
"--minify",
|
|
19
|
-
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
20
|
-
).action(lazy.lazy(() => import('./repo/build.cjs.js'), "command"));
|
|
12
|
+
index$2.registerRepoCommands(command);
|
|
13
|
+
index$4.registerRepoCommands(command);
|
|
21
14
|
command.command("lint").description("Lint all packages in the project").option(
|
|
22
15
|
"--format <format>",
|
|
23
16
|
"Lint report output format",
|
|
@@ -44,19 +37,6 @@ function registerRepoCommand(program) {
|
|
|
44
37
|
).action(lazy.lazy(() => import('./repo/fix.cjs.js'), "command"));
|
|
45
38
|
command.command("clean").description("Delete cache and output directories").action(lazy.lazy(() => import('./repo/clean.cjs.js'), "command"));
|
|
46
39
|
command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(lazy.lazy(() => import('./repo/list-deprecations.cjs.js'), "command"));
|
|
47
|
-
command.command("test").allowUnknownOption(true).option(
|
|
48
|
-
"--since <ref>",
|
|
49
|
-
"Only test packages that changed since the specified ref"
|
|
50
|
-
).option(
|
|
51
|
-
"--successCache",
|
|
52
|
-
"Enable success caching, which skips running tests for unchanged packages that were successful in the previous run"
|
|
53
|
-
).option(
|
|
54
|
-
"--successCacheDir <path>",
|
|
55
|
-
"Set the success cache location, (default: node_modules/.cache/backstage-cli)"
|
|
56
|
-
).option(
|
|
57
|
-
"--jest-help",
|
|
58
|
-
"Show help for Jest CLI options, which are passed through"
|
|
59
|
-
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => import('./repo/test.cjs.js'), "command"));
|
|
60
40
|
}
|
|
61
41
|
function registerScriptCommand(program) {
|
|
62
42
|
const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
|
|
@@ -64,21 +44,8 @@ function registerScriptCommand(program) {
|
|
|
64
44
|
"--inspect-brk [host]",
|
|
65
45
|
"Enable debugger in Node.js environments, breaking before code starts"
|
|
66
46
|
).option("--require <path>", "Add a --require argument to the node process").option("--link <path>", "Link an external workspace for module resolution").action(lazy.lazy(() => import('./start/index.cjs.js'), "command"));
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
70
|
-
).option(
|
|
71
|
-
"--skip-build-dependencies",
|
|
72
|
-
"Skip the automatic building of local dependencies. Applies to backend packages only."
|
|
73
|
-
).option(
|
|
74
|
-
"--stats",
|
|
75
|
-
"If bundle stats are available, write them to the output directory. Applies to app packages only."
|
|
76
|
-
).option(
|
|
77
|
-
"--config <path>",
|
|
78
|
-
"Config files to load instead of app-config.yaml. Applies to app packages only.",
|
|
79
|
-
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
80
|
-
Array()
|
|
81
|
-
).action(lazy.lazy(() => import('./build/index.cjs.js'), "command"));
|
|
47
|
+
index$2.registerPackageCommands(command);
|
|
48
|
+
index$4.registerPackageCommands(command);
|
|
82
49
|
command.command("lint [directories...]").option(
|
|
83
50
|
"--format <format>",
|
|
84
51
|
"Lint report output format",
|
|
@@ -90,23 +57,10 @@ function registerScriptCommand(program) {
|
|
|
90
57
|
"--max-warnings <number>",
|
|
91
58
|
"Fail if more than this number of warnings. -1 allows warnings. (default: 0)"
|
|
92
59
|
).description("Lint a package").action(lazy.lazy(() => import('./lint.cjs.js'), "default"));
|
|
93
|
-
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => import('./test.cjs.js'), "default"));
|
|
94
60
|
command.command("clean").description("Delete cache directories").action(lazy.lazy(() => import('./clean/clean.cjs.js'), "default"));
|
|
95
61
|
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy.lazy(() => import('./pack.cjs.js'), "pre"));
|
|
96
62
|
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy.lazy(() => import('./pack.cjs.js'), "post"));
|
|
97
63
|
}
|
|
98
|
-
function registerMigrateCommand(program) {
|
|
99
|
-
const command = program.command("migrate [command]").description("Migration utilities");
|
|
100
|
-
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy.lazy(() => import('./migrate/packageRole.cjs.js'), "default"));
|
|
101
|
-
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy.lazy(() => import('./migrate/packageScripts.cjs.js'), "command"));
|
|
102
|
-
command.command("package-exports").description("Synchronize package subpath export definitions").action(lazy.lazy(() => import('./migrate/packageExports.cjs.js'), "command"));
|
|
103
|
-
command.command("package-lint-configs").description(
|
|
104
|
-
"Migrates all packages to use @backstage/cli/config/eslint-factory"
|
|
105
|
-
).action(lazy.lazy(() => import('./migrate/packageLintConfigs.cjs.js'), "command"));
|
|
106
|
-
command.command("react-router-deps").description(
|
|
107
|
-
"Migrates the react-router dependencies for all packages to be peer dependencies"
|
|
108
|
-
).action(lazy.lazy(() => import('./migrate/reactRouterDeps.cjs.js'), "command"));
|
|
109
|
-
}
|
|
110
64
|
function registerCommands(program) {
|
|
111
65
|
program.command("new").storeOptionsAsProperties(false).description(
|
|
112
66
|
"Open up an interactive guide to creating new things in your app"
|
|
@@ -134,35 +88,10 @@ function registerCommands(program) {
|
|
|
134
88
|
index.registerCommands(program);
|
|
135
89
|
registerRepoCommand(program);
|
|
136
90
|
registerScriptCommand(program);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"Override glob for matching packages to upgrade"
|
|
141
|
-
).option(
|
|
142
|
-
"--release <version|next|main>",
|
|
143
|
-
"Bump to a specific Backstage release line or version",
|
|
144
|
-
"main"
|
|
145
|
-
).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy.lazy(() => import('./versions/bump.cjs.js'), "default"));
|
|
146
|
-
program.command("versions:migrate").option(
|
|
147
|
-
"--pattern <glob>",
|
|
148
|
-
"Override glob for matching packages to upgrade"
|
|
149
|
-
).option(
|
|
150
|
-
"--skip-code-changes",
|
|
151
|
-
"Skip code changes and only update package.json files"
|
|
152
|
-
).description(
|
|
153
|
-
"Migrate any plugins that have been moved to the @backstage-community namespace automatically"
|
|
154
|
-
).action(lazy.lazy(() => import('./versions/migrate.cjs.js'), "default"));
|
|
155
|
-
program.command("build-workspace <workspace-dir> [packages...]").addOption(
|
|
156
|
-
new commander.Option(
|
|
157
|
-
"--alwaysYarnPack",
|
|
158
|
-
"Alias for --alwaysPack for backwards compatibility."
|
|
159
|
-
).implies({ alwaysPack: true }).hideHelp(true)
|
|
160
|
-
).option(
|
|
161
|
-
"--alwaysPack",
|
|
162
|
-
"Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
|
|
163
|
-
).description("Builds a temporary dist workspace from the provided packages").action(lazy.lazy(() => import('./buildWorkspace.cjs.js'), "default"));
|
|
91
|
+
index$1.registerCommands(program);
|
|
92
|
+
index$2.registerCommands(program);
|
|
93
|
+
index$3.registerCommands(program);
|
|
164
94
|
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy.lazy(() => import('./create-github-app/index.cjs.js'), "default"));
|
|
165
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy.lazy(() => import('./info.cjs.js'), "default"));
|
|
166
95
|
program.command("create").allowUnknownOption(true).action(removed("use 'backstage-cli new' instead"));
|
|
167
96
|
program.command("create-plugin").allowUnknownOption(true).action(removed("use 'backstage-cli new' instead"));
|
|
168
97
|
program.command("plugin:diff").allowUnknownOption(true).action(removed("use 'backstage-cli fix' instead"));
|
|
@@ -186,7 +115,6 @@ function removed(message) {
|
|
|
186
115
|
}
|
|
187
116
|
|
|
188
117
|
exports.registerCommands = registerCommands;
|
|
189
|
-
exports.registerMigrateCommand = registerMigrateCommand;
|
|
190
118
|
exports.registerRepoCommand = registerRepoCommand;
|
|
191
119
|
exports.registerScriptCommand = registerScriptCommand;
|
|
192
120
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var productionPack = require('../lib/packager/productionPack.cjs.js');
|
|
3
|
+
var productionPack = require('../modules/build/lib/packager/productionPack.cjs.js');
|
|
4
4
|
var paths = require('../lib/paths.cjs.js');
|
|
5
5
|
var fs = require('fs-extra');
|
|
6
6
|
var publishing = require('../lib/publishing.cjs.js');
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var fs = require('fs-extra');
|
|
4
|
+
var node_path = require('node:path');
|
|
3
5
|
var role = require('../../lib/role.cjs.js');
|
|
4
6
|
var startBackend = require('./startBackend.cjs.js');
|
|
5
7
|
var startFrontend = require('./startFrontend.cjs.js');
|
|
8
|
+
var errors = require('@backstage/errors');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
6
13
|
|
|
7
14
|
async function command(opts) {
|
|
8
15
|
const role$1 = await role.findRoleFromCommand(opts);
|
|
16
|
+
if (opts.link) {
|
|
17
|
+
const dir = node_path.resolve(opts.link);
|
|
18
|
+
if (!fs__default.default.pathExistsSync(dir)) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
`Invalid workspace link, directory does not exist: ${dir}`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
const pkgJson = await fs__default.default.readJson(node_path.resolve(dir, "package.json")).catch((error) => {
|
|
24
|
+
throw new errors.ForwardedError(
|
|
25
|
+
"Failed to read package.json in linked workspace",
|
|
26
|
+
error
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
if (!pkgJson.workspaces) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`Invalid workspace link, directory is not a workspace: ${dir}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
9
35
|
const options = {
|
|
10
36
|
configPaths: opts.config,
|
|
11
37
|
checksEnabled: Boolean(opts.check),
|
|
@@ -14,15 +14,15 @@ require('@module-federation/enhanced/webpack');
|
|
|
14
14
|
require('react-dev-utils/ModuleScopePlugin');
|
|
15
15
|
require('@pmmmwh/react-refresh-webpack-plugin');
|
|
16
16
|
var paths = require('../../lib/paths.cjs.js');
|
|
17
|
-
require('../../lib/bundler/optimization.cjs.js');
|
|
17
|
+
require('../../modules/build/lib/bundler/optimization.cjs.js');
|
|
18
18
|
require('lodash/pickBy');
|
|
19
19
|
require('../../lib/run.cjs.js');
|
|
20
20
|
require('mini-css-extract-plugin');
|
|
21
21
|
require('../../lib/version.cjs.js');
|
|
22
22
|
require('@manypkg/get-packages');
|
|
23
|
-
require('../../lib/bundler/packageDetection.cjs.js');
|
|
24
|
-
var moduleFederation = require('../../lib/bundler/moduleFederation.cjs.js');
|
|
25
|
-
var server = require('../../lib/bundler/server.cjs.js');
|
|
23
|
+
require('../../modules/build/lib/bundler/packageDetection.cjs.js');
|
|
24
|
+
var moduleFederation = require('../../modules/build/lib/bundler/moduleFederation.cjs.js');
|
|
25
|
+
var server = require('../../modules/build/lib/bundler/server.cjs.js');
|
|
26
26
|
|
|
27
27
|
async function startFrontend(options) {
|
|
28
28
|
const packageJson = await fs.readJson(
|
|
@@ -23,18 +23,18 @@ async function installNewPackage(input) {
|
|
|
23
23
|
return;
|
|
24
24
|
// No installation action needed for library packages
|
|
25
25
|
case "frontend-plugin":
|
|
26
|
-
await addDependency(input, "
|
|
26
|
+
await addDependency(input, "packages/app/package.json");
|
|
27
27
|
await tryAddFrontendLegacy(input);
|
|
28
28
|
return;
|
|
29
29
|
case "frontend-plugin-module":
|
|
30
|
-
await addDependency(input, "
|
|
30
|
+
await addDependency(input, "packages/app/package.json");
|
|
31
31
|
return;
|
|
32
32
|
case "backend-plugin":
|
|
33
|
-
await addDependency(input, "
|
|
33
|
+
await addDependency(input, "packages/backend/package.json");
|
|
34
34
|
await tryAddBackend(input);
|
|
35
35
|
return;
|
|
36
36
|
case "backend-plugin-module":
|
|
37
|
-
await addDependency(input, "
|
|
37
|
+
await addDependency(input, "packages/backend/package.json");
|
|
38
38
|
await tryAddBackend(input);
|
|
39
39
|
return;
|
|
40
40
|
default:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var packager = require('
|
|
4
|
-
var types = require('
|
|
5
|
-
var role = require('
|
|
3
|
+
var packager = require('../../../lib/builder/packager.cjs.js');
|
|
4
|
+
var types = require('../../../lib/builder/types.cjs.js');
|
|
5
|
+
var role = require('../../../../../lib/role.cjs.js');
|
|
6
6
|
var cliNode = require('@backstage/cli-node');
|
|
7
|
-
var paths = require('
|
|
8
|
-
var buildFrontend = require('
|
|
9
|
-
var buildBackend = require('
|
|
10
|
-
var urls = require('
|
|
7
|
+
var paths = require('../../../../../lib/paths.cjs.js');
|
|
8
|
+
var buildFrontend = require('../../../lib/buildFrontend.cjs.js');
|
|
9
|
+
var buildBackend = require('../../../lib/buildBackend.cjs.js');
|
|
10
|
+
var urls = require('../../../../../lib/urls.cjs.js');
|
|
11
11
|
var chalk = require('chalk');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var packager = require('../../lib/builder/packager.cjs.js');
|
|
6
|
-
var paths = require('
|
|
6
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
7
7
|
var cliNode = require('@backstage/cli-node');
|
|
8
|
-
var parallel = require('
|
|
9
|
-
var buildFrontend = require('
|
|
10
|
-
var buildBackend = require('
|
|
11
|
-
var optionsParser = require('
|
|
8
|
+
var parallel = require('../../../../lib/parallel.cjs.js');
|
|
9
|
+
var buildFrontend = require('../../lib/buildFrontend.cjs.js');
|
|
10
|
+
var buildBackend = require('../../lib/buildBackend.cjs.js');
|
|
11
|
+
var optionsParser = require('../../../../commands/repo/optionsParser.cjs.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
14
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commander = require('commander');
|
|
4
|
+
var lazy = require('../../lib/lazy.cjs.js');
|
|
5
|
+
|
|
6
|
+
function registerRepoCommands(command) {
|
|
7
|
+
command.command("build").description(
|
|
8
|
+
"Build packages in the project, excluding bundled app and backend packages."
|
|
9
|
+
).option(
|
|
10
|
+
"--all",
|
|
11
|
+
"Build all packages, including bundled app and backend packages."
|
|
12
|
+
).option(
|
|
13
|
+
"--since <ref>",
|
|
14
|
+
"Only build packages and their dev dependents that changed since the specified ref"
|
|
15
|
+
).option(
|
|
16
|
+
"--minify",
|
|
17
|
+
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
18
|
+
).action(lazy.lazy(() => import('./commands/repo/build.cjs.js'), "command"));
|
|
19
|
+
}
|
|
20
|
+
function registerPackageCommands(command) {
|
|
21
|
+
command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
|
|
22
|
+
"--minify",
|
|
23
|
+
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
24
|
+
).option(
|
|
25
|
+
"--skip-build-dependencies",
|
|
26
|
+
"Skip the automatic building of local dependencies. Applies to backend packages only."
|
|
27
|
+
).option(
|
|
28
|
+
"--stats",
|
|
29
|
+
"If bundle stats are available, write them to the output directory. Applies to app packages only."
|
|
30
|
+
).option(
|
|
31
|
+
"--config <path>",
|
|
32
|
+
"Config files to load instead of app-config.yaml. Applies to app packages only.",
|
|
33
|
+
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
34
|
+
Array()
|
|
35
|
+
).action(lazy.lazy(() => import('./commands/package/build/index.cjs.js'), "command"));
|
|
36
|
+
}
|
|
37
|
+
function registerCommands(program) {
|
|
38
|
+
program.command("build-workspace <workspace-dir> [packages...]").addOption(
|
|
39
|
+
new commander.Option(
|
|
40
|
+
"--alwaysYarnPack",
|
|
41
|
+
"Alias for --alwaysPack for backwards compatibility."
|
|
42
|
+
).implies({ alwaysPack: true }).hideHelp(true)
|
|
43
|
+
).option(
|
|
44
|
+
"--alwaysPack",
|
|
45
|
+
"Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
|
|
46
|
+
).description("Builds a temporary dist workspace from the provided packages").action(lazy.lazy(() => import('./commands/buildWorkspace.cjs.js'), "default"));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.registerCommands = registerCommands;
|
|
50
|
+
exports.registerPackageCommands = registerPackageCommands;
|
|
51
|
+
exports.registerRepoCommands = registerRepoCommands;
|
|
52
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -4,10 +4,10 @@ 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 createDistWorkspace = require('
|
|
8
|
-
var parallel = require('
|
|
9
|
-
var packager = require('
|
|
10
|
-
var types = require('
|
|
7
|
+
var createDistWorkspace = require('./packager/createDistWorkspace.cjs.js');
|
|
8
|
+
var parallel = require('../../../lib/parallel.cjs.js');
|
|
9
|
+
var packager = require('./builder/packager.cjs.js');
|
|
10
|
+
var types = require('./builder/types.cjs.js');
|
|
11
11
|
var cliNode = require('@backstage/cli-node');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
var path = require('path');
|
|
5
|
-
var bundle = require('
|
|
6
|
-
var moduleFederation = require('
|
|
5
|
+
var bundle = require('./bundler/bundle.cjs.js');
|
|
6
|
+
var moduleFederation = require('./bundler/moduleFederation.cjs.js');
|
|
7
7
|
require('chalk');
|
|
8
8
|
require('react-dev-utils/openBrowser');
|
|
9
9
|
require('webpack');
|
|
10
10
|
require('webpack-dev-server');
|
|
11
|
-
require('
|
|
12
|
-
var config = require('../../
|
|
11
|
+
require('../../../lib/paths.cjs.js');
|
|
12
|
+
var config = require('../../config/lib/config.cjs.js');
|
|
13
13
|
require('eslint-webpack-plugin');
|
|
14
14
|
require('fork-ts-checker-webpack-plugin');
|
|
15
15
|
require('html-webpack-plugin');
|
|
16
16
|
require('@module-federation/enhanced/webpack');
|
|
17
17
|
require('react-dev-utils/ModuleScopePlugin');
|
|
18
18
|
require('@pmmmwh/react-refresh-webpack-plugin');
|
|
19
|
-
require('
|
|
19
|
+
require('./bundler/optimization.cjs.js');
|
|
20
20
|
require('lodash/pickBy');
|
|
21
|
-
require('
|
|
21
|
+
require('../../../lib/run.cjs.js');
|
|
22
22
|
require('mini-css-extract-plugin');
|
|
23
|
-
require('
|
|
23
|
+
require('../../../lib/version.cjs.js');
|
|
24
24
|
require('yn');
|
|
25
25
|
require('@manypkg/get-packages');
|
|
26
|
-
require('
|
|
27
|
-
var parallel = require('
|
|
26
|
+
require('./bundler/packageDetection.cjs.js');
|
|
27
|
+
var parallel = require('../../../lib/parallel.cjs.js');
|
|
28
28
|
|
|
29
29
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
30
30
|
|
|
@@ -13,9 +13,9 @@ var json = require('@rollup/plugin-json');
|
|
|
13
13
|
var yaml = require('@rollup/plugin-yaml');
|
|
14
14
|
var plugins = require('./plugins.cjs.js');
|
|
15
15
|
var types = require('./types.cjs.js');
|
|
16
|
-
var paths = require('
|
|
17
|
-
var svgrTemplate = require('
|
|
18
|
-
var entryPoints = require('
|
|
16
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
17
|
+
var svgrTemplate = require('../../../../lib/svgrTemplate.cjs.js');
|
|
18
|
+
var entryPoints = require('../../../../lib/entryPoints.cjs.js');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
21
21
|
|
|
@@ -4,11 +4,11 @@ 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 paths = require('
|
|
7
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
8
8
|
var config = require('./config.cjs.js');
|
|
9
9
|
var types = require('./types.cjs.js');
|
|
10
10
|
var cliNode = require('@backstage/cli-node');
|
|
11
|
-
var parallel = require('
|
|
11
|
+
var parallel = require('../../../../lib/parallel.cjs.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
14
|
|
|
@@ -9,13 +9,13 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
9
9
|
var webpack = require('@module-federation/enhanced/webpack');
|
|
10
10
|
var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
|
11
11
|
var ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
12
|
-
var paths = require('
|
|
12
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
13
13
|
var fs = require('fs-extra');
|
|
14
14
|
var optimization = require('./optimization.cjs.js');
|
|
15
15
|
var pickBy = require('lodash/pickBy');
|
|
16
|
-
var run = require('
|
|
16
|
+
var run = require('../../../../lib/run.cjs.js');
|
|
17
17
|
var transforms = require('./transforms.cjs.js');
|
|
18
|
-
var version = require('
|
|
18
|
+
var version = require('../../../../lib/version.cjs.js');
|
|
19
19
|
var yn = require('yn');
|
|
20
20
|
var hasReactDomClient = require('./hasReactDomClient.cjs.js');
|
|
21
21
|
var linkWorkspaces = require('./linkWorkspaces.cjs.js');
|
|
@@ -318,7 +318,7 @@ async function createConfig(paths, options) {
|
|
|
318
318
|
extensions: [".ts", ".tsx", ".mjs", ".js", ".jsx", ".json", ".wasm"],
|
|
319
319
|
mainFields: ["browser", "module", "main"],
|
|
320
320
|
fallback: {
|
|
321
|
-
...pickBy__default.default(require("node-
|
|
321
|
+
...pickBy__default.default(require("node-stdlib-browser")),
|
|
322
322
|
module: false,
|
|
323
323
|
dgram: false,
|
|
324
324
|
dns: false,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var path = require('path');
|
|
4
4
|
var getPackages = require('@manypkg/get-packages');
|
|
5
|
-
var paths = require('
|
|
5
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
6
6
|
|
|
7
7
|
async function createWorkspaceLinkingPlugins(bundler, workspace) {
|
|
8
8
|
const { packages: linkedPackages, root: linkedRoot } = await getPackages.getPackages(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var entryPoints = require('
|
|
5
|
-
var typeDistProject = require('
|
|
4
|
+
var entryPoints = require('../../../../lib/entryPoints.cjs.js');
|
|
5
|
+
var typeDistProject = require('../../../../lib/typeDistProject.cjs.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@ var chokidar = require('chokidar');
|
|
|
5
5
|
var fs = require('fs-extra');
|
|
6
6
|
var PQueue = require('p-queue');
|
|
7
7
|
var path = require('path');
|
|
8
|
-
var paths = require('
|
|
8
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
var path = require('path');
|
|
5
|
-
var paths = require('
|
|
5
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -5,8 +5,8 @@ var fs = require('fs-extra');
|
|
|
5
5
|
var openBrowser = require('react-dev-utils/openBrowser');
|
|
6
6
|
var webpack = require('webpack');
|
|
7
7
|
var WebpackDevServer = require('webpack-dev-server');
|
|
8
|
-
var paths$1 = require('
|
|
9
|
-
var config = require('
|
|
8
|
+
var paths$1 = require('../../../../lib/paths.cjs.js');
|
|
9
|
+
var config = require('../../../config/lib/config.cjs.js');
|
|
10
10
|
var config$1 = require('./config.cjs.js');
|
|
11
11
|
var packageDetection = require('./packageDetection.cjs.js');
|
|
12
12
|
var paths = require('./paths.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
-
var svgrTemplate = require('
|
|
4
|
+
var svgrTemplate = require('../../../../lib/svgrTemplate.cjs.js');
|
|
5
5
|
|
|
6
6
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
7
|
|
|
@@ -6,15 +6,15 @@ var path = require('path');
|
|
|
6
6
|
var os = require('os');
|
|
7
7
|
var tar = require('tar');
|
|
8
8
|
var partition = require('lodash/partition');
|
|
9
|
-
var paths = require('
|
|
10
|
-
var run = require('
|
|
11
|
-
var _package = require('
|
|
9
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
10
|
+
var run = require('../../../../lib/run.cjs.js');
|
|
11
|
+
var _package = require('../../../../packages/cli/package.json.cjs.js');
|
|
12
12
|
var packager = require('../builder/packager.cjs.js');
|
|
13
13
|
var types = require('../builder/types.cjs.js');
|
|
14
14
|
var productionPack = require('./productionPack.cjs.js');
|
|
15
15
|
var cliNode = require('@backstage/cli-node');
|
|
16
|
-
var parallel = require('
|
|
17
|
-
var typeDistProject = require('
|
|
16
|
+
var parallel = require('../../../../lib/parallel.cjs.js');
|
|
17
|
+
var typeDistProject = require('../../../../lib/typeDistProject.cjs.js');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
20
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
var npmPackList = require('npm-packlist');
|
|
5
5
|
var path = require('path');
|
|
6
|
-
var entryPoints = require('
|
|
7
|
-
var typeDistProject = require('
|
|
6
|
+
var entryPoints = require('../../../../lib/entryPoints.cjs.js');
|
|
7
|
+
var typeDistProject = require('../../../../lib/typeDistProject.cjs.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _package = require('
|
|
5
|
+
var _package = require('../../../packages/cli/package.json.cjs.js');
|
|
6
6
|
var os = require('os');
|
|
7
|
-
var run = require('
|
|
8
|
-
var paths = require('
|
|
9
|
-
var Lockfile = require('
|
|
7
|
+
var run = require('../../../lib/run.cjs.js');
|
|
8
|
+
var paths = require('../../../lib/paths.cjs.js');
|
|
9
|
+
var Lockfile = require('../../../lib/versioning/Lockfile.cjs.js');
|
|
10
10
|
require('minimatch');
|
|
11
11
|
require('@manypkg/get-packages');
|
|
12
12
|
require('chalk');
|
|
13
|
-
require('
|
|
13
|
+
require('../../../lib/yarn.cjs.js');
|
|
14
14
|
var fs = require('fs-extra');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lazy = require('../../lib/lazy.cjs.js');
|
|
4
|
+
|
|
5
|
+
function registerCommands(program) {
|
|
6
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy.lazy(() => import('./commands/info.cjs.js'), "default"));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
exports.registerCommands = registerCommands;
|
|
10
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var fs = require('fs-extra');
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var cliNode = require('@backstage/cli-node');
|
|
6
|
-
var run = require('
|
|
6
|
+
var run = require('../../../lib/run.cjs.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@ var fs = require('fs-extra');
|
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var getPackages = require('@manypkg/get-packages');
|
|
8
8
|
var cliNode = require('@backstage/cli-node');
|
|
9
|
-
var paths = require('
|
|
9
|
+
var paths = require('../../../lib/paths.cjs.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
@@ -9,15 +9,15 @@ var yaml = require('yaml');
|
|
|
9
9
|
var z = require('zod');
|
|
10
10
|
var errors = require('@backstage/errors');
|
|
11
11
|
var path = require('path');
|
|
12
|
-
var paths = require('
|
|
13
|
-
var Lockfile = require('
|
|
14
|
-
var packages = require('
|
|
12
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
13
|
+
var Lockfile = require('../../../../lib/versioning/Lockfile.cjs.js');
|
|
14
|
+
var packages = require('../../../../lib/versioning/packages.cjs.js');
|
|
15
15
|
var cliCommon = require('@backstage/cli-common');
|
|
16
|
-
var parallel = require('
|
|
16
|
+
var parallel = require('../../../../lib/parallel.cjs.js');
|
|
17
17
|
var releaseManifests = require('@backstage/release-manifests');
|
|
18
18
|
var migrate = require('./migrate.cjs.js');
|
|
19
|
-
var utils = require('
|
|
20
|
-
var run = require('
|
|
19
|
+
var utils = require('../../lib/utils.cjs.js');
|
|
20
|
+
var run = require('../../../../lib/run.cjs.js');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
23
23
|
|
|
@@ -7,7 +7,7 @@ var chalk = require('chalk');
|
|
|
7
7
|
var path = require('path');
|
|
8
8
|
var fs = require('fs-extra');
|
|
9
9
|
var minimatch = require('minimatch');
|
|
10
|
-
var utils = require('
|
|
10
|
+
var utils = require('../../lib/utils.cjs.js');
|
|
11
11
|
var replace = require('replace-in-file');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lazy = require('../../lib/lazy.cjs.js');
|
|
4
|
+
|
|
5
|
+
function registerCommands(program) {
|
|
6
|
+
program.command("versions:bump").option(
|
|
7
|
+
"--pattern <glob>",
|
|
8
|
+
"Override glob for matching packages to upgrade"
|
|
9
|
+
).option(
|
|
10
|
+
"--release <version|next|main>",
|
|
11
|
+
"Bump to a specific Backstage release line or version",
|
|
12
|
+
"main"
|
|
13
|
+
).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy.lazy(() => import('./commands/versions/bump.cjs.js'), "default"));
|
|
14
|
+
program.command("versions:migrate").option(
|
|
15
|
+
"--pattern <glob>",
|
|
16
|
+
"Override glob for matching packages to upgrade"
|
|
17
|
+
).option(
|
|
18
|
+
"--skip-code-changes",
|
|
19
|
+
"Skip code changes and only update package.json files"
|
|
20
|
+
).description(
|
|
21
|
+
"Migrate any plugins that have been moved to the @backstage-community namespace automatically"
|
|
22
|
+
).action(lazy.lazy(() => import('./commands/versions/migrate.cjs.js'), "default"));
|
|
23
|
+
const command = program.command("migrate [command]").description("Migration utilities");
|
|
24
|
+
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy.lazy(() => import('./commands/packageRole.cjs.js'), "default"));
|
|
25
|
+
command.command("package-scripts").description("Set package scripts according to each package role").action(lazy.lazy(() => import('./commands/packageScripts.cjs.js'), "command"));
|
|
26
|
+
command.command("package-exports").description("Synchronize package subpath export definitions").action(lazy.lazy(() => import('./commands/packageExports.cjs.js'), "command"));
|
|
27
|
+
command.command("package-lint-configs").description(
|
|
28
|
+
"Migrates all packages to use @backstage/cli/config/eslint-factory"
|
|
29
|
+
).action(lazy.lazy(() => import('./commands/packageLintConfigs.cjs.js'), "command"));
|
|
30
|
+
command.command("react-router-deps").description(
|
|
31
|
+
"Migrates the react-router dependencies for all packages to be peer dependencies"
|
|
32
|
+
).action(lazy.lazy(() => import('./commands/reactRouterDeps.cjs.js'), "command"));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.registerCommands = registerCommands;
|
|
36
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var ora = require('ora');
|
|
4
4
|
var chalk = require('chalk');
|
|
5
|
-
var run = require('
|
|
5
|
+
var run = require('../../../lib/run.cjs.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var paths = require('
|
|
6
|
-
var run = require('
|
|
5
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
6
|
+
var run = require('../../../../lib/run.cjs.js');
|
|
7
7
|
|
|
8
8
|
function includesAnyOf(hayStack, ...needles) {
|
|
9
9
|
for (const needle of needles) {
|
|
@@ -6,10 +6,10 @@ var yargs = require('yargs');
|
|
|
6
6
|
var jestCli = require('jest-cli');
|
|
7
7
|
var path = require('path');
|
|
8
8
|
var cliNode = require('@backstage/cli-node');
|
|
9
|
-
var paths = require('
|
|
10
|
-
var run = require('
|
|
9
|
+
var paths = require('../../../../lib/paths.cjs.js');
|
|
10
|
+
var run = require('../../../../lib/run.cjs.js');
|
|
11
11
|
var cliCommon = require('@backstage/cli-common');
|
|
12
|
-
var SuccessCache = require('
|
|
12
|
+
var SuccessCache = require('../../../../lib/cache/SuccessCache.cjs.js');
|
|
13
13
|
|
|
14
14
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
15
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lazy = require('../../lib/lazy.cjs.js');
|
|
4
|
+
|
|
5
|
+
function registerRepoCommands(command) {
|
|
6
|
+
command.command("test").allowUnknownOption(true).option(
|
|
7
|
+
"--since <ref>",
|
|
8
|
+
"Only test packages that changed since the specified ref"
|
|
9
|
+
).option(
|
|
10
|
+
"--successCache",
|
|
11
|
+
"Enable success caching, which skips running tests for unchanged packages that were successful in the previous run"
|
|
12
|
+
).option(
|
|
13
|
+
"--successCacheDir <path>",
|
|
14
|
+
"Set the success cache location, (default: node_modules/.cache/backstage-cli)"
|
|
15
|
+
).option(
|
|
16
|
+
"--jest-help",
|
|
17
|
+
"Show help for Jest CLI options, which are passed through"
|
|
18
|
+
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => import('./commands/repo/test.cjs.js'), "command"));
|
|
19
|
+
}
|
|
20
|
+
function registerPackageCommands(command) {
|
|
21
|
+
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy.lazy(() => import('./commands/package/test.cjs.js'), "default"));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.registerPackageCommands = registerPackageCommands;
|
|
25
|
+
exports.registerRepoCommands = registerRepoCommands;
|
|
26
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var version = "0.30.
|
|
3
|
+
var version = "0.30.1-next.0";
|
|
4
4
|
var dependencies = {
|
|
5
5
|
"@backstage/catalog-model": "workspace:^",
|
|
6
6
|
"@backstage/cli-common": "workspace:^",
|
|
@@ -82,7 +82,7 @@ var dependencies = {
|
|
|
82
82
|
lodash: "^4.17.21",
|
|
83
83
|
"mini-css-extract-plugin": "^2.4.2",
|
|
84
84
|
minimatch: "^9.0.0",
|
|
85
|
-
"node-
|
|
85
|
+
"node-stdlib-browser": "^1.3.1",
|
|
86
86
|
"npm-packlist": "^5.0.0",
|
|
87
87
|
ora: "^5.3.0",
|
|
88
88
|
"p-queue": "^6.6.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/cli",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1-next.0",
|
|
4
4
|
"description": "CLI for developing Backstage plugins and apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "cli"
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@backstage/catalog-model": "1.7.3",
|
|
51
51
|
"@backstage/cli-common": "0.1.15",
|
|
52
|
-
"@backstage/cli-node": "0.2.13
|
|
52
|
+
"@backstage/cli-node": "0.2.13",
|
|
53
53
|
"@backstage/config": "1.3.2",
|
|
54
|
-
"@backstage/config-loader": "1.9.6
|
|
54
|
+
"@backstage/config-loader": "1.9.6",
|
|
55
55
|
"@backstage/errors": "1.2.7",
|
|
56
56
|
"@backstage/eslint-plugin": "0.1.10",
|
|
57
57
|
"@backstage/integration": "1.16.1",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"lodash": "^4.17.21",
|
|
128
128
|
"mini-css-extract-plugin": "^2.4.2",
|
|
129
129
|
"minimatch": "^9.0.0",
|
|
130
|
-
"node-
|
|
130
|
+
"node-stdlib-browser": "^1.3.1",
|
|
131
131
|
"npm-packlist": "^5.0.0",
|
|
132
132
|
"ora": "^5.3.0",
|
|
133
133
|
"p-queue": "^6.6.2",
|
|
@@ -163,22 +163,22 @@
|
|
|
163
163
|
"zod-validation-error": "^3.4.0"
|
|
164
164
|
},
|
|
165
165
|
"devDependencies": {
|
|
166
|
-
"@backstage/backend-plugin-api": "1.2.
|
|
167
|
-
"@backstage/backend-test-utils": "1.3.
|
|
166
|
+
"@backstage/backend-plugin-api": "1.2.1-next.1",
|
|
167
|
+
"@backstage/backend-test-utils": "1.3.1-next.1",
|
|
168
168
|
"@backstage/catalog-client": "1.9.1",
|
|
169
169
|
"@backstage/config": "1.3.2",
|
|
170
|
-
"@backstage/core-app-api": "1.15.5
|
|
171
|
-
"@backstage/core-components": "0.16.
|
|
172
|
-
"@backstage/core-plugin-api": "1.10.4
|
|
173
|
-
"@backstage/dev-utils": "1.1.
|
|
170
|
+
"@backstage/core-app-api": "1.15.5",
|
|
171
|
+
"@backstage/core-components": "0.16.5-next.0",
|
|
172
|
+
"@backstage/core-plugin-api": "1.10.4",
|
|
173
|
+
"@backstage/dev-utils": "1.1.8-next.1",
|
|
174
174
|
"@backstage/errors": "1.2.7",
|
|
175
|
-
"@backstage/plugin-auth-backend": "0.24.
|
|
176
|
-
"@backstage/plugin-auth-backend-module-guest-provider": "0.2.
|
|
177
|
-
"@backstage/plugin-catalog-node": "1.16.
|
|
178
|
-
"@backstage/plugin-scaffolder-node": "0.7.
|
|
179
|
-
"@backstage/plugin-scaffolder-node-test-utils": "0.1.
|
|
180
|
-
"@backstage/test-utils": "1.7.5
|
|
181
|
-
"@backstage/theme": "0.6.4
|
|
175
|
+
"@backstage/plugin-auth-backend": "0.24.4-next.1",
|
|
176
|
+
"@backstage/plugin-auth-backend-module-guest-provider": "0.2.6-next.1",
|
|
177
|
+
"@backstage/plugin-catalog-node": "1.16.1-next.1",
|
|
178
|
+
"@backstage/plugin-scaffolder-node": "0.7.1-next.1",
|
|
179
|
+
"@backstage/plugin-scaffolder-node-test-utils": "0.1.20-next.1",
|
|
180
|
+
"@backstage/test-utils": "1.7.5",
|
|
181
|
+
"@backstage/theme": "0.6.4",
|
|
182
182
|
"@rspack/core": "^1.0.10",
|
|
183
183
|
"@rspack/dev-server": "^1.0.9",
|
|
184
184
|
"@rspack/plugin-react-refresh": "^1.0.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|