blun-king-cli 9.1.21 → 9.1.22
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/bin/update-notice.js +11 -2
- package/package.json +1 -1
package/bin/update-notice.js
CHANGED
|
@@ -31,6 +31,13 @@ const UPDATE_SIGNAL_EXIT_CODES = Object.freeze({
|
|
|
31
31
|
SIGINT: 130,
|
|
32
32
|
SIGTERM: 143,
|
|
33
33
|
});
|
|
34
|
+
const INTERACTIVE_START_MODE_FLAGS = new Set([
|
|
35
|
+
'-y',
|
|
36
|
+
'--auto',
|
|
37
|
+
'--auto-approve',
|
|
38
|
+
'--plan',
|
|
39
|
+
'--yolo',
|
|
40
|
+
]);
|
|
34
41
|
const SEMVER_IDENTIFIER = '(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*)';
|
|
35
42
|
const SEMVER_PATTERN = new RegExp(
|
|
36
43
|
`^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)`
|
|
@@ -435,8 +442,10 @@ function writeSkippedVersion(blunDir, skippedVersion) {
|
|
|
435
442
|
}
|
|
436
443
|
|
|
437
444
|
function isInteractiveUpdateStart({ argv, env, stdin, stdout }) {
|
|
438
|
-
|
|
439
|
-
&& argv.length === 0
|
|
445
|
+
const isOrdinaryStartup = Array.isArray(argv)
|
|
446
|
+
&& (argv.length === 0
|
|
447
|
+
|| (argv.length === 1 && INTERACTIVE_START_MODE_FLAGS.has(argv[0])));
|
|
448
|
+
return isOrdinaryStartup
|
|
440
449
|
&& (!env || env.BLUN_NO_AUTO_UPDATE !== '1')
|
|
441
450
|
&& stdin?.isTTY === true
|
|
442
451
|
&& stdout?.isTTY === true;
|