@rsdoctor/sdk 1.3.13-beta.1 → 1.3.14
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/{0~795.js → 0~604.js} +15 -16
- package/dist/{1~336.cjs → 1~344.cjs} +2 -2
- package/dist/index.cjs +162 -156
- package/dist/index.js +193 -183
- package/dist/sdk/server/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import node_process from "node:process";
|
|
2
1
|
import { Buffer } from "node:buffer";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
4
3
|
import promises, { constants } from "node:fs/promises";
|
|
5
4
|
import node_os from "node:os";
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
"
|
|
5
|
+
export const __rspack_esm_id = "604";
|
|
6
|
+
export const __rspack_esm_ids = [
|
|
7
|
+
"604"
|
|
9
8
|
];
|
|
10
9
|
export const __webpack_modules__ = {
|
|
11
|
-
"../../node_modules/.pnpm/open@10.2.0/node_modules/open/index.js"
|
|
10
|
+
"../../node_modules/.pnpm/open@10.2.0/node_modules/open/index.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
12
11
|
let isDockerCached, cachedResult, mountPoint, defaultMountPoint;
|
|
13
12
|
__webpack_require__.d(__webpack_exports__, {
|
|
14
13
|
default: ()=>node_modules_open
|
|
15
14
|
});
|
|
16
|
-
var external_node_path_ = __webpack_require__("node:path"), external_node_util_ = __webpack_require__("node:util"), external_node_child_process_ = __webpack_require__("node:child_process"), external_node_fs_ = __webpack_require__("node:fs");
|
|
15
|
+
var external_node_process_ = __webpack_require__("node:process"), external_node_path_ = __webpack_require__("node:path"), external_node_util_ = __webpack_require__("node:util"), external_node_child_process_ = __webpack_require__("node:child_process"), external_node_fs_ = __webpack_require__("node:fs");
|
|
17
16
|
function isInsideContainer() {
|
|
18
17
|
return void 0 === cachedResult && (cachedResult = (()=>{
|
|
19
18
|
try {
|
|
@@ -36,14 +35,14 @@ export const __webpack_modules__ = {
|
|
|
36
35
|
}()), isDockerCached)), cachedResult;
|
|
37
36
|
}
|
|
38
37
|
let isWsl = ()=>{
|
|
39
|
-
if ('linux' !==
|
|
38
|
+
if ('linux' !== external_node_process_.default.platform) return !1;
|
|
40
39
|
if (node_os.release().toLowerCase().includes('microsoft')) return !isInsideContainer();
|
|
41
40
|
try {
|
|
42
41
|
return !!external_node_fs_.default.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') && !isInsideContainer();
|
|
43
42
|
} catch {
|
|
44
43
|
return !1;
|
|
45
44
|
}
|
|
46
|
-
}, is_wsl =
|
|
45
|
+
}, is_wsl = external_node_process_.default.env.__IS_WSL_TEST__ ? isWsl : isWsl(), wslDrivesMountPoint = (defaultMountPoint = '/mnt/', async function() {
|
|
47
46
|
if (mountPoint) return mountPoint;
|
|
48
47
|
let configFilePath = '/etc/wsl.conf', isConfigFileExists = !1;
|
|
49
48
|
try {
|
|
@@ -57,7 +56,7 @@ export const __webpack_modules__ = {
|
|
|
57
56
|
}), powerShellPathFromWsl = async ()=>{
|
|
58
57
|
let mountPoint = await wslDrivesMountPoint();
|
|
59
58
|
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
60
|
-
}, powerShellPath = async ()=>is_wsl ? powerShellPathFromWsl() : `${
|
|
59
|
+
}, powerShellPath = async ()=>is_wsl ? powerShellPathFromWsl() : `${external_node_process_.default.env.SYSTEMROOT || external_node_process_.default.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
61
60
|
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
62
61
|
let define = (value)=>Object.defineProperty(object, propertyName, {
|
|
63
62
|
value,
|
|
@@ -78,7 +77,7 @@ export const __webpack_modules__ = {
|
|
|
78
77
|
}
|
|
79
78
|
let execFileAsync = (0, external_node_util_.promisify)(external_node_child_process_.execFile);
|
|
80
79
|
async function defaultBrowserId() {
|
|
81
|
-
if ('darwin' !==
|
|
80
|
+
if ('darwin' !== external_node_process_.default.platform) throw Error('macOS only');
|
|
82
81
|
let { stdout } = await execFileAsync('defaults', [
|
|
83
82
|
'read',
|
|
84
83
|
'com.apple.LaunchServices/com.apple.launchservices.secure',
|
|
@@ -88,7 +87,7 @@ export const __webpack_modules__ = {
|
|
|
88
87
|
}
|
|
89
88
|
let run_applescript_execFileAsync = (0, external_node_util_.promisify)(external_node_child_process_.execFile);
|
|
90
89
|
async function runAppleScript(script, { humanReadableOutput = !0 } = {}) {
|
|
91
|
-
if ('darwin' !==
|
|
90
|
+
if ('darwin' !== external_node_process_.default.platform) throw Error('macOS only');
|
|
92
91
|
let { stdout } = await run_applescript_execFileAsync("osascript", [
|
|
93
92
|
'-e',
|
|
94
93
|
script,
|
|
@@ -155,14 +154,14 @@ export const __webpack_modules__ = {
|
|
|
155
154
|
}
|
|
156
155
|
let default_browser_execFileAsync = (0, external_node_util_.promisify)(external_node_child_process_.execFile);
|
|
157
156
|
async function default_browser_defaultBrowser() {
|
|
158
|
-
if ('darwin' ===
|
|
157
|
+
if ('darwin' === external_node_process_.default.platform) {
|
|
159
158
|
let id = await defaultBrowserId();
|
|
160
159
|
return {
|
|
161
160
|
name: await bundleName(id),
|
|
162
161
|
id
|
|
163
162
|
};
|
|
164
163
|
}
|
|
165
|
-
if ('linux' ===
|
|
164
|
+
if ('linux' === external_node_process_.default.platform) {
|
|
166
165
|
let { stdout } = await default_browser_execFileAsync('xdg-mime', [
|
|
167
166
|
'query',
|
|
168
167
|
'default',
|
|
@@ -173,10 +172,10 @@ export const __webpack_modules__ = {
|
|
|
173
172
|
id
|
|
174
173
|
};
|
|
175
174
|
}
|
|
176
|
-
if ('win32' ===
|
|
175
|
+
if ('win32' === external_node_process_.default.platform) return defaultBrowser();
|
|
177
176
|
throw Error('Only macOS, Linux, and Windows are supported');
|
|
178
177
|
}
|
|
179
|
-
let execFile = (0, external_node_util_.promisify)(external_node_child_process_.default.execFile), open_dirname = external_node_path_.default.dirname(fileURLToPath(import.meta.url)), localXdgOpenPath = external_node_path_.default.join(open_dirname, 'xdg-open'), { platform, arch } =
|
|
178
|
+
let execFile = (0, external_node_util_.promisify)(external_node_child_process_.default.execFile), open_dirname = external_node_path_.default.dirname(fileURLToPath(import.meta.url)), localXdgOpenPath = external_node_path_.default.join(open_dirname, 'xdg-open'), { platform, arch } = external_node_process_.default;
|
|
180
179
|
async function getWindowsDefaultBrowserFromWsl() {
|
|
181
180
|
let powershellPath = await powerShellPath(), rawCommand = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, encodedCommand = Buffer.from(rawCommand, 'utf16le').toString('base64'), { stdout } = await execFile(powershellPath, [
|
|
182
181
|
'-NoProfile',
|
|
@@ -265,7 +264,7 @@ export const __webpack_modules__ = {
|
|
|
265
264
|
try {
|
|
266
265
|
await promises.access(localXdgOpenPath, constants.X_OK), exeLocalXdgOpen = !0;
|
|
267
266
|
} catch {}
|
|
268
|
-
command =
|
|
267
|
+
command = external_node_process_.default.versions.electron ?? ('android' === platform || !open_dirname || '/' === open_dirname || !exeLocalXdgOpen) ? 'xdg-open' : localXdgOpenPath;
|
|
269
268
|
}
|
|
270
269
|
appArguments.length > 0 && cliArguments.push(...appArguments), options.wait || (childProcessOptions.stdio = 'ignore', childProcessOptions.detached = !0);
|
|
271
270
|
} else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
exports.ids = [
|
|
4
|
-
"
|
|
4
|
+
"344"
|
|
5
5
|
], exports.modules = {
|
|
6
|
-
"../../node_modules/.pnpm/open@10.2.0/node_modules/open/index.js"
|
|
6
|
+
"../../node_modules/.pnpm/open@10.2.0/node_modules/open/index.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
let isDockerCached, cachedResult, mountPoint, defaultMountPoint;
|
|
8
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
default: ()=>node_modules_open
|