@ienlab/cloud-functions-library 0.9.0 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gemini/config.yaml +47 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yaml +74 -0
- package/.github/ISSUE_TEMPLATE/documentation.yaml +23 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yaml +60 -0
- package/.github/ISSUE_TEMPLATE/question.yaml +17 -0
- package/.github/ISSUE_TEMPLATE/refactor.yaml +42 -0
- package/.github/RELEASE_TEMPLATE.md +17 -0
- package/.github/workflows/publish.yml +30 -0
- package/eslint.config.js +23 -0
- package/index.html +13 -0
- package/package.json +5 -8
- package/public/favicon.svg +1 -0
- package/public/icons.svg +24 -0
- package/src/App.css +184 -0
- package/src/App.tsx +121 -0
- package/src/assets/hero.png +0 -0
- package/src/assets/react.svg +1 -0
- package/src/assets/vite.svg +1 -0
- package/src/index.css +111 -0
- package/src/index.ts +16 -0
- package/src/main.tsx +10 -0
- package/tsconfig.app.json +25 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +24 -0
- package/vite.config.ts +39 -0
- package/dist/__vite-browser-external-BrdF6Ba4.js +0 -1
- package/dist/__vite-browser-external-C4yfM1ew.mjs +0 -25
- package/dist/dist-B3gFypMh.js +0 -5
- package/dist/dist-BHRQIx5i.mjs +0 -460
- package/dist/dist-CkUzyZvx.js +0 -1
- package/dist/dist-Cum8lv5j.mjs +0 -16
- package/dist/from-BPj5eOuj.mjs +0 -2443
- package/dist/from-jzy6jn2J.js +0 -4
- package/dist/index.cjs.js +0 -66
- package/dist/index.d.ts +0 -17
- package/dist/index.es.js +0 -49920
- package/dist/multipart-parser-9TgDfPGH.mjs +0 -149
- package/dist/multipart-parser-D41wkGe-.js +0 -2
- package/dist/multipart-parser-DOk5BsUv.js +0 -2
- package/dist/multipart-parser-D_l0qnsO.mjs +0 -149
- package/dist/src-C0B8QY6h.js +0 -3
- package/dist/src-CNjb2Vfu.js +0 -3
- package/dist/src-CYCYovTl.mjs +0 -666
- package/dist/src-M25oq7Q_.mjs +0 -666
package/dist/dist-BHRQIx5i.mjs
DELETED
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./__vite-browser-external-C4yfM1ew.mjs";
|
|
2
|
-
//#region node_modules/ms/index.js
|
|
3
|
-
var n = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
-
var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
|
|
5
|
-
t.exports = function(e, t) {
|
|
6
|
-
t ||= {};
|
|
7
|
-
var n = typeof e;
|
|
8
|
-
if (n === "string" && e.length > 0) return c(e);
|
|
9
|
-
if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
|
|
10
|
-
throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
|
|
11
|
-
};
|
|
12
|
-
function c(e) {
|
|
13
|
-
if (e = String(e), !(e.length > 100)) {
|
|
14
|
-
var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
|
|
15
|
-
if (t) {
|
|
16
|
-
var c = parseFloat(t[1]);
|
|
17
|
-
switch ((t[2] || "ms").toLowerCase()) {
|
|
18
|
-
case "years":
|
|
19
|
-
case "year":
|
|
20
|
-
case "yrs":
|
|
21
|
-
case "yr":
|
|
22
|
-
case "y": return c * s;
|
|
23
|
-
case "weeks":
|
|
24
|
-
case "week":
|
|
25
|
-
case "w": return c * o;
|
|
26
|
-
case "days":
|
|
27
|
-
case "day":
|
|
28
|
-
case "d": return c * a;
|
|
29
|
-
case "hours":
|
|
30
|
-
case "hour":
|
|
31
|
-
case "hrs":
|
|
32
|
-
case "hr":
|
|
33
|
-
case "h": return c * i;
|
|
34
|
-
case "minutes":
|
|
35
|
-
case "minute":
|
|
36
|
-
case "mins":
|
|
37
|
-
case "min":
|
|
38
|
-
case "m": return c * r;
|
|
39
|
-
case "seconds":
|
|
40
|
-
case "second":
|
|
41
|
-
case "secs":
|
|
42
|
-
case "sec":
|
|
43
|
-
case "s": return c * n;
|
|
44
|
-
case "milliseconds":
|
|
45
|
-
case "millisecond":
|
|
46
|
-
case "msecs":
|
|
47
|
-
case "msec":
|
|
48
|
-
case "ms": return c;
|
|
49
|
-
default: return;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function l(e) {
|
|
55
|
-
var t = Math.abs(e);
|
|
56
|
-
return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
|
|
57
|
-
}
|
|
58
|
-
function u(e) {
|
|
59
|
-
var t = Math.abs(e);
|
|
60
|
-
return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
|
|
61
|
-
}
|
|
62
|
-
function d(e, t, n, r) {
|
|
63
|
-
var i = t >= n * 1.5;
|
|
64
|
-
return Math.round(e / n) + " " + r + (i ? "s" : "");
|
|
65
|
-
}
|
|
66
|
-
})), r = /* @__PURE__ */ e(((e, t) => {
|
|
67
|
-
function r(e) {
|
|
68
|
-
r.debug = r, r.default = r, r.coerce = l, r.disable = s, r.enable = a, r.enabled = c, r.humanize = n(), r.destroy = u, Object.keys(e).forEach((t) => {
|
|
69
|
-
r[t] = e[t];
|
|
70
|
-
}), r.names = [], r.skips = [], r.formatters = {};
|
|
71
|
-
function t(e) {
|
|
72
|
-
let t = 0;
|
|
73
|
-
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
|
|
74
|
-
return r.colors[Math.abs(t) % r.colors.length];
|
|
75
|
-
}
|
|
76
|
-
r.selectColor = t;
|
|
77
|
-
function r(e) {
|
|
78
|
-
let t, n = null, a, o;
|
|
79
|
-
function s(...e) {
|
|
80
|
-
if (!s.enabled) return;
|
|
81
|
-
let n = s, i = Number(/* @__PURE__ */ new Date());
|
|
82
|
-
n.diff = i - (t || i), n.prev = t, n.curr = i, t = i, e[0] = r.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
|
|
83
|
-
let a = 0;
|
|
84
|
-
e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
|
|
85
|
-
if (t === "%%") return "%";
|
|
86
|
-
a++;
|
|
87
|
-
let o = r.formatters[i];
|
|
88
|
-
if (typeof o == "function") {
|
|
89
|
-
let r = e[a];
|
|
90
|
-
t = o.call(n, r), e.splice(a, 1), a--;
|
|
91
|
-
}
|
|
92
|
-
return t;
|
|
93
|
-
}), r.formatArgs.call(n, e), (n.log || r.log).apply(n, e);
|
|
94
|
-
}
|
|
95
|
-
return s.namespace = e, s.useColors = r.useColors(), s.color = r.selectColor(e), s.extend = i, s.destroy = r.destroy, Object.defineProperty(s, "enabled", {
|
|
96
|
-
enumerable: !0,
|
|
97
|
-
configurable: !1,
|
|
98
|
-
get: () => n === null ? (a !== r.namespaces && (a = r.namespaces, o = r.enabled(e)), o) : n,
|
|
99
|
-
set: (e) => {
|
|
100
|
-
n = e;
|
|
101
|
-
}
|
|
102
|
-
}), typeof r.init == "function" && r.init(s), s;
|
|
103
|
-
}
|
|
104
|
-
function i(e, t) {
|
|
105
|
-
let n = r(this.namespace + (t === void 0 ? ":" : t) + e);
|
|
106
|
-
return n.log = this.log, n;
|
|
107
|
-
}
|
|
108
|
-
function a(e) {
|
|
109
|
-
r.save(e), r.namespaces = e, r.names = [], r.skips = [];
|
|
110
|
-
let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
111
|
-
for (let e of t) e[0] === "-" ? r.skips.push(e.slice(1)) : r.names.push(e);
|
|
112
|
-
}
|
|
113
|
-
function o(e, t) {
|
|
114
|
-
let n = 0, r = 0, i = -1, a = 0;
|
|
115
|
-
for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
|
|
116
|
-
else if (i !== -1) r = i + 1, a++, n = a;
|
|
117
|
-
else return !1;
|
|
118
|
-
for (; r < t.length && t[r] === "*";) r++;
|
|
119
|
-
return r === t.length;
|
|
120
|
-
}
|
|
121
|
-
function s() {
|
|
122
|
-
let e = [...r.names, ...r.skips.map((e) => "-" + e)].join(",");
|
|
123
|
-
return r.enable(""), e;
|
|
124
|
-
}
|
|
125
|
-
function c(e) {
|
|
126
|
-
for (let t of r.skips) if (o(e, t)) return !1;
|
|
127
|
-
for (let t of r.names) if (o(e, t)) return !0;
|
|
128
|
-
return !1;
|
|
129
|
-
}
|
|
130
|
-
function l(e) {
|
|
131
|
-
return e instanceof Error ? e.stack || e.message : e;
|
|
132
|
-
}
|
|
133
|
-
function u() {
|
|
134
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
135
|
-
}
|
|
136
|
-
return r.enable(r.load()), r;
|
|
137
|
-
}
|
|
138
|
-
t.exports = r;
|
|
139
|
-
})), i = /* @__PURE__ */ e(((e, t) => {
|
|
140
|
-
e.formatArgs = i, e.save = a, e.load = o, e.useColors = n, e.storage = s(), e.destroy = (() => {
|
|
141
|
-
let e = !1;
|
|
142
|
-
return () => {
|
|
143
|
-
e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
144
|
-
};
|
|
145
|
-
})(), e.colors = /* @__PURE__ */ "#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33".split(".");
|
|
146
|
-
function n() {
|
|
147
|
-
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
|
|
148
|
-
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
|
|
149
|
-
let e;
|
|
150
|
-
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
151
|
-
}
|
|
152
|
-
function i(e) {
|
|
153
|
-
if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
|
|
154
|
-
let n = "color: " + this.color;
|
|
155
|
-
e.splice(1, 0, n, "color: inherit");
|
|
156
|
-
let r = 0, i = 0;
|
|
157
|
-
e[0].replace(/%[a-zA-Z%]/g, (e) => {
|
|
158
|
-
e !== "%%" && (r++, e === "%c" && (i = r));
|
|
159
|
-
}), e.splice(i, 0, n);
|
|
160
|
-
}
|
|
161
|
-
e.log = console.debug || console.log || (() => {});
|
|
162
|
-
function a(t) {
|
|
163
|
-
try {
|
|
164
|
-
t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
|
|
165
|
-
} catch {}
|
|
166
|
-
}
|
|
167
|
-
function o() {
|
|
168
|
-
let t;
|
|
169
|
-
try {
|
|
170
|
-
t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
|
|
171
|
-
} catch {}
|
|
172
|
-
return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
|
|
173
|
-
}
|
|
174
|
-
function s() {
|
|
175
|
-
try {
|
|
176
|
-
return localStorage;
|
|
177
|
-
} catch {}
|
|
178
|
-
}
|
|
179
|
-
t.exports = r()(e);
|
|
180
|
-
var { formatters: c } = t.exports;
|
|
181
|
-
c.j = function(e) {
|
|
182
|
-
try {
|
|
183
|
-
return JSON.stringify(e);
|
|
184
|
-
} catch (e) {
|
|
185
|
-
return "[UnexpectedJSONParseError]: " + e.message;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
})), a = /* @__PURE__ */ e(((e) => {
|
|
189
|
-
var n = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
190
|
-
r === void 0 && (r = n);
|
|
191
|
-
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
192
|
-
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
193
|
-
enumerable: !0,
|
|
194
|
-
get: function() {
|
|
195
|
-
return t[n];
|
|
196
|
-
}
|
|
197
|
-
}), Object.defineProperty(e, r, i);
|
|
198
|
-
}) : (function(e, t, n, r) {
|
|
199
|
-
r === void 0 && (r = n), e[r] = t[n];
|
|
200
|
-
})), r = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
201
|
-
Object.defineProperty(e, "default", {
|
|
202
|
-
enumerable: !0,
|
|
203
|
-
value: t
|
|
204
|
-
});
|
|
205
|
-
}) : function(e, t) {
|
|
206
|
-
e.default = t;
|
|
207
|
-
}), i = e && e.__importStar || function(e) {
|
|
208
|
-
if (e && e.__esModule) return e;
|
|
209
|
-
var t = {};
|
|
210
|
-
if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && n(t, e, i);
|
|
211
|
-
return r(t, e), t;
|
|
212
|
-
};
|
|
213
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.req = e.json = e.toBuffer = void 0;
|
|
214
|
-
var a = i(t()), o = i(t());
|
|
215
|
-
async function s(e) {
|
|
216
|
-
let t = 0, n = [];
|
|
217
|
-
for await (let r of e) t += r.length, n.push(r);
|
|
218
|
-
return Buffer.concat(n, t);
|
|
219
|
-
}
|
|
220
|
-
e.toBuffer = s;
|
|
221
|
-
async function c(e) {
|
|
222
|
-
let t = (await s(e)).toString("utf8");
|
|
223
|
-
try {
|
|
224
|
-
return JSON.parse(t);
|
|
225
|
-
} catch (e) {
|
|
226
|
-
let n = e;
|
|
227
|
-
throw n.message += ` (input: ${t})`, n;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
e.json = c;
|
|
231
|
-
function l(e, t = {}) {
|
|
232
|
-
let n = ((typeof e == "string" ? e : e.href).startsWith("https:") ? o : a).request(e, t), r = new Promise((e, t) => {
|
|
233
|
-
n.once("response", e).once("error", t).end();
|
|
234
|
-
});
|
|
235
|
-
return n.then = r.then.bind(r), n;
|
|
236
|
-
}
|
|
237
|
-
e.req = l;
|
|
238
|
-
})), o = /* @__PURE__ */ e(((e) => {
|
|
239
|
-
var n = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
240
|
-
r === void 0 && (r = n);
|
|
241
|
-
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
242
|
-
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
243
|
-
enumerable: !0,
|
|
244
|
-
get: function() {
|
|
245
|
-
return t[n];
|
|
246
|
-
}
|
|
247
|
-
}), Object.defineProperty(e, r, i);
|
|
248
|
-
}) : (function(e, t, n, r) {
|
|
249
|
-
r === void 0 && (r = n), e[r] = t[n];
|
|
250
|
-
})), r = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
251
|
-
Object.defineProperty(e, "default", {
|
|
252
|
-
enumerable: !0,
|
|
253
|
-
value: t
|
|
254
|
-
});
|
|
255
|
-
}) : function(e, t) {
|
|
256
|
-
e.default = t;
|
|
257
|
-
}), i = e && e.__importStar || function(e) {
|
|
258
|
-
if (e && e.__esModule) return e;
|
|
259
|
-
var t = {};
|
|
260
|
-
if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && n(t, e, i);
|
|
261
|
-
return r(t, e), t;
|
|
262
|
-
}, o = e && e.__exportStar || function(e, t) {
|
|
263
|
-
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(t, r) && n(t, e, r);
|
|
264
|
-
};
|
|
265
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.Agent = void 0;
|
|
266
|
-
var s = i(t()), c = i(t()), l = t();
|
|
267
|
-
o(a(), e);
|
|
268
|
-
var u = Symbol("AgentBaseInternalState");
|
|
269
|
-
e.Agent = class extends c.Agent {
|
|
270
|
-
constructor(e) {
|
|
271
|
-
super(e), this[u] = {};
|
|
272
|
-
}
|
|
273
|
-
isSecureEndpoint(e) {
|
|
274
|
-
if (e) {
|
|
275
|
-
if (typeof e.secureEndpoint == "boolean") return e.secureEndpoint;
|
|
276
|
-
if (typeof e.protocol == "string") return e.protocol === "https:";
|
|
277
|
-
}
|
|
278
|
-
let { stack: t } = /* @__PURE__ */ Error();
|
|
279
|
-
return typeof t == "string" ? t.split("\n").some((e) => e.indexOf("(https.js:") !== -1 || e.indexOf("node:https:") !== -1) : !1;
|
|
280
|
-
}
|
|
281
|
-
incrementSockets(e) {
|
|
282
|
-
if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) return null;
|
|
283
|
-
this.sockets[e] || (this.sockets[e] = []);
|
|
284
|
-
let t = new s.Socket({ writable: !1 });
|
|
285
|
-
return this.sockets[e].push(t), this.totalSocketCount++, t;
|
|
286
|
-
}
|
|
287
|
-
decrementSockets(e, t) {
|
|
288
|
-
if (!this.sockets[e] || t === null) return;
|
|
289
|
-
let n = this.sockets[e], r = n.indexOf(t);
|
|
290
|
-
r !== -1 && (n.splice(r, 1), this.totalSocketCount--, n.length === 0 && delete this.sockets[e]);
|
|
291
|
-
}
|
|
292
|
-
getName(e) {
|
|
293
|
-
return this.isSecureEndpoint(e) ? l.Agent.prototype.getName.call(this, e) : super.getName(e);
|
|
294
|
-
}
|
|
295
|
-
createSocket(e, t, n) {
|
|
296
|
-
let r = {
|
|
297
|
-
...t,
|
|
298
|
-
secureEndpoint: this.isSecureEndpoint(t)
|
|
299
|
-
}, i = this.getName(r), a = this.incrementSockets(i);
|
|
300
|
-
Promise.resolve().then(() => this.connect(e, r)).then((o) => {
|
|
301
|
-
if (this.decrementSockets(i, a), o instanceof c.Agent) try {
|
|
302
|
-
return o.addRequest(e, r);
|
|
303
|
-
} catch (e) {
|
|
304
|
-
return n(e);
|
|
305
|
-
}
|
|
306
|
-
this[u].currentSocket = o, super.createSocket(e, t, n);
|
|
307
|
-
}, (e) => {
|
|
308
|
-
this.decrementSockets(i, a), n(e);
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
createConnection() {
|
|
312
|
-
let e = this[u].currentSocket;
|
|
313
|
-
if (this[u].currentSocket = void 0, !e) throw Error("No socket was returned in the `connect()` function");
|
|
314
|
-
return e;
|
|
315
|
-
}
|
|
316
|
-
get defaultPort() {
|
|
317
|
-
return this[u].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
|
|
318
|
-
}
|
|
319
|
-
set defaultPort(e) {
|
|
320
|
-
this[u] && (this[u].defaultPort = e);
|
|
321
|
-
}
|
|
322
|
-
get protocol() {
|
|
323
|
-
return this[u].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
|
|
324
|
-
}
|
|
325
|
-
set protocol(e) {
|
|
326
|
-
this[u] && (this[u].protocol = e);
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
})), s = /* @__PURE__ */ e(((e) => {
|
|
330
|
-
var t = e && e.__importDefault || function(e) {
|
|
331
|
-
return e && e.__esModule ? e : { default: e };
|
|
332
|
-
};
|
|
333
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.parseProxyResponse = void 0;
|
|
334
|
-
var n = (0, t(i()).default)("https-proxy-agent:parse-proxy-response");
|
|
335
|
-
function r(e) {
|
|
336
|
-
return new Promise((t, r) => {
|
|
337
|
-
let i = 0, a = [];
|
|
338
|
-
function o() {
|
|
339
|
-
let t = e.read();
|
|
340
|
-
t ? u(t) : e.once("readable", o);
|
|
341
|
-
}
|
|
342
|
-
function s() {
|
|
343
|
-
e.removeListener("end", c), e.removeListener("error", l), e.removeListener("readable", o);
|
|
344
|
-
}
|
|
345
|
-
function c() {
|
|
346
|
-
s(), n("onend"), r(/* @__PURE__ */ Error("Proxy connection ended before receiving CONNECT response"));
|
|
347
|
-
}
|
|
348
|
-
function l(e) {
|
|
349
|
-
s(), n("onerror %o", e), r(e);
|
|
350
|
-
}
|
|
351
|
-
function u(c) {
|
|
352
|
-
a.push(c), i += c.length;
|
|
353
|
-
let l = Buffer.concat(a, i), u = l.indexOf("\r\n\r\n");
|
|
354
|
-
if (u === -1) {
|
|
355
|
-
n("have not received end of HTTP headers yet..."), o();
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
let d = l.slice(0, u).toString("ascii").split("\r\n"), f = d.shift();
|
|
359
|
-
if (!f) return e.destroy(), r(/* @__PURE__ */ Error("No header received from proxy CONNECT response"));
|
|
360
|
-
let p = f.split(" "), m = +p[1], h = p.slice(2).join(" "), g = {};
|
|
361
|
-
for (let t of d) {
|
|
362
|
-
if (!t) continue;
|
|
363
|
-
let n = t.indexOf(":");
|
|
364
|
-
if (n === -1) return e.destroy(), r(/* @__PURE__ */ Error(`Invalid header from proxy CONNECT response: "${t}"`));
|
|
365
|
-
let i = t.slice(0, n).toLowerCase(), a = t.slice(n + 1).trimStart(), o = g[i];
|
|
366
|
-
typeof o == "string" ? g[i] = [o, a] : Array.isArray(o) ? o.push(a) : g[i] = a;
|
|
367
|
-
}
|
|
368
|
-
n("got proxy server response: %o %o", f, g), s(), t({
|
|
369
|
-
connect: {
|
|
370
|
-
statusCode: m,
|
|
371
|
-
statusText: h,
|
|
372
|
-
headers: g
|
|
373
|
-
},
|
|
374
|
-
buffered: l
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
e.on("error", l), e.on("end", c), o();
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
e.parseProxyResponse = r;
|
|
381
|
-
})), c = /* @__PURE__ */ e(((e) => {
|
|
382
|
-
var n = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
383
|
-
r === void 0 && (r = n);
|
|
384
|
-
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
385
|
-
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
386
|
-
enumerable: !0,
|
|
387
|
-
get: function() {
|
|
388
|
-
return t[n];
|
|
389
|
-
}
|
|
390
|
-
}), Object.defineProperty(e, r, i);
|
|
391
|
-
}) : (function(e, t, n, r) {
|
|
392
|
-
r === void 0 && (r = n), e[r] = t[n];
|
|
393
|
-
})), r = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
394
|
-
Object.defineProperty(e, "default", {
|
|
395
|
-
enumerable: !0,
|
|
396
|
-
value: t
|
|
397
|
-
});
|
|
398
|
-
}) : function(e, t) {
|
|
399
|
-
e.default = t;
|
|
400
|
-
}), a = e && e.__importStar || function(e) {
|
|
401
|
-
if (e && e.__esModule) return e;
|
|
402
|
-
var t = {};
|
|
403
|
-
if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && n(t, e, i);
|
|
404
|
-
return r(t, e), t;
|
|
405
|
-
}, c = e && e.__importDefault || function(e) {
|
|
406
|
-
return e && e.__esModule ? e : { default: e };
|
|
407
|
-
};
|
|
408
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.HttpsProxyAgent = void 0;
|
|
409
|
-
var l = a(t()), u = a(t()), d = c(t()), f = c(i()), p = o(), m = t(), h = s(), g = (0, f.default)("https-proxy-agent"), _ = (e) => e.servername === void 0 && e.host && !l.isIP(e.host) ? {
|
|
410
|
-
...e,
|
|
411
|
-
servername: e.host
|
|
412
|
-
} : e, v = class extends p.Agent {
|
|
413
|
-
constructor(e, t) {
|
|
414
|
-
super(t), this.options = { path: void 0 }, this.proxy = typeof e == "string" ? new m.URL(e) : e, this.proxyHeaders = t?.headers ?? {}, g("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
|
|
415
|
-
let n = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""), r = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
|
|
416
|
-
this.connectOpts = {
|
|
417
|
-
ALPNProtocols: ["http/1.1"],
|
|
418
|
-
...t ? b(t, "headers") : null,
|
|
419
|
-
host: n,
|
|
420
|
-
port: r
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
async connect(e, t) {
|
|
424
|
-
let { proxy: n } = this;
|
|
425
|
-
if (!t.host) throw TypeError("No \"host\" provided");
|
|
426
|
-
let r;
|
|
427
|
-
n.protocol === "https:" ? (g("Creating `tls.Socket`: %o", this.connectOpts), r = u.connect(_(this.connectOpts))) : (g("Creating `net.Socket`: %o", this.connectOpts), r = l.connect(this.connectOpts));
|
|
428
|
-
let i = typeof this.proxyHeaders == "function" ? this.proxyHeaders() : { ...this.proxyHeaders }, a = l.isIPv6(t.host) ? `[${t.host}]` : t.host, o = `CONNECT ${a}:${t.port} HTTP/1.1\r\n`;
|
|
429
|
-
if (n.username || n.password) {
|
|
430
|
-
let e = `${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;
|
|
431
|
-
i["Proxy-Authorization"] = `Basic ${Buffer.from(e).toString("base64")}`;
|
|
432
|
-
}
|
|
433
|
-
i.Host = `${a}:${t.port}`, i["Proxy-Connection"] ||= this.keepAlive ? "Keep-Alive" : "close";
|
|
434
|
-
for (let e of Object.keys(i)) o += `${e}: ${i[e]}\r\n`;
|
|
435
|
-
let s = (0, h.parseProxyResponse)(r);
|
|
436
|
-
r.write(`${o}\r\n`);
|
|
437
|
-
let { connect: c, buffered: f } = await s;
|
|
438
|
-
if (e.emit("proxyConnect", c), this.emit("proxyConnect", c, e), c.statusCode === 200) return e.once("socket", y), t.secureEndpoint ? (g("Upgrading socket connection to TLS"), u.connect({
|
|
439
|
-
...b(_(t), "host", "path", "port"),
|
|
440
|
-
socket: r
|
|
441
|
-
})) : r;
|
|
442
|
-
r.destroy();
|
|
443
|
-
let p = new l.Socket({ writable: !1 });
|
|
444
|
-
return p.readable = !0, e.once("socket", (e) => {
|
|
445
|
-
g("Replaying proxy buffer for failed request"), (0, d.default)(e.listenerCount("data") > 0), e.push(f), e.push(null);
|
|
446
|
-
}), p;
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
v.protocols = ["http", "https"], e.HttpsProxyAgent = v;
|
|
450
|
-
function y(e) {
|
|
451
|
-
e.resume();
|
|
452
|
-
}
|
|
453
|
-
function b(e, ...t) {
|
|
454
|
-
let n = {}, r;
|
|
455
|
-
for (r in e) t.includes(r) || (n[r] = e[r]);
|
|
456
|
-
return n;
|
|
457
|
-
}
|
|
458
|
-
}));
|
|
459
|
-
//#endregion
|
|
460
|
-
export { c as t };
|
package/dist/dist-CkUzyZvx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./__vite-browser-external-BrdF6Ba4.js`);function t(e){if(!/^data:/i.test(e))throw TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,``);let t=e.indexOf(`,`);if(t===-1||t<=4)throw TypeError(`malformed data: URI`);let n=e.substring(5,t).split(`;`),r=``,i=!1,a=n[0]||`text/plain`,o=a;for(let e=1;e<n.length;e++)n[e]===`base64`?i=!0:n[e]&&(o+=`;${n[e]}`,n[e].indexOf(`charset=`)===0&&(r=n[e].substring(8)));!n[0]&&!r.length&&(o+=`;charset=US-ASCII`,r=`US-ASCII`);let s=i?`base64`:`ascii`,c=unescape(e.substring(t+1)),l=Buffer.from(c,s);return l.type=a,l.typeFull=o,l.charset=r,l}var n=e.r((()=>{}));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
package/dist/dist-Cum8lv5j.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./__vite-browser-external-C4yfM1ew.mjs";
|
|
2
|
-
//#region node_modules/data-uri-to-buffer/dist/index.js
|
|
3
|
-
function t(e) {
|
|
4
|
-
if (!/^data:/i.test(e)) throw TypeError("`uri` does not appear to be a Data URI (must begin with \"data:\")");
|
|
5
|
-
e = e.replace(/\r?\n/g, "");
|
|
6
|
-
let t = e.indexOf(",");
|
|
7
|
-
if (t === -1 || t <= 4) throw TypeError("malformed data: URI");
|
|
8
|
-
let n = e.substring(5, t).split(";"), r = "", i = !1, a = n[0] || "text/plain", o = a;
|
|
9
|
-
for (let e = 1; e < n.length; e++) n[e] === "base64" ? i = !0 : n[e] && (o += `;${n[e]}`, n[e].indexOf("charset=") === 0 && (r = n[e].substring(8)));
|
|
10
|
-
!n[0] && !r.length && (o += ";charset=US-ASCII", r = "US-ASCII");
|
|
11
|
-
let s = i ? "base64" : "ascii", c = unescape(e.substring(t + 1)), l = Buffer.from(c, s);
|
|
12
|
-
return l.type = a, l.typeFull = o, l.charset = r, l;
|
|
13
|
-
}
|
|
14
|
-
var n = e((() => {}));
|
|
15
|
-
//#endregion
|
|
16
|
-
export { n, t };
|