botasaurus-desktop-api 4.1.89 → 4.1.90
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/bundle.js +24 -15
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/utils.d.ts +11 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +24 -15
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -3306,25 +3306,34 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3306
3306
|
/* provided dependency */ var process = __webpack_require__("./node_modules/process/browser.js");
|
|
3307
3307
|
|
|
3308
3308
|
|
|
3309
|
-
|
|
3309
|
+
/**
|
|
3310
|
+
* Removes everything after (and including) the first single slash (/) in a string,
|
|
3311
|
+
* but skips over '//' (double slashes), which are used in protocols like 'http://'.
|
|
3312
|
+
* This is primarily used to extract the base URL (protocol + host) from a full URL.
|
|
3313
|
+
*
|
|
3314
|
+
* Example:
|
|
3315
|
+
* removeAfterFirstSlash("https://example.com/api/v1") // "https://example.com"
|
|
3316
|
+
* removeAfterFirstSlash("http://foo/bar/baz") // "http://foo"
|
|
3317
|
+
* removeAfterFirstSlash("localhost:8000/api/v1") // "localhost:8000"
|
|
3318
|
+
* removeAfterFirstSlash("https://example.com") // "https://example.com"
|
|
3319
|
+
*/ function removeAfterFirstSlash(inputString) {
|
|
3310
3320
|
let i = 0;
|
|
3311
3321
|
const strLen = inputString.length;
|
|
3312
|
-
while(
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
+
while(i < strLen){
|
|
3323
|
+
const char = inputString[i];
|
|
3324
|
+
if (char === '/') {
|
|
3325
|
+
// Check for double slash (e.g., 'http://')
|
|
3326
|
+
if (i + 1 < strLen && inputString[i + 1] === '/') {
|
|
3327
|
+
i += 2;
|
|
3328
|
+
continue;
|
|
3329
|
+
} else {
|
|
3330
|
+
// Single slash: trim here
|
|
3331
|
+
return inputString.substring(0, i);
|
|
3322
3332
|
}
|
|
3323
|
-
i++;
|
|
3324
|
-
} else {
|
|
3325
|
-
break;
|
|
3326
3333
|
}
|
|
3334
|
+
i++;
|
|
3327
3335
|
}
|
|
3336
|
+
// No single slash found (or only part of protocol), return the whole input
|
|
3328
3337
|
return inputString;
|
|
3329
3338
|
}
|
|
3330
3339
|
function relativePath(targetPath) {
|
|
@@ -8006,7 +8015,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
|
|
|
8006
8015
|
})();
|
|
8007
8016
|
// webpack/runtime/get_full_hash
|
|
8008
8017
|
(() => {
|
|
8009
|
-
__webpack_require__.h = () => ("
|
|
8018
|
+
__webpack_require__.h = () => ("6250e08ac0b3223e")
|
|
8010
8019
|
})();
|
|
8011
8020
|
// webpack/runtime/get_main_filename/update manifest
|
|
8012
8021
|
(() => {
|