@backstage/cli 0.32.0-next.1 → 0.32.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 +117 -0
- package/bin/backstage-cli-alpha +0 -0
- package/config/eslint-factory.js +20 -1
- package/dist/commands/index.cjs.js +23 -57
- package/dist/lib/errors.cjs.js +1 -1
- package/dist/lib/removed.cjs.js +13 -0
- package/dist/lib/runner/runBackend.cjs.js +1 -0
- package/dist/modules/build/lib/bundler/server.cjs.js +9 -3
- package/dist/modules/build/lib/packager/productionPack.cjs.js +6 -6
- package/dist/modules/config/lib/config.cjs.js +4 -2
- package/dist/{commands → modules/create-github-app/commands}/create-github-app/index.cjs.js +1 -1
- package/dist/modules/create-github-app/index.cjs.js +15 -0
- package/dist/{commands/new → modules/new/commands}/new.cjs.js +1 -1
- package/dist/modules/new/index.cjs.js +35 -0
- package/dist/{lib/new → modules/new/lib}/execution/PortableTemplater.cjs.js +5 -5
- package/dist/{lib/new → modules/new/lib}/execution/executePortableTemplate.cjs.js +2 -2
- package/dist/{lib/new → modules/new/lib}/execution/installNewPackage.cjs.js +2 -2
- package/dist/{lib/new → modules/new/lib}/execution/writeTemplateContents.cjs.js +1 -1
- package/dist/{lib/new → modules/new/lib}/preparation/collectPortableTemplateInput.cjs.js +2 -2
- package/dist/{lib/new → modules/new/lib}/preparation/loadPortableTemplate.cjs.js +1 -1
- package/dist/{lib/new → modules/new/lib}/preparation/loadPortableTemplateConfig.cjs.js +1 -1
- package/dist/modules/start/commands/package/start/command.cjs.js +22 -0
- package/dist/modules/start/commands/package/start/resolveLinkedWorkspace.cjs.js +34 -0
- package/dist/{commands → modules/start/commands/package}/start/startBackend.cjs.js +6 -3
- package/dist/{commands → modules/start/commands/package}/start/startFrontend.cjs.js +9 -8
- package/dist/modules/start/commands/package/start/startPackage.cjs.js +42 -0
- package/dist/modules/start/commands/repo/start.cjs.js +150 -0
- package/dist/modules/start/index.cjs.js +38 -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 +1 -1
- 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 +29 -28
- package/templates/backend-plugin/README.md.hbs +1 -1
- package/templates/backend-plugin/src/plugin.ts.hbs +2 -4
- package/templates/backend-plugin/src/services/TodoListService/createTodoListService.ts +3 -11
- package/templates/frontend-plugin/dev/index.tsx.hbs +0 -1
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -1
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -1
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -1
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -1
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx +17 -18
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx +28 -29
- package/dist/commands/start/command.cjs.js +0 -75
- /package/dist/{commands → modules/create-github-app/commands}/create-github-app/GithubCreateAppServer.cjs.js +0 -0
- /package/dist/{lib/new → modules/new/lib}/createNewPackage.cjs.js +0 -0
- /package/dist/{lib/new → modules/new/lib}/defaultTemplates.cjs.js +0 -0
- /package/dist/{lib/new → modules/new/lib}/preparation/resolvePackageParams.cjs.js +0 -0
- /package/dist/{lib/new → modules/new/lib}/preparation/selectTemplateInteractively.cjs.js +0 -0
- /package/dist/{lib/new → modules/new/lib}/types.cjs.js +0 -0
- /package/dist/{commands → modules/start/commands/package}/start/index.cjs.js +0 -0
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
1
|
+
import { Typography } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link ExampleComponent}.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ExampleComponentProps {
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Displays an example.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* Longer descriptions should be put after the `@remarks` tag. That way the initial summary
|
|
18
|
+
* will show up in the API docs overview section, while the longer description will only be
|
|
19
|
+
* displayed on the page for the specific API.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export function ExampleComponent(props: ExampleComponentProps) {
|
|
24
|
+
// By destructuring props here rather than in the signature the API docs will look nicer
|
|
25
|
+
const { message = 'Hello World' } = props;
|
|
26
|
+
|
|
27
|
+
return <Typography variant="h1">{message}</Typography>;
|
|
28
|
+
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs-extra');
|
|
4
|
-
var node_path = require('node:path');
|
|
5
|
-
var role = require('../../lib/role.cjs.js');
|
|
6
|
-
var startBackend = require('./startBackend.cjs.js');
|
|
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);
|
|
13
|
-
|
|
14
|
-
async function command(opts) {
|
|
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
|
-
}
|
|
35
|
-
const options = {
|
|
36
|
-
configPaths: opts.config,
|
|
37
|
-
checksEnabled: Boolean(opts.check),
|
|
38
|
-
linkedWorkspace: opts.link,
|
|
39
|
-
inspectEnabled: opts.inspect,
|
|
40
|
-
inspectBrkEnabled: opts.inspectBrk,
|
|
41
|
-
require: opts.require
|
|
42
|
-
};
|
|
43
|
-
switch (role$1) {
|
|
44
|
-
case "backend":
|
|
45
|
-
return startBackend.startBackend(options);
|
|
46
|
-
case "backend-plugin":
|
|
47
|
-
case "backend-plugin-module":
|
|
48
|
-
case "node-library":
|
|
49
|
-
return startBackend.startBackendPlugin(options);
|
|
50
|
-
case "frontend":
|
|
51
|
-
return startFrontend.startFrontend({
|
|
52
|
-
...options,
|
|
53
|
-
entry: "src/index",
|
|
54
|
-
verifyVersions: true
|
|
55
|
-
});
|
|
56
|
-
case "web-library":
|
|
57
|
-
case "frontend-plugin":
|
|
58
|
-
case "frontend-plugin-module":
|
|
59
|
-
return startFrontend.startFrontend({ entry: "dev/index", ...options });
|
|
60
|
-
case "frontend-dynamic-container":
|
|
61
|
-
return startFrontend.startFrontend({
|
|
62
|
-
entry: "src/index",
|
|
63
|
-
...options,
|
|
64
|
-
skipOpenBrowser: true,
|
|
65
|
-
isModuleFederationRemote: true
|
|
66
|
-
});
|
|
67
|
-
default:
|
|
68
|
-
throw new Error(
|
|
69
|
-
`Start command is not supported for package role '${role$1}'`
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
exports.command = command;
|
|
75
|
-
//# sourceMappingURL=command.cjs.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|