@h3ravel/http 11.1.0 → 11.2.0
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-BncF-t-1.cjs +48 -0
- package/dist/chunk-qJlxXUkR.js +33 -0
- package/dist/find-up-simple-CPevfdC2.cjs +37 -0
- package/dist/find-up-simple-CPevfdC2.cjs.map +1 -0
- package/dist/find-up-simple-DLa63O5_.js +32 -0
- package/dist/find-up-simple-DLa63O5_.js.map +1 -0
- package/dist/index.cjs +18374 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +18357 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
16
|
+
key = keys[i];
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: ((k) => from[k]).bind(null, key),
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
|
|
31
|
+
Object.defineProperty(exports, '__commonJS', {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return __commonJS;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, '__esm', {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return __esm;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, '__toESM', {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return __toESM;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __esm = (fn, res) => function() {
|
|
11
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
|
+
};
|
|
13
|
+
var __commonJS = (cb, mod) => function() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { __commonJS, __esm, __require, __toESM };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-BncF-t-1.cjs');
|
|
2
|
+
let node_url = require("node:url");
|
|
3
|
+
node_url = require_chunk.__toESM(node_url);
|
|
4
|
+
let node_process = require("node:process");
|
|
5
|
+
node_process = require_chunk.__toESM(node_process);
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
node_path = require_chunk.__toESM(node_path);
|
|
8
|
+
let node_fs = require("node:fs");
|
|
9
|
+
node_fs = require_chunk.__toESM(node_fs);
|
|
10
|
+
let node_fs_promises = require("node:fs/promises");
|
|
11
|
+
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
12
|
+
|
|
13
|
+
//#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
14
|
+
async function findUp(name, { cwd = node_process.default.cwd(), type = "file", stopAt } = {}) {
|
|
15
|
+
let directory = node_path.default.resolve(toPath(cwd) ?? "");
|
|
16
|
+
const { root } = node_path.default.parse(directory);
|
|
17
|
+
stopAt = node_path.default.resolve(directory, toPath(stopAt ?? root));
|
|
18
|
+
const isAbsoluteName = node_path.default.isAbsolute(name);
|
|
19
|
+
while (directory) {
|
|
20
|
+
const filePath = isAbsoluteName ? name : node_path.default.join(directory, name);
|
|
21
|
+
try {
|
|
22
|
+
const stats = await node_fs_promises.default.stat(filePath);
|
|
23
|
+
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
|
|
24
|
+
} catch {}
|
|
25
|
+
if (directory === stopAt || directory === root) break;
|
|
26
|
+
directory = node_path.default.dirname(directory);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
var toPath;
|
|
30
|
+
var init_find_up_simple = require_chunk.__esm({ "../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js": (() => {
|
|
31
|
+
toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
32
|
+
}) });
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
init_find_up_simple();
|
|
36
|
+
exports.findUp = findUp;
|
|
37
|
+
//# sourceMappingURL=find-up-simple-CPevfdC2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-up-simple-CPevfdC2.cjs","names":["process","path","fsPromises"],"sources":["../../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js"],"sourcesContent":["import process from 'node:process';\nimport fsPromises from 'node:fs/promises';\nimport {fileURLToPath} from 'node:url';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function findUp(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt ?? root));\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\t\ttry {\n\t\t\tconst stats = await fsPromises.stat(filePath); // eslint-disable-line no-await-in-loop\n\t\t\tif ((type === 'file' && stats.isFile()) || (type === 'directory' && stats.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nexport function findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAQA,eAAsB,OAAO,MAAM,EAClC,MAAMA,qBAAQ,KAAK,EACnB,OAAO,QACP,WACG,EAAE,EAAE;CACP,IAAI,YAAYC,kBAAK,QAAQ,OAAO,IAAI,IAAI,GAAG;CAC/C,MAAM,EAAC,SAAQA,kBAAK,MAAM,UAAU;AACpC,UAASA,kBAAK,QAAQ,WAAW,OAAO,UAAU,KAAK,CAAC;CACxD,MAAM,iBAAiBA,kBAAK,WAAW,KAAK;AAE5C,QAAO,WAAW;EACjB,MAAM,WAAW,iBAAiB,OAAOA,kBAAK,KAAK,WAAW,KAAK;AACnE,MAAI;GACH,MAAM,QAAQ,MAAMC,yBAAW,KAAK,SAAS;AAC7C,OAAK,SAAS,UAAU,MAAM,QAAQ,IAAM,SAAS,eAAe,MAAM,aAAa,CACtF,QAAO;UAED;AAER,MAAI,cAAc,UAAU,cAAc,KACzC;AAGD,cAAYD,kBAAK,QAAQ,UAAU;;;;;CAzB/B,UAAS,cAAa,qBAAqB,kCAAoB,UAAU,GAAG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __esm } from "./chunk-qJlxXUkR.js";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import "node:fs";
|
|
6
|
+
import fsPromises from "node:fs/promises";
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
9
|
+
async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
|
|
10
|
+
let directory = path.resolve(toPath(cwd) ?? "");
|
|
11
|
+
const { root } = path.parse(directory);
|
|
12
|
+
stopAt = path.resolve(directory, toPath(stopAt ?? root));
|
|
13
|
+
const isAbsoluteName = path.isAbsolute(name);
|
|
14
|
+
while (directory) {
|
|
15
|
+
const filePath = isAbsoluteName ? name : path.join(directory, name);
|
|
16
|
+
try {
|
|
17
|
+
const stats = await fsPromises.stat(filePath);
|
|
18
|
+
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
|
|
19
|
+
} catch {}
|
|
20
|
+
if (directory === stopAt || directory === root) break;
|
|
21
|
+
directory = path.dirname(directory);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
var toPath;
|
|
25
|
+
var init_find_up_simple = __esm({ "../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js": (() => {
|
|
26
|
+
toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
27
|
+
}) });
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
init_find_up_simple();
|
|
31
|
+
export { findUp };
|
|
32
|
+
//# sourceMappingURL=find-up-simple-DLa63O5_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-up-simple-DLa63O5_.js","names":[],"sources":["../../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js"],"sourcesContent":["import process from 'node:process';\nimport fsPromises from 'node:fs/promises';\nimport {fileURLToPath} from 'node:url';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function findUp(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt ?? root));\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\t\ttry {\n\t\t\tconst stats = await fsPromises.stat(filePath); // eslint-disable-line no-await-in-loop\n\t\t\tif ((type === 'file' && stats.isFile()) || (type === 'directory' && stats.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nexport function findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,eAAsB,OAAO,MAAM,EAClC,MAAM,QAAQ,KAAK,EACnB,OAAO,QACP,WACG,EAAE,EAAE;CACP,IAAI,YAAY,KAAK,QAAQ,OAAO,IAAI,IAAI,GAAG;CAC/C,MAAM,EAAC,SAAQ,KAAK,MAAM,UAAU;AACpC,UAAS,KAAK,QAAQ,WAAW,OAAO,UAAU,KAAK,CAAC;CACxD,MAAM,iBAAiB,KAAK,WAAW,KAAK;AAE5C,QAAO,WAAW;EACjB,MAAM,WAAW,iBAAiB,OAAO,KAAK,KAAK,WAAW,KAAK;AACnE,MAAI;GACH,MAAM,QAAQ,MAAM,WAAW,KAAK,SAAS;AAC7C,OAAK,SAAS,UAAU,MAAM,QAAQ,IAAM,SAAS,eAAe,MAAM,aAAa,CACtF,QAAO;UAED;AAER,MAAI,cAAc,UAAU,cAAc,KACzC;AAGD,cAAY,KAAK,QAAQ,UAAU;;;;;CAzB/B,UAAS,cAAa,qBAAqB,MAAM,cAAc,UAAU,GAAG"}
|