@backstage/cli 0.36.0-next.1 → 0.36.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 +110 -0
- package/config/eslint-factory.js +1 -0
- package/config/getJestEnvironment.js +7 -29
- package/config/jest-environment-jsdom/index.js +9 -43
- package/config/jest.js +7 -401
- package/config/jestCacheResultProcessor.cjs +10 -6
- package/config/jestCachingModuleLoader.js +11 -19
- package/config/jestFileTransform.js +11 -28
- package/config/jestRejectNetworkRequests.js +10 -53
- package/config/jestSucraseTransform.js +10 -70
- package/config/jestSwcTransform.js +10 -27
- package/config/jestYamlTransform.js +11 -24
- package/config/nodeTransform.cjs +10 -70
- package/config/nodeTransformHooks.mjs +4 -278
- package/config/webpack-public-path.js +10 -14
- package/dist/cli-internal/src/InternalCliModule.cjs.js +11 -0
- package/dist/cli-internal/src/InternalCommandNode.cjs.js +25 -0
- package/dist/cli-internal/src/knownPluginPackages.cjs.js +40 -0
- package/dist/index.cjs.js +21 -10
- package/dist/wiring/CliInitializer.cjs.js +61 -20
- package/dist/wiring/CommandGraph.cjs.js +81 -23
- package/dist/wiring/discoverCliModules.cjs.js +44 -0
- package/package.json +27 -154
- package/dist/modules/build/commands/buildWorkspace.cjs.js +0 -24
- package/dist/modules/build/commands/package/build/command.cjs.js +0 -89
- package/dist/modules/build/commands/package/build/index.cjs.js +0 -8
- package/dist/modules/build/commands/package/clean.cjs.js +0 -21
- package/dist/modules/build/commands/package/postpack.cjs.js +0 -15
- package/dist/modules/build/commands/package/prepack.cjs.js +0 -29
- package/dist/modules/build/commands/package/start/command.cjs.js +0 -23
- package/dist/modules/build/commands/package/start/index.cjs.js +0 -8
- package/dist/modules/build/commands/package/start/resolveLinkedWorkspace.cjs.js +0 -34
- package/dist/modules/build/commands/package/start/startBackend.cjs.js +0 -46
- package/dist/modules/build/commands/package/start/startFrontend.cjs.js +0 -50
- package/dist/modules/build/commands/package/start/startPackage.cjs.js +0 -53
- package/dist/modules/build/commands/repo/build.cjs.js +0 -114
- package/dist/modules/build/commands/repo/clean.cjs.js +0 -41
- package/dist/modules/build/commands/repo/start.cjs.js +0 -150
- package/dist/modules/build/index.cjs.js +0 -192
- package/dist/modules/build/lib/buildBackend.cjs.js +0 -81
- package/dist/modules/build/lib/buildFrontend.cjs.js +0 -50
- package/dist/modules/build/lib/builder/config.cjs.js +0 -257
- package/dist/modules/build/lib/builder/packager.cjs.js +0 -131
- package/dist/modules/build/lib/builder/plugins.cjs.js +0 -125
- package/dist/modules/build/lib/builder/types.cjs.js +0 -10
- package/dist/modules/build/lib/bundler/ConfigInjectingHtmlWebpackPlugin.cjs.js +0 -43
- package/dist/modules/build/lib/bundler/bundle.cjs.js +0 -189
- package/dist/modules/build/lib/bundler/config.cjs.js +0 -308
- package/dist/modules/build/lib/bundler/hasReactDomClient.cjs.js +0 -17
- package/dist/modules/build/lib/bundler/linkWorkspaces.cjs.js +0 -34
- package/dist/modules/build/lib/bundler/moduleFederation.cjs.js +0 -135
- package/dist/modules/build/lib/bundler/optimization.cjs.js +0 -68
- package/dist/modules/build/lib/bundler/packageDetection.cjs.js +0 -124
- package/dist/modules/build/lib/bundler/paths.cjs.js +0 -62
- package/dist/modules/build/lib/bundler/server.cjs.js +0 -231
- package/dist/modules/build/lib/bundler/transforms.cjs.js +0 -145
- package/dist/modules/build/lib/config.cjs.js +0 -94
- package/dist/modules/build/lib/entryPoints.cjs.js +0 -49
- package/dist/modules/build/lib/ipc/IpcServer.cjs.js +0 -60
- package/dist/modules/build/lib/ipc/ServerDataStore.cjs.js +0 -36
- package/dist/modules/build/lib/optionsParser.cjs.js +0 -37
- package/dist/modules/build/lib/packager/createDistWorkspace.cjs.js +0 -235
- package/dist/modules/build/lib/packager/productionPack.cjs.js +0 -160
- package/dist/modules/build/lib/publishing.cjs.js +0 -40
- package/dist/modules/build/lib/role.cjs.js +0 -24
- package/dist/modules/build/lib/runner/runBackend.cjs.js +0 -136
- package/dist/modules/build/lib/typeDistProject.cjs.js +0 -89
- package/dist/modules/build/lib/urls.cjs.js +0 -13
- package/dist/modules/config/commands/docs.cjs.js +0 -62
- package/dist/modules/config/commands/print.cjs.js +0 -80
- package/dist/modules/config/commands/schema.cjs.js +0 -55
- package/dist/modules/config/commands/validate.cjs.js +0 -49
- package/dist/modules/config/index.cjs.js +0 -51
- package/dist/modules/config/lib/config.cjs.js +0 -94
- package/dist/modules/create-github-app/commands/create-github-app/GithubCreateAppServer.cjs.js +0 -127
- package/dist/modules/create-github-app/commands/create-github-app/index.cjs.js +0 -115
- package/dist/modules/create-github-app/index.cjs.js +0 -27
- package/dist/modules/info/commands/info.cjs.js +0 -181
- package/dist/modules/info/index.cjs.js +0 -19
- package/dist/modules/lint/commands/package/lint.cjs.js +0 -46
- package/dist/modules/lint/commands/repo/lint.cjs.js +0 -212
- package/dist/modules/lint/index.cjs.js +0 -82
- package/dist/modules/lint/lib/optionsParser.cjs.js +0 -37
- package/dist/modules/maintenance/commands/repo/fix.cjs.js +0 -400
- package/dist/modules/maintenance/commands/repo/list-deprecations.cjs.js +0 -74
- package/dist/modules/maintenance/index.cjs.js +0 -42
- package/dist/modules/migrate/commands/packageExports.cjs.js +0 -15
- package/dist/modules/migrate/commands/packageLintConfigs.cjs.js +0 -77
- package/dist/modules/migrate/commands/packageRole.cjs.js +0 -57
- package/dist/modules/migrate/commands/packageScripts.cjs.js +0 -87
- package/dist/modules/migrate/commands/reactRouterDeps.cjs.js +0 -51
- package/dist/modules/migrate/commands/versions/bump.cjs.js +0 -373
- package/dist/modules/migrate/commands/versions/migrate.cjs.js +0 -112
- package/dist/modules/migrate/index.cjs.js +0 -82
- package/dist/modules/migrate/lib/utils.cjs.js +0 -44
- package/dist/modules/migrate/lib/versioning/packages.cjs.js +0 -71
- package/dist/modules/migrate/lib/versioning/yarn.cjs.js +0 -28
- package/dist/modules/new/commands/new.cjs.js +0 -60
- package/dist/modules/new/index.cjs.js +0 -68
- package/dist/modules/new/lib/codeowners/codeowners.cjs.js +0 -92
- package/dist/modules/new/lib/createNewPackage.cjs.js +0 -32
- package/dist/modules/new/lib/defaultTemplates.cjs.js +0 -17
- package/dist/modules/new/lib/execution/PortableTemplater.cjs.js +0 -89
- package/dist/modules/new/lib/execution/executePortableTemplate.cjs.js +0 -66
- package/dist/modules/new/lib/execution/installNewPackage.cjs.js +0 -127
- package/dist/modules/new/lib/execution/writeTemplateContents.cjs.js +0 -116
- package/dist/modules/new/lib/preparation/collectPortableTemplateInput.cjs.js +0 -157
- package/dist/modules/new/lib/preparation/loadPortableTemplate.cjs.js +0 -81
- package/dist/modules/new/lib/preparation/loadPortableTemplateConfig.cjs.js +0 -132
- package/dist/modules/new/lib/preparation/resolvePackageParams.cjs.js +0 -40
- package/dist/modules/new/lib/preparation/selectTemplateInteractively.cjs.js +0 -38
- package/dist/modules/new/lib/tasks.cjs.js +0 -51
- package/dist/modules/new/lib/types.cjs.js +0 -19
- package/dist/modules/new/lib/version.cjs.js +0 -91
- package/dist/modules/test/commands/package/test.cjs.js +0 -65
- package/dist/modules/test/commands/repo/test.cjs.js +0 -288
- package/dist/modules/test/index.cjs.js +0 -54
- package/dist/modules/translations/commands/export.cjs.js +0 -127
- package/dist/modules/translations/commands/import.cjs.js +0 -164
- package/dist/modules/translations/index.cjs.js +0 -24
- package/dist/modules/translations/lib/discoverPackages.cjs.js +0 -121
- package/dist/modules/translations/lib/extractTranslations.cjs.js +0 -71
- package/dist/modules/translations/lib/messageFilePath.cjs.js +0 -43
- package/dist/packages/backend-defaults/package.json.cjs.js +0 -6
- package/dist/packages/backend-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/backend-test-utils/package.json.cjs.js +0 -6
- package/dist/packages/catalog-client/package.json.cjs.js +0 -6
- package/dist/packages/cli/package.json.cjs.js +0 -156
- package/dist/packages/config/package.json.cjs.js +0 -6
- package/dist/packages/core-app-api/package.json.cjs.js +0 -6
- package/dist/packages/core-components/package.json.cjs.js +0 -6
- package/dist/packages/core-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/dev-utils/package.json.cjs.js +0 -6
- package/dist/packages/errors/package.json.cjs.js +0 -6
- package/dist/packages/frontend-defaults/package.json.cjs.js +0 -6
- package/dist/packages/frontend-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/frontend-plugin-api/src/routing/describeParentCallSite.cjs.js +0 -26
- package/dist/packages/frontend-test-utils/package.json.cjs.js +0 -6
- package/dist/packages/test-utils/package.json.cjs.js +0 -6
- package/dist/packages/theme/package.json.cjs.js +0 -6
- package/dist/packages/types/package.json.cjs.js +0 -6
- package/dist/plugins/auth-backend/package.json.cjs.js +0 -6
- package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +0 -6
- package/dist/plugins/catalog-node/package.json.cjs.js +0 -6
- package/dist/plugins/scaffolder-node/package.json.cjs.js +0 -6
- package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +0 -6
- package/dist/wiring/CommandRegistry.cjs.js +0 -14
- package/dist/wiring/factory.cjs.js +0 -15
- package/dist/wiring/lazy.cjs.js +0 -22
- package/dist/wiring/types.cjs.js +0 -11
- package/templates/backend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/backend-plugin/README.md.hbs +0 -28
- package/templates/backend-plugin/dev/index.ts.hbs +0 -60
- package/templates/backend-plugin/package.json.hbs +0 -44
- package/templates/backend-plugin/portable-template.yaml +0 -5
- package/templates/backend-plugin/src/index.ts.hbs +0 -1
- package/templates/backend-plugin/src/plugin.test.ts.hbs +0 -129
- package/templates/backend-plugin/src/plugin.ts.hbs +0 -32
- package/templates/backend-plugin/src/router.test.ts +0 -67
- package/templates/backend-plugin/src/router.ts +0 -51
- package/templates/backend-plugin/src/services/TodoListService.ts +0 -155
- package/templates/backend-plugin/src/setupTests.ts +0 -1
- package/templates/backend-plugin-module/.eslintrc.js.hbs +0 -1
- package/templates/backend-plugin-module/README.md.hbs +0 -5
- package/templates/backend-plugin-module/package.json.hbs +0 -34
- package/templates/backend-plugin-module/portable-template.yaml +0 -5
- package/templates/backend-plugin-module/src/index.ts.hbs +0 -8
- package/templates/backend-plugin-module/src/module.ts.hbs +0 -17
- package/templates/catalog-provider-module/.eslintrc.js.hbs +0 -1
- package/templates/catalog-provider-module/README.md.hbs +0 -5
- package/templates/catalog-provider-module/config.d.ts.hbs +0 -34
- package/templates/catalog-provider-module/package.json.hbs +0 -36
- package/templates/catalog-provider-module/portable-template.yaml +0 -9
- package/templates/catalog-provider-module/src/index.ts.hbs +0 -8
- package/templates/catalog-provider-module/src/module.ts.hbs +0 -29
- package/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs +0 -78
- package/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs +0 -18
- package/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs +0 -109
- package/templates/frontend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/frontend-plugin/README.md.hbs +0 -13
- package/templates/frontend-plugin/dev/index.tsx.hbs +0 -11
- package/templates/frontend-plugin/package.json.hbs +0 -54
- package/templates/frontend-plugin/portable-template.yaml +0 -6
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -28
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -37
- package/templates/frontend-plugin/src/components/ExampleComponent/index.ts +0 -1
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -19
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -308
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts +0 -1
- package/templates/frontend-plugin/src/index.ts.hbs +0 -1
- package/templates/frontend-plugin/src/plugin.test.ts.hbs +0 -7
- package/templates/frontend-plugin/src/plugin.ts.hbs +0 -22
- package/templates/frontend-plugin/src/routes.ts.hbs +0 -5
- package/templates/frontend-plugin/src/setupTests.ts +0 -1
- package/templates/new-frontend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/new-frontend-plugin/README.md.hbs +0 -20
- package/templates/new-frontend-plugin/dev/index.tsx +0 -10
- package/templates/new-frontend-plugin/package.json.hbs +0 -49
- package/templates/new-frontend-plugin/portable-template.yaml +0 -5
- package/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -28
- package/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -37
- package/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts +0 -1
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -19
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -308
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts +0 -1
- package/templates/new-frontend-plugin/src/index.ts.hbs +0 -1
- package/templates/new-frontend-plugin/src/plugin.test.ts.hbs +0 -7
- package/templates/new-frontend-plugin/src/plugin.tsx.hbs +0 -25
- package/templates/new-frontend-plugin/src/routes.ts +0 -3
- package/templates/new-frontend-plugin/src/setupTests.ts +0 -1
- package/templates/new-frontend-plugin-module/.eslintrc.js.hbs +0 -1
- package/templates/new-frontend-plugin-module/README.md.hbs +0 -5
- package/templates/new-frontend-plugin-module/package.json.hbs +0 -35
- package/templates/new-frontend-plugin-module/portable-template.yaml +0 -5
- package/templates/new-frontend-plugin-module/src/index.ts.hbs +0 -1
- package/templates/new-frontend-plugin-module/src/module.tsx.hbs +0 -8
- package/templates/new-frontend-plugin-module/src/setupTests.ts +0 -1
- package/templates/node-library/.eslintrc.js.hbs +0 -1
- package/templates/node-library/README.md.hbs +0 -12
- package/templates/node-library/package.json.hbs +0 -29
- package/templates/node-library/portable-template.yaml +0 -3
- package/templates/node-library/src/index.ts.hbs +0 -1
- package/templates/node-library/src/setupTests.ts +0 -1
- package/templates/plugin-common-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-common-library/README.md.hbs +0 -5
- package/templates/plugin-common-library/package.json.hbs +0 -31
- package/templates/plugin-common-library/portable-template.yaml +0 -3
- package/templates/plugin-common-library/src/index.ts.hbs +0 -19
- package/templates/plugin-common-library/src/setupTests.ts +0 -1
- package/templates/plugin-node-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-node-library/README.md.hbs +0 -5
- package/templates/plugin-node-library/package.json.hbs +0 -30
- package/templates/plugin-node-library/portable-template.yaml +0 -3
- package/templates/plugin-node-library/src/index.ts.hbs +0 -18
- package/templates/plugin-node-library/src/setupTests.ts +0 -1
- package/templates/plugin-web-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-web-library/README.md.hbs +0 -5
- package/templates/plugin-web-library/package.json.hbs +0 -42
- package/templates/plugin-web-library/portable-template.yaml +0 -3
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx +0 -17
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx +0 -28
- package/templates/plugin-web-library/src/components/ExampleComponent/index.ts +0 -2
- package/templates/plugin-web-library/src/components/index.ts +0 -5
- package/templates/plugin-web-library/src/hooks/index.ts +0 -5
- package/templates/plugin-web-library/src/hooks/useExample/index.ts +0 -1
- package/templates/plugin-web-library/src/hooks/useExample/useExample.ts +0 -15
- package/templates/plugin-web-library/src/index.ts.hbs +0 -12
- package/templates/plugin-web-library/src/setupTests.ts +0 -1
- package/templates/scaffolder-backend-module/.eslintrc.js.hbs +0 -1
- package/templates/scaffolder-backend-module/README.md.hbs +0 -5
- package/templates/scaffolder-backend-module/package.json.hbs +0 -36
- package/templates/scaffolder-backend-module/portable-template.yaml +0 -6
- package/templates/scaffolder-backend-module/src/actions/example.test.ts +0 -24
- package/templates/scaffolder-backend-module/src/actions/example.ts +0 -39
- package/templates/scaffolder-backend-module/src/index.ts.hbs +0 -8
- package/templates/scaffolder-backend-module/src/module.ts +0 -21
- package/templates/web-library/.eslintrc.js.hbs +0 -1
- package/templates/web-library/README.md.hbs +0 -12
- package/templates/web-library/package.json.hbs +0 -30
- package/templates/web-library/portable-template.yaml +0 -3
- package/templates/web-library/src/index.ts.hbs +0 -1
- package/templates/web-library/src/setupTests.ts +0 -1
- /package/dist/{packages/opaque-internal → opaque-internal}/src/OpaqueType.cjs.js +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function publishPreflightCheck(pkg) {
|
|
4
|
-
const { name, backstage } = pkg.packageJson;
|
|
5
|
-
if (!backstage || !name) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
const { role } = backstage;
|
|
9
|
-
if (role === "backend-plugin" || role === "backend-plugin-module" || role === "frontend-plugin") {
|
|
10
|
-
if (!backstage.pluginId) {
|
|
11
|
-
throw new Error(
|
|
12
|
-
`Plugin package ${name} is missing a backstage.pluginId, please run 'backstage-cli repo fix --publish'`
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
if (role === "backend-plugin" || role === "frontend-plugin") {
|
|
17
|
-
if (!backstage.pluginPackages) {
|
|
18
|
-
throw new Error(
|
|
19
|
-
`Plugin package ${name} is missing a backstage.pluginPackages, please run 'backstage-cli repo fix --publish'`
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (backstage.pluginId && (role === "common-library" || role === "node-library" || role === "web-library")) {
|
|
24
|
-
if (!backstage.pluginPackages) {
|
|
25
|
-
throw new Error(
|
|
26
|
-
`Plugin library package ${name} is missing a backstage.pluginPackages, please run 'backstage-cli repo fix --publish'`
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (role === "backend-plugin-module" || role === "frontend-plugin-module") {
|
|
31
|
-
if (backstage.pluginId && !backstage.pluginPackage) {
|
|
32
|
-
throw new Error(
|
|
33
|
-
`Plugin module package ${name} is missing a backstage.pluginPackage, please run 'backstage-cli repo fix --publish'`
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
exports.publishPreflightCheck = publishPreflightCheck;
|
|
40
|
-
//# sourceMappingURL=publishing.cjs.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var cliCommon = require('@backstage/cli-common');
|
|
5
|
-
var cliNode = require('@backstage/cli-node');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
10
|
-
|
|
11
|
-
async function findRoleFromCommand(opts) {
|
|
12
|
-
if (opts.role) {
|
|
13
|
-
return cliNode.PackageRoles.getRoleInfo(opts.role)?.role;
|
|
14
|
-
}
|
|
15
|
-
const pkg = await fs__default.default.readJson(cliCommon.targetPaths.resolve("package.json"));
|
|
16
|
-
const info = cliNode.PackageRoles.getRoleFromPackage(pkg);
|
|
17
|
-
if (!info) {
|
|
18
|
-
throw new Error(`Target package must have 'backstage.role' set`);
|
|
19
|
-
}
|
|
20
|
-
return info;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.findRoleFromCommand = findRoleFromCommand;
|
|
24
|
-
//# sourceMappingURL=role.cjs.js.map
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chokidar = require('chokidar');
|
|
4
|
-
var ctrlcWindows = require('ctrlc-windows');
|
|
5
|
-
var IpcServer = require('../ipc/IpcServer.cjs.js');
|
|
6
|
-
var ServerDataStore = require('../ipc/ServerDataStore.cjs.js');
|
|
7
|
-
var debounce = require('lodash/debounce');
|
|
8
|
-
var node_url = require('node:url');
|
|
9
|
-
var path = require('node:path');
|
|
10
|
-
var cliCommon = require('@backstage/cli-common');
|
|
11
|
-
var spawn = require('cross-spawn');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var debounce__default = /*#__PURE__*/_interopDefaultCompat(debounce);
|
|
16
|
-
var spawn__default = /*#__PURE__*/_interopDefaultCompat(spawn);
|
|
17
|
-
|
|
18
|
-
const loaderArgs = [
|
|
19
|
-
"--enable-source-maps",
|
|
20
|
-
"--require",
|
|
21
|
-
require.resolve("@backstage/cli/config/nodeTransform.cjs")
|
|
22
|
-
// TODO: Support modules, although there's currently no way to load them since import() is transpiled tp require()
|
|
23
|
-
];
|
|
24
|
-
async function runBackend(options) {
|
|
25
|
-
const envEnv = process.env;
|
|
26
|
-
if (!envEnv.NODE_ENV) {
|
|
27
|
-
envEnv.NODE_ENV = "development";
|
|
28
|
-
}
|
|
29
|
-
const server = new IpcServer.IpcServer();
|
|
30
|
-
ServerDataStore.ServerDataStore.bind(server);
|
|
31
|
-
let exiting = false;
|
|
32
|
-
let firstStart = true;
|
|
33
|
-
let child;
|
|
34
|
-
let watcher = void 0;
|
|
35
|
-
let shutdownPromise = void 0;
|
|
36
|
-
const watchedPaths = /* @__PURE__ */ new Set();
|
|
37
|
-
const restart = debounce__default.default(async () => {
|
|
38
|
-
if (firstStart) {
|
|
39
|
-
firstStart = false;
|
|
40
|
-
} else {
|
|
41
|
-
console.log();
|
|
42
|
-
console.log("Change detected, restarting the development server...");
|
|
43
|
-
console.log();
|
|
44
|
-
}
|
|
45
|
-
if (shutdownPromise) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (child && !child.killed && child.exitCode === null) {
|
|
49
|
-
shutdownPromise = new Promise((resolve) => child.once("exit", resolve));
|
|
50
|
-
if (process.platform === "win32" && child.pid) {
|
|
51
|
-
ctrlcWindows.ctrlc(child.pid);
|
|
52
|
-
} else {
|
|
53
|
-
child.kill();
|
|
54
|
-
}
|
|
55
|
-
await shutdownPromise;
|
|
56
|
-
shutdownPromise = void 0;
|
|
57
|
-
}
|
|
58
|
-
if (exiting) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const optionArgs = new Array();
|
|
62
|
-
if (options.inspectEnabled) {
|
|
63
|
-
const inspect = typeof options.inspectEnabled === "string" ? `--inspect=${options.inspectEnabled}` : "--inspect";
|
|
64
|
-
optionArgs.push(inspect);
|
|
65
|
-
} else if (options.inspectBrkEnabled) {
|
|
66
|
-
const inspect = typeof options.inspectBrkEnabled === "string" ? `--inspect-brk=${options.inspectBrkEnabled}` : "--inspect-brk";
|
|
67
|
-
optionArgs.push(inspect);
|
|
68
|
-
}
|
|
69
|
-
if (options.require) {
|
|
70
|
-
const requires = [options.require].flat();
|
|
71
|
-
for (const r of requires) {
|
|
72
|
-
optionArgs.push(`--require=${r}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (!envEnv.NODE_OPTIONS?.includes("--node-snapshot")) {
|
|
76
|
-
optionArgs.push("--no-node-snapshot");
|
|
77
|
-
}
|
|
78
|
-
const userArgs = process.argv.slice(["node", "backstage-cli", "package", "start"].length).filter((arg) => !optionArgs.includes(arg));
|
|
79
|
-
child = spawn__default.default(
|
|
80
|
-
process.execPath,
|
|
81
|
-
[...loaderArgs, ...optionArgs, options.entry, ...userArgs],
|
|
82
|
-
{
|
|
83
|
-
stdio: ["ignore", "inherit", "inherit", "ipc"],
|
|
84
|
-
cwd: options.targetDir,
|
|
85
|
-
env: {
|
|
86
|
-
...process.env,
|
|
87
|
-
BACKSTAGE_CLI_LINKED_WORKSPACE: options.linkedWorkspace,
|
|
88
|
-
BACKSTAGE_CLI_CHANNEL: "1",
|
|
89
|
-
ESBK_TSCONFIG_PATH: cliCommon.targetPaths.resolveRoot("tsconfig.json")
|
|
90
|
-
},
|
|
91
|
-
serialization: "advanced"
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
server.addChild(child);
|
|
95
|
-
child.on("message", (data) => {
|
|
96
|
-
if (!watcher) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (typeof data === "object" && data?.type === "watch") {
|
|
100
|
-
let path$1 = data.path;
|
|
101
|
-
if (path$1.startsWith("file:")) {
|
|
102
|
-
path$1 = node_url.fileURLToPath(path$1);
|
|
103
|
-
}
|
|
104
|
-
if (path.isAbsolute(path$1) && !watchedPaths.has(path$1)) {
|
|
105
|
-
watchedPaths.add(path$1);
|
|
106
|
-
watcher.add(path$1);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}, 100);
|
|
111
|
-
restart();
|
|
112
|
-
watcher = chokidar.watch(["./package.json"], {
|
|
113
|
-
cwd: process.cwd(),
|
|
114
|
-
ignoreInitial: true,
|
|
115
|
-
ignorePermissionErrors: true
|
|
116
|
-
}).on("all", restart);
|
|
117
|
-
process.stdin.on("data", restart);
|
|
118
|
-
const exitPromise = new Promise((resolveExitPromise) => {
|
|
119
|
-
async function handleSignal(signal) {
|
|
120
|
-
exiting = true;
|
|
121
|
-
if (child && child.exitCode === null) {
|
|
122
|
-
await new Promise((resolve) => {
|
|
123
|
-
child.on("close", resolve);
|
|
124
|
-
child.kill(signal);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
resolveExitPromise();
|
|
128
|
-
}
|
|
129
|
-
process.once("SIGINT", handleSignal);
|
|
130
|
-
process.once("SIGTERM", handleSignal);
|
|
131
|
-
});
|
|
132
|
-
return () => exitPromise;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
exports.runBackend = runBackend;
|
|
136
|
-
//# sourceMappingURL=runBackend.cjs.js.map
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var cliNode = require('@backstage/cli-node');
|
|
4
|
-
var path = require('node:path');
|
|
5
|
-
var tsMorph = require('ts-morph');
|
|
6
|
-
var cliCommon = require('@backstage/cli-common');
|
|
7
|
-
|
|
8
|
-
const createTypeDistProject = async () => {
|
|
9
|
-
return new tsMorph.Project({
|
|
10
|
-
tsConfigFilePath: cliCommon.targetPaths.resolveRoot("tsconfig.json"),
|
|
11
|
-
skipAddingFilesFromTsConfig: true
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
const targetPackageRoles = [
|
|
15
|
-
"backend-plugin",
|
|
16
|
-
"backend-plugin-module",
|
|
17
|
-
"frontend-plugin",
|
|
18
|
-
"frontend-plugin-module",
|
|
19
|
-
"web-library",
|
|
20
|
-
"node-library"
|
|
21
|
-
];
|
|
22
|
-
const getEntryPointDefaultFeatureType = (role, packageDir, project, entryPoint) => {
|
|
23
|
-
if (isTargetPackageRole(role)) {
|
|
24
|
-
const distPath = path.resolve(packageDir, entryPoint);
|
|
25
|
-
try {
|
|
26
|
-
const defaultFeatureType = getSourceFileDefaultFeatureType(
|
|
27
|
-
project.addSourceFileAtPath(distPath)
|
|
28
|
-
);
|
|
29
|
-
if (defaultFeatureType) {
|
|
30
|
-
return defaultFeatureType;
|
|
31
|
-
}
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.error(
|
|
34
|
-
`Failed to extract default feature type from ${distPath}, ${error}. Your package will publish fine but it may be missing metadata about its default feature.`
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
};
|
|
40
|
-
function getSourceFileDefaultFeatureType(sourceFile) {
|
|
41
|
-
for (const exportSymbol of sourceFile.getExportSymbols()) {
|
|
42
|
-
const declaration = exportSymbol.getDeclarations()[0];
|
|
43
|
-
const exportName = declaration.getSymbol()?.getName();
|
|
44
|
-
if (exportName !== "default") {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
let exportType;
|
|
48
|
-
if (declaration) {
|
|
49
|
-
if (declaration.isKind(tsMorph.SyntaxKind.ExportAssignment)) {
|
|
50
|
-
exportType = declaration.getExpression().getType();
|
|
51
|
-
} else if (declaration.isKind(tsMorph.SyntaxKind.ExportSpecifier)) {
|
|
52
|
-
if (!declaration.isTypeOnly()) {
|
|
53
|
-
exportType = declaration.getType();
|
|
54
|
-
}
|
|
55
|
-
} else if (declaration.isKind(tsMorph.SyntaxKind.VariableDeclaration)) {
|
|
56
|
-
exportType = declaration.getType();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (exportName && exportType) {
|
|
60
|
-
const $$type = getBackstagePackageFeature$$TypeFromType(exportType);
|
|
61
|
-
if ($$type) {
|
|
62
|
-
return $$type;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
function getBackstagePackageFeature$$TypeFromType(type) {
|
|
69
|
-
const exportType = type.getTargetType() ?? type;
|
|
70
|
-
for (const property of exportType.getProperties()) {
|
|
71
|
-
if (property.getName() === "$$type") {
|
|
72
|
-
const $$type = property.getValueDeclaration()?.getText().match(/(\$\$type: '(?<type>.+)')/)?.groups?.type;
|
|
73
|
-
if ($$type && isTargetFeatureType($$type)) {
|
|
74
|
-
return $$type;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
function isTargetPackageRole(role) {
|
|
81
|
-
return !!role && targetPackageRoles.includes(role);
|
|
82
|
-
}
|
|
83
|
-
function isTargetFeatureType(type) {
|
|
84
|
-
return !!type && cliNode.packageFeatureType.includes(type);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
exports.createTypeDistProject = createTypeDistProject;
|
|
88
|
-
exports.getEntryPointDefaultFeatureType = getEntryPointDefaultFeatureType;
|
|
89
|
-
//# sourceMappingURL=typeDistProject.cjs.js.map
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var cleye = require('cleye');
|
|
6
|
-
var configLoader = require('@backstage/config-loader');
|
|
7
|
-
var openBrowser = require('react-dev-utils/openBrowser');
|
|
8
|
-
var chalk = require('chalk');
|
|
9
|
-
var config = require('../lib/config.cjs.js');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
var openBrowser__default = /*#__PURE__*/_interopDefaultCompat(openBrowser);
|
|
14
|
-
var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
|
|
15
|
-
|
|
16
|
-
const DOCS_URL = "https://config.backstage.io";
|
|
17
|
-
var docs = async ({ args, info }) => {
|
|
18
|
-
const {
|
|
19
|
-
flags: { package: pkg }
|
|
20
|
-
} = cleye.cli(
|
|
21
|
-
{
|
|
22
|
-
help: info,
|
|
23
|
-
flags: {
|
|
24
|
-
package: {
|
|
25
|
-
type: String,
|
|
26
|
-
description: "Only include the schema that applies to the given package"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
void 0,
|
|
31
|
-
args
|
|
32
|
-
);
|
|
33
|
-
const { schema: appSchemas } = await config.loadCliConfig({
|
|
34
|
-
args: [],
|
|
35
|
-
fromPackage: pkg,
|
|
36
|
-
mockEnv: true
|
|
37
|
-
});
|
|
38
|
-
const schema = configLoader.mergeConfigSchemas(
|
|
39
|
-
appSchemas.serialize().schemas.map(
|
|
40
|
-
(_) => _.value
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
const url = `${DOCS_URL}#schema=${JSON.stringify(schema)}`;
|
|
44
|
-
console.log();
|
|
45
|
-
console.log(
|
|
46
|
-
chalk__default.default.cyan(
|
|
47
|
-
"Opening configuration reference documentation in your browser..."
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
console.log(` ${chalk__default.default.cyan(url)}`);
|
|
51
|
-
console.log();
|
|
52
|
-
const opened = openBrowser__default.default(url);
|
|
53
|
-
if (!opened) {
|
|
54
|
-
console.log(
|
|
55
|
-
chalk__default.default.yellow("\u26A0\uFE0F WARNING: Unable to open browser automatically.")
|
|
56
|
-
);
|
|
57
|
-
console.log(chalk__default.default.yellow("Please open the URL manually in your browser."));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.default = docs;
|
|
62
|
-
//# sourceMappingURL=docs.cjs.js.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var cleye = require('cleye');
|
|
6
|
-
var yaml = require('yaml');
|
|
7
|
-
var config$1 = require('@backstage/config');
|
|
8
|
-
var config = require('../lib/config.cjs.js');
|
|
9
|
-
|
|
10
|
-
var print = async ({ args, info }) => {
|
|
11
|
-
const {
|
|
12
|
-
flags: { config: config$1, lax, frontend, withSecrets, format, package: pkg }
|
|
13
|
-
} = cleye.cli(
|
|
14
|
-
{
|
|
15
|
-
help: info,
|
|
16
|
-
flags: {
|
|
17
|
-
package: { type: String, description: "Package to print config for" },
|
|
18
|
-
lax: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
description: "Do not require environment variables to be set"
|
|
21
|
-
},
|
|
22
|
-
frontend: { type: Boolean, description: "Only print frontend config" },
|
|
23
|
-
withSecrets: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
description: "Include secrets in the output"
|
|
26
|
-
},
|
|
27
|
-
format: { type: String, description: "Output format (yaml or json)" },
|
|
28
|
-
config: {
|
|
29
|
-
type: [String],
|
|
30
|
-
description: "Config files to load instead of app-config.yaml"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
void 0,
|
|
35
|
-
args
|
|
36
|
-
);
|
|
37
|
-
const { schema, appConfigs } = await config.loadCliConfig({
|
|
38
|
-
args: config$1,
|
|
39
|
-
fromPackage: pkg,
|
|
40
|
-
mockEnv: lax,
|
|
41
|
-
fullVisibility: !frontend
|
|
42
|
-
});
|
|
43
|
-
const visibility = getVisibilityOption(frontend, withSecrets);
|
|
44
|
-
const data = serializeConfigData(appConfigs, schema, visibility);
|
|
45
|
-
if (format === "json") {
|
|
46
|
-
process.stdout.write(`${JSON.stringify(data, null, 2)}
|
|
47
|
-
`);
|
|
48
|
-
} else {
|
|
49
|
-
process.stdout.write(`${yaml.stringify(data)}
|
|
50
|
-
`);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
function getVisibilityOption(frontend, withSecrets) {
|
|
54
|
-
if (frontend && withSecrets) {
|
|
55
|
-
throw new Error("Not allowed to combine frontend and secret config");
|
|
56
|
-
}
|
|
57
|
-
if (frontend) {
|
|
58
|
-
return "frontend";
|
|
59
|
-
} else if (withSecrets) {
|
|
60
|
-
return "secret";
|
|
61
|
-
}
|
|
62
|
-
return "backend";
|
|
63
|
-
}
|
|
64
|
-
function serializeConfigData(appConfigs, schema, visibility) {
|
|
65
|
-
if (visibility === "frontend") {
|
|
66
|
-
const frontendConfigs = schema.process(appConfigs, {
|
|
67
|
-
visibility: ["frontend"]
|
|
68
|
-
});
|
|
69
|
-
return config$1.ConfigReader.fromConfigs(frontendConfigs).get();
|
|
70
|
-
} else if (visibility === "secret") {
|
|
71
|
-
return config$1.ConfigReader.fromConfigs(appConfigs).get();
|
|
72
|
-
}
|
|
73
|
-
const sanitizedConfigs = schema.process(appConfigs, {
|
|
74
|
-
valueTransform: (value, context) => context.visibility === "secret" ? "<secret>" : value
|
|
75
|
-
});
|
|
76
|
-
return config$1.ConfigReader.fromConfigs(sanitizedConfigs).get();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
exports.default = print;
|
|
80
|
-
//# sourceMappingURL=print.cjs.js.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var cleye = require('cleye');
|
|
6
|
-
var yaml = require('yaml');
|
|
7
|
-
var config = require('../lib/config.cjs.js');
|
|
8
|
-
var configLoader = require('@backstage/config-loader');
|
|
9
|
-
|
|
10
|
-
var schema = async ({ args, info }) => {
|
|
11
|
-
const {
|
|
12
|
-
flags: { merge, format, package: pkg }
|
|
13
|
-
} = cleye.cli(
|
|
14
|
-
{
|
|
15
|
-
help: info,
|
|
16
|
-
flags: {
|
|
17
|
-
package: { type: String, description: "Package to print schema for" },
|
|
18
|
-
format: { type: String, description: "Output format (yaml or json)" },
|
|
19
|
-
merge: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
description: "Merge all schemas into a single schema"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
void 0,
|
|
26
|
-
args
|
|
27
|
-
);
|
|
28
|
-
const { schema } = await config.loadCliConfig({
|
|
29
|
-
args: [],
|
|
30
|
-
fromPackage: pkg,
|
|
31
|
-
mockEnv: true
|
|
32
|
-
});
|
|
33
|
-
let configSchema;
|
|
34
|
-
if (merge) {
|
|
35
|
-
configSchema = configLoader.mergeConfigSchemas(
|
|
36
|
-
schema.serialize().schemas.map(
|
|
37
|
-
(_) => _.value
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
configSchema.title = "Application Configuration Schema";
|
|
41
|
-
configSchema.description = "This is the schema describing the structure of the app-config.yaml configuration file.";
|
|
42
|
-
} else {
|
|
43
|
-
configSchema = schema.serialize();
|
|
44
|
-
}
|
|
45
|
-
if (format === "json") {
|
|
46
|
-
process.stdout.write(`${JSON.stringify(configSchema, null, 2)}
|
|
47
|
-
`);
|
|
48
|
-
} else {
|
|
49
|
-
process.stdout.write(`${yaml.stringify(configSchema)}
|
|
50
|
-
`);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.default = schema;
|
|
55
|
-
//# sourceMappingURL=schema.cjs.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var cleye = require('cleye');
|
|
6
|
-
var config = require('../lib/config.cjs.js');
|
|
7
|
-
|
|
8
|
-
var validate = async ({ args, info }) => {
|
|
9
|
-
const {
|
|
10
|
-
flags: { config: config$1, lax, frontend, deprecated, strict, package: pkg }
|
|
11
|
-
} = cleye.cli(
|
|
12
|
-
{
|
|
13
|
-
help: info,
|
|
14
|
-
flags: {
|
|
15
|
-
package: {
|
|
16
|
-
type: String,
|
|
17
|
-
description: "Package to validate config for"
|
|
18
|
-
},
|
|
19
|
-
lax: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
description: "Do not require environment variables to be set"
|
|
22
|
-
},
|
|
23
|
-
frontend: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
description: "Only validate frontend config"
|
|
26
|
-
},
|
|
27
|
-
deprecated: { type: Boolean, description: "Output deprecated keys" },
|
|
28
|
-
strict: { type: Boolean, description: "Enable strict validation" },
|
|
29
|
-
config: {
|
|
30
|
-
type: [String],
|
|
31
|
-
description: "Config files to load instead of app-config.yaml"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
void 0,
|
|
36
|
-
args
|
|
37
|
-
);
|
|
38
|
-
await config.loadCliConfig({
|
|
39
|
-
args: config$1,
|
|
40
|
-
fromPackage: pkg,
|
|
41
|
-
mockEnv: lax,
|
|
42
|
-
fullVisibility: !frontend,
|
|
43
|
-
withDeprecatedKeys: deprecated,
|
|
44
|
-
strict
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports.default = validate;
|
|
49
|
-
//# sourceMappingURL=validate.cjs.js.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var factory = require('../../wiring/factory.cjs.js');
|
|
6
|
-
|
|
7
|
-
const configOption = [
|
|
8
|
-
"--config <path>",
|
|
9
|
-
"Config files to load instead of app-config.yaml",
|
|
10
|
-
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
11
|
-
Array()
|
|
12
|
-
];
|
|
13
|
-
var index = factory.createCliPlugin({
|
|
14
|
-
pluginId: "config",
|
|
15
|
-
init: async (reg) => {
|
|
16
|
-
reg.addCommand({
|
|
17
|
-
path: ["config:docs"],
|
|
18
|
-
description: "Browse the configuration reference documentation",
|
|
19
|
-
execute: { loader: () => import('./commands/docs.cjs.js') }
|
|
20
|
-
});
|
|
21
|
-
reg.addCommand({
|
|
22
|
-
path: ["config", "docs"],
|
|
23
|
-
description: "Browse the configuration reference documentation",
|
|
24
|
-
execute: { loader: () => import('./commands/docs.cjs.js') }
|
|
25
|
-
});
|
|
26
|
-
reg.addCommand({
|
|
27
|
-
path: ["config:print"],
|
|
28
|
-
description: "Print the app configuration for the current package",
|
|
29
|
-
execute: { loader: () => import('./commands/print.cjs.js') }
|
|
30
|
-
});
|
|
31
|
-
reg.addCommand({
|
|
32
|
-
path: ["config:check"],
|
|
33
|
-
description: "Validate that the given configuration loads and matches schema",
|
|
34
|
-
execute: { loader: () => import('./commands/validate.cjs.js') }
|
|
35
|
-
});
|
|
36
|
-
reg.addCommand({
|
|
37
|
-
path: ["config:schema"],
|
|
38
|
-
description: "Print the JSON schema for the given configuration",
|
|
39
|
-
execute: { loader: () => import('./commands/schema.cjs.js') }
|
|
40
|
-
});
|
|
41
|
-
reg.addCommand({
|
|
42
|
-
path: ["config", "schema"],
|
|
43
|
-
description: "Print the JSON schema for the given configuration",
|
|
44
|
-
execute: { loader: () => import('./commands/schema.cjs.js') }
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
exports.configOption = configOption;
|
|
50
|
-
exports.default = index;
|
|
51
|
-
//# sourceMappingURL=index.cjs.js.map
|