forked from RiseUP/riseup-squad18
Atualizações do site
This commit is contained in:
parent
3a52c1dcd4
commit
12afa40e41
202
MEDICONNECTv3 - cópia/node_modules/.package-lock.json
generated
vendored
202
MEDICONNECTv3 - cópia/node_modules/.package-lock.json
generated
vendored
@ -308,26 +308,10 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -337,7 +321,7 @@
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
@ -1691,41 +1675,44 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
|
||||
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz",
|
||||
"integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.21.5",
|
||||
"@esbuild/android-arm": "0.21.5",
|
||||
"@esbuild/android-arm64": "0.21.5",
|
||||
"@esbuild/android-x64": "0.21.5",
|
||||
"@esbuild/darwin-arm64": "0.21.5",
|
||||
"@esbuild/darwin-x64": "0.21.5",
|
||||
"@esbuild/freebsd-arm64": "0.21.5",
|
||||
"@esbuild/freebsd-x64": "0.21.5",
|
||||
"@esbuild/linux-arm": "0.21.5",
|
||||
"@esbuild/linux-arm64": "0.21.5",
|
||||
"@esbuild/linux-ia32": "0.21.5",
|
||||
"@esbuild/linux-loong64": "0.21.5",
|
||||
"@esbuild/linux-mips64el": "0.21.5",
|
||||
"@esbuild/linux-ppc64": "0.21.5",
|
||||
"@esbuild/linux-riscv64": "0.21.5",
|
||||
"@esbuild/linux-s390x": "0.21.5",
|
||||
"@esbuild/linux-x64": "0.21.5",
|
||||
"@esbuild/netbsd-x64": "0.21.5",
|
||||
"@esbuild/openbsd-x64": "0.21.5",
|
||||
"@esbuild/sunos-x64": "0.21.5",
|
||||
"@esbuild/win32-arm64": "0.21.5",
|
||||
"@esbuild/win32-ia32": "0.21.5",
|
||||
"@esbuild/win32-x64": "0.21.5"
|
||||
"@esbuild/aix-ppc64": "0.25.9",
|
||||
"@esbuild/android-arm": "0.25.9",
|
||||
"@esbuild/android-arm64": "0.25.9",
|
||||
"@esbuild/android-x64": "0.25.9",
|
||||
"@esbuild/darwin-arm64": "0.25.9",
|
||||
"@esbuild/darwin-x64": "0.25.9",
|
||||
"@esbuild/freebsd-arm64": "0.25.9",
|
||||
"@esbuild/freebsd-x64": "0.25.9",
|
||||
"@esbuild/linux-arm": "0.25.9",
|
||||
"@esbuild/linux-arm64": "0.25.9",
|
||||
"@esbuild/linux-ia32": "0.25.9",
|
||||
"@esbuild/linux-loong64": "0.25.9",
|
||||
"@esbuild/linux-mips64el": "0.25.9",
|
||||
"@esbuild/linux-ppc64": "0.25.9",
|
||||
"@esbuild/linux-riscv64": "0.25.9",
|
||||
"@esbuild/linux-s390x": "0.25.9",
|
||||
"@esbuild/linux-x64": "0.25.9",
|
||||
"@esbuild/netbsd-arm64": "0.25.9",
|
||||
"@esbuild/netbsd-x64": "0.25.9",
|
||||
"@esbuild/openbsd-arm64": "0.25.9",
|
||||
"@esbuild/openbsd-x64": "0.25.9",
|
||||
"@esbuild/openharmony-arm64": "0.25.9",
|
||||
"@esbuild/sunos-x64": "0.25.9",
|
||||
"@esbuild/win32-arm64": "0.25.9",
|
||||
"@esbuild/win32-ia32": "0.25.9",
|
||||
"@esbuild/win32-x64": "0.25.9"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
@ -2353,7 +2340,7 @@
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
|
||||
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
@ -3545,6 +3532,51 @@
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby": {
|
||||
"version": "0.2.15",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
|
||||
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby/node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby/node_modules/picomatch": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
@ -3697,20 +3729,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.4.20",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz",
|
||||
"integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
|
||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
"rollup": "^4.20.0"
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"postcss": "^8.5.6",
|
||||
"rollup": "^4.43.0",
|
||||
"tinyglobby": "^0.2.15"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.0.0 || >=20.0.0"
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||
@ -3719,19 +3754,25 @@
|
||||
"fsevents": "~2.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^18.0.0 || >=20.0.0",
|
||||
"less": "*",
|
||||
"@types/node": "^20.19.0 || >=22.12.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "^4.0.0",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "*",
|
||||
"sass-embedded": "*",
|
||||
"stylus": "*",
|
||||
"sugarss": "*",
|
||||
"terser": "^5.4.0"
|
||||
"sass": "^1.70.0",
|
||||
"sass-embedded": "^1.70.0",
|
||||
"stylus": ">=0.54.8",
|
||||
"sugarss": "^5.0.0",
|
||||
"terser": "^5.16.0",
|
||||
"tsx": "^4.8.1",
|
||||
"yaml": "^2.4.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/node": {
|
||||
"optional": true
|
||||
},
|
||||
"jiti": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
@ -3752,9 +3793,44 @@
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
},
|
||||
"tsx": {
|
||||
"optional": true
|
||||
},
|
||||
"yaml": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/picomatch": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
@ -3887,7 +3963,7 @@
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
|
||||
"integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
|
||||
44
MEDICONNECTv3 - cópia/node_modules/.vite/deps/@lumi__new_sdk.js
generated
vendored
44
MEDICONNECTv3 - cópia/node_modules/.vite/deps/@lumi__new_sdk.js
generated
vendored
@ -29,7 +29,7 @@ var require_core = __commonJS({
|
||||
root.CryptoJS = factory();
|
||||
}
|
||||
})(exports, function() {
|
||||
var CryptoJS = CryptoJS || function(Math2, undefined2) {
|
||||
var CryptoJS = CryptoJS || (function(Math2, undefined2) {
|
||||
var crypto2;
|
||||
if (typeof window !== "undefined" && window.crypto) {
|
||||
crypto2 = window.crypto;
|
||||
@ -69,7 +69,7 @@ var require_core = __commonJS({
|
||||
}
|
||||
throw new Error("Native crypto module could not be used to get secure random number.");
|
||||
};
|
||||
var create = Object.create || /* @__PURE__ */ function() {
|
||||
var create = Object.create || /* @__PURE__ */ (function() {
|
||||
function F2() {
|
||||
}
|
||||
return function(obj) {
|
||||
@ -79,10 +79,10 @@ var require_core = __commonJS({
|
||||
F2.prototype = null;
|
||||
return subtype;
|
||||
};
|
||||
}();
|
||||
})();
|
||||
var C2 = {};
|
||||
var C_lib = C2.lib = {};
|
||||
var Base = C_lib.Base = /* @__PURE__ */ function() {
|
||||
var Base = C_lib.Base = /* @__PURE__ */ (function() {
|
||||
return {
|
||||
/**
|
||||
* Creates a new object that inherits from this object.
|
||||
@ -181,7 +181,7 @@ var require_core = __commonJS({
|
||||
return this.init.prototype.extend(this);
|
||||
}
|
||||
};
|
||||
}();
|
||||
})();
|
||||
var WordArray = C_lib.WordArray = Base.extend({
|
||||
/**
|
||||
* Initializes a newly created word array.
|
||||
@ -619,7 +619,7 @@ var require_core = __commonJS({
|
||||
});
|
||||
var C_algo = C2.algo = {};
|
||||
return C2;
|
||||
}(Math);
|
||||
})(Math);
|
||||
return CryptoJS;
|
||||
});
|
||||
}
|
||||
@ -1190,7 +1190,7 @@ function v35(version, hash, value, namespace, buf, offset) {
|
||||
if (typeof namespace === "string") {
|
||||
namespace = parse_default(namespace);
|
||||
}
|
||||
if ((namespace == null ? void 0 : namespace.length) !== 16) {
|
||||
if (namespace?.length !== 16) {
|
||||
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
||||
}
|
||||
let bytes = new Uint8Array(16 + valueBytes.length);
|
||||
@ -1222,12 +1222,11 @@ var native_default = { randomUUID };
|
||||
|
||||
// node_modules/uuid/dist/esm-browser/v4.js
|
||||
function v4(options, buf, offset) {
|
||||
var _a;
|
||||
if (native_default.randomUUID && !buf && !options) {
|
||||
return native_default.randomUUID();
|
||||
}
|
||||
options = options || {};
|
||||
const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
|
||||
const rnds = options.random ?? options.rng?.() ?? rng();
|
||||
if (rnds.length < 16) {
|
||||
throw new Error("Random bytes length must be >= 16");
|
||||
}
|
||||
@ -1623,16 +1622,15 @@ var FetchError = class extends Error {
|
||||
constructor(message, opts) {
|
||||
super(message, opts);
|
||||
this.name = "FetchError";
|
||||
if ((opts == null ? void 0 : opts.cause) && !this.cause) {
|
||||
if (opts?.cause && !this.cause) {
|
||||
this.cause = opts.cause;
|
||||
}
|
||||
}
|
||||
};
|
||||
function createFetchError(ctx) {
|
||||
var _a, _b, _c, _d, _e2;
|
||||
const errorMessage = ((_a = ctx.error) == null ? void 0 : _a.message) || ((_b = ctx.error) == null ? void 0 : _b.toString()) || "";
|
||||
const method = ((_c = ctx.request) == null ? void 0 : _c.method) || ((_d = ctx.options) == null ? void 0 : _d.method) || "GET";
|
||||
const url = ((_e2 = ctx.request) == null ? void 0 : _e2.url) || String(ctx.request) || "/";
|
||||
const errorMessage = ctx.error?.message || ctx.error?.toString() || "";
|
||||
const method = ctx.request?.method || ctx.options?.method || "GET";
|
||||
const url = ctx.request?.url || String(ctx.request) || "/";
|
||||
const requestStr = `[${method}] ${JSON.stringify(url)}`;
|
||||
const statusStr = ctx.response ? `${ctx.response.status} ${ctx.response.statusText}` : "<no response>";
|
||||
const message = `${requestStr}: ${statusStr}${errorMessage ? ` ${errorMessage}` : ""}`;
|
||||
@ -1709,17 +1707,17 @@ function detectResponseType(_contentType = "") {
|
||||
}
|
||||
function resolveFetchOptions(request, input, defaults, Headers3) {
|
||||
const headers = mergeHeaders(
|
||||
(input == null ? void 0 : input.headers) ?? (request == null ? void 0 : request.headers),
|
||||
defaults == null ? void 0 : defaults.headers,
|
||||
input?.headers ?? request?.headers,
|
||||
defaults?.headers,
|
||||
Headers3
|
||||
);
|
||||
let query;
|
||||
if ((defaults == null ? void 0 : defaults.query) || (defaults == null ? void 0 : defaults.params) || (input == null ? void 0 : input.params) || (input == null ? void 0 : input.query)) {
|
||||
if (defaults?.query || defaults?.params || input?.params || input?.query) {
|
||||
query = {
|
||||
...defaults == null ? void 0 : defaults.params,
|
||||
...defaults == null ? void 0 : defaults.query,
|
||||
...input == null ? void 0 : input.params,
|
||||
...input == null ? void 0 : input.query
|
||||
...defaults?.params,
|
||||
...defaults?.query,
|
||||
...input?.params,
|
||||
...input?.query
|
||||
};
|
||||
}
|
||||
return {
|
||||
@ -1948,7 +1946,7 @@ function createFetch(globalOptions = {}) {
|
||||
}
|
||||
|
||||
// node_modules/ofetch/dist/index.mjs
|
||||
var _globalThis = function() {
|
||||
var _globalThis = (function() {
|
||||
if (typeof globalThis !== "undefined") {
|
||||
return globalThis;
|
||||
}
|
||||
@ -1962,7 +1960,7 @@ var _globalThis = function() {
|
||||
return global;
|
||||
}
|
||||
throw new Error("unable to locate global object");
|
||||
}();
|
||||
})();
|
||||
var fetch = _globalThis.fetch ? (...args) => _globalThis.fetch(...args) : () => Promise.reject(new Error("[ofetch] global.fetch is not supported!"));
|
||||
var Headers2 = _globalThis.Headers;
|
||||
var AbortController = _globalThis.AbortController;
|
||||
|
||||
4
MEDICONNECTv3 - cópia/node_modules/.vite/deps/@lumi__new_sdk.js.map
generated
vendored
4
MEDICONNECTv3 - cópia/node_modules/.vite/deps/@lumi__new_sdk.js.map
generated
vendored
File diff suppressed because one or more lines are too long
42
MEDICONNECTv3 - cópia/node_modules/.vite/deps/_metadata.json
generated
vendored
42
MEDICONNECTv3 - cópia/node_modules/.vite/deps/_metadata.json
generated
vendored
@ -1,70 +1,70 @@
|
||||
{
|
||||
"hash": "01152b3f",
|
||||
"configHash": "09061cad",
|
||||
"lockfileHash": "0e37ce26",
|
||||
"browserHash": "053fe339",
|
||||
"hash": "3d063dbb",
|
||||
"configHash": "90934f89",
|
||||
"lockfileHash": "5e5c1582",
|
||||
"browserHash": "af119143",
|
||||
"optimized": {
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "e7c259f8",
|
||||
"fileHash": "e530eaca",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@lumi.new/sdk": {
|
||||
"src": "../../@lumi.new/sdk/dist/index.mjs",
|
||||
"file": "@lumi__new_sdk.js",
|
||||
"fileHash": "c8468c3a",
|
||||
"fileHash": "c956602c",
|
||||
"needsInterop": false
|
||||
},
|
||||
"date-fns": {
|
||||
"src": "../../date-fns/esm/index.js",
|
||||
"file": "date-fns.js",
|
||||
"fileHash": "4e145f3e",
|
||||
"fileHash": "7b35a446",
|
||||
"needsInterop": false
|
||||
},
|
||||
"date-fns/locale": {
|
||||
"src": "../../date-fns/esm/locale/index.js",
|
||||
"file": "date-fns_locale.js",
|
||||
"fileHash": "2c94c4aa",
|
||||
"fileHash": "15f9a553",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "91991167",
|
||||
"fileHash": "0a15fbcf",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "e3b37a76",
|
||||
"fileHash": "b10d1c27",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-hot-toast": {
|
||||
"src": "../../react-hot-toast/dist/index.mjs",
|
||||
"file": "react-hot-toast.js",
|
||||
"fileHash": "f4057697",
|
||||
"fileHash": "360ec84a",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.js",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "ce9ffef2",
|
||||
"fileHash": "d699d8b6",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "ea94a660",
|
||||
"needsInterop": true
|
||||
"react-toastify": {
|
||||
"src": "../../react-toastify/dist/index.mjs",
|
||||
"file": "react-toastify.js",
|
||||
"fileHash": "7ed4c728",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-ZUX4WFZD": {
|
||||
"file": "chunk-ZUX4WFZD.js"
|
||||
"chunk-FD5NLAXO": {
|
||||
"file": "chunk-FD5NLAXO.js"
|
||||
},
|
||||
"chunk-SJKHQ62W": {
|
||||
"file": "chunk-SJKHQ62W.js"
|
||||
"chunk-TZKYVW6F": {
|
||||
"file": "chunk-TZKYVW6F.js"
|
||||
},
|
||||
"chunk-A5RA4VRI": {
|
||||
"file": "chunk-A5RA4VRI.js"
|
||||
|
||||
1
MEDICONNECTv3 - cópia/node_modules/.vite/deps/chunk-7D4SUZUM.js
generated
vendored
1
MEDICONNECTv3 - cópia/node_modules/.vite/deps/chunk-7D4SUZUM.js
generated
vendored
@ -35,4 +35,3 @@ export {
|
||||
__commonJS,
|
||||
__toESM
|
||||
};
|
||||
//# sourceMappingURL=chunk-7D4SUZUM.js.map
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -699,6 +699,7 @@ var require_react_dom_development = __commonJS({
|
||||
}
|
||||
switch (typeof value) {
|
||||
case "function":
|
||||
// $FlowIssue symbol is perfectly valid here
|
||||
case "symbol":
|
||||
return true;
|
||||
case "boolean": {
|
||||
@ -1713,6 +1714,7 @@ var require_react_dom_development = __commonJS({
|
||||
return "SuspenseList";
|
||||
case TracingMarkerComponent:
|
||||
return "TracingMarker";
|
||||
// The display name for this tags come from the user-provided type:
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
@ -2710,6 +2712,10 @@ var require_react_dom_development = __commonJS({
|
||||
return typeof props.is === "string";
|
||||
}
|
||||
switch (tagName) {
|
||||
// These are reserved SVG and MathML elements.
|
||||
// We don't mind this list too much because we expect it to never grow.
|
||||
// The alternative is to track the namespace in a few places which is convoluted.
|
||||
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
|
||||
case "annotation-xml":
|
||||
case "color-profile":
|
||||
case "font-face":
|
||||
@ -5539,6 +5545,7 @@ var require_react_dom_development = __commonJS({
|
||||
}
|
||||
function getEventPriority(domEventName) {
|
||||
switch (domEventName) {
|
||||
// Used by SimpleEventPlugin:
|
||||
case "cancel":
|
||||
case "click":
|
||||
case "close":
|
||||
@ -5574,14 +5581,20 @@ var require_react_dom_development = __commonJS({
|
||||
case "touchend":
|
||||
case "touchstart":
|
||||
case "volumechange":
|
||||
// Used by polyfills:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "change":
|
||||
case "selectionchange":
|
||||
case "textInput":
|
||||
case "compositionstart":
|
||||
case "compositionend":
|
||||
case "compositionupdate":
|
||||
// Only enableCreateEventHandleAPI:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "beforeblur":
|
||||
case "afterblur":
|
||||
// Not used by React but could be by user code:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "beforeinput":
|
||||
case "blur":
|
||||
case "fullscreenchange":
|
||||
@ -5606,6 +5619,8 @@ var require_react_dom_development = __commonJS({
|
||||
case "toggle":
|
||||
case "touchmove":
|
||||
case "wheel":
|
||||
// Not used by React but could be by user code:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "mouseenter":
|
||||
case "mouseleave":
|
||||
case "pointerenter":
|
||||
@ -6791,6 +6806,7 @@ var require_react_dom_development = __commonJS({
|
||||
function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
|
||||
var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
|
||||
switch (domEventName) {
|
||||
// Track the input node that has focus.
|
||||
case "focusin":
|
||||
if (isTextInputElement(targetNode) || targetNode.contentEditable === "true") {
|
||||
activeElement$1 = targetNode;
|
||||
@ -6803,6 +6819,8 @@ var require_react_dom_development = __commonJS({
|
||||
activeElementInst$1 = null;
|
||||
lastSelection = null;
|
||||
break;
|
||||
// Don't fire the event while the user is dragging. This matches the
|
||||
// semantics of the native select event.
|
||||
case "mousedown":
|
||||
mouseDown = true;
|
||||
break;
|
||||
@ -6812,10 +6830,20 @@ var require_react_dom_development = __commonJS({
|
||||
mouseDown = false;
|
||||
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
|
||||
break;
|
||||
// Chrome and IE fire non-standard event when selection is changed (and
|
||||
// sometimes when it hasn't). IE's event fires out of order with respect
|
||||
// to key and input events on deletion, so we discard it.
|
||||
//
|
||||
// Firefox doesn't support selectionchange, so check selection status
|
||||
// after each key entry. The selection changes after keydown and before
|
||||
// keyup, but we check on keydown as well in the case of holding down a
|
||||
// key, when multiple keydown events are fired but only one keyup is.
|
||||
// This is also our approach for IE handling, for the reason above.
|
||||
case "selectionchange":
|
||||
if (skipSelectionChangeEvent) {
|
||||
break;
|
||||
}
|
||||
// falls through
|
||||
case "keydown":
|
||||
case "keyup":
|
||||
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
|
||||
@ -6898,6 +6926,7 @@ var require_react_dom_development = __commonJS({
|
||||
if (getEventCharCode(nativeEvent) === 0) {
|
||||
return;
|
||||
}
|
||||
/* falls through */
|
||||
case "keydown":
|
||||
case "keyup":
|
||||
SyntheticEventCtor = SyntheticKeyboardEvent;
|
||||
@ -6918,11 +6947,14 @@ var require_react_dom_development = __commonJS({
|
||||
if (nativeEvent.button === 2) {
|
||||
return;
|
||||
}
|
||||
/* falls through */
|
||||
case "auxclick":
|
||||
case "dblclick":
|
||||
case "mousedown":
|
||||
case "mousemove":
|
||||
case "mouseup":
|
||||
// TODO: Disabled elements should not respond to mouse events
|
||||
/* falls through */
|
||||
case "mouseout":
|
||||
case "mouseover":
|
||||
case "contextmenu":
|
||||
@ -7836,6 +7868,8 @@ var require_react_dom_development = __commonJS({
|
||||
for (var _i = 0; _i < attributes.length; _i++) {
|
||||
var name = attributes[_i].name.toLowerCase();
|
||||
switch (name) {
|
||||
// Controlled attributes are not validated
|
||||
// TODO: Only ignore them on controlled tags.
|
||||
case "value":
|
||||
break;
|
||||
case "checked":
|
||||
@ -8103,24 +8137,37 @@ var require_react_dom_development = __commonJS({
|
||||
};
|
||||
var isTagValidWithParent = function(tag, parentTag) {
|
||||
switch (parentTag) {
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
|
||||
case "select":
|
||||
return tag === "option" || tag === "optgroup" || tag === "#text";
|
||||
case "optgroup":
|
||||
return tag === "option" || tag === "#text";
|
||||
// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
|
||||
// but
|
||||
case "option":
|
||||
return tag === "#text";
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
|
||||
// No special behavior since these rules fall back to "in body" mode for
|
||||
// all except special table nodes which cause bad parsing behavior anyway.
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
|
||||
case "tr":
|
||||
return tag === "th" || tag === "td" || tag === "style" || tag === "script" || tag === "template";
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
|
||||
case "tbody":
|
||||
case "thead":
|
||||
case "tfoot":
|
||||
return tag === "tr" || tag === "style" || tag === "script" || tag === "template";
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
|
||||
case "colgroup":
|
||||
return tag === "col" || tag === "template";
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
|
||||
case "table":
|
||||
return tag === "caption" || tag === "colgroup" || tag === "tbody" || tag === "tfoot" || tag === "thead" || tag === "style" || tag === "script" || tag === "template";
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
|
||||
case "head":
|
||||
return tag === "base" || tag === "basefont" || tag === "bgsound" || tag === "link" || tag === "meta" || tag === "title" || tag === "noscript" || tag === "noframes" || tag === "style" || tag === "script" || tag === "template";
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
|
||||
case "html":
|
||||
return tag === "head" || tag === "body" || tag === "frameset";
|
||||
case "frameset":
|
||||
@ -11079,6 +11126,7 @@ var require_react_dom_development = __commonJS({
|
||||
case CaptureUpdate: {
|
||||
workInProgress2.flags = workInProgress2.flags & ~ShouldCapture | DidCapture;
|
||||
}
|
||||
// Intentional fallthrough
|
||||
case UpdateState: {
|
||||
var _payload = update.payload;
|
||||
var partialState;
|
||||
@ -17396,6 +17444,7 @@ var require_react_dom_development = __commonJS({
|
||||
insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);
|
||||
break;
|
||||
}
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
default:
|
||||
throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");
|
||||
}
|
||||
@ -17495,6 +17544,7 @@ var require_react_dom_development = __commonJS({
|
||||
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
case HostText: {
|
||||
{
|
||||
var prevHostParent = hostParent;
|
||||
@ -18756,6 +18806,9 @@ var require_react_dom_development = __commonJS({
|
||||
case RootFatalErrored: {
|
||||
throw new Error("Root did not complete. This is a bug in React.");
|
||||
}
|
||||
// Flow knows about invariant, so it complains if I add a break
|
||||
// statement, but eslint doesn't know about invariant, so it complains
|
||||
// if I do. eslint-disable-next-line no-fallthrough
|
||||
case RootErrored: {
|
||||
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
|
||||
break;
|
||||
@ -20401,10 +20454,15 @@ var require_react_dom_development = __commonJS({
|
||||
case REACT_OFFSCREEN_TYPE:
|
||||
return createFiberFromOffscreen(pendingProps, mode, lanes, key);
|
||||
case REACT_LEGACY_HIDDEN_TYPE:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case REACT_SCOPE_TYPE:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case REACT_CACHE_TYPE:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case REACT_TRACING_MARKER_TYPE:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case REACT_DEBUG_TRACING_MODE_TYPE:
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
default: {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
@ -21626,4 +21684,4 @@ react-dom/cjs/react-dom.development.js:
|
||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-ZUX4WFZD.js.map
|
||||
//# sourceMappingURL=chunk-TZKYVW6F.js.map
|
||||
File diff suppressed because one or more lines are too long
3
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns.js
generated
vendored
3
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns.js
generated
vendored
@ -256,7 +256,7 @@ import {
|
||||
weeksToDays,
|
||||
yearsToMonths,
|
||||
yearsToQuarters
|
||||
} from "./chunk-SJKHQ62W.js";
|
||||
} from "./chunk-FD5NLAXO.js";
|
||||
import "./chunk-7D4SUZUM.js";
|
||||
export {
|
||||
add,
|
||||
@ -517,4 +517,3 @@ export {
|
||||
yearsToMonths,
|
||||
yearsToQuarters
|
||||
};
|
||||
//# sourceMappingURL=date-fns.js.map
|
||||
|
||||
9
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns_locale.js
generated
vendored
9
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns_locale.js
generated
vendored
@ -11,7 +11,7 @@ import {
|
||||
requiredArgs,
|
||||
startOfUTCWeek,
|
||||
toDate
|
||||
} from "./chunk-SJKHQ62W.js";
|
||||
} from "./chunk-FD5NLAXO.js";
|
||||
import "./chunk-7D4SUZUM.js";
|
||||
|
||||
// node_modules/date-fns/esm/locale/af/_lib/formatDistance/index.js
|
||||
@ -26598,7 +26598,9 @@ function _lastWeek5(day) {
|
||||
var weekday = accusativeWeekdays7[day];
|
||||
switch (day) {
|
||||
case 0:
|
||||
/* Sun */
|
||||
case 3:
|
||||
/* Wed */
|
||||
case 6:
|
||||
return "'minulú " + weekday + " o' p";
|
||||
default:
|
||||
@ -26617,7 +26619,9 @@ function _nextWeek5(day) {
|
||||
var weekday = accusativeWeekdays7[day];
|
||||
switch (day) {
|
||||
case 0:
|
||||
/* Sun */
|
||||
case 4:
|
||||
/* Wed */
|
||||
case 6:
|
||||
return "'budúcu " + weekday + " o' p";
|
||||
default:
|
||||
@ -32897,10 +32901,13 @@ var ordinalNumber157 = function ordinalNumber158(dirtyNumber, options) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return "thứ 2";
|
||||
// meaning 2nd day but it's the first day of the week :D
|
||||
case 2:
|
||||
return "thứ 3";
|
||||
// meaning 3rd day
|
||||
case 3:
|
||||
return "thứ 4";
|
||||
// meaning 4th day and so on
|
||||
case 4:
|
||||
return "thứ 5";
|
||||
case 5:
|
||||
|
||||
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns_locale.js.map
generated
vendored
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/date-fns_locale.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-dom_client.js
generated
vendored
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-dom_client.js
generated
vendored
@ -1,6 +1,6 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-ZUX4WFZD.js";
|
||||
} from "./chunk-TZKYVW6F.js";
|
||||
import "./chunk-A5RA4VRI.js";
|
||||
import {
|
||||
__commonJS
|
||||
|
||||
14
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-router-dom.js
generated
vendored
14
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-router-dom.js
generated
vendored
@ -1,6 +1,6 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-ZUX4WFZD.js";
|
||||
} from "./chunk-TZKYVW6F.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-A5RA4VRI.js";
|
||||
@ -4211,13 +4211,13 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
|
||||
}) : getChildren();
|
||||
}, null);
|
||||
}
|
||||
var DataRouterHook = function(DataRouterHook3) {
|
||||
var DataRouterHook = (function(DataRouterHook3) {
|
||||
DataRouterHook3["UseBlocker"] = "useBlocker";
|
||||
DataRouterHook3["UseRevalidator"] = "useRevalidator";
|
||||
DataRouterHook3["UseNavigateStable"] = "useNavigate";
|
||||
return DataRouterHook3;
|
||||
}(DataRouterHook || {});
|
||||
var DataRouterStateHook = function(DataRouterStateHook3) {
|
||||
})(DataRouterHook || {});
|
||||
var DataRouterStateHook = (function(DataRouterStateHook3) {
|
||||
DataRouterStateHook3["UseBlocker"] = "useBlocker";
|
||||
DataRouterStateHook3["UseLoaderData"] = "useLoaderData";
|
||||
DataRouterStateHook3["UseActionData"] = "useActionData";
|
||||
@ -4229,7 +4229,7 @@ var DataRouterStateHook = function(DataRouterStateHook3) {
|
||||
DataRouterStateHook3["UseNavigateStable"] = "useNavigate";
|
||||
DataRouterStateHook3["UseRouteId"] = "useRouteId";
|
||||
return DataRouterStateHook3;
|
||||
}(DataRouterStateHook || {});
|
||||
})(DataRouterStateHook || {});
|
||||
function getDataRouterConsoleError(hookName) {
|
||||
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
||||
}
|
||||
@ -4571,12 +4571,12 @@ function Await(_ref7) {
|
||||
errorElement
|
||||
}, React.createElement(ResolveAwait, null, children));
|
||||
}
|
||||
var AwaitRenderStatus = function(AwaitRenderStatus2) {
|
||||
var AwaitRenderStatus = (function(AwaitRenderStatus2) {
|
||||
AwaitRenderStatus2[AwaitRenderStatus2["pending"] = 0] = "pending";
|
||||
AwaitRenderStatus2[AwaitRenderStatus2["success"] = 1] = "success";
|
||||
AwaitRenderStatus2[AwaitRenderStatus2["error"] = 2] = "error";
|
||||
return AwaitRenderStatus2;
|
||||
}(AwaitRenderStatus || {});
|
||||
})(AwaitRenderStatus || {});
|
||||
var neverSettledPromise = new Promise(() => {
|
||||
});
|
||||
var AwaitErrorBoundary = class extends React.Component {
|
||||
|
||||
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-router-dom.js.map
generated
vendored
2
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-router-dom.js.map
generated
vendored
File diff suppressed because one or more lines are too long
449
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-toastify.js
generated
vendored
Normal file
449
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-toastify.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-toastify.js.map
generated
vendored
Normal file
7
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react-toastify.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react.js
generated
vendored
1
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react.js
generated
vendored
@ -3,4 +3,3 @@ import {
|
||||
} from "./chunk-A5RA4VRI.js";
|
||||
import "./chunk-7D4SUZUM.js";
|
||||
export default require_react();
|
||||
//# sourceMappingURL=react.js.map
|
||||
|
||||
925
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
925
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
@ -1,925 +0,0 @@
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-A5RA4VRI.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-7D4SUZUM.js";
|
||||
|
||||
// node_modules/react/cjs/react-jsx-runtime.development.js
|
||||
var require_react_jsx_runtime_development = __commonJS({
|
||||
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
||||
"use strict";
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React = require_react();
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
||||
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
||||
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
||||
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
||||
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
||||
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
||||
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
||||
function getIteratorFn(maybeIterable) {
|
||||
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
||||
return null;
|
||||
}
|
||||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||||
if (typeof maybeIterator === "function") {
|
||||
return maybeIterator;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function error(format) {
|
||||
{
|
||||
{
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
printWarning("error", format, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
function printWarning(level, format, args) {
|
||||
{
|
||||
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
args = args.concat([stack]);
|
||||
}
|
||||
var argsWithFormat = args.map(function(item) {
|
||||
return String(item);
|
||||
});
|
||||
argsWithFormat.unshift("Warning: " + format);
|
||||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
}
|
||||
var enableScopeAPI = false;
|
||||
var enableCacheElement = false;
|
||||
var enableTransitionTracing = false;
|
||||
var enableLegacyHidden = false;
|
||||
var enableDebugTracing = false;
|
||||
var REACT_MODULE_REFERENCE;
|
||||
{
|
||||
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
||||
}
|
||||
function isValidElementType(type) {
|
||||
if (typeof type === "string" || typeof type === "function") {
|
||||
return true;
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
||||
return true;
|
||||
}
|
||||
if (typeof type === "object" && type !== null) {
|
||||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
// with.
|
||||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
if (displayName) {
|
||||
return displayName;
|
||||
}
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
||||
}
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromType(type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
{
|
||||
if (typeof type.tag === "number") {
|
||||
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
return "Fragment";
|
||||
case REACT_PORTAL_TYPE:
|
||||
return "Portal";
|
||||
case REACT_PROFILER_TYPE:
|
||||
return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return "SuspenseList";
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
if (outerName !== null) {
|
||||
return outerName;
|
||||
}
|
||||
return getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return getComponentNameFromType(init(payload));
|
||||
} catch (x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var assign = Object.assign;
|
||||
var disabledDepth = 0;
|
||||
var prevLog;
|
||||
var prevInfo;
|
||||
var prevWarn;
|
||||
var prevError;
|
||||
var prevGroup;
|
||||
var prevGroupCollapsed;
|
||||
var prevGroupEnd;
|
||||
function disabledLog() {
|
||||
}
|
||||
disabledLog.__reactDisabledLog = true;
|
||||
function disableLogs() {
|
||||
{
|
||||
if (disabledDepth === 0) {
|
||||
prevLog = console.log;
|
||||
prevInfo = console.info;
|
||||
prevWarn = console.warn;
|
||||
prevError = console.error;
|
||||
prevGroup = console.group;
|
||||
prevGroupCollapsed = console.groupCollapsed;
|
||||
prevGroupEnd = console.groupEnd;
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: disabledLog,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
info: props,
|
||||
log: props,
|
||||
warn: props,
|
||||
error: props,
|
||||
group: props,
|
||||
groupCollapsed: props,
|
||||
groupEnd: props
|
||||
});
|
||||
}
|
||||
disabledDepth++;
|
||||
}
|
||||
}
|
||||
function reenableLogs() {
|
||||
{
|
||||
disabledDepth--;
|
||||
if (disabledDepth === 0) {
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
log: assign({}, props, {
|
||||
value: prevLog
|
||||
}),
|
||||
info: assign({}, props, {
|
||||
value: prevInfo
|
||||
}),
|
||||
warn: assign({}, props, {
|
||||
value: prevWarn
|
||||
}),
|
||||
error: assign({}, props, {
|
||||
value: prevError
|
||||
}),
|
||||
group: assign({}, props, {
|
||||
value: prevGroup
|
||||
}),
|
||||
groupCollapsed: assign({}, props, {
|
||||
value: prevGroupCollapsed
|
||||
}),
|
||||
groupEnd: assign({}, props, {
|
||||
value: prevGroupEnd
|
||||
})
|
||||
});
|
||||
}
|
||||
if (disabledDepth < 0) {
|
||||
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
||||
{
|
||||
if (prefix === void 0) {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
var match = x.stack.trim().match(/\n( *(at )?)/);
|
||||
prefix = match && match[1] || "";
|
||||
}
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
var componentFrameCache;
|
||||
{
|
||||
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
||||
componentFrameCache = new PossiblyWeakMap();
|
||||
}
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
if (!fn || reentry) {
|
||||
return "";
|
||||
}
|
||||
{
|
||||
var frame = componentFrameCache.get(fn);
|
||||
if (frame !== void 0) {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
var control;
|
||||
reentry = true;
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace;
|
||||
Error.prepareStackTrace = void 0;
|
||||
var previousDispatcher;
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = null;
|
||||
disableLogs();
|
||||
}
|
||||
try {
|
||||
if (construct) {
|
||||
var Fake = function() {
|
||||
throw Error();
|
||||
};
|
||||
Object.defineProperty(Fake.prototype, "props", {
|
||||
set: function() {
|
||||
throw Error();
|
||||
}
|
||||
});
|
||||
if (typeof Reflect === "object" && Reflect.construct) {
|
||||
try {
|
||||
Reflect.construct(Fake, []);
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
Reflect.construct(fn, [], Fake);
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn();
|
||||
}
|
||||
} catch (sample) {
|
||||
if (sample && control && typeof sample.stack === "string") {
|
||||
var sampleLines = sample.stack.split("\n");
|
||||
var controlLines = control.stack.split("\n");
|
||||
var s = sampleLines.length - 1;
|
||||
var c = controlLines.length - 1;
|
||||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
||||
c--;
|
||||
}
|
||||
for (; s >= 1 && c >= 0; s--, c--) {
|
||||
if (sampleLines[s] !== controlLines[c]) {
|
||||
if (s !== 1 || c !== 1) {
|
||||
do {
|
||||
s--;
|
||||
c--;
|
||||
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
||||
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
||||
if (fn.displayName && _frame.includes("<anonymous>")) {
|
||||
_frame = _frame.replace("<anonymous>", fn.displayName);
|
||||
}
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, _frame);
|
||||
}
|
||||
}
|
||||
return _frame;
|
||||
}
|
||||
} while (s >= 1 && c >= 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reentry = false;
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||||
}
|
||||
var name = fn ? fn.displayName || fn.name : "";
|
||||
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, syntheticFrame);
|
||||
}
|
||||
}
|
||||
return syntheticFrame;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
||||
{
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
}
|
||||
}
|
||||
function shouldConstruct(Component) {
|
||||
var prototype = Component.prototype;
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
{
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
}
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
case REACT_MEMO_TYPE:
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
||||
} catch (x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var loggedTypeFailures = {};
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
||||
{
|
||||
var has = Function.call.bind(hasOwnProperty);
|
||||
for (var typeSpecName in typeSpecs) {
|
||||
if (has(typeSpecs, typeSpecName)) {
|
||||
var error$1 = void 0;
|
||||
try {
|
||||
if (typeof typeSpecs[typeSpecName] !== "function") {
|
||||
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
||||
err.name = "Invariant Violation";
|
||||
throw err;
|
||||
}
|
||||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
||||
} catch (ex) {
|
||||
error$1 = ex;
|
||||
}
|
||||
if (error$1 && !(error$1 instanceof Error)) {
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
||||
loggedTypeFailures[error$1.message] = true;
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("Failed %s type: %s", location, error$1.message);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var isArrayImpl = Array.isArray;
|
||||
function isArray(a) {
|
||||
return isArrayImpl(a);
|
||||
}
|
||||
function typeName(value) {
|
||||
{
|
||||
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
||||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
return type;
|
||||
}
|
||||
}
|
||||
function willCoercionThrow(value) {
|
||||
{
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
return false;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.ref !== void 0;
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.key !== void 0;
|
||||
}
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
||||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function() {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = true;
|
||||
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingRef = function() {
|
||||
if (!specialPropRefWarningShown) {
|
||||
specialPropRefWarningShown = true;
|
||||
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
||||
var element = {
|
||||
// This tag allows us to uniquely identify this as a React Element
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
// Built-in properties that belong on the element
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
props,
|
||||
// Record the component responsible for creating this element.
|
||||
_owner: owner
|
||||
};
|
||||
{
|
||||
element._store = {};
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
});
|
||||
Object.defineProperty(element, "_self", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: self
|
||||
});
|
||||
Object.defineProperty(element, "_source", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: source
|
||||
});
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
};
|
||||
function jsxDEV(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName;
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null;
|
||||
if (maybeKey !== void 0) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
key = "" + config.key;
|
||||
}
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
for (propName in config) {
|
||||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === void 0) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key || ref) {
|
||||
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var propTypesMisspellWarningShown;
|
||||
{
|
||||
propTypesMisspellWarningShown = false;
|
||||
}
|
||||
function isValidElement(object) {
|
||||
{
|
||||
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
}
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner$1.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
function getSourceInfoErrorAddendum(source) {
|
||||
{
|
||||
if (source !== void 0) {
|
||||
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
||||
var lineNumber = source.lineNumber;
|
||||
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var ownerHasKeyUseWarning = {};
|
||||
function getCurrentComponentErrorInfo(parentType) {
|
||||
{
|
||||
var info = getDeclarationErrorAddendum();
|
||||
if (!info) {
|
||||
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
||||
if (parentName) {
|
||||
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
function validateExplicitKey(element, parentType) {
|
||||
{
|
||||
if (!element._store || element._store.validated || element.key != null) {
|
||||
return;
|
||||
}
|
||||
element._store.validated = true;
|
||||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||||
return;
|
||||
}
|
||||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||||
var childOwner = "";
|
||||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
||||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
||||
}
|
||||
setCurrentlyValidatingElement$1(element);
|
||||
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
function validateChildKeys(node, parentType) {
|
||||
{
|
||||
if (typeof node !== "object") {
|
||||
return;
|
||||
}
|
||||
if (isArray(node)) {
|
||||
for (var i = 0; i < node.length; i++) {
|
||||
var child = node[i];
|
||||
if (isValidElement(child)) {
|
||||
validateExplicitKey(child, parentType);
|
||||
}
|
||||
}
|
||||
} else if (isValidElement(node)) {
|
||||
if (node._store) {
|
||||
node._store.validated = true;
|
||||
}
|
||||
} else if (node) {
|
||||
var iteratorFn = getIteratorFn(node);
|
||||
if (typeof iteratorFn === "function") {
|
||||
if (iteratorFn !== node.entries) {
|
||||
var iterator = iteratorFn.call(node);
|
||||
var step;
|
||||
while (!(step = iterator.next()).done) {
|
||||
if (isValidElement(step.value)) {
|
||||
validateExplicitKey(step.value, parentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function validatePropTypes(element) {
|
||||
{
|
||||
var type = element.type;
|
||||
if (type === null || type === void 0 || typeof type === "string") {
|
||||
return;
|
||||
}
|
||||
var propTypes;
|
||||
if (typeof type === "function") {
|
||||
propTypes = type.propTypes;
|
||||
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
||||
// Inner props are checked in the reconciler.
|
||||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||||
propTypes = type.propTypes;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (propTypes) {
|
||||
var name = getComponentNameFromType(type);
|
||||
checkPropTypes(propTypes, element.props, "prop", name, element);
|
||||
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
||||
propTypesMisspellWarningShown = true;
|
||||
var _name = getComponentNameFromType(type);
|
||||
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
||||
}
|
||||
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
||||
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
||||
}
|
||||
}
|
||||
}
|
||||
function validateFragmentProps(fragment) {
|
||||
{
|
||||
var keys = Object.keys(fragment.props);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (key !== "children" && key !== "key") {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fragment.ref !== null) {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var didWarnAboutKeySpread = {};
|
||||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
||||
{
|
||||
var validType = isValidElementType(type);
|
||||
if (!validType) {
|
||||
var info = "";
|
||||
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
||||
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
||||
}
|
||||
var sourceInfo = getSourceInfoErrorAddendum(source);
|
||||
if (sourceInfo) {
|
||||
info += sourceInfo;
|
||||
} else {
|
||||
info += getDeclarationErrorAddendum();
|
||||
}
|
||||
var typeString;
|
||||
if (type === null) {
|
||||
typeString = "null";
|
||||
} else if (isArray(type)) {
|
||||
typeString = "array";
|
||||
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||||
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
||||
info = " Did you accidentally export a JSX literal instead of a component?";
|
||||
} else {
|
||||
typeString = typeof type;
|
||||
}
|
||||
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
||||
}
|
||||
var element = jsxDEV(type, props, key, source, self);
|
||||
if (element == null) {
|
||||
return element;
|
||||
}
|
||||
if (validType) {
|
||||
var children = props.children;
|
||||
if (children !== void 0) {
|
||||
if (isStaticChildren) {
|
||||
if (isArray(children)) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
validateChildKeys(children[i], type);
|
||||
}
|
||||
if (Object.freeze) {
|
||||
Object.freeze(children);
|
||||
}
|
||||
} else {
|
||||
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
}
|
||||
} else {
|
||||
validateChildKeys(children, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (hasOwnProperty.call(props, "key")) {
|
||||
var componentName = getComponentNameFromType(type);
|
||||
var keys = Object.keys(props).filter(function(k) {
|
||||
return k !== "key";
|
||||
});
|
||||
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
||||
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
||||
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
||||
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE) {
|
||||
validateFragmentProps(element);
|
||||
} else {
|
||||
validatePropTypes(element);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
}
|
||||
function jsxWithValidationStatic(type, props, key) {
|
||||
{
|
||||
return jsxWithValidation(type, props, key, true);
|
||||
}
|
||||
}
|
||||
function jsxWithValidationDynamic(type, props, key) {
|
||||
{
|
||||
return jsxWithValidation(type, props, key, false);
|
||||
}
|
||||
}
|
||||
var jsx = jsxWithValidationDynamic;
|
||||
var jsxs = jsxWithValidationStatic;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsx = jsx;
|
||||
exports.jsxs = jsxs;
|
||||
})();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/react/jsx-runtime.js
|
||||
var require_jsx_runtime = __commonJS({
|
||||
"node_modules/react/jsx-runtime.js"(exports, module) {
|
||||
if (false) {
|
||||
module.exports = null;
|
||||
} else {
|
||||
module.exports = require_react_jsx_runtime_development();
|
||||
}
|
||||
}
|
||||
});
|
||||
export default require_jsx_runtime();
|
||||
/*! Bundled license information:
|
||||
|
||||
react/cjs/react-jsx-runtime.development.js:
|
||||
(**
|
||||
* @license React
|
||||
* react-jsx-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=react_jsx-runtime.js.map
|
||||
7
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
7
MEDICONNECTv3 - cópia/node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/README.md
generated
vendored
3
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/README.md
generated
vendored
@ -1,3 +0,0 @@
|
||||
# esbuild
|
||||
|
||||
This is the macOS ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
|
||||
BIN
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/bin/esbuild
generated
vendored
BIN
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/bin/esbuild
generated
vendored
Binary file not shown.
20
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/package.json
generated
vendored
20
MEDICONNECTv3 - cópia/node_modules/@esbuild/darwin-arm64/package.json
generated
vendored
@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "@esbuild/darwin-arm64",
|
||||
"version": "0.21.5",
|
||||
"description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/evanw/esbuild.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"preferUnplugged": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"cpu": [
|
||||
"arm64"
|
||||
]
|
||||
}
|
||||
BIN
MEDICONNECTv3 - cópia/node_modules/@esbuild/win32-x64/esbuild.exe
generated
vendored
BIN
MEDICONNECTv3 - cópia/node_modules/@esbuild/win32-x64/esbuild.exe
generated
vendored
Binary file not shown.
4
MEDICONNECTv3 - cópia/node_modules/@esbuild/win32-x64/package.json
generated
vendored
4
MEDICONNECTv3 - cópia/node_modules/@esbuild/win32-x64/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esbuild/win32-x64",
|
||||
"version": "0.21.5",
|
||||
"version": "0.25.9",
|
||||
"description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -9,7 +9,7 @@
|
||||
"license": "MIT",
|
||||
"preferUnplugged": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
},
|
||||
"os": [
|
||||
"win32"
|
||||
|
||||
7
MEDICONNECTv3 - cópia/node_modules/esbuild/bin/esbuild
generated
vendored
7
MEDICONNECTv3 - cópia/node_modules/esbuild/bin/esbuild
generated
vendored
@ -52,13 +52,16 @@ var knownUnixlikePackages = {
|
||||
"linux s390x BE": "@esbuild/linux-s390x",
|
||||
"linux x64 LE": "@esbuild/linux-x64",
|
||||
"linux loong64 LE": "@esbuild/linux-loong64",
|
||||
"netbsd arm64 LE": "@esbuild/netbsd-arm64",
|
||||
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
||||
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
|
||||
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
||||
"sunos x64 LE": "@esbuild/sunos-x64"
|
||||
};
|
||||
var knownWebAssemblyFallbackPackages = {
|
||||
"android arm LE": "@esbuild/android-arm",
|
||||
"android x64 LE": "@esbuild/android-x64"
|
||||
"android x64 LE": "@esbuild/android-x64",
|
||||
"openharmony arm64 LE": "@esbuild/openharmony-arm64"
|
||||
};
|
||||
function pkgAndSubpathForCurrentPlatform() {
|
||||
let pkg;
|
||||
@ -198,7 +201,7 @@ for your current platform.`);
|
||||
"node_modules",
|
||||
".cache",
|
||||
"esbuild",
|
||||
`pnpapi-${pkg.replace("/", "-")}-${"0.21.5"}-${path.basename(subpath)}`
|
||||
`pnpapi-${pkg.replace("/", "-")}-${"0.25.9"}-${path.basename(subpath)}`
|
||||
);
|
||||
if (!fs.existsSync(binTargetPath)) {
|
||||
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
||||
|
||||
8
MEDICONNECTv3 - cópia/node_modules/esbuild/install.js
generated
vendored
8
MEDICONNECTv3 - cópia/node_modules/esbuild/install.js
generated
vendored
@ -49,13 +49,16 @@ var knownUnixlikePackages = {
|
||||
"linux s390x BE": "@esbuild/linux-s390x",
|
||||
"linux x64 LE": "@esbuild/linux-x64",
|
||||
"linux loong64 LE": "@esbuild/linux-loong64",
|
||||
"netbsd arm64 LE": "@esbuild/netbsd-arm64",
|
||||
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
||||
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
|
||||
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
||||
"sunos x64 LE": "@esbuild/sunos-x64"
|
||||
};
|
||||
var knownWebAssemblyFallbackPackages = {
|
||||
"android arm LE": "@esbuild/android-arm",
|
||||
"android x64 LE": "@esbuild/android-x64"
|
||||
"android x64 LE": "@esbuild/android-x64",
|
||||
"openharmony arm64 LE": "@esbuild/openharmony-arm64"
|
||||
};
|
||||
function pkgAndSubpathForCurrentPlatform() {
|
||||
let pkg;
|
||||
@ -218,7 +221,8 @@ require('child_process').execFileSync(${pathString}, process.argv.slice(2), { st
|
||||
${code}`);
|
||||
}
|
||||
function maybeOptimizePackage(binPath) {
|
||||
if (os2.platform() !== "win32" && !isYarn()) {
|
||||
const { isWASM } = pkgAndSubpathForCurrentPlatform();
|
||||
if (os2.platform() !== "win32" && !isYarn() && !isWASM) {
|
||||
const tempPath = path2.join(__dirname, "bin-esbuild");
|
||||
try {
|
||||
fs2.linkSync(binPath, tempPath);
|
||||
|
||||
17
MEDICONNECTv3 - cópia/node_modules/esbuild/lib/main.d.ts
generated
vendored
17
MEDICONNECTv3 - cópia/node_modules/esbuild/lib/main.d.ts
generated
vendored
@ -4,6 +4,7 @@ export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default
|
||||
export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
|
||||
export type Charset = 'ascii' | 'utf8'
|
||||
export type Drop = 'console' | 'debugger'
|
||||
export type AbsPaths = 'code' | 'log' | 'metafile'
|
||||
|
||||
interface CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#sourcemap */
|
||||
@ -75,6 +76,8 @@ interface CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#keep-names */
|
||||
keepNames?: boolean
|
||||
|
||||
/** Documentation: https://esbuild.github.io/api/#abs-paths */
|
||||
absPaths?: AbsPaths[]
|
||||
/** Documentation: https://esbuild.github.io/api/#color */
|
||||
color?: boolean
|
||||
/** Documentation: https://esbuild.github.io/api/#log-level */
|
||||
@ -125,7 +128,7 @@ export interface BuildOptions extends CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#external */
|
||||
external?: string[]
|
||||
/** Documentation: https://esbuild.github.io/api/#packages */
|
||||
packages?: 'external'
|
||||
packages?: 'bundle' | 'external'
|
||||
/** Documentation: https://esbuild.github.io/api/#alias */
|
||||
alias?: Record<string, string>
|
||||
/** Documentation: https://esbuild.github.io/api/#loader */
|
||||
@ -159,7 +162,7 @@ export interface BuildOptions extends CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#footer */
|
||||
footer?: { [type: string]: string }
|
||||
/** Documentation: https://esbuild.github.io/api/#entry-points */
|
||||
entryPoints?: string[] | Record<string, string> | { in: string, out: string }[]
|
||||
entryPoints?: (string | { in: string, out: string })[] | Record<string, string>
|
||||
/** Documentation: https://esbuild.github.io/api/#stdin */
|
||||
stdin?: StdinOptions
|
||||
/** Documentation: https://esbuild.github.io/plugins/ */
|
||||
@ -241,9 +244,15 @@ export interface ServeOptions {
|
||||
keyfile?: string
|
||||
certfile?: string
|
||||
fallback?: string
|
||||
cors?: CORSOptions
|
||||
onRequest?: (args: ServeOnRequestArgs) => void
|
||||
}
|
||||
|
||||
/** Documentation: https://esbuild.github.io/api/#cors */
|
||||
export interface CORSOptions {
|
||||
origin?: string | string[]
|
||||
}
|
||||
|
||||
export interface ServeOnRequestArgs {
|
||||
remoteAddress: string
|
||||
method: string
|
||||
@ -256,7 +265,7 @@ export interface ServeOnRequestArgs {
|
||||
/** Documentation: https://esbuild.github.io/api/#serve-return-values */
|
||||
export interface ServeResult {
|
||||
port: number
|
||||
host: string
|
||||
hosts: string[]
|
||||
}
|
||||
|
||||
export interface TransformOptions extends CommonOptions {
|
||||
@ -507,7 +516,9 @@ export interface AnalyzeMetafileOptions {
|
||||
verbose?: boolean
|
||||
}
|
||||
|
||||
/** Documentation: https://esbuild.github.io/api/#watch-arguments */
|
||||
export interface WatchOptions {
|
||||
delay?: number // In milliseconds
|
||||
}
|
||||
|
||||
export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
|
||||
|
||||
133
MEDICONNECTv3 - cópia/node_modules/esbuild/lib/main.js
generated
vendored
133
MEDICONNECTv3 - cópia/node_modules/esbuild/lib/main.js
generated
vendored
@ -218,25 +218,31 @@ function writeUInt32LE(buffer, value, offset) {
|
||||
var quote = JSON.stringify;
|
||||
var buildLogLevelDefault = "warning";
|
||||
var transformLogLevelDefault = "silent";
|
||||
function validateTarget(target) {
|
||||
validateStringValue(target, "target");
|
||||
if (target.indexOf(",") >= 0) throw new Error(`Invalid target: ${target}`);
|
||||
return target;
|
||||
function validateAndJoinStringArray(values, what) {
|
||||
const toJoin = [];
|
||||
for (const value of values) {
|
||||
validateStringValue(value, what);
|
||||
if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`);
|
||||
toJoin.push(value);
|
||||
}
|
||||
return toJoin.join(",");
|
||||
}
|
||||
var canBeAnything = () => null;
|
||||
var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
|
||||
var mustBeString = (value) => typeof value === "string" ? null : "a string";
|
||||
var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
|
||||
var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
|
||||
var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number";
|
||||
var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
|
||||
var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
|
||||
var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings";
|
||||
var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
|
||||
var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
|
||||
var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
|
||||
var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
|
||||
var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
|
||||
var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
|
||||
var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array";
|
||||
var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings";
|
||||
var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
|
||||
var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
|
||||
function getFlag(object, keys, key, mustBeFn) {
|
||||
@ -300,7 +306,7 @@ function pushCommonFlags(flags, options, keys) {
|
||||
let legalComments = getFlag(options, keys, "legalComments", mustBeString);
|
||||
let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString);
|
||||
let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean);
|
||||
let target = getFlag(options, keys, "target", mustBeStringOrArray);
|
||||
let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings);
|
||||
let format = getFlag(options, keys, "format", mustBeString);
|
||||
let globalName = getFlag(options, keys, "globalName", mustBeString);
|
||||
let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
|
||||
@ -311,8 +317,8 @@ function pushCommonFlags(flags, options, keys) {
|
||||
let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
|
||||
let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
|
||||
let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
|
||||
let drop = getFlag(options, keys, "drop", mustBeArray);
|
||||
let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray);
|
||||
let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings);
|
||||
let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings);
|
||||
let charset = getFlag(options, keys, "charset", mustBeString);
|
||||
let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
|
||||
let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
|
||||
@ -325,17 +331,15 @@ function pushCommonFlags(flags, options, keys) {
|
||||
let define = getFlag(options, keys, "define", mustBeObject);
|
||||
let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
|
||||
let supported = getFlag(options, keys, "supported", mustBeObject);
|
||||
let pure = getFlag(options, keys, "pure", mustBeArray);
|
||||
let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings);
|
||||
let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
|
||||
let platform = getFlag(options, keys, "platform", mustBeString);
|
||||
let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
|
||||
let absPaths = getFlag(options, keys, "absPaths", mustBeArrayOfStrings);
|
||||
if (legalComments) flags.push(`--legal-comments=${legalComments}`);
|
||||
if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`);
|
||||
if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`);
|
||||
if (target) {
|
||||
if (Array.isArray(target)) flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`);
|
||||
else flags.push(`--target=${validateTarget(target)}`);
|
||||
}
|
||||
if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`);
|
||||
if (format) flags.push(`--format=${format}`);
|
||||
if (globalName) flags.push(`--global-name=${globalName}`);
|
||||
if (platform) flags.push(`--platform=${platform}`);
|
||||
@ -349,9 +353,10 @@ function pushCommonFlags(flags, options, keys) {
|
||||
if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`);
|
||||
if (ignoreAnnotations) flags.push(`--ignore-annotations`);
|
||||
if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`);
|
||||
if (dropLabels) flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
|
||||
if (mangleProps) flags.push(`--mangle-props=${mangleProps.source}`);
|
||||
if (reserveProps) flags.push(`--reserve-props=${reserveProps.source}`);
|
||||
if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`);
|
||||
if (absPaths) flags.push(`--abs-paths=${validateAndJoinStringArray(absPaths, "abs paths")}`);
|
||||
if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`);
|
||||
if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`);
|
||||
if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`);
|
||||
if (jsx) flags.push(`--jsx=${jsx}`);
|
||||
if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`);
|
||||
@ -400,11 +405,11 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD
|
||||
let outdir = getFlag(options, keys, "outdir", mustBeString);
|
||||
let outbase = getFlag(options, keys, "outbase", mustBeString);
|
||||
let tsconfig = getFlag(options, keys, "tsconfig", mustBeString);
|
||||
let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray);
|
||||
let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray);
|
||||
let mainFields = getFlag(options, keys, "mainFields", mustBeArray);
|
||||
let conditions = getFlag(options, keys, "conditions", mustBeArray);
|
||||
let external = getFlag(options, keys, "external", mustBeArray);
|
||||
let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings);
|
||||
let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings);
|
||||
let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings);
|
||||
let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings);
|
||||
let external = getFlag(options, keys, "external", mustBeArrayOfStrings);
|
||||
let packages = getFlag(options, keys, "packages", mustBeString);
|
||||
let alias = getFlag(options, keys, "alias", mustBeObject);
|
||||
let loader = getFlag(options, keys, "loader", mustBeObject);
|
||||
@ -413,7 +418,7 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD
|
||||
let entryNames = getFlag(options, keys, "entryNames", mustBeString);
|
||||
let chunkNames = getFlag(options, keys, "chunkNames", mustBeString);
|
||||
let assetNames = getFlag(options, keys, "assetNames", mustBeString);
|
||||
let inject = getFlag(options, keys, "inject", mustBeArray);
|
||||
let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings);
|
||||
let banner = getFlag(options, keys, "banner", mustBeObject);
|
||||
let footer = getFlag(options, keys, "footer", mustBeObject);
|
||||
let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints);
|
||||
@ -435,37 +440,13 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD
|
||||
if (outbase) flags.push(`--outbase=${outbase}`);
|
||||
if (tsconfig) flags.push(`--tsconfig=${tsconfig}`);
|
||||
if (packages) flags.push(`--packages=${packages}`);
|
||||
if (resolveExtensions) {
|
||||
let values = [];
|
||||
for (let value of resolveExtensions) {
|
||||
validateStringValue(value, "resolve extension");
|
||||
if (value.indexOf(",") >= 0) throw new Error(`Invalid resolve extension: ${value}`);
|
||||
values.push(value);
|
||||
}
|
||||
flags.push(`--resolve-extensions=${values.join(",")}`);
|
||||
}
|
||||
if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`);
|
||||
if (publicPath) flags.push(`--public-path=${publicPath}`);
|
||||
if (entryNames) flags.push(`--entry-names=${entryNames}`);
|
||||
if (chunkNames) flags.push(`--chunk-names=${chunkNames}`);
|
||||
if (assetNames) flags.push(`--asset-names=${assetNames}`);
|
||||
if (mainFields) {
|
||||
let values = [];
|
||||
for (let value of mainFields) {
|
||||
validateStringValue(value, "main field");
|
||||
if (value.indexOf(",") >= 0) throw new Error(`Invalid main field: ${value}`);
|
||||
values.push(value);
|
||||
}
|
||||
flags.push(`--main-fields=${values.join(",")}`);
|
||||
}
|
||||
if (conditions) {
|
||||
let values = [];
|
||||
for (let value of conditions) {
|
||||
validateStringValue(value, "condition");
|
||||
if (value.indexOf(",") >= 0) throw new Error(`Invalid condition: ${value}`);
|
||||
values.push(value);
|
||||
}
|
||||
flags.push(`--conditions=${values.join(",")}`);
|
||||
}
|
||||
if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`);
|
||||
if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`);
|
||||
if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`);
|
||||
if (alias) {
|
||||
for (let old in alias) {
|
||||
@ -662,8 +643,8 @@ function createChannel(streamIn) {
|
||||
if (isFirstPacket) {
|
||||
isFirstPacket = false;
|
||||
let binaryVersion = String.fromCharCode(...bytes);
|
||||
if (binaryVersion !== "0.21.5") {
|
||||
throw new Error(`Cannot start service: Host version "${"0.21.5"}" does not match binary version ${quote(binaryVersion)}`);
|
||||
if (binaryVersion !== "0.25.9") {
|
||||
throw new Error(`Cannot start service: Host version "${"0.25.9"}" does not match binary version ${quote(binaryVersion)}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1005,11 +986,13 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
|
||||
watch: (options2 = {}) => new Promise((resolve, reject) => {
|
||||
if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
|
||||
const keys = {};
|
||||
const delay = getFlag(options2, keys, "delay", mustBeInteger);
|
||||
checkForInvalidFlags(options2, keys, `in watch() call`);
|
||||
const request2 = {
|
||||
command: "watch",
|
||||
key: buildKey
|
||||
};
|
||||
if (delay) request2.delay = delay;
|
||||
sendRequest(refs, request2, (error2) => {
|
||||
if (error2) reject(new Error(error2));
|
||||
else resolve(void 0);
|
||||
@ -1018,12 +1001,13 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
|
||||
serve: (options2 = {}) => new Promise((resolve, reject) => {
|
||||
if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
|
||||
const keys = {};
|
||||
const port = getFlag(options2, keys, "port", mustBeInteger);
|
||||
const port = getFlag(options2, keys, "port", mustBeValidPortNumber);
|
||||
const host = getFlag(options2, keys, "host", mustBeString);
|
||||
const servedir = getFlag(options2, keys, "servedir", mustBeString);
|
||||
const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
|
||||
const certfile = getFlag(options2, keys, "certfile", mustBeString);
|
||||
const fallback = getFlag(options2, keys, "fallback", mustBeString);
|
||||
const cors = getFlag(options2, keys, "cors", mustBeObject);
|
||||
const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction);
|
||||
checkForInvalidFlags(options2, keys, `in serve() call`);
|
||||
const request2 = {
|
||||
@ -1037,6 +1021,13 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
|
||||
if (keyfile !== void 0) request2.keyfile = keyfile;
|
||||
if (certfile !== void 0) request2.certfile = certfile;
|
||||
if (fallback !== void 0) request2.fallback = fallback;
|
||||
if (cors) {
|
||||
const corsKeys = {};
|
||||
const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings);
|
||||
checkForInvalidFlags(cors, corsKeys, `on "cors" object`);
|
||||
if (Array.isArray(origin)) request2.corsOrigin = origin;
|
||||
else if (origin !== void 0) request2.corsOrigin = [origin];
|
||||
}
|
||||
sendRequest(refs, request2, (error2, response2) => {
|
||||
if (error2) return reject(new Error(error2));
|
||||
if (onRequest) {
|
||||
@ -1172,7 +1163,7 @@ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn,
|
||||
if (filter == null) throw new Error(`onResolve() call is missing a filter`);
|
||||
let id = nextCallbackID++;
|
||||
onResolveCallbacks[id] = { name, callback, note: registeredNote };
|
||||
plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" });
|
||||
plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
|
||||
},
|
||||
onLoad(options, callback) {
|
||||
let registeredText = `This error came from the "onLoad" callback registered here:`;
|
||||
@ -1184,7 +1175,7 @@ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn,
|
||||
if (filter == null) throw new Error(`onLoad() call is missing a filter`);
|
||||
let id = nextCallbackID++;
|
||||
onLoadCallbacks[id] = { name, callback, note: registeredNote };
|
||||
plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" });
|
||||
plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
|
||||
},
|
||||
onDispose(callback) {
|
||||
onDisposeCallbacks.push(callback);
|
||||
@ -1198,6 +1189,7 @@ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn,
|
||||
}
|
||||
}
|
||||
requestCallbacks["on-start"] = async (id, request) => {
|
||||
details.clear();
|
||||
let response = { errors: [], warnings: [] };
|
||||
await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
|
||||
try {
|
||||
@ -1243,8 +1235,8 @@ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn,
|
||||
let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
|
||||
let errors = getFlag(result, keys, "errors", mustBeArray);
|
||||
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
||||
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
||||
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
||||
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
|
||||
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
|
||||
checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`);
|
||||
response.id = id2;
|
||||
if (pluginName != null) response.pluginName = pluginName;
|
||||
@ -1289,8 +1281,8 @@ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn,
|
||||
let loader = getFlag(result, keys, "loader", mustBeString);
|
||||
let errors = getFlag(result, keys, "errors", mustBeArray);
|
||||
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
||||
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
||||
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
||||
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
|
||||
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
|
||||
checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`);
|
||||
response.id = id2;
|
||||
if (pluginName != null) response.pluginName = pluginName;
|
||||
@ -1371,6 +1363,9 @@ function createObjectStash() {
|
||||
const map = /* @__PURE__ */ new Map();
|
||||
let nextID = 0;
|
||||
return {
|
||||
clear() {
|
||||
map.clear();
|
||||
},
|
||||
load(id) {
|
||||
return map.get(id);
|
||||
},
|
||||
@ -1591,6 +1586,11 @@ function convertOutputFiles({ path: path3, contents, hash }) {
|
||||
}
|
||||
};
|
||||
}
|
||||
function jsRegExpToGoRegExp(regexp) {
|
||||
let result = regexp.source;
|
||||
if (regexp.flags) result = `(?${regexp.flags})${result}`;
|
||||
return result;
|
||||
}
|
||||
|
||||
// lib/npm/node-platform.ts
|
||||
var fs = require("fs");
|
||||
@ -1621,13 +1621,16 @@ var knownUnixlikePackages = {
|
||||
"linux s390x BE": "@esbuild/linux-s390x",
|
||||
"linux x64 LE": "@esbuild/linux-x64",
|
||||
"linux loong64 LE": "@esbuild/linux-loong64",
|
||||
"netbsd arm64 LE": "@esbuild/netbsd-arm64",
|
||||
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
||||
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
|
||||
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
||||
"sunos x64 LE": "@esbuild/sunos-x64"
|
||||
};
|
||||
var knownWebAssemblyFallbackPackages = {
|
||||
"android arm LE": "@esbuild/android-arm",
|
||||
"android x64 LE": "@esbuild/android-x64"
|
||||
"android x64 LE": "@esbuild/android-x64",
|
||||
"openharmony arm64 LE": "@esbuild/openharmony-arm64"
|
||||
};
|
||||
function pkgAndSubpathForCurrentPlatform() {
|
||||
let pkg;
|
||||
@ -1767,7 +1770,7 @@ for your current platform.`);
|
||||
"node_modules",
|
||||
".cache",
|
||||
"esbuild",
|
||||
`pnpapi-${pkg.replace("/", "-")}-${"0.21.5"}-${path.basename(subpath)}`
|
||||
`pnpapi-${pkg.replace("/", "-")}-${"0.25.9"}-${path.basename(subpath)}`
|
||||
);
|
||||
if (!fs.existsSync(binTargetPath)) {
|
||||
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
||||
@ -1802,7 +1805,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
||||
}
|
||||
}
|
||||
var _a;
|
||||
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.21.5";
|
||||
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.9";
|
||||
var esbuildCommandAndArgs = () => {
|
||||
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
||||
throw new Error(
|
||||
@ -1869,7 +1872,7 @@ var fsAsync = {
|
||||
}
|
||||
}
|
||||
};
|
||||
var version = "0.21.5";
|
||||
var version = "0.25.9";
|
||||
var build = (options) => ensureServiceIsRunning().build(options);
|
||||
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
||||
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
||||
@ -1972,7 +1975,7 @@ var stopService;
|
||||
var ensureServiceIsRunning = () => {
|
||||
if (longLivedService) return longLivedService;
|
||||
let [command, args] = esbuildCommandAndArgs();
|
||||
let child = child_process.spawn(command, args.concat(`--service=${"0.21.5"}`, "--ping"), {
|
||||
let child = child_process.spawn(command, args.concat(`--service=${"0.25.9"}`, "--ping"), {
|
||||
windowsHide: true,
|
||||
stdio: ["pipe", "pipe", "inherit"],
|
||||
cwd: defaultWD
|
||||
@ -2076,7 +2079,7 @@ var runServiceSync = (callback) => {
|
||||
esbuild: node_exports
|
||||
});
|
||||
callback(service);
|
||||
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.21.5"}`), {
|
||||
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.9"}`), {
|
||||
cwd: defaultWD,
|
||||
windowsHide: true,
|
||||
input: stdin,
|
||||
@ -2096,7 +2099,7 @@ var workerThreadService = null;
|
||||
var startWorkerThreadService = (worker_threads2) => {
|
||||
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
||||
let worker = new worker_threads2.Worker(__filename, {
|
||||
workerData: { workerPort, defaultWD, esbuildVersion: "0.21.5" },
|
||||
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.9" },
|
||||
transferList: [workerPort],
|
||||
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
||||
//
|
||||
|
||||
53
MEDICONNECTv3 - cópia/node_modules/esbuild/package.json
generated
vendored
53
MEDICONNECTv3 - cópia/node_modules/esbuild/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "esbuild",
|
||||
"version": "0.21.5",
|
||||
"version": "0.25.9",
|
||||
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -12,35 +12,38 @@
|
||||
"main": "lib/main.js",
|
||||
"types": "lib/main.d.ts",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
},
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.21.5",
|
||||
"@esbuild/android-arm": "0.21.5",
|
||||
"@esbuild/android-arm64": "0.21.5",
|
||||
"@esbuild/android-x64": "0.21.5",
|
||||
"@esbuild/darwin-arm64": "0.21.5",
|
||||
"@esbuild/darwin-x64": "0.21.5",
|
||||
"@esbuild/freebsd-arm64": "0.21.5",
|
||||
"@esbuild/freebsd-x64": "0.21.5",
|
||||
"@esbuild/linux-arm": "0.21.5",
|
||||
"@esbuild/linux-arm64": "0.21.5",
|
||||
"@esbuild/linux-ia32": "0.21.5",
|
||||
"@esbuild/linux-loong64": "0.21.5",
|
||||
"@esbuild/linux-mips64el": "0.21.5",
|
||||
"@esbuild/linux-ppc64": "0.21.5",
|
||||
"@esbuild/linux-riscv64": "0.21.5",
|
||||
"@esbuild/linux-s390x": "0.21.5",
|
||||
"@esbuild/linux-x64": "0.21.5",
|
||||
"@esbuild/netbsd-x64": "0.21.5",
|
||||
"@esbuild/openbsd-x64": "0.21.5",
|
||||
"@esbuild/sunos-x64": "0.21.5",
|
||||
"@esbuild/win32-arm64": "0.21.5",
|
||||
"@esbuild/win32-ia32": "0.21.5",
|
||||
"@esbuild/win32-x64": "0.21.5"
|
||||
"@esbuild/aix-ppc64": "0.25.9",
|
||||
"@esbuild/android-arm": "0.25.9",
|
||||
"@esbuild/android-arm64": "0.25.9",
|
||||
"@esbuild/android-x64": "0.25.9",
|
||||
"@esbuild/darwin-arm64": "0.25.9",
|
||||
"@esbuild/darwin-x64": "0.25.9",
|
||||
"@esbuild/freebsd-arm64": "0.25.9",
|
||||
"@esbuild/freebsd-x64": "0.25.9",
|
||||
"@esbuild/linux-arm": "0.25.9",
|
||||
"@esbuild/linux-arm64": "0.25.9",
|
||||
"@esbuild/linux-ia32": "0.25.9",
|
||||
"@esbuild/linux-loong64": "0.25.9",
|
||||
"@esbuild/linux-mips64el": "0.25.9",
|
||||
"@esbuild/linux-ppc64": "0.25.9",
|
||||
"@esbuild/linux-riscv64": "0.25.9",
|
||||
"@esbuild/linux-s390x": "0.25.9",
|
||||
"@esbuild/linux-x64": "0.25.9",
|
||||
"@esbuild/netbsd-arm64": "0.25.9",
|
||||
"@esbuild/netbsd-x64": "0.25.9",
|
||||
"@esbuild/openbsd-arm64": "0.25.9",
|
||||
"@esbuild/openbsd-x64": "0.25.9",
|
||||
"@esbuild/openharmony-arm64": "0.25.9",
|
||||
"@esbuild/sunos-x64": "0.25.9",
|
||||
"@esbuild/win32-arm64": "0.25.9",
|
||||
"@esbuild/win32-ia32": "0.25.9",
|
||||
"@esbuild/win32-x64": "0.25.9"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
21
MEDICONNECTv3 - cópia/node_modules/tinyglobby/LICENSE
generated
vendored
Normal file
21
MEDICONNECTv3 - cópia/node_modules/tinyglobby/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Madeline Gurriarán
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
25
MEDICONNECTv3 - cópia/node_modules/tinyglobby/README.md
generated
vendored
Normal file
25
MEDICONNECTv3 - cópia/node_modules/tinyglobby/README.md
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# tinyglobby
|
||||
|
||||
[](https://npmjs.com/package/tinyglobby)
|
||||
[](https://npmjs.com/package/tinyglobby)
|
||||
|
||||
A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
|
||||
|
||||
Both globby and fast-glob present some behavior no other globbing lib has,
|
||||
which makes it hard to manually replace with something smaller and better.
|
||||
|
||||
This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@14.1.0)
|
||||
and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3).
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { glob, globSync } from 'tinyglobby';
|
||||
|
||||
await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
|
||||
globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Visit https://superchupu.dev/tinyglobby to read the full documentation.
|
||||
350
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.cjs
generated
vendored
Normal file
350
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.cjs
generated
vendored
Normal file
@ -0,0 +1,350 @@
|
||||
//#region rolldown:runtime
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
|
||||
//#endregion
|
||||
let fs = require("fs");
|
||||
fs = __toESM(fs);
|
||||
let path = require("path");
|
||||
path = __toESM(path);
|
||||
let url = require("url");
|
||||
url = __toESM(url);
|
||||
let fdir = require("fdir");
|
||||
fdir = __toESM(fdir);
|
||||
let picomatch = require("picomatch");
|
||||
picomatch = __toESM(picomatch);
|
||||
|
||||
//#region src/utils.ts
|
||||
const isReadonlyArray = Array.isArray;
|
||||
const isWin = process.platform === "win32";
|
||||
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
||||
function getPartialMatcher(patterns, options = {}) {
|
||||
const patternsCount = patterns.length;
|
||||
const patternsParts = Array(patternsCount);
|
||||
const matchers = Array(patternsCount);
|
||||
const globstarEnabled = !options.noglobstar;
|
||||
for (let i = 0; i < patternsCount; i++) {
|
||||
const parts = splitPattern(patterns[i]);
|
||||
patternsParts[i] = parts;
|
||||
const partsCount = parts.length;
|
||||
const partMatchers = Array(partsCount);
|
||||
for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, picomatch.default)(parts[j], options);
|
||||
matchers[i] = partMatchers;
|
||||
}
|
||||
return (input) => {
|
||||
const inputParts = input.split("/");
|
||||
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
||||
for (let i = 0; i < patterns.length; i++) {
|
||||
const patternParts = patternsParts[i];
|
||||
const matcher = matchers[i];
|
||||
const inputPatternCount = inputParts.length;
|
||||
const minParts = Math.min(inputPatternCount, patternParts.length);
|
||||
let j = 0;
|
||||
while (j < minParts) {
|
||||
const part = patternParts[j];
|
||||
if (part.includes("/")) return true;
|
||||
const match = matcher[j](inputParts[j]);
|
||||
if (!match) break;
|
||||
if (globstarEnabled && part === "**") return true;
|
||||
j++;
|
||||
}
|
||||
if (j === inputPatternCount) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
/* node:coverage ignore next 2 */
|
||||
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
|
||||
const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
|
||||
function buildFormat(cwd, root, absolute) {
|
||||
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
||||
if (absolute) {
|
||||
const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
|
||||
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
|
||||
}
|
||||
const prefix = root.slice(cwd.length + 1);
|
||||
if (prefix) return (p, isDir) => {
|
||||
if (p === ".") return prefix;
|
||||
const result = `${prefix}/${p}`;
|
||||
return isDir ? result.slice(0, -1) : result;
|
||||
};
|
||||
return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
|
||||
}
|
||||
if (absolute) return (p) => path.posix.relative(cwd, p) || ".";
|
||||
return (p) => path.posix.relative(cwd, `${root}/${p}`) || ".";
|
||||
}
|
||||
function buildRelative(cwd, root) {
|
||||
if (root.startsWith(`${cwd}/`)) {
|
||||
const prefix = root.slice(cwd.length + 1);
|
||||
return (p) => `${prefix}/${p}`;
|
||||
}
|
||||
return (p) => {
|
||||
const result = path.posix.relative(cwd, `${root}/${p}`);
|
||||
if (p.endsWith("/") && result !== "") return `${result}/`;
|
||||
return result || ".";
|
||||
};
|
||||
}
|
||||
const splitPatternOptions = { parts: true };
|
||||
function splitPattern(path$2) {
|
||||
var _result$parts;
|
||||
const result = picomatch.default.scan(path$2, splitPatternOptions);
|
||||
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$2];
|
||||
}
|
||||
const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
|
||||
function convertPosixPathToPattern(path$2) {
|
||||
return escapePosixPath(path$2);
|
||||
}
|
||||
function convertWin32PathToPattern(path$2) {
|
||||
return escapeWin32Path(path$2).replace(ESCAPED_WIN32_BACKSLASHES, "/");
|
||||
}
|
||||
/**
|
||||
* Converts a path to a pattern depending on the platform.
|
||||
* Identical to {@link escapePath} on POSIX systems.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
||||
*/
|
||||
/* node:coverage ignore next 3 */
|
||||
const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
|
||||
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
||||
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
||||
const escapePosixPath = (path$2) => path$2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
||||
const escapeWin32Path = (path$2) => path$2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
||||
/**
|
||||
* Escapes a path's special characters depending on the platform.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
||||
*/
|
||||
/* node:coverage ignore next */
|
||||
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
||||
/**
|
||||
* Checks if a pattern has dynamic parts.
|
||||
*
|
||||
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
||||
*
|
||||
* - Doesn't necessarily return `false` on patterns that include `\`.
|
||||
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
||||
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
||||
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
||||
*
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
||||
*/
|
||||
function isDynamicPattern(pattern, options) {
|
||||
if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
|
||||
const scan = picomatch.default.scan(pattern);
|
||||
return scan.isGlob || scan.negated;
|
||||
}
|
||||
function log(...tasks) {
|
||||
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/index.ts
|
||||
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
||||
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
||||
const BACKSLASHES = /\\/g;
|
||||
function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
||||
let result = pattern;
|
||||
if (pattern.endsWith("/")) result = pattern.slice(0, -1);
|
||||
if (!result.endsWith("*") && expandDirectories) result += "/**";
|
||||
const escapedCwd = escapePath(cwd);
|
||||
if (path.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = path.posix.relative(escapedCwd, result);
|
||||
else result = path.posix.normalize(result);
|
||||
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
||||
const parts = splitPattern(result);
|
||||
if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
|
||||
const n = (parentDirectoryMatch[0].length + 1) / 3;
|
||||
let i = 0;
|
||||
const cwdParts = escapedCwd.split("/");
|
||||
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
|
||||
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
||||
i++;
|
||||
}
|
||||
const potentialRoot = path.posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
|
||||
if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
|
||||
props.root = potentialRoot;
|
||||
props.depthOffset = -n + i;
|
||||
}
|
||||
}
|
||||
if (!isIgnore && props.depthOffset >= 0) {
|
||||
var _props$commonPath;
|
||||
(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
|
||||
const newCommonPath = [];
|
||||
const length = Math.min(props.commonPath.length, parts.length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
const part = parts[i];
|
||||
if (part === "**" && !parts[i + 1]) {
|
||||
newCommonPath.pop();
|
||||
break;
|
||||
}
|
||||
if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
|
||||
newCommonPath.push(part);
|
||||
}
|
||||
props.depthOffset = newCommonPath.length;
|
||||
props.commonPath = newCommonPath;
|
||||
props.root = newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) {
|
||||
if (typeof patterns === "string") patterns = [patterns];
|
||||
if (typeof ignore === "string") ignore = [ignore];
|
||||
const matchPatterns = [];
|
||||
const ignorePatterns = [];
|
||||
for (const pattern of ignore) {
|
||||
if (!pattern) continue;
|
||||
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
|
||||
}
|
||||
for (const pattern of patterns) {
|
||||
if (!pattern) continue;
|
||||
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
|
||||
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
|
||||
}
|
||||
return {
|
||||
match: matchPatterns,
|
||||
ignore: ignorePatterns
|
||||
};
|
||||
}
|
||||
function formatPaths(paths, relative) {
|
||||
for (let i = paths.length - 1; i >= 0; i--) {
|
||||
const path$2 = paths[i];
|
||||
paths[i] = relative(path$2);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
function normalizeCwd(cwd) {
|
||||
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
||||
if (cwd instanceof URL) return (0, url.fileURLToPath)(cwd).replace(BACKSLASHES, "/");
|
||||
return path.default.resolve(cwd).replace(BACKSLASHES, "/");
|
||||
}
|
||||
function getCrawler(patterns, inputOptions = {}) {
|
||||
const options = process.env.TINYGLOBBY_DEBUG ? {
|
||||
...inputOptions,
|
||||
debug: true
|
||||
} : inputOptions;
|
||||
const cwd = normalizeCwd(options.cwd);
|
||||
if (options.debug) log("globbing with:", {
|
||||
patterns,
|
||||
options,
|
||||
cwd
|
||||
});
|
||||
if (Array.isArray(patterns) && patterns.length === 0) return [{
|
||||
sync: () => [],
|
||||
withPromise: async () => []
|
||||
}, false];
|
||||
const props = {
|
||||
root: cwd,
|
||||
commonPath: null,
|
||||
depthOffset: 0
|
||||
};
|
||||
const processed = processPatterns({
|
||||
...options,
|
||||
patterns
|
||||
}, cwd, props);
|
||||
if (options.debug) log("internal processing patterns:", processed);
|
||||
const matchOptions = {
|
||||
dot: options.dot,
|
||||
nobrace: options.braceExpansion === false,
|
||||
nocase: options.caseSensitiveMatch === false,
|
||||
noextglob: options.extglob === false,
|
||||
noglobstar: options.globstar === false,
|
||||
posix: true
|
||||
};
|
||||
const matcher = (0, picomatch.default)(processed.match, {
|
||||
...matchOptions,
|
||||
ignore: processed.ignore
|
||||
});
|
||||
const ignore = (0, picomatch.default)(processed.ignore, matchOptions);
|
||||
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
||||
const format = buildFormat(cwd, props.root, options.absolute);
|
||||
const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
|
||||
const fdirOptions = {
|
||||
filters: [options.debug ? (p, isDirectory) => {
|
||||
const path$2 = format(p, isDirectory);
|
||||
const matches = matcher(path$2);
|
||||
if (matches) log(`matched ${path$2}`);
|
||||
return matches;
|
||||
} : (p, isDirectory) => matcher(format(p, isDirectory))],
|
||||
exclude: options.debug ? (_, p) => {
|
||||
const relativePath = formatExclude(p, true);
|
||||
const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
||||
if (skipped) log(`skipped ${p}`);
|
||||
else log(`crawling ${p}`);
|
||||
return skipped;
|
||||
} : (_, p) => {
|
||||
const relativePath = formatExclude(p, true);
|
||||
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
||||
},
|
||||
fs: options.fs ? {
|
||||
readdir: options.fs.readdir || fs.default.readdir,
|
||||
readdirSync: options.fs.readdirSync || fs.default.readdirSync,
|
||||
realpath: options.fs.realpath || fs.default.realpath,
|
||||
realpathSync: options.fs.realpathSync || fs.default.realpathSync,
|
||||
stat: options.fs.stat || fs.default.stat,
|
||||
statSync: options.fs.statSync || fs.default.statSync
|
||||
} : void 0,
|
||||
pathSeparator: "/",
|
||||
relativePaths: true,
|
||||
resolveSymlinks: true,
|
||||
signal: options.signal
|
||||
};
|
||||
if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
|
||||
if (options.absolute) {
|
||||
fdirOptions.relativePaths = false;
|
||||
fdirOptions.resolvePaths = true;
|
||||
fdirOptions.includeBasePath = true;
|
||||
}
|
||||
if (options.followSymbolicLinks === false) {
|
||||
fdirOptions.resolveSymlinks = false;
|
||||
fdirOptions.excludeSymlinks = true;
|
||||
}
|
||||
if (options.onlyDirectories) {
|
||||
fdirOptions.excludeFiles = true;
|
||||
fdirOptions.includeDirs = true;
|
||||
} else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
|
||||
props.root = props.root.replace(BACKSLASHES, "");
|
||||
const root = props.root;
|
||||
if (options.debug) log("internal properties:", props);
|
||||
const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
|
||||
return [new fdir.fdir(fdirOptions).crawl(root), relative];
|
||||
}
|
||||
async function glob(patternsOrOptions, options) {
|
||||
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
||||
const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
|
||||
const opts = isModern ? options : patternsOrOptions;
|
||||
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
||||
const [crawler, relative] = getCrawler(patterns, opts);
|
||||
if (!relative) return crawler.withPromise();
|
||||
return formatPaths(await crawler.withPromise(), relative);
|
||||
}
|
||||
function globSync(patternsOrOptions, options) {
|
||||
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
||||
const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
|
||||
const opts = isModern ? options : patternsOrOptions;
|
||||
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
||||
const [crawler, relative] = getCrawler(patterns, opts);
|
||||
if (!relative) return crawler.sync();
|
||||
return formatPaths(crawler.sync(), relative);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
exports.convertPathToPattern = convertPathToPattern;
|
||||
exports.escapePath = escapePath;
|
||||
exports.glob = glob;
|
||||
exports.globSync = globSync;
|
||||
exports.isDynamicPattern = isDynamicPattern;
|
||||
147
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.d.cts
generated
vendored
Normal file
147
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
import { FSLike } from "fdir";
|
||||
|
||||
//#region src/utils.d.ts
|
||||
|
||||
/**
|
||||
* Converts a path to a pattern depending on the platform.
|
||||
* Identical to {@link escapePath} on POSIX systems.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
||||
*/
|
||||
declare const convertPathToPattern: (path: string) => string;
|
||||
/**
|
||||
* Escapes a path's special characters depending on the platform.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
||||
*/
|
||||
declare const escapePath: (path: string) => string;
|
||||
/**
|
||||
* Checks if a pattern has dynamic parts.
|
||||
*
|
||||
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
||||
*
|
||||
* - Doesn't necessarily return `false` on patterns that include `\`.
|
||||
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
||||
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
||||
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
||||
*
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
||||
*/
|
||||
declare function isDynamicPattern(pattern: string, options?: {
|
||||
caseSensitiveMatch: boolean;
|
||||
}): boolean;
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
interface GlobOptions {
|
||||
/**
|
||||
* Whether to return absolute paths. Disable to have relative paths.
|
||||
* @default false
|
||||
*/
|
||||
absolute?: boolean;
|
||||
/**
|
||||
* Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
|
||||
* @default true
|
||||
*/
|
||||
braceExpansion?: boolean;
|
||||
/**
|
||||
* Whether to match in case-sensitive mode.
|
||||
* @default true
|
||||
*/
|
||||
caseSensitiveMatch?: boolean;
|
||||
/**
|
||||
* The working directory in which to search. Results will be returned relative to this directory, unless
|
||||
* {@link absolute} is set.
|
||||
*
|
||||
* It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
|
||||
* as doing so can harm performance due to having to recalculate relative paths.
|
||||
* @default process.cwd()
|
||||
*/
|
||||
cwd?: string | URL;
|
||||
/**
|
||||
* Logs useful debug information. Meant for development purposes. Logs can change at any time.
|
||||
* @default false
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* Maximum directory depth to crawl.
|
||||
* @default Infinity
|
||||
*/
|
||||
deep?: number;
|
||||
/**
|
||||
* Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
|
||||
* @default false
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Whether to automatically expand directory patterns.
|
||||
*
|
||||
* Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
|
||||
* @default true
|
||||
*/
|
||||
expandDirectories?: boolean;
|
||||
/**
|
||||
* Enables support for extglobs, like `+(pattern)`.
|
||||
* @default true
|
||||
*/
|
||||
extglob?: boolean;
|
||||
/**
|
||||
* Whether to traverse and include symbolic links. Can slightly affect performance.
|
||||
* @default true
|
||||
*/
|
||||
followSymbolicLinks?: boolean;
|
||||
/**
|
||||
* An object that overrides `node:fs` functions.
|
||||
* @default import('node:fs')
|
||||
*/
|
||||
fs?: FileSystemAdapter;
|
||||
/**
|
||||
* Enables support for matching nested directories with globstars (`**`).
|
||||
* If `false`, `**` behaves exactly like `*`.
|
||||
* @default true
|
||||
*/
|
||||
globstar?: boolean;
|
||||
/**
|
||||
* Glob patterns to exclude from the results.
|
||||
* @default []
|
||||
*/
|
||||
ignore?: string | readonly string[];
|
||||
/**
|
||||
* Enable to only return directories.
|
||||
* If `true`, disables {@link onlyFiles}.
|
||||
* @default false
|
||||
*/
|
||||
onlyDirectories?: boolean;
|
||||
/**
|
||||
* Enable to only return files.
|
||||
* @default true
|
||||
*/
|
||||
onlyFiles?: boolean;
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
patterns?: string | readonly string[];
|
||||
/**
|
||||
* An `AbortSignal` to abort crawling the file system.
|
||||
* @default undefined
|
||||
*/
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
type FileSystemAdapter = Partial<FSLike>;
|
||||
/**
|
||||
* Asynchronously match files following a glob pattern.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
|
||||
*/
|
||||
declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
declare function glob(options: GlobOptions): Promise<string[]>;
|
||||
/**
|
||||
* Synchronously match files following a glob pattern.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
|
||||
*/
|
||||
declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
declare function globSync(options: GlobOptions): string[];
|
||||
//#endregion
|
||||
export { FileSystemAdapter, GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
|
||||
147
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.d.mts
generated
vendored
Normal file
147
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
import { FSLike } from "fdir";
|
||||
|
||||
//#region src/utils.d.ts
|
||||
|
||||
/**
|
||||
* Converts a path to a pattern depending on the platform.
|
||||
* Identical to {@link escapePath} on POSIX systems.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
||||
*/
|
||||
declare const convertPathToPattern: (path: string) => string;
|
||||
/**
|
||||
* Escapes a path's special characters depending on the platform.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
||||
*/
|
||||
declare const escapePath: (path: string) => string;
|
||||
/**
|
||||
* Checks if a pattern has dynamic parts.
|
||||
*
|
||||
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
||||
*
|
||||
* - Doesn't necessarily return `false` on patterns that include `\`.
|
||||
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
||||
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
||||
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
||||
*
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
||||
*/
|
||||
declare function isDynamicPattern(pattern: string, options?: {
|
||||
caseSensitiveMatch: boolean;
|
||||
}): boolean;
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
interface GlobOptions {
|
||||
/**
|
||||
* Whether to return absolute paths. Disable to have relative paths.
|
||||
* @default false
|
||||
*/
|
||||
absolute?: boolean;
|
||||
/**
|
||||
* Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
|
||||
* @default true
|
||||
*/
|
||||
braceExpansion?: boolean;
|
||||
/**
|
||||
* Whether to match in case-sensitive mode.
|
||||
* @default true
|
||||
*/
|
||||
caseSensitiveMatch?: boolean;
|
||||
/**
|
||||
* The working directory in which to search. Results will be returned relative to this directory, unless
|
||||
* {@link absolute} is set.
|
||||
*
|
||||
* It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
|
||||
* as doing so can harm performance due to having to recalculate relative paths.
|
||||
* @default process.cwd()
|
||||
*/
|
||||
cwd?: string | URL;
|
||||
/**
|
||||
* Logs useful debug information. Meant for development purposes. Logs can change at any time.
|
||||
* @default false
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* Maximum directory depth to crawl.
|
||||
* @default Infinity
|
||||
*/
|
||||
deep?: number;
|
||||
/**
|
||||
* Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
|
||||
* @default false
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Whether to automatically expand directory patterns.
|
||||
*
|
||||
* Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
|
||||
* @default true
|
||||
*/
|
||||
expandDirectories?: boolean;
|
||||
/**
|
||||
* Enables support for extglobs, like `+(pattern)`.
|
||||
* @default true
|
||||
*/
|
||||
extglob?: boolean;
|
||||
/**
|
||||
* Whether to traverse and include symbolic links. Can slightly affect performance.
|
||||
* @default true
|
||||
*/
|
||||
followSymbolicLinks?: boolean;
|
||||
/**
|
||||
* An object that overrides `node:fs` functions.
|
||||
* @default import('node:fs')
|
||||
*/
|
||||
fs?: FileSystemAdapter;
|
||||
/**
|
||||
* Enables support for matching nested directories with globstars (`**`).
|
||||
* If `false`, `**` behaves exactly like `*`.
|
||||
* @default true
|
||||
*/
|
||||
globstar?: boolean;
|
||||
/**
|
||||
* Glob patterns to exclude from the results.
|
||||
* @default []
|
||||
*/
|
||||
ignore?: string | readonly string[];
|
||||
/**
|
||||
* Enable to only return directories.
|
||||
* If `true`, disables {@link onlyFiles}.
|
||||
* @default false
|
||||
*/
|
||||
onlyDirectories?: boolean;
|
||||
/**
|
||||
* Enable to only return files.
|
||||
* @default true
|
||||
*/
|
||||
onlyFiles?: boolean;
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
patterns?: string | readonly string[];
|
||||
/**
|
||||
* An `AbortSignal` to abort crawling the file system.
|
||||
* @default undefined
|
||||
*/
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
type FileSystemAdapter = Partial<FSLike>;
|
||||
/**
|
||||
* Asynchronously match files following a glob pattern.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
|
||||
*/
|
||||
declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
declare function glob(options: GlobOptions): Promise<string[]>;
|
||||
/**
|
||||
* Synchronously match files following a glob pattern.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
|
||||
*/
|
||||
declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
|
||||
/**
|
||||
* @deprecated Provide patterns as the first argument instead.
|
||||
*/
|
||||
declare function globSync(options: GlobOptions): string[];
|
||||
//#endregion
|
||||
export { FileSystemAdapter, GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
|
||||
318
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.mjs
generated
vendored
Normal file
318
MEDICONNECTv3 - cópia/node_modules/tinyglobby/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,318 @@
|
||||
import nativeFs from "fs";
|
||||
import path, { posix } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { fdir } from "fdir";
|
||||
import picomatch from "picomatch";
|
||||
|
||||
//#region src/utils.ts
|
||||
const isReadonlyArray = Array.isArray;
|
||||
const isWin = process.platform === "win32";
|
||||
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
||||
function getPartialMatcher(patterns, options = {}) {
|
||||
const patternsCount = patterns.length;
|
||||
const patternsParts = Array(patternsCount);
|
||||
const matchers = Array(patternsCount);
|
||||
const globstarEnabled = !options.noglobstar;
|
||||
for (let i = 0; i < patternsCount; i++) {
|
||||
const parts = splitPattern(patterns[i]);
|
||||
patternsParts[i] = parts;
|
||||
const partsCount = parts.length;
|
||||
const partMatchers = Array(partsCount);
|
||||
for (let j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);
|
||||
matchers[i] = partMatchers;
|
||||
}
|
||||
return (input) => {
|
||||
const inputParts = input.split("/");
|
||||
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
||||
for (let i = 0; i < patterns.length; i++) {
|
||||
const patternParts = patternsParts[i];
|
||||
const matcher = matchers[i];
|
||||
const inputPatternCount = inputParts.length;
|
||||
const minParts = Math.min(inputPatternCount, patternParts.length);
|
||||
let j = 0;
|
||||
while (j < minParts) {
|
||||
const part = patternParts[j];
|
||||
if (part.includes("/")) return true;
|
||||
const match = matcher[j](inputParts[j]);
|
||||
if (!match) break;
|
||||
if (globstarEnabled && part === "**") return true;
|
||||
j++;
|
||||
}
|
||||
if (j === inputPatternCount) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
/* node:coverage ignore next 2 */
|
||||
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
|
||||
const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
|
||||
function buildFormat(cwd, root, absolute) {
|
||||
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
||||
if (absolute) {
|
||||
const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
|
||||
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
|
||||
}
|
||||
const prefix = root.slice(cwd.length + 1);
|
||||
if (prefix) return (p, isDir) => {
|
||||
if (p === ".") return prefix;
|
||||
const result = `${prefix}/${p}`;
|
||||
return isDir ? result.slice(0, -1) : result;
|
||||
};
|
||||
return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
|
||||
}
|
||||
if (absolute) return (p) => posix.relative(cwd, p) || ".";
|
||||
return (p) => posix.relative(cwd, `${root}/${p}`) || ".";
|
||||
}
|
||||
function buildRelative(cwd, root) {
|
||||
if (root.startsWith(`${cwd}/`)) {
|
||||
const prefix = root.slice(cwd.length + 1);
|
||||
return (p) => `${prefix}/${p}`;
|
||||
}
|
||||
return (p) => {
|
||||
const result = posix.relative(cwd, `${root}/${p}`);
|
||||
if (p.endsWith("/") && result !== "") return `${result}/`;
|
||||
return result || ".";
|
||||
};
|
||||
}
|
||||
const splitPatternOptions = { parts: true };
|
||||
function splitPattern(path$1) {
|
||||
var _result$parts;
|
||||
const result = picomatch.scan(path$1, splitPatternOptions);
|
||||
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
|
||||
}
|
||||
const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
|
||||
function convertPosixPathToPattern(path$1) {
|
||||
return escapePosixPath(path$1);
|
||||
}
|
||||
function convertWin32PathToPattern(path$1) {
|
||||
return escapeWin32Path(path$1).replace(ESCAPED_WIN32_BACKSLASHES, "/");
|
||||
}
|
||||
/**
|
||||
* Converts a path to a pattern depending on the platform.
|
||||
* Identical to {@link escapePath} on POSIX systems.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
|
||||
*/
|
||||
/* node:coverage ignore next 3 */
|
||||
const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
|
||||
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
||||
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
||||
const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
||||
const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
||||
/**
|
||||
* Escapes a path's special characters depending on the platform.
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
||||
*/
|
||||
/* node:coverage ignore next */
|
||||
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
||||
/**
|
||||
* Checks if a pattern has dynamic parts.
|
||||
*
|
||||
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
||||
*
|
||||
* - Doesn't necessarily return `false` on patterns that include `\`.
|
||||
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
||||
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
||||
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
||||
*
|
||||
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
||||
*/
|
||||
function isDynamicPattern(pattern, options) {
|
||||
if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
|
||||
const scan = picomatch.scan(pattern);
|
||||
return scan.isGlob || scan.negated;
|
||||
}
|
||||
function log(...tasks) {
|
||||
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/index.ts
|
||||
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
||||
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
||||
const BACKSLASHES = /\\/g;
|
||||
function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
||||
let result = pattern;
|
||||
if (pattern.endsWith("/")) result = pattern.slice(0, -1);
|
||||
if (!result.endsWith("*") && expandDirectories) result += "/**";
|
||||
const escapedCwd = escapePath(cwd);
|
||||
if (path.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
|
||||
else result = posix.normalize(result);
|
||||
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
||||
const parts = splitPattern(result);
|
||||
if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
|
||||
const n = (parentDirectoryMatch[0].length + 1) / 3;
|
||||
let i = 0;
|
||||
const cwdParts = escapedCwd.split("/");
|
||||
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
|
||||
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
||||
i++;
|
||||
}
|
||||
const potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
|
||||
if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
|
||||
props.root = potentialRoot;
|
||||
props.depthOffset = -n + i;
|
||||
}
|
||||
}
|
||||
if (!isIgnore && props.depthOffset >= 0) {
|
||||
var _props$commonPath;
|
||||
(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
|
||||
const newCommonPath = [];
|
||||
const length = Math.min(props.commonPath.length, parts.length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
const part = parts[i];
|
||||
if (part === "**" && !parts[i + 1]) {
|
||||
newCommonPath.pop();
|
||||
break;
|
||||
}
|
||||
if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
|
||||
newCommonPath.push(part);
|
||||
}
|
||||
props.depthOffset = newCommonPath.length;
|
||||
props.commonPath = newCommonPath;
|
||||
props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) {
|
||||
if (typeof patterns === "string") patterns = [patterns];
|
||||
if (typeof ignore === "string") ignore = [ignore];
|
||||
const matchPatterns = [];
|
||||
const ignorePatterns = [];
|
||||
for (const pattern of ignore) {
|
||||
if (!pattern) continue;
|
||||
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
|
||||
}
|
||||
for (const pattern of patterns) {
|
||||
if (!pattern) continue;
|
||||
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
|
||||
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
|
||||
}
|
||||
return {
|
||||
match: matchPatterns,
|
||||
ignore: ignorePatterns
|
||||
};
|
||||
}
|
||||
function formatPaths(paths, relative) {
|
||||
for (let i = paths.length - 1; i >= 0; i--) {
|
||||
const path$1 = paths[i];
|
||||
paths[i] = relative(path$1);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
function normalizeCwd(cwd) {
|
||||
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
||||
if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
|
||||
return path.resolve(cwd).replace(BACKSLASHES, "/");
|
||||
}
|
||||
function getCrawler(patterns, inputOptions = {}) {
|
||||
const options = process.env.TINYGLOBBY_DEBUG ? {
|
||||
...inputOptions,
|
||||
debug: true
|
||||
} : inputOptions;
|
||||
const cwd = normalizeCwd(options.cwd);
|
||||
if (options.debug) log("globbing with:", {
|
||||
patterns,
|
||||
options,
|
||||
cwd
|
||||
});
|
||||
if (Array.isArray(patterns) && patterns.length === 0) return [{
|
||||
sync: () => [],
|
||||
withPromise: async () => []
|
||||
}, false];
|
||||
const props = {
|
||||
root: cwd,
|
||||
commonPath: null,
|
||||
depthOffset: 0
|
||||
};
|
||||
const processed = processPatterns({
|
||||
...options,
|
||||
patterns
|
||||
}, cwd, props);
|
||||
if (options.debug) log("internal processing patterns:", processed);
|
||||
const matchOptions = {
|
||||
dot: options.dot,
|
||||
nobrace: options.braceExpansion === false,
|
||||
nocase: options.caseSensitiveMatch === false,
|
||||
noextglob: options.extglob === false,
|
||||
noglobstar: options.globstar === false,
|
||||
posix: true
|
||||
};
|
||||
const matcher = picomatch(processed.match, {
|
||||
...matchOptions,
|
||||
ignore: processed.ignore
|
||||
});
|
||||
const ignore = picomatch(processed.ignore, matchOptions);
|
||||
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
||||
const format = buildFormat(cwd, props.root, options.absolute);
|
||||
const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
|
||||
const fdirOptions = {
|
||||
filters: [options.debug ? (p, isDirectory) => {
|
||||
const path$1 = format(p, isDirectory);
|
||||
const matches = matcher(path$1);
|
||||
if (matches) log(`matched ${path$1}`);
|
||||
return matches;
|
||||
} : (p, isDirectory) => matcher(format(p, isDirectory))],
|
||||
exclude: options.debug ? (_, p) => {
|
||||
const relativePath = formatExclude(p, true);
|
||||
const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
||||
if (skipped) log(`skipped ${p}`);
|
||||
else log(`crawling ${p}`);
|
||||
return skipped;
|
||||
} : (_, p) => {
|
||||
const relativePath = formatExclude(p, true);
|
||||
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
||||
},
|
||||
fs: options.fs ? {
|
||||
readdir: options.fs.readdir || nativeFs.readdir,
|
||||
readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
|
||||
realpath: options.fs.realpath || nativeFs.realpath,
|
||||
realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
|
||||
stat: options.fs.stat || nativeFs.stat,
|
||||
statSync: options.fs.statSync || nativeFs.statSync
|
||||
} : void 0,
|
||||
pathSeparator: "/",
|
||||
relativePaths: true,
|
||||
resolveSymlinks: true,
|
||||
signal: options.signal
|
||||
};
|
||||
if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
|
||||
if (options.absolute) {
|
||||
fdirOptions.relativePaths = false;
|
||||
fdirOptions.resolvePaths = true;
|
||||
fdirOptions.includeBasePath = true;
|
||||
}
|
||||
if (options.followSymbolicLinks === false) {
|
||||
fdirOptions.resolveSymlinks = false;
|
||||
fdirOptions.excludeSymlinks = true;
|
||||
}
|
||||
if (options.onlyDirectories) {
|
||||
fdirOptions.excludeFiles = true;
|
||||
fdirOptions.includeDirs = true;
|
||||
} else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
|
||||
props.root = props.root.replace(BACKSLASHES, "");
|
||||
const root = props.root;
|
||||
if (options.debug) log("internal properties:", props);
|
||||
const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
|
||||
return [new fdir(fdirOptions).crawl(root), relative];
|
||||
}
|
||||
async function glob(patternsOrOptions, options) {
|
||||
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
||||
const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
|
||||
const opts = isModern ? options : patternsOrOptions;
|
||||
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
||||
const [crawler, relative] = getCrawler(patterns, opts);
|
||||
if (!relative) return crawler.withPromise();
|
||||
return formatPaths(await crawler.withPromise(), relative);
|
||||
}
|
||||
function globSync(patternsOrOptions, options) {
|
||||
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
||||
const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
|
||||
const opts = isModern ? options : patternsOrOptions;
|
||||
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
||||
const [crawler, relative] = getCrawler(patterns, opts);
|
||||
if (!relative) return crawler.sync();
|
||||
return formatPaths(crawler.sync(), relative);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
|
||||
7
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/LICENSE
generated
vendored
Normal file
7
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/LICENSE
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
Copyright 2023 Abdullah Atta
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
91
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/README.md
generated
vendored
Normal file
91
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/README.md
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
<p align="center">
|
||||
<img src="https://github.com/thecodrr/fdir/raw/master/assets/fdir.gif" width="75%"/>
|
||||
|
||||
<h1 align="center">The Fastest Directory Crawler & Globber for NodeJS</h1>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/v/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/dw/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://codeclimate.com/github/thecodrr/fdir/maintainability"><img src="https://img.shields.io/codeclimate/maintainability-percentage/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://coveralls.io/github/thecodrr/fdir?branch=master"><img src="https://img.shields.io/coveralls/github/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/bundlephobia/minzip/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.producthunt.com/posts/fdir-every-millisecond-matters"><img src="https://img.shields.io/badge/ProductHunt-Upvote-red?style=for-the-badge&logo=product-hunt"/></a>
|
||||
<a href="https://dev.to/thecodrr/how-i-wrote-the-fastest-directory-crawler-ever-3p9c"><img src="https://img.shields.io/badge/dev.to-Read%20Blog-black?style=for-the-badge&logo=dev.to"/></a>
|
||||
<a href="./LICENSE"><img src="https://img.shields.io/github/license/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
⚡ **The Fastest:** Nothing similar (in the NodeJS world) beats `fdir` in speed. It can easily crawl a directory containing **1 million files in < 1 second.**
|
||||
|
||||
💡 **Stupidly Easy:** `fdir` uses expressive Builder pattern to build the crawler increasing code readability.
|
||||
|
||||
🤖 **Zero Dependencies\*:** `fdir` only uses NodeJS `fs` & `path` modules.
|
||||
|
||||
🕺 **Astonishingly Small:** < 2KB in size gzipped & minified.
|
||||
|
||||
🖮 **Hackable:** Extending `fdir` is extremely simple now that the new Builder API is here. Feel free to experiment around.
|
||||
|
||||
_\* `picomatch` must be installed manually by the user to support globbing._
|
||||
|
||||
## 🚄 Quickstart
|
||||
|
||||
### Installation
|
||||
|
||||
You can install using `npm`:
|
||||
|
||||
```sh
|
||||
$ npm i fdir
|
||||
```
|
||||
|
||||
or Yarn:
|
||||
|
||||
```sh
|
||||
$ yarn add fdir
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
```ts
|
||||
import { fdir } from "fdir";
|
||||
|
||||
// create the builder
|
||||
const api = new fdir().withFullPaths().crawl("path/to/dir");
|
||||
|
||||
// get all files in a directory synchronously
|
||||
const files = api.sync();
|
||||
|
||||
// or asynchronously
|
||||
api.withPromise().then((files) => {
|
||||
// do something with the result here.
|
||||
});
|
||||
```
|
||||
|
||||
## Documentation:
|
||||
|
||||
Documentation for all methods is available [here](/documentation.md).
|
||||
|
||||
## 📊 Benchmarks:
|
||||
|
||||
Please check the benchmark against the latest version [here](/BENCHMARKS.md).
|
||||
|
||||
## 🙏Used by:
|
||||
|
||||
`fdir` is downloaded over 200k+ times a week by projects around the world. Here's a list of some notable projects using `fdir` in production:
|
||||
|
||||
> Note: if you think your project should be here, feel free to open an issue. Notable is anything with a considerable amount of GitHub stars.
|
||||
|
||||
1. [rollup/plugins](https://github.com/rollup/plugins)
|
||||
2. [SuperchupuDev/tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
|
||||
3. [pulumi/pulumi](https://github.com/pulumi/pulumi)
|
||||
4. [dotenvx/dotenvx](https://github.com/dotenvx/dotenvx)
|
||||
5. [mdn/yari](https://github.com/mdn/yari)
|
||||
6. [streetwriters/notesnook](https://github.com/streetwriters/notesnook)
|
||||
7. [imba/imba](https://github.com/imba/imba)
|
||||
8. [moroshko/react-scanner](https://github.com/moroshko/react-scanner)
|
||||
9. [netlify/build](https://github.com/netlify/build)
|
||||
10. [yassinedoghri/astro-i18next](https://github.com/yassinedoghri/astro-i18next)
|
||||
11. [selfrefactor/rambda](https://github.com/selfrefactor/rambda)
|
||||
12. [whyboris/Video-Hub-App](https://github.com/whyboris/Video-Hub-App)
|
||||
|
||||
## 🦮 LICENSE
|
||||
|
||||
Copyright © 2024 Abdullah Atta under MIT. [Read full text here.](https://github.com/thecodrr/fdir/raw/master/LICENSE)
|
||||
588
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.cjs
generated
vendored
Normal file
588
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.cjs
generated
vendored
Normal file
@ -0,0 +1,588 @@
|
||||
//#region rolldown:runtime
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
|
||||
//#endregion
|
||||
const path = __toESM(require("path"));
|
||||
const fs = __toESM(require("fs"));
|
||||
|
||||
//#region src/utils.ts
|
||||
function cleanPath(path$1) {
|
||||
let normalized = (0, path.normalize)(path$1);
|
||||
if (normalized.length > 1 && normalized[normalized.length - 1] === path.sep) normalized = normalized.substring(0, normalized.length - 1);
|
||||
return normalized;
|
||||
}
|
||||
const SLASHES_REGEX = /[\\/]/g;
|
||||
function convertSlashes(path$1, separator) {
|
||||
return path$1.replace(SLASHES_REGEX, separator);
|
||||
}
|
||||
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
||||
function isRootDirectory(path$1) {
|
||||
return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
|
||||
}
|
||||
function normalizePath(path$1, options) {
|
||||
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
||||
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
|
||||
if (resolvePaths) path$1 = (0, path.resolve)(path$1);
|
||||
if (normalizePath$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
|
||||
if (path$1 === ".") return "";
|
||||
const needsSeperator = path$1[path$1.length - 1] !== pathSeparator;
|
||||
return convertSlashes(needsSeperator ? path$1 + pathSeparator : path$1, pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/join-path.ts
|
||||
function joinPathWithBasePath(filename, directoryPath) {
|
||||
return directoryPath + filename;
|
||||
}
|
||||
function joinPathWithRelativePath(root, options) {
|
||||
return function(filename, directoryPath) {
|
||||
const sameRoot = directoryPath.startsWith(root);
|
||||
if (sameRoot) return directoryPath.slice(root.length) + filename;
|
||||
else return convertSlashes((0, path.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
||||
};
|
||||
}
|
||||
function joinPath(filename) {
|
||||
return filename;
|
||||
}
|
||||
function joinDirectoryPath(filename, directoryPath, separator) {
|
||||
return directoryPath + filename + separator;
|
||||
}
|
||||
function build$7(root, options) {
|
||||
const { relativePaths, includeBasePath } = options;
|
||||
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-directory.ts
|
||||
function pushDirectoryWithRelativePath(root) {
|
||||
return function(directoryPath, paths) {
|
||||
paths.push(directoryPath.substring(root.length) || ".");
|
||||
};
|
||||
}
|
||||
function pushDirectoryFilterWithRelativePath(root) {
|
||||
return function(directoryPath, paths, filters) {
|
||||
const relativePath = directoryPath.substring(root.length) || ".";
|
||||
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
|
||||
};
|
||||
}
|
||||
const pushDirectory = (directoryPath, paths) => {
|
||||
paths.push(directoryPath || ".");
|
||||
};
|
||||
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
||||
const path$1 = directoryPath || ".";
|
||||
if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
|
||||
};
|
||||
const empty$2 = () => {};
|
||||
function build$6(root, options) {
|
||||
const { includeDirs, filters, relativePaths } = options;
|
||||
if (!includeDirs) return empty$2;
|
||||
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
||||
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-file.ts
|
||||
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) counts.files++;
|
||||
};
|
||||
const pushFileFilter = (filename, paths, _counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
|
||||
};
|
||||
const pushFileCount = (_filename, _paths, counts, _filters) => {
|
||||
counts.files++;
|
||||
};
|
||||
const pushFile = (filename, paths) => {
|
||||
paths.push(filename);
|
||||
};
|
||||
const empty$1 = () => {};
|
||||
function build$5(options) {
|
||||
const { excludeFiles, filters, onlyCounts } = options;
|
||||
if (excludeFiles) return empty$1;
|
||||
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
||||
else if (onlyCounts) return pushFileCount;
|
||||
else return pushFile;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/get-array.ts
|
||||
const getArray = (paths) => {
|
||||
return paths;
|
||||
};
|
||||
const getArrayGroup = () => {
|
||||
return [""].slice(0, 0);
|
||||
};
|
||||
function build$4(options) {
|
||||
return options.group ? getArrayGroup : getArray;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/group-files.ts
|
||||
const groupFiles = (groups, directory, files) => {
|
||||
groups.push({
|
||||
directory,
|
||||
files,
|
||||
dir: directory
|
||||
});
|
||||
};
|
||||
const empty = () => {};
|
||||
function build$3(options) {
|
||||
return options.group ? groupFiles : empty;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/resolve-symlink.ts
|
||||
const resolveSymlinksAsync = function(path$1, state, callback$1) {
|
||||
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
fs$1.realpath(path$1, (error, resolvedPath) => {
|
||||
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
||||
fs$1.stat(resolvedPath, (error$1, stat) => {
|
||||
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
||||
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
|
||||
callback$1(stat, resolvedPath);
|
||||
queue.dequeue(null, state);
|
||||
});
|
||||
});
|
||||
};
|
||||
const resolveSymlinks = function(path$1, state, callback$1) {
|
||||
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
try {
|
||||
const resolvedPath = fs$1.realpathSync(path$1);
|
||||
const stat = fs$1.statSync(resolvedPath);
|
||||
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
|
||||
callback$1(stat, resolvedPath);
|
||||
} catch (e) {
|
||||
if (!suppressErrors) throw e;
|
||||
}
|
||||
};
|
||||
function build$2(options, isSynchronous) {
|
||||
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
||||
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
||||
}
|
||||
function isRecursive(path$1, resolved, state) {
|
||||
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
||||
let parent = (0, path.dirname)(path$1);
|
||||
let depth = 1;
|
||||
while (parent !== state.root && depth < 2) {
|
||||
const resolvedPath = state.symlinks.get(parent);
|
||||
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
||||
if (isSameRoot) depth++;
|
||||
else parent = (0, path.dirname)(parent);
|
||||
}
|
||||
state.symlinks.set(path$1, resolved);
|
||||
return depth > 1;
|
||||
}
|
||||
function isRecursiveUsingRealPaths(resolved, state) {
|
||||
return state.visited.includes(resolved + state.options.pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/invoke-callback.ts
|
||||
const onlyCountsSync = (state) => {
|
||||
return state.counts;
|
||||
};
|
||||
const groupsSync = (state) => {
|
||||
return state.groups;
|
||||
};
|
||||
const defaultSync = (state) => {
|
||||
return state.paths;
|
||||
};
|
||||
const limitFilesSync = (state) => {
|
||||
return state.paths.slice(0, state.options.maxFiles);
|
||||
};
|
||||
const onlyCountsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.counts, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const defaultAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const limitFilesAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const groupsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.groups, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
function report(error, callback$1, output, suppressErrors) {
|
||||
if (error && !suppressErrors) callback$1(error, output);
|
||||
else callback$1(null, output);
|
||||
}
|
||||
function build$1(options, isSynchronous) {
|
||||
const { onlyCounts, group, maxFiles } = options;
|
||||
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
||||
else if (group) return isSynchronous ? groupsSync : groupsAsync;
|
||||
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
||||
else return isSynchronous ? defaultSync : defaultAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/walk-directory.ts
|
||||
const readdirOpts = { withFileTypes: true };
|
||||
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
state.queue.enqueue();
|
||||
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
||||
const { fs: fs$1 } = state;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
fs$1.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
||||
});
|
||||
};
|
||||
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
const { fs: fs$1 } = state;
|
||||
if (currentDepth < 0) return;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
let entries = [];
|
||||
try {
|
||||
entries = fs$1.readdirSync(crawlPath || ".", readdirOpts);
|
||||
} catch (e) {
|
||||
if (!state.options.suppressErrors) throw e;
|
||||
}
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
};
|
||||
function build(isSynchronous) {
|
||||
return isSynchronous ? walkSync : walkAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/queue.ts
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
var Queue = class {
|
||||
count = 0;
|
||||
constructor(onQueueEmpty) {
|
||||
this.onQueueEmpty = onQueueEmpty;
|
||||
}
|
||||
enqueue() {
|
||||
this.count++;
|
||||
return this.count;
|
||||
}
|
||||
dequeue(error, output) {
|
||||
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
||||
this.onQueueEmpty(error, output);
|
||||
if (error) {
|
||||
output.controller.abort();
|
||||
this.onQueueEmpty = void 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/counter.ts
|
||||
var Counter = class {
|
||||
_files = 0;
|
||||
_directories = 0;
|
||||
set files(num) {
|
||||
this._files = num;
|
||||
}
|
||||
get files() {
|
||||
return this._files;
|
||||
}
|
||||
set directories(num) {
|
||||
this._directories = num;
|
||||
}
|
||||
get directories() {
|
||||
return this._directories;
|
||||
}
|
||||
/**
|
||||
* @deprecated use `directories` instead
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
get dirs() {
|
||||
return this._directories;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/aborter.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
var Aborter = class {
|
||||
aborted = false;
|
||||
abort() {
|
||||
this.aborted = true;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/walker.ts
|
||||
var Walker = class {
|
||||
root;
|
||||
isSynchronous;
|
||||
state;
|
||||
joinPath;
|
||||
pushDirectory;
|
||||
pushFile;
|
||||
getArray;
|
||||
groupFiles;
|
||||
resolveSymlink;
|
||||
walkDirectory;
|
||||
callbackInvoker;
|
||||
constructor(root, options, callback$1) {
|
||||
this.isSynchronous = !callback$1;
|
||||
this.callbackInvoker = build$1(options, this.isSynchronous);
|
||||
this.root = normalizePath(root, options);
|
||||
this.state = {
|
||||
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
||||
paths: [""].slice(0, 0),
|
||||
groups: [],
|
||||
counts: new Counter(),
|
||||
options,
|
||||
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
|
||||
symlinks: /* @__PURE__ */ new Map(),
|
||||
visited: [""].slice(0, 0),
|
||||
controller: new Aborter(),
|
||||
fs: options.fs || fs
|
||||
};
|
||||
this.joinPath = build$7(this.root, options);
|
||||
this.pushDirectory = build$6(this.root, options);
|
||||
this.pushFile = build$5(options);
|
||||
this.getArray = build$4(options);
|
||||
this.groupFiles = build$3(options);
|
||||
this.resolveSymlink = build$2(options, this.isSynchronous);
|
||||
this.walkDirectory = build(this.isSynchronous);
|
||||
}
|
||||
start() {
|
||||
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
||||
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
||||
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
||||
}
|
||||
walk = (entries, directoryPath, depth) => {
|
||||
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
||||
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
||||
const files = this.getArray(this.state.paths);
|
||||
for (let i = 0; i < entries.length; ++i) {
|
||||
const entry = entries[i];
|
||||
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
||||
const filename = this.joinPath(entry.name, directoryPath);
|
||||
this.pushFile(filename, files, this.state.counts, filters);
|
||||
} else if (entry.isDirectory()) {
|
||||
let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
||||
if (exclude && exclude(entry.name, path$1)) continue;
|
||||
this.pushDirectory(path$1, paths, filters);
|
||||
this.walkDirectory(this.state, path$1, path$1, depth - 1, this.walk);
|
||||
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
||||
let path$1 = joinPathWithBasePath(entry.name, directoryPath);
|
||||
this.resolveSymlink(path$1, this.state, (stat, resolvedPath) => {
|
||||
if (stat.isDirectory()) {
|
||||
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
||||
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
|
||||
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth - 1, this.walk);
|
||||
} else {
|
||||
resolvedPath = useRealPaths ? resolvedPath : path$1;
|
||||
const filename = (0, path.basename)(resolvedPath);
|
||||
const directoryPath$1 = normalizePath((0, path.dirname)(resolvedPath), this.state.options);
|
||||
resolvedPath = this.joinPath(filename, directoryPath$1);
|
||||
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.groupFiles(this.state.groups, directoryPath, files);
|
||||
};
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/async.ts
|
||||
function promise(root, options) {
|
||||
return new Promise((resolve$1, reject) => {
|
||||
callback(root, options, (err, output) => {
|
||||
if (err) return reject(err);
|
||||
resolve$1(output);
|
||||
});
|
||||
});
|
||||
}
|
||||
function callback(root, options, callback$1) {
|
||||
let walker = new Walker(root, options, callback$1);
|
||||
walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/sync.ts
|
||||
function sync(root, options) {
|
||||
const walker = new Walker(root, options);
|
||||
return walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.ts
|
||||
var APIBuilder = class {
|
||||
constructor(root, options) {
|
||||
this.root = root;
|
||||
this.options = options;
|
||||
}
|
||||
withPromise() {
|
||||
return promise(this.root, this.options);
|
||||
}
|
||||
withCallback(cb) {
|
||||
callback(this.root, this.options, cb);
|
||||
}
|
||||
sync() {
|
||||
return sync(this.root, this.options);
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/index.ts
|
||||
let pm = null;
|
||||
/* c8 ignore next 6 */
|
||||
try {
|
||||
require.resolve("picomatch");
|
||||
pm = require("picomatch");
|
||||
} catch {}
|
||||
var Builder = class {
|
||||
globCache = {};
|
||||
options = {
|
||||
maxDepth: Infinity,
|
||||
suppressErrors: true,
|
||||
pathSeparator: path.sep,
|
||||
filters: []
|
||||
};
|
||||
globFunction;
|
||||
constructor(options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
this.globFunction = this.options.globFunction;
|
||||
}
|
||||
group() {
|
||||
this.options.group = true;
|
||||
return this;
|
||||
}
|
||||
withPathSeparator(separator) {
|
||||
this.options.pathSeparator = separator;
|
||||
return this;
|
||||
}
|
||||
withBasePath() {
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withRelativePaths() {
|
||||
this.options.relativePaths = true;
|
||||
return this;
|
||||
}
|
||||
withDirs() {
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
withMaxDepth(depth) {
|
||||
this.options.maxDepth = depth;
|
||||
return this;
|
||||
}
|
||||
withMaxFiles(limit) {
|
||||
this.options.maxFiles = limit;
|
||||
return this;
|
||||
}
|
||||
withFullPaths() {
|
||||
this.options.resolvePaths = true;
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withErrors() {
|
||||
this.options.suppressErrors = false;
|
||||
return this;
|
||||
}
|
||||
withSymlinks({ resolvePaths = true } = {}) {
|
||||
this.options.resolveSymlinks = true;
|
||||
this.options.useRealPaths = resolvePaths;
|
||||
return this.withFullPaths();
|
||||
}
|
||||
withAbortSignal(signal) {
|
||||
this.options.signal = signal;
|
||||
return this;
|
||||
}
|
||||
normalize() {
|
||||
this.options.normalizePath = true;
|
||||
return this;
|
||||
}
|
||||
filter(predicate) {
|
||||
this.options.filters.push(predicate);
|
||||
return this;
|
||||
}
|
||||
onlyDirs() {
|
||||
this.options.excludeFiles = true;
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
exclude(predicate) {
|
||||
this.options.exclude = predicate;
|
||||
return this;
|
||||
}
|
||||
onlyCounts() {
|
||||
this.options.onlyCounts = true;
|
||||
return this;
|
||||
}
|
||||
crawl(root) {
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
withGlobFunction(fn) {
|
||||
this.globFunction = fn;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
/* c8 ignore next 4 */
|
||||
crawlWithOptions(root, options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
glob(...patterns) {
|
||||
if (this.globFunction) return this.globWithOptions(patterns);
|
||||
return this.globWithOptions(patterns, ...[{ dot: true }]);
|
||||
}
|
||||
globWithOptions(patterns, ...options) {
|
||||
const globFn = this.globFunction || pm;
|
||||
/* c8 ignore next 5 */
|
||||
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
||||
var isMatch = this.globCache[patterns.join("\0")];
|
||||
if (!isMatch) {
|
||||
isMatch = globFn(patterns, ...options);
|
||||
this.globCache[patterns.join("\0")] = isMatch;
|
||||
}
|
||||
this.options.filters.push((path$1) => isMatch(path$1));
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
exports.fdir = Builder;
|
||||
155
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.d.cts
generated
vendored
Normal file
155
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
/// <reference types="node" />
|
||||
import * as nativeFs from "fs";
|
||||
import picomatch from "picomatch";
|
||||
|
||||
//#region src/api/aborter.d.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
declare class Aborter {
|
||||
aborted: boolean;
|
||||
abort(): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/api/queue.d.ts
|
||||
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
declare class Queue {
|
||||
private onQueueEmpty?;
|
||||
count: number;
|
||||
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
|
||||
enqueue(): number;
|
||||
dequeue(error: Error | null, output: WalkerState): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/types.d.ts
|
||||
type Counts = {
|
||||
files: number;
|
||||
directories: number;
|
||||
/**
|
||||
* @deprecated use `directories` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dirs: number;
|
||||
};
|
||||
type Group = {
|
||||
directory: string;
|
||||
files: string[];
|
||||
/**
|
||||
* @deprecated use `directory` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dir: string;
|
||||
};
|
||||
type GroupOutput = Group[];
|
||||
type OnlyCountsOutput = Counts;
|
||||
type PathsOutput = string[];
|
||||
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
|
||||
type FSLike = {
|
||||
readdir: typeof nativeFs.readdir;
|
||||
readdirSync: typeof nativeFs.readdirSync;
|
||||
realpath: typeof nativeFs.realpath;
|
||||
realpathSync: typeof nativeFs.realpathSync;
|
||||
stat: typeof nativeFs.stat;
|
||||
statSync: typeof nativeFs.statSync;
|
||||
};
|
||||
type WalkerState = {
|
||||
root: string;
|
||||
paths: string[];
|
||||
groups: Group[];
|
||||
counts: Counts;
|
||||
options: Options;
|
||||
queue: Queue;
|
||||
controller: Aborter;
|
||||
fs: FSLike;
|
||||
symlinks: Map<string, string>;
|
||||
visited: string[];
|
||||
};
|
||||
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
|
||||
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
|
||||
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
|
||||
type PathSeparator = "/" | "\\";
|
||||
type Options<TGlobFunction = unknown> = {
|
||||
includeBasePath?: boolean;
|
||||
includeDirs?: boolean;
|
||||
normalizePath?: boolean;
|
||||
maxDepth: number;
|
||||
maxFiles?: number;
|
||||
resolvePaths?: boolean;
|
||||
suppressErrors: boolean;
|
||||
group?: boolean;
|
||||
onlyCounts?: boolean;
|
||||
filters: FilterPredicate[];
|
||||
resolveSymlinks?: boolean;
|
||||
useRealPaths?: boolean;
|
||||
excludeFiles?: boolean;
|
||||
excludeSymlinks?: boolean;
|
||||
exclude?: ExcludePredicate;
|
||||
relativePaths?: boolean;
|
||||
pathSeparator: PathSeparator;
|
||||
signal?: AbortSignal;
|
||||
globFunction?: TGlobFunction;
|
||||
fs?: FSLike;
|
||||
};
|
||||
type GlobMatcher = (test: string) => boolean;
|
||||
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
|
||||
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.d.ts
|
||||
declare class APIBuilder<TReturnType extends Output> {
|
||||
private readonly root;
|
||||
private readonly options;
|
||||
constructor(root: string, options: Options);
|
||||
withPromise(): Promise<TReturnType>;
|
||||
withCallback(cb: ResultCallback<TReturnType>): void;
|
||||
sync(): TReturnType;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/builder/index.d.ts
|
||||
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
|
||||
private readonly globCache;
|
||||
private options;
|
||||
private globFunction?;
|
||||
constructor(options?: Partial<Options<TGlobFunction>>);
|
||||
group(): Builder<GroupOutput, TGlobFunction>;
|
||||
withPathSeparator(separator: "/" | "\\"): this;
|
||||
withBasePath(): this;
|
||||
withRelativePaths(): this;
|
||||
withDirs(): this;
|
||||
withMaxDepth(depth: number): this;
|
||||
withMaxFiles(limit: number): this;
|
||||
withFullPaths(): this;
|
||||
withErrors(): this;
|
||||
withSymlinks({
|
||||
resolvePaths
|
||||
}?: {
|
||||
resolvePaths?: boolean | undefined;
|
||||
}): this;
|
||||
withAbortSignal(signal: AbortSignal): this;
|
||||
normalize(): this;
|
||||
filter(predicate: FilterPredicate): this;
|
||||
onlyDirs(): this;
|
||||
exclude(predicate: ExcludePredicate): this;
|
||||
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
|
||||
crawl(root?: string): APIBuilder<TReturnType>;
|
||||
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
|
||||
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
type Fdir = typeof Builder;
|
||||
//#endregion
|
||||
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };
|
||||
155
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.d.mts
generated
vendored
Normal file
155
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
/// <reference types="node" />
|
||||
import * as nativeFs from "fs";
|
||||
import picomatch from "picomatch";
|
||||
|
||||
//#region src/api/aborter.d.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
declare class Aborter {
|
||||
aborted: boolean;
|
||||
abort(): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/api/queue.d.ts
|
||||
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
declare class Queue {
|
||||
private onQueueEmpty?;
|
||||
count: number;
|
||||
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
|
||||
enqueue(): number;
|
||||
dequeue(error: Error | null, output: WalkerState): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/types.d.ts
|
||||
type Counts = {
|
||||
files: number;
|
||||
directories: number;
|
||||
/**
|
||||
* @deprecated use `directories` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dirs: number;
|
||||
};
|
||||
type Group = {
|
||||
directory: string;
|
||||
files: string[];
|
||||
/**
|
||||
* @deprecated use `directory` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dir: string;
|
||||
};
|
||||
type GroupOutput = Group[];
|
||||
type OnlyCountsOutput = Counts;
|
||||
type PathsOutput = string[];
|
||||
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
|
||||
type FSLike = {
|
||||
readdir: typeof nativeFs.readdir;
|
||||
readdirSync: typeof nativeFs.readdirSync;
|
||||
realpath: typeof nativeFs.realpath;
|
||||
realpathSync: typeof nativeFs.realpathSync;
|
||||
stat: typeof nativeFs.stat;
|
||||
statSync: typeof nativeFs.statSync;
|
||||
};
|
||||
type WalkerState = {
|
||||
root: string;
|
||||
paths: string[];
|
||||
groups: Group[];
|
||||
counts: Counts;
|
||||
options: Options;
|
||||
queue: Queue;
|
||||
controller: Aborter;
|
||||
fs: FSLike;
|
||||
symlinks: Map<string, string>;
|
||||
visited: string[];
|
||||
};
|
||||
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
|
||||
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
|
||||
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
|
||||
type PathSeparator = "/" | "\\";
|
||||
type Options<TGlobFunction = unknown> = {
|
||||
includeBasePath?: boolean;
|
||||
includeDirs?: boolean;
|
||||
normalizePath?: boolean;
|
||||
maxDepth: number;
|
||||
maxFiles?: number;
|
||||
resolvePaths?: boolean;
|
||||
suppressErrors: boolean;
|
||||
group?: boolean;
|
||||
onlyCounts?: boolean;
|
||||
filters: FilterPredicate[];
|
||||
resolveSymlinks?: boolean;
|
||||
useRealPaths?: boolean;
|
||||
excludeFiles?: boolean;
|
||||
excludeSymlinks?: boolean;
|
||||
exclude?: ExcludePredicate;
|
||||
relativePaths?: boolean;
|
||||
pathSeparator: PathSeparator;
|
||||
signal?: AbortSignal;
|
||||
globFunction?: TGlobFunction;
|
||||
fs?: FSLike;
|
||||
};
|
||||
type GlobMatcher = (test: string) => boolean;
|
||||
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
|
||||
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.d.ts
|
||||
declare class APIBuilder<TReturnType extends Output> {
|
||||
private readonly root;
|
||||
private readonly options;
|
||||
constructor(root: string, options: Options);
|
||||
withPromise(): Promise<TReturnType>;
|
||||
withCallback(cb: ResultCallback<TReturnType>): void;
|
||||
sync(): TReturnType;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/builder/index.d.ts
|
||||
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
|
||||
private readonly globCache;
|
||||
private options;
|
||||
private globFunction?;
|
||||
constructor(options?: Partial<Options<TGlobFunction>>);
|
||||
group(): Builder<GroupOutput, TGlobFunction>;
|
||||
withPathSeparator(separator: "/" | "\\"): this;
|
||||
withBasePath(): this;
|
||||
withRelativePaths(): this;
|
||||
withDirs(): this;
|
||||
withMaxDepth(depth: number): this;
|
||||
withMaxFiles(limit: number): this;
|
||||
withFullPaths(): this;
|
||||
withErrors(): this;
|
||||
withSymlinks({
|
||||
resolvePaths
|
||||
}?: {
|
||||
resolvePaths?: boolean | undefined;
|
||||
}): this;
|
||||
withAbortSignal(signal: AbortSignal): this;
|
||||
normalize(): this;
|
||||
filter(predicate: FilterPredicate): this;
|
||||
onlyDirs(): this;
|
||||
exclude(predicate: ExcludePredicate): this;
|
||||
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
|
||||
crawl(root?: string): APIBuilder<TReturnType>;
|
||||
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
|
||||
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
type Fdir = typeof Builder;
|
||||
//#endregion
|
||||
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };
|
||||
570
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.mjs
generated
vendored
Normal file
570
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,570 @@
|
||||
import { createRequire } from "module";
|
||||
import { basename, dirname, normalize, relative, resolve, sep } from "path";
|
||||
import * as nativeFs from "fs";
|
||||
|
||||
//#region rolldown:runtime
|
||||
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
||||
|
||||
//#endregion
|
||||
//#region src/utils.ts
|
||||
function cleanPath(path) {
|
||||
let normalized = normalize(path);
|
||||
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
||||
return normalized;
|
||||
}
|
||||
const SLASHES_REGEX = /[\\/]/g;
|
||||
function convertSlashes(path, separator) {
|
||||
return path.replace(SLASHES_REGEX, separator);
|
||||
}
|
||||
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
||||
function isRootDirectory(path) {
|
||||
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
|
||||
}
|
||||
function normalizePath(path, options) {
|
||||
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
||||
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
|
||||
if (resolvePaths) path = resolve(path);
|
||||
if (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);
|
||||
if (path === ".") return "";
|
||||
const needsSeperator = path[path.length - 1] !== pathSeparator;
|
||||
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/join-path.ts
|
||||
function joinPathWithBasePath(filename, directoryPath) {
|
||||
return directoryPath + filename;
|
||||
}
|
||||
function joinPathWithRelativePath(root, options) {
|
||||
return function(filename, directoryPath) {
|
||||
const sameRoot = directoryPath.startsWith(root);
|
||||
if (sameRoot) return directoryPath.slice(root.length) + filename;
|
||||
else return convertSlashes(relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
||||
};
|
||||
}
|
||||
function joinPath(filename) {
|
||||
return filename;
|
||||
}
|
||||
function joinDirectoryPath(filename, directoryPath, separator) {
|
||||
return directoryPath + filename + separator;
|
||||
}
|
||||
function build$7(root, options) {
|
||||
const { relativePaths, includeBasePath } = options;
|
||||
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-directory.ts
|
||||
function pushDirectoryWithRelativePath(root) {
|
||||
return function(directoryPath, paths) {
|
||||
paths.push(directoryPath.substring(root.length) || ".");
|
||||
};
|
||||
}
|
||||
function pushDirectoryFilterWithRelativePath(root) {
|
||||
return function(directoryPath, paths, filters) {
|
||||
const relativePath = directoryPath.substring(root.length) || ".";
|
||||
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
|
||||
};
|
||||
}
|
||||
const pushDirectory = (directoryPath, paths) => {
|
||||
paths.push(directoryPath || ".");
|
||||
};
|
||||
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
||||
const path = directoryPath || ".";
|
||||
if (filters.every((filter) => filter(path, true))) paths.push(path);
|
||||
};
|
||||
const empty$2 = () => {};
|
||||
function build$6(root, options) {
|
||||
const { includeDirs, filters, relativePaths } = options;
|
||||
if (!includeDirs) return empty$2;
|
||||
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
||||
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-file.ts
|
||||
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) counts.files++;
|
||||
};
|
||||
const pushFileFilter = (filename, paths, _counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
|
||||
};
|
||||
const pushFileCount = (_filename, _paths, counts, _filters) => {
|
||||
counts.files++;
|
||||
};
|
||||
const pushFile = (filename, paths) => {
|
||||
paths.push(filename);
|
||||
};
|
||||
const empty$1 = () => {};
|
||||
function build$5(options) {
|
||||
const { excludeFiles, filters, onlyCounts } = options;
|
||||
if (excludeFiles) return empty$1;
|
||||
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
||||
else if (onlyCounts) return pushFileCount;
|
||||
else return pushFile;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/get-array.ts
|
||||
const getArray = (paths) => {
|
||||
return paths;
|
||||
};
|
||||
const getArrayGroup = () => {
|
||||
return [""].slice(0, 0);
|
||||
};
|
||||
function build$4(options) {
|
||||
return options.group ? getArrayGroup : getArray;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/group-files.ts
|
||||
const groupFiles = (groups, directory, files) => {
|
||||
groups.push({
|
||||
directory,
|
||||
files,
|
||||
dir: directory
|
||||
});
|
||||
};
|
||||
const empty = () => {};
|
||||
function build$3(options) {
|
||||
return options.group ? groupFiles : empty;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/resolve-symlink.ts
|
||||
const resolveSymlinksAsync = function(path, state, callback$1) {
|
||||
const { queue, fs, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
fs.realpath(path, (error, resolvedPath) => {
|
||||
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
||||
fs.stat(resolvedPath, (error$1, stat) => {
|
||||
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
||||
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
|
||||
callback$1(stat, resolvedPath);
|
||||
queue.dequeue(null, state);
|
||||
});
|
||||
});
|
||||
};
|
||||
const resolveSymlinks = function(path, state, callback$1) {
|
||||
const { queue, fs, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
try {
|
||||
const resolvedPath = fs.realpathSync(path);
|
||||
const stat = fs.statSync(resolvedPath);
|
||||
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
|
||||
callback$1(stat, resolvedPath);
|
||||
} catch (e) {
|
||||
if (!suppressErrors) throw e;
|
||||
}
|
||||
};
|
||||
function build$2(options, isSynchronous) {
|
||||
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
||||
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
||||
}
|
||||
function isRecursive(path, resolved, state) {
|
||||
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
||||
let parent = dirname(path);
|
||||
let depth = 1;
|
||||
while (parent !== state.root && depth < 2) {
|
||||
const resolvedPath = state.symlinks.get(parent);
|
||||
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
||||
if (isSameRoot) depth++;
|
||||
else parent = dirname(parent);
|
||||
}
|
||||
state.symlinks.set(path, resolved);
|
||||
return depth > 1;
|
||||
}
|
||||
function isRecursiveUsingRealPaths(resolved, state) {
|
||||
return state.visited.includes(resolved + state.options.pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/invoke-callback.ts
|
||||
const onlyCountsSync = (state) => {
|
||||
return state.counts;
|
||||
};
|
||||
const groupsSync = (state) => {
|
||||
return state.groups;
|
||||
};
|
||||
const defaultSync = (state) => {
|
||||
return state.paths;
|
||||
};
|
||||
const limitFilesSync = (state) => {
|
||||
return state.paths.slice(0, state.options.maxFiles);
|
||||
};
|
||||
const onlyCountsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.counts, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const defaultAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const limitFilesAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const groupsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.groups, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
function report(error, callback$1, output, suppressErrors) {
|
||||
if (error && !suppressErrors) callback$1(error, output);
|
||||
else callback$1(null, output);
|
||||
}
|
||||
function build$1(options, isSynchronous) {
|
||||
const { onlyCounts, group, maxFiles } = options;
|
||||
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
||||
else if (group) return isSynchronous ? groupsSync : groupsAsync;
|
||||
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
||||
else return isSynchronous ? defaultSync : defaultAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/walk-directory.ts
|
||||
const readdirOpts = { withFileTypes: true };
|
||||
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
state.queue.enqueue();
|
||||
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
||||
const { fs } = state;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
fs.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
||||
});
|
||||
};
|
||||
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
const { fs } = state;
|
||||
if (currentDepth < 0) return;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
let entries = [];
|
||||
try {
|
||||
entries = fs.readdirSync(crawlPath || ".", readdirOpts);
|
||||
} catch (e) {
|
||||
if (!state.options.suppressErrors) throw e;
|
||||
}
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
};
|
||||
function build(isSynchronous) {
|
||||
return isSynchronous ? walkSync : walkAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/queue.ts
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
var Queue = class {
|
||||
count = 0;
|
||||
constructor(onQueueEmpty) {
|
||||
this.onQueueEmpty = onQueueEmpty;
|
||||
}
|
||||
enqueue() {
|
||||
this.count++;
|
||||
return this.count;
|
||||
}
|
||||
dequeue(error, output) {
|
||||
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
||||
this.onQueueEmpty(error, output);
|
||||
if (error) {
|
||||
output.controller.abort();
|
||||
this.onQueueEmpty = void 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/counter.ts
|
||||
var Counter = class {
|
||||
_files = 0;
|
||||
_directories = 0;
|
||||
set files(num) {
|
||||
this._files = num;
|
||||
}
|
||||
get files() {
|
||||
return this._files;
|
||||
}
|
||||
set directories(num) {
|
||||
this._directories = num;
|
||||
}
|
||||
get directories() {
|
||||
return this._directories;
|
||||
}
|
||||
/**
|
||||
* @deprecated use `directories` instead
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
get dirs() {
|
||||
return this._directories;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/aborter.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
var Aborter = class {
|
||||
aborted = false;
|
||||
abort() {
|
||||
this.aborted = true;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/walker.ts
|
||||
var Walker = class {
|
||||
root;
|
||||
isSynchronous;
|
||||
state;
|
||||
joinPath;
|
||||
pushDirectory;
|
||||
pushFile;
|
||||
getArray;
|
||||
groupFiles;
|
||||
resolveSymlink;
|
||||
walkDirectory;
|
||||
callbackInvoker;
|
||||
constructor(root, options, callback$1) {
|
||||
this.isSynchronous = !callback$1;
|
||||
this.callbackInvoker = build$1(options, this.isSynchronous);
|
||||
this.root = normalizePath(root, options);
|
||||
this.state = {
|
||||
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
||||
paths: [""].slice(0, 0),
|
||||
groups: [],
|
||||
counts: new Counter(),
|
||||
options,
|
||||
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
|
||||
symlinks: /* @__PURE__ */ new Map(),
|
||||
visited: [""].slice(0, 0),
|
||||
controller: new Aborter(),
|
||||
fs: options.fs || nativeFs
|
||||
};
|
||||
this.joinPath = build$7(this.root, options);
|
||||
this.pushDirectory = build$6(this.root, options);
|
||||
this.pushFile = build$5(options);
|
||||
this.getArray = build$4(options);
|
||||
this.groupFiles = build$3(options);
|
||||
this.resolveSymlink = build$2(options, this.isSynchronous);
|
||||
this.walkDirectory = build(this.isSynchronous);
|
||||
}
|
||||
start() {
|
||||
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
||||
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
||||
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
||||
}
|
||||
walk = (entries, directoryPath, depth) => {
|
||||
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
||||
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
||||
const files = this.getArray(this.state.paths);
|
||||
for (let i = 0; i < entries.length; ++i) {
|
||||
const entry = entries[i];
|
||||
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
||||
const filename = this.joinPath(entry.name, directoryPath);
|
||||
this.pushFile(filename, files, this.state.counts, filters);
|
||||
} else if (entry.isDirectory()) {
|
||||
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
||||
if (exclude && exclude(entry.name, path)) continue;
|
||||
this.pushDirectory(path, paths, filters);
|
||||
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
|
||||
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
||||
let path = joinPathWithBasePath(entry.name, directoryPath);
|
||||
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
|
||||
if (stat.isDirectory()) {
|
||||
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
||||
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
|
||||
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
||||
} else {
|
||||
resolvedPath = useRealPaths ? resolvedPath : path;
|
||||
const filename = basename(resolvedPath);
|
||||
const directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
|
||||
resolvedPath = this.joinPath(filename, directoryPath$1);
|
||||
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.groupFiles(this.state.groups, directoryPath, files);
|
||||
};
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/async.ts
|
||||
function promise(root, options) {
|
||||
return new Promise((resolve$1, reject) => {
|
||||
callback(root, options, (err, output) => {
|
||||
if (err) return reject(err);
|
||||
resolve$1(output);
|
||||
});
|
||||
});
|
||||
}
|
||||
function callback(root, options, callback$1) {
|
||||
let walker = new Walker(root, options, callback$1);
|
||||
walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/sync.ts
|
||||
function sync(root, options) {
|
||||
const walker = new Walker(root, options);
|
||||
return walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.ts
|
||||
var APIBuilder = class {
|
||||
constructor(root, options) {
|
||||
this.root = root;
|
||||
this.options = options;
|
||||
}
|
||||
withPromise() {
|
||||
return promise(this.root, this.options);
|
||||
}
|
||||
withCallback(cb) {
|
||||
callback(this.root, this.options, cb);
|
||||
}
|
||||
sync() {
|
||||
return sync(this.root, this.options);
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/index.ts
|
||||
let pm = null;
|
||||
/* c8 ignore next 6 */
|
||||
try {
|
||||
__require.resolve("picomatch");
|
||||
pm = __require("picomatch");
|
||||
} catch {}
|
||||
var Builder = class {
|
||||
globCache = {};
|
||||
options = {
|
||||
maxDepth: Infinity,
|
||||
suppressErrors: true,
|
||||
pathSeparator: sep,
|
||||
filters: []
|
||||
};
|
||||
globFunction;
|
||||
constructor(options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
this.globFunction = this.options.globFunction;
|
||||
}
|
||||
group() {
|
||||
this.options.group = true;
|
||||
return this;
|
||||
}
|
||||
withPathSeparator(separator) {
|
||||
this.options.pathSeparator = separator;
|
||||
return this;
|
||||
}
|
||||
withBasePath() {
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withRelativePaths() {
|
||||
this.options.relativePaths = true;
|
||||
return this;
|
||||
}
|
||||
withDirs() {
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
withMaxDepth(depth) {
|
||||
this.options.maxDepth = depth;
|
||||
return this;
|
||||
}
|
||||
withMaxFiles(limit) {
|
||||
this.options.maxFiles = limit;
|
||||
return this;
|
||||
}
|
||||
withFullPaths() {
|
||||
this.options.resolvePaths = true;
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withErrors() {
|
||||
this.options.suppressErrors = false;
|
||||
return this;
|
||||
}
|
||||
withSymlinks({ resolvePaths = true } = {}) {
|
||||
this.options.resolveSymlinks = true;
|
||||
this.options.useRealPaths = resolvePaths;
|
||||
return this.withFullPaths();
|
||||
}
|
||||
withAbortSignal(signal) {
|
||||
this.options.signal = signal;
|
||||
return this;
|
||||
}
|
||||
normalize() {
|
||||
this.options.normalizePath = true;
|
||||
return this;
|
||||
}
|
||||
filter(predicate) {
|
||||
this.options.filters.push(predicate);
|
||||
return this;
|
||||
}
|
||||
onlyDirs() {
|
||||
this.options.excludeFiles = true;
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
exclude(predicate) {
|
||||
this.options.exclude = predicate;
|
||||
return this;
|
||||
}
|
||||
onlyCounts() {
|
||||
this.options.onlyCounts = true;
|
||||
return this;
|
||||
}
|
||||
crawl(root) {
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
withGlobFunction(fn) {
|
||||
this.globFunction = fn;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
/* c8 ignore next 4 */
|
||||
crawlWithOptions(root, options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
glob(...patterns) {
|
||||
if (this.globFunction) return this.globWithOptions(patterns);
|
||||
return this.globWithOptions(patterns, ...[{ dot: true }]);
|
||||
}
|
||||
globWithOptions(patterns, ...options) {
|
||||
const globFn = this.globFunction || pm;
|
||||
/* c8 ignore next 5 */
|
||||
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
||||
var isMatch = this.globCache[patterns.join("\0")];
|
||||
if (!isMatch) {
|
||||
isMatch = globFn(patterns, ...options);
|
||||
this.globCache[patterns.join("\0")] = isMatch;
|
||||
}
|
||||
this.options.filters.push((path) => isMatch(path));
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
export { Builder as fdir };
|
||||
103
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/package.json
generated
vendored
Normal file
103
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/fdir/package.json
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
{
|
||||
"name": "fdir",
|
||||
"version": "6.5.0",
|
||||
"description": "The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s",
|
||||
"main": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run test && npm run build",
|
||||
"build": "tsdown",
|
||||
"format": "prettier --write src __tests__ benchmarks",
|
||||
"test": "vitest run __tests__/",
|
||||
"test:coverage": "vitest run --coverage __tests__/",
|
||||
"test:watch": "vitest __tests__/",
|
||||
"bench": "ts-node benchmarks/benchmark.js",
|
||||
"bench:glob": "ts-node benchmarks/glob-benchmark.ts",
|
||||
"bench:fdir": "ts-node benchmarks/fdir-benchmark.ts",
|
||||
"release": "./scripts/release.sh"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/thecodrr/fdir.git"
|
||||
},
|
||||
"keywords": [
|
||||
"util",
|
||||
"os",
|
||||
"sys",
|
||||
"fs",
|
||||
"walk",
|
||||
"crawler",
|
||||
"directory",
|
||||
"files",
|
||||
"io",
|
||||
"tiny-glob",
|
||||
"glob",
|
||||
"fast-glob",
|
||||
"speed",
|
||||
"javascript",
|
||||
"nodejs"
|
||||
],
|
||||
"author": "thecodrr <thecodrr@protonmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/thecodrr/fdir/issues"
|
||||
},
|
||||
"homepage": "https://github.com/thecodrr/fdir#readme",
|
||||
"devDependencies": {
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/mock-fs": "^4.13.4",
|
||||
"@types/node": "^20.9.4",
|
||||
"@types/picomatch": "^4.0.0",
|
||||
"@types/tap": "^15.0.11",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"all-files-in-tree": "^1.1.2",
|
||||
"benny": "^3.7.1",
|
||||
"csv-to-markdown-table": "^1.3.1",
|
||||
"expect": "^29.7.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"fdir1": "npm:fdir@1.2.0",
|
||||
"fdir2": "npm:fdir@2.1.0",
|
||||
"fdir3": "npm:fdir@3.4.2",
|
||||
"fdir4": "npm:fdir@4.1.0",
|
||||
"fdir5": "npm:fdir@5.0.0",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"get-all-files": "^4.1.0",
|
||||
"glob": "^10.3.10",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"mock-fs": "^5.2.0",
|
||||
"picomatch": "^4.0.2",
|
||||
"prettier": "^3.5.3",
|
||||
"recur-readdir": "0.0.1",
|
||||
"recursive-files": "^1.0.2",
|
||||
"recursive-fs": "^2.1.0",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"rrdir": "^12.1.0",
|
||||
"systeminformation": "^5.21.17",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsdown": "^0.12.5",
|
||||
"typescript": "^5.3.2",
|
||||
"vitest": "^0.34.6",
|
||||
"walk-sync": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"module": "./dist/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
21
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/LICENSE
generated
vendored
Normal file
21
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
738
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/README.md
generated
vendored
Normal file
738
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/README.md
generated
vendored
Normal file
@ -0,0 +1,738 @@
|
||||
<h1 align="center">Picomatch</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://npmjs.org/package/picomatch">
|
||||
<img src="https://img.shields.io/npm/v/picomatch.svg" alt="version">
|
||||
</a>
|
||||
<a href="https://github.com/micromatch/picomatch/actions?workflow=Tests">
|
||||
<img src="https://github.com/micromatch/picomatch/workflows/Tests/badge.svg" alt="test status">
|
||||
</a>
|
||||
<a href="https://coveralls.io/github/micromatch/picomatch">
|
||||
<img src="https://img.shields.io/coveralls/github/micromatch/picomatch/master.svg" alt="coverage status">
|
||||
</a>
|
||||
<a href="https://npmjs.org/package/picomatch">
|
||||
<img src="https://img.shields.io/npm/dm/picomatch.svg" alt="downloads">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<p align="center">
|
||||
<strong>Blazing fast and accurate glob matcher written in JavaScript.</strong></br>
|
||||
<em>No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.</em>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Why picomatch?
|
||||
|
||||
* **Lightweight** - No dependencies
|
||||
* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
|
||||
* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
|
||||
* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
|
||||
* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
|
||||
* **Well tested** - Thousands of unit tests
|
||||
|
||||
See the [library comparison](#library-comparisons) to other libraries.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Table of Contents
|
||||
|
||||
<details><summary> Click to expand </summary>
|
||||
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [API](#api)
|
||||
* [picomatch](#picomatch)
|
||||
* [.test](#test)
|
||||
* [.matchBase](#matchbase)
|
||||
* [.isMatch](#ismatch)
|
||||
* [.parse](#parse)
|
||||
* [.scan](#scan)
|
||||
* [.compileRe](#compilere)
|
||||
* [.makeRe](#makere)
|
||||
* [.toRegex](#toregex)
|
||||
- [Options](#options)
|
||||
* [Picomatch options](#picomatch-options)
|
||||
* [Scan Options](#scan-options)
|
||||
* [Options Examples](#options-examples)
|
||||
- [Globbing features](#globbing-features)
|
||||
* [Basic globbing](#basic-globbing)
|
||||
* [Advanced globbing](#advanced-globbing)
|
||||
* [Braces](#braces)
|
||||
* [Matching special characters as literals](#matching-special-characters-as-literals)
|
||||
- [Library Comparisons](#library-comparisons)
|
||||
- [Benchmarks](#benchmarks)
|
||||
- [Philosophies](#philosophies)
|
||||
- [About](#about)
|
||||
* [Author](#author)
|
||||
* [License](#license)
|
||||
|
||||
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
|
||||
|
||||
</details>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
npm install --save picomatch
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Usage
|
||||
|
||||
The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
|
||||
|
||||
```js
|
||||
const pm = require('picomatch');
|
||||
const isMatch = pm('*.js');
|
||||
|
||||
console.log(isMatch('abcd')); //=> false
|
||||
console.log(isMatch('a.js')); //=> true
|
||||
console.log(isMatch('a.md')); //=> false
|
||||
console.log(isMatch('a/b.js')); //=> false
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## API
|
||||
|
||||
### [picomatch](lib/picomatch.js#L31)
|
||||
|
||||
Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
|
||||
|
||||
**Params**
|
||||
|
||||
* `globs` **{String|Array}**: One or more glob patterns.
|
||||
* `options` **{Object=}**
|
||||
* `returns` **{Function=}**: Returns a matcher function.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch(glob[, options]);
|
||||
|
||||
const isMatch = picomatch('*.!(*a)');
|
||||
console.log(isMatch('a.a')); //=> false
|
||||
console.log(isMatch('a.b')); //=> true
|
||||
```
|
||||
|
||||
**Example without node.js**
|
||||
|
||||
For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch/posix');
|
||||
// the same API, defaulting to posix paths
|
||||
const isMatch = picomatch('a/*');
|
||||
console.log(isMatch('a\\b')); //=> false
|
||||
console.log(isMatch('a/b')); //=> true
|
||||
|
||||
// you can still configure the matcher function to accept windows paths
|
||||
const isMatch = picomatch('a/*', { options: windows });
|
||||
console.log(isMatch('a\\b')); //=> true
|
||||
console.log(isMatch('a/b')); //=> true
|
||||
```
|
||||
|
||||
### [.test](lib/picomatch.js#L116)
|
||||
|
||||
Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
|
||||
|
||||
**Params**
|
||||
|
||||
* `input` **{String}**: String to test.
|
||||
* `regex` **{RegExp}**
|
||||
* `returns` **{Object}**: Returns an object with matching info.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch.test(input, regex[, options]);
|
||||
|
||||
console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
|
||||
// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
|
||||
```
|
||||
|
||||
### [.matchBase](lib/picomatch.js#L160)
|
||||
|
||||
Match the basename of a filepath.
|
||||
|
||||
**Params**
|
||||
|
||||
* `input` **{String}**: String to test.
|
||||
* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
|
||||
* `returns` **{Boolean}**
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch.matchBase(input, glob[, options]);
|
||||
console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
|
||||
```
|
||||
|
||||
### [.isMatch](lib/picomatch.js#L182)
|
||||
|
||||
Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
|
||||
**Params**
|
||||
|
||||
* **{String|Array}**: str The string to test.
|
||||
* **{String|Array}**: patterns One or more glob patterns to use for matching.
|
||||
* **{Object}**: See available [options](#options).
|
||||
* `returns` **{Boolean}**: Returns true if any patterns match `str`
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch.isMatch(string, patterns[, options]);
|
||||
|
||||
console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
||||
console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
|
||||
```
|
||||
|
||||
### [.parse](lib/picomatch.js#L198)
|
||||
|
||||
Parse a glob pattern to create the source string for a regular expression.
|
||||
|
||||
**Params**
|
||||
|
||||
* `pattern` **{String}**
|
||||
* `options` **{Object}**
|
||||
* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
const result = picomatch.parse(pattern[, options]);
|
||||
```
|
||||
|
||||
### [.scan](lib/picomatch.js#L230)
|
||||
|
||||
Scan a glob pattern to separate the pattern into segments.
|
||||
|
||||
**Params**
|
||||
|
||||
* `input` **{String}**: Glob pattern to scan.
|
||||
* `options` **{Object}**
|
||||
* `returns` **{Object}**: Returns an object with
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch.scan(input[, options]);
|
||||
|
||||
const result = picomatch.scan('!./foo/*.js');
|
||||
console.log(result);
|
||||
{ prefix: '!./',
|
||||
input: '!./foo/*.js',
|
||||
start: 3,
|
||||
base: 'foo',
|
||||
glob: '*.js',
|
||||
isBrace: false,
|
||||
isBracket: false,
|
||||
isGlob: true,
|
||||
isExtglob: false,
|
||||
isGlobstar: false,
|
||||
negated: true }
|
||||
```
|
||||
|
||||
### [.compileRe](lib/picomatch.js#L244)
|
||||
|
||||
Compile a regular expression from the `state` object returned by the
|
||||
[parse()](#parse) method.
|
||||
|
||||
**Params**
|
||||
|
||||
* `state` **{Object}**
|
||||
* `options` **{Object}**
|
||||
* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
|
||||
* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
|
||||
* `returns` **{RegExp}**
|
||||
|
||||
### [.makeRe](lib/picomatch.js#L285)
|
||||
|
||||
Create a regular expression from a parsed glob pattern.
|
||||
|
||||
**Params**
|
||||
|
||||
* `state` **{String}**: The object returned from the `.parse` method.
|
||||
* `options` **{Object}**
|
||||
* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
|
||||
* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
|
||||
* `returns` **{RegExp}**: Returns a regex created from the given pattern.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
const state = picomatch.parse('*.js');
|
||||
// picomatch.compileRe(state[, options]);
|
||||
|
||||
console.log(picomatch.compileRe(state));
|
||||
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
||||
```
|
||||
|
||||
### [.toRegex](lib/picomatch.js#L320)
|
||||
|
||||
Create a regular expression from the given regex source string.
|
||||
|
||||
**Params**
|
||||
|
||||
* `source` **{String}**: Regular expression source string.
|
||||
* `options` **{Object}**
|
||||
* `returns` **{RegExp}**
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
// picomatch.toRegex(source[, options]);
|
||||
|
||||
const { output } = picomatch.parse('*.js');
|
||||
console.log(picomatch.toRegex(output));
|
||||
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Options
|
||||
|
||||
### Picomatch options
|
||||
|
||||
The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
|
||||
|
||||
| **Option** | **Type** | **Default value** | **Description** |
|
||||
| --- | --- | --- | --- |
|
||||
| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
|
||||
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
|
||||
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
|
||||
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
|
||||
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
|
||||
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
|
||||
| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
|
||||
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
|
||||
| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
|
||||
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
|
||||
| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
|
||||
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
|
||||
| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
|
||||
| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
|
||||
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
|
||||
| `matchBase` | `boolean` | `false` | Alias for `basename` |
|
||||
| `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
|
||||
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
|
||||
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
|
||||
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
|
||||
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
|
||||
| `noext` | `boolean` | `false` | Alias for `noextglob` |
|
||||
| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
|
||||
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
|
||||
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
|
||||
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
|
||||
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
|
||||
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
|
||||
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
|
||||
| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
|
||||
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
|
||||
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
|
||||
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
|
||||
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
|
||||
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
|
||||
| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
|
||||
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
|
||||
| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
|
||||
|
||||
### Scan Options
|
||||
|
||||
In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
|
||||
|
||||
| **Option** | **Type** | **Default value** | **Description** |
|
||||
| --- | --- | --- | --- |
|
||||
| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
|
||||
| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch');
|
||||
const result = picomatch.scan('!./foo/*.js', { tokens: true });
|
||||
console.log(result);
|
||||
// {
|
||||
// prefix: '!./',
|
||||
// input: '!./foo/*.js',
|
||||
// start: 3,
|
||||
// base: 'foo',
|
||||
// glob: '*.js',
|
||||
// isBrace: false,
|
||||
// isBracket: false,
|
||||
// isGlob: true,
|
||||
// isExtglob: false,
|
||||
// isGlobstar: false,
|
||||
// negated: true,
|
||||
// maxDepth: 2,
|
||||
// tokens: [
|
||||
// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
|
||||
// { value: 'foo', depth: 1, isGlob: false },
|
||||
// { value: '*.js', depth: 1, isGlob: true }
|
||||
// ],
|
||||
// slashes: [ 2, 6 ],
|
||||
// parts: [ 'foo', '*.js' ]
|
||||
// }
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### Options Examples
|
||||
|
||||
#### options.expandRange
|
||||
|
||||
**Type**: `function`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
|
||||
|
||||
**Example**
|
||||
|
||||
The following example shows how to create a glob that matches a folder
|
||||
|
||||
```js
|
||||
const fill = require('fill-range');
|
||||
const regex = pm.makeRe('foo/{01..25}/bar', {
|
||||
expandRange(a, b) {
|
||||
return `(${fill(a, b, { toRegex: true })})`;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(regex);
|
||||
//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
|
||||
|
||||
console.log(regex.test('foo/00/bar')) // false
|
||||
console.log(regex.test('foo/01/bar')) // true
|
||||
console.log(regex.test('foo/10/bar')) // true
|
||||
console.log(regex.test('foo/22/bar')) // true
|
||||
console.log(regex.test('foo/25/bar')) // true
|
||||
console.log(regex.test('foo/26/bar')) // false
|
||||
```
|
||||
|
||||
#### options.format
|
||||
|
||||
**Type**: `function`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Custom function for formatting strings before they're matched.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
// strip leading './' from strings
|
||||
const format = str => str.replace(/^\.\//, '');
|
||||
const isMatch = picomatch('foo/*.js', { format });
|
||||
console.log(isMatch('./foo/bar.js')); //=> true
|
||||
```
|
||||
|
||||
#### options.onMatch
|
||||
|
||||
```js
|
||||
const onMatch = ({ glob, regex, input, output }) => {
|
||||
console.log({ glob, regex, input, output });
|
||||
};
|
||||
|
||||
const isMatch = picomatch('*', { onMatch });
|
||||
isMatch('foo');
|
||||
isMatch('bar');
|
||||
isMatch('baz');
|
||||
```
|
||||
|
||||
#### options.onIgnore
|
||||
|
||||
```js
|
||||
const onIgnore = ({ glob, regex, input, output }) => {
|
||||
console.log({ glob, regex, input, output });
|
||||
};
|
||||
|
||||
const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
|
||||
isMatch('foo');
|
||||
isMatch('bar');
|
||||
isMatch('baz');
|
||||
```
|
||||
|
||||
#### options.onResult
|
||||
|
||||
```js
|
||||
const onResult = ({ glob, regex, input, output }) => {
|
||||
console.log({ glob, regex, input, output });
|
||||
};
|
||||
|
||||
const isMatch = picomatch('*', { onResult, ignore: 'f*' });
|
||||
isMatch('foo');
|
||||
isMatch('bar');
|
||||
isMatch('baz');
|
||||
```
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Globbing features
|
||||
|
||||
* [Basic globbing](#basic-globbing) (Wildcard matching)
|
||||
* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
|
||||
|
||||
### Basic globbing
|
||||
|
||||
| **Character** | **Description** |
|
||||
| --- | --- |
|
||||
| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
|
||||
| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` with the `windows` option) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
|
||||
| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
|
||||
| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
|
||||
|
||||
#### Matching behavior vs. Bash
|
||||
|
||||
Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
|
||||
|
||||
* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
|
||||
* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
|
||||
|
||||
<br>
|
||||
|
||||
### Advanced globbing
|
||||
|
||||
* [extglobs](#extglobs)
|
||||
* [POSIX brackets](#posix-brackets)
|
||||
* [Braces](#brace-expansion)
|
||||
|
||||
#### Extglobs
|
||||
|
||||
| **Pattern** | **Description** |
|
||||
| --- | --- |
|
||||
| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
|
||||
| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
|
||||
| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
|
||||
| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
|
||||
| `!(pattern)` | Match _anything but_ `pattern` |
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
const pm = require('picomatch');
|
||||
|
||||
// *(pattern) matches ZERO or more of "pattern"
|
||||
console.log(pm.isMatch('a', 'a*(z)')); // true
|
||||
console.log(pm.isMatch('az', 'a*(z)')); // true
|
||||
console.log(pm.isMatch('azzz', 'a*(z)')); // true
|
||||
|
||||
// +(pattern) matches ONE or more of "pattern"
|
||||
console.log(pm.isMatch('a', 'a+(z)')); // false
|
||||
console.log(pm.isMatch('az', 'a+(z)')); // true
|
||||
console.log(pm.isMatch('azzz', 'a+(z)')); // true
|
||||
|
||||
// supports multiple extglobs
|
||||
console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
|
||||
|
||||
// supports nested extglobs
|
||||
console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
|
||||
```
|
||||
|
||||
#### POSIX brackets
|
||||
|
||||
POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
|
||||
|
||||
**Enable POSIX bracket support**
|
||||
|
||||
```js
|
||||
console.log(pm.makeRe('[[:word:]]+', { posix: true }));
|
||||
//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
|
||||
```
|
||||
|
||||
**Supported POSIX classes**
|
||||
|
||||
The following named POSIX bracket expressions are supported:
|
||||
|
||||
* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
|
||||
* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
|
||||
* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
|
||||
* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
|
||||
* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
|
||||
* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
|
||||
* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
|
||||
* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
|
||||
* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
|
||||
* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
|
||||
* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
|
||||
* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
|
||||
* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
|
||||
* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
|
||||
|
||||
See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
|
||||
|
||||
### Braces
|
||||
|
||||
Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
|
||||
|
||||
### Matching special characters as literals
|
||||
|
||||
If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
|
||||
|
||||
**Special Characters**
|
||||
|
||||
Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
|
||||
|
||||
To match any of the following characters as literals: `$^*+?()[]
|
||||
|
||||
Examples:
|
||||
|
||||
```js
|
||||
console.log(pm.makeRe('foo/bar \\(1\\)'));
|
||||
console.log(pm.makeRe('foo/bar \\(1\\)'));
|
||||
```
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Library Comparisons
|
||||
|
||||
The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
|
||||
|
||||
| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
|
||||
| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - |
|
||||
| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - |
|
||||
| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - |
|
||||
| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - |
|
||||
| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ |
|
||||
| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
|
||||
| File system operations | - | - | - | - | - | - | - |
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Benchmarks
|
||||
|
||||
Performance comparison of picomatch and minimatch.
|
||||
|
||||
_(Pay special attention to the last three benchmarks. Minimatch freezes on long ranges.)_
|
||||
|
||||
```
|
||||
# .makeRe star (*)
|
||||
picomatch x 4,449,159 ops/sec ±0.24% (97 runs sampled)
|
||||
minimatch x 632,772 ops/sec ±0.14% (98 runs sampled)
|
||||
|
||||
# .makeRe star; dot=true (*)
|
||||
picomatch x 3,500,079 ops/sec ±0.26% (99 runs sampled)
|
||||
minimatch x 564,916 ops/sec ±0.23% (96 runs sampled)
|
||||
|
||||
# .makeRe globstar (**)
|
||||
picomatch x 3,261,000 ops/sec ±0.27% (98 runs sampled)
|
||||
minimatch x 1,664,766 ops/sec ±0.20% (100 runs sampled)
|
||||
|
||||
# .makeRe globstars (**/**/**)
|
||||
picomatch x 3,284,469 ops/sec ±0.18% (97 runs sampled)
|
||||
minimatch x 1,435,880 ops/sec ±0.34% (95 runs sampled)
|
||||
|
||||
# .makeRe with leading star (*.txt)
|
||||
picomatch x 3,100,197 ops/sec ±0.35% (99 runs sampled)
|
||||
minimatch x 428,347 ops/sec ±0.42% (94 runs sampled)
|
||||
|
||||
# .makeRe - basic braces ({a,b,c}*.txt)
|
||||
picomatch x 443,578 ops/sec ±1.33% (89 runs sampled)
|
||||
minimatch x 107,143 ops/sec ±0.35% (94 runs sampled)
|
||||
|
||||
# .makeRe - short ranges ({a..z}*.txt)
|
||||
picomatch x 415,484 ops/sec ±0.76% (96 runs sampled)
|
||||
minimatch x 14,299 ops/sec ±0.26% (96 runs sampled)
|
||||
|
||||
# .makeRe - medium ranges ({1..100000}*.txt)
|
||||
picomatch x 395,020 ops/sec ±0.87% (89 runs sampled)
|
||||
minimatch x 2 ops/sec ±4.59% (10 runs sampled)
|
||||
|
||||
# .makeRe - long ranges ({1..10000000}*.txt)
|
||||
picomatch x 400,036 ops/sec ±0.83% (90 runs sampled)
|
||||
minimatch (FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory)
|
||||
```
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Philosophies
|
||||
|
||||
The goal of this library is to be blazing fast, without compromising on accuracy.
|
||||
|
||||
**Accuracy**
|
||||
|
||||
The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
|
||||
|
||||
Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
|
||||
|
||||
**Performance**
|
||||
|
||||
Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
17
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/index.js
generated
vendored
Normal file
17
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const pico = require('./lib/picomatch');
|
||||
const utils = require('./lib/utils');
|
||||
|
||||
function picomatch(glob, options, returnState = false) {
|
||||
// default to os.platform()
|
||||
if (options && (options.windows === null || options.windows === undefined)) {
|
||||
// don't mutate the original options object
|
||||
options = { ...options, windows: utils.isWindows() };
|
||||
}
|
||||
|
||||
return pico(glob, options, returnState);
|
||||
}
|
||||
|
||||
Object.assign(picomatch, pico);
|
||||
module.exports = picomatch;
|
||||
180
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/constants.js
generated
vendored
Normal file
180
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/constants.js
generated
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
'use strict';
|
||||
|
||||
const WIN_SLASH = '\\\\/';
|
||||
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
||||
|
||||
/**
|
||||
* Posix glob regex
|
||||
*/
|
||||
|
||||
const DOT_LITERAL = '\\.';
|
||||
const PLUS_LITERAL = '\\+';
|
||||
const QMARK_LITERAL = '\\?';
|
||||
const SLASH_LITERAL = '\\/';
|
||||
const ONE_CHAR = '(?=.)';
|
||||
const QMARK = '[^/]';
|
||||
const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
||||
const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
||||
const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
||||
const NO_DOT = `(?!${DOT_LITERAL})`;
|
||||
const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
|
||||
const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
|
||||
const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
||||
const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
||||
const STAR = `${QMARK}*?`;
|
||||
const SEP = '/';
|
||||
|
||||
const POSIX_CHARS = {
|
||||
DOT_LITERAL,
|
||||
PLUS_LITERAL,
|
||||
QMARK_LITERAL,
|
||||
SLASH_LITERAL,
|
||||
ONE_CHAR,
|
||||
QMARK,
|
||||
END_ANCHOR,
|
||||
DOTS_SLASH,
|
||||
NO_DOT,
|
||||
NO_DOTS,
|
||||
NO_DOT_SLASH,
|
||||
NO_DOTS_SLASH,
|
||||
QMARK_NO_DOT,
|
||||
STAR,
|
||||
START_ANCHOR,
|
||||
SEP
|
||||
};
|
||||
|
||||
/**
|
||||
* Windows glob regex
|
||||
*/
|
||||
|
||||
const WINDOWS_CHARS = {
|
||||
...POSIX_CHARS,
|
||||
|
||||
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
||||
QMARK: WIN_NO_SLASH,
|
||||
STAR: `${WIN_NO_SLASH}*?`,
|
||||
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
|
||||
NO_DOT: `(?!${DOT_LITERAL})`,
|
||||
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
||||
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
|
||||
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
||||
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
||||
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
||||
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
||||
SEP: '\\'
|
||||
};
|
||||
|
||||
/**
|
||||
* POSIX Bracket Regex
|
||||
*/
|
||||
|
||||
const POSIX_REGEX_SOURCE = {
|
||||
alnum: 'a-zA-Z0-9',
|
||||
alpha: 'a-zA-Z',
|
||||
ascii: '\\x00-\\x7F',
|
||||
blank: ' \\t',
|
||||
cntrl: '\\x00-\\x1F\\x7F',
|
||||
digit: '0-9',
|
||||
graph: '\\x21-\\x7E',
|
||||
lower: 'a-z',
|
||||
print: '\\x20-\\x7E ',
|
||||
punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
|
||||
space: ' \\t\\r\\n\\v\\f',
|
||||
upper: 'A-Z',
|
||||
word: 'A-Za-z0-9_',
|
||||
xdigit: 'A-Fa-f0-9'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
MAX_LENGTH: 1024 * 64,
|
||||
POSIX_REGEX_SOURCE,
|
||||
|
||||
// regular expressions
|
||||
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
||||
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
||||
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
||||
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
||||
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
||||
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
||||
|
||||
// Replace globs with equivalent patterns to reduce parsing time.
|
||||
REPLACEMENTS: {
|
||||
__proto__: null,
|
||||
'***': '*',
|
||||
'**/**': '**',
|
||||
'**/**/**': '**'
|
||||
},
|
||||
|
||||
// Digits
|
||||
CHAR_0: 48, /* 0 */
|
||||
CHAR_9: 57, /* 9 */
|
||||
|
||||
// Alphabet chars.
|
||||
CHAR_UPPERCASE_A: 65, /* A */
|
||||
CHAR_LOWERCASE_A: 97, /* a */
|
||||
CHAR_UPPERCASE_Z: 90, /* Z */
|
||||
CHAR_LOWERCASE_Z: 122, /* z */
|
||||
|
||||
CHAR_LEFT_PARENTHESES: 40, /* ( */
|
||||
CHAR_RIGHT_PARENTHESES: 41, /* ) */
|
||||
|
||||
CHAR_ASTERISK: 42, /* * */
|
||||
|
||||
// Non-alphabetic chars.
|
||||
CHAR_AMPERSAND: 38, /* & */
|
||||
CHAR_AT: 64, /* @ */
|
||||
CHAR_BACKWARD_SLASH: 92, /* \ */
|
||||
CHAR_CARRIAGE_RETURN: 13, /* \r */
|
||||
CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
|
||||
CHAR_COLON: 58, /* : */
|
||||
CHAR_COMMA: 44, /* , */
|
||||
CHAR_DOT: 46, /* . */
|
||||
CHAR_DOUBLE_QUOTE: 34, /* " */
|
||||
CHAR_EQUAL: 61, /* = */
|
||||
CHAR_EXCLAMATION_MARK: 33, /* ! */
|
||||
CHAR_FORM_FEED: 12, /* \f */
|
||||
CHAR_FORWARD_SLASH: 47, /* / */
|
||||
CHAR_GRAVE_ACCENT: 96, /* ` */
|
||||
CHAR_HASH: 35, /* # */
|
||||
CHAR_HYPHEN_MINUS: 45, /* - */
|
||||
CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
|
||||
CHAR_LEFT_CURLY_BRACE: 123, /* { */
|
||||
CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
|
||||
CHAR_LINE_FEED: 10, /* \n */
|
||||
CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
|
||||
CHAR_PERCENT: 37, /* % */
|
||||
CHAR_PLUS: 43, /* + */
|
||||
CHAR_QUESTION_MARK: 63, /* ? */
|
||||
CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
|
||||
CHAR_RIGHT_CURLY_BRACE: 125, /* } */
|
||||
CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
|
||||
CHAR_SEMICOLON: 59, /* ; */
|
||||
CHAR_SINGLE_QUOTE: 39, /* ' */
|
||||
CHAR_SPACE: 32, /* */
|
||||
CHAR_TAB: 9, /* \t */
|
||||
CHAR_UNDERSCORE: 95, /* _ */
|
||||
CHAR_VERTICAL_LINE: 124, /* | */
|
||||
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
|
||||
|
||||
/**
|
||||
* Create EXTGLOB_CHARS
|
||||
*/
|
||||
|
||||
extglobChars(chars) {
|
||||
return {
|
||||
'!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
|
||||
'?': { type: 'qmark', open: '(?:', close: ')?' },
|
||||
'+': { type: 'plus', open: '(?:', close: ')+' },
|
||||
'*': { type: 'star', open: '(?:', close: ')*' },
|
||||
'@': { type: 'at', open: '(?:', close: ')' }
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Create GLOB_CHARS
|
||||
*/
|
||||
|
||||
globChars(win32) {
|
||||
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
||||
}
|
||||
};
|
||||
1085
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/parse.js
generated
vendored
Normal file
1085
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/parse.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
341
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/picomatch.js
generated
vendored
Normal file
341
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/picomatch.js
generated
vendored
Normal file
@ -0,0 +1,341 @@
|
||||
'use strict';
|
||||
|
||||
const scan = require('./scan');
|
||||
const parse = require('./parse');
|
||||
const utils = require('./utils');
|
||||
const constants = require('./constants');
|
||||
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
||||
|
||||
/**
|
||||
* Creates a matcher function from one or more glob patterns. The
|
||||
* returned function takes a string to match as its first argument,
|
||||
* and returns true if the string is a match. The returned matcher
|
||||
* function also takes a boolean as the second argument that, when true,
|
||||
* returns an object with additional information.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch(glob[, options]);
|
||||
*
|
||||
* const isMatch = picomatch('*.!(*a)');
|
||||
* console.log(isMatch('a.a')); //=> false
|
||||
* console.log(isMatch('a.b')); //=> true
|
||||
* ```
|
||||
* @name picomatch
|
||||
* @param {String|Array} `globs` One or more glob patterns.
|
||||
* @param {Object=} `options`
|
||||
* @return {Function=} Returns a matcher function.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
const picomatch = (glob, options, returnState = false) => {
|
||||
if (Array.isArray(glob)) {
|
||||
const fns = glob.map(input => picomatch(input, options, returnState));
|
||||
const arrayMatcher = str => {
|
||||
for (const isMatch of fns) {
|
||||
const state = isMatch(str);
|
||||
if (state) return state;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
return arrayMatcher;
|
||||
}
|
||||
|
||||
const isState = isObject(glob) && glob.tokens && glob.input;
|
||||
|
||||
if (glob === '' || (typeof glob !== 'string' && !isState)) {
|
||||
throw new TypeError('Expected pattern to be a non-empty string');
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const posix = opts.windows;
|
||||
const regex = isState
|
||||
? picomatch.compileRe(glob, options)
|
||||
: picomatch.makeRe(glob, options, false, true);
|
||||
|
||||
const state = regex.state;
|
||||
delete regex.state;
|
||||
|
||||
let isIgnored = () => false;
|
||||
if (opts.ignore) {
|
||||
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
||||
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
||||
}
|
||||
|
||||
const matcher = (input, returnObject = false) => {
|
||||
const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
|
||||
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
||||
|
||||
if (typeof opts.onResult === 'function') {
|
||||
opts.onResult(result);
|
||||
}
|
||||
|
||||
if (isMatch === false) {
|
||||
result.isMatch = false;
|
||||
return returnObject ? result : false;
|
||||
}
|
||||
|
||||
if (isIgnored(input)) {
|
||||
if (typeof opts.onIgnore === 'function') {
|
||||
opts.onIgnore(result);
|
||||
}
|
||||
result.isMatch = false;
|
||||
return returnObject ? result : false;
|
||||
}
|
||||
|
||||
if (typeof opts.onMatch === 'function') {
|
||||
opts.onMatch(result);
|
||||
}
|
||||
return returnObject ? result : true;
|
||||
};
|
||||
|
||||
if (returnState) {
|
||||
matcher.state = state;
|
||||
}
|
||||
|
||||
return matcher;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test `input` with the given `regex`. This is used by the main
|
||||
* `picomatch()` function to test the input string.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch.test(input, regex[, options]);
|
||||
*
|
||||
* console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
|
||||
* // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
|
||||
* ```
|
||||
* @param {String} `input` String to test.
|
||||
* @param {RegExp} `regex`
|
||||
* @return {Object} Returns an object with matching info.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
||||
if (typeof input !== 'string') {
|
||||
throw new TypeError('Expected input to be a string');
|
||||
}
|
||||
|
||||
if (input === '') {
|
||||
return { isMatch: false, output: '' };
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const format = opts.format || (posix ? utils.toPosixSlashes : null);
|
||||
let match = input === glob;
|
||||
let output = (match && format) ? format(input) : input;
|
||||
|
||||
if (match === false) {
|
||||
output = format ? format(input) : input;
|
||||
match = output === glob;
|
||||
}
|
||||
|
||||
if (match === false || opts.capture === true) {
|
||||
if (opts.matchBase === true || opts.basename === true) {
|
||||
match = picomatch.matchBase(input, regex, options, posix);
|
||||
} else {
|
||||
match = regex.exec(output);
|
||||
}
|
||||
}
|
||||
|
||||
return { isMatch: Boolean(match), match, output };
|
||||
};
|
||||
|
||||
/**
|
||||
* Match the basename of a filepath.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch.matchBase(input, glob[, options]);
|
||||
* console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
|
||||
* ```
|
||||
* @param {String} `input` String to test.
|
||||
* @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.matchBase = (input, glob, options) => {
|
||||
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
||||
return regex.test(utils.basename(input));
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch.isMatch(string, patterns[, options]);
|
||||
*
|
||||
* console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
||||
* console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
|
||||
* ```
|
||||
* @param {String|Array} str The string to test.
|
||||
* @param {String|Array} patterns One or more glob patterns to use for matching.
|
||||
* @param {Object} [options] See available [options](#options).
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
||||
|
||||
/**
|
||||
* Parse a glob pattern to create the source string for a regular
|
||||
* expression.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* const result = picomatch.parse(pattern[, options]);
|
||||
* ```
|
||||
* @param {String} `pattern`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with useful properties and output to be used as a regex source string.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.parse = (pattern, options) => {
|
||||
if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
|
||||
return parse(pattern, { ...options, fastpaths: false });
|
||||
};
|
||||
|
||||
/**
|
||||
* Scan a glob pattern to separate the pattern into segments.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch.scan(input[, options]);
|
||||
*
|
||||
* const result = picomatch.scan('!./foo/*.js');
|
||||
* console.log(result);
|
||||
* { prefix: '!./',
|
||||
* input: '!./foo/*.js',
|
||||
* start: 3,
|
||||
* base: 'foo',
|
||||
* glob: '*.js',
|
||||
* isBrace: false,
|
||||
* isBracket: false,
|
||||
* isGlob: true,
|
||||
* isExtglob: false,
|
||||
* isGlobstar: false,
|
||||
* negated: true }
|
||||
* ```
|
||||
* @param {String} `input` Glob pattern to scan.
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.scan = (input, options) => scan(input, options);
|
||||
|
||||
/**
|
||||
* Compile a regular expression from the `state` object returned by the
|
||||
* [parse()](#parse) method.
|
||||
*
|
||||
* @param {Object} `state`
|
||||
* @param {Object} `options`
|
||||
* @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
|
||||
* @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
|
||||
* @return {RegExp}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
||||
if (returnOutput === true) {
|
||||
return state.output;
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const prepend = opts.contains ? '' : '^';
|
||||
const append = opts.contains ? '' : '$';
|
||||
|
||||
let source = `${prepend}(?:${state.output})${append}`;
|
||||
if (state && state.negated === true) {
|
||||
source = `^(?!${source}).*$`;
|
||||
}
|
||||
|
||||
const regex = picomatch.toRegex(source, options);
|
||||
if (returnState === true) {
|
||||
regex.state = state;
|
||||
}
|
||||
|
||||
return regex;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a regular expression from a parsed glob pattern.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* const state = picomatch.parse('*.js');
|
||||
* // picomatch.compileRe(state[, options]);
|
||||
*
|
||||
* console.log(picomatch.compileRe(state));
|
||||
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
||||
* ```
|
||||
* @param {String} `state` The object returned from the `.parse` method.
|
||||
* @param {Object} `options`
|
||||
* @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
|
||||
* @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
|
||||
* @return {RegExp} Returns a regex created from the given pattern.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
||||
if (!input || typeof input !== 'string') {
|
||||
throw new TypeError('Expected a non-empty string');
|
||||
}
|
||||
|
||||
let parsed = { negated: false, fastpaths: true };
|
||||
|
||||
if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
|
||||
parsed.output = parse.fastpaths(input, options);
|
||||
}
|
||||
|
||||
if (!parsed.output) {
|
||||
parsed = parse(input, options);
|
||||
}
|
||||
|
||||
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a regular expression from the given regex source string.
|
||||
*
|
||||
* ```js
|
||||
* const picomatch = require('picomatch');
|
||||
* // picomatch.toRegex(source[, options]);
|
||||
*
|
||||
* const { output } = picomatch.parse('*.js');
|
||||
* console.log(picomatch.toRegex(output));
|
||||
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
||||
* ```
|
||||
* @param {String} `source` Regular expression source string.
|
||||
* @param {Object} `options`
|
||||
* @return {RegExp}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.toRegex = (source, options) => {
|
||||
try {
|
||||
const opts = options || {};
|
||||
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
|
||||
} catch (err) {
|
||||
if (options && options.debug === true) throw err;
|
||||
return /$^/;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Picomatch constants.
|
||||
* @return {Object}
|
||||
*/
|
||||
|
||||
picomatch.constants = constants;
|
||||
|
||||
/**
|
||||
* Expose "picomatch"
|
||||
*/
|
||||
|
||||
module.exports = picomatch;
|
||||
391
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/scan.js
generated
vendored
Normal file
391
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/scan.js
generated
vendored
Normal file
@ -0,0 +1,391 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('./utils');
|
||||
const {
|
||||
CHAR_ASTERISK, /* * */
|
||||
CHAR_AT, /* @ */
|
||||
CHAR_BACKWARD_SLASH, /* \ */
|
||||
CHAR_COMMA, /* , */
|
||||
CHAR_DOT, /* . */
|
||||
CHAR_EXCLAMATION_MARK, /* ! */
|
||||
CHAR_FORWARD_SLASH, /* / */
|
||||
CHAR_LEFT_CURLY_BRACE, /* { */
|
||||
CHAR_LEFT_PARENTHESES, /* ( */
|
||||
CHAR_LEFT_SQUARE_BRACKET, /* [ */
|
||||
CHAR_PLUS, /* + */
|
||||
CHAR_QUESTION_MARK, /* ? */
|
||||
CHAR_RIGHT_CURLY_BRACE, /* } */
|
||||
CHAR_RIGHT_PARENTHESES, /* ) */
|
||||
CHAR_RIGHT_SQUARE_BRACKET /* ] */
|
||||
} = require('./constants');
|
||||
|
||||
const isPathSeparator = code => {
|
||||
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
||||
};
|
||||
|
||||
const depth = token => {
|
||||
if (token.isPrefix !== true) {
|
||||
token.depth = token.isGlobstar ? Infinity : 1;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Quickly scans a glob pattern and returns an object with a handful of
|
||||
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
|
||||
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
|
||||
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
|
||||
*
|
||||
* ```js
|
||||
* const pm = require('picomatch');
|
||||
* console.log(pm.scan('foo/bar/*.js'));
|
||||
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
|
||||
* ```
|
||||
* @param {String} `str`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with tokens and regex source string.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
const scan = (input, options) => {
|
||||
const opts = options || {};
|
||||
|
||||
const length = input.length - 1;
|
||||
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
||||
const slashes = [];
|
||||
const tokens = [];
|
||||
const parts = [];
|
||||
|
||||
let str = input;
|
||||
let index = -1;
|
||||
let start = 0;
|
||||
let lastIndex = 0;
|
||||
let isBrace = false;
|
||||
let isBracket = false;
|
||||
let isGlob = false;
|
||||
let isExtglob = false;
|
||||
let isGlobstar = false;
|
||||
let braceEscaped = false;
|
||||
let backslashes = false;
|
||||
let negated = false;
|
||||
let negatedExtglob = false;
|
||||
let finished = false;
|
||||
let braces = 0;
|
||||
let prev;
|
||||
let code;
|
||||
let token = { value: '', depth: 0, isGlob: false };
|
||||
|
||||
const eos = () => index >= length;
|
||||
const peek = () => str.charCodeAt(index + 1);
|
||||
const advance = () => {
|
||||
prev = code;
|
||||
return str.charCodeAt(++index);
|
||||
};
|
||||
|
||||
while (index < length) {
|
||||
code = advance();
|
||||
let next;
|
||||
|
||||
if (code === CHAR_BACKWARD_SLASH) {
|
||||
backslashes = token.backslashes = true;
|
||||
code = advance();
|
||||
|
||||
if (code === CHAR_LEFT_CURLY_BRACE) {
|
||||
braceEscaped = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
|
||||
braces++;
|
||||
|
||||
while (eos() !== true && (code = advance())) {
|
||||
if (code === CHAR_BACKWARD_SLASH) {
|
||||
backslashes = token.backslashes = true;
|
||||
advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (code === CHAR_LEFT_CURLY_BRACE) {
|
||||
braces++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
|
||||
isBrace = token.isBrace = true;
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (braceEscaped !== true && code === CHAR_COMMA) {
|
||||
isBrace = token.isBrace = true;
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (code === CHAR_RIGHT_CURLY_BRACE) {
|
||||
braces--;
|
||||
|
||||
if (braces === 0) {
|
||||
braceEscaped = false;
|
||||
isBrace = token.isBrace = true;
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (code === CHAR_FORWARD_SLASH) {
|
||||
slashes.push(index);
|
||||
tokens.push(token);
|
||||
token = { value: '', depth: 0, isGlob: false };
|
||||
|
||||
if (finished === true) continue;
|
||||
if (prev === CHAR_DOT && index === (start + 1)) {
|
||||
start += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
lastIndex = index + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (opts.noext !== true) {
|
||||
const isExtglobChar = code === CHAR_PLUS
|
||||
|| code === CHAR_AT
|
||||
|| code === CHAR_ASTERISK
|
||||
|| code === CHAR_QUESTION_MARK
|
||||
|| code === CHAR_EXCLAMATION_MARK;
|
||||
|
||||
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
|
||||
isGlob = token.isGlob = true;
|
||||
isExtglob = token.isExtglob = true;
|
||||
finished = true;
|
||||
if (code === CHAR_EXCLAMATION_MARK && index === start) {
|
||||
negatedExtglob = true;
|
||||
}
|
||||
|
||||
if (scanToEnd === true) {
|
||||
while (eos() !== true && (code = advance())) {
|
||||
if (code === CHAR_BACKWARD_SLASH) {
|
||||
backslashes = token.backslashes = true;
|
||||
code = advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (code === CHAR_RIGHT_PARENTHESES) {
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (code === CHAR_ASTERISK) {
|
||||
if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (code === CHAR_QUESTION_MARK) {
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (code === CHAR_LEFT_SQUARE_BRACKET) {
|
||||
while (eos() !== true && (next = advance())) {
|
||||
if (next === CHAR_BACKWARD_SLASH) {
|
||||
backslashes = token.backslashes = true;
|
||||
advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
||||
isBracket = token.isBracket = true;
|
||||
isGlob = token.isGlob = true;
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
|
||||
negated = token.negated = true;
|
||||
start++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
|
||||
isGlob = token.isGlob = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
while (eos() !== true && (code = advance())) {
|
||||
if (code === CHAR_LEFT_PARENTHESES) {
|
||||
backslashes = token.backslashes = true;
|
||||
code = advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (code === CHAR_RIGHT_PARENTHESES) {
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (isGlob === true) {
|
||||
finished = true;
|
||||
|
||||
if (scanToEnd === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.noext === true) {
|
||||
isExtglob = false;
|
||||
isGlob = false;
|
||||
}
|
||||
|
||||
let base = str;
|
||||
let prefix = '';
|
||||
let glob = '';
|
||||
|
||||
if (start > 0) {
|
||||
prefix = str.slice(0, start);
|
||||
str = str.slice(start);
|
||||
lastIndex -= start;
|
||||
}
|
||||
|
||||
if (base && isGlob === true && lastIndex > 0) {
|
||||
base = str.slice(0, lastIndex);
|
||||
glob = str.slice(lastIndex);
|
||||
} else if (isGlob === true) {
|
||||
base = '';
|
||||
glob = str;
|
||||
} else {
|
||||
base = str;
|
||||
}
|
||||
|
||||
if (base && base !== '' && base !== '/' && base !== str) {
|
||||
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
|
||||
base = base.slice(0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.unescape === true) {
|
||||
if (glob) glob = utils.removeBackslashes(glob);
|
||||
|
||||
if (base && backslashes === true) {
|
||||
base = utils.removeBackslashes(base);
|
||||
}
|
||||
}
|
||||
|
||||
const state = {
|
||||
prefix,
|
||||
input,
|
||||
start,
|
||||
base,
|
||||
glob,
|
||||
isBrace,
|
||||
isBracket,
|
||||
isGlob,
|
||||
isExtglob,
|
||||
isGlobstar,
|
||||
negated,
|
||||
negatedExtglob
|
||||
};
|
||||
|
||||
if (opts.tokens === true) {
|
||||
state.maxDepth = 0;
|
||||
if (!isPathSeparator(code)) {
|
||||
tokens.push(token);
|
||||
}
|
||||
state.tokens = tokens;
|
||||
}
|
||||
|
||||
if (opts.parts === true || opts.tokens === true) {
|
||||
let prevIndex;
|
||||
|
||||
for (let idx = 0; idx < slashes.length; idx++) {
|
||||
const n = prevIndex ? prevIndex + 1 : start;
|
||||
const i = slashes[idx];
|
||||
const value = input.slice(n, i);
|
||||
if (opts.tokens) {
|
||||
if (idx === 0 && start !== 0) {
|
||||
tokens[idx].isPrefix = true;
|
||||
tokens[idx].value = prefix;
|
||||
} else {
|
||||
tokens[idx].value = value;
|
||||
}
|
||||
depth(tokens[idx]);
|
||||
state.maxDepth += tokens[idx].depth;
|
||||
}
|
||||
if (idx !== 0 || value !== '') {
|
||||
parts.push(value);
|
||||
}
|
||||
prevIndex = i;
|
||||
}
|
||||
|
||||
if (prevIndex && prevIndex + 1 < input.length) {
|
||||
const value = input.slice(prevIndex + 1);
|
||||
parts.push(value);
|
||||
|
||||
if (opts.tokens) {
|
||||
tokens[tokens.length - 1].value = value;
|
||||
depth(tokens[tokens.length - 1]);
|
||||
state.maxDepth += tokens[tokens.length - 1].depth;
|
||||
}
|
||||
}
|
||||
|
||||
state.slashes = slashes;
|
||||
state.parts = parts;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
||||
|
||||
module.exports = scan;
|
||||
72
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/utils.js
generated
vendored
Normal file
72
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/lib/utils.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/*global navigator*/
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
REGEX_BACKSLASH,
|
||||
REGEX_REMOVE_BACKSLASH,
|
||||
REGEX_SPECIAL_CHARS,
|
||||
REGEX_SPECIAL_CHARS_GLOBAL
|
||||
} = require('./constants');
|
||||
|
||||
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
||||
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
||||
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
|
||||
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
||||
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
||||
|
||||
exports.isWindows = () => {
|
||||
if (typeof navigator !== 'undefined' && navigator.platform) {
|
||||
const platform = navigator.platform.toLowerCase();
|
||||
return platform === 'win32' || platform === 'windows';
|
||||
}
|
||||
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
return process.platform === 'win32';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
exports.removeBackslashes = str => {
|
||||
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
|
||||
return match === '\\' ? '' : match;
|
||||
});
|
||||
};
|
||||
|
||||
exports.escapeLast = (input, char, lastIdx) => {
|
||||
const idx = input.lastIndexOf(char, lastIdx);
|
||||
if (idx === -1) return input;
|
||||
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
|
||||
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
||||
};
|
||||
|
||||
exports.removePrefix = (input, state = {}) => {
|
||||
let output = input;
|
||||
if (output.startsWith('./')) {
|
||||
output = output.slice(2);
|
||||
state.prefix = './';
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
exports.wrapOutput = (input, state = {}, options = {}) => {
|
||||
const prepend = options.contains ? '' : '^';
|
||||
const append = options.contains ? '' : '$';
|
||||
|
||||
let output = `${prepend}(?:${input})${append}`;
|
||||
if (state.negated === true) {
|
||||
output = `(?:^(?!${output}).*$)`;
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
exports.basename = (path, { windows } = {}) => {
|
||||
const segs = path.split(windows ? /[\\/]/ : '/');
|
||||
const last = segs[segs.length - 1];
|
||||
|
||||
if (last === '') {
|
||||
return segs[segs.length - 2];
|
||||
}
|
||||
|
||||
return last;
|
||||
};
|
||||
83
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/package.json
generated
vendored
Normal file
83
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/package.json
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"name": "picomatch",
|
||||
"description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
|
||||
"version": "4.0.3",
|
||||
"homepage": "https://github.com/micromatch/picomatch",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"funding": "https://github.com/sponsors/jonschlinkert",
|
||||
"repository": "micromatch/picomatch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/picomatch/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"posix.js",
|
||||
"lib"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"mocha": "mocha --reporter dot",
|
||||
"test": "npm run lint && npm run mocha",
|
||||
"test:ci": "npm run test:cover",
|
||||
"test:cover": "nyc npm run mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
"fill-range": "^7.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^10.4.0",
|
||||
"nyc": "^15.1.0",
|
||||
"time-require": "github:jonschlinkert/time-require"
|
||||
},
|
||||
"keywords": [
|
||||
"glob",
|
||||
"match",
|
||||
"picomatch"
|
||||
],
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
"html",
|
||||
"lcov",
|
||||
"text-summary"
|
||||
]
|
||||
},
|
||||
"verb": {
|
||||
"toc": {
|
||||
"render": true,
|
||||
"method": "preWrite",
|
||||
"maxdepth": 3
|
||||
},
|
||||
"layout": "empty",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"related": {
|
||||
"list": [
|
||||
"braces",
|
||||
"micromatch"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"braces",
|
||||
"expand-brackets",
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"micromatch",
|
||||
"minimatch",
|
||||
"nanomatch",
|
||||
"picomatch"
|
||||
]
|
||||
}
|
||||
}
|
||||
3
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/posix.js
generated
vendored
Normal file
3
MEDICONNECTv3 - cópia/node_modules/tinyglobby/node_modules/picomatch/posix.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./lib/picomatch');
|
||||
73
MEDICONNECTv3 - cópia/node_modules/tinyglobby/package.json
generated
vendored
Normal file
73
MEDICONNECTv3 - cópia/node_modules/tinyglobby/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "tinyglobby",
|
||||
"version": "0.2.15",
|
||||
"description": "A fast and minimal alternative to globby and fast-glob",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "Superchupu",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"glob",
|
||||
"patterns",
|
||||
"fast",
|
||||
"implementation"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/SuperchupuDev/tinyglobby/issues"
|
||||
},
|
||||
"homepage": "https://superchupu.dev/tinyglobby",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
},
|
||||
"dependencies": {
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.2.3",
|
||||
"@types/node": "^24.3.1",
|
||||
"@types/picomatch": "^4.0.2",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fs-fixture": "^2.8.1",
|
||||
"glob": "^11.0.3",
|
||||
"tinybench": "^5.0.1",
|
||||
"tsdown": "^0.14.2",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "node benchmark/bench.ts",
|
||||
"bench:setup": "node benchmark/setup.ts",
|
||||
"build": "tsdown",
|
||||
"check": "biome check",
|
||||
"check:fix": "biome check --write --unsafe",
|
||||
"format": "biome format --write",
|
||||
"lint": "biome lint",
|
||||
"test": "node --test \"test/**/*.ts\"",
|
||||
"test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
|
||||
"test:only": "node --test --test-only \"test/**/*.ts\"",
|
||||
"typecheck": "tsc --noEmit"
|
||||
}
|
||||
}
|
||||
1514
MEDICONNECTv3 - cópia/node_modules/vite/LICENSE.md
generated
vendored
1514
MEDICONNECTv3 - cópia/node_modules/vite/LICENSE.md
generated
vendored
File diff suppressed because it is too large
Load Diff
95
MEDICONNECTv3 - cópia/node_modules/vite/bin/openChrome.applescript
generated
vendored
95
MEDICONNECTv3 - cópia/node_modules/vite/bin/openChrome.applescript
generated
vendored
@ -1,95 +0,0 @@
|
||||
(*
|
||||
Copyright (c) 2015-present, Facebook, Inc.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file at
|
||||
https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
|
||||
*)
|
||||
|
||||
property targetTab: null
|
||||
property targetTabIndex: -1
|
||||
property targetWindow: null
|
||||
property theProgram: "Google Chrome"
|
||||
|
||||
on run argv
|
||||
set theURL to item 1 of argv
|
||||
|
||||
-- Allow requested program to be optional,
|
||||
-- default to Google Chrome
|
||||
if (count of argv) > 1 then
|
||||
set theProgram to item 2 of argv
|
||||
end if
|
||||
|
||||
using terms from application "Google Chrome"
|
||||
tell application theProgram
|
||||
|
||||
if (count every window) = 0 then
|
||||
make new window
|
||||
end if
|
||||
|
||||
-- 1: Looking for tab running debugger
|
||||
-- then, Reload debugging tab if found
|
||||
-- then return
|
||||
set found to my lookupTabWithUrl(theURL)
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
tell targetTab to reload
|
||||
tell targetWindow to activate
|
||||
set index of targetWindow to 1
|
||||
return
|
||||
end if
|
||||
|
||||
-- 2: Looking for Empty tab
|
||||
-- In case debugging tab was not found
|
||||
-- We try to find an empty tab instead
|
||||
set found to my lookupTabWithUrl("chrome://newtab/")
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
set URL of targetTab to theURL
|
||||
tell targetWindow to activate
|
||||
return
|
||||
end if
|
||||
|
||||
-- 3: Create new tab
|
||||
-- both debugging and empty tab were not found
|
||||
-- make a new tab with url
|
||||
tell window 1
|
||||
activate
|
||||
make new tab with properties {URL:theURL}
|
||||
end tell
|
||||
end tell
|
||||
end using terms from
|
||||
end run
|
||||
|
||||
-- Function:
|
||||
-- Lookup tab with given url
|
||||
-- if found, store tab, index, and window in properties
|
||||
-- (properties were declared on top of file)
|
||||
on lookupTabWithUrl(lookupUrl)
|
||||
using terms from application "Google Chrome"
|
||||
tell application theProgram
|
||||
-- Find a tab with the given url
|
||||
set found to false
|
||||
set theTabIndex to -1
|
||||
repeat with theWindow in every window
|
||||
set theTabIndex to 0
|
||||
repeat with theTab in every tab of theWindow
|
||||
set theTabIndex to theTabIndex + 1
|
||||
if (theTab's URL as string) contains lookupUrl then
|
||||
-- assign tab, tab index, and window to properties
|
||||
set targetTab to theTab
|
||||
set targetTabIndex to theTabIndex
|
||||
set targetWindow to theWindow
|
||||
set found to true
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
if found then
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
end tell
|
||||
end using terms from
|
||||
return found
|
||||
end lookupTabWithUrl
|
||||
68
MEDICONNECTv3 - cópia/node_modules/vite/bin/openChrome.js
generated
vendored
Normal file
68
MEDICONNECTv3 - cópia/node_modules/vite/bin/openChrome.js
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright (c) 2015-present, Facebook, Inc.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file at
|
||||
https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
/* global Application */
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function run(argv) {
|
||||
const urlToOpen = argv[0]
|
||||
// Allow requested program to be optional, default to Google Chrome
|
||||
const programName = argv[1] ?? 'Google Chrome'
|
||||
|
||||
const app = Application(programName)
|
||||
|
||||
if (app.windows.length === 0) {
|
||||
app.Window().make()
|
||||
}
|
||||
|
||||
// 1: Looking for tab running debugger then,
|
||||
// Reload debugging tab if found, then return
|
||||
const found = lookupTabWithUrl(urlToOpen, app)
|
||||
if (found) {
|
||||
found.targetWindow.activeTabIndex = found.targetTabIndex
|
||||
found.targetTab.reload()
|
||||
found.targetWindow.index = 1
|
||||
app.activate()
|
||||
return
|
||||
}
|
||||
|
||||
// 2: Looking for Empty tab
|
||||
// In case debugging tab was not found
|
||||
// We try to find an empty tab instead
|
||||
const emptyTabFound = lookupTabWithUrl('chrome://newtab/', app)
|
||||
if (emptyTabFound) {
|
||||
emptyTabFound.targetWindow.activeTabIndex = emptyTabFound.targetTabIndex
|
||||
emptyTabFound.targetTab.url = urlToOpen
|
||||
app.activate()
|
||||
return
|
||||
}
|
||||
|
||||
// 3: Create new tab
|
||||
// both debugging and empty tab were not found make a new tab with url
|
||||
const firstWindow = app.windows[0]
|
||||
firstWindow.tabs.push(app.Tab({ url: urlToOpen }))
|
||||
app.activate()
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup tab with given url
|
||||
*/
|
||||
function lookupTabWithUrl(lookupUrl, app) {
|
||||
const windows = app.windows()
|
||||
for (const window of windows) {
|
||||
for (const [tabIndex, tab] of window.tabs().entries()) {
|
||||
if (tab.url().includes(lookupUrl)) {
|
||||
return {
|
||||
targetTab: tab,
|
||||
targetTabIndex: tabIndex + 1,
|
||||
targetWindow: window,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
MEDICONNECTv3 - cópia/node_modules/vite/bin/vite.js
generated
vendored
32
MEDICONNECTv3 - cópia/node_modules/vite/bin/vite.js
generated
vendored
@ -1,11 +1,16 @@
|
||||
#!/usr/bin/env node
|
||||
import { performance } from 'node:perf_hooks'
|
||||
import module from 'node:module'
|
||||
|
||||
if (!import.meta.url.includes('node_modules')) {
|
||||
try {
|
||||
// only available as dev dependency
|
||||
await import('source-map-support').then((r) => r.default.install())
|
||||
} catch (e) {}
|
||||
if (!process.env.DEBUG_DISABLE_SOURCE_MAP) {
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- only used in dev
|
||||
process.setSourceMapsEnabled(true)
|
||||
}
|
||||
|
||||
process.on('unhandledRejection', (err) => {
|
||||
throw new Error('UNHANDLED PROMISE REJECTION', { cause: err })
|
||||
})
|
||||
}
|
||||
|
||||
global.__vite_start_time = performance.now()
|
||||
@ -19,7 +24,7 @@ const profileIndex = process.argv.indexOf('--profile')
|
||||
|
||||
if (debugIndex > 0) {
|
||||
let value = process.argv[debugIndex + 1]
|
||||
if (!value || value.startsWith('-')) {
|
||||
if (!value || value[0] === '-') {
|
||||
value = 'vite:*'
|
||||
} else {
|
||||
// support debugging multiple flags with comma-separated list
|
||||
@ -34,20 +39,33 @@ if (debugIndex > 0) {
|
||||
|
||||
if (filterIndex > 0) {
|
||||
const filter = process.argv[filterIndex + 1]
|
||||
if (filter && !filter.startsWith('-')) {
|
||||
if (filter && filter[0] !== '-') {
|
||||
process.env.VITE_DEBUG_FILTER = filter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
try {
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
|
||||
module.enableCompileCache?.()
|
||||
// flush the cache after 10s because the cache is not flushed until process end
|
||||
// for dev server, the cache is never flushed unless manually flushed because the process.exit is called
|
||||
// also flushing the cache in SIGINT handler seems to cause the process to hang
|
||||
setTimeout(() => {
|
||||
try {
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists
|
||||
module.flushCompileCache?.()
|
||||
} catch {}
|
||||
}, 10 * 1000).unref()
|
||||
} catch {}
|
||||
return import('../dist/node/cli.js')
|
||||
}
|
||||
|
||||
if (profileIndex > 0) {
|
||||
process.argv.splice(profileIndex, 1)
|
||||
const next = process.argv[profileIndex]
|
||||
if (next && !next.startsWith('-')) {
|
||||
if (next && next[0] !== '-') {
|
||||
process.argv.splice(profileIndex, 1)
|
||||
}
|
||||
const inspector = await import('node:inspector').then((r) => r.default)
|
||||
|
||||
23
MEDICONNECTv3 - cópia/node_modules/vite/client.d.ts
generated
vendored
23
MEDICONNECTv3 - cópia/node_modules/vite/client.d.ts
generated
vendored
@ -102,6 +102,14 @@ declare module '*.avif' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
declare module '*.cur' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
declare module '*.jxl' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
|
||||
// media
|
||||
declare module '*.mp4' {
|
||||
@ -247,6 +255,21 @@ declare module '*?inline' {
|
||||
export default src
|
||||
}
|
||||
|
||||
declare module '*?no-inline' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
|
||||
declare module '*?url&inline' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
|
||||
declare module '*?url&no-inline' {
|
||||
const src: string
|
||||
export default src
|
||||
}
|
||||
|
||||
declare interface VitePreloadErrorEvent extends Event {
|
||||
payload: Error
|
||||
}
|
||||
|
||||
1543
MEDICONNECTv3 - cópia/node_modules/vite/dist/client/client.mjs
generated
vendored
1543
MEDICONNECTv3 - cópia/node_modules/vite/dist/client/client.mjs
generated
vendored
File diff suppressed because it is too large
Load Diff
33
MEDICONNECTv3 - cópia/node_modules/vite/dist/client/env.mjs
generated
vendored
33
MEDICONNECTv3 - cópia/node_modules/vite/dist/client/env.mjs
generated
vendored
@ -1,24 +1,19 @@
|
||||
//#region src/client/env.ts
|
||||
const context = (() => {
|
||||
if (typeof globalThis !== "undefined") {
|
||||
return globalThis;
|
||||
} else if (typeof self !== "undefined") {
|
||||
return self;
|
||||
} else if (typeof window !== "undefined") {
|
||||
return window;
|
||||
} else {
|
||||
return Function("return this")();
|
||||
}
|
||||
if (typeof globalThis !== "undefined") return globalThis;
|
||||
else if (typeof self !== "undefined") return self;
|
||||
else if (typeof window !== "undefined") return window;
|
||||
else return Function("return this")();
|
||||
})();
|
||||
const defines = __DEFINES__;
|
||||
Object.keys(defines).forEach((key) => {
|
||||
const segments = key.split(".");
|
||||
let target = context;
|
||||
for (let i = 0; i < segments.length; i++) {
|
||||
const segment = segments[i];
|
||||
if (i === segments.length - 1) {
|
||||
target[segment] = defines[key];
|
||||
} else {
|
||||
target = target[segment] || (target[segment] = {});
|
||||
}
|
||||
}
|
||||
const segments = key.split(".");
|
||||
let target = context;
|
||||
for (let i = 0; i < segments.length; i++) {
|
||||
const segment = segments[i];
|
||||
if (i === segments.length - 1) target[segment] = defines[key];
|
||||
else target = target[segment] || (target[segment] = {});
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
6171
MEDICONNECTv3 - cópia/node_modules/vite/dist/node-cjs/publicUtils.cjs
generated
vendored
6171
MEDICONNECTv3 - cópia/node_modules/vite/dist/node-cjs/publicUtils.cjs
generated
vendored
File diff suppressed because it is too large
Load Diff
377
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-BuoK8Wda.js
generated
vendored
Normal file
377
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-BuoK8Wda.js
generated
vendored
Normal file
@ -0,0 +1,377 @@
|
||||
import { __commonJS } from "./dep-lCKrEJQm.js";
|
||||
|
||||
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
|
||||
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js": ((exports, module) => {
|
||||
var openParentheses = "(".charCodeAt(0);
|
||||
var closeParentheses = ")".charCodeAt(0);
|
||||
var singleQuote = "'".charCodeAt(0);
|
||||
var doubleQuote = "\"".charCodeAt(0);
|
||||
var backslash = "\\".charCodeAt(0);
|
||||
var slash = "/".charCodeAt(0);
|
||||
var comma = ",".charCodeAt(0);
|
||||
var colon = ":".charCodeAt(0);
|
||||
var star = "*".charCodeAt(0);
|
||||
var uLower = "u".charCodeAt(0);
|
||||
var uUpper = "U".charCodeAt(0);
|
||||
var plus$1 = "+".charCodeAt(0);
|
||||
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
||||
module.exports = function(input) {
|
||||
var tokens = [];
|
||||
var value = input;
|
||||
var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
|
||||
var pos = 0;
|
||||
var code = value.charCodeAt(pos);
|
||||
var max = value.length;
|
||||
var stack = [{ nodes: tokens }];
|
||||
var balanced = 0;
|
||||
var parent;
|
||||
var name = "";
|
||||
var before = "";
|
||||
var after = "";
|
||||
while (pos < max) if (code <= 32) {
|
||||
next = pos;
|
||||
do {
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (code <= 32);
|
||||
token = value.slice(pos, next);
|
||||
prev = tokens[tokens.length - 1];
|
||||
if (code === closeParentheses && balanced) after = token;
|
||||
else if (prev && prev.type === "div") {
|
||||
prev.after = token;
|
||||
prev.sourceEndIndex += token.length;
|
||||
} else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) before = token;
|
||||
else tokens.push({
|
||||
type: "space",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
pos = next;
|
||||
} else if (code === singleQuote || code === doubleQuote) {
|
||||
next = pos;
|
||||
quote = code === singleQuote ? "'" : "\"";
|
||||
token = {
|
||||
type: "string",
|
||||
sourceIndex: pos,
|
||||
quote
|
||||
};
|
||||
do {
|
||||
escape = false;
|
||||
next = value.indexOf(quote, next + 1);
|
||||
if (~next) {
|
||||
escapePos = next;
|
||||
while (value.charCodeAt(escapePos - 1) === backslash) {
|
||||
escapePos -= 1;
|
||||
escape = !escape;
|
||||
}
|
||||
} else {
|
||||
value += quote;
|
||||
next = value.length - 1;
|
||||
token.unclosed = true;
|
||||
}
|
||||
} while (escape);
|
||||
token.value = value.slice(pos + 1, next);
|
||||
token.sourceEndIndex = token.unclosed ? next : next + 1;
|
||||
tokens.push(token);
|
||||
pos = next + 1;
|
||||
code = value.charCodeAt(pos);
|
||||
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
|
||||
next = value.indexOf("*/", pos);
|
||||
token = {
|
||||
type: "comment",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next + 2
|
||||
};
|
||||
if (next === -1) {
|
||||
token.unclosed = true;
|
||||
next = value.length;
|
||||
token.sourceEndIndex = next;
|
||||
}
|
||||
token.value = value.slice(pos + 2, next);
|
||||
tokens.push(token);
|
||||
pos = next + 2;
|
||||
code = value.charCodeAt(pos);
|
||||
} else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
|
||||
token = value[pos];
|
||||
tokens.push({
|
||||
type: "word",
|
||||
sourceIndex: pos - before.length,
|
||||
sourceEndIndex: pos + token.length,
|
||||
value: token
|
||||
});
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
} else if (code === slash || code === comma || code === colon) {
|
||||
token = value[pos];
|
||||
tokens.push({
|
||||
type: "div",
|
||||
sourceIndex: pos - before.length,
|
||||
sourceEndIndex: pos + token.length,
|
||||
value: token,
|
||||
before,
|
||||
after: ""
|
||||
});
|
||||
before = "";
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
} else if (openParentheses === code) {
|
||||
next = pos;
|
||||
do {
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (code <= 32);
|
||||
parenthesesOpenPos = pos;
|
||||
token = {
|
||||
type: "function",
|
||||
sourceIndex: pos - name.length,
|
||||
value: name,
|
||||
before: value.slice(parenthesesOpenPos + 1, next)
|
||||
};
|
||||
pos = next;
|
||||
if (name === "url" && code !== singleQuote && code !== doubleQuote) {
|
||||
next -= 1;
|
||||
do {
|
||||
escape = false;
|
||||
next = value.indexOf(")", next + 1);
|
||||
if (~next) {
|
||||
escapePos = next;
|
||||
while (value.charCodeAt(escapePos - 1) === backslash) {
|
||||
escapePos -= 1;
|
||||
escape = !escape;
|
||||
}
|
||||
} else {
|
||||
value += ")";
|
||||
next = value.length - 1;
|
||||
token.unclosed = true;
|
||||
}
|
||||
} while (escape);
|
||||
whitespacePos = next;
|
||||
do {
|
||||
whitespacePos -= 1;
|
||||
code = value.charCodeAt(whitespacePos);
|
||||
} while (code <= 32);
|
||||
if (parenthesesOpenPos < whitespacePos) {
|
||||
if (pos !== whitespacePos + 1) token.nodes = [{
|
||||
type: "word",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: whitespacePos + 1,
|
||||
value: value.slice(pos, whitespacePos + 1)
|
||||
}];
|
||||
else token.nodes = [];
|
||||
if (token.unclosed && whitespacePos + 1 !== next) {
|
||||
token.after = "";
|
||||
token.nodes.push({
|
||||
type: "space",
|
||||
sourceIndex: whitespacePos + 1,
|
||||
sourceEndIndex: next,
|
||||
value: value.slice(whitespacePos + 1, next)
|
||||
});
|
||||
} else {
|
||||
token.after = value.slice(whitespacePos + 1, next);
|
||||
token.sourceEndIndex = next;
|
||||
}
|
||||
} else {
|
||||
token.after = "";
|
||||
token.nodes = [];
|
||||
}
|
||||
pos = next + 1;
|
||||
token.sourceEndIndex = token.unclosed ? next : pos;
|
||||
code = value.charCodeAt(pos);
|
||||
tokens.push(token);
|
||||
} else {
|
||||
balanced += 1;
|
||||
token.after = "";
|
||||
token.sourceEndIndex = pos + 1;
|
||||
tokens.push(token);
|
||||
stack.push(token);
|
||||
tokens = token.nodes = [];
|
||||
parent = token;
|
||||
}
|
||||
name = "";
|
||||
} else if (closeParentheses === code && balanced) {
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
parent.after = after;
|
||||
parent.sourceEndIndex += after.length;
|
||||
after = "";
|
||||
balanced -= 1;
|
||||
stack[stack.length - 1].sourceEndIndex = pos;
|
||||
stack.pop();
|
||||
parent = stack[balanced];
|
||||
tokens = parent.nodes;
|
||||
} else {
|
||||
next = pos;
|
||||
do {
|
||||
if (code === backslash) next += 1;
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
|
||||
token = value.slice(pos, next);
|
||||
if (openParentheses === code) name = token;
|
||||
else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus$1 === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) tokens.push({
|
||||
type: "unicode-range",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
else tokens.push({
|
||||
type: "word",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
pos = next;
|
||||
}
|
||||
for (pos = stack.length - 1; pos; pos -= 1) {
|
||||
stack[pos].unclosed = true;
|
||||
stack[pos].sourceEndIndex = value.length;
|
||||
}
|
||||
return stack[0].nodes;
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js
|
||||
var require_walk = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js": ((exports, module) => {
|
||||
module.exports = function walk$1(nodes, cb, bubble) {
|
||||
var i, max, node, result;
|
||||
for (i = 0, max = nodes.length; i < max; i += 1) {
|
||||
node = nodes[i];
|
||||
if (!bubble) result = cb(node, i, nodes);
|
||||
if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk$1(node.nodes, cb, bubble);
|
||||
if (bubble) cb(node, i, nodes);
|
||||
}
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js
|
||||
var require_stringify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js": ((exports, module) => {
|
||||
function stringifyNode(node, custom) {
|
||||
var type = node.type;
|
||||
var value = node.value;
|
||||
var buf;
|
||||
var customResult;
|
||||
if (custom && (customResult = custom(node)) !== void 0) return customResult;
|
||||
else if (type === "word" || type === "space") return value;
|
||||
else if (type === "string") {
|
||||
buf = node.quote || "";
|
||||
return buf + value + (node.unclosed ? "" : buf);
|
||||
} else if (type === "comment") return "/*" + value + (node.unclosed ? "" : "*/");
|
||||
else if (type === "div") return (node.before || "") + value + (node.after || "");
|
||||
else if (Array.isArray(node.nodes)) {
|
||||
buf = stringify$1(node.nodes, custom);
|
||||
if (type !== "function") return buf;
|
||||
return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
function stringify$1(nodes, custom) {
|
||||
var result, i;
|
||||
if (Array.isArray(nodes)) {
|
||||
result = "";
|
||||
for (i = nodes.length - 1; ~i; i -= 1) result = stringifyNode(nodes[i], custom) + result;
|
||||
return result;
|
||||
}
|
||||
return stringifyNode(nodes, custom);
|
||||
}
|
||||
module.exports = stringify$1;
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js
|
||||
var require_unit = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js": ((exports, module) => {
|
||||
var minus = "-".charCodeAt(0);
|
||||
var plus = "+".charCodeAt(0);
|
||||
var dot = ".".charCodeAt(0);
|
||||
var exp = "e".charCodeAt(0);
|
||||
var EXP = "E".charCodeAt(0);
|
||||
function likeNumber(value) {
|
||||
var code = value.charCodeAt(0);
|
||||
var nextCode;
|
||||
if (code === plus || code === minus) {
|
||||
nextCode = value.charCodeAt(1);
|
||||
if (nextCode >= 48 && nextCode <= 57) return true;
|
||||
var nextNextCode = value.charCodeAt(2);
|
||||
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) return true;
|
||||
return false;
|
||||
}
|
||||
if (code === dot) {
|
||||
nextCode = value.charCodeAt(1);
|
||||
if (nextCode >= 48 && nextCode <= 57) return true;
|
||||
return false;
|
||||
}
|
||||
if (code >= 48 && code <= 57) return true;
|
||||
return false;
|
||||
}
|
||||
module.exports = function(value) {
|
||||
var pos = 0;
|
||||
var length = value.length;
|
||||
var code;
|
||||
var nextCode;
|
||||
var nextNextCode;
|
||||
if (length === 0 || !likeNumber(value)) return false;
|
||||
code = value.charCodeAt(pos);
|
||||
if (code === plus || code === minus) pos++;
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
if (code < 48 || code > 57) break;
|
||||
pos += 1;
|
||||
}
|
||||
code = value.charCodeAt(pos);
|
||||
nextCode = value.charCodeAt(pos + 1);
|
||||
if (code === dot && nextCode >= 48 && nextCode <= 57) {
|
||||
pos += 2;
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
if (code < 48 || code > 57) break;
|
||||
pos += 1;
|
||||
}
|
||||
}
|
||||
code = value.charCodeAt(pos);
|
||||
nextCode = value.charCodeAt(pos + 1);
|
||||
nextNextCode = value.charCodeAt(pos + 2);
|
||||
if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
|
||||
pos += nextCode === plus || nextCode === minus ? 3 : 2;
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
if (code < 48 || code > 57) break;
|
||||
pos += 1;
|
||||
}
|
||||
}
|
||||
return {
|
||||
number: value.slice(0, pos),
|
||||
unit: value.slice(pos)
|
||||
};
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js
|
||||
var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js": ((exports, module) => {
|
||||
var parse = require_parse();
|
||||
var walk = require_walk();
|
||||
var stringify = require_stringify();
|
||||
function ValueParser(value) {
|
||||
if (this instanceof ValueParser) {
|
||||
this.nodes = parse(value);
|
||||
return this;
|
||||
}
|
||||
return new ValueParser(value);
|
||||
}
|
||||
ValueParser.prototype.toString = function() {
|
||||
return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
|
||||
};
|
||||
ValueParser.prototype.walk = function(cb, bubble) {
|
||||
walk(this.nodes, cb, bubble);
|
||||
return this;
|
||||
};
|
||||
ValueParser.unit = require_unit();
|
||||
ValueParser.walk = walk;
|
||||
ValueParser.stringify = stringify;
|
||||
module.exports = ValueParser;
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
export { require_lib };
|
||||
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-BvyJBvVx.js
generated
vendored
Normal file
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-BvyJBvVx.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "./dep-SmwnYDP9.js";
|
||||
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-M_KD0XSK.js";
|
||||
|
||||
export { createBuilder, resolveBuildPlugins };
|
||||
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-Cs9lwdKu.js
generated
vendored
Normal file
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-Cs9lwdKu.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "./dep-SmwnYDP9.js";
|
||||
import { configDefaults, defineConfig, getDefaultEnvironmentOptions, isResolvedConfig, loadConfigFromFile, resolveBaseUrl, resolveConfig, resolveDevEnvironmentOptions, sortUserPlugins } from "./dep-M_KD0XSK.js";
|
||||
|
||||
export { resolveConfig };
|
||||
7960
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D-7KCb9p.js
generated
vendored
7960
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D-7KCb9p.js
generated
vendored
File diff suppressed because one or more lines are too long
5595
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-DCVhRpiz.js
generated
vendored
Normal file
5595
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-DCVhRpiz.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
482
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-DDbTn5rw.js
generated
vendored
Normal file
482
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-DDbTn5rw.js
generated
vendored
Normal file
@ -0,0 +1,482 @@
|
||||
import { __commonJS, __require } from "./dep-lCKrEJQm.js";
|
||||
import { require_lib } from "./dep-BuoK8Wda.js";
|
||||
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js
|
||||
var require_format_import_prelude = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js": ((exports, module) => {
|
||||
module.exports = function formatImportPrelude$2(layer, media, supports) {
|
||||
const parts = [];
|
||||
if (typeof layer !== "undefined") {
|
||||
let layerParams = "layer";
|
||||
if (layer) layerParams = `layer(${layer})`;
|
||||
parts.push(layerParams);
|
||||
}
|
||||
if (typeof supports !== "undefined") parts.push(`supports(${supports})`);
|
||||
if (typeof media !== "undefined") parts.push(media);
|
||||
return parts.join(" ");
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js
|
||||
var require_base64_encoded_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js": ((exports, module) => {
|
||||
const formatImportPrelude$1 = require_format_import_prelude();
|
||||
module.exports = function base64EncodedConditionalImport$1(prelude, conditions) {
|
||||
if (!conditions?.length) return prelude;
|
||||
conditions.reverse();
|
||||
const first = conditions.pop();
|
||||
let params = `${prelude} ${formatImportPrelude$1(first.layer, first.media, first.supports)}`;
|
||||
for (const condition of conditions) params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString("base64")}' ${formatImportPrelude$1(condition.layer, condition.media, condition.supports)}`;
|
||||
return params;
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js
|
||||
var require_apply_conditions = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js": ((exports, module) => {
|
||||
const base64EncodedConditionalImport = require_base64_encoded_import();
|
||||
module.exports = function applyConditions$1(bundle, atRule) {
|
||||
const firstImportStatementIndex = bundle.findIndex((stmt) => stmt.type === "import");
|
||||
const lastImportStatementIndex = bundle.findLastIndex((stmt) => stmt.type === "import");
|
||||
bundle.forEach((stmt, index) => {
|
||||
if (stmt.type === "charset" || stmt.type === "warning") return;
|
||||
if (stmt.type === "layer" && (index < lastImportStatementIndex && stmt.conditions?.length || index > firstImportStatementIndex && index < lastImportStatementIndex)) {
|
||||
stmt.type = "import";
|
||||
stmt.node = stmt.node.clone({
|
||||
name: "import",
|
||||
params: base64EncodedConditionalImport(`'data:text/css;base64,${Buffer.from(stmt.node.toString()).toString("base64")}'`, stmt.conditions)
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!stmt.conditions?.length) return;
|
||||
if (stmt.type === "import") {
|
||||
stmt.node.params = base64EncodedConditionalImport(stmt.fullUri, stmt.conditions);
|
||||
return;
|
||||
}
|
||||
let nodes;
|
||||
let parent;
|
||||
if (stmt.type === "layer") {
|
||||
nodes = [stmt.node];
|
||||
parent = stmt.node.parent;
|
||||
} else {
|
||||
nodes = stmt.nodes;
|
||||
parent = nodes[0].parent;
|
||||
}
|
||||
const atRules = [];
|
||||
for (const condition of stmt.conditions) {
|
||||
if (typeof condition.media !== "undefined") {
|
||||
const mediaNode = atRule({
|
||||
name: "media",
|
||||
params: condition.media,
|
||||
source: parent.source
|
||||
});
|
||||
atRules.push(mediaNode);
|
||||
}
|
||||
if (typeof condition.supports !== "undefined") {
|
||||
const supportsNode = atRule({
|
||||
name: "supports",
|
||||
params: `(${condition.supports})`,
|
||||
source: parent.source
|
||||
});
|
||||
atRules.push(supportsNode);
|
||||
}
|
||||
if (typeof condition.layer !== "undefined") {
|
||||
const layerNode = atRule({
|
||||
name: "layer",
|
||||
params: condition.layer,
|
||||
source: parent.source
|
||||
});
|
||||
atRules.push(layerNode);
|
||||
}
|
||||
}
|
||||
const outerAtRule = atRules.shift();
|
||||
const innerAtRule = atRules.reduce((previous, next) => {
|
||||
previous.append(next);
|
||||
return next;
|
||||
}, outerAtRule);
|
||||
parent.insertBefore(nodes[0], outerAtRule);
|
||||
nodes.forEach((node) => {
|
||||
node.parent = void 0;
|
||||
});
|
||||
nodes[0].raws.before = nodes[0].raws.before || "\n";
|
||||
innerAtRule.append(nodes);
|
||||
stmt.type = "nodes";
|
||||
stmt.nodes = [outerAtRule];
|
||||
delete stmt.node;
|
||||
});
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js
|
||||
var require_apply_raws = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js": ((exports, module) => {
|
||||
module.exports = function applyRaws$1(bundle) {
|
||||
bundle.forEach((stmt, index) => {
|
||||
if (index === 0) return;
|
||||
if (stmt.parent) {
|
||||
const { before } = stmt.parent.node.raws;
|
||||
if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
|
||||
else stmt.node.raws.before = before;
|
||||
} else if (stmt.type === "nodes") stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
|
||||
});
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js
|
||||
var require_apply_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js": ((exports, module) => {
|
||||
module.exports = function applyStyles$1(bundle, styles) {
|
||||
styles.nodes = [];
|
||||
bundle.forEach((stmt) => {
|
||||
if ([
|
||||
"charset",
|
||||
"import",
|
||||
"layer"
|
||||
].includes(stmt.type)) {
|
||||
stmt.node.parent = void 0;
|
||||
styles.append(stmt.node);
|
||||
} else if (stmt.type === "nodes") stmt.nodes.forEach((node) => {
|
||||
node.parent = void 0;
|
||||
styles.append(node);
|
||||
});
|
||||
});
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js
|
||||
var require_data_url = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js": ((exports, module) => {
|
||||
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
||||
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
||||
const plainDataURLRegexp = /^data:text\/css;plain,/i;
|
||||
function isValid(url) {
|
||||
return anyDataURLRegexp.test(url);
|
||||
}
|
||||
function contents(url) {
|
||||
if (base64DataURLRegexp.test(url)) return Buffer.from(url.slice(21), "base64").toString();
|
||||
if (plainDataURLRegexp.test(url)) return decodeURIComponent(url.slice(20));
|
||||
return decodeURIComponent(url.slice(14));
|
||||
}
|
||||
module.exports = {
|
||||
isValid,
|
||||
contents
|
||||
};
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js
|
||||
var require_parse_statements = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js": ((exports, module) => {
|
||||
const valueParser = require_lib();
|
||||
const { stringify } = valueParser;
|
||||
module.exports = function parseStatements$1(result, styles, conditions, from) {
|
||||
const statements = [];
|
||||
let nodes = [];
|
||||
let encounteredNonImportNodes = false;
|
||||
styles.each((node) => {
|
||||
let stmt;
|
||||
if (node.type === "atrule") {
|
||||
if (node.name === "import") stmt = parseImport(result, node, conditions, from);
|
||||
else if (node.name === "charset") stmt = parseCharset(result, node, conditions, from);
|
||||
else if (node.name === "layer" && !encounteredNonImportNodes && !node.nodes) stmt = parseLayer(result, node, conditions, from);
|
||||
} else if (node.type !== "comment") encounteredNonImportNodes = true;
|
||||
if (stmt) {
|
||||
if (nodes.length) {
|
||||
statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
conditions: [...conditions],
|
||||
from
|
||||
});
|
||||
nodes = [];
|
||||
}
|
||||
statements.push(stmt);
|
||||
} else nodes.push(node);
|
||||
});
|
||||
if (nodes.length) statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
conditions: [...conditions],
|
||||
from
|
||||
});
|
||||
return statements;
|
||||
};
|
||||
function parseCharset(result, atRule, conditions, from) {
|
||||
if (atRule.prev()) return result.warn("@charset must precede all other statements", { node: atRule });
|
||||
return {
|
||||
type: "charset",
|
||||
node: atRule,
|
||||
conditions: [...conditions],
|
||||
from
|
||||
};
|
||||
}
|
||||
function parseImport(result, atRule, conditions, from) {
|
||||
let prev = atRule.prev();
|
||||
if (prev) do {
|
||||
if (prev.type === "comment" || prev.type === "atrule" && prev.name === "import") {
|
||||
prev = prev.prev();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
} while (prev);
|
||||
if (prev) do {
|
||||
if (prev.type === "comment" || prev.type === "atrule" && (prev.name === "charset" || prev.name === "layer" && !prev.nodes)) {
|
||||
prev = prev.prev();
|
||||
continue;
|
||||
}
|
||||
return result.warn("@import must precede all other statements (besides @charset or empty @layer)", { node: atRule });
|
||||
} while (prev);
|
||||
if (atRule.nodes) return result.warn("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.", { node: atRule });
|
||||
const params = valueParser(atRule.params).nodes;
|
||||
const stmt = {
|
||||
type: "import",
|
||||
uri: "",
|
||||
fullUri: "",
|
||||
node: atRule,
|
||||
conditions: [...conditions],
|
||||
from
|
||||
};
|
||||
let layer;
|
||||
let media;
|
||||
let supports;
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
const node = params[i];
|
||||
if (node.type === "space" || node.type === "comment") continue;
|
||||
if (node.type === "string") {
|
||||
if (stmt.uri) return result.warn(`Multiple url's in '${atRule.toString()}'`, { node: atRule });
|
||||
if (!node.value) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
|
||||
stmt.uri = node.value;
|
||||
stmt.fullUri = stringify(node);
|
||||
continue;
|
||||
}
|
||||
if (node.type === "function" && /^url$/i.test(node.value)) {
|
||||
if (stmt.uri) return result.warn(`Multiple url's in '${atRule.toString()}'`, { node: atRule });
|
||||
if (!node.nodes?.[0]?.value) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
|
||||
stmt.uri = node.nodes[0].value;
|
||||
stmt.fullUri = stringify(node);
|
||||
continue;
|
||||
}
|
||||
if (!stmt.uri) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
|
||||
if ((node.type === "word" || node.type === "function") && /^layer$/i.test(node.value)) {
|
||||
if (typeof layer !== "undefined") return result.warn(`Multiple layers in '${atRule.toString()}'`, { node: atRule });
|
||||
if (typeof supports !== "undefined") return result.warn(`layers must be defined before support conditions in '${atRule.toString()}'`, { node: atRule });
|
||||
if (node.nodes) layer = stringify(node.nodes);
|
||||
else layer = "";
|
||||
continue;
|
||||
}
|
||||
if (node.type === "function" && /^supports$/i.test(node.value)) {
|
||||
if (typeof supports !== "undefined") return result.warn(`Multiple support conditions in '${atRule.toString()}'`, { node: atRule });
|
||||
supports = stringify(node.nodes);
|
||||
continue;
|
||||
}
|
||||
media = stringify(params.slice(i));
|
||||
break;
|
||||
}
|
||||
if (!stmt.uri) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
|
||||
if (typeof media !== "undefined" || typeof layer !== "undefined" || typeof supports !== "undefined") stmt.conditions.push({
|
||||
layer,
|
||||
media,
|
||||
supports
|
||||
});
|
||||
return stmt;
|
||||
}
|
||||
function parseLayer(result, atRule, conditions, from) {
|
||||
return {
|
||||
type: "layer",
|
||||
node: atRule,
|
||||
conditions: [...conditions],
|
||||
from
|
||||
};
|
||||
}
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js
|
||||
var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js": ((exports, module) => {
|
||||
const path$2 = __require("path");
|
||||
let sugarss;
|
||||
module.exports = function processContent$1(result, content, filename, options, postcss) {
|
||||
const { plugins } = options;
|
||||
const ext = path$2.extname(filename);
|
||||
const parserList = [];
|
||||
if (ext === ".sss") {
|
||||
if (!sugarss)
|
||||
/* c8 ignore next 3 */
|
||||
try {
|
||||
sugarss = __require("sugarss");
|
||||
} catch {}
|
||||
if (sugarss) return runPostcss(postcss, content, filename, plugins, [sugarss]);
|
||||
}
|
||||
if (result.opts.syntax?.parse) parserList.push(result.opts.syntax.parse);
|
||||
if (result.opts.parser) parserList.push(result.opts.parser);
|
||||
parserList.push(null);
|
||||
return runPostcss(postcss, content, filename, plugins, parserList);
|
||||
};
|
||||
function runPostcss(postcss, content, filename, plugins, parsers, index) {
|
||||
if (!index) index = 0;
|
||||
return postcss(plugins).process(content, {
|
||||
from: filename,
|
||||
parser: parsers[index]
|
||||
}).catch((err) => {
|
||||
index++;
|
||||
if (index === parsers.length) throw err;
|
||||
return runPostcss(postcss, content, filename, plugins, parsers, index);
|
||||
});
|
||||
}
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js
|
||||
var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js": ((exports, module) => {
|
||||
const path$1 = __require("path");
|
||||
const dataURL = require_data_url();
|
||||
const parseStatements = require_parse_statements();
|
||||
const processContent = require_process_content();
|
||||
const resolveId$1 = (id) => id;
|
||||
const formatImportPrelude = require_format_import_prelude();
|
||||
async function parseStyles$1(result, styles, options, state, conditions, from, postcss) {
|
||||
const statements = parseStatements(result, styles, conditions, from);
|
||||
for (const stmt of statements) {
|
||||
if (stmt.type !== "import" || !isProcessableURL(stmt.uri)) continue;
|
||||
if (options.filter && !options.filter(stmt.uri)) continue;
|
||||
await resolveImportId(result, stmt, options, state, postcss);
|
||||
}
|
||||
let charset;
|
||||
const beforeBundle = [];
|
||||
const bundle = [];
|
||||
function handleCharset(stmt) {
|
||||
if (!charset) charset = stmt;
|
||||
else if (stmt.node.params.toLowerCase() !== charset.node.params.toLowerCase()) throw stmt.node.error(`Incompatible @charset statements:
|
||||
${stmt.node.params} specified in ${stmt.node.source.input.file}
|
||||
${charset.node.params} specified in ${charset.node.source.input.file}`);
|
||||
}
|
||||
statements.forEach((stmt) => {
|
||||
if (stmt.type === "charset") handleCharset(stmt);
|
||||
else if (stmt.type === "import") if (stmt.children) stmt.children.forEach((child, index) => {
|
||||
if (child.type === "import") beforeBundle.push(child);
|
||||
else if (child.type === "layer") beforeBundle.push(child);
|
||||
else if (child.type === "charset") handleCharset(child);
|
||||
else bundle.push(child);
|
||||
if (index === 0) child.parent = stmt;
|
||||
});
|
||||
else beforeBundle.push(stmt);
|
||||
else if (stmt.type === "layer") beforeBundle.push(stmt);
|
||||
else if (stmt.type === "nodes") bundle.push(stmt);
|
||||
});
|
||||
return charset ? [charset, ...beforeBundle.concat(bundle)] : beforeBundle.concat(bundle);
|
||||
}
|
||||
async function resolveImportId(result, stmt, options, state, postcss) {
|
||||
if (dataURL.isValid(stmt.uri)) {
|
||||
stmt.children = await loadImportContent(result, stmt, stmt.uri, options, state, postcss);
|
||||
return;
|
||||
} else if (dataURL.isValid(stmt.from.slice(-1))) throw stmt.node.error(`Unable to import '${stmt.uri}' from a stylesheet that is embedded in a data url`);
|
||||
const atRule = stmt.node;
|
||||
let sourceFile;
|
||||
if (atRule.source?.input?.file) sourceFile = atRule.source.input.file;
|
||||
const base = sourceFile ? path$1.dirname(atRule.source.input.file) : options.root;
|
||||
const paths = [await options.resolve(stmt.uri, base, options, atRule)].flat();
|
||||
const resolved = await Promise.all(paths.map((file) => {
|
||||
return !path$1.isAbsolute(file) ? resolveId$1(file, base, options, atRule) : file;
|
||||
}));
|
||||
resolved.forEach((file) => {
|
||||
result.messages.push({
|
||||
type: "dependency",
|
||||
plugin: "postcss-import",
|
||||
file,
|
||||
parent: sourceFile
|
||||
});
|
||||
});
|
||||
const importedContent = await Promise.all(resolved.map((file) => {
|
||||
return loadImportContent(result, stmt, file, options, state, postcss);
|
||||
}));
|
||||
stmt.children = importedContent.flat().filter((x) => !!x);
|
||||
}
|
||||
async function loadImportContent(result, stmt, filename, options, state, postcss) {
|
||||
const atRule = stmt.node;
|
||||
const { conditions, from } = stmt;
|
||||
const stmtDuplicateCheckKey = conditions.map((condition) => formatImportPrelude(condition.layer, condition.media, condition.supports)).join(":");
|
||||
if (options.skipDuplicates) {
|
||||
if (state.importedFiles[filename]?.[stmtDuplicateCheckKey]) return;
|
||||
if (!state.importedFiles[filename]) state.importedFiles[filename] = {};
|
||||
state.importedFiles[filename][stmtDuplicateCheckKey] = true;
|
||||
}
|
||||
if (from.includes(filename)) return;
|
||||
const content = await options.load(filename, options);
|
||||
if (content.trim() === "" && options.warnOnEmpty) {
|
||||
result.warn(`${filename} is empty`, { node: atRule });
|
||||
return;
|
||||
}
|
||||
if (options.skipDuplicates && state.hashFiles[content]?.[stmtDuplicateCheckKey]) return;
|
||||
const importedResult = await processContent(result, content, filename, options, postcss);
|
||||
const styles = importedResult.root;
|
||||
result.messages = result.messages.concat(importedResult.messages);
|
||||
if (options.skipDuplicates) {
|
||||
const hasImport = styles.some((child) => {
|
||||
return child.type === "atrule" && child.name === "import";
|
||||
});
|
||||
if (!hasImport) {
|
||||
if (!state.hashFiles[content]) state.hashFiles[content] = {};
|
||||
state.hashFiles[content][stmtDuplicateCheckKey] = true;
|
||||
}
|
||||
}
|
||||
return parseStyles$1(result, styles, options, state, conditions, [...from, filename], postcss);
|
||||
}
|
||||
function isProcessableURL(uri) {
|
||||
if (/^(?:[a-z]+:)?\/\//i.test(uri)) return false;
|
||||
try {
|
||||
const url = new URL(uri, "https://example.com");
|
||||
if (url.search) return false;
|
||||
} catch {}
|
||||
return true;
|
||||
}
|
||||
module.exports = parseStyles$1;
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js
|
||||
var require_postcss_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js": ((exports, module) => {
|
||||
const path = __require("path");
|
||||
const applyConditions = require_apply_conditions();
|
||||
const applyRaws = require_apply_raws();
|
||||
const applyStyles = require_apply_styles();
|
||||
const loadContent = () => "";
|
||||
const parseStyles = require_parse_styles();
|
||||
const resolveId = (id) => id;
|
||||
function AtImport(options) {
|
||||
options = {
|
||||
root: process.cwd(),
|
||||
path: [],
|
||||
skipDuplicates: true,
|
||||
resolve: resolveId,
|
||||
load: loadContent,
|
||||
plugins: [],
|
||||
addModulesDirectories: [],
|
||||
warnOnEmpty: true,
|
||||
...options
|
||||
};
|
||||
options.root = path.resolve(options.root);
|
||||
if (typeof options.path === "string") options.path = [options.path];
|
||||
if (!Array.isArray(options.path)) options.path = [];
|
||||
options.path = options.path.map((p) => path.resolve(options.root, p));
|
||||
return {
|
||||
postcssPlugin: "postcss-import",
|
||||
async Once(styles, { result, atRule, postcss }) {
|
||||
const state = {
|
||||
importedFiles: {},
|
||||
hashFiles: {}
|
||||
};
|
||||
if (styles.source?.input?.file) state.importedFiles[styles.source.input.file] = {};
|
||||
if (options.plugins && !Array.isArray(options.plugins)) throw new Error("plugins option must be an array");
|
||||
const bundle = await parseStyles(result, styles, options, state, [], [], postcss);
|
||||
applyRaws(bundle);
|
||||
applyConditions(bundle, atRule);
|
||||
applyStyles(bundle, styles);
|
||||
}
|
||||
};
|
||||
}
|
||||
AtImport.postcss = true;
|
||||
module.exports = AtImport;
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
export default require_postcss_import();
|
||||
|
||||
export { };
|
||||
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D_YDhiNx.js
generated
vendored
Normal file
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D_YDhiNx.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "./dep-SmwnYDP9.js";
|
||||
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-M_KD0XSK.js";
|
||||
|
||||
export { createServer };
|
||||
67047
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D_zLpgQd.js
generated
vendored
67047
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-D_zLpgQd.js
generated
vendored
File diff suppressed because one or more lines are too long
561
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-IQS-Za7F.js
generated
vendored
561
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-IQS-Za7F.js
generated
vendored
@ -1,561 +0,0 @@
|
||||
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
||||
import { dirname as __cjs_dirname } from 'node:path';
|
||||
import { createRequire as __cjs_createRequire } from 'node:module';
|
||||
|
||||
const __filename = __cjs_fileURLToPath(import.meta.url);
|
||||
const __dirname = __cjs_dirname(__filename);
|
||||
const require = __cjs_createRequire(import.meta.url);
|
||||
const __require = require;
|
||||
var openParentheses = "(".charCodeAt(0);
|
||||
var closeParentheses = ")".charCodeAt(0);
|
||||
var singleQuote = "'".charCodeAt(0);
|
||||
var doubleQuote = '"'.charCodeAt(0);
|
||||
var backslash = "\\".charCodeAt(0);
|
||||
var slash = "/".charCodeAt(0);
|
||||
var comma = ",".charCodeAt(0);
|
||||
var colon = ":".charCodeAt(0);
|
||||
var star = "*".charCodeAt(0);
|
||||
var uLower = "u".charCodeAt(0);
|
||||
var uUpper = "U".charCodeAt(0);
|
||||
var plus = "+".charCodeAt(0);
|
||||
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
||||
|
||||
var parse$1 = function(input) {
|
||||
var tokens = [];
|
||||
var value = input;
|
||||
|
||||
var next,
|
||||
quote,
|
||||
prev,
|
||||
token,
|
||||
escape,
|
||||
escapePos,
|
||||
whitespacePos,
|
||||
parenthesesOpenPos;
|
||||
var pos = 0;
|
||||
var code = value.charCodeAt(pos);
|
||||
var max = value.length;
|
||||
var stack = [{ nodes: tokens }];
|
||||
var balanced = 0;
|
||||
var parent;
|
||||
|
||||
var name = "";
|
||||
var before = "";
|
||||
var after = "";
|
||||
|
||||
while (pos < max) {
|
||||
// Whitespaces
|
||||
if (code <= 32) {
|
||||
next = pos;
|
||||
do {
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (code <= 32);
|
||||
token = value.slice(pos, next);
|
||||
|
||||
prev = tokens[tokens.length - 1];
|
||||
if (code === closeParentheses && balanced) {
|
||||
after = token;
|
||||
} else if (prev && prev.type === "div") {
|
||||
prev.after = token;
|
||||
prev.sourceEndIndex += token.length;
|
||||
} else if (
|
||||
code === comma ||
|
||||
code === colon ||
|
||||
(code === slash &&
|
||||
value.charCodeAt(next + 1) !== star &&
|
||||
(!parent ||
|
||||
(parent && parent.type === "function" && parent.value !== "calc")))
|
||||
) {
|
||||
before = token;
|
||||
} else {
|
||||
tokens.push({
|
||||
type: "space",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
}
|
||||
|
||||
pos = next;
|
||||
|
||||
// Quotes
|
||||
} else if (code === singleQuote || code === doubleQuote) {
|
||||
next = pos;
|
||||
quote = code === singleQuote ? "'" : '"';
|
||||
token = {
|
||||
type: "string",
|
||||
sourceIndex: pos,
|
||||
quote: quote
|
||||
};
|
||||
do {
|
||||
escape = false;
|
||||
next = value.indexOf(quote, next + 1);
|
||||
if (~next) {
|
||||
escapePos = next;
|
||||
while (value.charCodeAt(escapePos - 1) === backslash) {
|
||||
escapePos -= 1;
|
||||
escape = !escape;
|
||||
}
|
||||
} else {
|
||||
value += quote;
|
||||
next = value.length - 1;
|
||||
token.unclosed = true;
|
||||
}
|
||||
} while (escape);
|
||||
token.value = value.slice(pos + 1, next);
|
||||
token.sourceEndIndex = token.unclosed ? next : next + 1;
|
||||
tokens.push(token);
|
||||
pos = next + 1;
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
// Comments
|
||||
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
|
||||
next = value.indexOf("*/", pos);
|
||||
|
||||
token = {
|
||||
type: "comment",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next + 2
|
||||
};
|
||||
|
||||
if (next === -1) {
|
||||
token.unclosed = true;
|
||||
next = value.length;
|
||||
token.sourceEndIndex = next;
|
||||
}
|
||||
|
||||
token.value = value.slice(pos + 2, next);
|
||||
tokens.push(token);
|
||||
|
||||
pos = next + 2;
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
// Operation within calc
|
||||
} else if (
|
||||
(code === slash || code === star) &&
|
||||
parent &&
|
||||
parent.type === "function" &&
|
||||
parent.value === "calc"
|
||||
) {
|
||||
token = value[pos];
|
||||
tokens.push({
|
||||
type: "word",
|
||||
sourceIndex: pos - before.length,
|
||||
sourceEndIndex: pos + token.length,
|
||||
value: token
|
||||
});
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
// Dividers
|
||||
} else if (code === slash || code === comma || code === colon) {
|
||||
token = value[pos];
|
||||
|
||||
tokens.push({
|
||||
type: "div",
|
||||
sourceIndex: pos - before.length,
|
||||
sourceEndIndex: pos + token.length,
|
||||
value: token,
|
||||
before: before,
|
||||
after: ""
|
||||
});
|
||||
before = "";
|
||||
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
// Open parentheses
|
||||
} else if (openParentheses === code) {
|
||||
// Whitespaces after open parentheses
|
||||
next = pos;
|
||||
do {
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (code <= 32);
|
||||
parenthesesOpenPos = pos;
|
||||
token = {
|
||||
type: "function",
|
||||
sourceIndex: pos - name.length,
|
||||
value: name,
|
||||
before: value.slice(parenthesesOpenPos + 1, next)
|
||||
};
|
||||
pos = next;
|
||||
|
||||
if (name === "url" && code !== singleQuote && code !== doubleQuote) {
|
||||
next -= 1;
|
||||
do {
|
||||
escape = false;
|
||||
next = value.indexOf(")", next + 1);
|
||||
if (~next) {
|
||||
escapePos = next;
|
||||
while (value.charCodeAt(escapePos - 1) === backslash) {
|
||||
escapePos -= 1;
|
||||
escape = !escape;
|
||||
}
|
||||
} else {
|
||||
value += ")";
|
||||
next = value.length - 1;
|
||||
token.unclosed = true;
|
||||
}
|
||||
} while (escape);
|
||||
// Whitespaces before closed
|
||||
whitespacePos = next;
|
||||
do {
|
||||
whitespacePos -= 1;
|
||||
code = value.charCodeAt(whitespacePos);
|
||||
} while (code <= 32);
|
||||
if (parenthesesOpenPos < whitespacePos) {
|
||||
if (pos !== whitespacePos + 1) {
|
||||
token.nodes = [
|
||||
{
|
||||
type: "word",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: whitespacePos + 1,
|
||||
value: value.slice(pos, whitespacePos + 1)
|
||||
}
|
||||
];
|
||||
} else {
|
||||
token.nodes = [];
|
||||
}
|
||||
if (token.unclosed && whitespacePos + 1 !== next) {
|
||||
token.after = "";
|
||||
token.nodes.push({
|
||||
type: "space",
|
||||
sourceIndex: whitespacePos + 1,
|
||||
sourceEndIndex: next,
|
||||
value: value.slice(whitespacePos + 1, next)
|
||||
});
|
||||
} else {
|
||||
token.after = value.slice(whitespacePos + 1, next);
|
||||
token.sourceEndIndex = next;
|
||||
}
|
||||
} else {
|
||||
token.after = "";
|
||||
token.nodes = [];
|
||||
}
|
||||
pos = next + 1;
|
||||
token.sourceEndIndex = token.unclosed ? next : pos;
|
||||
code = value.charCodeAt(pos);
|
||||
tokens.push(token);
|
||||
} else {
|
||||
balanced += 1;
|
||||
token.after = "";
|
||||
token.sourceEndIndex = pos + 1;
|
||||
tokens.push(token);
|
||||
stack.push(token);
|
||||
tokens = token.nodes = [];
|
||||
parent = token;
|
||||
}
|
||||
name = "";
|
||||
|
||||
// Close parentheses
|
||||
} else if (closeParentheses === code && balanced) {
|
||||
pos += 1;
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
parent.after = after;
|
||||
parent.sourceEndIndex += after.length;
|
||||
after = "";
|
||||
balanced -= 1;
|
||||
stack[stack.length - 1].sourceEndIndex = pos;
|
||||
stack.pop();
|
||||
parent = stack[balanced];
|
||||
tokens = parent.nodes;
|
||||
|
||||
// Words
|
||||
} else {
|
||||
next = pos;
|
||||
do {
|
||||
if (code === backslash) {
|
||||
next += 1;
|
||||
}
|
||||
next += 1;
|
||||
code = value.charCodeAt(next);
|
||||
} while (
|
||||
next < max &&
|
||||
!(
|
||||
code <= 32 ||
|
||||
code === singleQuote ||
|
||||
code === doubleQuote ||
|
||||
code === comma ||
|
||||
code === colon ||
|
||||
code === slash ||
|
||||
code === openParentheses ||
|
||||
(code === star &&
|
||||
parent &&
|
||||
parent.type === "function" &&
|
||||
parent.value === "calc") ||
|
||||
(code === slash &&
|
||||
parent.type === "function" &&
|
||||
parent.value === "calc") ||
|
||||
(code === closeParentheses && balanced)
|
||||
)
|
||||
);
|
||||
token = value.slice(pos, next);
|
||||
|
||||
if (openParentheses === code) {
|
||||
name = token;
|
||||
} else if (
|
||||
(uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&
|
||||
plus === token.charCodeAt(1) &&
|
||||
isUnicodeRange.test(token.slice(2))
|
||||
) {
|
||||
tokens.push({
|
||||
type: "unicode-range",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
} else {
|
||||
tokens.push({
|
||||
type: "word",
|
||||
sourceIndex: pos,
|
||||
sourceEndIndex: next,
|
||||
value: token
|
||||
});
|
||||
}
|
||||
|
||||
pos = next;
|
||||
}
|
||||
}
|
||||
|
||||
for (pos = stack.length - 1; pos; pos -= 1) {
|
||||
stack[pos].unclosed = true;
|
||||
stack[pos].sourceEndIndex = value.length;
|
||||
}
|
||||
|
||||
return stack[0].nodes;
|
||||
};
|
||||
|
||||
var walk$1 = function walk(nodes, cb, bubble) {
|
||||
var i, max, node, result;
|
||||
|
||||
for (i = 0, max = nodes.length; i < max; i += 1) {
|
||||
node = nodes[i];
|
||||
if (!bubble) {
|
||||
result = cb(node, i, nodes);
|
||||
}
|
||||
|
||||
if (
|
||||
result !== false &&
|
||||
node.type === "function" &&
|
||||
Array.isArray(node.nodes)
|
||||
) {
|
||||
walk(node.nodes, cb, bubble);
|
||||
}
|
||||
|
||||
if (bubble) {
|
||||
cb(node, i, nodes);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function stringifyNode(node, custom) {
|
||||
var type = node.type;
|
||||
var value = node.value;
|
||||
var buf;
|
||||
var customResult;
|
||||
|
||||
if (custom && (customResult = custom(node)) !== undefined) {
|
||||
return customResult;
|
||||
} else if (type === "word" || type === "space") {
|
||||
return value;
|
||||
} else if (type === "string") {
|
||||
buf = node.quote || "";
|
||||
return buf + value + (node.unclosed ? "" : buf);
|
||||
} else if (type === "comment") {
|
||||
return "/*" + value + (node.unclosed ? "" : "*/");
|
||||
} else if (type === "div") {
|
||||
return (node.before || "") + value + (node.after || "");
|
||||
} else if (Array.isArray(node.nodes)) {
|
||||
buf = stringify$1(node.nodes, custom);
|
||||
if (type !== "function") {
|
||||
return buf;
|
||||
}
|
||||
return (
|
||||
value +
|
||||
"(" +
|
||||
(node.before || "") +
|
||||
buf +
|
||||
(node.after || "") +
|
||||
(node.unclosed ? "" : ")")
|
||||
);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function stringify$1(nodes, custom) {
|
||||
var result, i;
|
||||
|
||||
if (Array.isArray(nodes)) {
|
||||
result = "";
|
||||
for (i = nodes.length - 1; ~i; i -= 1) {
|
||||
result = stringifyNode(nodes[i], custom) + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return stringifyNode(nodes, custom);
|
||||
}
|
||||
|
||||
var stringify_1 = stringify$1;
|
||||
|
||||
var unit;
|
||||
var hasRequiredUnit;
|
||||
|
||||
function requireUnit () {
|
||||
if (hasRequiredUnit) return unit;
|
||||
hasRequiredUnit = 1;
|
||||
var minus = "-".charCodeAt(0);
|
||||
var plus = "+".charCodeAt(0);
|
||||
var dot = ".".charCodeAt(0);
|
||||
var exp = "e".charCodeAt(0);
|
||||
var EXP = "E".charCodeAt(0);
|
||||
|
||||
// Check if three code points would start a number
|
||||
// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
|
||||
function likeNumber(value) {
|
||||
var code = value.charCodeAt(0);
|
||||
var nextCode;
|
||||
|
||||
if (code === plus || code === minus) {
|
||||
nextCode = value.charCodeAt(1);
|
||||
|
||||
if (nextCode >= 48 && nextCode <= 57) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var nextNextCode = value.charCodeAt(2);
|
||||
|
||||
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (code === dot) {
|
||||
nextCode = value.charCodeAt(1);
|
||||
|
||||
if (nextCode >= 48 && nextCode <= 57) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (code >= 48 && code <= 57) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Consume a number
|
||||
// https://www.w3.org/TR/css-syntax-3/#consume-number
|
||||
unit = function(value) {
|
||||
var pos = 0;
|
||||
var length = value.length;
|
||||
var code;
|
||||
var nextCode;
|
||||
var nextNextCode;
|
||||
|
||||
if (length === 0 || !likeNumber(value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
if (code === plus || code === minus) {
|
||||
pos++;
|
||||
}
|
||||
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
if (code < 48 || code > 57) {
|
||||
break;
|
||||
}
|
||||
|
||||
pos += 1;
|
||||
}
|
||||
|
||||
code = value.charCodeAt(pos);
|
||||
nextCode = value.charCodeAt(pos + 1);
|
||||
|
||||
if (code === dot && nextCode >= 48 && nextCode <= 57) {
|
||||
pos += 2;
|
||||
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
if (code < 48 || code > 57) {
|
||||
break;
|
||||
}
|
||||
|
||||
pos += 1;
|
||||
}
|
||||
}
|
||||
|
||||
code = value.charCodeAt(pos);
|
||||
nextCode = value.charCodeAt(pos + 1);
|
||||
nextNextCode = value.charCodeAt(pos + 2);
|
||||
|
||||
if (
|
||||
(code === exp || code === EXP) &&
|
||||
((nextCode >= 48 && nextCode <= 57) ||
|
||||
((nextCode === plus || nextCode === minus) &&
|
||||
nextNextCode >= 48 &&
|
||||
nextNextCode <= 57))
|
||||
) {
|
||||
pos += nextCode === plus || nextCode === minus ? 3 : 2;
|
||||
|
||||
while (pos < length) {
|
||||
code = value.charCodeAt(pos);
|
||||
|
||||
if (code < 48 || code > 57) {
|
||||
break;
|
||||
}
|
||||
|
||||
pos += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
number: value.slice(0, pos),
|
||||
unit: value.slice(pos)
|
||||
};
|
||||
};
|
||||
return unit;
|
||||
}
|
||||
|
||||
var parse = parse$1;
|
||||
var walk = walk$1;
|
||||
var stringify = stringify_1;
|
||||
|
||||
function ValueParser(value) {
|
||||
if (this instanceof ValueParser) {
|
||||
this.nodes = parse(value);
|
||||
return this;
|
||||
}
|
||||
return new ValueParser(value);
|
||||
}
|
||||
|
||||
ValueParser.prototype.toString = function() {
|
||||
return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
|
||||
};
|
||||
|
||||
ValueParser.prototype.walk = function(cb, bubble) {
|
||||
walk(this.nodes, cb, bubble);
|
||||
return this;
|
||||
};
|
||||
|
||||
ValueParser.unit = requireUnit();
|
||||
|
||||
ValueParser.walk = walk;
|
||||
|
||||
ValueParser.stringify = stringify;
|
||||
|
||||
var lib = ValueParser;
|
||||
|
||||
export { lib as l };
|
||||
36707
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js
generated
vendored
Normal file
36707
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
320
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-SmwnYDP9.js
generated
vendored
Normal file
320
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-SmwnYDP9.js
generated
vendored
Normal file
@ -0,0 +1,320 @@
|
||||
import { __commonJS, __toESM } from "./dep-lCKrEJQm.js";
|
||||
import { readFileSync } from "node:fs";
|
||||
import path, { resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import readline from "node:readline";
|
||||
|
||||
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
||||
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
||||
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
||||
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
||||
let formatter = (open, close, replace = open) => (input) => {
|
||||
let string = "" + input, index = string.indexOf(close, open.length);
|
||||
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
||||
};
|
||||
let replaceClose = (string, close, replace, index) => {
|
||||
let result = "", cursor = 0;
|
||||
do {
|
||||
result += string.substring(cursor, index) + replace;
|
||||
cursor = index + close.length;
|
||||
index = string.indexOf(close, cursor);
|
||||
} while (~index);
|
||||
return result + string.substring(cursor);
|
||||
};
|
||||
let createColors = (enabled = isColorSupported) => {
|
||||
let f = enabled ? formatter : () => String;
|
||||
return {
|
||||
isColorSupported: enabled,
|
||||
reset: f("\x1B[0m", "\x1B[0m"),
|
||||
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
||||
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
||||
italic: f("\x1B[3m", "\x1B[23m"),
|
||||
underline: f("\x1B[4m", "\x1B[24m"),
|
||||
inverse: f("\x1B[7m", "\x1B[27m"),
|
||||
hidden: f("\x1B[8m", "\x1B[28m"),
|
||||
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
||||
black: f("\x1B[30m", "\x1B[39m"),
|
||||
red: f("\x1B[31m", "\x1B[39m"),
|
||||
green: f("\x1B[32m", "\x1B[39m"),
|
||||
yellow: f("\x1B[33m", "\x1B[39m"),
|
||||
blue: f("\x1B[34m", "\x1B[39m"),
|
||||
magenta: f("\x1B[35m", "\x1B[39m"),
|
||||
cyan: f("\x1B[36m", "\x1B[39m"),
|
||||
white: f("\x1B[37m", "\x1B[39m"),
|
||||
gray: f("\x1B[90m", "\x1B[39m"),
|
||||
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
||||
bgRed: f("\x1B[41m", "\x1B[49m"),
|
||||
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
||||
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
||||
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
||||
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
||||
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
||||
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
||||
blackBright: f("\x1B[90m", "\x1B[39m"),
|
||||
redBright: f("\x1B[91m", "\x1B[39m"),
|
||||
greenBright: f("\x1B[92m", "\x1B[39m"),
|
||||
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
||||
blueBright: f("\x1B[94m", "\x1B[39m"),
|
||||
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
||||
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
||||
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
||||
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
||||
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
||||
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
||||
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
||||
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
||||
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
||||
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
||||
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
||||
};
|
||||
};
|
||||
module.exports = createColors();
|
||||
module.exports.createColors = createColors;
|
||||
}) });
|
||||
|
||||
//#endregion
|
||||
//#region src/node/constants.ts
|
||||
const { version } = JSON.parse(readFileSync(new URL("../../package.json", new URL("../../../src/node/constants.ts", import.meta.url))).toString());
|
||||
const ROLLUP_HOOKS = [
|
||||
"options",
|
||||
"buildStart",
|
||||
"buildEnd",
|
||||
"renderStart",
|
||||
"renderError",
|
||||
"renderChunk",
|
||||
"writeBundle",
|
||||
"generateBundle",
|
||||
"banner",
|
||||
"footer",
|
||||
"augmentChunkHash",
|
||||
"outputOptions",
|
||||
"renderDynamicImport",
|
||||
"resolveFileUrl",
|
||||
"resolveImportMeta",
|
||||
"intro",
|
||||
"outro",
|
||||
"closeBundle",
|
||||
"closeWatcher",
|
||||
"load",
|
||||
"moduleParsed",
|
||||
"watchChange",
|
||||
"resolveDynamicImport",
|
||||
"resolveId",
|
||||
"shouldTransformCachedModule",
|
||||
"transform",
|
||||
"onLog"
|
||||
];
|
||||
const VERSION = version;
|
||||
const DEFAULT_MAIN_FIELDS = [
|
||||
"browser",
|
||||
"module",
|
||||
"jsnext:main",
|
||||
"jsnext"
|
||||
];
|
||||
const DEFAULT_CLIENT_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS);
|
||||
const DEFAULT_SERVER_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS.filter((f) => f !== "browser"));
|
||||
/**
|
||||
* A special condition that would be replaced with production or development
|
||||
* depending on NODE_ENV env variable
|
||||
*/
|
||||
const DEV_PROD_CONDITION = `development|production`;
|
||||
const DEFAULT_CONDITIONS = [
|
||||
"module",
|
||||
"browser",
|
||||
"node",
|
||||
DEV_PROD_CONDITION
|
||||
];
|
||||
const DEFAULT_CLIENT_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "node"));
|
||||
const DEFAULT_SERVER_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "browser"));
|
||||
const DEFAULT_EXTERNAL_CONDITIONS = Object.freeze(["node", "module-sync"]);
|
||||
/**
|
||||
* The browser versions that are included in the Baseline Widely Available on 2025-05-01.
|
||||
*
|
||||
* This value would be bumped on each major release of Vite.
|
||||
*
|
||||
* The value is generated by `pnpm generate-target` script.
|
||||
*/
|
||||
const ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET = [
|
||||
"chrome107",
|
||||
"edge107",
|
||||
"firefox104",
|
||||
"safari16"
|
||||
];
|
||||
const DEFAULT_CONFIG_FILES = [
|
||||
"vite.config.js",
|
||||
"vite.config.mjs",
|
||||
"vite.config.ts",
|
||||
"vite.config.cjs",
|
||||
"vite.config.mts",
|
||||
"vite.config.cts"
|
||||
];
|
||||
const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
|
||||
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
|
||||
const OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
|
||||
const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
|
||||
/**
|
||||
* Prefix for resolved fs paths, since windows paths may not be valid as URLs.
|
||||
*/
|
||||
const FS_PREFIX = `/@fs/`;
|
||||
const CLIENT_PUBLIC_PATH = `/@vite/client`;
|
||||
const ENV_PUBLIC_PATH = `/@vite/env`;
|
||||
const VITE_PACKAGE_DIR = resolve(fileURLToPath(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
|
||||
const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs");
|
||||
const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs");
|
||||
const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
|
||||
const KNOWN_ASSET_TYPES = [
|
||||
"apng",
|
||||
"bmp",
|
||||
"png",
|
||||
"jpe?g",
|
||||
"jfif",
|
||||
"pjpeg",
|
||||
"pjp",
|
||||
"gif",
|
||||
"svg",
|
||||
"ico",
|
||||
"webp",
|
||||
"avif",
|
||||
"cur",
|
||||
"jxl",
|
||||
"mp4",
|
||||
"webm",
|
||||
"ogg",
|
||||
"mp3",
|
||||
"wav",
|
||||
"flac",
|
||||
"aac",
|
||||
"opus",
|
||||
"mov",
|
||||
"m4a",
|
||||
"vtt",
|
||||
"woff2?",
|
||||
"eot",
|
||||
"ttf",
|
||||
"otf",
|
||||
"webmanifest",
|
||||
"pdf",
|
||||
"txt"
|
||||
];
|
||||
const DEFAULT_ASSETS_RE = new RegExp(`\\.(` + KNOWN_ASSET_TYPES.join("|") + `)(\\?.*)?$`, "i");
|
||||
const DEP_VERSION_RE = /[?&](v=[\w.-]+)\b/;
|
||||
const loopbackHosts = new Set([
|
||||
"localhost",
|
||||
"127.0.0.1",
|
||||
"::1",
|
||||
"0000:0000:0000:0000:0000:0000:0000:0001"
|
||||
]);
|
||||
const wildcardHosts = new Set([
|
||||
"0.0.0.0",
|
||||
"::",
|
||||
"0000:0000:0000:0000:0000:0000:0000:0000"
|
||||
]);
|
||||
const DEFAULT_DEV_PORT = 5173;
|
||||
const DEFAULT_PREVIEW_PORT = 4173;
|
||||
const DEFAULT_ASSETS_INLINE_LIMIT = 4096;
|
||||
const defaultAllowedOrigins = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
|
||||
const METADATA_FILENAME = "_metadata.json";
|
||||
const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = "ERR_OPTIMIZE_DEPS_PROCESSING_ERROR";
|
||||
const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = "ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR";
|
||||
|
||||
//#endregion
|
||||
//#region src/node/logger.ts
|
||||
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
||||
const LogLevels = {
|
||||
silent: 0,
|
||||
error: 1,
|
||||
warn: 2,
|
||||
info: 3
|
||||
};
|
||||
let lastType;
|
||||
let lastMsg;
|
||||
let sameCount = 0;
|
||||
function clearScreen() {
|
||||
const repeatCount = process.stdout.rows - 2;
|
||||
const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
|
||||
console.log(blank);
|
||||
readline.cursorTo(process.stdout, 0, 0);
|
||||
readline.clearScreenDown(process.stdout);
|
||||
}
|
||||
let timeFormatter;
|
||||
function getTimeFormatter() {
|
||||
timeFormatter ??= new Intl.DateTimeFormat(void 0, {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
second: "numeric"
|
||||
});
|
||||
return timeFormatter;
|
||||
}
|
||||
function createLogger(level = "info", options = {}) {
|
||||
if (options.customLogger) return options.customLogger;
|
||||
const loggedErrors = /* @__PURE__ */ new WeakSet();
|
||||
const { prefix = "[vite]", allowClearScreen = true, console: console$1 = globalThis.console } = options;
|
||||
const thresh = LogLevels[level];
|
||||
const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
|
||||
const clear = canClearScreen ? clearScreen : () => {};
|
||||
function format(type, msg, options$1 = {}) {
|
||||
if (options$1.timestamp) {
|
||||
let tag = "";
|
||||
if (type === "info") tag = import_picocolors.default.cyan(import_picocolors.default.bold(prefix));
|
||||
else if (type === "warn") tag = import_picocolors.default.yellow(import_picocolors.default.bold(prefix));
|
||||
else tag = import_picocolors.default.red(import_picocolors.default.bold(prefix));
|
||||
const environment = options$1.environment ? options$1.environment + " " : "";
|
||||
return `${import_picocolors.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
|
||||
} else return msg;
|
||||
}
|
||||
function output(type, msg, options$1 = {}) {
|
||||
if (thresh >= LogLevels[type]) {
|
||||
const method = type === "info" ? "log" : type;
|
||||
if (options$1.error) loggedErrors.add(options$1.error);
|
||||
if (canClearScreen) if (type === lastType && msg === lastMsg) {
|
||||
sameCount++;
|
||||
clear();
|
||||
console$1[method](format(type, msg, options$1), import_picocolors.default.yellow(`(x${sameCount + 1})`));
|
||||
} else {
|
||||
sameCount = 0;
|
||||
lastMsg = msg;
|
||||
lastType = type;
|
||||
if (options$1.clear) clear();
|
||||
console$1[method](format(type, msg, options$1));
|
||||
}
|
||||
else console$1[method](format(type, msg, options$1));
|
||||
}
|
||||
}
|
||||
const warnedMessages = /* @__PURE__ */ new Set();
|
||||
const logger = {
|
||||
hasWarned: false,
|
||||
info(msg, opts) {
|
||||
output("info", msg, opts);
|
||||
},
|
||||
warn(msg, opts) {
|
||||
logger.hasWarned = true;
|
||||
output("warn", msg, opts);
|
||||
},
|
||||
warnOnce(msg, opts) {
|
||||
if (warnedMessages.has(msg)) return;
|
||||
logger.hasWarned = true;
|
||||
output("warn", msg, opts);
|
||||
warnedMessages.add(msg);
|
||||
},
|
||||
error(msg, opts) {
|
||||
logger.hasWarned = true;
|
||||
output("error", msg, opts);
|
||||
},
|
||||
clearScreen(type) {
|
||||
if (thresh >= LogLevels[type]) clear();
|
||||
},
|
||||
hasErrorLogged(error) {
|
||||
return loggedErrors.has(error);
|
||||
}
|
||||
};
|
||||
return logger;
|
||||
}
|
||||
function printServerUrls(urls, optionsHost, info) {
|
||||
const colorUrl = (url) => import_picocolors.default.cyan(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
||||
for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
|
||||
for (const url of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}`);
|
||||
if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors.default.dim(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: use `) + import_picocolors.default.bold("--host") + import_picocolors.default.dim(" to expose"));
|
||||
}
|
||||
|
||||
//#endregion
|
||||
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, LogLevels, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, createLogger, defaultAllowedOrigins, loopbackHosts, printServerUrls, require_picocolors, wildcardHosts };
|
||||
993
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-YkMKzX4u.js
generated
vendored
993
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-YkMKzX4u.js
generated
vendored
@ -1,993 +0,0 @@
|
||||
import { C as getDefaultExportFromCjs } from './dep-D_zLpgQd.js';
|
||||
import require$$0 from 'path';
|
||||
import require$$0__default from 'fs';
|
||||
import { l as lib } from './dep-IQS-Za7F.js';
|
||||
|
||||
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
||||
import { dirname as __cjs_dirname } from 'node:path';
|
||||
import { createRequire as __cjs_createRequire } from 'node:module';
|
||||
|
||||
const __filename = __cjs_fileURLToPath(import.meta.url);
|
||||
const __dirname = __cjs_dirname(__filename);
|
||||
const require = __cjs_createRequire(import.meta.url);
|
||||
const __require = require;
|
||||
function _mergeNamespaces(n, m) {
|
||||
for (var i = 0; i < m.length; i++) {
|
||||
var e = m[i];
|
||||
if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
|
||||
if (k !== 'default' && !(k in n)) {
|
||||
n[k] = e[k];
|
||||
}
|
||||
} }
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
var formatImportPrelude$2 = function formatImportPrelude(layer, media, supports) {
|
||||
const parts = [];
|
||||
|
||||
if (typeof layer !== "undefined") {
|
||||
let layerParams = "layer";
|
||||
if (layer) {
|
||||
layerParams = `layer(${layer})`;
|
||||
}
|
||||
|
||||
parts.push(layerParams);
|
||||
}
|
||||
|
||||
if (typeof supports !== "undefined") {
|
||||
parts.push(`supports(${supports})`);
|
||||
}
|
||||
|
||||
if (typeof media !== "undefined") {
|
||||
parts.push(media);
|
||||
}
|
||||
|
||||
return parts.join(" ")
|
||||
};
|
||||
|
||||
const formatImportPrelude$1 = formatImportPrelude$2;
|
||||
|
||||
// Base64 encode an import with conditions
|
||||
// The order of conditions is important and is interleaved with cascade layer declarations
|
||||
// Each group of conditions and cascade layers needs to be interpreted in order
|
||||
// To achieve this we create a list of base64 encoded imports, where each import contains a stylesheet with another import.
|
||||
// Each import can define a single group of conditions and a single cascade layer.
|
||||
var base64EncodedImport = function base64EncodedConditionalImport(prelude, conditions) {
|
||||
conditions.reverse();
|
||||
const first = conditions.pop();
|
||||
let params = `${prelude} ${formatImportPrelude$1(
|
||||
first.layer,
|
||||
first.media,
|
||||
first.supports,
|
||||
)}`;
|
||||
|
||||
for (const condition of conditions) {
|
||||
params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString(
|
||||
"base64",
|
||||
)}' ${formatImportPrelude$1(
|
||||
condition.layer,
|
||||
condition.media,
|
||||
condition.supports,
|
||||
)}`;
|
||||
}
|
||||
|
||||
return params
|
||||
};
|
||||
|
||||
const base64EncodedConditionalImport = base64EncodedImport;
|
||||
|
||||
var applyConditions$1 = function applyConditions(bundle, atRule) {
|
||||
bundle.forEach(stmt => {
|
||||
if (
|
||||
stmt.type === "charset" ||
|
||||
stmt.type === "warning" ||
|
||||
!stmt.conditions?.length
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
if (stmt.type === "import") {
|
||||
stmt.node.params = base64EncodedConditionalImport(
|
||||
stmt.fullUri,
|
||||
stmt.conditions,
|
||||
);
|
||||
return
|
||||
}
|
||||
|
||||
const { nodes } = stmt;
|
||||
const { parent } = nodes[0];
|
||||
|
||||
const atRules = [];
|
||||
|
||||
// Convert conditions to at-rules
|
||||
for (const condition of stmt.conditions) {
|
||||
if (typeof condition.media !== "undefined") {
|
||||
const mediaNode = atRule({
|
||||
name: "media",
|
||||
params: condition.media,
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
atRules.push(mediaNode);
|
||||
}
|
||||
|
||||
if (typeof condition.supports !== "undefined") {
|
||||
const supportsNode = atRule({
|
||||
name: "supports",
|
||||
params: `(${condition.supports})`,
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
atRules.push(supportsNode);
|
||||
}
|
||||
|
||||
if (typeof condition.layer !== "undefined") {
|
||||
const layerNode = atRule({
|
||||
name: "layer",
|
||||
params: condition.layer,
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
atRules.push(layerNode);
|
||||
}
|
||||
}
|
||||
|
||||
// Add nodes to AST
|
||||
const outerAtRule = atRules.shift();
|
||||
const innerAtRule = atRules.reduce((previous, next) => {
|
||||
previous.append(next);
|
||||
return next
|
||||
}, outerAtRule);
|
||||
|
||||
parent.insertBefore(nodes[0], outerAtRule);
|
||||
|
||||
// remove nodes
|
||||
nodes.forEach(node => {
|
||||
node.parent = undefined;
|
||||
});
|
||||
|
||||
// better output
|
||||
nodes[0].raws.before = nodes[0].raws.before || "\n";
|
||||
|
||||
// wrap new rules with media query and/or layer at rule
|
||||
innerAtRule.append(nodes);
|
||||
|
||||
stmt.type = "nodes";
|
||||
stmt.nodes = [outerAtRule];
|
||||
delete stmt.node;
|
||||
});
|
||||
};
|
||||
|
||||
var applyRaws$1 = function applyRaws(bundle) {
|
||||
bundle.forEach((stmt, index) => {
|
||||
if (index === 0) return
|
||||
|
||||
if (stmt.parent) {
|
||||
const { before } = stmt.parent.node.raws;
|
||||
if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
|
||||
else stmt.node.raws.before = before;
|
||||
} else if (stmt.type === "nodes") {
|
||||
stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var applyStyles$1 = function applyStyles(bundle, styles) {
|
||||
styles.nodes = [];
|
||||
|
||||
// Strip additional statements.
|
||||
bundle.forEach(stmt => {
|
||||
if (["charset", "import"].includes(stmt.type)) {
|
||||
stmt.node.parent = undefined;
|
||||
styles.append(stmt.node);
|
||||
} else if (stmt.type === "nodes") {
|
||||
stmt.nodes.forEach(node => {
|
||||
node.parent = undefined;
|
||||
styles.append(node);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var readCache$1 = {exports: {}};
|
||||
|
||||
var pify$2 = {exports: {}};
|
||||
|
||||
var processFn = function (fn, P, opts) {
|
||||
return function () {
|
||||
var that = this;
|
||||
var args = new Array(arguments.length);
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
return new P(function (resolve, reject) {
|
||||
args.push(function (err, result) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else if (opts.multiArgs) {
|
||||
var results = new Array(arguments.length - 1);
|
||||
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
results[i - 1] = arguments[i];
|
||||
}
|
||||
|
||||
resolve(results);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
|
||||
fn.apply(that, args);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var pify$1 = pify$2.exports = function (obj, P, opts) {
|
||||
if (typeof P !== 'function') {
|
||||
opts = P;
|
||||
P = Promise;
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
opts.exclude = opts.exclude || [/.+Sync$/];
|
||||
|
||||
var filter = function (key) {
|
||||
var match = function (pattern) {
|
||||
return typeof pattern === 'string' ? key === pattern : pattern.test(key);
|
||||
};
|
||||
|
||||
return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
|
||||
};
|
||||
|
||||
var ret = typeof obj === 'function' ? function () {
|
||||
if (opts.excludeMain) {
|
||||
return obj.apply(this, arguments);
|
||||
}
|
||||
|
||||
return processFn(obj, P, opts).apply(this, arguments);
|
||||
} : {};
|
||||
|
||||
return Object.keys(obj).reduce(function (ret, key) {
|
||||
var x = obj[key];
|
||||
|
||||
ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
|
||||
|
||||
return ret;
|
||||
}, ret);
|
||||
};
|
||||
|
||||
pify$1.all = pify$1;
|
||||
|
||||
var pifyExports = pify$2.exports;
|
||||
|
||||
var fs = require$$0__default;
|
||||
var path$3 = require$$0;
|
||||
var pify = pifyExports;
|
||||
|
||||
var stat = pify(fs.stat);
|
||||
var readFile = pify(fs.readFile);
|
||||
var resolve = path$3.resolve;
|
||||
|
||||
var cache = Object.create(null);
|
||||
|
||||
function convert(content, encoding) {
|
||||
if (Buffer.isEncoding(encoding)) {
|
||||
return content.toString(encoding);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
readCache$1.exports = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
return stat(path).then(function (stats) {
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
return readFile(path).then(function (data) {
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
});
|
||||
}).catch(function (err) {
|
||||
cache[path] = null;
|
||||
return Promise.reject(err);
|
||||
});
|
||||
};
|
||||
|
||||
readCache$1.exports.sync = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
try {
|
||||
var stats = fs.statSync(path);
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
var data = fs.readFileSync(path);
|
||||
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
} catch (err) {
|
||||
cache[path] = null;
|
||||
throw err;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
readCache$1.exports.get = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
if (cache[path]) {
|
||||
return convert(cache[path].content, encoding);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
readCache$1.exports.clear = function () {
|
||||
cache = Object.create(null);
|
||||
};
|
||||
|
||||
var readCacheExports = readCache$1.exports;
|
||||
|
||||
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
||||
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
||||
const plainDataURLRegexp = /^data:text\/css;plain,/i;
|
||||
|
||||
function isValid(url) {
|
||||
return anyDataURLRegexp.test(url)
|
||||
}
|
||||
|
||||
function contents(url) {
|
||||
if (base64DataURLRegexp.test(url)) {
|
||||
// "data:text/css;base64,".length === 21
|
||||
return Buffer.from(url.slice(21), "base64").toString()
|
||||
}
|
||||
|
||||
if (plainDataURLRegexp.test(url)) {
|
||||
// "data:text/css;plain,".length === 20
|
||||
return decodeURIComponent(url.slice(20))
|
||||
}
|
||||
|
||||
// "data:text/css,".length === 14
|
||||
return decodeURIComponent(url.slice(14))
|
||||
}
|
||||
|
||||
var dataUrl = {
|
||||
isValid,
|
||||
contents,
|
||||
};
|
||||
|
||||
const readCache = readCacheExports;
|
||||
const dataURL$1 = dataUrl;
|
||||
|
||||
var loadContent$1 = function loadContent(filename) {
|
||||
if (dataURL$1.isValid(filename)) {
|
||||
return dataURL$1.contents(filename)
|
||||
}
|
||||
|
||||
return readCache(filename, "utf-8")
|
||||
};
|
||||
|
||||
// external tooling
|
||||
const valueParser = lib;
|
||||
|
||||
// extended tooling
|
||||
const { stringify } = valueParser;
|
||||
|
||||
var parseStatements$1 = function parseStatements(result, styles, conditions, from) {
|
||||
const statements = [];
|
||||
let nodes = [];
|
||||
|
||||
styles.each(node => {
|
||||
let stmt;
|
||||
if (node.type === "atrule") {
|
||||
if (node.name === "import")
|
||||
stmt = parseImport(result, node, conditions, from);
|
||||
else if (node.name === "charset")
|
||||
stmt = parseCharset(result, node, conditions, from);
|
||||
}
|
||||
|
||||
if (stmt) {
|
||||
if (nodes.length) {
|
||||
statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
conditions: [...conditions],
|
||||
from,
|
||||
});
|
||||
nodes = [];
|
||||
}
|
||||
statements.push(stmt);
|
||||
} else nodes.push(node);
|
||||
});
|
||||
|
||||
if (nodes.length) {
|
||||
statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
conditions: [...conditions],
|
||||
from,
|
||||
});
|
||||
}
|
||||
|
||||
return statements
|
||||
};
|
||||
|
||||
function parseCharset(result, atRule, conditions, from) {
|
||||
if (atRule.prev()) {
|
||||
return result.warn("@charset must precede all other statements", {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
return {
|
||||
type: "charset",
|
||||
node: atRule,
|
||||
conditions: [...conditions],
|
||||
from,
|
||||
}
|
||||
}
|
||||
|
||||
function parseImport(result, atRule, conditions, from) {
|
||||
let prev = atRule.prev();
|
||||
|
||||
// `@import` statements may follow other `@import` statements.
|
||||
if (prev) {
|
||||
do {
|
||||
if (
|
||||
prev.type === "comment" ||
|
||||
(prev.type === "atrule" && prev.name === "import")
|
||||
) {
|
||||
prev = prev.prev();
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
} while (prev)
|
||||
}
|
||||
|
||||
// All `@import` statements may be preceded by `@charset` or `@layer` statements.
|
||||
// But the `@import` statements must be consecutive.
|
||||
if (prev) {
|
||||
do {
|
||||
if (
|
||||
prev.type === "comment" ||
|
||||
(prev.type === "atrule" &&
|
||||
(prev.name === "charset" || (prev.name === "layer" && !prev.nodes)))
|
||||
) {
|
||||
prev = prev.prev();
|
||||
continue
|
||||
}
|
||||
|
||||
return result.warn(
|
||||
"@import must precede all other statements (besides @charset or empty @layer)",
|
||||
{ node: atRule },
|
||||
)
|
||||
} while (prev)
|
||||
}
|
||||
|
||||
if (atRule.nodes) {
|
||||
return result.warn(
|
||||
"It looks like you didn't end your @import statement correctly. " +
|
||||
"Child nodes are attached to it.",
|
||||
{ node: atRule },
|
||||
)
|
||||
}
|
||||
|
||||
const params = valueParser(atRule.params).nodes;
|
||||
const stmt = {
|
||||
type: "import",
|
||||
uri: "",
|
||||
fullUri: "",
|
||||
node: atRule,
|
||||
conditions: [...conditions],
|
||||
from,
|
||||
};
|
||||
|
||||
let layer;
|
||||
let media;
|
||||
let supports;
|
||||
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
const node = params[i];
|
||||
|
||||
if (node.type === "space" || node.type === "comment") continue
|
||||
|
||||
if (node.type === "string") {
|
||||
if (stmt.uri) {
|
||||
return result.warn(`Multiple url's in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (!node.value) {
|
||||
return result.warn(`Unable to find uri in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
stmt.uri = node.value;
|
||||
stmt.fullUri = stringify(node);
|
||||
continue
|
||||
}
|
||||
|
||||
if (node.type === "function" && /^url$/i.test(node.value)) {
|
||||
if (stmt.uri) {
|
||||
return result.warn(`Multiple url's in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (!node.nodes?.[0]?.value) {
|
||||
return result.warn(`Unable to find uri in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
stmt.uri = node.nodes[0].value;
|
||||
stmt.fullUri = stringify(node);
|
||||
continue
|
||||
}
|
||||
|
||||
if (!stmt.uri) {
|
||||
return result.warn(`Unable to find uri in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (
|
||||
(node.type === "word" || node.type === "function") &&
|
||||
/^layer$/i.test(node.value)
|
||||
) {
|
||||
if (typeof layer !== "undefined") {
|
||||
return result.warn(`Multiple layers in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (typeof supports !== "undefined") {
|
||||
return result.warn(
|
||||
`layers must be defined before support conditions in '${atRule.toString()}'`,
|
||||
{
|
||||
node: atRule,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
layer = stringify(node.nodes);
|
||||
} else {
|
||||
layer = "";
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if (node.type === "function" && /^supports$/i.test(node.value)) {
|
||||
if (typeof supports !== "undefined") {
|
||||
return result.warn(
|
||||
`Multiple support conditions in '${atRule.toString()}'`,
|
||||
{
|
||||
node: atRule,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
supports = stringify(node.nodes);
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
media = stringify(params.slice(i));
|
||||
break
|
||||
}
|
||||
|
||||
if (!stmt.uri) {
|
||||
return result.warn(`Unable to find uri in '${atRule.toString()}'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (
|
||||
typeof media !== "undefined" ||
|
||||
typeof layer !== "undefined" ||
|
||||
typeof supports !== "undefined"
|
||||
) {
|
||||
stmt.conditions.push({
|
||||
layer,
|
||||
media,
|
||||
supports,
|
||||
});
|
||||
}
|
||||
|
||||
return stmt
|
||||
}
|
||||
|
||||
// builtin tooling
|
||||
const path$2 = require$$0;
|
||||
|
||||
// placeholder tooling
|
||||
let sugarss;
|
||||
|
||||
var processContent$1 = function processContent(
|
||||
result,
|
||||
content,
|
||||
filename,
|
||||
options,
|
||||
postcss,
|
||||
) {
|
||||
const { plugins } = options;
|
||||
const ext = path$2.extname(filename);
|
||||
|
||||
const parserList = [];
|
||||
|
||||
// SugarSS support:
|
||||
if (ext === ".sss") {
|
||||
if (!sugarss) {
|
||||
/* c8 ignore next 3 */
|
||||
try {
|
||||
sugarss = __require('sugarss');
|
||||
} catch {} // Ignore
|
||||
}
|
||||
if (sugarss)
|
||||
return runPostcss(postcss, content, filename, plugins, [sugarss])
|
||||
}
|
||||
|
||||
// Syntax support:
|
||||
if (result.opts.syntax?.parse) {
|
||||
parserList.push(result.opts.syntax.parse);
|
||||
}
|
||||
|
||||
// Parser support:
|
||||
if (result.opts.parser) parserList.push(result.opts.parser);
|
||||
// Try the default as a last resort:
|
||||
parserList.push(null);
|
||||
|
||||
return runPostcss(postcss, content, filename, plugins, parserList)
|
||||
};
|
||||
|
||||
function runPostcss(postcss, content, filename, plugins, parsers, index) {
|
||||
if (!index) index = 0;
|
||||
return postcss(plugins)
|
||||
.process(content, {
|
||||
from: filename,
|
||||
parser: parsers[index],
|
||||
})
|
||||
.catch(err => {
|
||||
// If there's an error, try the next parser
|
||||
index++;
|
||||
// If there are no parsers left, throw it
|
||||
if (index === parsers.length) throw err
|
||||
return runPostcss(postcss, content, filename, plugins, parsers, index)
|
||||
})
|
||||
}
|
||||
|
||||
const path$1 = require$$0;
|
||||
|
||||
const dataURL = dataUrl;
|
||||
const parseStatements = parseStatements$1;
|
||||
const processContent = processContent$1;
|
||||
const resolveId$1 = (id) => id;
|
||||
const formatImportPrelude = formatImportPrelude$2;
|
||||
|
||||
async function parseStyles$1(
|
||||
result,
|
||||
styles,
|
||||
options,
|
||||
state,
|
||||
conditions,
|
||||
from,
|
||||
postcss,
|
||||
) {
|
||||
const statements = parseStatements(result, styles, conditions, from);
|
||||
|
||||
for (const stmt of statements) {
|
||||
if (stmt.type !== "import" || !isProcessableURL(stmt.uri)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (options.filter && !options.filter(stmt.uri)) {
|
||||
// rejected by filter
|
||||
continue
|
||||
}
|
||||
|
||||
await resolveImportId(result, stmt, options, state, postcss);
|
||||
}
|
||||
|
||||
let charset;
|
||||
const imports = [];
|
||||
const bundle = [];
|
||||
|
||||
function handleCharset(stmt) {
|
||||
if (!charset) charset = stmt;
|
||||
// charsets aren't case-sensitive, so convert to lower case to compare
|
||||
else if (
|
||||
stmt.node.params.toLowerCase() !== charset.node.params.toLowerCase()
|
||||
) {
|
||||
throw stmt.node.error(
|
||||
`Incompatible @charset statements:
|
||||
${stmt.node.params} specified in ${stmt.node.source.input.file}
|
||||
${charset.node.params} specified in ${charset.node.source.input.file}`,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// squash statements and their children
|
||||
statements.forEach(stmt => {
|
||||
if (stmt.type === "charset") handleCharset(stmt);
|
||||
else if (stmt.type === "import") {
|
||||
if (stmt.children) {
|
||||
stmt.children.forEach((child, index) => {
|
||||
if (child.type === "import") imports.push(child);
|
||||
else if (child.type === "charset") handleCharset(child);
|
||||
else bundle.push(child);
|
||||
// For better output
|
||||
if (index === 0) child.parent = stmt;
|
||||
});
|
||||
} else imports.push(stmt);
|
||||
} else if (stmt.type === "nodes") {
|
||||
bundle.push(stmt);
|
||||
}
|
||||
});
|
||||
|
||||
return charset ? [charset, ...imports.concat(bundle)] : imports.concat(bundle)
|
||||
}
|
||||
|
||||
async function resolveImportId(result, stmt, options, state, postcss) {
|
||||
if (dataURL.isValid(stmt.uri)) {
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
stmt.children = await loadImportContent(
|
||||
result,
|
||||
stmt,
|
||||
stmt.uri,
|
||||
options,
|
||||
state,
|
||||
postcss,
|
||||
);
|
||||
|
||||
return
|
||||
} else if (dataURL.isValid(stmt.from.slice(-1))) {
|
||||
// Data urls can't be used as a base url to resolve imports.
|
||||
throw stmt.node.error(
|
||||
`Unable to import '${stmt.uri}' from a stylesheet that is embedded in a data url`,
|
||||
)
|
||||
}
|
||||
|
||||
const atRule = stmt.node;
|
||||
let sourceFile;
|
||||
if (atRule.source?.input?.file) {
|
||||
sourceFile = atRule.source.input.file;
|
||||
}
|
||||
const base = sourceFile
|
||||
? path$1.dirname(atRule.source.input.file)
|
||||
: options.root;
|
||||
|
||||
const paths = [await options.resolve(stmt.uri, base, options, atRule)].flat();
|
||||
|
||||
// Ensure that each path is absolute:
|
||||
const resolved = await Promise.all(
|
||||
paths.map(file => {
|
||||
return !path$1.isAbsolute(file)
|
||||
? resolveId$1(file)
|
||||
: file
|
||||
}),
|
||||
);
|
||||
|
||||
// Add dependency messages:
|
||||
resolved.forEach(file => {
|
||||
result.messages.push({
|
||||
type: "dependency",
|
||||
plugin: "postcss-import",
|
||||
file,
|
||||
parent: sourceFile,
|
||||
});
|
||||
});
|
||||
|
||||
const importedContent = await Promise.all(
|
||||
resolved.map(file => {
|
||||
return loadImportContent(result, stmt, file, options, state, postcss)
|
||||
}),
|
||||
);
|
||||
|
||||
// Merge loaded statements
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
stmt.children = importedContent.flat().filter(x => !!x);
|
||||
}
|
||||
|
||||
async function loadImportContent(
|
||||
result,
|
||||
stmt,
|
||||
filename,
|
||||
options,
|
||||
state,
|
||||
postcss,
|
||||
) {
|
||||
const atRule = stmt.node;
|
||||
const { conditions, from } = stmt;
|
||||
const stmtDuplicateCheckKey = conditions
|
||||
.map(condition =>
|
||||
formatImportPrelude(condition.layer, condition.media, condition.supports),
|
||||
)
|
||||
.join(":");
|
||||
|
||||
if (options.skipDuplicates) {
|
||||
// skip files already imported at the same scope
|
||||
if (state.importedFiles[filename]?.[stmtDuplicateCheckKey]) {
|
||||
return
|
||||
}
|
||||
|
||||
// save imported files to skip them next time
|
||||
if (!state.importedFiles[filename]) {
|
||||
state.importedFiles[filename] = {};
|
||||
}
|
||||
state.importedFiles[filename][stmtDuplicateCheckKey] = true;
|
||||
}
|
||||
|
||||
if (from.includes(filename)) {
|
||||
return
|
||||
}
|
||||
|
||||
const content = await options.load(filename, options);
|
||||
|
||||
if (content.trim() === "" && options.warnOnEmpty) {
|
||||
result.warn(`${filename} is empty`, { node: atRule });
|
||||
return
|
||||
}
|
||||
|
||||
// skip previous imported files not containing @import rules
|
||||
if (
|
||||
options.skipDuplicates &&
|
||||
state.hashFiles[content]?.[stmtDuplicateCheckKey]
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
const importedResult = await processContent(
|
||||
result,
|
||||
content,
|
||||
filename,
|
||||
options,
|
||||
postcss,
|
||||
);
|
||||
|
||||
const styles = importedResult.root;
|
||||
result.messages = result.messages.concat(importedResult.messages);
|
||||
|
||||
if (options.skipDuplicates) {
|
||||
const hasImport = styles.some(child => {
|
||||
return child.type === "atrule" && child.name === "import"
|
||||
});
|
||||
if (!hasImport) {
|
||||
// save hash files to skip them next time
|
||||
if (!state.hashFiles[content]) {
|
||||
state.hashFiles[content] = {};
|
||||
}
|
||||
|
||||
state.hashFiles[content][stmtDuplicateCheckKey] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// recursion: import @import from imported file
|
||||
return parseStyles$1(
|
||||
result,
|
||||
styles,
|
||||
options,
|
||||
state,
|
||||
conditions,
|
||||
[...from, filename],
|
||||
postcss,
|
||||
)
|
||||
}
|
||||
|
||||
function isProcessableURL(uri) {
|
||||
// skip protocol base uri (protocol://url) or protocol-relative
|
||||
if (/^(?:[a-z]+:)?\/\//i.test(uri)) {
|
||||
return false
|
||||
}
|
||||
|
||||
// check for fragment or query
|
||||
try {
|
||||
// needs a base to parse properly
|
||||
const url = new URL(uri, "https://example.com");
|
||||
if (url.search) {
|
||||
return false
|
||||
}
|
||||
} catch {} // Ignore
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
var parseStyles_1 = parseStyles$1;
|
||||
|
||||
// builtin tooling
|
||||
const path = require$$0;
|
||||
|
||||
// internal tooling
|
||||
const applyConditions = applyConditions$1;
|
||||
const applyRaws = applyRaws$1;
|
||||
const applyStyles = applyStyles$1;
|
||||
const loadContent = loadContent$1;
|
||||
const parseStyles = parseStyles_1;
|
||||
const resolveId = (id) => id;
|
||||
|
||||
function AtImport(options) {
|
||||
options = {
|
||||
root: process.cwd(),
|
||||
path: [],
|
||||
skipDuplicates: true,
|
||||
resolve: resolveId,
|
||||
load: loadContent,
|
||||
plugins: [],
|
||||
addModulesDirectories: [],
|
||||
warnOnEmpty: true,
|
||||
...options,
|
||||
};
|
||||
|
||||
options.root = path.resolve(options.root);
|
||||
|
||||
// convert string to an array of a single element
|
||||
if (typeof options.path === "string") options.path = [options.path];
|
||||
|
||||
if (!Array.isArray(options.path)) options.path = [];
|
||||
|
||||
options.path = options.path.map(p => path.resolve(options.root, p));
|
||||
|
||||
return {
|
||||
postcssPlugin: "postcss-import",
|
||||
async Once(styles, { result, atRule, postcss }) {
|
||||
const state = {
|
||||
importedFiles: {},
|
||||
hashFiles: {},
|
||||
};
|
||||
|
||||
if (styles.source?.input?.file) {
|
||||
state.importedFiles[styles.source.input.file] = {};
|
||||
}
|
||||
|
||||
if (options.plugins && !Array.isArray(options.plugins)) {
|
||||
throw new Error("plugins option must be an array")
|
||||
}
|
||||
|
||||
const bundle = await parseStyles(
|
||||
result,
|
||||
styles,
|
||||
options,
|
||||
state,
|
||||
[],
|
||||
[],
|
||||
postcss,
|
||||
);
|
||||
|
||||
applyRaws(bundle);
|
||||
applyConditions(bundle, atRule);
|
||||
applyStyles(bundle, styles);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
AtImport.postcss = true;
|
||||
|
||||
var postcssImport = AtImport;
|
||||
|
||||
var index = /*@__PURE__*/getDefaultExportFromCjs(postcssImport);
|
||||
|
||||
var index$1 = /*#__PURE__*/_mergeNamespaces({
|
||||
__proto__: null,
|
||||
default: index
|
||||
}, [postcssImport]);
|
||||
|
||||
export { index$1 as i };
|
||||
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-cWFO4sv4.js
generated
vendored
Normal file
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-cWFO4sv4.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "./dep-SmwnYDP9.js";
|
||||
import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-M_KD0XSK.js";
|
||||
|
||||
export { optimizeDeps };
|
||||
7004
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-e9kYborm.js
generated
vendored
7004
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-e9kYborm.js
generated
vendored
File diff suppressed because it is too large
Load Diff
31
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-lCKrEJQm.js
generated
vendored
Normal file
31
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-lCKrEJQm.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
//#region rolldown:runtime
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
||||
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
||||
|
||||
//#endregion
|
||||
export { __commonJS, __require, __toDynamicImportESM, __toESM };
|
||||
6814
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-sDKrrA4S.js
generated
vendored
Normal file
6814
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-sDKrrA4S.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-yxQqhtZq.js
generated
vendored
Normal file
4
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/chunks/dep-yxQqhtZq.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "./dep-SmwnYDP9.js";
|
||||
import { preview, resolvePreviewOptions } from "./dep-M_KD0XSK.js";
|
||||
|
||||
export { preview };
|
||||
1461
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/cli.js
generated
vendored
1461
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/cli.js
generated
vendored
File diff suppressed because it is too large
Load Diff
113
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/constants.js
generated
vendored
113
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/constants.js
generated
vendored
@ -1,113 +0,0 @@
|
||||
import path, { resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
const { version } = JSON.parse(
|
||||
readFileSync(new URL("../../package.json", import.meta.url)).toString()
|
||||
);
|
||||
const VERSION = version;
|
||||
const DEFAULT_MAIN_FIELDS = [
|
||||
"browser",
|
||||
"module",
|
||||
"jsnext:main",
|
||||
// moment still uses this...
|
||||
"jsnext"
|
||||
];
|
||||
const ESBUILD_MODULES_TARGET = [
|
||||
"es2020",
|
||||
// support import.meta.url
|
||||
"edge88",
|
||||
"firefox78",
|
||||
"chrome87",
|
||||
"safari14"
|
||||
];
|
||||
const DEFAULT_EXTENSIONS = [
|
||||
".mjs",
|
||||
".js",
|
||||
".mts",
|
||||
".ts",
|
||||
".jsx",
|
||||
".tsx",
|
||||
".json"
|
||||
];
|
||||
const DEFAULT_CONFIG_FILES = [
|
||||
"vite.config.js",
|
||||
"vite.config.mjs",
|
||||
"vite.config.ts",
|
||||
"vite.config.cjs",
|
||||
"vite.config.mts",
|
||||
"vite.config.cts"
|
||||
];
|
||||
const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
|
||||
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
|
||||
const OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
|
||||
const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
|
||||
const FS_PREFIX = `/@fs/`;
|
||||
const CLIENT_PUBLIC_PATH = `/@vite/client`;
|
||||
const ENV_PUBLIC_PATH = `/@vite/env`;
|
||||
const VITE_PACKAGE_DIR = resolve(
|
||||
// import.meta.url is `dist/node/constants.js` after bundle
|
||||
fileURLToPath(import.meta.url),
|
||||
"../../.."
|
||||
);
|
||||
const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs");
|
||||
const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs");
|
||||
const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
|
||||
const KNOWN_ASSET_TYPES = [
|
||||
// images
|
||||
"apng",
|
||||
"bmp",
|
||||
"png",
|
||||
"jpe?g",
|
||||
"jfif",
|
||||
"pjpeg",
|
||||
"pjp",
|
||||
"gif",
|
||||
"svg",
|
||||
"ico",
|
||||
"webp",
|
||||
"avif",
|
||||
// media
|
||||
"mp4",
|
||||
"webm",
|
||||
"ogg",
|
||||
"mp3",
|
||||
"wav",
|
||||
"flac",
|
||||
"aac",
|
||||
"opus",
|
||||
"mov",
|
||||
"m4a",
|
||||
"vtt",
|
||||
// fonts
|
||||
"woff2?",
|
||||
"eot",
|
||||
"ttf",
|
||||
"otf",
|
||||
// other
|
||||
"webmanifest",
|
||||
"pdf",
|
||||
"txt"
|
||||
];
|
||||
const DEFAULT_ASSETS_RE = new RegExp(
|
||||
`\\.(` + KNOWN_ASSET_TYPES.join("|") + `)(\\?.*)?$`
|
||||
);
|
||||
const DEP_VERSION_RE = /[?&](v=[\w.-]+)\b/;
|
||||
const loopbackHosts = /* @__PURE__ */ new Set([
|
||||
"localhost",
|
||||
"127.0.0.1",
|
||||
"::1",
|
||||
"0000:0000:0000:0000:0000:0000:0000:0001"
|
||||
]);
|
||||
const wildcardHosts = /* @__PURE__ */ new Set([
|
||||
"0.0.0.0",
|
||||
"::",
|
||||
"0000:0000:0000:0000:0000:0000:0000:0000"
|
||||
]);
|
||||
const DEFAULT_DEV_PORT = 5173;
|
||||
const DEFAULT_PREVIEW_PORT = 4173;
|
||||
const DEFAULT_ASSETS_INLINE_LIMIT = 4096;
|
||||
const defaultAllowedOrigins = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
|
||||
const METADATA_FILENAME = "_metadata.json";
|
||||
|
||||
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEFAULT_PREVIEW_PORT, DEP_VERSION_RE, ENV_ENTRY, ENV_PUBLIC_PATH, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts };
|
||||
5879
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/index.d.ts
generated
vendored
5879
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
281
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/index.js
generated
vendored
281
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/index.js
generated
vendored
@ -1,261 +1,30 @@
|
||||
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
||||
import { i as isInNodeModules, a as arraify } from './chunks/dep-D_zLpgQd.js';
|
||||
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, y as isFileLoadingAllowed, x as isFileServingAllowed, l as loadConfigFromFile, z as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, A as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-D_zLpgQd.js';
|
||||
export { VERSION as version } from './constants.js';
|
||||
export { version as esbuildVersion } from 'esbuild';
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { ViteRuntime, ESModulesRunner } from 'vite/runtime';
|
||||
import 'node:fs/promises';
|
||||
import 'node:path';
|
||||
import 'node:url';
|
||||
import 'node:util';
|
||||
import 'node:perf_hooks';
|
||||
import 'node:module';
|
||||
import 'node:crypto';
|
||||
import 'tty';
|
||||
import 'path';
|
||||
import 'fs';
|
||||
import 'node:events';
|
||||
import 'node:stream';
|
||||
import 'node:string_decoder';
|
||||
import 'node:child_process';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'util';
|
||||
import 'net';
|
||||
import 'events';
|
||||
import 'url';
|
||||
import 'http';
|
||||
import 'stream';
|
||||
import 'os';
|
||||
import 'child_process';
|
||||
import 'node:os';
|
||||
import 'node:dns';
|
||||
import 'crypto';
|
||||
import 'module';
|
||||
import 'node:assert';
|
||||
import 'node:v8';
|
||||
import 'node:worker_threads';
|
||||
import 'node:buffer';
|
||||
import 'querystring';
|
||||
import 'node:readline';
|
||||
import 'zlib';
|
||||
import 'buffer';
|
||||
import 'https';
|
||||
import 'tls';
|
||||
import 'node:net';
|
||||
import 'assert';
|
||||
import 'node:zlib';
|
||||
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, createLogger, defaultAllowedOrigins } from "./chunks/dep-SmwnYDP9.js";
|
||||
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-M_KD0XSK.js";
|
||||
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
||||
import { version as esbuildVersion } from "esbuild";
|
||||
|
||||
const CSS_LANGS_RE = (
|
||||
// eslint-disable-next-line regexp/no-unused-capturing-group
|
||||
/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/
|
||||
);
|
||||
const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
|
||||
class SplitVendorChunkCache {
|
||||
cache;
|
||||
constructor() {
|
||||
this.cache = /* @__PURE__ */ new Map();
|
||||
}
|
||||
reset() {
|
||||
this.cache = /* @__PURE__ */ new Map();
|
||||
}
|
||||
//#region src/node/server/environments/fetchableEnvironments.ts
|
||||
function createFetchableDevEnvironment(name, config, context) {
|
||||
if (typeof Request === "undefined" || typeof Response === "undefined") throw new TypeError("FetchableDevEnvironment requires a global `Request` and `Response` object.");
|
||||
if (!context.handleRequest) throw new TypeError("FetchableDevEnvironment requires a `handleRequest` method during initialisation.");
|
||||
return new FetchableDevEnvironment(name, config, context);
|
||||
}
|
||||
function splitVendorChunk(options = {}) {
|
||||
const cache = options.cache ?? new SplitVendorChunkCache();
|
||||
return (id, { getModuleInfo }) => {
|
||||
if (isInNodeModules(id) && !isCSSRequest(id) && staticImportedByEntry(id, getModuleInfo, cache.cache)) {
|
||||
return "vendor";
|
||||
}
|
||||
};
|
||||
function isFetchableDevEnvironment(environment) {
|
||||
return environment instanceof FetchableDevEnvironment;
|
||||
}
|
||||
function staticImportedByEntry(id, getModuleInfo, cache, importStack = []) {
|
||||
if (cache.has(id)) {
|
||||
return cache.get(id);
|
||||
}
|
||||
if (importStack.includes(id)) {
|
||||
cache.set(id, false);
|
||||
return false;
|
||||
}
|
||||
const mod = getModuleInfo(id);
|
||||
if (!mod) {
|
||||
cache.set(id, false);
|
||||
return false;
|
||||
}
|
||||
if (mod.isEntry) {
|
||||
cache.set(id, true);
|
||||
return true;
|
||||
}
|
||||
const someImporterIs = mod.importers.some(
|
||||
(importer) => staticImportedByEntry(
|
||||
importer,
|
||||
getModuleInfo,
|
||||
cache,
|
||||
importStack.concat(id)
|
||||
)
|
||||
);
|
||||
cache.set(id, someImporterIs);
|
||||
return someImporterIs;
|
||||
}
|
||||
function splitVendorChunkPlugin() {
|
||||
const caches = [];
|
||||
function createSplitVendorChunk(output, config) {
|
||||
const cache = new SplitVendorChunkCache();
|
||||
caches.push(cache);
|
||||
const build = config.build ?? {};
|
||||
const format = output?.format;
|
||||
if (!build.ssr && !build.lib && format !== "umd" && format !== "iife") {
|
||||
return splitVendorChunk({ cache });
|
||||
}
|
||||
}
|
||||
return {
|
||||
name: "vite:split-vendor-chunk",
|
||||
config(config) {
|
||||
let outputs = config?.build?.rollupOptions?.output;
|
||||
if (outputs) {
|
||||
outputs = arraify(outputs);
|
||||
for (const output of outputs) {
|
||||
const viteManualChunks = createSplitVendorChunk(output, config);
|
||||
if (viteManualChunks) {
|
||||
if (output.manualChunks) {
|
||||
if (typeof output.manualChunks === "function") {
|
||||
const userManualChunks = output.manualChunks;
|
||||
output.manualChunks = (id, api) => {
|
||||
return userManualChunks(id, api) ?? viteManualChunks(id, api);
|
||||
};
|
||||
} else {
|
||||
console.warn(
|
||||
"(!) the `splitVendorChunk` plugin doesn't have any effect when using the object form of `build.rollupOptions.output.manualChunks`. Consider using the function form instead."
|
||||
);
|
||||
}
|
||||
} else {
|
||||
output.manualChunks = viteManualChunks;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: createSplitVendorChunk({}, config)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
buildStart() {
|
||||
caches.forEach((cache) => cache.reset());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class ServerHMRBroadcasterClient {
|
||||
constructor(hmrChannel) {
|
||||
this.hmrChannel = hmrChannel;
|
||||
}
|
||||
send(...args) {
|
||||
let payload;
|
||||
if (typeof args[0] === "string") {
|
||||
payload = {
|
||||
type: "custom",
|
||||
event: args[0],
|
||||
data: args[1]
|
||||
};
|
||||
} else {
|
||||
payload = args[0];
|
||||
}
|
||||
if (payload.type !== "custom") {
|
||||
throw new Error(
|
||||
"Cannot send non-custom events from the client to the server."
|
||||
);
|
||||
}
|
||||
this.hmrChannel.send(payload);
|
||||
}
|
||||
}
|
||||
class ServerHMRConnector {
|
||||
handlers = [];
|
||||
hmrChannel;
|
||||
hmrClient;
|
||||
connected = false;
|
||||
constructor(server) {
|
||||
const hmrChannel = server.hot?.channels.find(
|
||||
(c) => c.name === "ssr"
|
||||
);
|
||||
if (!hmrChannel) {
|
||||
throw new Error(
|
||||
"Your version of Vite doesn't support HMR during SSR. Please, use Vite 5.1 or higher."
|
||||
);
|
||||
}
|
||||
this.hmrClient = new ServerHMRBroadcasterClient(hmrChannel);
|
||||
hmrChannel.api.outsideEmitter.on("send", (payload) => {
|
||||
this.handlers.forEach((listener) => listener(payload));
|
||||
});
|
||||
this.hmrChannel = hmrChannel;
|
||||
}
|
||||
isReady() {
|
||||
return this.connected;
|
||||
}
|
||||
send(message) {
|
||||
const payload = JSON.parse(message);
|
||||
this.hmrChannel.api.innerEmitter.emit(
|
||||
payload.event,
|
||||
payload.data,
|
||||
this.hmrClient
|
||||
);
|
||||
}
|
||||
onUpdate(handler) {
|
||||
this.handlers.push(handler);
|
||||
handler({ type: "connected" });
|
||||
this.connected = true;
|
||||
}
|
||||
}
|
||||
|
||||
function createHMROptions(server, options) {
|
||||
if (server.config.server.hmr === false || options.hmr === false) {
|
||||
return false;
|
||||
}
|
||||
const connection = new ServerHMRConnector(server);
|
||||
return {
|
||||
connection,
|
||||
logger: options.hmr?.logger
|
||||
};
|
||||
}
|
||||
const prepareStackTrace = {
|
||||
retrieveFile(id) {
|
||||
if (existsSync(id)) {
|
||||
return readFileSync(id, "utf-8");
|
||||
}
|
||||
}
|
||||
var FetchableDevEnvironment = class extends DevEnvironment {
|
||||
_handleRequest;
|
||||
constructor(name, config, context) {
|
||||
super(name, config, context);
|
||||
this._handleRequest = context.handleRequest;
|
||||
}
|
||||
async dispatchFetch(request) {
|
||||
if (!(request instanceof Request)) throw new TypeError("FetchableDevEnvironment `dispatchFetch` must receive a `Request` object.");
|
||||
const response = await this._handleRequest(request);
|
||||
if (!(response instanceof Response)) throw new TypeError("FetchableDevEnvironment `context.handleRequest` must return a `Response` object.");
|
||||
return response;
|
||||
}
|
||||
};
|
||||
function resolveSourceMapOptions(options) {
|
||||
if (options.sourcemapInterceptor != null) {
|
||||
if (options.sourcemapInterceptor === "prepareStackTrace") {
|
||||
return prepareStackTrace;
|
||||
}
|
||||
if (typeof options.sourcemapInterceptor === "object") {
|
||||
return { ...prepareStackTrace, ...options.sourcemapInterceptor };
|
||||
}
|
||||
return options.sourcemapInterceptor;
|
||||
}
|
||||
if (typeof process !== "undefined" && "setSourceMapsEnabled" in process) {
|
||||
return "node";
|
||||
}
|
||||
return prepareStackTrace;
|
||||
}
|
||||
async function createViteRuntime(server, options = {}) {
|
||||
const hmr = createHMROptions(server, options);
|
||||
return new ViteRuntime(
|
||||
{
|
||||
...options,
|
||||
root: server.config.root,
|
||||
fetchModule: server.ssrFetchModule,
|
||||
hmr,
|
||||
sourcemapInterceptor: resolveSourceMapOptions(options)
|
||||
},
|
||||
options.runner || new ESModulesRunner()
|
||||
);
|
||||
}
|
||||
|
||||
export { ServerHMRConnector, createViteRuntime, isCSSRequest, splitVendorChunk, splitVendorChunkPlugin };
|
||||
//#endregion
|
||||
export { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, esbuildVersion, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parseAst, parseAstAsync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, VERSION as version };
|
||||
312
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/module-runner.d.ts
generated
vendored
Normal file
312
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/module-runner.d.ts
generated
vendored
Normal file
@ -0,0 +1,312 @@
|
||||
import { ExternalFetchResult, FetchFunctionOptions, FetchResult, ModuleRunnerTransport, ModuleRunnerTransportHandlers, NormalizedModuleRunnerTransport, ViteFetchResult, createWebSocketModuleRunnerTransport } from "./moduleRunnerTransport-BWUZBVLX.js";
|
||||
import { ModuleNamespace, ViteHotContext } from "../../types/hot.js";
|
||||
import { HotPayload, Update } from "../../types/hmrPayload.js";
|
||||
import { InferCustomEventPayload } from "../../types/customEvent.js";
|
||||
|
||||
//#region src/module-runner/sourcemap/decoder.d.ts
|
||||
interface SourceMapLike {
|
||||
version: number;
|
||||
mappings?: string;
|
||||
names?: string[];
|
||||
sources?: string[];
|
||||
sourcesContent?: string[];
|
||||
}
|
||||
declare class DecodedMap {
|
||||
map: SourceMapLike;
|
||||
_encoded: string;
|
||||
_decoded: undefined | number[][][];
|
||||
_decodedMemo: Stats;
|
||||
url: string;
|
||||
version: number;
|
||||
names: string[];
|
||||
resolvedSources: string[];
|
||||
constructor(map: SourceMapLike, from: string);
|
||||
}
|
||||
interface Stats {
|
||||
lastKey: number;
|
||||
lastNeedle: number;
|
||||
lastIndex: number;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/shared/hmr.d.ts
|
||||
type CustomListenersMap = Map<string, ((data: any) => void)[]>;
|
||||
interface HotModule {
|
||||
id: string;
|
||||
callbacks: HotCallback[];
|
||||
}
|
||||
interface HotCallback {
|
||||
deps: string[];
|
||||
fn: (modules: Array<ModuleNamespace | undefined>) => void;
|
||||
}
|
||||
interface HMRLogger {
|
||||
error(msg: string | Error): void;
|
||||
debug(...msg: unknown[]): void;
|
||||
}
|
||||
declare class HMRClient {
|
||||
logger: HMRLogger;
|
||||
private transport;
|
||||
private importUpdatedModule;
|
||||
hotModulesMap: Map<string, HotModule>;
|
||||
disposeMap: Map<string, (data: any) => void | Promise<void>>;
|
||||
pruneMap: Map<string, (data: any) => void | Promise<void>>;
|
||||
dataMap: Map<string, any>;
|
||||
customListenersMap: CustomListenersMap;
|
||||
ctxToListenersMap: Map<string, CustomListenersMap>;
|
||||
currentFirstInvalidatedBy: string | undefined;
|
||||
constructor(logger: HMRLogger, transport: NormalizedModuleRunnerTransport, importUpdatedModule: (update: Update) => Promise<ModuleNamespace>);
|
||||
notifyListeners<T extends string>(event: T, data: InferCustomEventPayload<T>): Promise<void>;
|
||||
send(payload: HotPayload): void;
|
||||
clear(): void;
|
||||
prunePaths(paths: string[]): Promise<void>;
|
||||
protected warnFailedUpdate(err: Error, path: string | string[]): void;
|
||||
private updateQueue;
|
||||
private pendingUpdateQueue;
|
||||
/**
|
||||
* buffer multiple hot updates triggered by the same src change
|
||||
* so that they are invoked in the same order they were sent.
|
||||
* (otherwise the order may be inconsistent because of the http request round trip)
|
||||
*/
|
||||
queueUpdate(payload: Update): Promise<void>;
|
||||
private fetchUpdate;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/shared/ssrTransform.d.ts
|
||||
interface DefineImportMetadata {
|
||||
/**
|
||||
* Imported names before being transformed to `ssrImportKey`
|
||||
*
|
||||
* import foo, { bar as baz, qux } from 'hello'
|
||||
* => ['default', 'bar', 'qux']
|
||||
*
|
||||
* import * as namespace from 'world
|
||||
* => undefined
|
||||
*/
|
||||
importedNames?: string[];
|
||||
}
|
||||
interface SSRImportMetadata extends DefineImportMetadata {
|
||||
isDynamicImport?: boolean;
|
||||
}
|
||||
/**
|
||||
* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.
|
||||
* Top-level imports and dynamic imports work slightly differently in Node.js.
|
||||
* This function normalizes the differences so it matches prod behaviour.
|
||||
*/
|
||||
//#endregion
|
||||
//#region src/module-runner/constants.d.ts
|
||||
declare const ssrModuleExportsKey = "__vite_ssr_exports__";
|
||||
declare const ssrImportKey = "__vite_ssr_import__";
|
||||
declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
|
||||
declare const ssrExportAllKey = "__vite_ssr_exportAll__";
|
||||
declare const ssrExportNameKey = "__vite_ssr_exportName__";
|
||||
declare const ssrImportMetaKey = "__vite_ssr_import_meta__";
|
||||
//#endregion
|
||||
//#region src/module-runner/runner.d.ts
|
||||
interface ModuleRunnerDebugger {
|
||||
(formatter: unknown, ...args: unknown[]): void;
|
||||
}
|
||||
declare class ModuleRunner {
|
||||
options: ModuleRunnerOptions;
|
||||
evaluator: ModuleEvaluator;
|
||||
private debug?;
|
||||
evaluatedModules: EvaluatedModules;
|
||||
hmrClient?: HMRClient;
|
||||
private readonly transport;
|
||||
private readonly resetSourceMapSupport?;
|
||||
private readonly concurrentModuleNodePromises;
|
||||
private closed;
|
||||
constructor(options: ModuleRunnerOptions, evaluator?: ModuleEvaluator, debug?: ModuleRunnerDebugger | undefined);
|
||||
/**
|
||||
* URL to execute. Accepts file path, server path or id relative to the root.
|
||||
*/
|
||||
import<T = any>(url: string): Promise<T>;
|
||||
/**
|
||||
* Clear all caches including HMR listeners.
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
* Clears all caches, removes all HMR listeners, and resets source map support.
|
||||
* This method doesn't stop the HMR connection.
|
||||
*/
|
||||
close(): Promise<void>;
|
||||
/**
|
||||
* Returns `true` if the runtime has been closed by calling `close()` method.
|
||||
*/
|
||||
isClosed(): boolean;
|
||||
private processImport;
|
||||
private isCircularModule;
|
||||
private isCircularImport;
|
||||
private cachedRequest;
|
||||
private cachedModule;
|
||||
private getModuleInformation;
|
||||
protected directRequest(url: string, mod: EvaluatedModuleNode, _callstack: string[]): Promise<any>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/module-runner/sourcemap/interceptor.d.ts
|
||||
interface RetrieveFileHandler {
|
||||
(path: string): string | null | undefined | false;
|
||||
}
|
||||
interface RetrieveSourceMapHandler {
|
||||
(path: string): null | {
|
||||
url: string;
|
||||
map: any;
|
||||
};
|
||||
}
|
||||
interface InterceptorOptions {
|
||||
retrieveFile?: RetrieveFileHandler;
|
||||
retrieveSourceMap?: RetrieveSourceMapHandler;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/module-runner/types.d.ts
|
||||
interface ModuleRunnerImportMeta extends ImportMeta {
|
||||
url: string;
|
||||
env: ImportMetaEnv;
|
||||
hot?: ViteHotContext;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface ModuleRunnerContext {
|
||||
[ssrModuleExportsKey]: Record<string, any>;
|
||||
[ssrImportKey]: (id: string, metadata?: DefineImportMetadata) => Promise<any>;
|
||||
[ssrDynamicImportKey]: (id: string, options?: ImportCallOptions) => Promise<any>;
|
||||
[ssrExportAllKey]: (obj: any) => void;
|
||||
[ssrExportNameKey]: (name: string, getter: () => unknown) => void;
|
||||
[ssrImportMetaKey]: ModuleRunnerImportMeta;
|
||||
}
|
||||
interface ModuleEvaluator {
|
||||
/**
|
||||
* Number of prefixed lines in the transformed code.
|
||||
*/
|
||||
startOffset?: number;
|
||||
/**
|
||||
* Run code that was transformed by Vite.
|
||||
* @param context Function context
|
||||
* @param code Transformed code
|
||||
* @param module The module node
|
||||
*/
|
||||
runInlinedModule(context: ModuleRunnerContext, code: string, module: Readonly<EvaluatedModuleNode>): Promise<any>;
|
||||
/**
|
||||
* Run externalized module.
|
||||
* @param file File URL to the external module
|
||||
*/
|
||||
runExternalModule(file: string): Promise<any>;
|
||||
}
|
||||
type ResolvedResult = (ExternalFetchResult | ViteFetchResult) & {
|
||||
url: string;
|
||||
id: string;
|
||||
};
|
||||
type FetchFunction = (id: string, importer?: string, options?: FetchFunctionOptions) => Promise<FetchResult>;
|
||||
interface ModuleRunnerHmr {
|
||||
/**
|
||||
* Configure HMR logger.
|
||||
*/
|
||||
logger?: false | HMRLogger;
|
||||
}
|
||||
interface ModuleRunnerOptions {
|
||||
/**
|
||||
* A set of methods to communicate with the server.
|
||||
*/
|
||||
transport: ModuleRunnerTransport;
|
||||
/**
|
||||
* Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
|
||||
* Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
|
||||
* You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
|
||||
*/
|
||||
sourcemapInterceptor?: false | 'node' | 'prepareStackTrace' | InterceptorOptions;
|
||||
/**
|
||||
* Disable HMR or configure HMR options.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
hmr?: boolean | ModuleRunnerHmr;
|
||||
/**
|
||||
* Create import.meta object for the module.
|
||||
*
|
||||
* @default createDefaultImportMeta
|
||||
*/
|
||||
createImportMeta?: (modulePath: string) => ModuleRunnerImportMeta | Promise<ModuleRunnerImportMeta>;
|
||||
/**
|
||||
* Custom module cache. If not provided, creates a separate module cache for each ModuleRunner instance.
|
||||
*/
|
||||
evaluatedModules?: EvaluatedModules;
|
||||
}
|
||||
interface ImportMetaEnv {
|
||||
[key: string]: any;
|
||||
BASE_URL: string;
|
||||
MODE: string;
|
||||
DEV: boolean;
|
||||
PROD: boolean;
|
||||
SSR: boolean;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/module-runner/evaluatedModules.d.ts
|
||||
declare class EvaluatedModuleNode {
|
||||
id: string;
|
||||
url: string;
|
||||
importers: Set<string>;
|
||||
imports: Set<string>;
|
||||
evaluated: boolean;
|
||||
meta: ResolvedResult | undefined;
|
||||
promise: Promise<any> | undefined;
|
||||
exports: any | undefined;
|
||||
file: string;
|
||||
map: DecodedMap | undefined;
|
||||
constructor(id: string, url: string);
|
||||
}
|
||||
declare class EvaluatedModules {
|
||||
readonly idToModuleMap: Map<string, EvaluatedModuleNode>;
|
||||
readonly fileToModulesMap: Map<string, Set<EvaluatedModuleNode>>;
|
||||
readonly urlToIdModuleMap: Map<string, EvaluatedModuleNode>;
|
||||
/**
|
||||
* Returns the module node by the resolved module ID. Usually, module ID is
|
||||
* the file system path with query and/or hash. It can also be a virtual module.
|
||||
*
|
||||
* Module runner graph will have 1 to 1 mapping with the server module graph.
|
||||
* @param id Resolved module ID
|
||||
*/
|
||||
getModuleById(id: string): EvaluatedModuleNode | undefined;
|
||||
/**
|
||||
* Returns all modules related to the file system path. Different modules
|
||||
* might have different query parameters or hash, so it's possible to have
|
||||
* multiple modules for the same file.
|
||||
* @param file The file system path of the module
|
||||
*/
|
||||
getModulesByFile(file: string): Set<EvaluatedModuleNode> | undefined;
|
||||
/**
|
||||
* Returns the module node by the URL that was used in the import statement.
|
||||
* Unlike module graph on the server, the URL is not resolved and is used as is.
|
||||
* @param url Server URL that was used in the import statement
|
||||
*/
|
||||
getModuleByUrl(url: string): EvaluatedModuleNode | undefined;
|
||||
/**
|
||||
* Ensure that module is in the graph. If the module is already in the graph,
|
||||
* it will return the existing module node. Otherwise, it will create a new
|
||||
* module node and add it to the graph.
|
||||
* @param id Resolved module ID
|
||||
* @param url URL that was used in the import statement
|
||||
*/
|
||||
ensureModule(id: string, url: string): EvaluatedModuleNode;
|
||||
invalidateModule(node: EvaluatedModuleNode): void;
|
||||
/**
|
||||
* Extracts the inlined source map from the module code and returns the decoded
|
||||
* source map. If the source map is not inlined, it will return null.
|
||||
* @param id Resolved module ID
|
||||
*/
|
||||
getModuleSourceMapById(id: string): DecodedMap | null;
|
||||
clear(): void;
|
||||
}
|
||||
declare function normalizeModuleId(file: string): string;
|
||||
//#endregion
|
||||
//#region src/module-runner/esmEvaluator.d.ts
|
||||
declare class ESModulesEvaluator implements ModuleEvaluator {
|
||||
readonly startOffset: number;
|
||||
runInlinedModule(context: ModuleRunnerContext, code: string): Promise<any>;
|
||||
runExternalModule(filepath: string): Promise<any>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/module-runner/createImportMeta.d.ts
|
||||
declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta;
|
||||
/**
|
||||
* Create import.meta object for Node.js.
|
||||
*/
|
||||
declare function createNodeImportMeta(modulePath: string): Promise<ModuleRunnerImportMeta>;
|
||||
//#endregion
|
||||
export { ESModulesEvaluator, type EvaluatedModuleNode, EvaluatedModules, type FetchFunction, type FetchFunctionOptions, type FetchResult, type HMRLogger, type InterceptorOptions, type ModuleEvaluator, ModuleRunner, type ModuleRunnerContext, type ModuleRunnerHmr, type ModuleRunnerImportMeta, type ModuleRunnerOptions, type ModuleRunnerTransport, type ModuleRunnerTransportHandlers, type ResolvedResult, type SSRImportMetadata, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };
|
||||
1133
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/module-runner.js
generated
vendored
Normal file
1133
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/module-runner.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
88
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/moduleRunnerTransport-BWUZBVLX.d.ts
generated
vendored
Normal file
88
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/moduleRunnerTransport-BWUZBVLX.d.ts
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
import { HotPayload } from "../../types/hmrPayload.js";
|
||||
|
||||
//#region src/shared/invokeMethods.d.ts
|
||||
interface FetchFunctionOptions {
|
||||
cached?: boolean;
|
||||
startOffset?: number;
|
||||
}
|
||||
type FetchResult = CachedFetchResult | ExternalFetchResult | ViteFetchResult;
|
||||
interface CachedFetchResult {
|
||||
/**
|
||||
* If module cached in the runner, we can just confirm
|
||||
* it wasn't invalidated on the server side.
|
||||
*/
|
||||
cache: true;
|
||||
}
|
||||
interface ExternalFetchResult {
|
||||
/**
|
||||
* The path to the externalized module starting with file://,
|
||||
* by default this will be imported via a dynamic "import"
|
||||
* instead of being transformed by vite and loaded with vite runner
|
||||
*/
|
||||
externalize: string;
|
||||
/**
|
||||
* Type of the module. Will be used to determine if import statement is correct.
|
||||
* For example, if Vite needs to throw an error if variable is not actually exported
|
||||
*/
|
||||
type: 'module' | 'commonjs' | 'builtin' | 'network';
|
||||
}
|
||||
interface ViteFetchResult {
|
||||
/**
|
||||
* Code that will be evaluated by vite runner
|
||||
* by default this will be wrapped in an async function
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
* File path of the module on disk.
|
||||
* This will be resolved as import.meta.url/filename
|
||||
* Will be equal to `null` for virtual modules
|
||||
*/
|
||||
file: string | null;
|
||||
/**
|
||||
* Module ID in the server module graph.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Module URL used in the import.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* Invalidate module on the client side.
|
||||
*/
|
||||
invalidate: boolean;
|
||||
}
|
||||
type InvokeMethods = {
|
||||
fetchModule: (id: string, importer?: string, options?: FetchFunctionOptions) => Promise<FetchResult>;
|
||||
};
|
||||
//#endregion
|
||||
//#region src/shared/moduleRunnerTransport.d.ts
|
||||
type ModuleRunnerTransportHandlers = {
|
||||
onMessage: (data: HotPayload) => void;
|
||||
onDisconnection: () => void;
|
||||
};
|
||||
/**
|
||||
* "send and connect" or "invoke" must be implemented
|
||||
*/
|
||||
interface ModuleRunnerTransport {
|
||||
connect?(handlers: ModuleRunnerTransportHandlers): Promise<void> | void;
|
||||
disconnect?(): Promise<void> | void;
|
||||
send?(data: HotPayload): Promise<void> | void;
|
||||
invoke?(data: HotPayload): Promise<{
|
||||
result: any;
|
||||
} | {
|
||||
error: any;
|
||||
}>;
|
||||
timeout?: number;
|
||||
}
|
||||
interface NormalizedModuleRunnerTransport {
|
||||
connect?(onMessage?: (data: HotPayload) => void): Promise<void> | void;
|
||||
disconnect?(): Promise<void> | void;
|
||||
send(data: HotPayload): Promise<void>;
|
||||
invoke<T extends keyof InvokeMethods>(name: T, data: Parameters<InvokeMethods[T]>): Promise<ReturnType<Awaited<InvokeMethods[T]>>>;
|
||||
}
|
||||
declare const createWebSocketModuleRunnerTransport: (options: {
|
||||
createConnection: () => WebSocket;
|
||||
pingInterval?: number;
|
||||
}) => Required<Pick<ModuleRunnerTransport, "connect" | "disconnect" | "send">>;
|
||||
//#endregion
|
||||
export { ExternalFetchResult, FetchFunctionOptions, FetchResult, ModuleRunnerTransport, ModuleRunnerTransportHandlers, NormalizedModuleRunnerTransport, ViteFetchResult, createWebSocketModuleRunnerTransport };
|
||||
63
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/runtime.d.ts
generated
vendored
63
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/runtime.d.ts
generated
vendored
@ -1,63 +0,0 @@
|
||||
import { V as ViteRuntimeOptions, b as ViteModuleRunner, M as ModuleCacheMap, c as HMRClient, R as ResolvedResult, d as ViteRuntimeModuleContext } from './types.d-aGj9QkWt.js';
|
||||
export { a as FetchFunction, F as FetchResult, e as HMRConnection, H as HMRLogger, g as HMRRuntimeConnection, f as ModuleCache, S as SSRImportMetadata, h as ViteRuntimeImportMeta, s as ssrDynamicImportKey, i as ssrExportAllKey, j as ssrImportKey, k as ssrImportMetaKey, l as ssrModuleExportsKey } from './types.d-aGj9QkWt.js';
|
||||
import '../../types/hot.js';
|
||||
import '../../types/hmrPayload.js';
|
||||
import '../../types/customEvent.js';
|
||||
|
||||
interface ViteRuntimeDebugger {
|
||||
(formatter: unknown, ...args: unknown[]): void;
|
||||
}
|
||||
declare class ViteRuntime {
|
||||
options: ViteRuntimeOptions;
|
||||
runner: ViteModuleRunner;
|
||||
private debug?;
|
||||
/**
|
||||
* Holds the cache of modules
|
||||
* Keys of the map are ids
|
||||
*/
|
||||
moduleCache: ModuleCacheMap;
|
||||
hmrClient?: HMRClient;
|
||||
entrypoints: Set<string>;
|
||||
private idToUrlMap;
|
||||
private fileToIdMap;
|
||||
private envProxy;
|
||||
private _destroyed;
|
||||
private _resetSourceMapSupport?;
|
||||
constructor(options: ViteRuntimeOptions, runner: ViteModuleRunner, debug?: ViteRuntimeDebugger | undefined);
|
||||
/**
|
||||
* URL to execute. Accepts file path, server path or id relative to the root.
|
||||
*/
|
||||
executeUrl<T = any>(url: string): Promise<T>;
|
||||
/**
|
||||
* Entrypoint URL to execute. Accepts file path, server path or id relative to the root.
|
||||
* In the case of a full reload triggered by HMR, this is the module that will be reloaded.
|
||||
* If this method is called multiple times, all entrypoints will be reloaded one at a time.
|
||||
*/
|
||||
executeEntrypoint<T = any>(url: string): Promise<T>;
|
||||
/**
|
||||
* Clear all caches including HMR listeners.
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
* Clears all caches, removes all HMR listeners, and resets source map support.
|
||||
* This method doesn't stop the HMR connection.
|
||||
*/
|
||||
destroy(): Promise<void>;
|
||||
/**
|
||||
* Returns `true` if the runtime has been destroyed by calling `destroy()` method.
|
||||
*/
|
||||
isDestroyed(): boolean;
|
||||
private invalidateFiles;
|
||||
private normalizeEntryUrl;
|
||||
private processImport;
|
||||
private cachedRequest;
|
||||
private cachedModule;
|
||||
protected directRequest(id: string, fetchResult: ResolvedResult, _callstack: string[]): Promise<any>;
|
||||
}
|
||||
|
||||
declare class ESModulesRunner implements ViteModuleRunner {
|
||||
runViteModule(context: ViteRuntimeModuleContext, code: string): Promise<any>;
|
||||
runExternalModule(filepath: string): Promise<any>;
|
||||
}
|
||||
|
||||
export { ESModulesRunner, ModuleCacheMap, ResolvedResult, ViteModuleRunner, ViteRuntime, ViteRuntimeModuleContext, ViteRuntimeOptions };
|
||||
1066
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/runtime.js
generated
vendored
1066
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/runtime.js
generated
vendored
File diff suppressed because it is too large
Load Diff
281
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/types.d-aGj9QkWt.d.ts
generated
vendored
281
MEDICONNECTv3 - cópia/node_modules/vite/dist/node/types.d-aGj9QkWt.d.ts
generated
vendored
@ -1,281 +0,0 @@
|
||||
import { ModuleNamespace, ViteHotContext } from '../../types/hot.js';
|
||||
import { Update, HMRPayload } from '../../types/hmrPayload.js';
|
||||
import { InferCustomEventPayload } from '../../types/customEvent.js';
|
||||
|
||||
type CustomListenersMap = Map<string, ((data: any) => void)[]>;
|
||||
interface HotModule {
|
||||
id: string;
|
||||
callbacks: HotCallback[];
|
||||
}
|
||||
interface HotCallback {
|
||||
deps: string[];
|
||||
fn: (modules: Array<ModuleNamespace | undefined>) => void;
|
||||
}
|
||||
interface HMRLogger {
|
||||
error(msg: string | Error): void;
|
||||
debug(...msg: unknown[]): void;
|
||||
}
|
||||
interface HMRConnection {
|
||||
/**
|
||||
* Checked before sending messages to the client.
|
||||
*/
|
||||
isReady(): boolean;
|
||||
/**
|
||||
* Send message to the client.
|
||||
*/
|
||||
send(messages: string): void;
|
||||
}
|
||||
declare class HMRMessenger {
|
||||
private connection;
|
||||
constructor(connection: HMRConnection);
|
||||
private queue;
|
||||
send(message: string): void;
|
||||
flush(): void;
|
||||
}
|
||||
declare class HMRClient {
|
||||
logger: HMRLogger;
|
||||
private importUpdatedModule;
|
||||
hotModulesMap: Map<string, HotModule>;
|
||||
disposeMap: Map<string, (data: any) => void | Promise<void>>;
|
||||
pruneMap: Map<string, (data: any) => void | Promise<void>>;
|
||||
dataMap: Map<string, any>;
|
||||
customListenersMap: CustomListenersMap;
|
||||
ctxToListenersMap: Map<string, CustomListenersMap>;
|
||||
messenger: HMRMessenger;
|
||||
constructor(logger: HMRLogger, connection: HMRConnection, importUpdatedModule: (update: Update) => Promise<ModuleNamespace>);
|
||||
notifyListeners<T extends string>(event: T, data: InferCustomEventPayload<T>): Promise<void>;
|
||||
clear(): void;
|
||||
prunePaths(paths: string[]): Promise<void>;
|
||||
protected warnFailedUpdate(err: Error, path: string | string[]): void;
|
||||
private updateQueue;
|
||||
private pendingUpdateQueue;
|
||||
/**
|
||||
* buffer multiple hot updates triggered by the same src change
|
||||
* so that they are invoked in the same order they were sent.
|
||||
* (otherwise the order may be inconsistent because of the http request round trip)
|
||||
*/
|
||||
queueUpdate(payload: Update): Promise<void>;
|
||||
private fetchUpdate;
|
||||
}
|
||||
|
||||
interface DefineImportMetadata {
|
||||
/**
|
||||
* Imported names before being transformed to `ssrImportKey`
|
||||
*
|
||||
* import foo, { bar as baz, qux } from 'hello'
|
||||
* => ['default', 'bar', 'qux']
|
||||
*
|
||||
* import * as namespace from 'world
|
||||
* => undefined
|
||||
*/
|
||||
importedNames?: string[];
|
||||
}
|
||||
interface SSRImportBaseMetadata extends DefineImportMetadata {
|
||||
isDynamicImport?: boolean;
|
||||
}
|
||||
|
||||
interface SourceMapLike {
|
||||
version: number;
|
||||
mappings?: string;
|
||||
names?: string[];
|
||||
sources?: string[];
|
||||
sourcesContent?: string[];
|
||||
}
|
||||
declare class DecodedMap {
|
||||
map: SourceMapLike;
|
||||
_encoded: string;
|
||||
_decoded: undefined | number[][][];
|
||||
_decodedMemo: Stats;
|
||||
url: string;
|
||||
version: number;
|
||||
names: string[];
|
||||
resolvedSources: string[];
|
||||
constructor(map: SourceMapLike, from: string);
|
||||
}
|
||||
interface Stats {
|
||||
lastKey: number;
|
||||
lastNeedle: number;
|
||||
lastIndex: number;
|
||||
}
|
||||
|
||||
declare class ModuleCacheMap extends Map<string, ModuleCache> {
|
||||
private root;
|
||||
constructor(root: string, entries?: [string, ModuleCache][]);
|
||||
normalize(fsPath: string): string;
|
||||
/**
|
||||
* Assign partial data to the map
|
||||
*/
|
||||
update(fsPath: string, mod: ModuleCache): this;
|
||||
setByModuleId(modulePath: string, mod: ModuleCache): this;
|
||||
set(fsPath: string, mod: ModuleCache): this;
|
||||
getByModuleId(modulePath: string): ModuleCache;
|
||||
get(fsPath: string): ModuleCache;
|
||||
deleteByModuleId(modulePath: string): boolean;
|
||||
delete(fsPath: string): boolean;
|
||||
invalidate(id: string): void;
|
||||
isImported({ importedId, importedBy, }: {
|
||||
importedId: string;
|
||||
importedBy: string;
|
||||
}, seen?: Set<string>): boolean;
|
||||
/**
|
||||
* Invalidate modules that dependent on the given modules, up to the main entry
|
||||
*/
|
||||
invalidateDepTree(ids: string[] | Set<string>, invalidated?: Set<string>): Set<string>;
|
||||
/**
|
||||
* Invalidate dependency modules of the given modules, down to the bottom-level dependencies
|
||||
*/
|
||||
invalidateSubDepTree(ids: string[] | Set<string>, invalidated?: Set<string>): Set<string>;
|
||||
getSourceMap(moduleId: string): null | DecodedMap;
|
||||
}
|
||||
|
||||
declare const ssrModuleExportsKey = "__vite_ssr_exports__";
|
||||
declare const ssrImportKey = "__vite_ssr_import__";
|
||||
declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
|
||||
declare const ssrExportAllKey = "__vite_ssr_exportAll__";
|
||||
declare const ssrImportMetaKey = "__vite_ssr_import_meta__";
|
||||
|
||||
interface RetrieveFileHandler {
|
||||
(path: string): string | null | undefined | false;
|
||||
}
|
||||
interface RetrieveSourceMapHandler {
|
||||
(path: string): null | {
|
||||
url: string;
|
||||
map: any;
|
||||
};
|
||||
}
|
||||
interface InterceptorOptions {
|
||||
retrieveFile?: RetrieveFileHandler;
|
||||
retrieveSourceMap?: RetrieveSourceMapHandler;
|
||||
}
|
||||
|
||||
interface SSRImportMetadata extends SSRImportBaseMetadata {
|
||||
entrypoint?: boolean;
|
||||
}
|
||||
interface HMRRuntimeConnection extends HMRConnection {
|
||||
/**
|
||||
* Configure how HMR is handled when this connection triggers an update.
|
||||
* This method expects that connection will start listening for HMR updates and call this callback when it's received.
|
||||
*/
|
||||
onUpdate(callback: (payload: HMRPayload) => void): void;
|
||||
}
|
||||
interface ViteRuntimeImportMeta extends ImportMeta {
|
||||
url: string;
|
||||
env: ImportMetaEnv;
|
||||
hot?: ViteHotContext;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface ViteRuntimeModuleContext {
|
||||
[ssrModuleExportsKey]: Record<string, any>;
|
||||
[ssrImportKey]: (id: string, metadata?: DefineImportMetadata) => Promise<any>;
|
||||
[ssrDynamicImportKey]: (id: string, options?: ImportCallOptions) => Promise<any>;
|
||||
[ssrExportAllKey]: (obj: any) => void;
|
||||
[ssrImportMetaKey]: ViteRuntimeImportMeta;
|
||||
}
|
||||
interface ViteModuleRunner {
|
||||
/**
|
||||
* Run code that was transformed by Vite.
|
||||
* @param context Function context
|
||||
* @param code Transformed code
|
||||
* @param id ID that was used to fetch the module
|
||||
*/
|
||||
runViteModule(context: ViteRuntimeModuleContext, code: string, id: string): Promise<any>;
|
||||
/**
|
||||
* Run externalized module.
|
||||
* @param file File URL to the external module
|
||||
*/
|
||||
runExternalModule(file: string): Promise<any>;
|
||||
}
|
||||
interface ModuleCache {
|
||||
promise?: Promise<any>;
|
||||
exports?: any;
|
||||
evaluated?: boolean;
|
||||
map?: DecodedMap;
|
||||
meta?: FetchResult;
|
||||
/**
|
||||
* Module ids that imports this module
|
||||
*/
|
||||
importers?: Set<string>;
|
||||
imports?: Set<string>;
|
||||
}
|
||||
type FetchResult = ExternalFetchResult | ViteFetchResult;
|
||||
interface ExternalFetchResult {
|
||||
/**
|
||||
* The path to the externalized module starting with file://,
|
||||
* by default this will be imported via a dynamic "import"
|
||||
* instead of being transformed by vite and loaded with vite runtime
|
||||
*/
|
||||
externalize: string;
|
||||
/**
|
||||
* Type of the module. Will be used to determine if import statement is correct.
|
||||
* For example, if Vite needs to throw an error if variable is not actually exported
|
||||
*/
|
||||
type?: 'module' | 'commonjs' | 'builtin' | 'network';
|
||||
}
|
||||
interface ViteFetchResult {
|
||||
/**
|
||||
* Code that will be evaluated by vite runtime
|
||||
* by default this will be wrapped in an async function
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
* File path of the module on disk.
|
||||
* This will be resolved as import.meta.url/filename
|
||||
*/
|
||||
file: string | null;
|
||||
}
|
||||
type ResolvedResult = (ExternalFetchResult | ViteFetchResult) & {
|
||||
id: string;
|
||||
};
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
type FetchFunction = (id: string, importer?: string) => Promise<FetchResult>;
|
||||
interface ViteRuntimeOptions {
|
||||
/**
|
||||
* Root of the project
|
||||
*/
|
||||
root: string;
|
||||
/**
|
||||
* A method to get the information about the module.
|
||||
* For SSR, Vite exposes `server.ssrFetchModule` function that you can use here.
|
||||
* For other runtime use cases, Vite also exposes `fetchModule` from its main entry point.
|
||||
*/
|
||||
fetchModule: FetchFunction;
|
||||
/**
|
||||
* Custom environment variables available on `import.meta.env`. This doesn't modify the actual `process.env`.
|
||||
*/
|
||||
environmentVariables?: Record<string, any>;
|
||||
/**
|
||||
* Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
|
||||
* Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
|
||||
* You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
|
||||
*/
|
||||
sourcemapInterceptor?: false | 'node' | 'prepareStackTrace' | InterceptorOptions;
|
||||
/**
|
||||
* Disable HMR or configure HMR options.
|
||||
*/
|
||||
hmr?: false | {
|
||||
/**
|
||||
* Configure how HMR communicates between the client and the server.
|
||||
*/
|
||||
connection: HMRRuntimeConnection;
|
||||
/**
|
||||
* Configure HMR logger.
|
||||
*/
|
||||
logger?: false | HMRLogger;
|
||||
};
|
||||
/**
|
||||
* Custom module cache. If not provided, creates a separate module cache for each ViteRuntime instance.
|
||||
*/
|
||||
moduleCache?: ModuleCacheMap;
|
||||
}
|
||||
interface ImportMetaEnv {
|
||||
[key: string]: any;
|
||||
BASE_URL: string;
|
||||
MODE: string;
|
||||
DEV: boolean;
|
||||
PROD: boolean;
|
||||
SSR: boolean;
|
||||
}
|
||||
|
||||
export { type FetchResult as F, type HMRLogger as H, ModuleCacheMap as M, type ResolvedResult as R, type SSRImportMetadata as S, type ViteRuntimeOptions as V, type FetchFunction as a, type ViteModuleRunner as b, HMRClient as c, type ViteRuntimeModuleContext as d, type HMRConnection as e, type ModuleCache as f, type HMRRuntimeConnection as g, type ViteRuntimeImportMeta as h, ssrExportAllKey as i, ssrImportKey as j, ssrImportMetaKey as k, ssrModuleExportsKey as l, ssrDynamicImportKey as s };
|
||||
60
MEDICONNECTv3 - cópia/node_modules/vite/index.cjs
generated
vendored
60
MEDICONNECTv3 - cópia/node_modules/vite/index.cjs
generated
vendored
@ -1,60 +0,0 @@
|
||||
warnCjsUsage()
|
||||
|
||||
// type utils
|
||||
module.exports.defineConfig = (config) => config
|
||||
|
||||
// proxy cjs utils (sync functions)
|
||||
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
|
||||
|
||||
// async functions, can be redirect from ESM build
|
||||
const asyncFunctions = [
|
||||
'build',
|
||||
'createServer',
|
||||
'preview',
|
||||
'transformWithEsbuild',
|
||||
'resolveConfig',
|
||||
'optimizeDeps',
|
||||
'formatPostcssSourceMap',
|
||||
'loadConfigFromFile',
|
||||
'preprocessCSS',
|
||||
]
|
||||
asyncFunctions.forEach((name) => {
|
||||
module.exports[name] = (...args) =>
|
||||
import('./dist/node/index.js').then((i) => i[name](...args))
|
||||
})
|
||||
|
||||
function warnCjsUsage() {
|
||||
if (process.env.VITE_CJS_IGNORE_WARNING) return
|
||||
const logLevelIndex = process.argv.findIndex((arg) =>
|
||||
/^(?:-l|--logLevel)/.test(arg),
|
||||
)
|
||||
if (logLevelIndex > 0) {
|
||||
const logLevelValue = process.argv[logLevelIndex + 1]
|
||||
if (logLevelValue === 'silent' || logLevelValue === 'error') {
|
||||
return
|
||||
}
|
||||
if (/silent|error/.test(process.argv[logLevelIndex])) {
|
||||
return
|
||||
}
|
||||
}
|
||||
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
|
||||
console.warn(
|
||||
yellow(
|
||||
`The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
|
||||
),
|
||||
)
|
||||
if (process.env.VITE_CJS_TRACE) {
|
||||
const e = {}
|
||||
const stackTraceLimit = Error.stackTraceLimit
|
||||
Error.stackTraceLimit = 100
|
||||
Error.captureStackTrace(e)
|
||||
Error.stackTraceLimit = stackTraceLimit
|
||||
console.log(
|
||||
e.stack
|
||||
.split('\n')
|
||||
.slice(1)
|
||||
.filter((line) => !line.includes('(node:'))
|
||||
.join('\n'),
|
||||
)
|
||||
}
|
||||
}
|
||||
6
MEDICONNECTv3 - cópia/node_modules/vite/index.d.cts
generated
vendored
6
MEDICONNECTv3 - cópia/node_modules/vite/index.d.cts
generated
vendored
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* @deprecated The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
|
||||
*/
|
||||
declare const module: any
|
||||
|
||||
export = module
|
||||
1
MEDICONNECTv3 - cópia/node_modules/vite/misc/false.js
generated
vendored
Normal file
1
MEDICONNECTv3 - cópia/node_modules/vite/misc/false.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default false
|
||||
1
MEDICONNECTv3 - cópia/node_modules/vite/misc/true.js
generated
vendored
Normal file
1
MEDICONNECTv3 - cópia/node_modules/vite/misc/true.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default true
|
||||
7
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/LICENSE
generated
vendored
Normal file
7
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/LICENSE
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
Copyright 2023 Abdullah Atta
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
91
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/README.md
generated
vendored
Normal file
91
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/README.md
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
<p align="center">
|
||||
<img src="https://github.com/thecodrr/fdir/raw/master/assets/fdir.gif" width="75%"/>
|
||||
|
||||
<h1 align="center">The Fastest Directory Crawler & Globber for NodeJS</h1>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/v/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/dw/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://codeclimate.com/github/thecodrr/fdir/maintainability"><img src="https://img.shields.io/codeclimate/maintainability-percentage/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://coveralls.io/github/thecodrr/fdir?branch=master"><img src="https://img.shields.io/coveralls/github/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/bundlephobia/minzip/fdir?style=for-the-badge"/></a>
|
||||
<a href="https://www.producthunt.com/posts/fdir-every-millisecond-matters"><img src="https://img.shields.io/badge/ProductHunt-Upvote-red?style=for-the-badge&logo=product-hunt"/></a>
|
||||
<a href="https://dev.to/thecodrr/how-i-wrote-the-fastest-directory-crawler-ever-3p9c"><img src="https://img.shields.io/badge/dev.to-Read%20Blog-black?style=for-the-badge&logo=dev.to"/></a>
|
||||
<a href="./LICENSE"><img src="https://img.shields.io/github/license/thecodrr/fdir?style=for-the-badge"/></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
⚡ **The Fastest:** Nothing similar (in the NodeJS world) beats `fdir` in speed. It can easily crawl a directory containing **1 million files in < 1 second.**
|
||||
|
||||
💡 **Stupidly Easy:** `fdir` uses expressive Builder pattern to build the crawler increasing code readability.
|
||||
|
||||
🤖 **Zero Dependencies\*:** `fdir` only uses NodeJS `fs` & `path` modules.
|
||||
|
||||
🕺 **Astonishingly Small:** < 2KB in size gzipped & minified.
|
||||
|
||||
🖮 **Hackable:** Extending `fdir` is extremely simple now that the new Builder API is here. Feel free to experiment around.
|
||||
|
||||
_\* `picomatch` must be installed manually by the user to support globbing._
|
||||
|
||||
## 🚄 Quickstart
|
||||
|
||||
### Installation
|
||||
|
||||
You can install using `npm`:
|
||||
|
||||
```sh
|
||||
$ npm i fdir
|
||||
```
|
||||
|
||||
or Yarn:
|
||||
|
||||
```sh
|
||||
$ yarn add fdir
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
```ts
|
||||
import { fdir } from "fdir";
|
||||
|
||||
// create the builder
|
||||
const api = new fdir().withFullPaths().crawl("path/to/dir");
|
||||
|
||||
// get all files in a directory synchronously
|
||||
const files = api.sync();
|
||||
|
||||
// or asynchronously
|
||||
api.withPromise().then((files) => {
|
||||
// do something with the result here.
|
||||
});
|
||||
```
|
||||
|
||||
## Documentation:
|
||||
|
||||
Documentation for all methods is available [here](/documentation.md).
|
||||
|
||||
## 📊 Benchmarks:
|
||||
|
||||
Please check the benchmark against the latest version [here](/BENCHMARKS.md).
|
||||
|
||||
## 🙏Used by:
|
||||
|
||||
`fdir` is downloaded over 200k+ times a week by projects around the world. Here's a list of some notable projects using `fdir` in production:
|
||||
|
||||
> Note: if you think your project should be here, feel free to open an issue. Notable is anything with a considerable amount of GitHub stars.
|
||||
|
||||
1. [rollup/plugins](https://github.com/rollup/plugins)
|
||||
2. [SuperchupuDev/tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
|
||||
3. [pulumi/pulumi](https://github.com/pulumi/pulumi)
|
||||
4. [dotenvx/dotenvx](https://github.com/dotenvx/dotenvx)
|
||||
5. [mdn/yari](https://github.com/mdn/yari)
|
||||
6. [streetwriters/notesnook](https://github.com/streetwriters/notesnook)
|
||||
7. [imba/imba](https://github.com/imba/imba)
|
||||
8. [moroshko/react-scanner](https://github.com/moroshko/react-scanner)
|
||||
9. [netlify/build](https://github.com/netlify/build)
|
||||
10. [yassinedoghri/astro-i18next](https://github.com/yassinedoghri/astro-i18next)
|
||||
11. [selfrefactor/rambda](https://github.com/selfrefactor/rambda)
|
||||
12. [whyboris/Video-Hub-App](https://github.com/whyboris/Video-Hub-App)
|
||||
|
||||
## 🦮 LICENSE
|
||||
|
||||
Copyright © 2024 Abdullah Atta under MIT. [Read full text here.](https://github.com/thecodrr/fdir/raw/master/LICENSE)
|
||||
588
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.cjs
generated
vendored
Normal file
588
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.cjs
generated
vendored
Normal file
@ -0,0 +1,588 @@
|
||||
//#region rolldown:runtime
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
|
||||
//#endregion
|
||||
const path = __toESM(require("path"));
|
||||
const fs = __toESM(require("fs"));
|
||||
|
||||
//#region src/utils.ts
|
||||
function cleanPath(path$1) {
|
||||
let normalized = (0, path.normalize)(path$1);
|
||||
if (normalized.length > 1 && normalized[normalized.length - 1] === path.sep) normalized = normalized.substring(0, normalized.length - 1);
|
||||
return normalized;
|
||||
}
|
||||
const SLASHES_REGEX = /[\\/]/g;
|
||||
function convertSlashes(path$1, separator) {
|
||||
return path$1.replace(SLASHES_REGEX, separator);
|
||||
}
|
||||
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
||||
function isRootDirectory(path$1) {
|
||||
return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
|
||||
}
|
||||
function normalizePath(path$1, options) {
|
||||
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
||||
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
|
||||
if (resolvePaths) path$1 = (0, path.resolve)(path$1);
|
||||
if (normalizePath$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
|
||||
if (path$1 === ".") return "";
|
||||
const needsSeperator = path$1[path$1.length - 1] !== pathSeparator;
|
||||
return convertSlashes(needsSeperator ? path$1 + pathSeparator : path$1, pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/join-path.ts
|
||||
function joinPathWithBasePath(filename, directoryPath) {
|
||||
return directoryPath + filename;
|
||||
}
|
||||
function joinPathWithRelativePath(root, options) {
|
||||
return function(filename, directoryPath) {
|
||||
const sameRoot = directoryPath.startsWith(root);
|
||||
if (sameRoot) return directoryPath.slice(root.length) + filename;
|
||||
else return convertSlashes((0, path.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
||||
};
|
||||
}
|
||||
function joinPath(filename) {
|
||||
return filename;
|
||||
}
|
||||
function joinDirectoryPath(filename, directoryPath, separator) {
|
||||
return directoryPath + filename + separator;
|
||||
}
|
||||
function build$7(root, options) {
|
||||
const { relativePaths, includeBasePath } = options;
|
||||
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-directory.ts
|
||||
function pushDirectoryWithRelativePath(root) {
|
||||
return function(directoryPath, paths) {
|
||||
paths.push(directoryPath.substring(root.length) || ".");
|
||||
};
|
||||
}
|
||||
function pushDirectoryFilterWithRelativePath(root) {
|
||||
return function(directoryPath, paths, filters) {
|
||||
const relativePath = directoryPath.substring(root.length) || ".";
|
||||
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
|
||||
};
|
||||
}
|
||||
const pushDirectory = (directoryPath, paths) => {
|
||||
paths.push(directoryPath || ".");
|
||||
};
|
||||
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
||||
const path$1 = directoryPath || ".";
|
||||
if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
|
||||
};
|
||||
const empty$2 = () => {};
|
||||
function build$6(root, options) {
|
||||
const { includeDirs, filters, relativePaths } = options;
|
||||
if (!includeDirs) return empty$2;
|
||||
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
||||
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-file.ts
|
||||
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) counts.files++;
|
||||
};
|
||||
const pushFileFilter = (filename, paths, _counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
|
||||
};
|
||||
const pushFileCount = (_filename, _paths, counts, _filters) => {
|
||||
counts.files++;
|
||||
};
|
||||
const pushFile = (filename, paths) => {
|
||||
paths.push(filename);
|
||||
};
|
||||
const empty$1 = () => {};
|
||||
function build$5(options) {
|
||||
const { excludeFiles, filters, onlyCounts } = options;
|
||||
if (excludeFiles) return empty$1;
|
||||
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
||||
else if (onlyCounts) return pushFileCount;
|
||||
else return pushFile;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/get-array.ts
|
||||
const getArray = (paths) => {
|
||||
return paths;
|
||||
};
|
||||
const getArrayGroup = () => {
|
||||
return [""].slice(0, 0);
|
||||
};
|
||||
function build$4(options) {
|
||||
return options.group ? getArrayGroup : getArray;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/group-files.ts
|
||||
const groupFiles = (groups, directory, files) => {
|
||||
groups.push({
|
||||
directory,
|
||||
files,
|
||||
dir: directory
|
||||
});
|
||||
};
|
||||
const empty = () => {};
|
||||
function build$3(options) {
|
||||
return options.group ? groupFiles : empty;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/resolve-symlink.ts
|
||||
const resolveSymlinksAsync = function(path$1, state, callback$1) {
|
||||
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
fs$1.realpath(path$1, (error, resolvedPath) => {
|
||||
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
||||
fs$1.stat(resolvedPath, (error$1, stat) => {
|
||||
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
||||
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
|
||||
callback$1(stat, resolvedPath);
|
||||
queue.dequeue(null, state);
|
||||
});
|
||||
});
|
||||
};
|
||||
const resolveSymlinks = function(path$1, state, callback$1) {
|
||||
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
try {
|
||||
const resolvedPath = fs$1.realpathSync(path$1);
|
||||
const stat = fs$1.statSync(resolvedPath);
|
||||
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
|
||||
callback$1(stat, resolvedPath);
|
||||
} catch (e) {
|
||||
if (!suppressErrors) throw e;
|
||||
}
|
||||
};
|
||||
function build$2(options, isSynchronous) {
|
||||
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
||||
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
||||
}
|
||||
function isRecursive(path$1, resolved, state) {
|
||||
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
||||
let parent = (0, path.dirname)(path$1);
|
||||
let depth = 1;
|
||||
while (parent !== state.root && depth < 2) {
|
||||
const resolvedPath = state.symlinks.get(parent);
|
||||
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
||||
if (isSameRoot) depth++;
|
||||
else parent = (0, path.dirname)(parent);
|
||||
}
|
||||
state.symlinks.set(path$1, resolved);
|
||||
return depth > 1;
|
||||
}
|
||||
function isRecursiveUsingRealPaths(resolved, state) {
|
||||
return state.visited.includes(resolved + state.options.pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/invoke-callback.ts
|
||||
const onlyCountsSync = (state) => {
|
||||
return state.counts;
|
||||
};
|
||||
const groupsSync = (state) => {
|
||||
return state.groups;
|
||||
};
|
||||
const defaultSync = (state) => {
|
||||
return state.paths;
|
||||
};
|
||||
const limitFilesSync = (state) => {
|
||||
return state.paths.slice(0, state.options.maxFiles);
|
||||
};
|
||||
const onlyCountsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.counts, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const defaultAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const limitFilesAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const groupsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.groups, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
function report(error, callback$1, output, suppressErrors) {
|
||||
if (error && !suppressErrors) callback$1(error, output);
|
||||
else callback$1(null, output);
|
||||
}
|
||||
function build$1(options, isSynchronous) {
|
||||
const { onlyCounts, group, maxFiles } = options;
|
||||
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
||||
else if (group) return isSynchronous ? groupsSync : groupsAsync;
|
||||
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
||||
else return isSynchronous ? defaultSync : defaultAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/walk-directory.ts
|
||||
const readdirOpts = { withFileTypes: true };
|
||||
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
state.queue.enqueue();
|
||||
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
||||
const { fs: fs$1 } = state;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
fs$1.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
||||
});
|
||||
};
|
||||
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
const { fs: fs$1 } = state;
|
||||
if (currentDepth < 0) return;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
let entries = [];
|
||||
try {
|
||||
entries = fs$1.readdirSync(crawlPath || ".", readdirOpts);
|
||||
} catch (e) {
|
||||
if (!state.options.suppressErrors) throw e;
|
||||
}
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
};
|
||||
function build(isSynchronous) {
|
||||
return isSynchronous ? walkSync : walkAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/queue.ts
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
var Queue = class {
|
||||
count = 0;
|
||||
constructor(onQueueEmpty) {
|
||||
this.onQueueEmpty = onQueueEmpty;
|
||||
}
|
||||
enqueue() {
|
||||
this.count++;
|
||||
return this.count;
|
||||
}
|
||||
dequeue(error, output) {
|
||||
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
||||
this.onQueueEmpty(error, output);
|
||||
if (error) {
|
||||
output.controller.abort();
|
||||
this.onQueueEmpty = void 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/counter.ts
|
||||
var Counter = class {
|
||||
_files = 0;
|
||||
_directories = 0;
|
||||
set files(num) {
|
||||
this._files = num;
|
||||
}
|
||||
get files() {
|
||||
return this._files;
|
||||
}
|
||||
set directories(num) {
|
||||
this._directories = num;
|
||||
}
|
||||
get directories() {
|
||||
return this._directories;
|
||||
}
|
||||
/**
|
||||
* @deprecated use `directories` instead
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
get dirs() {
|
||||
return this._directories;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/aborter.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
var Aborter = class {
|
||||
aborted = false;
|
||||
abort() {
|
||||
this.aborted = true;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/walker.ts
|
||||
var Walker = class {
|
||||
root;
|
||||
isSynchronous;
|
||||
state;
|
||||
joinPath;
|
||||
pushDirectory;
|
||||
pushFile;
|
||||
getArray;
|
||||
groupFiles;
|
||||
resolveSymlink;
|
||||
walkDirectory;
|
||||
callbackInvoker;
|
||||
constructor(root, options, callback$1) {
|
||||
this.isSynchronous = !callback$1;
|
||||
this.callbackInvoker = build$1(options, this.isSynchronous);
|
||||
this.root = normalizePath(root, options);
|
||||
this.state = {
|
||||
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
||||
paths: [""].slice(0, 0),
|
||||
groups: [],
|
||||
counts: new Counter(),
|
||||
options,
|
||||
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
|
||||
symlinks: /* @__PURE__ */ new Map(),
|
||||
visited: [""].slice(0, 0),
|
||||
controller: new Aborter(),
|
||||
fs: options.fs || fs
|
||||
};
|
||||
this.joinPath = build$7(this.root, options);
|
||||
this.pushDirectory = build$6(this.root, options);
|
||||
this.pushFile = build$5(options);
|
||||
this.getArray = build$4(options);
|
||||
this.groupFiles = build$3(options);
|
||||
this.resolveSymlink = build$2(options, this.isSynchronous);
|
||||
this.walkDirectory = build(this.isSynchronous);
|
||||
}
|
||||
start() {
|
||||
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
||||
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
||||
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
||||
}
|
||||
walk = (entries, directoryPath, depth) => {
|
||||
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
||||
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
||||
const files = this.getArray(this.state.paths);
|
||||
for (let i = 0; i < entries.length; ++i) {
|
||||
const entry = entries[i];
|
||||
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
||||
const filename = this.joinPath(entry.name, directoryPath);
|
||||
this.pushFile(filename, files, this.state.counts, filters);
|
||||
} else if (entry.isDirectory()) {
|
||||
let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
||||
if (exclude && exclude(entry.name, path$1)) continue;
|
||||
this.pushDirectory(path$1, paths, filters);
|
||||
this.walkDirectory(this.state, path$1, path$1, depth - 1, this.walk);
|
||||
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
||||
let path$1 = joinPathWithBasePath(entry.name, directoryPath);
|
||||
this.resolveSymlink(path$1, this.state, (stat, resolvedPath) => {
|
||||
if (stat.isDirectory()) {
|
||||
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
||||
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
|
||||
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth - 1, this.walk);
|
||||
} else {
|
||||
resolvedPath = useRealPaths ? resolvedPath : path$1;
|
||||
const filename = (0, path.basename)(resolvedPath);
|
||||
const directoryPath$1 = normalizePath((0, path.dirname)(resolvedPath), this.state.options);
|
||||
resolvedPath = this.joinPath(filename, directoryPath$1);
|
||||
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.groupFiles(this.state.groups, directoryPath, files);
|
||||
};
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/async.ts
|
||||
function promise(root, options) {
|
||||
return new Promise((resolve$1, reject) => {
|
||||
callback(root, options, (err, output) => {
|
||||
if (err) return reject(err);
|
||||
resolve$1(output);
|
||||
});
|
||||
});
|
||||
}
|
||||
function callback(root, options, callback$1) {
|
||||
let walker = new Walker(root, options, callback$1);
|
||||
walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/sync.ts
|
||||
function sync(root, options) {
|
||||
const walker = new Walker(root, options);
|
||||
return walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.ts
|
||||
var APIBuilder = class {
|
||||
constructor(root, options) {
|
||||
this.root = root;
|
||||
this.options = options;
|
||||
}
|
||||
withPromise() {
|
||||
return promise(this.root, this.options);
|
||||
}
|
||||
withCallback(cb) {
|
||||
callback(this.root, this.options, cb);
|
||||
}
|
||||
sync() {
|
||||
return sync(this.root, this.options);
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/index.ts
|
||||
let pm = null;
|
||||
/* c8 ignore next 6 */
|
||||
try {
|
||||
require.resolve("picomatch");
|
||||
pm = require("picomatch");
|
||||
} catch {}
|
||||
var Builder = class {
|
||||
globCache = {};
|
||||
options = {
|
||||
maxDepth: Infinity,
|
||||
suppressErrors: true,
|
||||
pathSeparator: path.sep,
|
||||
filters: []
|
||||
};
|
||||
globFunction;
|
||||
constructor(options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
this.globFunction = this.options.globFunction;
|
||||
}
|
||||
group() {
|
||||
this.options.group = true;
|
||||
return this;
|
||||
}
|
||||
withPathSeparator(separator) {
|
||||
this.options.pathSeparator = separator;
|
||||
return this;
|
||||
}
|
||||
withBasePath() {
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withRelativePaths() {
|
||||
this.options.relativePaths = true;
|
||||
return this;
|
||||
}
|
||||
withDirs() {
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
withMaxDepth(depth) {
|
||||
this.options.maxDepth = depth;
|
||||
return this;
|
||||
}
|
||||
withMaxFiles(limit) {
|
||||
this.options.maxFiles = limit;
|
||||
return this;
|
||||
}
|
||||
withFullPaths() {
|
||||
this.options.resolvePaths = true;
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withErrors() {
|
||||
this.options.suppressErrors = false;
|
||||
return this;
|
||||
}
|
||||
withSymlinks({ resolvePaths = true } = {}) {
|
||||
this.options.resolveSymlinks = true;
|
||||
this.options.useRealPaths = resolvePaths;
|
||||
return this.withFullPaths();
|
||||
}
|
||||
withAbortSignal(signal) {
|
||||
this.options.signal = signal;
|
||||
return this;
|
||||
}
|
||||
normalize() {
|
||||
this.options.normalizePath = true;
|
||||
return this;
|
||||
}
|
||||
filter(predicate) {
|
||||
this.options.filters.push(predicate);
|
||||
return this;
|
||||
}
|
||||
onlyDirs() {
|
||||
this.options.excludeFiles = true;
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
exclude(predicate) {
|
||||
this.options.exclude = predicate;
|
||||
return this;
|
||||
}
|
||||
onlyCounts() {
|
||||
this.options.onlyCounts = true;
|
||||
return this;
|
||||
}
|
||||
crawl(root) {
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
withGlobFunction(fn) {
|
||||
this.globFunction = fn;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
/* c8 ignore next 4 */
|
||||
crawlWithOptions(root, options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
glob(...patterns) {
|
||||
if (this.globFunction) return this.globWithOptions(patterns);
|
||||
return this.globWithOptions(patterns, ...[{ dot: true }]);
|
||||
}
|
||||
globWithOptions(patterns, ...options) {
|
||||
const globFn = this.globFunction || pm;
|
||||
/* c8 ignore next 5 */
|
||||
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
||||
var isMatch = this.globCache[patterns.join("\0")];
|
||||
if (!isMatch) {
|
||||
isMatch = globFn(patterns, ...options);
|
||||
this.globCache[patterns.join("\0")] = isMatch;
|
||||
}
|
||||
this.options.filters.push((path$1) => isMatch(path$1));
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
exports.fdir = Builder;
|
||||
155
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.d.cts
generated
vendored
Normal file
155
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
/// <reference types="node" />
|
||||
import * as nativeFs from "fs";
|
||||
import picomatch from "picomatch";
|
||||
|
||||
//#region src/api/aborter.d.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
declare class Aborter {
|
||||
aborted: boolean;
|
||||
abort(): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/api/queue.d.ts
|
||||
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
declare class Queue {
|
||||
private onQueueEmpty?;
|
||||
count: number;
|
||||
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
|
||||
enqueue(): number;
|
||||
dequeue(error: Error | null, output: WalkerState): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/types.d.ts
|
||||
type Counts = {
|
||||
files: number;
|
||||
directories: number;
|
||||
/**
|
||||
* @deprecated use `directories` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dirs: number;
|
||||
};
|
||||
type Group = {
|
||||
directory: string;
|
||||
files: string[];
|
||||
/**
|
||||
* @deprecated use `directory` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dir: string;
|
||||
};
|
||||
type GroupOutput = Group[];
|
||||
type OnlyCountsOutput = Counts;
|
||||
type PathsOutput = string[];
|
||||
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
|
||||
type FSLike = {
|
||||
readdir: typeof nativeFs.readdir;
|
||||
readdirSync: typeof nativeFs.readdirSync;
|
||||
realpath: typeof nativeFs.realpath;
|
||||
realpathSync: typeof nativeFs.realpathSync;
|
||||
stat: typeof nativeFs.stat;
|
||||
statSync: typeof nativeFs.statSync;
|
||||
};
|
||||
type WalkerState = {
|
||||
root: string;
|
||||
paths: string[];
|
||||
groups: Group[];
|
||||
counts: Counts;
|
||||
options: Options;
|
||||
queue: Queue;
|
||||
controller: Aborter;
|
||||
fs: FSLike;
|
||||
symlinks: Map<string, string>;
|
||||
visited: string[];
|
||||
};
|
||||
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
|
||||
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
|
||||
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
|
||||
type PathSeparator = "/" | "\\";
|
||||
type Options<TGlobFunction = unknown> = {
|
||||
includeBasePath?: boolean;
|
||||
includeDirs?: boolean;
|
||||
normalizePath?: boolean;
|
||||
maxDepth: number;
|
||||
maxFiles?: number;
|
||||
resolvePaths?: boolean;
|
||||
suppressErrors: boolean;
|
||||
group?: boolean;
|
||||
onlyCounts?: boolean;
|
||||
filters: FilterPredicate[];
|
||||
resolveSymlinks?: boolean;
|
||||
useRealPaths?: boolean;
|
||||
excludeFiles?: boolean;
|
||||
excludeSymlinks?: boolean;
|
||||
exclude?: ExcludePredicate;
|
||||
relativePaths?: boolean;
|
||||
pathSeparator: PathSeparator;
|
||||
signal?: AbortSignal;
|
||||
globFunction?: TGlobFunction;
|
||||
fs?: FSLike;
|
||||
};
|
||||
type GlobMatcher = (test: string) => boolean;
|
||||
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
|
||||
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.d.ts
|
||||
declare class APIBuilder<TReturnType extends Output> {
|
||||
private readonly root;
|
||||
private readonly options;
|
||||
constructor(root: string, options: Options);
|
||||
withPromise(): Promise<TReturnType>;
|
||||
withCallback(cb: ResultCallback<TReturnType>): void;
|
||||
sync(): TReturnType;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/builder/index.d.ts
|
||||
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
|
||||
private readonly globCache;
|
||||
private options;
|
||||
private globFunction?;
|
||||
constructor(options?: Partial<Options<TGlobFunction>>);
|
||||
group(): Builder<GroupOutput, TGlobFunction>;
|
||||
withPathSeparator(separator: "/" | "\\"): this;
|
||||
withBasePath(): this;
|
||||
withRelativePaths(): this;
|
||||
withDirs(): this;
|
||||
withMaxDepth(depth: number): this;
|
||||
withMaxFiles(limit: number): this;
|
||||
withFullPaths(): this;
|
||||
withErrors(): this;
|
||||
withSymlinks({
|
||||
resolvePaths
|
||||
}?: {
|
||||
resolvePaths?: boolean | undefined;
|
||||
}): this;
|
||||
withAbortSignal(signal: AbortSignal): this;
|
||||
normalize(): this;
|
||||
filter(predicate: FilterPredicate): this;
|
||||
onlyDirs(): this;
|
||||
exclude(predicate: ExcludePredicate): this;
|
||||
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
|
||||
crawl(root?: string): APIBuilder<TReturnType>;
|
||||
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
|
||||
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
type Fdir = typeof Builder;
|
||||
//#endregion
|
||||
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };
|
||||
155
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.d.mts
generated
vendored
Normal file
155
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
/// <reference types="node" />
|
||||
import * as nativeFs from "fs";
|
||||
import picomatch from "picomatch";
|
||||
|
||||
//#region src/api/aborter.d.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
declare class Aborter {
|
||||
aborted: boolean;
|
||||
abort(): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/api/queue.d.ts
|
||||
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
declare class Queue {
|
||||
private onQueueEmpty?;
|
||||
count: number;
|
||||
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
|
||||
enqueue(): number;
|
||||
dequeue(error: Error | null, output: WalkerState): void;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/types.d.ts
|
||||
type Counts = {
|
||||
files: number;
|
||||
directories: number;
|
||||
/**
|
||||
* @deprecated use `directories` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dirs: number;
|
||||
};
|
||||
type Group = {
|
||||
directory: string;
|
||||
files: string[];
|
||||
/**
|
||||
* @deprecated use `directory` instead. Will be removed in v7.0.
|
||||
*/
|
||||
dir: string;
|
||||
};
|
||||
type GroupOutput = Group[];
|
||||
type OnlyCountsOutput = Counts;
|
||||
type PathsOutput = string[];
|
||||
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
|
||||
type FSLike = {
|
||||
readdir: typeof nativeFs.readdir;
|
||||
readdirSync: typeof nativeFs.readdirSync;
|
||||
realpath: typeof nativeFs.realpath;
|
||||
realpathSync: typeof nativeFs.realpathSync;
|
||||
stat: typeof nativeFs.stat;
|
||||
statSync: typeof nativeFs.statSync;
|
||||
};
|
||||
type WalkerState = {
|
||||
root: string;
|
||||
paths: string[];
|
||||
groups: Group[];
|
||||
counts: Counts;
|
||||
options: Options;
|
||||
queue: Queue;
|
||||
controller: Aborter;
|
||||
fs: FSLike;
|
||||
symlinks: Map<string, string>;
|
||||
visited: string[];
|
||||
};
|
||||
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
|
||||
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
|
||||
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
|
||||
type PathSeparator = "/" | "\\";
|
||||
type Options<TGlobFunction = unknown> = {
|
||||
includeBasePath?: boolean;
|
||||
includeDirs?: boolean;
|
||||
normalizePath?: boolean;
|
||||
maxDepth: number;
|
||||
maxFiles?: number;
|
||||
resolvePaths?: boolean;
|
||||
suppressErrors: boolean;
|
||||
group?: boolean;
|
||||
onlyCounts?: boolean;
|
||||
filters: FilterPredicate[];
|
||||
resolveSymlinks?: boolean;
|
||||
useRealPaths?: boolean;
|
||||
excludeFiles?: boolean;
|
||||
excludeSymlinks?: boolean;
|
||||
exclude?: ExcludePredicate;
|
||||
relativePaths?: boolean;
|
||||
pathSeparator: PathSeparator;
|
||||
signal?: AbortSignal;
|
||||
globFunction?: TGlobFunction;
|
||||
fs?: FSLike;
|
||||
};
|
||||
type GlobMatcher = (test: string) => boolean;
|
||||
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
|
||||
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.d.ts
|
||||
declare class APIBuilder<TReturnType extends Output> {
|
||||
private readonly root;
|
||||
private readonly options;
|
||||
constructor(root: string, options: Options);
|
||||
withPromise(): Promise<TReturnType>;
|
||||
withCallback(cb: ResultCallback<TReturnType>): void;
|
||||
sync(): TReturnType;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/builder/index.d.ts
|
||||
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
|
||||
private readonly globCache;
|
||||
private options;
|
||||
private globFunction?;
|
||||
constructor(options?: Partial<Options<TGlobFunction>>);
|
||||
group(): Builder<GroupOutput, TGlobFunction>;
|
||||
withPathSeparator(separator: "/" | "\\"): this;
|
||||
withBasePath(): this;
|
||||
withRelativePaths(): this;
|
||||
withDirs(): this;
|
||||
withMaxDepth(depth: number): this;
|
||||
withMaxFiles(limit: number): this;
|
||||
withFullPaths(): this;
|
||||
withErrors(): this;
|
||||
withSymlinks({
|
||||
resolvePaths
|
||||
}?: {
|
||||
resolvePaths?: boolean | undefined;
|
||||
}): this;
|
||||
withAbortSignal(signal: AbortSignal): this;
|
||||
normalize(): this;
|
||||
filter(predicate: FilterPredicate): this;
|
||||
onlyDirs(): this;
|
||||
exclude(predicate: ExcludePredicate): this;
|
||||
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
|
||||
crawl(root?: string): APIBuilder<TReturnType>;
|
||||
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
|
||||
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
||||
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/index.d.ts
|
||||
type Fdir = typeof Builder;
|
||||
//#endregion
|
||||
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };
|
||||
570
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.mjs
generated
vendored
Normal file
570
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,570 @@
|
||||
import { createRequire } from "module";
|
||||
import { basename, dirname, normalize, relative, resolve, sep } from "path";
|
||||
import * as nativeFs from "fs";
|
||||
|
||||
//#region rolldown:runtime
|
||||
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
||||
|
||||
//#endregion
|
||||
//#region src/utils.ts
|
||||
function cleanPath(path) {
|
||||
let normalized = normalize(path);
|
||||
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
||||
return normalized;
|
||||
}
|
||||
const SLASHES_REGEX = /[\\/]/g;
|
||||
function convertSlashes(path, separator) {
|
||||
return path.replace(SLASHES_REGEX, separator);
|
||||
}
|
||||
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
||||
function isRootDirectory(path) {
|
||||
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
|
||||
}
|
||||
function normalizePath(path, options) {
|
||||
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
||||
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
|
||||
if (resolvePaths) path = resolve(path);
|
||||
if (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);
|
||||
if (path === ".") return "";
|
||||
const needsSeperator = path[path.length - 1] !== pathSeparator;
|
||||
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/join-path.ts
|
||||
function joinPathWithBasePath(filename, directoryPath) {
|
||||
return directoryPath + filename;
|
||||
}
|
||||
function joinPathWithRelativePath(root, options) {
|
||||
return function(filename, directoryPath) {
|
||||
const sameRoot = directoryPath.startsWith(root);
|
||||
if (sameRoot) return directoryPath.slice(root.length) + filename;
|
||||
else return convertSlashes(relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
||||
};
|
||||
}
|
||||
function joinPath(filename) {
|
||||
return filename;
|
||||
}
|
||||
function joinDirectoryPath(filename, directoryPath, separator) {
|
||||
return directoryPath + filename + separator;
|
||||
}
|
||||
function build$7(root, options) {
|
||||
const { relativePaths, includeBasePath } = options;
|
||||
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-directory.ts
|
||||
function pushDirectoryWithRelativePath(root) {
|
||||
return function(directoryPath, paths) {
|
||||
paths.push(directoryPath.substring(root.length) || ".");
|
||||
};
|
||||
}
|
||||
function pushDirectoryFilterWithRelativePath(root) {
|
||||
return function(directoryPath, paths, filters) {
|
||||
const relativePath = directoryPath.substring(root.length) || ".";
|
||||
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
|
||||
};
|
||||
}
|
||||
const pushDirectory = (directoryPath, paths) => {
|
||||
paths.push(directoryPath || ".");
|
||||
};
|
||||
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
||||
const path = directoryPath || ".";
|
||||
if (filters.every((filter) => filter(path, true))) paths.push(path);
|
||||
};
|
||||
const empty$2 = () => {};
|
||||
function build$6(root, options) {
|
||||
const { includeDirs, filters, relativePaths } = options;
|
||||
if (!includeDirs) return empty$2;
|
||||
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
||||
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/push-file.ts
|
||||
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) counts.files++;
|
||||
};
|
||||
const pushFileFilter = (filename, paths, _counts, filters) => {
|
||||
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
|
||||
};
|
||||
const pushFileCount = (_filename, _paths, counts, _filters) => {
|
||||
counts.files++;
|
||||
};
|
||||
const pushFile = (filename, paths) => {
|
||||
paths.push(filename);
|
||||
};
|
||||
const empty$1 = () => {};
|
||||
function build$5(options) {
|
||||
const { excludeFiles, filters, onlyCounts } = options;
|
||||
if (excludeFiles) return empty$1;
|
||||
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
||||
else if (onlyCounts) return pushFileCount;
|
||||
else return pushFile;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/get-array.ts
|
||||
const getArray = (paths) => {
|
||||
return paths;
|
||||
};
|
||||
const getArrayGroup = () => {
|
||||
return [""].slice(0, 0);
|
||||
};
|
||||
function build$4(options) {
|
||||
return options.group ? getArrayGroup : getArray;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/group-files.ts
|
||||
const groupFiles = (groups, directory, files) => {
|
||||
groups.push({
|
||||
directory,
|
||||
files,
|
||||
dir: directory
|
||||
});
|
||||
};
|
||||
const empty = () => {};
|
||||
function build$3(options) {
|
||||
return options.group ? groupFiles : empty;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/resolve-symlink.ts
|
||||
const resolveSymlinksAsync = function(path, state, callback$1) {
|
||||
const { queue, fs, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
fs.realpath(path, (error, resolvedPath) => {
|
||||
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
||||
fs.stat(resolvedPath, (error$1, stat) => {
|
||||
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
||||
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
|
||||
callback$1(stat, resolvedPath);
|
||||
queue.dequeue(null, state);
|
||||
});
|
||||
});
|
||||
};
|
||||
const resolveSymlinks = function(path, state, callback$1) {
|
||||
const { queue, fs, options: { suppressErrors } } = state;
|
||||
queue.enqueue();
|
||||
try {
|
||||
const resolvedPath = fs.realpathSync(path);
|
||||
const stat = fs.statSync(resolvedPath);
|
||||
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
|
||||
callback$1(stat, resolvedPath);
|
||||
} catch (e) {
|
||||
if (!suppressErrors) throw e;
|
||||
}
|
||||
};
|
||||
function build$2(options, isSynchronous) {
|
||||
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
||||
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
||||
}
|
||||
function isRecursive(path, resolved, state) {
|
||||
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
||||
let parent = dirname(path);
|
||||
let depth = 1;
|
||||
while (parent !== state.root && depth < 2) {
|
||||
const resolvedPath = state.symlinks.get(parent);
|
||||
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
||||
if (isSameRoot) depth++;
|
||||
else parent = dirname(parent);
|
||||
}
|
||||
state.symlinks.set(path, resolved);
|
||||
return depth > 1;
|
||||
}
|
||||
function isRecursiveUsingRealPaths(resolved, state) {
|
||||
return state.visited.includes(resolved + state.options.pathSeparator);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/invoke-callback.ts
|
||||
const onlyCountsSync = (state) => {
|
||||
return state.counts;
|
||||
};
|
||||
const groupsSync = (state) => {
|
||||
return state.groups;
|
||||
};
|
||||
const defaultSync = (state) => {
|
||||
return state.paths;
|
||||
};
|
||||
const limitFilesSync = (state) => {
|
||||
return state.paths.slice(0, state.options.maxFiles);
|
||||
};
|
||||
const onlyCountsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.counts, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const defaultAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const limitFilesAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
const groupsAsync = (state, error, callback$1) => {
|
||||
report(error, callback$1, state.groups, state.options.suppressErrors);
|
||||
return null;
|
||||
};
|
||||
function report(error, callback$1, output, suppressErrors) {
|
||||
if (error && !suppressErrors) callback$1(error, output);
|
||||
else callback$1(null, output);
|
||||
}
|
||||
function build$1(options, isSynchronous) {
|
||||
const { onlyCounts, group, maxFiles } = options;
|
||||
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
||||
else if (group) return isSynchronous ? groupsSync : groupsAsync;
|
||||
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
|
||||
else return isSynchronous ? defaultSync : defaultAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/functions/walk-directory.ts
|
||||
const readdirOpts = { withFileTypes: true };
|
||||
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
state.queue.enqueue();
|
||||
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
||||
const { fs } = state;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
fs.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
||||
});
|
||||
};
|
||||
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
||||
const { fs } = state;
|
||||
if (currentDepth < 0) return;
|
||||
state.visited.push(crawlPath);
|
||||
state.counts.directories++;
|
||||
let entries = [];
|
||||
try {
|
||||
entries = fs.readdirSync(crawlPath || ".", readdirOpts);
|
||||
} catch (e) {
|
||||
if (!state.options.suppressErrors) throw e;
|
||||
}
|
||||
callback$1(entries, directoryPath, currentDepth);
|
||||
};
|
||||
function build(isSynchronous) {
|
||||
return isSynchronous ? walkSync : walkAsync;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/queue.ts
|
||||
/**
|
||||
* This is a custom stateless queue to track concurrent async fs calls.
|
||||
* It increments a counter whenever a call is queued and decrements it
|
||||
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
||||
*/
|
||||
var Queue = class {
|
||||
count = 0;
|
||||
constructor(onQueueEmpty) {
|
||||
this.onQueueEmpty = onQueueEmpty;
|
||||
}
|
||||
enqueue() {
|
||||
this.count++;
|
||||
return this.count;
|
||||
}
|
||||
dequeue(error, output) {
|
||||
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
|
||||
this.onQueueEmpty(error, output);
|
||||
if (error) {
|
||||
output.controller.abort();
|
||||
this.onQueueEmpty = void 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/counter.ts
|
||||
var Counter = class {
|
||||
_files = 0;
|
||||
_directories = 0;
|
||||
set files(num) {
|
||||
this._files = num;
|
||||
}
|
||||
get files() {
|
||||
return this._files;
|
||||
}
|
||||
set directories(num) {
|
||||
this._directories = num;
|
||||
}
|
||||
get directories() {
|
||||
return this._directories;
|
||||
}
|
||||
/**
|
||||
* @deprecated use `directories` instead
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
get dirs() {
|
||||
return this._directories;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/aborter.ts
|
||||
/**
|
||||
* AbortController is not supported on Node 14 so we use this until we can drop
|
||||
* support for Node 14.
|
||||
*/
|
||||
var Aborter = class {
|
||||
aborted = false;
|
||||
abort() {
|
||||
this.aborted = true;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/walker.ts
|
||||
var Walker = class {
|
||||
root;
|
||||
isSynchronous;
|
||||
state;
|
||||
joinPath;
|
||||
pushDirectory;
|
||||
pushFile;
|
||||
getArray;
|
||||
groupFiles;
|
||||
resolveSymlink;
|
||||
walkDirectory;
|
||||
callbackInvoker;
|
||||
constructor(root, options, callback$1) {
|
||||
this.isSynchronous = !callback$1;
|
||||
this.callbackInvoker = build$1(options, this.isSynchronous);
|
||||
this.root = normalizePath(root, options);
|
||||
this.state = {
|
||||
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
||||
paths: [""].slice(0, 0),
|
||||
groups: [],
|
||||
counts: new Counter(),
|
||||
options,
|
||||
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
|
||||
symlinks: /* @__PURE__ */ new Map(),
|
||||
visited: [""].slice(0, 0),
|
||||
controller: new Aborter(),
|
||||
fs: options.fs || nativeFs
|
||||
};
|
||||
this.joinPath = build$7(this.root, options);
|
||||
this.pushDirectory = build$6(this.root, options);
|
||||
this.pushFile = build$5(options);
|
||||
this.getArray = build$4(options);
|
||||
this.groupFiles = build$3(options);
|
||||
this.resolveSymlink = build$2(options, this.isSynchronous);
|
||||
this.walkDirectory = build(this.isSynchronous);
|
||||
}
|
||||
start() {
|
||||
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
||||
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
||||
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
||||
}
|
||||
walk = (entries, directoryPath, depth) => {
|
||||
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
||||
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
|
||||
const files = this.getArray(this.state.paths);
|
||||
for (let i = 0; i < entries.length; ++i) {
|
||||
const entry = entries[i];
|
||||
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
||||
const filename = this.joinPath(entry.name, directoryPath);
|
||||
this.pushFile(filename, files, this.state.counts, filters);
|
||||
} else if (entry.isDirectory()) {
|
||||
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
||||
if (exclude && exclude(entry.name, path)) continue;
|
||||
this.pushDirectory(path, paths, filters);
|
||||
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
|
||||
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
||||
let path = joinPathWithBasePath(entry.name, directoryPath);
|
||||
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
|
||||
if (stat.isDirectory()) {
|
||||
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
||||
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
|
||||
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
||||
} else {
|
||||
resolvedPath = useRealPaths ? resolvedPath : path;
|
||||
const filename = basename(resolvedPath);
|
||||
const directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
|
||||
resolvedPath = this.joinPath(filename, directoryPath$1);
|
||||
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.groupFiles(this.state.groups, directoryPath, files);
|
||||
};
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/api/async.ts
|
||||
function promise(root, options) {
|
||||
return new Promise((resolve$1, reject) => {
|
||||
callback(root, options, (err, output) => {
|
||||
if (err) return reject(err);
|
||||
resolve$1(output);
|
||||
});
|
||||
});
|
||||
}
|
||||
function callback(root, options, callback$1) {
|
||||
let walker = new Walker(root, options, callback$1);
|
||||
walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/api/sync.ts
|
||||
function sync(root, options) {
|
||||
const walker = new Walker(root, options);
|
||||
return walker.start();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/api-builder.ts
|
||||
var APIBuilder = class {
|
||||
constructor(root, options) {
|
||||
this.root = root;
|
||||
this.options = options;
|
||||
}
|
||||
withPromise() {
|
||||
return promise(this.root, this.options);
|
||||
}
|
||||
withCallback(cb) {
|
||||
callback(this.root, this.options, cb);
|
||||
}
|
||||
sync() {
|
||||
return sync(this.root, this.options);
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region src/builder/index.ts
|
||||
let pm = null;
|
||||
/* c8 ignore next 6 */
|
||||
try {
|
||||
__require.resolve("picomatch");
|
||||
pm = __require("picomatch");
|
||||
} catch {}
|
||||
var Builder = class {
|
||||
globCache = {};
|
||||
options = {
|
||||
maxDepth: Infinity,
|
||||
suppressErrors: true,
|
||||
pathSeparator: sep,
|
||||
filters: []
|
||||
};
|
||||
globFunction;
|
||||
constructor(options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
this.globFunction = this.options.globFunction;
|
||||
}
|
||||
group() {
|
||||
this.options.group = true;
|
||||
return this;
|
||||
}
|
||||
withPathSeparator(separator) {
|
||||
this.options.pathSeparator = separator;
|
||||
return this;
|
||||
}
|
||||
withBasePath() {
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withRelativePaths() {
|
||||
this.options.relativePaths = true;
|
||||
return this;
|
||||
}
|
||||
withDirs() {
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
withMaxDepth(depth) {
|
||||
this.options.maxDepth = depth;
|
||||
return this;
|
||||
}
|
||||
withMaxFiles(limit) {
|
||||
this.options.maxFiles = limit;
|
||||
return this;
|
||||
}
|
||||
withFullPaths() {
|
||||
this.options.resolvePaths = true;
|
||||
this.options.includeBasePath = true;
|
||||
return this;
|
||||
}
|
||||
withErrors() {
|
||||
this.options.suppressErrors = false;
|
||||
return this;
|
||||
}
|
||||
withSymlinks({ resolvePaths = true } = {}) {
|
||||
this.options.resolveSymlinks = true;
|
||||
this.options.useRealPaths = resolvePaths;
|
||||
return this.withFullPaths();
|
||||
}
|
||||
withAbortSignal(signal) {
|
||||
this.options.signal = signal;
|
||||
return this;
|
||||
}
|
||||
normalize() {
|
||||
this.options.normalizePath = true;
|
||||
return this;
|
||||
}
|
||||
filter(predicate) {
|
||||
this.options.filters.push(predicate);
|
||||
return this;
|
||||
}
|
||||
onlyDirs() {
|
||||
this.options.excludeFiles = true;
|
||||
this.options.includeDirs = true;
|
||||
return this;
|
||||
}
|
||||
exclude(predicate) {
|
||||
this.options.exclude = predicate;
|
||||
return this;
|
||||
}
|
||||
onlyCounts() {
|
||||
this.options.onlyCounts = true;
|
||||
return this;
|
||||
}
|
||||
crawl(root) {
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
withGlobFunction(fn) {
|
||||
this.globFunction = fn;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* @deprecated Pass options using the constructor instead:
|
||||
* ```ts
|
||||
* new fdir(options).crawl("/path/to/root");
|
||||
* ```
|
||||
* This method will be removed in v7.0
|
||||
*/
|
||||
/* c8 ignore next 4 */
|
||||
crawlWithOptions(root, options) {
|
||||
this.options = {
|
||||
...this.options,
|
||||
...options
|
||||
};
|
||||
return new APIBuilder(root || ".", this.options);
|
||||
}
|
||||
glob(...patterns) {
|
||||
if (this.globFunction) return this.globWithOptions(patterns);
|
||||
return this.globWithOptions(patterns, ...[{ dot: true }]);
|
||||
}
|
||||
globWithOptions(patterns, ...options) {
|
||||
const globFn = this.globFunction || pm;
|
||||
/* c8 ignore next 5 */
|
||||
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
||||
var isMatch = this.globCache[patterns.join("\0")];
|
||||
if (!isMatch) {
|
||||
isMatch = globFn(patterns, ...options);
|
||||
this.globCache[patterns.join("\0")] = isMatch;
|
||||
}
|
||||
this.options.filters.push((path) => isMatch(path));
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
export { Builder as fdir };
|
||||
103
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/package.json
generated
vendored
Normal file
103
MEDICONNECTv3 - cópia/node_modules/vite/node_modules/fdir/package.json
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
{
|
||||
"name": "fdir",
|
||||
"version": "6.5.0",
|
||||
"description": "The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s",
|
||||
"main": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run test && npm run build",
|
||||
"build": "tsdown",
|
||||
"format": "prettier --write src __tests__ benchmarks",
|
||||
"test": "vitest run __tests__/",
|
||||
"test:coverage": "vitest run --coverage __tests__/",
|
||||
"test:watch": "vitest __tests__/",
|
||||
"bench": "ts-node benchmarks/benchmark.js",
|
||||
"bench:glob": "ts-node benchmarks/glob-benchmark.ts",
|
||||
"bench:fdir": "ts-node benchmarks/fdir-benchmark.ts",
|
||||
"release": "./scripts/release.sh"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/thecodrr/fdir.git"
|
||||
},
|
||||
"keywords": [
|
||||
"util",
|
||||
"os",
|
||||
"sys",
|
||||
"fs",
|
||||
"walk",
|
||||
"crawler",
|
||||
"directory",
|
||||
"files",
|
||||
"io",
|
||||
"tiny-glob",
|
||||
"glob",
|
||||
"fast-glob",
|
||||
"speed",
|
||||
"javascript",
|
||||
"nodejs"
|
||||
],
|
||||
"author": "thecodrr <thecodrr@protonmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/thecodrr/fdir/issues"
|
||||
},
|
||||
"homepage": "https://github.com/thecodrr/fdir#readme",
|
||||
"devDependencies": {
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/mock-fs": "^4.13.4",
|
||||
"@types/node": "^20.9.4",
|
||||
"@types/picomatch": "^4.0.0",
|
||||
"@types/tap": "^15.0.11",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"all-files-in-tree": "^1.1.2",
|
||||
"benny": "^3.7.1",
|
||||
"csv-to-markdown-table": "^1.3.1",
|
||||
"expect": "^29.7.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"fdir1": "npm:fdir@1.2.0",
|
||||
"fdir2": "npm:fdir@2.1.0",
|
||||
"fdir3": "npm:fdir@3.4.2",
|
||||
"fdir4": "npm:fdir@4.1.0",
|
||||
"fdir5": "npm:fdir@5.0.0",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"get-all-files": "^4.1.0",
|
||||
"glob": "^10.3.10",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"mock-fs": "^5.2.0",
|
||||
"picomatch": "^4.0.2",
|
||||
"prettier": "^3.5.3",
|
||||
"recur-readdir": "0.0.1",
|
||||
"recursive-files": "^1.0.2",
|
||||
"recursive-fs": "^2.1.0",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"rrdir": "^12.1.0",
|
||||
"systeminformation": "^5.21.17",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsdown": "^0.12.5",
|
||||
"typescript": "^5.3.2",
|
||||
"vitest": "^0.34.6",
|
||||
"walk-sync": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"module": "./dist/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user