@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.
Files changed (62) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/bin/backstage-cli-alpha +0 -0
  3. package/config/eslint-factory.js +20 -1
  4. package/dist/commands/index.cjs.js +23 -57
  5. package/dist/lib/errors.cjs.js +1 -1
  6. package/dist/lib/removed.cjs.js +13 -0
  7. package/dist/lib/runner/runBackend.cjs.js +1 -0
  8. package/dist/modules/build/lib/bundler/server.cjs.js +9 -3
  9. package/dist/modules/build/lib/packager/productionPack.cjs.js +6 -6
  10. package/dist/modules/config/lib/config.cjs.js +4 -2
  11. package/dist/{commands → modules/create-github-app/commands}/create-github-app/index.cjs.js +1 -1
  12. package/dist/modules/create-github-app/index.cjs.js +15 -0
  13. package/dist/{commands/new → modules/new/commands}/new.cjs.js +1 -1
  14. package/dist/modules/new/index.cjs.js +35 -0
  15. package/dist/{lib/new → modules/new/lib}/execution/PortableTemplater.cjs.js +5 -5
  16. package/dist/{lib/new → modules/new/lib}/execution/executePortableTemplate.cjs.js +2 -2
  17. package/dist/{lib/new → modules/new/lib}/execution/installNewPackage.cjs.js +2 -2
  18. package/dist/{lib/new → modules/new/lib}/execution/writeTemplateContents.cjs.js +1 -1
  19. package/dist/{lib/new → modules/new/lib}/preparation/collectPortableTemplateInput.cjs.js +2 -2
  20. package/dist/{lib/new → modules/new/lib}/preparation/loadPortableTemplate.cjs.js +1 -1
  21. package/dist/{lib/new → modules/new/lib}/preparation/loadPortableTemplateConfig.cjs.js +1 -1
  22. package/dist/modules/start/commands/package/start/command.cjs.js +22 -0
  23. package/dist/modules/start/commands/package/start/resolveLinkedWorkspace.cjs.js +34 -0
  24. package/dist/{commands → modules/start/commands/package}/start/startBackend.cjs.js +6 -3
  25. package/dist/{commands → modules/start/commands/package}/start/startFrontend.cjs.js +9 -8
  26. package/dist/modules/start/commands/package/start/startPackage.cjs.js +42 -0
  27. package/dist/modules/start/commands/repo/start.cjs.js +150 -0
  28. package/dist/modules/start/index.cjs.js +38 -0
  29. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  30. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  31. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  32. package/dist/packages/cli/package.json.cjs.js +1 -1
  33. package/dist/packages/core-app-api/package.json.cjs.js +1 -1
  34. package/dist/packages/core-components/package.json.cjs.js +1 -1
  35. package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
  36. package/dist/packages/dev-utils/package.json.cjs.js +1 -1
  37. package/dist/packages/test-utils/package.json.cjs.js +1 -1
  38. package/dist/packages/theme/package.json.cjs.js +1 -1
  39. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  40. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  41. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  42. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  43. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  44. package/package.json +29 -28
  45. package/templates/backend-plugin/README.md.hbs +1 -1
  46. package/templates/backend-plugin/src/plugin.ts.hbs +2 -4
  47. package/templates/backend-plugin/src/services/TodoListService/createTodoListService.ts +3 -11
  48. package/templates/frontend-plugin/dev/index.tsx.hbs +0 -1
  49. package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -1
  50. package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -1
  51. package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -1
  52. package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -1
  53. package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx +17 -18
  54. package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx +28 -29
  55. package/dist/commands/start/command.cjs.js +0 -75
  56. /package/dist/{commands → modules/create-github-app/commands}/create-github-app/GithubCreateAppServer.cjs.js +0 -0
  57. /package/dist/{lib/new → modules/new/lib}/createNewPackage.cjs.js +0 -0
  58. /package/dist/{lib/new → modules/new/lib}/defaultTemplates.cjs.js +0 -0
  59. /package/dist/{lib/new → modules/new/lib}/preparation/resolvePackageParams.cjs.js +0 -0
  60. /package/dist/{lib/new → modules/new/lib}/preparation/selectTemplateInteractively.cjs.js +0 -0
  61. /package/dist/{lib/new → modules/new/lib}/types.cjs.js +0 -0
  62. /package/dist/{commands → modules/start/commands/package}/start/index.cjs.js +0 -0
@@ -1,29 +1,28 @@
1
- import React from 'react';
2
- import { Typography } from '@material-ui/core';
3
-
4
- /**
5
- * Props for {@link ExampleComponent}.
6
- *
7
- * @public
8
- */
9
- export interface ExampleComponentProps {
10
- message?: string;
11
- }
12
-
13
- /**
14
- * Displays an example.
15
- *
16
- * @remarks
17
- *
18
- * Longer descriptions should be put after the `@remarks` tag. That way the initial summary
19
- * will show up in the API docs overview section, while the longer description will only be
20
- * displayed on the page for the specific API.
21
- *
22
- * @public
23
- */
24
- export function ExampleComponent(props: ExampleComponentProps) {
25
- // By destructuring props here rather than in the signature the API docs will look nicer
26
- const { message = 'Hello World' } = props;
27
-
28
- return <Typography variant="h1">{message}</Typography>;
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