zeed 0.7.157 → 0.7.158
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/{chunk-L5EPYO3L.js → chunk-DYIBY42G.js} +2 -2
- package/dist/{chunk-L5EPYO3L.js.map → chunk-DYIBY42G.js.map} +0 -0
- package/dist/{chunk-V3MEV7XK.js → chunk-FGL56JF2.js} +2 -2
- package/dist/{chunk-V3MEV7XK.js.map → chunk-FGL56JF2.js.map} +0 -0
- package/dist/{chunk-DPI2LOOM.js → chunk-TIMYBUQO.js} +19 -1
- package/dist/{chunk-DPI2LOOM.js.map → chunk-TIMYBUQO.js.map} +1 -1
- package/dist/index.all.cjs +19 -0
- package/dist/index.all.cjs.map +1 -1
- package/dist/index.all.d.ts +3 -3
- package/dist/index.all.js +5 -3
- package/dist/index.browser.cjs +19 -0
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.ts +2 -2
- package/dist/index.browser.js +4 -2
- package/dist/index.node.cjs +19 -0
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +2 -2
- package/dist/index.node.js +4 -2
- package/dist/{log-colors-fec5f791.d.ts → log-colors-b25ebf30.d.ts} +1 -1
- package/dist/{log-util-a8ecdf1a.d.ts → log-util-0a88d2f7.d.ts} +1 -1
- package/dist/{uuid-7a0fd2c0.d.ts → uuid-c308e92e.d.ts} +6 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-T5YP6WMZ.js";
|
|
7
7
|
import {
|
|
8
8
|
isBrowser
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TIMYBUQO.js";
|
|
10
10
|
import {
|
|
11
11
|
Logger,
|
|
12
12
|
__name,
|
|
@@ -329,4 +329,4 @@ export {
|
|
|
329
329
|
LocalStorage,
|
|
330
330
|
LoggerBrowserClassicHandler
|
|
331
331
|
};
|
|
332
|
-
//# sourceMappingURL=chunk-
|
|
332
|
+
//# sourceMappingURL=chunk-DYIBY42G.js.map
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
cloneObject,
|
|
3
3
|
renderMessages,
|
|
4
4
|
toValidFilename
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TIMYBUQO.js";
|
|
6
6
|
import {
|
|
7
7
|
Logger,
|
|
8
8
|
__name,
|
|
@@ -586,4 +586,4 @@ export {
|
|
|
586
586
|
loggerStackTraceDebug,
|
|
587
587
|
LoggerNodeHandler
|
|
588
588
|
};
|
|
589
|
-
//# sourceMappingURL=chunk-
|
|
589
|
+
//# sourceMappingURL=chunk-FGL56JF2.js.map
|
|
File without changes
|
|
@@ -2758,11 +2758,28 @@ var defaultOptions = {
|
|
|
2758
2758
|
redirect: "follow",
|
|
2759
2759
|
headers: {}
|
|
2760
2760
|
};
|
|
2761
|
+
function parseBasicAuth(url) {
|
|
2762
|
+
let m = /:\/\/([^@]*)@/gi.exec(url);
|
|
2763
|
+
if (m && m[1]) {
|
|
2764
|
+
let [username, password] = m[1].split(":", 2);
|
|
2765
|
+
return {
|
|
2766
|
+
url: url.replace(m[1] + "@", ""),
|
|
2767
|
+
username,
|
|
2768
|
+
password
|
|
2769
|
+
};
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
__name(parseBasicAuth, "parseBasicAuth");
|
|
2761
2773
|
async function fetchBasic(url, fetchOptions = {}, fetchFn = fetch) {
|
|
2762
2774
|
try {
|
|
2763
2775
|
if (isArray(fetchOptions)) {
|
|
2764
2776
|
fetchOptions = deepMerge({}, ...arrayFlatten(fetchOptions));
|
|
2765
2777
|
}
|
|
2778
|
+
let auth = parseBasicAuth(String(url));
|
|
2779
|
+
if (auth) {
|
|
2780
|
+
url = auth.url;
|
|
2781
|
+
fetchOptions = deepMerge({}, fetchOptions, fetchOptionsBasicAuth(auth.username, auth.password));
|
|
2782
|
+
}
|
|
2766
2783
|
const response = await fetchFn(String(url), fetchOptions);
|
|
2767
2784
|
if (response.status < 400) {
|
|
2768
2785
|
return response;
|
|
@@ -3143,6 +3160,7 @@ export {
|
|
|
3143
3160
|
PubSub,
|
|
3144
3161
|
usePubSub,
|
|
3145
3162
|
useRPC,
|
|
3163
|
+
parseBasicAuth,
|
|
3146
3164
|
fetchBasic,
|
|
3147
3165
|
fetchJson,
|
|
3148
3166
|
fetchText,
|
|
@@ -3158,4 +3176,4 @@ export {
|
|
|
3158
3176
|
useExitHandler,
|
|
3159
3177
|
MemStorage
|
|
3160
3178
|
};
|
|
3161
|
-
//# sourceMappingURL=chunk-
|
|
3179
|
+
//# sourceMappingURL=chunk-TIMYBUQO.js.map
|