@somewhere-tech/cli 0.27.1 → 0.27.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/dist/lib/notify/index.js
CHANGED
|
@@ -10,7 +10,15 @@ const PROVIDERS = [updateProvider];
|
|
|
10
10
|
/** `somewhere <sub>` forms that must stay silent: the verdict/safety pass-throughs
|
|
11
11
|
* (their own bins already bypass this entry, but `somewhere swpx …` reaches here)
|
|
12
12
|
* and the machine-oriented npx/npm aliases. */
|
|
13
|
-
const SKIP_SUBCOMMANDS = new Set(['swpx', 'swpm', 'x', 'm', 'npx', 'npm']);
|
|
13
|
+
const SKIP_SUBCOMMANDS = new Set(['swpx', 'swpm', 'x', 'm', 'npx', 'npm', 'update']);
|
|
14
|
+
/** Commands that own their output or run in a safety-sensitive pass-through
|
|
15
|
+
* stay silent. In particular, an `update` process keeps its old in-memory
|
|
16
|
+
* version after installing the new package, so its generic exit notice would
|
|
17
|
+
* otherwise repeat the update that just succeeded. */
|
|
18
|
+
export function subcommandSuppressesNotifications(argv) {
|
|
19
|
+
const sub = argv[2];
|
|
20
|
+
return !sub || sub.startsWith('-') || SKIP_SUBCOMMANDS.has(sub);
|
|
21
|
+
}
|
|
14
22
|
function currentVersion() {
|
|
15
23
|
try {
|
|
16
24
|
// dist/lib/notify/index.js → package root is three levels up.
|
|
@@ -31,8 +39,7 @@ function notificationsAllowed(argv) {
|
|
|
31
39
|
return false; // CI logs
|
|
32
40
|
if (process.env.SOMEWHERE_NO_NOTIFICATIONS)
|
|
33
41
|
return false; // global opt-out
|
|
34
|
-
|
|
35
|
-
if (!sub || sub.startsWith('-') || SKIP_SUBCOMMANDS.has(sub))
|
|
42
|
+
if (subcommandSuppressesNotifications(argv))
|
|
36
43
|
return false;
|
|
37
44
|
return true;
|
|
38
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/notify/index.ts"],"names":[],"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AAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,oDAAoD;IACjE,CAAC;AACH,CAAC"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@somewhere-tech/cli",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@somewhere-tech/cli",
|
|
9
|
-
"version": "0.27.
|
|
9
|
+
"version": "0.27.2",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@modelcontextprotocol/sdk",
|
|
12
12
|
"chokidar",
|