@backstage/cli-common 0.1.16-next.0 → 0.1.16-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,19 @@
1
1
  # @backstage/cli-common
2
2
 
3
+ ## 0.1.16-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 2bae83a: Bumped dev dependencies `@types/node`
8
+ - Updated dependencies
9
+ - @backstage/errors@1.2.7
10
+
11
+ ## 0.1.16-next.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 5cfb2a4: Added new `run`, `runOutput`, and `runCheck` utilities to help run child processes in a safe and portable way.
16
+
3
17
  ## 0.1.16-next.0
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var errors = require('@backstage/errors');
4
+
5
+ class ExitCodeError extends errors.CustomErrorBase {
6
+ code;
7
+ constructor(code, command) {
8
+ super(
9
+ command ? `Command '${command}' exited with code ${code}` : `Child exited with code ${code}`
10
+ );
11
+ this.code = code;
12
+ }
13
+ }
14
+
15
+ exports.ExitCodeError = ExitCodeError;
16
+ //# sourceMappingURL=errors.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.cjs.js","sources":["../src/errors.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CustomErrorBase } from '@backstage/errors';\n\n/**\n * Error thrown when a child process exits with a non-zero code.\n * @public\n */\nexport class ExitCodeError extends CustomErrorBase {\n readonly code: number;\n\n constructor(code: number, command?: string) {\n super(\n command\n ? `Command '${command}' exited with code ${code}`\n : `Child exited with code ${code}`,\n );\n this.code = code;\n }\n}\n"],"names":["CustomErrorBase"],"mappings":";;;;AAsBO,MAAM,sBAAsBA,sBAAA,CAAgB;AAAA,EACxC,IAAA;AAAA,EAET,WAAA,CAAY,MAAc,OAAA,EAAkB;AAC1C,IAAA,KAAA;AAAA,MACE,UACI,CAAA,SAAA,EAAY,OAAO,sBAAsB,IAAI,CAAA,CAAA,GAC7C,0BAA0B,IAAI,CAAA;AAAA,KACpC;AACA,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AAAA,EACd;AACF;;;;"}
package/dist/index.cjs.js CHANGED
@@ -3,6 +3,8 @@
3
3
  var paths = require('./paths.cjs.js');
4
4
  var isChildPath = require('./isChildPath.cjs.js');
5
5
  var proxyBootstrap = require('./proxyBootstrap.cjs.js');
6
+ var run = require('./run.cjs.js');
7
+ var errors = require('./errors.cjs.js');
6
8
 
7
9
 
8
10
 
@@ -10,4 +12,8 @@ exports.BACKSTAGE_JSON = paths.BACKSTAGE_JSON;
10
12
  exports.findPaths = paths.findPaths;
11
13
  exports.isChildPath = isChildPath.isChildPath;
12
14
  exports.bootstrapEnvProxyAgents = proxyBootstrap.bootstrapEnvProxyAgents;
15
+ exports.run = run.run;
16
+ exports.runCheck = run.runCheck;
17
+ exports.runOutput = run.runOutput;
18
+ exports.ExitCodeError = errors.ExitCodeError;
13
19
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { SpawnOptions, ChildProcess } from 'child_process';
2
+ import { CustomErrorBase } from '@backstage/errors';
3
+
1
4
  /**
2
5
  * A function that takes a set of path fragments and resolves them into a
3
6
  * single complete path, relative to some root.
@@ -60,4 +63,72 @@ declare function isChildPath(base: string, path: string): boolean;
60
63
  */
61
64
  declare function bootstrapEnvProxyAgents(): void;
62
65
 
63
- export { BACKSTAGE_JSON, type Paths, type ResolveFunc, bootstrapEnvProxyAgents, findPaths, isChildPath };
66
+ /**
67
+ * Callback function that can be used to receive stdout or stderr data from a child process.
68
+ *
69
+ * @public
70
+ */
71
+ type RunOnOutput = (data: Buffer) => void;
72
+ /**
73
+ * Options for running a child process with {@link run} or related functions.
74
+ *
75
+ * @public
76
+ */
77
+ type RunOptions = Omit<SpawnOptions, 'env'> & {
78
+ env?: Partial<NodeJS.ProcessEnv>;
79
+ onStdout?: RunOnOutput;
80
+ onStderr?: RunOnOutput;
81
+ stdio?: SpawnOptions['stdio'];
82
+ };
83
+ /**
84
+ * Child process handle returned by {@link run}.
85
+ *
86
+ * @public
87
+ */
88
+ interface RunChildProcess extends ChildProcess {
89
+ /**
90
+ * Waits for the child process to exit.
91
+ *
92
+ * @remarks
93
+ *
94
+ * Resolves when the process exits successfully (exit code 0) or is terminated by a signal.
95
+ * If the process exits with a non-zero exit code, the promise is rejected with an {@link ExitCodeError}.
96
+ *
97
+ * @returns A promise that resolves when the process exits successfully or is terminated by a signal, or rejects on error.
98
+ */
99
+ waitForExit(): Promise<void>;
100
+ }
101
+ /**
102
+ * Runs a command and returns a child process handle.
103
+ *
104
+ * @public
105
+ */
106
+ declare function run(args: string[], options?: RunOptions): RunChildProcess;
107
+ /**
108
+ * Runs a command and returns the stdout.
109
+ *
110
+ * @remarks
111
+ *
112
+ * On error, both stdout and stderr are attached to the error object as properties.
113
+ *
114
+ * @public
115
+ */
116
+ declare function runOutput(args: string[], options?: RunOptions): Promise<string>;
117
+ /**
118
+ * Runs a command and returns true if it exits with code 0, false otherwise.
119
+ *
120
+ * @public
121
+ */
122
+ declare function runCheck(args: string[]): Promise<boolean>;
123
+
124
+ /**
125
+ * Error thrown when a child process exits with a non-zero code.
126
+ * @public
127
+ */
128
+ declare class ExitCodeError extends CustomErrorBase {
129
+ readonly code: number;
130
+ constructor(code: number, command?: string);
131
+ }
132
+
133
+ export { BACKSTAGE_JSON, ExitCodeError, bootstrapEnvProxyAgents, findPaths, isChildPath, run, runCheck, runOutput };
134
+ export type { Paths, ResolveFunc, RunChildProcess, RunOnOutput, RunOptions };
@@ -0,0 +1,125 @@
1
+ 'use strict';
2
+
3
+ var spawn = require('cross-spawn');
4
+ var errors = require('./errors.cjs.js');
5
+ var errors$1 = require('@backstage/errors');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var spawn__default = /*#__PURE__*/_interopDefaultCompat(spawn);
10
+
11
+ function run(args, options = {}) {
12
+ if (args.length === 0) {
13
+ throw new Error("run requires at least one argument");
14
+ }
15
+ const [name, ...cmdArgs] = args;
16
+ const { onStdout, onStderr, stdio: customStdio, ...spawnOptions } = options;
17
+ const env = {
18
+ ...process.env,
19
+ FORCE_COLOR: "true",
20
+ ...options.env ?? {}
21
+ };
22
+ const stdio = customStdio ?? [
23
+ "inherit",
24
+ onStdout ? "pipe" : "inherit",
25
+ onStderr ? "pipe" : "inherit"
26
+ ];
27
+ const child = spawn__default.default(name, cmdArgs, {
28
+ ...spawnOptions,
29
+ stdio,
30
+ env
31
+ });
32
+ if (onStdout && child.stdout) {
33
+ child.stdout.on("data", onStdout);
34
+ }
35
+ if (onStderr && child.stderr) {
36
+ child.stderr.on("data", onStderr);
37
+ }
38
+ const commandName = args.join(" ");
39
+ let waitPromise;
40
+ child.waitForExit = async () => {
41
+ if (waitPromise) {
42
+ return waitPromise;
43
+ }
44
+ waitPromise = new Promise((resolve, reject) => {
45
+ if (typeof child.exitCode === "number") {
46
+ if (child.exitCode) {
47
+ reject(new errors.ExitCodeError(child.exitCode, commandName));
48
+ } else {
49
+ resolve();
50
+ }
51
+ return;
52
+ }
53
+ function onError(error) {
54
+ cleanup();
55
+ reject(error);
56
+ }
57
+ function onExit(code) {
58
+ cleanup();
59
+ if (code) {
60
+ reject(new errors.ExitCodeError(code, commandName));
61
+ } else {
62
+ resolve();
63
+ }
64
+ }
65
+ function onSignal() {
66
+ if (!child.killed && child.exitCode === null) {
67
+ child.kill();
68
+ }
69
+ }
70
+ function cleanup() {
71
+ for (const signal of ["SIGINT", "SIGTERM"]) {
72
+ process.removeListener(signal, onSignal);
73
+ }
74
+ child.removeListener("error", onError);
75
+ child.removeListener("exit", onExit);
76
+ }
77
+ child.once("error", onError);
78
+ child.once("exit", onExit);
79
+ for (const signal of ["SIGINT", "SIGTERM"]) {
80
+ process.addListener(signal, onSignal);
81
+ }
82
+ });
83
+ return waitPromise;
84
+ };
85
+ return child;
86
+ }
87
+ async function runOutput(args, options) {
88
+ const stdoutChunks = [];
89
+ const stderrChunks = [];
90
+ if (args.length === 0) {
91
+ throw new Error("runOutput requires at least one argument");
92
+ }
93
+ try {
94
+ await run(args, {
95
+ ...options,
96
+ onStdout: (data) => {
97
+ stdoutChunks.push(data);
98
+ options?.onStdout?.(data);
99
+ },
100
+ onStderr: (data) => {
101
+ stderrChunks.push(data);
102
+ options?.onStderr?.(data);
103
+ }
104
+ }).waitForExit();
105
+ return Buffer.concat(stdoutChunks).toString().trim();
106
+ } catch (error) {
107
+ errors$1.assertError(error);
108
+ error.stdout = Buffer.concat(stdoutChunks).toString();
109
+ error.stderr = Buffer.concat(stderrChunks).toString();
110
+ throw error;
111
+ }
112
+ }
113
+ async function runCheck(args) {
114
+ try {
115
+ await run(args).waitForExit();
116
+ return true;
117
+ } catch {
118
+ return false;
119
+ }
120
+ }
121
+
122
+ exports.run = run;
123
+ exports.runCheck = runCheck;
124
+ exports.runOutput = runOutput;
125
+ //# sourceMappingURL=run.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.cjs.js","sources":["../src/run.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ChildProcess, SpawnOptions } from 'child_process';\nimport spawn from 'cross-spawn';\nimport { ExitCodeError } from './errors';\nimport { assertError } from '@backstage/errors';\n\n/**\n * Callback function that can be used to receive stdout or stderr data from a child process.\n *\n * @public\n */\nexport type RunOnOutput = (data: Buffer) => void;\n\n/**\n * Options for running a child process with {@link run} or related functions.\n *\n * @public\n */\nexport type RunOptions = Omit<SpawnOptions, 'env'> & {\n env?: Partial<NodeJS.ProcessEnv>;\n onStdout?: RunOnOutput;\n onStderr?: RunOnOutput;\n stdio?: SpawnOptions['stdio'];\n};\n\n/**\n * Child process handle returned by {@link run}.\n *\n * @public\n */\nexport interface RunChildProcess extends ChildProcess {\n /**\n * Waits for the child process to exit.\n *\n * @remarks\n *\n * Resolves when the process exits successfully (exit code 0) or is terminated by a signal.\n * If the process exits with a non-zero exit code, the promise is rejected with an {@link ExitCodeError}.\n *\n * @returns A promise that resolves when the process exits successfully or is terminated by a signal, or rejects on error.\n */\n waitForExit(): Promise<void>;\n}\n\n/**\n * Runs a command and returns a child process handle.\n *\n * @public\n */\nexport function run(args: string[], options: RunOptions = {}): RunChildProcess {\n if (args.length === 0) {\n throw new Error('run requires at least one argument');\n }\n\n const [name, ...cmdArgs] = args;\n\n const { onStdout, onStderr, stdio: customStdio, ...spawnOptions } = options;\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n FORCE_COLOR: 'true',\n ...(options.env ?? {}),\n };\n\n const stdio =\n customStdio ??\n ([\n 'inherit',\n onStdout ? 'pipe' : 'inherit',\n onStderr ? 'pipe' : 'inherit',\n ] as ('inherit' | 'pipe')[]);\n\n const child = spawn(name, cmdArgs, {\n ...spawnOptions,\n stdio,\n env,\n }) as RunChildProcess;\n\n if (onStdout && child.stdout) {\n child.stdout.on('data', onStdout);\n }\n if (onStderr && child.stderr) {\n child.stderr.on('data', onStderr);\n }\n\n const commandName = args.join(' ');\n\n let waitPromise: Promise<void> | undefined;\n\n child.waitForExit = async (): Promise<void> => {\n if (waitPromise) {\n return waitPromise;\n }\n\n waitPromise = new Promise<void>((resolve, reject) => {\n if (typeof child.exitCode === 'number') {\n if (child.exitCode) {\n reject(new ExitCodeError(child.exitCode, commandName));\n } else {\n resolve();\n }\n return;\n }\n\n function onError(error: Error) {\n cleanup();\n reject(error);\n }\n\n function onExit(code: number | null) {\n cleanup();\n if (code) {\n reject(new ExitCodeError(code, commandName));\n } else {\n resolve();\n }\n }\n\n function onSignal() {\n if (!child.killed && child.exitCode === null) {\n child.kill();\n }\n }\n\n function cleanup() {\n for (const signal of ['SIGINT', 'SIGTERM'] as const) {\n process.removeListener(signal, onSignal);\n }\n child.removeListener('error', onError);\n child.removeListener('exit', onExit);\n }\n\n child.once('error', onError);\n child.once('exit', onExit);\n\n for (const signal of ['SIGINT', 'SIGTERM'] as const) {\n process.addListener(signal, onSignal);\n }\n });\n\n return waitPromise;\n };\n\n return child;\n}\n\n/**\n * Runs a command and returns the stdout.\n *\n * @remarks\n *\n * On error, both stdout and stderr are attached to the error object as properties.\n *\n * @public\n */\nexport async function runOutput(\n args: string[],\n options?: RunOptions,\n): Promise<string> {\n const stdoutChunks: Buffer[] = [];\n const stderrChunks: Buffer[] = [];\n\n if (args.length === 0) {\n throw new Error('runOutput requires at least one argument');\n }\n\n try {\n await run(args, {\n ...options,\n onStdout: data => {\n stdoutChunks.push(data);\n options?.onStdout?.(data);\n },\n onStderr: data => {\n stderrChunks.push(data);\n options?.onStderr?.(data);\n },\n }).waitForExit();\n\n return Buffer.concat(stdoutChunks).toString().trim();\n } catch (error) {\n assertError(error);\n\n (error as Error & { stdout?: string }).stdout =\n Buffer.concat(stdoutChunks).toString();\n (error as Error & { stderr?: string }).stderr =\n Buffer.concat(stderrChunks).toString();\n\n throw error;\n }\n}\n\n/**\n * Runs a command and returns true if it exits with code 0, false otherwise.\n *\n * @public\n */\nexport async function runCheck(args: string[]): Promise<boolean> {\n try {\n await run(args).waitForExit();\n return true;\n } catch {\n return false;\n }\n}\n"],"names":["spawn","ExitCodeError","assertError"],"mappings":";;;;;;;;;;AAgEO,SAAS,GAAA,CAAI,IAAA,EAAgB,OAAA,GAAsB,EAAC,EAAoB;AAC7E,EAAA,IAAI,IAAA,CAAK,WAAW,CAAA,EAAG;AACrB,IAAA,MAAM,IAAI,MAAM,oCAAoC,CAAA;AAAA,EACtD;AAEA,EAAA,MAAM,CAAC,IAAA,EAAM,GAAG,OAAO,CAAA,GAAI,IAAA;AAE3B,EAAA,MAAM,EAAE,QAAA,EAAU,QAAA,EAAU,OAAO,WAAA,EAAa,GAAG,cAAa,GAAI,OAAA;AACpE,EAAA,MAAM,GAAA,GAAyB;AAAA,IAC7B,GAAG,OAAA,CAAQ,GAAA;AAAA,IACX,WAAA,EAAa,MAAA;AAAA,IACb,GAAI,OAAA,CAAQ,GAAA,IAAO;AAAC,GACtB;AAEA,EAAA,MAAM,QACJ,WAAA,IACC;AAAA,IACC,SAAA;AAAA,IACA,WAAW,MAAA,GAAS,SAAA;AAAA,IACpB,WAAW,MAAA,GAAS;AAAA,GACtB;AAEF,EAAA,MAAM,KAAA,GAAQA,sBAAA,CAAM,IAAA,EAAM,OAAA,EAAS;AAAA,IACjC,GAAG,YAAA;AAAA,IACH,KAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,IAAI,QAAA,IAAY,MAAM,MAAA,EAAQ;AAC5B,IAAA,KAAA,CAAM,MAAA,CAAO,EAAA,CAAG,MAAA,EAAQ,QAAQ,CAAA;AAAA,EAClC;AACA,EAAA,IAAI,QAAA,IAAY,MAAM,MAAA,EAAQ;AAC5B,IAAA,KAAA,CAAM,MAAA,CAAO,EAAA,CAAG,MAAA,EAAQ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AAA,GACrC,MAAA,CAAO,MAAA,CAAO,YAAY,EAAE,QAAA,EAAS;AACvC,IAAC,MAAsC,MAAA,GACrC,MAAA,CAAO,MAAA,CAAO,YAAY,EAAE,QAAA,EAAS;AAEvC,IAAA,MAAM,KAAA;AAAA,EACR;AACF;AAOA,eAAsB,SAAS,IAAA,EAAkC;AAC/D,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,CAAI,IAAI,CAAA,CAAE,WAAA,EAAY;AAC5B,IAAA,OAAO,IAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli-common",
3
- "version": "0.1.16-next.0",
3
+ "version": "0.1.16-next.2",
4
4
  "description": "Common functionality used by cli, backend, and create-app",
5
5
  "backstage": {
6
6
  "role": "node-library"
@@ -35,12 +35,15 @@
35
35
  "test": "backstage-cli package test"
36
36
  },
37
37
  "dependencies": {
38
+ "@backstage/errors": "1.2.7",
39
+ "cross-spawn": "^7.0.3",
38
40
  "global-agent": "^3.0.0",
39
41
  "undici": "^7.2.3"
40
42
  },
41
43
  "devDependencies": {
42
- "@backstage/cli": "0.34.6-next.0",
43
- "@types/node": "^20.16.0"
44
+ "@backstage/cli": "0.35.0-next.2",
45
+ "@types/cross-spawn": "^6.0.2",
46
+ "@types/node": "^22.13.14"
44
47
  },
45
48
  "typesVersions": {
46
49
  "*": {