sitevision-cli 1.0.0-beta.14 → 1.0.0-beta.15
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import http from 'http';
|
|
2
2
|
import crypto from 'crypto';
|
|
3
|
-
import
|
|
3
|
+
import open from 'open';
|
|
4
4
|
import { makeRequest, summarizeErrorBody } from './sitevision-api.js';
|
|
5
5
|
import { getOAuth2RefreshToken, setOAuth2RefreshToken, deleteOAuth2RefreshToken, getOAuth2ClientSecret, } from './keychain.js';
|
|
6
6
|
/** Default loopback port. Fixed so a single redirect URI can be whitelisted. */
|
|
@@ -84,15 +84,11 @@ export async function discoverOAuth2Config(domain, useHTTP = false) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
export function openBrowser(url) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
spawn(cmd, args, { stdio: 'ignore', detached: true }).unref();
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
87
|
+
// Preserve the full OAuth URL, including & and percent-encoded parameters,
|
|
88
|
+
// through Windows shell parsing. `open` handles platform-specific escaping.
|
|
89
|
+
void open(url).catch(() => {
|
|
94
90
|
// Fall back to the printed URL.
|
|
95
|
-
}
|
|
91
|
+
});
|
|
96
92
|
}
|
|
97
93
|
/**
|
|
98
94
|
* Turn a redirect's query params into a result, prioritizing the provider's own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sitevision-cli",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"svc": "dist/cli.js"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"ink": "^7.1.0",
|
|
25
25
|
"ink-spinner": "^5.0.0",
|
|
26
26
|
"meow": "^14.1.0",
|
|
27
|
+
"open": "^11.0.3",
|
|
27
28
|
"puppeteer-core": "^25.10.0",
|
|
28
29
|
"react": "^19.2.7"
|
|
29
30
|
},
|