@backstage/cli 0.26.6-next.0 → 0.26.6
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 +2 -14
- package/dist/cjs/{Lockfile-BGMdDb8M.cjs.js → Lockfile-C7rtIlD6.cjs.js} +21 -54
- package/dist/cjs/{build-oOoA6doT.cjs.js → build-BSDLApkE.cjs.js} +17 -14
- package/dist/cjs/{buildBackend-DCTPybGH.cjs.js → buildBackend-FV4cZ7YT.cjs.js} +10 -8
- package/dist/cjs/{buildWorkspace-BZ9SFxD1.cjs.js → buildWorkspace-DV7BpoZT.cjs.js} +5 -5
- package/dist/cjs/{bump-DrU2bDOA.cjs.js → bump-CjL9wSlI.cjs.js} +21 -16
- package/dist/cjs/{clean-CTXeO6EC.cjs.js → clean-Cw1FeJO5.cjs.js} +4 -3
- package/dist/cjs/{clean-Xt20-SOd.cjs.js → clean-SL6sMYtJ.cjs.js} +2 -2
- package/dist/cjs/{codeowners-CmW2AVMp.cjs.js → codeowners-B9Ys_6Yd.cjs.js} +2 -2
- package/dist/cjs/{config-Dr_8wy8K.cjs.js → config-XS8tRRzZ.cjs.js} +4 -3
- package/dist/cjs/{createDistWorkspace-DgvlH81m.cjs.js → createDistWorkspace-B1pyeDwS.cjs.js} +21 -15
- package/dist/cjs/{createPlugin-DJh1uHOM.cjs.js → createPlugin-Bf67GaKA.cjs.js} +8 -7
- package/dist/cjs/{diff-BFT2J47H.cjs.js → diff-jArODNjZ.cjs.js} +2 -2
- package/dist/cjs/{docs-DPxUZ_5M.cjs.js → docs-VFbH2gLP.cjs.js} +3 -3
- package/dist/cjs/{fix-Ds21Csn8.cjs.js → fix-F8xWYiWH.cjs.js} +4 -3
- package/dist/cjs/{index-C9SFHBJ7.cjs.js → index-BWsdQbfr.cjs.js} +343 -160
- package/dist/cjs/{index-D262VPnW.cjs.js → index-CS6xQRSZ.cjs.js} +67 -60
- package/dist/cjs/{index-zmkgRMEr.cjs.js → index-DtxQfUmH.cjs.js} +9 -9
- package/dist/cjs/{index-CIfGsnyl.cjs.js → index-Wt0qQuCU.cjs.js} +68 -33
- package/dist/cjs/{index-C9SBzA6q.cjs.js → index-ko14Ea3F.cjs.js} +44 -38
- package/dist/cjs/{info-BJvAN-EV.cjs.js → info-31wuUeHo.cjs.js} +6 -5
- package/dist/cjs/{install-iHbt_0aM.cjs.js → install-Bf0Cm4CP.cjs.js} +11 -8
- package/dist/cjs/{lint-BQoZALVi.cjs.js → lint-BHZJ9s87.cjs.js} +2 -2
- package/dist/cjs/{lint-DhdvUtZ-.cjs.js → lint-CeLPKohb.cjs.js} +4 -4
- package/dist/cjs/{lint-ccLOCCQ7.cjs.js → lint-NokSgx6Q.cjs.js} +2 -2
- package/dist/cjs/{list-deprecations-DKQAIdF-.cjs.js → list-deprecations-PCaNouxb.cjs.js} +2 -2
- package/dist/cjs/{new-pqVZtq0L.cjs.js → new-wsaO3CgE.cjs.js} +19 -11
- package/dist/cjs/{pack-Cb0EFwcV.cjs.js → pack-D65aI1Y5.cjs.js} +3 -3
- package/dist/cjs/{packageDetection-Cfl0g9oD.cjs.js → packageDetection-DT09yDE6.cjs.js} +21 -15
- package/dist/cjs/{packageExports-qb2FnJFt.cjs.js → packageExports-BQpjmF7V.cjs.js} +3 -3
- package/dist/cjs/{packageLintConfigs-CZbCJdAI.cjs.js → packageLintConfigs-CtbeLXlD.cjs.js} +5 -4
- package/dist/cjs/{packageRole-C_eAxVdS.cjs.js → packageRole-B-GQB2ZF.cjs.js} +2 -2
- package/dist/cjs/{packageScripts-DX6dilK6.cjs.js → packageScripts-CPnlPBBs.cjs.js} +11 -10
- package/dist/cjs/{packages-C0iBE8_o.cjs.js → packages-BS13eILq.cjs.js} +10 -6
- package/dist/cjs/{print-DKlinc6o.cjs.js → print-B6UB54DH.cjs.js} +3 -3
- package/dist/cjs/{productionPack-BfVQNApa.cjs.js → productionPack-DotlEIE2.cjs.js} +6 -4
- package/dist/cjs/{reactRouterDeps-CR-hjviw.cjs.js → reactRouterDeps-BBKc6o07.cjs.js} +3 -2
- package/dist/cjs/{role-ji3J4lHr.cjs.js → role-DTQZhzFJ.cjs.js} +4 -3
- package/dist/cjs/{run-C1016vC-.cjs.js → run-B3QtsbD6.cjs.js} +4 -3
- package/dist/cjs/{schema--27U4Pnd.cjs.js → schema-M5iIZ_Eq.cjs.js} +3 -3
- package/dist/cjs/{tasks-Dy-6nV0-.cjs.js → tasks-mGXy8WjR.cjs.js} +3 -3
- package/dist/cjs/{test-0Q9Uv4gn.cjs.js → test-BuGhBxNC.cjs.js} +3 -3
- package/dist/cjs/{test-BlJ7hC1z.cjs.js → test-Dt0SmBb4.cjs.js} +3 -3
- package/dist/cjs/{validate-DrFKUEDH.cjs.js → validate-2WOv51mB.cjs.js} +3 -3
- package/dist/index.cjs.js +1 -1
- package/package.json +10 -10
|
@@ -13,17 +13,23 @@ var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
|
|
|
13
13
|
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
14
14
|
var semver__default = /*#__PURE__*/_interopDefaultCompat(semver);
|
|
15
15
|
|
|
16
|
+
var __defProp = Object.defineProperty;
|
|
17
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18
|
+
var __publicField = (obj, key, value) => {
|
|
19
|
+
__defNormalProp(obj, key + "" , value);
|
|
20
|
+
return value;
|
|
21
|
+
};
|
|
16
22
|
class CustomError extends Error {
|
|
17
23
|
get name() {
|
|
18
24
|
return this.constructor.name;
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
class ExitCodeError extends CustomError {
|
|
22
|
-
code;
|
|
23
28
|
constructor(code, command) {
|
|
24
29
|
super(
|
|
25
30
|
command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`
|
|
26
31
|
);
|
|
32
|
+
__publicField(this, "code");
|
|
27
33
|
this.code = code;
|
|
28
34
|
}
|
|
29
35
|
}
|
|
@@ -47,13 +53,13 @@ class NotFoundError extends CustomError {
|
|
|
47
53
|
|
|
48
54
|
const paths = cliCommon.findPaths(__dirname);
|
|
49
55
|
|
|
50
|
-
var version$f = "0.22.
|
|
56
|
+
var version$f = "0.22.0";
|
|
51
57
|
|
|
52
|
-
var version$e = "0.6.
|
|
58
|
+
var version$e = "0.6.18";
|
|
53
59
|
|
|
54
|
-
var version$d = "0.3.
|
|
60
|
+
var version$d = "0.3.8";
|
|
55
61
|
|
|
56
|
-
var version$c = "0.26.6
|
|
62
|
+
var version$c = "0.26.6";
|
|
57
63
|
var dependencies = {
|
|
58
64
|
"@backstage/catalog-model": "workspace:^",
|
|
59
65
|
"@backstage/cli-common": "workspace:^",
|
|
@@ -92,7 +98,7 @@ var dependencies = {
|
|
|
92
98
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
93
99
|
"@typescript-eslint/parser": "^6.7.2",
|
|
94
100
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
95
|
-
"@yarnpkg/parsers": "^3.0.0",
|
|
101
|
+
"@yarnpkg/parsers": "^3.0.0-rc.4",
|
|
96
102
|
bfj: "^8.0.0",
|
|
97
103
|
buffer: "^6.0.3",
|
|
98
104
|
chalk: "^4.0.0",
|
|
@@ -207,23 +213,23 @@ var version$b = "1.2.0";
|
|
|
207
213
|
|
|
208
214
|
var version$a = "1.12.5";
|
|
209
215
|
|
|
210
|
-
var version$9 = "0.14.
|
|
216
|
+
var version$9 = "0.14.7";
|
|
211
217
|
|
|
212
218
|
var version$8 = "1.9.2";
|
|
213
219
|
|
|
214
|
-
var version$7 = "1.0.
|
|
220
|
+
var version$7 = "1.0.32";
|
|
215
221
|
|
|
216
|
-
var version$6 = "1.5.
|
|
222
|
+
var version$6 = "1.5.5";
|
|
217
223
|
|
|
218
|
-
var version$5 = "0.4.
|
|
224
|
+
var version$5 = "0.4.4";
|
|
219
225
|
|
|
220
|
-
var version$4 = "0.22.
|
|
226
|
+
var version$4 = "0.22.5";
|
|
221
227
|
|
|
222
|
-
var version$3 = "0.1.
|
|
228
|
+
var version$3 = "0.1.4";
|
|
223
229
|
|
|
224
|
-
var version$2 = "0.5.
|
|
230
|
+
var version$2 = "0.5.5";
|
|
225
231
|
|
|
226
|
-
var version$1 = "0.2.
|
|
232
|
+
var version$1 = "0.2.18";
|
|
227
233
|
|
|
228
234
|
const packageVersions = {
|
|
229
235
|
"@backstage/backend-common": version$f,
|
|
@@ -250,35 +256,36 @@ const version = findVersion();
|
|
|
250
256
|
fs__default.default.pathExistsSync(paths.resolveOwn("src"));
|
|
251
257
|
function createPackageVersionProvider(lockfile) {
|
|
252
258
|
return (name, versionHint) => {
|
|
259
|
+
var _a;
|
|
253
260
|
const packageVersion = packageVersions[name];
|
|
254
261
|
const targetVersion = versionHint || packageVersion;
|
|
255
262
|
if (!targetVersion) {
|
|
256
263
|
throw new Error(`No version available for package ${name}`);
|
|
257
264
|
}
|
|
258
|
-
const lockfileEntries = lockfile
|
|
259
|
-
if (name.startsWith("@types/") && lockfileEntries
|
|
265
|
+
const lockfileEntries = lockfile == null ? void 0 : lockfile.get(name);
|
|
266
|
+
if (name.startsWith("@types/") && (lockfileEntries == null ? void 0 : lockfileEntries.some((entry) => entry.range === "*"))) {
|
|
260
267
|
return "*";
|
|
261
268
|
}
|
|
262
269
|
for (const specifier of ["^", "~", "*"]) {
|
|
263
270
|
const range = `workspace:${specifier}`;
|
|
264
|
-
if (lockfileEntries
|
|
271
|
+
if (lockfileEntries == null ? void 0 : lockfileEntries.some((entry) => entry.range === range)) {
|
|
265
272
|
return range;
|
|
266
273
|
}
|
|
267
274
|
}
|
|
268
|
-
const validRanges = lockfileEntries
|
|
275
|
+
const validRanges = lockfileEntries == null ? void 0 : lockfileEntries.filter(
|
|
269
276
|
(entry) => semver__default.default.satisfies(targetVersion, entry.range)
|
|
270
277
|
);
|
|
271
|
-
const highestRange = validRanges
|
|
272
|
-
if (highestRange
|
|
273
|
-
return highestRange
|
|
278
|
+
const highestRange = validRanges == null ? void 0 : validRanges.slice(-1)[0];
|
|
279
|
+
if (highestRange == null ? void 0 : highestRange.range) {
|
|
280
|
+
return highestRange == null ? void 0 : highestRange.range;
|
|
274
281
|
}
|
|
275
282
|
if (packageVersion) {
|
|
276
283
|
return `^${packageVersion}`;
|
|
277
284
|
}
|
|
278
|
-
if (semver__default.default.parse(versionHint)
|
|
285
|
+
if ((_a = semver__default.default.parse(versionHint)) == null ? void 0 : _a.prerelease.length) {
|
|
279
286
|
return versionHint;
|
|
280
287
|
}
|
|
281
|
-
return versionHint
|
|
288
|
+
return (versionHint == null ? void 0 : versionHint.match(/^[\d\.]+$/)) ? `^${versionHint}` : versionHint;
|
|
282
289
|
};
|
|
283
290
|
}
|
|
284
291
|
|
|
@@ -289,7 +296,7 @@ const configOption = [
|
|
|
289
296
|
Array()
|
|
290
297
|
];
|
|
291
298
|
function registerOnboardCommand(program) {
|
|
292
|
-
program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
299
|
+
program.command("onboard", { hidden: true }).description("Get help setting up your Backstage App.").action(lazy(() => Promise.resolve().then(function () { return require('./index-BWsdQbfr.cjs.js'); }).then((m) => m.command)));
|
|
293
300
|
}
|
|
294
301
|
function registerRepoCommand(program) {
|
|
295
302
|
const command = program.command("repo [command]").description("Command that run across an entire Backstage project");
|
|
@@ -301,7 +308,7 @@ function registerRepoCommand(program) {
|
|
|
301
308
|
).option(
|
|
302
309
|
"--since <ref>",
|
|
303
310
|
"Only build packages and their dev dependents that changed since the specified ref"
|
|
304
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./build-
|
|
311
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./build-BSDLApkE.cjs.js'); }).then((m) => m.command)));
|
|
305
312
|
command.command("lint").description("Lint all packages in the project").option(
|
|
306
313
|
"--format <format>",
|
|
307
314
|
"Lint report output format",
|
|
@@ -309,14 +316,14 @@ function registerRepoCommand(program) {
|
|
|
309
316
|
).option(
|
|
310
317
|
"--since <ref>",
|
|
311
318
|
"Only lint packages that changed since the specified ref"
|
|
312
|
-
).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
319
|
+
).option("--fix", "Attempt to automatically fix violations").action(lazy(() => Promise.resolve().then(function () { return require('./lint-BHZJ9s87.cjs.js'); }).then((m) => m.command)));
|
|
313
320
|
command.command("fix").description("Automatically fix packages in the project").option(
|
|
314
321
|
"--check",
|
|
315
322
|
"Fail if any packages would have been changed by the command"
|
|
316
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./fix-
|
|
317
|
-
command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
323
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./fix-F8xWYiWH.cjs.js'); }).then((m) => m.command)));
|
|
324
|
+
command.command("clean").description("Delete cache and output directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-Cw1FeJO5.cjs.js'); }).then((m) => m.command)));
|
|
318
325
|
command.command("list-deprecations").description("List deprecations").option("--json", "Output as JSON").action(
|
|
319
|
-
lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-
|
|
326
|
+
lazy(() => Promise.resolve().then(function () { return require('./list-deprecations-PCaNouxb.cjs.js'); }).then((m) => m.command))
|
|
320
327
|
);
|
|
321
328
|
command.command("test").allowUnknownOption(true).option(
|
|
322
329
|
"--since <ref>",
|
|
@@ -324,14 +331,14 @@ function registerRepoCommand(program) {
|
|
|
324
331
|
).option(
|
|
325
332
|
"--jest-help",
|
|
326
333
|
"Show help for Jest CLI options, which are passed through"
|
|
327
|
-
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-
|
|
334
|
+
).description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-BuGhBxNC.cjs.js'); }).then((m) => m.command)));
|
|
328
335
|
}
|
|
329
336
|
function registerScriptCommand(program) {
|
|
330
337
|
const command = program.command("package [command]").description("Lifecycle scripts for individual packages");
|
|
331
338
|
command.command("start").description("Start a package for local development").option(...configOption).option("--role <name>", "Run the command with an explicit package role").option("--check", "Enable type checking and linting if available").option("--inspect [host]", "Enable debugger in Node.js environments").option(
|
|
332
339
|
"--inspect-brk [host]",
|
|
333
340
|
"Enable debugger in Node.js environments, breaking before code starts"
|
|
334
|
-
).option("--require <path>", "Add a --require argument to the node process").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
341
|
+
).option("--require <path>", "Add a --require argument to the node process").action(lazy(() => Promise.resolve().then(function () { return require('./index-Wt0qQuCU.cjs.js'); }).then((m) => m.command)));
|
|
335
342
|
command.command("build").description("Build a package for production deployment or publishing").option("--role <name>", "Run the command with an explicit package role").option(
|
|
336
343
|
"--minify",
|
|
337
344
|
"Minify the generated code. Does not apply to app package (app is minified by default)."
|
|
@@ -346,35 +353,35 @@ function registerScriptCommand(program) {
|
|
|
346
353
|
"Config files to load instead of app-config.yaml. Applies to app packages only.",
|
|
347
354
|
(opt, opts) => opts ? [...opts, opt] : [opt],
|
|
348
355
|
Array()
|
|
349
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
356
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./index-DtxQfUmH.cjs.js'); }).then((m) => m.command)));
|
|
350
357
|
command.command("lint [directories...]").option(
|
|
351
358
|
"--format <format>",
|
|
352
359
|
"Lint report output format",
|
|
353
360
|
"eslint-formatter-friendly"
|
|
354
|
-
).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
355
|
-
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-
|
|
356
|
-
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
357
|
-
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
358
|
-
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-
|
|
361
|
+
).option("--fix", "Attempt to automatically fix violations").description("Lint a package").action(lazy(() => Promise.resolve().then(function () { return require('./lint-NokSgx6Q.cjs.js'); }).then((m) => m.default)));
|
|
362
|
+
command.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description("Run tests, forwarding args to Jest, defaulting to watch mode").action(lazy(() => Promise.resolve().then(function () { return require('./test-Dt0SmBb4.cjs.js'); }).then((m) => m.default)));
|
|
363
|
+
command.command("clean").description("Delete cache directories").action(lazy(() => Promise.resolve().then(function () { return require('./clean-SL6sMYtJ.cjs.js'); }).then((m) => m.default)));
|
|
364
|
+
command.command("prepack").description("Prepares a package for packaging before publishing").action(lazy(() => Promise.resolve().then(function () { return require('./pack-D65aI1Y5.cjs.js'); }).then((m) => m.pre)));
|
|
365
|
+
command.command("postpack").description("Restores the changes made by the prepack command").action(lazy(() => Promise.resolve().then(function () { return require('./pack-D65aI1Y5.cjs.js'); }).then((m) => m.post)));
|
|
359
366
|
}
|
|
360
367
|
function registerMigrateCommand(program) {
|
|
361
368
|
const command = program.command("migrate [command]").description("Migration utilities");
|
|
362
|
-
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-
|
|
369
|
+
command.command("package-roles").description(`Add package role field to packages that don't have it`).action(lazy(() => Promise.resolve().then(function () { return require('./packageRole-B-GQB2ZF.cjs.js'); }).then((m) => m.default)));
|
|
363
370
|
command.command("package-scripts").description("Set package scripts according to each package role").action(
|
|
364
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageScripts-
|
|
371
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageScripts-CPnlPBBs.cjs.js'); }).then((m) => m.command))
|
|
365
372
|
);
|
|
366
373
|
command.command("package-exports").description("Synchronize package subpath export definitions").action(
|
|
367
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageExports-
|
|
374
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageExports-BQpjmF7V.cjs.js'); }).then((m) => m.command))
|
|
368
375
|
);
|
|
369
376
|
command.command("package-lint-configs").description(
|
|
370
377
|
"Migrates all packages to use @backstage/cli/config/eslint-factory"
|
|
371
378
|
).action(
|
|
372
|
-
lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-
|
|
379
|
+
lazy(() => Promise.resolve().then(function () { return require('./packageLintConfigs-CtbeLXlD.cjs.js'); }).then((m) => m.command))
|
|
373
380
|
);
|
|
374
381
|
command.command("react-router-deps").description(
|
|
375
382
|
"Migrates the react-router dependencies for all packages to be peer dependencies"
|
|
376
383
|
).action(
|
|
377
|
-
lazy(() => Promise.resolve().then(function () { return require('./reactRouterDeps-
|
|
384
|
+
lazy(() => Promise.resolve().then(function () { return require('./reactRouterDeps-BBKc6o07.cjs.js'); }).then((m) => m.command))
|
|
378
385
|
);
|
|
379
386
|
}
|
|
380
387
|
function registerCommands(program) {
|
|
@@ -394,7 +401,7 @@ function registerCommands(program) {
|
|
|
394
401
|
).option(
|
|
395
402
|
"--baseVersion <version>",
|
|
396
403
|
"The version to use for any new packages (default: 0.1.0)"
|
|
397
|
-
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-
|
|
404
|
+
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-wsaO3CgE.cjs.js'); }).then((m) => m.default)));
|
|
398
405
|
program.command("create", { hidden: true }).storeOptionsAsProperties(false).description(
|
|
399
406
|
"Open up an interactive guide to creating new things in your app [DEPRECATED]"
|
|
400
407
|
).option(
|
|
@@ -408,30 +415,30 @@ function registerCommands(program) {
|
|
|
408
415
|
).option("--scope <scope>", "The scope to use for new packages").option(
|
|
409
416
|
"--npm-registry <URL>",
|
|
410
417
|
"The package registry to use for new packages"
|
|
411
|
-
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-
|
|
418
|
+
).option("--no-private", "Do not mark new packages as private").action(lazy(() => Promise.resolve().then(function () { return require('./new-wsaO3CgE.cjs.js'); }).then((m) => m.default)));
|
|
412
419
|
program.command("create-plugin", { hidden: true }).option(
|
|
413
420
|
"--backend",
|
|
414
421
|
"Create plugin with the backend dependencies as default"
|
|
415
422
|
).description("Creates a new plugin in the current repository [DEPRECATED]").option("--scope <scope>", "npm scope").option("--npm-registry <URL>", "npm registry URL").option("--no-private", "Public npm package").action(
|
|
416
|
-
lazy(() => Promise.resolve().then(function () { return require('./createPlugin-
|
|
423
|
+
lazy(() => Promise.resolve().then(function () { return require('./createPlugin-Bf67GaKA.cjs.js'); }).then((m) => m.default))
|
|
417
424
|
);
|
|
418
425
|
program.command("plugin:diff", { hidden: true }).option("--check", "Fail if changes are required").option("--yes", "Apply all changes").description(
|
|
419
426
|
"Diff an existing plugin with the creation template [DEPRECATED]"
|
|
420
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./diff-
|
|
427
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./diff-jArODNjZ.cjs.js'); }).then((m) => m.default)));
|
|
421
428
|
program.command("test").allowUnknownOption(true).helpOption(", --backstage-cli-help").description(
|
|
422
429
|
"Run tests, forwarding args to Jest, defaulting to watch mode [DEPRECATED]"
|
|
423
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./test-
|
|
430
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./test-Dt0SmBb4.cjs.js'); }).then((m) => m.default)));
|
|
424
431
|
program.command("config:docs").option(
|
|
425
432
|
"--package <name>",
|
|
426
433
|
"Only include the schema that applies to the given package"
|
|
427
|
-
).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-
|
|
434
|
+
).description("Browse the configuration reference documentation").action(lazy(() => Promise.resolve().then(function () { return require('./docs-VFbH2gLP.cjs.js'); }).then((m) => m.default)));
|
|
428
435
|
program.command("config:print").option(
|
|
429
436
|
"--package <name>",
|
|
430
437
|
"Only load config schema that applies to the given package"
|
|
431
438
|
).option("--lax", "Do not require environment variables to be set").option("--frontend", "Print only the frontend configuration").option("--with-secrets", "Include secrets in the printed configuration").option(
|
|
432
439
|
"--format <format>",
|
|
433
440
|
"Format to print the configuration in, either json or yaml [yaml]"
|
|
434
|
-
).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-
|
|
441
|
+
).option(...configOption).description("Print the app configuration for the current package").action(lazy(() => Promise.resolve().then(function () { return require('./print-B6UB54DH.cjs.js'); }).then((m) => m.default)));
|
|
435
442
|
program.command("config:check").option(
|
|
436
443
|
"--package <name>",
|
|
437
444
|
"Only load config schema that applies to the given package"
|
|
@@ -440,14 +447,14 @@ function registerCommands(program) {
|
|
|
440
447
|
"Enable strict config validation, forbidding errors and unknown keys"
|
|
441
448
|
).option(...configOption).description(
|
|
442
449
|
"Validate that the given configuration loads and matches schema"
|
|
443
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./validate-
|
|
450
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./validate-2WOv51mB.cjs.js'); }).then((m) => m.default)));
|
|
444
451
|
program.command("config:schema").option(
|
|
445
452
|
"--package <name>",
|
|
446
453
|
"Only output config schema that applies to the given package"
|
|
447
454
|
).option(
|
|
448
455
|
"--format <format>",
|
|
449
456
|
"Format to print the schema in, either json or yaml [yaml]"
|
|
450
|
-
).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema
|
|
457
|
+
).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy(() => Promise.resolve().then(function () { return require('./schema-M5iIZ_Eq.cjs.js'); }).then((m) => m.default)));
|
|
451
458
|
registerRepoCommand(program);
|
|
452
459
|
registerScriptCommand(program);
|
|
453
460
|
registerMigrateCommand(program);
|
|
@@ -459,8 +466,8 @@ function registerCommands(program) {
|
|
|
459
466
|
"--release <version|next|main>",
|
|
460
467
|
"Bump to a specific Backstage release line or version",
|
|
461
468
|
"main"
|
|
462
|
-
).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-
|
|
463
|
-
program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-
|
|
469
|
+
).option("--skip-install", "Skips yarn install step").option("--skip-migrate", "Skips migration of any moved packages").description("Bump Backstage packages to the latest versions").action(lazy(() => Promise.resolve().then(function () { return require('./bump-CjL9wSlI.cjs.js'); }).then(function (n) { return n.bump; }).then((m) => m.default)));
|
|
470
|
+
program.command("versions:check").option("--fix", "Fix any auto-fixable versioning problems").description("Check Backstage package versioning").action(lazy(() => Promise.resolve().then(function () { return require('./lint-CeLPKohb.cjs.js'); }).then((m) => m.default)));
|
|
464
471
|
program.command("versions:migrate").option(
|
|
465
472
|
"--pattern <glob>",
|
|
466
473
|
"Override glob for matching packages to upgrade"
|
|
@@ -469,18 +476,18 @@ function registerCommands(program) {
|
|
|
469
476
|
"Skip code changes and only update package.json files"
|
|
470
477
|
).description(
|
|
471
478
|
"Migrate any plugins that have been moved to the @backstage-community namespace automatically"
|
|
472
|
-
).action(lazy(() => Promise.resolve().then(function () { return require('./bump-
|
|
473
|
-
program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-
|
|
479
|
+
).action(lazy(() => Promise.resolve().then(function () { return require('./bump-CjL9wSlI.cjs.js'); }).then(function (n) { return n.migrate; }).then((m) => m.default)));
|
|
480
|
+
program.command("clean").description("Delete cache directories [DEPRECATED]").action(lazy(() => Promise.resolve().then(function () { return require('./clean-SL6sMYtJ.cjs.js'); }).then((m) => m.default)));
|
|
474
481
|
program.command("build-workspace <workspace-dir> [packages...]").option(
|
|
475
482
|
"--alwaysYarnPack",
|
|
476
483
|
"Force workspace output to be a result of running `yarn pack` on each package (warning: very slow)"
|
|
477
|
-
).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-
|
|
478
|
-
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-
|
|
479
|
-
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-
|
|
484
|
+
).description("Builds a temporary dist workspace from the provided packages").action(lazy(() => Promise.resolve().then(function () { return require('./buildWorkspace-DV7BpoZT.cjs.js'); }).then((m) => m.default)));
|
|
485
|
+
program.command("create-github-app <github-org>").description("Create new GitHub App in your organization.").action(lazy(() => Promise.resolve().then(function () { return require('./index-ko14Ea3F.cjs.js'); }).then((m) => m.default)));
|
|
486
|
+
program.command("info").description("Show helpful information for debugging and reporting bugs").action(lazy(() => Promise.resolve().then(function () { return require('./info-31wuUeHo.cjs.js'); }).then((m) => m.default)));
|
|
480
487
|
program.command("install [plugin-id]", { hidden: true }).option(
|
|
481
488
|
"--from <packageJsonFilePath>",
|
|
482
489
|
"Install from a local package.json containing the installation recipe"
|
|
483
|
-
).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-
|
|
490
|
+
).description("Install a Backstage plugin [EXPERIMENTAL]").action(lazy(() => Promise.resolve().then(function () { return require('./install-Bf0Cm4CP.cjs.js'); }).then((m) => m.default)));
|
|
484
491
|
}
|
|
485
492
|
function lazy(getActionFunc) {
|
|
486
493
|
return async (...args) => {
|
|
@@ -524,4 +531,4 @@ exports.devDependencies = devDependencies;
|
|
|
524
531
|
exports.paths = paths;
|
|
525
532
|
exports.version = version;
|
|
526
533
|
exports.version$1 = version$c;
|
|
527
|
-
//# sourceMappingURL=index-
|
|
534
|
+
//# sourceMappingURL=index-CS6xQRSZ.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var createDistWorkspace = require('./createDistWorkspace-
|
|
4
|
-
var role = require('./role-
|
|
3
|
+
var createDistWorkspace = require('./createDistWorkspace-B1pyeDwS.cjs.js');
|
|
4
|
+
var role = require('./role-DTQZhzFJ.cjs.js');
|
|
5
5
|
var cliNode = require('@backstage/cli-node');
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var buildBackend = require('./buildBackend-
|
|
8
|
-
var config = require('./config-
|
|
6
|
+
var index = require('./index-CS6xQRSZ.cjs.js');
|
|
7
|
+
var buildBackend = require('./buildBackend-FV4cZ7YT.cjs.js');
|
|
8
|
+
var config = require('./config-XS8tRRzZ.cjs.js');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('fs-extra');
|
|
11
11
|
require('path');
|
|
@@ -13,7 +13,7 @@ require('p-limit');
|
|
|
13
13
|
require('os');
|
|
14
14
|
require('tar');
|
|
15
15
|
require('lodash/partition');
|
|
16
|
-
require('./run-
|
|
16
|
+
require('./run-B3QtsbD6.cjs.js');
|
|
17
17
|
require('child_process');
|
|
18
18
|
require('util');
|
|
19
19
|
require('@backstage/errors');
|
|
@@ -31,7 +31,7 @@ require('./svgrTemplate-BTjBQ3by.cjs.js');
|
|
|
31
31
|
require('./entryPoints-CoHH4lBA.cjs.js');
|
|
32
32
|
require('./parallel-BszNaKyc.cjs.js');
|
|
33
33
|
require('worker_threads');
|
|
34
|
-
require('./productionPack-
|
|
34
|
+
require('./productionPack-DotlEIE2.cjs.js');
|
|
35
35
|
require('npm-packlist');
|
|
36
36
|
require('commander');
|
|
37
37
|
require('semver');
|
|
@@ -44,7 +44,7 @@ require('react-dev-utils/ModuleScopePlugin');
|
|
|
44
44
|
require('run-script-webpack-plugin');
|
|
45
45
|
require('@manypkg/get-packages');
|
|
46
46
|
require('webpack-node-externals');
|
|
47
|
-
require('./packageDetection-
|
|
47
|
+
require('./packageDetection-DT09yDE6.cjs.js');
|
|
48
48
|
require('lodash/pickBy');
|
|
49
49
|
require('mini-css-extract-plugin');
|
|
50
50
|
require('@pmmmwh/react-refresh-webpack-plugin');
|
|
@@ -104,4 +104,4 @@ async function command(opts) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
exports.command = command;
|
|
107
|
-
//# sourceMappingURL=index-
|
|
107
|
+
//# sourceMappingURL=index-DtxQfUmH.cjs.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var role = require('./role-
|
|
3
|
+
var role = require('./role-DTQZhzFJ.cjs.js');
|
|
4
4
|
var fs = require('fs-extra');
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-CS6xQRSZ.cjs.js');
|
|
6
6
|
var webpack = require('webpack');
|
|
7
|
-
var packageDetection = require('./packageDetection-
|
|
7
|
+
var packageDetection = require('./packageDetection-DT09yDE6.cjs.js');
|
|
8
8
|
require('yn');
|
|
9
9
|
var path = require('path');
|
|
10
10
|
require('react-dev-utils/FileSizeReporter');
|
|
@@ -18,7 +18,7 @@ require('run-script-webpack-plugin');
|
|
|
18
18
|
require('@manypkg/get-packages');
|
|
19
19
|
require('webpack-node-externals');
|
|
20
20
|
require('lodash/pickBy');
|
|
21
|
-
require('./run-
|
|
21
|
+
require('./run-B3QtsbD6.cjs.js');
|
|
22
22
|
require('mini-css-extract-plugin');
|
|
23
23
|
require('@pmmmwh/react-refresh-webpack-plugin');
|
|
24
24
|
var chalk = require('chalk');
|
|
@@ -40,9 +40,9 @@ var errors = require('@backstage/errors');
|
|
|
40
40
|
var debounce = require('lodash/debounce');
|
|
41
41
|
var url = require('url');
|
|
42
42
|
var spawn = require('cross-spawn');
|
|
43
|
-
var lint = require('./lint-
|
|
44
|
-
var config = require('./config-
|
|
45
|
-
var Lockfile = require('./Lockfile-
|
|
43
|
+
var lint = require('./lint-CeLPKohb.cjs.js');
|
|
44
|
+
var config = require('./config-XS8tRRzZ.cjs.js');
|
|
45
|
+
var Lockfile = require('./Lockfile-C7rtIlD6.cjs.js');
|
|
46
46
|
require('commander');
|
|
47
47
|
require('./entryPoints-CoHH4lBA.cjs.js');
|
|
48
48
|
require('./svgrTemplate-BTjBQ3by.cjs.js');
|
|
@@ -87,6 +87,7 @@ async function serveBackend(options) {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
async function serveBundle(options) {
|
|
90
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
90
91
|
const paths = packageDetection.resolveBundlingPaths(options);
|
|
91
92
|
const targetPkg = await fs__default.default.readJson(paths.targetPackageJson);
|
|
92
93
|
if (options.verifyVersions) {
|
|
@@ -118,7 +119,7 @@ async function serveBundle(options) {
|
|
|
118
119
|
)
|
|
119
120
|
);
|
|
120
121
|
}
|
|
121
|
-
if (targetPkg.dependencies
|
|
122
|
+
if (((_b = (_a = targetPkg.dependencies) == null ? void 0 : _a["react-router"]) == null ? void 0 : _b.includes("beta")) || ((_d = (_c = targetPkg.dependencies) == null ? void 0 : _c["react-router-dom"]) == null ? void 0 : _d.includes("beta"))) {
|
|
122
123
|
console.warn(
|
|
123
124
|
chalk__default.default.yellow(`
|
|
124
125
|
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
@@ -139,8 +140,8 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
139
140
|
withFilteredKeys: true,
|
|
140
141
|
watch(appConfigs) {
|
|
141
142
|
latestFrontendAppConfigs = appConfigs;
|
|
142
|
-
webpackServer
|
|
143
|
-
viteServer
|
|
143
|
+
webpackServer == null ? void 0 : webpackServer.invalidate();
|
|
144
|
+
viteServer == null ? void 0 : viteServer.restart();
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
147
|
latestFrontendAppConfigs = cliConfig.frontendAppConfigs;
|
|
@@ -169,8 +170,8 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
169
170
|
config: fullConfig,
|
|
170
171
|
targetPath: paths.targetPath,
|
|
171
172
|
watch() {
|
|
172
|
-
webpackServer
|
|
173
|
-
viteServer
|
|
173
|
+
webpackServer == null ? void 0 : webpackServer.invalidate();
|
|
174
|
+
viteServer == null ? void 0 : viteServer.restart();
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
177
|
const commonConfigOptions = {
|
|
@@ -188,10 +189,12 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
188
189
|
additionalEntryPoints: detectedModulesEntryPoint
|
|
189
190
|
});
|
|
190
191
|
if (process.env.EXPERIMENTAL_VITE) {
|
|
191
|
-
const vite =
|
|
192
|
-
const { default: viteReact } =
|
|
193
|
-
const {
|
|
194
|
-
|
|
192
|
+
const vite = require("vite");
|
|
193
|
+
const { default: viteReact } = require("@vitejs/plugin-react");
|
|
194
|
+
const {
|
|
195
|
+
nodePolyfills: viteNodePolyfills
|
|
196
|
+
} = require("vite-plugin-node-polyfills");
|
|
197
|
+
const { createHtmlPlugin: viteHtml } = require("vite-plugin-html");
|
|
195
198
|
viteServer = await vite.createServer({
|
|
196
199
|
define: {
|
|
197
200
|
global: "window",
|
|
@@ -212,7 +215,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
212
215
|
inject: {
|
|
213
216
|
data: {
|
|
214
217
|
config: frontendConfig,
|
|
215
|
-
publicPath: config$1.output
|
|
218
|
+
publicPath: (_e = config$1.output) == null ? void 0 : _e.publicPath
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
221
|
})
|
|
@@ -241,11 +244,11 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
241
244
|
{
|
|
242
245
|
hot: !process.env.CI,
|
|
243
246
|
devMiddleware: {
|
|
244
|
-
publicPath: config$1.output
|
|
247
|
+
publicPath: (_f = config$1.output) == null ? void 0 : _f.publicPath,
|
|
245
248
|
stats: "errors-warnings"
|
|
246
249
|
},
|
|
247
250
|
static: paths.targetPublic ? {
|
|
248
|
-
publicPath: config$1.output
|
|
251
|
+
publicPath: (_g = config$1.output) == null ? void 0 : _g.publicPath,
|
|
249
252
|
directory: paths.targetPublic
|
|
250
253
|
} : void 0,
|
|
251
254
|
historyApiFallback: {
|
|
@@ -253,7 +256,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
253
256
|
// See https://github.com/facebookincubator/create-react-app/issues/387.
|
|
254
257
|
disableDotRule: true,
|
|
255
258
|
// The index needs to be rewritten relative to the new public path, including subroutes.
|
|
256
|
-
index: `${config$1.output
|
|
259
|
+
index: `${(_h = config$1.output) == null ? void 0 : _h.publicPath}index.html`
|
|
257
260
|
},
|
|
258
261
|
server: url.protocol === "https:" ? {
|
|
259
262
|
type: "https",
|
|
@@ -274,7 +277,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
274
277
|
compiler
|
|
275
278
|
);
|
|
276
279
|
}
|
|
277
|
-
await viteServer
|
|
280
|
+
await (viteServer == null ? void 0 : viteServer.listen());
|
|
278
281
|
await new Promise(async (resolve, reject) => {
|
|
279
282
|
if (webpackServer) {
|
|
280
283
|
webpackServer.startCallback((err) => {
|
|
@@ -292,8 +295,8 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
|
|
292
295
|
const waitForExit = async () => {
|
|
293
296
|
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
294
297
|
process.on(signal, () => {
|
|
295
|
-
webpackServer
|
|
296
|
-
viteServer
|
|
298
|
+
webpackServer == null ? void 0 : webpackServer.stop();
|
|
299
|
+
viteServer == null ? void 0 : viteServer.close();
|
|
297
300
|
process.exit();
|
|
298
301
|
});
|
|
299
302
|
}
|
|
@@ -324,14 +327,44 @@ function checkReactVersion() {
|
|
|
324
327
|
}
|
|
325
328
|
}
|
|
326
329
|
|
|
330
|
+
var __accessCheck = (obj, member, msg) => {
|
|
331
|
+
if (!member.has(obj))
|
|
332
|
+
throw TypeError("Cannot " + msg);
|
|
333
|
+
};
|
|
334
|
+
var __privateGet = (obj, member, getter) => {
|
|
335
|
+
__accessCheck(obj, member, "read from private field");
|
|
336
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
337
|
+
};
|
|
338
|
+
var __privateAdd = (obj, member, value) => {
|
|
339
|
+
if (member.has(obj))
|
|
340
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
341
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
342
|
+
};
|
|
343
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
344
|
+
__accessCheck(obj, member, "write to private field");
|
|
345
|
+
member.set(obj, value);
|
|
346
|
+
return value;
|
|
347
|
+
};
|
|
348
|
+
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
349
|
+
set _(value) {
|
|
350
|
+
__privateSet(obj, member, value);
|
|
351
|
+
},
|
|
352
|
+
get _() {
|
|
353
|
+
return __privateGet(obj, member, getter);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
var _generation, _methods;
|
|
327
357
|
const requestType = "@backstage/cli/channel/request";
|
|
328
358
|
const responseType = "@backstage/cli/channel/response";
|
|
329
359
|
class IpcServer {
|
|
330
|
-
|
|
331
|
-
|
|
360
|
+
constructor() {
|
|
361
|
+
__privateAdd(this, _generation, 1);
|
|
362
|
+
__privateAdd(this, _methods, /* @__PURE__ */ new Map());
|
|
363
|
+
}
|
|
332
364
|
addChild(child) {
|
|
333
|
-
|
|
334
|
-
const
|
|
365
|
+
var _a;
|
|
366
|
+
const generation = __privateWrapper(this, _generation)._++;
|
|
367
|
+
const sendMessage = (_a = child.send) == null ? void 0 : _a.bind(child);
|
|
335
368
|
if (!sendMessage) {
|
|
336
369
|
return;
|
|
337
370
|
}
|
|
@@ -339,7 +372,7 @@ class IpcServer {
|
|
|
339
372
|
if (request.type !== requestType) {
|
|
340
373
|
return;
|
|
341
374
|
}
|
|
342
|
-
const handler = this
|
|
375
|
+
const handler = __privateGet(this, _methods).get(request.method);
|
|
343
376
|
if (!handler) {
|
|
344
377
|
sendMessage({
|
|
345
378
|
type: responseType,
|
|
@@ -371,12 +404,14 @@ class IpcServer {
|
|
|
371
404
|
});
|
|
372
405
|
}
|
|
373
406
|
registerMethod(method, handler) {
|
|
374
|
-
if (this
|
|
407
|
+
if (__privateGet(this, _methods).has(method)) {
|
|
375
408
|
throw new Error(`A handler is already registered for method ${method}`);
|
|
376
409
|
}
|
|
377
|
-
this
|
|
410
|
+
__privateGet(this, _methods).set(method, handler);
|
|
378
411
|
}
|
|
379
412
|
}
|
|
413
|
+
_generation = new WeakMap();
|
|
414
|
+
_methods = new WeakMap();
|
|
380
415
|
|
|
381
416
|
class ServerDataStore {
|
|
382
417
|
static bind(server) {
|
|
@@ -404,7 +439,7 @@ class ServerDataStore {
|
|
|
404
439
|
"DevDataStore.load",
|
|
405
440
|
async (request) => {
|
|
406
441
|
const item = store.get(request.key);
|
|
407
|
-
return { loaded: Boolean(item), data: item
|
|
442
|
+
return { loaded: Boolean(item), data: item == null ? void 0 : item.data };
|
|
408
443
|
}
|
|
409
444
|
);
|
|
410
445
|
}
|
|
@@ -483,7 +518,7 @@ async function startBackendExperimental(options) {
|
|
|
483
518
|
if (!watcher) {
|
|
484
519
|
return;
|
|
485
520
|
}
|
|
486
|
-
if (typeof data === "object" && data
|
|
521
|
+
if (typeof data === "object" && (data == null ? void 0 : data.type) === "watch") {
|
|
487
522
|
let path$1 = data.path;
|
|
488
523
|
if (path$1.startsWith("file:")) {
|
|
489
524
|
path$1 = url.fileURLToPath(path$1);
|
|
@@ -631,4 +666,4 @@ async function command(opts) {
|
|
|
631
666
|
}
|
|
632
667
|
|
|
633
668
|
exports.command = command;
|
|
634
|
-
//# sourceMappingURL=index-
|
|
669
|
+
//# sourceMappingURL=index-Wt0qQuCU.cjs.js.map
|