xshell 1.2.86 → 1.2.88
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/package.json +19 -19
- package/prototype.common.d.ts +1 -2
- package/react.development.js +3 -3
- package/react.development.js.map +1 -1
- package/react.production.js +839 -839
- package/react.production.js.map +1 -1
- package/server.js +1 -1
- package/utils.browser.d.ts +1 -0
- package/utils.browser.js +10 -0
package/server.js
CHANGED
|
@@ -450,7 +450,7 @@ export class Server {
|
|
|
450
450
|
}
|
|
451
451
|
format_ua(headers) {
|
|
452
452
|
const { rtt, 'device-memory': memory } = headers;
|
|
453
|
-
const { device, os, browser } = UAParser(headers).withClientHints();
|
|
453
|
+
const { device, os, browser } = UAParser({ ...headers }).withClientHints();
|
|
454
454
|
const vendor = device.vendor?.toLowerCase();
|
|
455
455
|
const model = device.model?.toLowerCase();
|
|
456
456
|
const osname = os.name?.toLowerCase();
|
package/utils.browser.d.ts
CHANGED
|
@@ -18,3 +18,4 @@ export declare function to_option(value: string): {
|
|
|
18
18
|
};
|
|
19
19
|
export declare function download_url(name: string, url: string): void;
|
|
20
20
|
export declare function download(name: string, data: string | Uint8Array, mime_type?: string): void;
|
|
21
|
+
export declare function load_script(url: string): Promise<unknown>;
|
package/utils.browser.js
CHANGED
|
@@ -41,4 +41,14 @@ export function download_url(name, url) {
|
|
|
41
41
|
export function download(name, data, mime_type) {
|
|
42
42
|
download_url(name, URL.createObjectURL(new Blob([data], { type: mime_type })));
|
|
43
43
|
}
|
|
44
|
+
export async function load_script(url) {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
let $script = document.createElement('script');
|
|
47
|
+
$script.src = url;
|
|
48
|
+
$script.async = true;
|
|
49
|
+
$script.onload = resolve;
|
|
50
|
+
$script.onerror = reject;
|
|
51
|
+
document.head.appendChild($script);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
44
54
|
//# sourceMappingURL=utils.browser.js.map
|