@backstage/cli 0.34.4-next.0 → 0.34.4-next.2

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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.34.4-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ab96bb7: Added a new `--entrypoint` option to the `package start` command, which allows you to specify a custom entry directory/file for development applications. This is particularly useful when maintaining separate dev apps for different versions of your plugin (e.g., stable and alpha).
8
+
9
+ **Example usage:**
10
+
11
+ Consider the following plugin dev folder structure:
12
+
13
+ ```
14
+ dev/
15
+ index.tsx
16
+ alpha/
17
+ index.ts
18
+ ```
19
+
20
+ - The default `yarn package start` command uses the `dev/` folder as the entry point and executes `dev/index.tsx` file;
21
+ - Running `yarn package start --entrypoint dev/alpha` will instead use `dev/alpha/` as the entry point and execute `dev/alpha/index.ts` file.
22
+
23
+ ## 0.34.4-next.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+ - @backstage/config-loader@1.10.4-next.0
29
+ - @backstage/config@1.3.4-next.0
30
+ - @backstage/integration@1.18.1-next.1
31
+ - @backstage/cli-node@0.2.14
32
+ - @backstage/release-manifests@0.0.13
33
+
3
34
  ## 0.34.4-next.0
4
35
 
5
36
  ### Patch Changes
@@ -8,6 +8,7 @@ var paths = require('../../../../../lib/paths.cjs.js');
8
8
  async function command(opts) {
9
9
  await startPackage.startPackage({
10
10
  role: await role.findRoleFromCommand(opts),
11
+ entrypoint: opts.entrypoint,
11
12
  targetDir: paths.paths.targetDir,
12
13
  configPaths: opts.config,
13
14
  checksEnabled: Boolean(opts.check),
@@ -2,7 +2,17 @@
2
2
 
3
3
  var startBackend = require('./startBackend.cjs.js');
4
4
  var startFrontend = require('./startFrontend.cjs.js');
5
+ var path = require('path');
6
+ var glob = require('glob');
5
7
 
8
+ function resolveEntryPath(entrypoint = "dev", targetDir) {
9
+ const { dir: entryDir, name: entryName } = path.parse(entrypoint);
10
+ const [entryFile] = glob.glob.sync(`${path.resolve(targetDir, entryDir, entryName)}.*`);
11
+ if (entryFile) {
12
+ return path.join(entryDir, entryName);
13
+ }
14
+ return path.join(entryDir, entryName, "index");
15
+ }
6
16
  async function startPackage(options) {
7
17
  switch (options.role) {
8
18
  case "backend":
@@ -21,8 +31,8 @@ async function startPackage(options) {
21
31
  case "frontend-plugin":
22
32
  case "frontend-plugin-module":
23
33
  return startFrontend.startFrontend({
24
- entry: "dev/index",
25
- ...options
34
+ ...options,
35
+ entry: resolveEntryPath(options.entrypoint, options.targetDir)
26
36
  });
27
37
  case "frontend-dynamic-container":
28
38
  return startFrontend.startFrontend({
@@ -38,5 +48,6 @@ async function startPackage(options) {
38
48
  }
39
49
  }
40
50
 
51
+ exports.resolveEntryPath = resolveEntryPath;
41
52
  exports.startPackage = startPackage;
42
53
  //# sourceMappingURL=startPackage.cjs.js.map
@@ -89,6 +89,9 @@ const buildPlugin = factory.createCliPlugin({
89
89
  ).option(
90
90
  "--link <path>",
91
91
  "Link an external workspace for module resolution"
92
+ ).option(
93
+ "--entrypoint <path>",
94
+ 'The entrypoint to start from, relative to the package root. Can point to either a file (without extension) or a directory (in which case the index file in that directory is used). Defaults to "dev"'
92
95
  ).action(lazy.lazy(() => import('./commands/package/start/index.cjs.js'), "command"));
93
96
  await defaultCommand.parseAsync(args, { from: "user" });
94
97
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.13.0-next.0";
3
+ var version = "0.13.0-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.4.3";
3
+ var version = "1.4.4-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.9.1-next.0";
3
+ var version = "1.9.1-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.34.4-next.0";
3
+ var version = "0.34.4-next.2";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.3.3";
3
+ var version = "1.3.5-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.19.0";
3
+ var version = "1.19.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.18.2-next.0";
3
+ var version = "0.18.2-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.11.0";
3
+ var version = "1.11.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.1.15-next.0";
3
+ var version = "1.1.15-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.2-next.0";
3
+ var version = "0.3.2-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.12.1-next.0";
3
+ var version = "0.12.1-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.7-next.0";
3
+ var version = "0.3.7-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.7.11";
3
+ var version = "1.7.12-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.6.8";
3
+ var version = "0.6.9-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.25.4";
3
+ var version = "0.25.5-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.2.12";
3
+ var version = "0.2.13-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.19.0";
3
+ var version = "1.19.1-next.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.12.0-next.0";
3
+ var version = "0.12.0-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.4-next.0";
3
+ var version = "0.3.4-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.34.4-next.0",
3
+ "version": "0.34.4-next.2",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -50,11 +50,11 @@
50
50
  "@backstage/catalog-model": "1.7.5",
51
51
  "@backstage/cli-common": "0.1.15",
52
52
  "@backstage/cli-node": "0.2.14",
53
- "@backstage/config": "1.3.3",
54
- "@backstage/config-loader": "1.10.3",
53
+ "@backstage/config": "1.3.5-next.0",
54
+ "@backstage/config-loader": "1.10.5-next.0",
55
55
  "@backstage/errors": "1.2.7",
56
56
  "@backstage/eslint-plugin": "0.1.11",
57
- "@backstage/integration": "1.18.1-next.0",
57
+ "@backstage/integration": "1.18.1-next.1",
58
58
  "@backstage/release-manifests": "0.0.13",
59
59
  "@backstage/types": "1.2.2",
60
60
  "@manypkg/get-packages": "^1.1.3",
@@ -154,22 +154,22 @@
154
154
  "zod-validation-error": "^3.4.0"
155
155
  },
156
156
  "devDependencies": {
157
- "@backstage/backend-plugin-api": "1.4.3",
158
- "@backstage/backend-test-utils": "1.9.1-next.0",
157
+ "@backstage/backend-plugin-api": "1.4.4-next.0",
158
+ "@backstage/backend-test-utils": "1.9.1-next.1",
159
159
  "@backstage/catalog-client": "1.12.0",
160
- "@backstage/config": "1.3.3",
161
- "@backstage/core-app-api": "1.19.0",
162
- "@backstage/core-components": "0.18.2-next.0",
163
- "@backstage/core-plugin-api": "1.11.0",
164
- "@backstage/dev-utils": "1.1.15-next.0",
160
+ "@backstage/config": "1.3.5-next.0",
161
+ "@backstage/core-app-api": "1.19.1-next.0",
162
+ "@backstage/core-components": "0.18.2-next.2",
163
+ "@backstage/core-plugin-api": "1.11.1-next.0",
164
+ "@backstage/dev-utils": "1.1.15-next.2",
165
165
  "@backstage/errors": "1.2.7",
166
- "@backstage/plugin-auth-backend": "0.25.4",
167
- "@backstage/plugin-auth-backend-module-guest-provider": "0.2.12",
168
- "@backstage/plugin-catalog-node": "1.19.0",
169
- "@backstage/plugin-scaffolder-node": "0.12.0-next.0",
170
- "@backstage/plugin-scaffolder-node-test-utils": "0.3.4-next.0",
171
- "@backstage/test-utils": "1.7.11",
172
- "@backstage/theme": "0.6.8",
166
+ "@backstage/plugin-auth-backend": "0.25.5-next.0",
167
+ "@backstage/plugin-auth-backend-module-guest-provider": "0.2.13-next.0",
168
+ "@backstage/plugin-catalog-node": "1.19.1-next.0",
169
+ "@backstage/plugin-scaffolder-node": "0.12.0-next.1",
170
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.4-next.1",
171
+ "@backstage/test-utils": "1.7.12-next.1",
172
+ "@backstage/theme": "0.6.9-next.0",
173
173
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
174
174
  "@types/cross-spawn": "^6.0.2",
175
175
  "@types/ejs": "^3.1.3",