@kaynooo/cli-stack 0.7.0 → 0.7.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.
- package/dist/cli.js +5 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -317,6 +317,9 @@ function marked(mark, text, stream, detail, env = process6.env) {
|
|
|
317
317
|
}
|
|
318
318
|
return `${head} ${text}${detail === undefined ? "" : ` ${colors.dim(detail)}`}`;
|
|
319
319
|
}
|
|
320
|
+
function warn(text, detail) {
|
|
321
|
+
console.error(marked("warn", text, process6.stderr, detail));
|
|
322
|
+
}
|
|
320
323
|
var STATUS_WORDS = {
|
|
321
324
|
passed: ["passed", "success", "succeeded", "ok"],
|
|
322
325
|
failed: ["failed", "failure", "error", "errored"],
|
|
@@ -988,7 +991,7 @@ function commandPath(scope, argv) {
|
|
|
988
991
|
// ../kit/src/compose.ts
|
|
989
992
|
async function captureOutput(argv, { cwd, env } = {}) {
|
|
990
993
|
const run = Bun.spawn(argv, { ...cwd === undefined ? {} : { cwd }, env: { ...process.env, ...env }, stdin: "ignore", stdout: "pipe", stderr: "pipe" });
|
|
991
|
-
const [stdout, stderr, code] = await Promise.all([run.stdout.text(), run.stderr.text(), run.exited]);
|
|
994
|
+
const [stdout, stderr, code] = await Promise.all([new Response(run.stdout).text(), new Response(run.stderr).text(), run.exited]);
|
|
992
995
|
return { code, stdout, stderr };
|
|
993
996
|
}
|
|
994
997
|
async function compose(args, { flags = [], ...options } = {}) {
|
|
@@ -1495,7 +1498,7 @@ async function port(args) {
|
|
|
1495
1498
|
}
|
|
1496
1499
|
console.log(number);
|
|
1497
1500
|
if (isListening(number))
|
|
1498
|
-
|
|
1501
|
+
warn(`port ${number} is already in use on this machine`);
|
|
1499
1502
|
return 0;
|
|
1500
1503
|
}
|
|
1501
1504
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaynooo/cli-stack",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"description": "stack: a stable port per service name, and an audit of a compose release setup against its release.config.ts.",
|
|
6
6
|
"author": "Kaynooo <contact@kaynooo.fr>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"stack": "$npm_execpath src/cli.ts"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@kaynooo/cli-kit": "0.
|
|
31
|
+
"@kaynooo/cli-kit": "0.37.0"
|
|
32
32
|
}
|
|
33
33
|
}
|