@backstage/cli 0.35.4 → 0.36.0-next.1

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 (108) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/config/jest.js +2 -2
  3. package/dist/index.cjs.js +1 -0
  4. package/dist/modules/build/commands/package/build/command.cjs.js +7 -7
  5. package/dist/modules/build/commands/package/clean.cjs.js +21 -0
  6. package/dist/modules/build/commands/package/postpack.cjs.js +15 -0
  7. package/dist/modules/build/commands/package/prepack.cjs.js +29 -0
  8. package/dist/modules/build/commands/package/start/command.cjs.js +3 -3
  9. package/dist/modules/build/commands/package/start/startBackend.cjs.js +2 -2
  10. package/dist/modules/build/commands/package/start/startFrontend.cjs.js +4 -5
  11. package/dist/modules/build/commands/repo/build.cjs.js +7 -8
  12. package/dist/modules/{maintenance → build}/commands/repo/clean.cjs.js +10 -7
  13. package/dist/modules/build/commands/repo/start.cjs.js +3 -3
  14. package/dist/modules/build/index.cjs.js +37 -4
  15. package/dist/modules/build/lib/buildBackend.cjs.js +0 -2
  16. package/dist/modules/build/lib/buildFrontend.cjs.js +3 -6
  17. package/dist/modules/build/lib/builder/config.cjs.js +5 -5
  18. package/dist/modules/build/lib/builder/packager.cjs.js +7 -8
  19. package/dist/modules/build/lib/bundler/config.cjs.js +2 -3
  20. package/dist/modules/build/lib/bundler/hasReactDomClient.cjs.js +2 -2
  21. package/dist/modules/build/lib/bundler/linkWorkspaces.cjs.js +2 -2
  22. package/dist/modules/build/lib/bundler/moduleFederation.cjs.js +3 -3
  23. package/dist/modules/build/lib/bundler/packageDetection.cjs.js +2 -2
  24. package/dist/modules/build/lib/bundler/paths.cjs.js +8 -6
  25. package/dist/modules/build/lib/bundler/server.cjs.js +11 -11
  26. package/dist/modules/build/lib/config.cjs.js +94 -0
  27. package/dist/{lib → modules/build/lib}/optionsParser.cjs.js +2 -2
  28. package/dist/modules/build/lib/packager/createDistWorkspace.cjs.js +10 -10
  29. package/dist/modules/build/lib/packager/productionPack.cjs.js +2 -2
  30. package/dist/{lib → modules/build/lib}/role.cjs.js +2 -2
  31. package/dist/modules/build/lib/runner/runBackend.cjs.js +2 -2
  32. package/dist/{lib → modules/build/lib}/typeDistProject.cjs.js +2 -2
  33. package/dist/modules/config/commands/docs.cjs.js +18 -2
  34. package/dist/modules/config/commands/print.cjs.js +38 -11
  35. package/dist/modules/config/commands/schema.cjs.js +22 -4
  36. package/dist/modules/config/commands/validate.cjs.js +37 -7
  37. package/dist/modules/config/index.cjs.js +6 -65
  38. package/dist/modules/config/lib/config.cjs.js +10 -26
  39. package/dist/modules/create-github-app/commands/create-github-app/index.cjs.js +2 -2
  40. package/dist/modules/create-github-app/index.cjs.js +1 -1
  41. package/dist/modules/info/commands/info.cjs.js +29 -11
  42. package/dist/modules/info/index.cjs.js +1 -23
  43. package/dist/modules/lint/commands/package/lint.cjs.js +4 -4
  44. package/dist/modules/lint/commands/repo/lint.cjs.js +13 -12
  45. package/dist/modules/lint/index.cjs.js +1 -1
  46. package/dist/modules/lint/lib/optionsParser.cjs.js +37 -0
  47. package/dist/modules/maintenance/commands/repo/fix.cjs.js +8 -11
  48. package/dist/modules/maintenance/commands/repo/list-deprecations.cjs.js +4 -4
  49. package/dist/modules/maintenance/index.cjs.js +1 -45
  50. package/dist/modules/migrate/commands/packageExports.cjs.js +9 -11
  51. package/dist/modules/migrate/commands/packageLintConfigs.cjs.js +7 -3
  52. package/dist/modules/migrate/commands/packageRole.cjs.js +5 -3
  53. package/dist/modules/migrate/commands/packageScripts.cjs.js +11 -7
  54. package/dist/modules/migrate/commands/reactRouterDeps.cjs.js +7 -3
  55. package/dist/modules/migrate/commands/versions/bump.cjs.js +15 -18
  56. package/dist/modules/migrate/index.cjs.js +11 -31
  57. package/dist/modules/new/index.cjs.js +1 -1
  58. package/dist/modules/new/lib/codeowners/codeowners.cjs.js +2 -2
  59. package/dist/modules/new/lib/execution/PortableTemplater.cjs.js +6 -11
  60. package/dist/modules/new/lib/execution/installNewPackage.cjs.js +4 -4
  61. package/dist/modules/new/lib/execution/writeTemplateContents.cjs.js +1 -2
  62. package/dist/modules/new/lib/preparation/collectPortableTemplateInput.cjs.js +2 -2
  63. package/dist/modules/new/lib/preparation/loadPortableTemplate.cjs.js +8 -8
  64. package/dist/modules/new/lib/preparation/loadPortableTemplateConfig.cjs.js +18 -18
  65. package/dist/{lib → modules/new/lib}/version.cjs.js +22 -33
  66. package/dist/modules/test/commands/package/test.cjs.js +1 -5
  67. package/dist/modules/test/commands/repo/test.cjs.js +9 -9
  68. package/dist/modules/test/index.cjs.js +4 -2
  69. package/dist/modules/translations/commands/export.cjs.js +127 -0
  70. package/dist/modules/translations/commands/import.cjs.js +164 -0
  71. package/dist/modules/translations/index.cjs.js +24 -0
  72. package/dist/modules/translations/lib/discoverPackages.cjs.js +121 -0
  73. package/dist/modules/translations/lib/extractTranslations.cjs.js +71 -0
  74. package/dist/modules/translations/lib/messageFilePath.cjs.js +43 -0
  75. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  76. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  77. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  78. package/dist/packages/catalog-client/package.json.cjs.js +1 -1
  79. package/dist/packages/cli/package.json.cjs.js +6 -8
  80. package/dist/packages/core-app-api/package.json.cjs.js +1 -1
  81. package/dist/packages/core-components/package.json.cjs.js +1 -1
  82. package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
  83. package/dist/packages/dev-utils/package.json.cjs.js +1 -1
  84. package/dist/packages/frontend-defaults/package.json.cjs.js +1 -1
  85. package/dist/packages/frontend-plugin-api/package.json.cjs.js +1 -1
  86. package/dist/packages/frontend-test-utils/package.json.cjs.js +1 -1
  87. package/dist/packages/test-utils/package.json.cjs.js +1 -1
  88. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  89. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  90. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  91. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  92. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  93. package/dist/wiring/CliInitializer.cjs.js +12 -5
  94. package/dist/wiring/version.cjs.js +20 -0
  95. package/package.json +34 -36
  96. package/dist/lib/cache/SuccessCache.cjs.js +0 -79
  97. package/dist/lib/parallel.cjs.js +0 -141
  98. package/dist/lib/paths.cjs.js +0 -8
  99. package/dist/lib/versioning/Lockfile.cjs.js +0 -89
  100. package/dist/lib/yarnPlugin.cjs.js +0 -46
  101. package/dist/modules/maintenance/commands/package/clean.cjs.js +0 -19
  102. package/dist/modules/maintenance/commands/package/pack.cjs.js +0 -29
  103. /package/dist/{lib → modules/build/lib}/entryPoints.cjs.js +0 -0
  104. /package/dist/modules/{maintenance → build}/lib/publishing.cjs.js +0 -0
  105. /package/dist/{lib → modules/migrate/lib}/versioning/packages.cjs.js +0 -0
  106. /package/dist/{lib → modules/migrate/lib}/versioning/yarn.cjs.js +0 -0
  107. /package/dist/{lib → wiring}/errors.cjs.js +0 -0
  108. /package/dist/{lib → wiring}/lazy.cjs.js +0 -0
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ var tsMorph = require('ts-morph');
4
+
5
+ function extractTranslationRefsFromSourceFile(sourceFile, packageName, exportPath) {
6
+ const results = [];
7
+ for (const exportSymbol of sourceFile.getExportSymbols()) {
8
+ const declarations = exportSymbol.getDeclarations();
9
+ if (declarations.length === 0) {
10
+ continue;
11
+ }
12
+ const declaration = declarations[0];
13
+ const exportType = declaration.getType();
14
+ const refInfo = extractTranslationRefFromType(exportType, declaration);
15
+ if (!refInfo) {
16
+ continue;
17
+ }
18
+ results.push({
19
+ ...refInfo,
20
+ packageName,
21
+ exportPath,
22
+ exportName: exportSymbol.getName()
23
+ });
24
+ }
25
+ return results;
26
+ }
27
+ function extractTranslationRefFromType(type, declaration) {
28
+ const resolvedType = type.getTargetType() ?? type;
29
+ const $$typeProperty = resolvedType.getProperties().find((p) => p.getName() === "$$type");
30
+ if (!$$typeProperty) {
31
+ return void 0;
32
+ }
33
+ const $$typeDecl = $$typeProperty.getValueDeclaration();
34
+ if (!$$typeDecl) {
35
+ return void 0;
36
+ }
37
+ if (!$$typeDecl.getText().includes("'@backstage/TranslationRef'")) {
38
+ return void 0;
39
+ }
40
+ const typeArgs = type.getTypeArguments();
41
+ if (typeArgs.length < 2) {
42
+ return void 0;
43
+ }
44
+ const [idType, messagesType] = typeArgs;
45
+ if (!idType.isStringLiteral()) {
46
+ return void 0;
47
+ }
48
+ const id = idType.getLiteralValueOrThrow();
49
+ const messages = {};
50
+ for (const messageProp of messagesType.getProperties()) {
51
+ const key = messageProp.getName();
52
+ const propType = messageProp.getTypeAtLocation(declaration);
53
+ if (propType.isStringLiteral()) {
54
+ messages[key] = propType.getLiteralValueOrThrow();
55
+ }
56
+ }
57
+ if (Object.keys(messages).length === 0) {
58
+ return void 0;
59
+ }
60
+ return { id, messages };
61
+ }
62
+ function createTranslationProject(tsconfigPath) {
63
+ return new tsMorph.Project({
64
+ tsConfigFilePath: tsconfigPath,
65
+ skipAddingFilesFromTsConfig: true
66
+ });
67
+ }
68
+
69
+ exports.createTranslationProject = createTranslationProject;
70
+ exports.extractTranslationRefsFromSourceFile = extractTranslationRefsFromSourceFile;
71
+ //# sourceMappingURL=extractTranslations.cjs.js.map
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ const DEFAULT_LANGUAGE = "en";
4
+ const DEFAULT_MESSAGE_PATTERN = "messages/{id}.{lang}.json";
5
+ function formatMessagePath(pattern, id, lang) {
6
+ return pattern.replace(/\{id\}/g, id).replace(/\{lang\}/g, lang);
7
+ }
8
+ function createMessagePathParser(pattern) {
9
+ validatePattern(pattern);
10
+ const escaped = pattern.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\{id\\}/g, "(?<id>[^/]+)").replace(/\\{lang\\}/g, "(?<lang>[a-z]{2})");
11
+ const regex = new RegExp(`^${escaped}$`);
12
+ return (relPath) => {
13
+ const match = relPath.match(regex);
14
+ if (!match?.groups) {
15
+ return void 0;
16
+ }
17
+ return { id: match.groups.id, lang: match.groups.lang };
18
+ };
19
+ }
20
+ function validatePattern(pattern) {
21
+ if (!pattern.includes("{id}")) {
22
+ throw new Error(
23
+ `Invalid message file pattern: must contain {id} placeholder. Got: ${pattern}`
24
+ );
25
+ }
26
+ if (!pattern.includes("{lang}")) {
27
+ throw new Error(
28
+ `Invalid message file pattern: must contain {lang} placeholder. Got: ${pattern}`
29
+ );
30
+ }
31
+ if (!pattern.endsWith(".json")) {
32
+ throw new Error(
33
+ `Invalid message file pattern: must end with .json. Got: ${pattern}`
34
+ );
35
+ }
36
+ }
37
+
38
+ exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
39
+ exports.DEFAULT_MESSAGE_PATTERN = DEFAULT_MESSAGE_PATTERN;
40
+ exports.createMessagePathParser = createMessagePathParser;
41
+ exports.formatMessagePath = formatMessagePath;
42
+ exports.validatePattern = validatePattern;
43
+ //# sourceMappingURL=messageFilePath.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.15.2";
3
+ var version = "0.16.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 = "1.7.0";
3
+ var version = "1.7.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.11.0";
3
+ var version = "1.11.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 = "1.13.0";
3
+ var version = "1.14.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.35.4";
3
+ var version = "0.36.0-next.1";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -32,13 +32,12 @@ var dependencies = {
32
32
  "@types/webpack-env": "^1.15.2",
33
33
  "@typescript-eslint/eslint-plugin": "^8.17.0",
34
34
  "@typescript-eslint/parser": "^8.16.0",
35
- "@yarnpkg/lockfile": "^1.1.0",
36
- "@yarnpkg/parsers": "^3.0.0",
37
- bfj: "^8.0.0",
35
+ bfj: "^9.0.2",
38
36
  buffer: "^6.0.3",
39
37
  chalk: "^4.0.0",
40
38
  chokidar: "^3.3.1",
41
- commander: "^12.0.0",
39
+ cleye: "^2.2.1",
40
+ commander: "^14.0.3",
42
41
  "cross-fetch": "^4.0.0",
43
42
  "cross-spawn": "^7.0.3",
44
43
  "css-loader": "^6.5.1",
@@ -67,7 +66,7 @@ var dependencies = {
67
66
  "jest-css-modules": "^2.1.0",
68
67
  "json-schema": "^0.4.0",
69
68
  lodash: "^4.17.21",
70
- minimatch: "^9.0.0",
69
+ minimatch: "^10.2.1",
71
70
  "node-stdlib-browser": "^1.3.1",
72
71
  "npm-packlist": "^5.0.0",
73
72
  ora: "^5.3.0",
@@ -137,7 +136,6 @@ var devDependencies = {
137
136
  "@types/tar": "^6.1.1",
138
137
  "@types/terser-webpack-plugin": "^5.0.4",
139
138
  "@types/webpack-sources": "^3.2.3",
140
- "@types/yarnpkg__lockfile": "^1.1.4",
141
139
  del: "^8.0.0",
142
140
  "esbuild-loader": "^4.0.0",
143
141
  "eslint-webpack-plugin": "^4.2.0",
@@ -148,7 +146,7 @@ var devDependencies = {
148
146
  msw: "^1.0.0",
149
147
  nodemon: "^3.0.1",
150
148
  "terser-webpack-plugin": "^5.1.3",
151
- webpack: "~5.104.0",
149
+ webpack: "~5.105.0",
152
150
  "webpack-dev-server": "^5.0.0"
153
151
  };
154
152
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.19.5";
3
+ var version = "1.19.6-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.7";
3
+ var version = "0.18.8-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.12.3";
3
+ var version = "1.12.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.1.20";
3
+ var version = "1.1.21-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.4.0";
3
+ var version = "0.4.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.14.0";
3
+ var version = "0.14.2-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.5.0";
3
+ var version = "0.5.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 = "1.7.15";
3
+ var version = "1.7.16-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.27.0";
3
+ var version = "0.27.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.2.16";
3
+ var version = "0.2.17-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 = "2.0.0";
3
+ var version = "2.1.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.12.5";
3
+ var version = "0.13.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.8";
3
+ var version = "0.3.9-next.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -4,9 +4,9 @@ var CommandGraph = require('./CommandGraph.cjs.js');
4
4
  var types$1 = require('./types.cjs.js');
5
5
  var CommandRegistry = require('./CommandRegistry.cjs.js');
6
6
  var commander = require('commander');
7
- var version = require('../lib/version.cjs.js');
7
+ var version = require('./version.cjs.js');
8
8
  var chalk = require('chalk');
9
- var errors = require('../lib/errors.cjs.js');
9
+ var errors = require('./errors.cjs.js');
10
10
  var errors$1 = require('@backstage/errors');
11
11
  var types = require('node:util/types');
12
12
 
@@ -77,13 +77,20 @@ class CliInitializer {
77
77
  }
78
78
  positionalArgs.push(nonProcessArgs[argIndex]);
79
79
  }
80
- await node.command.execute({
80
+ const context = {
81
81
  args: [...positionalArgs, ...args.unknown],
82
82
  info: {
83
83
  usage: [programName, ...node.command.path].join(" "),
84
84
  description: node.command.description
85
85
  }
86
- });
86
+ };
87
+ if (typeof node.command.execute === "function") {
88
+ await node.command.execute(context);
89
+ } else {
90
+ const mod = await node.command.execute.loader();
91
+ const fn = typeof mod.default === "function" ? mod.default : mod.default.default;
92
+ await fn(context);
93
+ }
87
94
  process.exit(0);
88
95
  } catch (error) {
89
96
  errors.exitWithError(error);
@@ -101,7 +108,7 @@ class CliInitializer {
101
108
  process.on("unhandledRejection", (rejection) => {
102
109
  errors.exitWithError(new errors$1.ForwardedError("Unhandled rejection", rejection));
103
110
  });
104
- program.parse(process.argv);
111
+ await program.parseAsync(process.argv);
105
112
  }
106
113
  }
107
114
  function unwrapFeature(feature) {
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs-extra');
4
+ var cliCommon = require('@backstage/cli-common');
5
+
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
+
8
+ var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
9
+
10
+ const ownPaths = cliCommon.findOwnPaths(__dirname);
11
+ function findVersion() {
12
+ const pkgContent = fs__default.default.readFileSync(ownPaths.resolve("package.json"), "utf8");
13
+ return JSON.parse(pkgContent).version;
14
+ }
15
+ const version = findVersion();
16
+ fs__default.default.pathExistsSync(ownPaths.resolve("src"));
17
+
18
+ exports.findVersion = findVersion;
19
+ exports.version = version;
20
+ //# sourceMappingURL=version.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.35.4",
3
+ "version": "0.36.0-next.1",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -47,17 +47,17 @@
47
47
  ]
48
48
  },
49
49
  "dependencies": {
50
- "@backstage/catalog-model": "^1.7.6",
51
- "@backstage/cli-common": "^0.1.18",
52
- "@backstage/cli-node": "^0.2.18",
53
- "@backstage/config": "^1.3.6",
54
- "@backstage/config-loader": "^1.10.8",
55
- "@backstage/errors": "^1.2.7",
56
- "@backstage/eslint-plugin": "^0.2.1",
57
- "@backstage/integration": "^1.20.0",
58
- "@backstage/module-federation-common": "^0.1.0",
59
- "@backstage/release-manifests": "^0.0.13",
60
- "@backstage/types": "^1.2.2",
50
+ "@backstage/catalog-model": "1.7.6",
51
+ "@backstage/cli-common": "0.2.0-next.1",
52
+ "@backstage/cli-node": "0.2.19-next.1",
53
+ "@backstage/config": "1.3.6",
54
+ "@backstage/config-loader": "1.10.9-next.0",
55
+ "@backstage/errors": "1.2.7",
56
+ "@backstage/eslint-plugin": "0.2.2-next.0",
57
+ "@backstage/integration": "2.0.0-next.1",
58
+ "@backstage/module-federation-common": "0.1.2-next.0",
59
+ "@backstage/release-manifests": "0.0.13",
60
+ "@backstage/types": "1.2.2",
61
61
  "@manypkg/get-packages": "^1.1.3",
62
62
  "@module-federation/enhanced": "^0.21.6",
63
63
  "@octokit/request": "^8.0.0",
@@ -77,13 +77,12 @@
77
77
  "@types/webpack-env": "^1.15.2",
78
78
  "@typescript-eslint/eslint-plugin": "^8.17.0",
79
79
  "@typescript-eslint/parser": "^8.16.0",
80
- "@yarnpkg/lockfile": "^1.1.0",
81
- "@yarnpkg/parsers": "^3.0.0",
82
- "bfj": "^8.0.0",
80
+ "bfj": "^9.0.2",
83
81
  "buffer": "^6.0.3",
84
82
  "chalk": "^4.0.0",
85
83
  "chokidar": "^3.3.1",
86
- "commander": "^12.0.0",
84
+ "cleye": "^2.2.1",
85
+ "commander": "^14.0.3",
87
86
  "cross-fetch": "^4.0.0",
88
87
  "cross-spawn": "^7.0.3",
89
88
  "css-loader": "^6.5.1",
@@ -112,7 +111,7 @@
112
111
  "jest-css-modules": "^2.1.0",
113
112
  "json-schema": "^0.4.0",
114
113
  "lodash": "^4.17.21",
115
- "minimatch": "^9.0.0",
114
+ "minimatch": "^10.2.1",
116
115
  "node-stdlib-browser": "^1.3.1",
117
116
  "npm-packlist": "^5.0.0",
118
117
  "ora": "^5.3.0",
@@ -148,22 +147,22 @@
148
147
  "zod-validation-error": "^4.0.2"
149
148
  },
150
149
  "devDependencies": {
151
- "@backstage/backend-plugin-api": "^1.7.0",
152
- "@backstage/backend-test-utils": "^1.11.0",
153
- "@backstage/catalog-client": "^1.13.0",
154
- "@backstage/config": "^1.3.6",
155
- "@backstage/core-app-api": "^1.19.5",
156
- "@backstage/core-components": "^0.18.7",
157
- "@backstage/core-plugin-api": "^1.12.3",
158
- "@backstage/dev-utils": "^1.1.20",
159
- "@backstage/errors": "^1.2.7",
160
- "@backstage/plugin-auth-backend": "^0.27.0",
161
- "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.16",
162
- "@backstage/plugin-catalog-node": "^2.0.0",
163
- "@backstage/plugin-scaffolder-node": "^0.12.5",
164
- "@backstage/plugin-scaffolder-node-test-utils": "^0.3.8",
165
- "@backstage/test-utils": "^1.7.15",
166
- "@backstage/theme": "^0.7.2",
150
+ "@backstage/backend-plugin-api": "1.7.1-next.0",
151
+ "@backstage/backend-test-utils": "1.11.1-next.1",
152
+ "@backstage/catalog-client": "1.14.0-next.1",
153
+ "@backstage/config": "1.3.6",
154
+ "@backstage/core-app-api": "1.19.6-next.0",
155
+ "@backstage/core-components": "0.18.8-next.0",
156
+ "@backstage/core-plugin-api": "1.12.4-next.0",
157
+ "@backstage/dev-utils": "1.1.21-next.1",
158
+ "@backstage/errors": "1.2.7",
159
+ "@backstage/plugin-auth-backend": "0.27.1-next.1",
160
+ "@backstage/plugin-auth-backend-module-guest-provider": "0.2.17-next.0",
161
+ "@backstage/plugin-catalog-node": "2.1.0-next.1",
162
+ "@backstage/plugin-scaffolder-node": "0.13.0-next.1",
163
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.9-next.1",
164
+ "@backstage/test-utils": "1.7.16-next.0",
165
+ "@backstage/theme": "0.7.2",
167
166
  "@jest/environment-jsdom-abstract": "^30.0.0",
168
167
  "@pmmmwh/react-refresh-webpack-plugin": "^0.6.0",
169
168
  "@types/cross-spawn": "^6.0.2",
@@ -182,7 +181,6 @@
182
181
  "@types/tar": "^6.1.1",
183
182
  "@types/terser-webpack-plugin": "^5.0.4",
184
183
  "@types/webpack-sources": "^3.2.3",
185
- "@types/yarnpkg__lockfile": "^1.1.4",
186
184
  "del": "^8.0.0",
187
185
  "esbuild-loader": "^4.0.0",
188
186
  "eslint-webpack-plugin": "^4.2.0",
@@ -193,7 +191,7 @@
193
191
  "msw": "^1.0.0",
194
192
  "nodemon": "^3.0.1",
195
193
  "terser-webpack-plugin": "^5.1.3",
196
- "webpack": "~5.104.0",
194
+ "webpack": "~5.105.0",
197
195
  "webpack-dev-server": "^5.0.0"
198
196
  },
199
197
  "peerDependencies": {
@@ -208,7 +206,7 @@
208
206
  "jsdom": "^27.1.0",
209
207
  "mini-css-extract-plugin": "^2.4.2",
210
208
  "terser-webpack-plugin": "^5.1.3",
211
- "webpack": "~5.104.0",
209
+ "webpack": "~5.105.0",
212
210
  "webpack-dev-server": "^5.0.0"
213
211
  },
214
212
  "peerDependenciesMeta": {
@@ -1,79 +0,0 @@
1
- 'use strict';
2
-
3
- var fs = require('fs-extra');
4
- var path = require('node:path');
5
- var paths = require('../paths.cjs.js');
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
- const DEFAULT_CACHE_BASE_PATH = "node_modules/.cache/backstage-cli";
12
- const CACHE_MAX_AGE_MS = 7 * 24 * 36e5;
13
- class SuccessCache {
14
- #path;
15
- /**
16
- * Trim any occurrences of the workspace root path from the input string. This
17
- * is useful to ensure stable hashes that don't vary based on the workspace
18
- * location.
19
- */
20
- static trimPaths(input) {
21
- return input.replaceAll(paths.paths.targetRoot, "");
22
- }
23
- constructor(name, basePath) {
24
- this.#path = path.resolve(basePath ?? DEFAULT_CACHE_BASE_PATH, name);
25
- }
26
- async read() {
27
- try {
28
- const stat = await fs__default.default.stat(this.#path);
29
- if (!stat.isDirectory()) {
30
- await fs__default.default.rm(this.#path);
31
- return /* @__PURE__ */ new Set();
32
- }
33
- } catch (error) {
34
- if (error.code === "ENOENT") {
35
- return /* @__PURE__ */ new Set();
36
- }
37
- throw error;
38
- }
39
- const items = await fs__default.default.readdir(this.#path);
40
- const returned = /* @__PURE__ */ new Set();
41
- const removed = /* @__PURE__ */ new Set();
42
- const now = Date.now();
43
- for (const item of items) {
44
- const split = item.split("_");
45
- if (split.length !== 2) {
46
- removed.add(item);
47
- continue;
48
- }
49
- const createdAt = parseInt(split[0], 10);
50
- if (Number.isNaN(createdAt) || now - createdAt > CACHE_MAX_AGE_MS) {
51
- removed.add(item);
52
- } else {
53
- returned.add(split[1]);
54
- }
55
- }
56
- for (const item of removed) {
57
- await fs__default.default.unlink(path.resolve(this.#path, item));
58
- }
59
- return returned;
60
- }
61
- async write(newEntries) {
62
- const now = Date.now();
63
- await fs__default.default.ensureDir(this.#path);
64
- const existingItems = await fs__default.default.readdir(this.#path);
65
- const empty = Buffer.alloc(0);
66
- for (const key of newEntries) {
67
- const trimmedItems = existingItems.filter(
68
- (item) => item.endsWith(`_${key}`)
69
- );
70
- for (const trimmedItem of trimmedItems) {
71
- await fs__default.default.unlink(path.resolve(this.#path, trimmedItem));
72
- }
73
- await fs__default.default.writeFile(path.resolve(this.#path, `${now}_${key}`), empty);
74
- }
75
- }
76
- }
77
-
78
- exports.SuccessCache = SuccessCache;
79
- //# sourceMappingURL=SuccessCache.cjs.js.map