@alfe.ai/gateway 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/health.js +295 -139
- package/package.json +3 -3
package/dist/health.js
CHANGED
|
@@ -4058,6 +4058,7 @@ var ReconciliationEngine = class {
|
|
|
4058
4058
|
if (local.status === "error") {
|
|
4059
4059
|
if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
|
|
4060
4060
|
log$2.info(`Reinstalling ${id} from error state (requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt})`);
|
|
4061
|
+
this.manager.resetReinstallAttempts(id);
|
|
4061
4062
|
if ((await this.manager.reinstall(id, desired.version, desired.config)).configApplied) report.configApplied = true;
|
|
4062
4063
|
report.installed.push(id);
|
|
4063
4064
|
report.activated.push(id);
|
|
@@ -4069,9 +4070,26 @@ var ReconciliationEngine = class {
|
|
|
4069
4070
|
return;
|
|
4070
4071
|
}
|
|
4071
4072
|
if (!await this.manager.isInstallIntact(id)) {
|
|
4072
|
-
|
|
4073
|
+
const attempts = this.manager.getReinstallAttempts(id);
|
|
4074
|
+
if (attempts >= 3) {
|
|
4075
|
+
log$2.error(`Auto-reinstall blocked for ${id} — ${String(attempts)} consecutive failures. Manual reinstall required.`);
|
|
4076
|
+
report.errors.push({
|
|
4077
|
+
integrationId: id,
|
|
4078
|
+
error: `Max auto-reinstall attempts (${String(attempts)}) reached`
|
|
4079
|
+
});
|
|
4080
|
+
report.results.push({
|
|
4081
|
+
integrationId: id,
|
|
4082
|
+
action: "error",
|
|
4083
|
+
actualStatus: "error",
|
|
4084
|
+
errorMessage: `Max auto-reinstall attempts (${String(attempts)}) reached — manual reinstall required`
|
|
4085
|
+
});
|
|
4086
|
+
return;
|
|
4087
|
+
}
|
|
4088
|
+
log$2.info(`Auto-reinstalling ${id} — install directory is corrupted or missing (attempt ${String(attempts + 1)}/3)`);
|
|
4089
|
+
this.manager.incrementReinstallAttempts(id);
|
|
4073
4090
|
try {
|
|
4074
4091
|
if ((await this.manager.reinstall(id, desired.version, desired.config)).configApplied) report.configApplied = true;
|
|
4092
|
+
this.manager.resetReinstallAttempts(id);
|
|
4075
4093
|
report.installed.push(id);
|
|
4076
4094
|
report.activated.push(id);
|
|
4077
4095
|
report.results.push({
|
|
@@ -4121,6 +4139,7 @@ var ReconciliationEngine = class {
|
|
|
4121
4139
|
}
|
|
4122
4140
|
if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
|
|
4123
4141
|
log$2.info(`Reinstall requested for ${id} (requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt})`);
|
|
4142
|
+
this.manager.resetReinstallAttempts(id);
|
|
4124
4143
|
if ((await this.manager.reinstall(id, desired.version, desired.config)).configApplied) report.configApplied = true;
|
|
4125
4144
|
report.installed.push(id);
|
|
4126
4145
|
report.activated.push(id);
|
|
@@ -4805,6 +4824,17 @@ var IPCServer = class {
|
|
|
4805
4824
|
this.sendResponse(conn, createIPCError(request.id, "PROTOCOL_MISMATCH", `Unsupported protocol version ${String(protocolVersion)}. Server supports v${String(1)}.`));
|
|
4806
4825
|
return;
|
|
4807
4826
|
}
|
|
4827
|
+
const staleIds = [];
|
|
4828
|
+
for (const [existingId, existing] of this.connections) if (existingId !== conn.id && existing.info?.name === name) {
|
|
4829
|
+
logger$1.info({
|
|
4830
|
+
staleConnId: existingId,
|
|
4831
|
+
newConnId: conn.id,
|
|
4832
|
+
plugin: name
|
|
4833
|
+
}, "IPC: closing stale duplicate connection");
|
|
4834
|
+
existing.socket.destroy();
|
|
4835
|
+
staleIds.push(existingId);
|
|
4836
|
+
}
|
|
4837
|
+
for (const id of staleIds) this.connections.delete(id);
|
|
4808
4838
|
conn.info = {
|
|
4809
4839
|
name,
|
|
4810
4840
|
version,
|
|
@@ -5916,7 +5946,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5916
5946
|
__exportStar(require_types(), exports);
|
|
5917
5947
|
}));
|
|
5918
5948
|
//#endregion
|
|
5919
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
5949
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/bind.js
|
|
5920
5950
|
/**
|
|
5921
5951
|
* Create a bound version of a function with a specified `this` context
|
|
5922
5952
|
*
|
|
@@ -5930,7 +5960,7 @@ function bind(fn, thisArg) {
|
|
|
5930
5960
|
};
|
|
5931
5961
|
}
|
|
5932
5962
|
//#endregion
|
|
5933
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
5963
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/utils.js
|
|
5934
5964
|
const { toString } = Object.prototype;
|
|
5935
5965
|
const { getPrototypeOf } = Object;
|
|
5936
5966
|
const { iterator, toStringTag } = Symbol;
|
|
@@ -6626,7 +6656,7 @@ var utils_default = {
|
|
|
6626
6656
|
isIterable
|
|
6627
6657
|
};
|
|
6628
6658
|
//#endregion
|
|
6629
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
6659
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/AxiosError.js
|
|
6630
6660
|
var AxiosError$1 = class AxiosError$1 extends Error {
|
|
6631
6661
|
static from(error, code, config, request, response, customProps) {
|
|
6632
6662
|
const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
|
|
@@ -15283,7 +15313,7 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
|
|
|
15283
15313
|
module.exports = FormData;
|
|
15284
15314
|
})))(), 1)).default;
|
|
15285
15315
|
//#endregion
|
|
15286
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15316
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/toFormData.js
|
|
15287
15317
|
/**
|
|
15288
15318
|
* Determines if the given thing is a array or js object.
|
|
15289
15319
|
*
|
|
@@ -15431,7 +15461,7 @@ function toFormData$1(obj, formData, options) {
|
|
|
15431
15461
|
return formData;
|
|
15432
15462
|
}
|
|
15433
15463
|
//#endregion
|
|
15434
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15464
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
15435
15465
|
/**
|
|
15436
15466
|
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
15437
15467
|
* their percent-encoded equivalents
|
|
@@ -15479,10 +15509,10 @@ prototype.toString = function toString(encoder) {
|
|
|
15479
15509
|
}, "").join("&");
|
|
15480
15510
|
};
|
|
15481
15511
|
//#endregion
|
|
15482
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15512
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/buildURL.js
|
|
15483
15513
|
/**
|
|
15484
|
-
* It replaces
|
|
15485
|
-
*
|
|
15514
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
15515
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
15486
15516
|
*
|
|
15487
15517
|
* @param {string} val The value to be encoded.
|
|
15488
15518
|
*
|
|
@@ -15516,7 +15546,7 @@ function buildURL(url, params, options) {
|
|
|
15516
15546
|
return url;
|
|
15517
15547
|
}
|
|
15518
15548
|
//#endregion
|
|
15519
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15549
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
15520
15550
|
var InterceptorManager = class {
|
|
15521
15551
|
constructor() {
|
|
15522
15552
|
this.handlers = [];
|
|
@@ -15574,7 +15604,7 @@ var InterceptorManager = class {
|
|
|
15574
15604
|
}
|
|
15575
15605
|
};
|
|
15576
15606
|
//#endregion
|
|
15577
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15607
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/defaults/transitional.js
|
|
15578
15608
|
var transitional_default = {
|
|
15579
15609
|
silentJSONParsing: true,
|
|
15580
15610
|
forcedJSONParsing: true,
|
|
@@ -15582,10 +15612,10 @@ var transitional_default = {
|
|
|
15582
15612
|
legacyInterceptorReqResOrdering: true
|
|
15583
15613
|
};
|
|
15584
15614
|
//#endregion
|
|
15585
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15615
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
15586
15616
|
var URLSearchParams_default = url.URLSearchParams;
|
|
15587
15617
|
//#endregion
|
|
15588
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15618
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/platform/node/index.js
|
|
15589
15619
|
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
15590
15620
|
const DIGIT = "0123456789";
|
|
15591
15621
|
const ALPHABET = {
|
|
@@ -15618,7 +15648,7 @@ var node_default = {
|
|
|
15618
15648
|
]
|
|
15619
15649
|
};
|
|
15620
15650
|
//#endregion
|
|
15621
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15651
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/platform/common/utils.js
|
|
15622
15652
|
var utils_exports = /* @__PURE__ */ __exportAll({
|
|
15623
15653
|
hasBrowserEnv: () => hasBrowserEnv,
|
|
15624
15654
|
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
@@ -15662,13 +15692,13 @@ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
|
|
|
15662
15692
|
const hasStandardBrowserWebWorkerEnv = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
15663
15693
|
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
15664
15694
|
//#endregion
|
|
15665
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15695
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/platform/index.js
|
|
15666
15696
|
var platform_default = {
|
|
15667
15697
|
...utils_exports,
|
|
15668
15698
|
...node_default
|
|
15669
15699
|
};
|
|
15670
15700
|
//#endregion
|
|
15671
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15701
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
15672
15702
|
function toURLEncodedForm(data, options) {
|
|
15673
15703
|
return toFormData$1(data, new platform_default.classes.URLSearchParams(), {
|
|
15674
15704
|
visitor: function(value, key, path, helpers) {
|
|
@@ -15682,7 +15712,7 @@ function toURLEncodedForm(data, options) {
|
|
|
15682
15712
|
});
|
|
15683
15713
|
}
|
|
15684
15714
|
//#endregion
|
|
15685
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15715
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
15686
15716
|
/**
|
|
15687
15717
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
15688
15718
|
*
|
|
@@ -15747,7 +15777,7 @@ function formDataToJSON(formData) {
|
|
|
15747
15777
|
return null;
|
|
15748
15778
|
}
|
|
15749
15779
|
//#endregion
|
|
15750
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15780
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/defaults/index.js
|
|
15751
15781
|
/**
|
|
15752
15782
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
15753
15783
|
* of the input
|
|
@@ -15846,7 +15876,7 @@ utils_default.forEach([
|
|
|
15846
15876
|
defaults.headers[method] = {};
|
|
15847
15877
|
});
|
|
15848
15878
|
//#endregion
|
|
15849
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15879
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/parseHeaders.js
|
|
15850
15880
|
const ignoreDuplicateOf = utils_default.toObjectSet([
|
|
15851
15881
|
"age",
|
|
15852
15882
|
"authorization",
|
|
@@ -15897,14 +15927,32 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
15897
15927
|
return parsed;
|
|
15898
15928
|
};
|
|
15899
15929
|
//#endregion
|
|
15900
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
15930
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/AxiosHeaders.js
|
|
15901
15931
|
const $internals = Symbol("internals");
|
|
15932
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
15933
|
+
function assertValidHeaderValue(value, header) {
|
|
15934
|
+
if (value === false || value == null) return;
|
|
15935
|
+
if (utils_default.isArray(value)) {
|
|
15936
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
15937
|
+
return;
|
|
15938
|
+
}
|
|
15939
|
+
if (!isValidHeaderValue(String(value))) throw new Error(`Invalid character in header content ["${header}"]`);
|
|
15940
|
+
}
|
|
15902
15941
|
function normalizeHeader(header) {
|
|
15903
15942
|
return header && String(header).trim().toLowerCase();
|
|
15904
15943
|
}
|
|
15944
|
+
function stripTrailingCRLF(str) {
|
|
15945
|
+
let end = str.length;
|
|
15946
|
+
while (end > 0) {
|
|
15947
|
+
const charCode = str.charCodeAt(end - 1);
|
|
15948
|
+
if (charCode !== 10 && charCode !== 13) break;
|
|
15949
|
+
end -= 1;
|
|
15950
|
+
}
|
|
15951
|
+
return end === str.length ? str : str.slice(0, end);
|
|
15952
|
+
}
|
|
15905
15953
|
function normalizeValue(value) {
|
|
15906
15954
|
if (value === false || value == null) return value;
|
|
15907
|
-
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
15955
|
+
return utils_default.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
15908
15956
|
}
|
|
15909
15957
|
function parseTokens(str) {
|
|
15910
15958
|
const tokens = Object.create(null);
|
|
@@ -15951,7 +15999,10 @@ var AxiosHeaders$1 = class {
|
|
|
15951
15999
|
const lHeader = normalizeHeader(_header);
|
|
15952
16000
|
if (!lHeader) throw new Error("header name must be a non-empty string");
|
|
15953
16001
|
const key = utils_default.findKey(self, lHeader);
|
|
15954
|
-
if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false)
|
|
16002
|
+
if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) {
|
|
16003
|
+
assertValidHeaderValue(_value, _header);
|
|
16004
|
+
self[key || _header] = normalizeValue(_value);
|
|
16005
|
+
}
|
|
15955
16006
|
}
|
|
15956
16007
|
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
15957
16008
|
if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
|
|
@@ -16098,7 +16149,7 @@ utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
|
16098
16149
|
});
|
|
16099
16150
|
utils_default.freezeMethods(AxiosHeaders$1);
|
|
16100
16151
|
//#endregion
|
|
16101
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16152
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/transformData.js
|
|
16102
16153
|
/**
|
|
16103
16154
|
* Transform the data for a request or a response
|
|
16104
16155
|
*
|
|
@@ -16119,12 +16170,12 @@ function transformData(fns, response) {
|
|
|
16119
16170
|
return data;
|
|
16120
16171
|
}
|
|
16121
16172
|
//#endregion
|
|
16122
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16173
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/isCancel.js
|
|
16123
16174
|
function isCancel$1(value) {
|
|
16124
16175
|
return !!(value && value.__CANCEL__);
|
|
16125
16176
|
}
|
|
16126
16177
|
//#endregion
|
|
16127
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16178
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
16128
16179
|
var CanceledError$1 = class extends AxiosError$1 {
|
|
16129
16180
|
/**
|
|
16130
16181
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
@@ -16142,7 +16193,7 @@ var CanceledError$1 = class extends AxiosError$1 {
|
|
|
16142
16193
|
}
|
|
16143
16194
|
};
|
|
16144
16195
|
//#endregion
|
|
16145
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16196
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/settle.js
|
|
16146
16197
|
/**
|
|
16147
16198
|
* Resolve or reject a Promise based on response status.
|
|
16148
16199
|
*
|
|
@@ -16158,7 +16209,7 @@ function settle(resolve, reject, response) {
|
|
|
16158
16209
|
else reject(new AxiosError$1("Request failed with status code " + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
16159
16210
|
}
|
|
16160
16211
|
//#endregion
|
|
16161
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16212
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
16162
16213
|
/**
|
|
16163
16214
|
* Determines whether the specified URL is absolute
|
|
16164
16215
|
*
|
|
@@ -16171,7 +16222,7 @@ function isAbsoluteURL(url) {
|
|
|
16171
16222
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
16172
16223
|
}
|
|
16173
16224
|
//#endregion
|
|
16174
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16225
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/combineURLs.js
|
|
16175
16226
|
/**
|
|
16176
16227
|
* Creates a new URL by combining the specified URLs
|
|
16177
16228
|
*
|
|
@@ -16184,7 +16235,7 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
16184
16235
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
16185
16236
|
}
|
|
16186
16237
|
//#endregion
|
|
16187
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
16238
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/buildFullPath.js
|
|
16188
16239
|
/**
|
|
16189
16240
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
16190
16241
|
* only when the requestedURL is not already an absolute URL.
|
|
@@ -16201,74 +16252,75 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
16201
16252
|
return requestedURL;
|
|
16202
16253
|
}
|
|
16203
16254
|
//#endregion
|
|
16204
|
-
//#region ../../node_modules/.pnpm/proxy-from-env@
|
|
16205
|
-
var
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
/**
|
|
16219
|
-
* @param {string|object} url - The URL, or the result from url.parse.
|
|
16220
|
-
* @return {string} The URL of the proxy that should handle the request to the
|
|
16221
|
-
* given URL. If no proxy is set, this will be an empty string.
|
|
16222
|
-
*/
|
|
16223
|
-
function getProxyForUrl(url) {
|
|
16224
|
-
var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {};
|
|
16225
|
-
var proto = parsedUrl.protocol;
|
|
16226
|
-
var hostname = parsedUrl.host;
|
|
16227
|
-
var port = parsedUrl.port;
|
|
16228
|
-
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
|
|
16229
|
-
proto = proto.split(":", 1)[0];
|
|
16230
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
16231
|
-
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
|
|
16232
|
-
if (!shouldProxy(hostname, port)) return "";
|
|
16233
|
-
var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
16234
|
-
if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
|
|
16235
|
-
return proxy;
|
|
16236
|
-
}
|
|
16237
|
-
/**
|
|
16238
|
-
* Determines whether a given URL should be proxied.
|
|
16239
|
-
*
|
|
16240
|
-
* @param {string} hostname - The host name of the URL.
|
|
16241
|
-
* @param {number} port - The effective port of the URL.
|
|
16242
|
-
* @returns {boolean} Whether the given URL should be proxied.
|
|
16243
|
-
* @private
|
|
16244
|
-
*/
|
|
16245
|
-
function shouldProxy(hostname, port) {
|
|
16246
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
16247
|
-
if (!NO_PROXY) return true;
|
|
16248
|
-
if (NO_PROXY === "*") return false;
|
|
16249
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
16250
|
-
if (!proxy) return true;
|
|
16251
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
16252
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
16253
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
16254
|
-
if (parsedProxyPort && parsedProxyPort !== port) return true;
|
|
16255
|
-
if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
|
|
16256
|
-
if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
16257
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
16258
|
-
});
|
|
16259
|
-
}
|
|
16260
|
-
/**
|
|
16261
|
-
* Get the value for an environment variable.
|
|
16262
|
-
*
|
|
16263
|
-
* @param {string} key - The name of the environment variable.
|
|
16264
|
-
* @return {string} The value of the environment variable.
|
|
16265
|
-
* @private
|
|
16266
|
-
*/
|
|
16267
|
-
function getEnv(key) {
|
|
16268
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
16255
|
+
//#region ../../node_modules/.pnpm/proxy-from-env@2.1.0/node_modules/proxy-from-env/index.js
|
|
16256
|
+
var DEFAULT_PORTS$1 = {
|
|
16257
|
+
ftp: 21,
|
|
16258
|
+
gopher: 70,
|
|
16259
|
+
http: 80,
|
|
16260
|
+
https: 443,
|
|
16261
|
+
ws: 80,
|
|
16262
|
+
wss: 443
|
|
16263
|
+
};
|
|
16264
|
+
function parseUrl(urlString) {
|
|
16265
|
+
try {
|
|
16266
|
+
return new URL(urlString);
|
|
16267
|
+
} catch {
|
|
16268
|
+
return null;
|
|
16269
16269
|
}
|
|
16270
|
-
|
|
16271
|
-
|
|
16270
|
+
}
|
|
16271
|
+
/**
|
|
16272
|
+
* @param {string|object|URL} url - The URL as a string or URL instance, or a
|
|
16273
|
+
* compatible object (such as the result from legacy url.parse).
|
|
16274
|
+
* @return {string} The URL of the proxy that should handle the request to the
|
|
16275
|
+
* given URL. If no proxy is set, this will be an empty string.
|
|
16276
|
+
*/
|
|
16277
|
+
function getProxyForUrl(url) {
|
|
16278
|
+
var parsedUrl = (typeof url === "string" ? parseUrl(url) : url) || {};
|
|
16279
|
+
var proto = parsedUrl.protocol;
|
|
16280
|
+
var hostname = parsedUrl.host;
|
|
16281
|
+
var port = parsedUrl.port;
|
|
16282
|
+
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
|
|
16283
|
+
proto = proto.split(":", 1)[0];
|
|
16284
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
16285
|
+
port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0;
|
|
16286
|
+
if (!shouldProxy(hostname, port)) return "";
|
|
16287
|
+
var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
|
|
16288
|
+
if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
|
|
16289
|
+
return proxy;
|
|
16290
|
+
}
|
|
16291
|
+
/**
|
|
16292
|
+
* Determines whether a given URL should be proxied.
|
|
16293
|
+
*
|
|
16294
|
+
* @param {string} hostname - The host name of the URL.
|
|
16295
|
+
* @param {number} port - The effective port of the URL.
|
|
16296
|
+
* @returns {boolean} Whether the given URL should be proxied.
|
|
16297
|
+
* @private
|
|
16298
|
+
*/
|
|
16299
|
+
function shouldProxy(hostname, port) {
|
|
16300
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
16301
|
+
if (!NO_PROXY) return true;
|
|
16302
|
+
if (NO_PROXY === "*") return false;
|
|
16303
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
16304
|
+
if (!proxy) return true;
|
|
16305
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
16306
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
16307
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
16308
|
+
if (parsedProxyPort && parsedProxyPort !== port) return true;
|
|
16309
|
+
if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
|
|
16310
|
+
if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
16311
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
16312
|
+
});
|
|
16313
|
+
}
|
|
16314
|
+
/**
|
|
16315
|
+
* Get the value for an environment variable.
|
|
16316
|
+
*
|
|
16317
|
+
* @param {string} key - The name of the environment variable.
|
|
16318
|
+
* @return {string} The value of the environment variable.
|
|
16319
|
+
* @private
|
|
16320
|
+
*/
|
|
16321
|
+
function getEnv(key) {
|
|
16322
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
16323
|
+
}
|
|
16272
16324
|
//#endregion
|
|
16273
16325
|
//#region ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
16274
16326
|
var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -17081,7 +17133,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17081
17133
|
else module.exports = require_node();
|
|
17082
17134
|
}));
|
|
17083
17135
|
//#endregion
|
|
17084
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.
|
|
17136
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/debug.js
|
|
17085
17137
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17086
17138
|
var debug;
|
|
17087
17139
|
module.exports = function() {
|
|
@@ -17095,7 +17147,7 @@ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17095
17147
|
};
|
|
17096
17148
|
}));
|
|
17097
17149
|
//#endregion
|
|
17098
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.
|
|
17150
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/index.js
|
|
17099
17151
|
var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17100
17152
|
var url$1 = __require("url");
|
|
17101
17153
|
var URL = url$1.URL;
|
|
@@ -17117,6 +17169,11 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17117
17169
|
} catch (error) {
|
|
17118
17170
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
17119
17171
|
}
|
|
17172
|
+
var sensitiveHeaders = [
|
|
17173
|
+
"Authorization",
|
|
17174
|
+
"Proxy-Authorization",
|
|
17175
|
+
"Cookie"
|
|
17176
|
+
];
|
|
17120
17177
|
var preservedUrlFields = [
|
|
17121
17178
|
"auth",
|
|
17122
17179
|
"host",
|
|
@@ -17170,6 +17227,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17170
17227
|
self.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
17171
17228
|
}
|
|
17172
17229
|
};
|
|
17230
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
|
|
17173
17231
|
this._performRequest();
|
|
17174
17232
|
}
|
|
17175
17233
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
@@ -17293,6 +17351,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17293
17351
|
});
|
|
17294
17352
|
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
17295
17353
|
if (!options.headers) options.headers = {};
|
|
17354
|
+
if (!isArray(options.sensitiveHeaders)) options.sensitiveHeaders = [];
|
|
17296
17355
|
if (options.host) {
|
|
17297
17356
|
if (!options.hostname) options.hostname = options.host;
|
|
17298
17357
|
delete options.host;
|
|
@@ -17371,7 +17430,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17371
17430
|
debug("redirecting to", redirectUrl.href);
|
|
17372
17431
|
this._isRedirect = true;
|
|
17373
17432
|
spreadUrlObject(redirectUrl, this._options);
|
|
17374
|
-
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(
|
|
17433
|
+
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
17375
17434
|
if (isFunction(beforeRedirect)) {
|
|
17376
17435
|
var responseDetails = {
|
|
17377
17436
|
headers: response.headers,
|
|
@@ -17508,6 +17567,9 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17508
17567
|
var dot = subdomain.length - domain.length - 1;
|
|
17509
17568
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
17510
17569
|
}
|
|
17570
|
+
function isArray(value) {
|
|
17571
|
+
return value instanceof Array;
|
|
17572
|
+
}
|
|
17511
17573
|
function isString(value) {
|
|
17512
17574
|
return typeof value === "string" || value instanceof String;
|
|
17513
17575
|
}
|
|
@@ -17520,6 +17582,9 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17520
17582
|
function isURL(value) {
|
|
17521
17583
|
return URL && value instanceof URL;
|
|
17522
17584
|
}
|
|
17585
|
+
function escapeRegex(regex) {
|
|
17586
|
+
return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
17587
|
+
}
|
|
17523
17588
|
module.exports = wrap({
|
|
17524
17589
|
http: http$1,
|
|
17525
17590
|
https: https$1
|
|
@@ -17527,16 +17592,16 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17527
17592
|
module.exports.wrap = wrap;
|
|
17528
17593
|
}));
|
|
17529
17594
|
//#endregion
|
|
17530
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17531
|
-
const VERSION$1 = "1.
|
|
17595
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/env/data.js
|
|
17596
|
+
const VERSION$1 = "1.15.0";
|
|
17532
17597
|
//#endregion
|
|
17533
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17598
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/parseProtocol.js
|
|
17534
17599
|
function parseProtocol(url) {
|
|
17535
17600
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
17536
17601
|
return match && match[1] || "";
|
|
17537
17602
|
}
|
|
17538
17603
|
//#endregion
|
|
17539
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17604
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/fromDataURI.js
|
|
17540
17605
|
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
17541
17606
|
/**
|
|
17542
17607
|
* Parse data uri to a Buffer or Blob
|
|
@@ -17569,7 +17634,7 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
17569
17634
|
throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
|
|
17570
17635
|
}
|
|
17571
17636
|
//#endregion
|
|
17572
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17637
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
17573
17638
|
const kInternals = Symbol("internals");
|
|
17574
17639
|
var AxiosTransformStream = class extends stream.Transform {
|
|
17575
17640
|
constructor(options) {
|
|
@@ -17663,7 +17728,7 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
17663
17728
|
}
|
|
17664
17729
|
};
|
|
17665
17730
|
//#endregion
|
|
17666
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17731
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/readBlob.js
|
|
17667
17732
|
const { asyncIterator } = Symbol;
|
|
17668
17733
|
const readBlob = async function* (blob) {
|
|
17669
17734
|
if (blob.stream) yield* blob.stream();
|
|
@@ -17672,7 +17737,7 @@ const readBlob = async function* (blob) {
|
|
|
17672
17737
|
else yield blob;
|
|
17673
17738
|
};
|
|
17674
17739
|
//#endregion
|
|
17675
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17740
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/formDataToStream.js
|
|
17676
17741
|
const BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
17677
17742
|
const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
|
|
17678
17743
|
const CRLF = "\r\n";
|
|
@@ -17732,7 +17797,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
17732
17797
|
})());
|
|
17733
17798
|
};
|
|
17734
17799
|
//#endregion
|
|
17735
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17800
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
17736
17801
|
var ZlibHeaderTransformStream = class extends stream.Transform {
|
|
17737
17802
|
__transform(chunk, encoding, callback) {
|
|
17738
17803
|
this.push(chunk);
|
|
@@ -17752,7 +17817,7 @@ var ZlibHeaderTransformStream = class extends stream.Transform {
|
|
|
17752
17817
|
}
|
|
17753
17818
|
};
|
|
17754
17819
|
//#endregion
|
|
17755
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17820
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/callbackify.js
|
|
17756
17821
|
const callbackify = (fn, reducer) => {
|
|
17757
17822
|
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
17758
17823
|
const cb = args.pop();
|
|
@@ -17766,7 +17831,64 @@ const callbackify = (fn, reducer) => {
|
|
|
17766
17831
|
} : fn;
|
|
17767
17832
|
};
|
|
17768
17833
|
//#endregion
|
|
17769
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17834
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
17835
|
+
const DEFAULT_PORTS = {
|
|
17836
|
+
http: 80,
|
|
17837
|
+
https: 443,
|
|
17838
|
+
ws: 80,
|
|
17839
|
+
wss: 443,
|
|
17840
|
+
ftp: 21
|
|
17841
|
+
};
|
|
17842
|
+
const parseNoProxyEntry = (entry) => {
|
|
17843
|
+
let entryHost = entry;
|
|
17844
|
+
let entryPort = 0;
|
|
17845
|
+
if (entryHost.charAt(0) === "[") {
|
|
17846
|
+
const bracketIndex = entryHost.indexOf("]");
|
|
17847
|
+
if (bracketIndex !== -1) {
|
|
17848
|
+
const host = entryHost.slice(1, bracketIndex);
|
|
17849
|
+
const rest = entryHost.slice(bracketIndex + 1);
|
|
17850
|
+
if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) entryPort = Number.parseInt(rest.slice(1), 10);
|
|
17851
|
+
return [host, entryPort];
|
|
17852
|
+
}
|
|
17853
|
+
}
|
|
17854
|
+
const firstColon = entryHost.indexOf(":");
|
|
17855
|
+
const lastColon = entryHost.lastIndexOf(":");
|
|
17856
|
+
if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
|
|
17857
|
+
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
17858
|
+
entryHost = entryHost.slice(0, lastColon);
|
|
17859
|
+
}
|
|
17860
|
+
return [entryHost, entryPort];
|
|
17861
|
+
};
|
|
17862
|
+
const normalizeNoProxyHost = (hostname) => {
|
|
17863
|
+
if (!hostname) return hostname;
|
|
17864
|
+
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") hostname = hostname.slice(1, -1);
|
|
17865
|
+
return hostname.replace(/\.+$/, "");
|
|
17866
|
+
};
|
|
17867
|
+
function shouldBypassProxy(location) {
|
|
17868
|
+
let parsed;
|
|
17869
|
+
try {
|
|
17870
|
+
parsed = new URL(location);
|
|
17871
|
+
} catch (_err) {
|
|
17872
|
+
return false;
|
|
17873
|
+
}
|
|
17874
|
+
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
|
|
17875
|
+
if (!noProxy) return false;
|
|
17876
|
+
if (noProxy === "*") return true;
|
|
17877
|
+
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(":", 1)[0]] || 0;
|
|
17878
|
+
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
17879
|
+
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
17880
|
+
if (!entry) return false;
|
|
17881
|
+
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
17882
|
+
entryHost = normalizeNoProxyHost(entryHost);
|
|
17883
|
+
if (!entryHost) return false;
|
|
17884
|
+
if (entryPort && entryPort !== port) return false;
|
|
17885
|
+
if (entryHost.charAt(0) === "*") entryHost = entryHost.slice(1);
|
|
17886
|
+
if (entryHost.charAt(0) === ".") return hostname.endsWith(entryHost);
|
|
17887
|
+
return hostname === entryHost;
|
|
17888
|
+
});
|
|
17889
|
+
}
|
|
17890
|
+
//#endregion
|
|
17891
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/speedometer.js
|
|
17770
17892
|
/**
|
|
17771
17893
|
* Calculate data maxRate
|
|
17772
17894
|
* @param {Number} [samplesCount= 10]
|
|
@@ -17801,7 +17923,7 @@ function speedometer(samplesCount, min) {
|
|
|
17801
17923
|
};
|
|
17802
17924
|
}
|
|
17803
17925
|
//#endregion
|
|
17804
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17926
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/throttle.js
|
|
17805
17927
|
/**
|
|
17806
17928
|
* Throttle decorator
|
|
17807
17929
|
* @param {Function} fn
|
|
@@ -17838,7 +17960,7 @@ function throttle(fn, freq) {
|
|
|
17838
17960
|
return [throttled, flush];
|
|
17839
17961
|
}
|
|
17840
17962
|
//#endregion
|
|
17841
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17963
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
17842
17964
|
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
17843
17965
|
let bytesNotified = 0;
|
|
17844
17966
|
const _speedometer = speedometer(50, 250);
|
|
@@ -17872,7 +17994,7 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
17872
17994
|
};
|
|
17873
17995
|
const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
17874
17996
|
//#endregion
|
|
17875
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17997
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
17876
17998
|
/**
|
|
17877
17999
|
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
17878
18000
|
* - For base64: compute exact decoded size using length and padding;
|
|
@@ -17922,8 +18044,7 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
17922
18044
|
return Buffer.byteLength(body, "utf8");
|
|
17923
18045
|
}
|
|
17924
18046
|
//#endregion
|
|
17925
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
17926
|
-
var import_proxy_from_env = /* @__PURE__ */ __toESM(require_proxy_from_env(), 1);
|
|
18047
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/adapters/http.js
|
|
17927
18048
|
var import_follow_redirects = /* @__PURE__ */ __toESM(require_follow_redirects(), 1);
|
|
17928
18049
|
const zlibOptions = {
|
|
17929
18050
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
@@ -17966,6 +18087,7 @@ var Http2Sessions = class {
|
|
|
17966
18087
|
while (i--) if (entries[i][0] === session) {
|
|
17967
18088
|
if (len === 1) delete this.sessions[authority];
|
|
17968
18089
|
else entries.splice(i, 1);
|
|
18090
|
+
if (!session.closed) session.close();
|
|
17969
18091
|
return;
|
|
17970
18092
|
}
|
|
17971
18093
|
};
|
|
@@ -18021,8 +18143,10 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
18021
18143
|
function setProxy(options, configProxy, location) {
|
|
18022
18144
|
let proxy = configProxy;
|
|
18023
18145
|
if (!proxy && proxy !== false) {
|
|
18024
|
-
const proxyUrl =
|
|
18025
|
-
if (proxyUrl)
|
|
18146
|
+
const proxyUrl = getProxyForUrl(location);
|
|
18147
|
+
if (proxyUrl) {
|
|
18148
|
+
if (!shouldBypassProxy(location)) proxy = new URL(proxyUrl);
|
|
18149
|
+
}
|
|
18026
18150
|
}
|
|
18027
18151
|
if (proxy) {
|
|
18028
18152
|
if (proxy.username) proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
@@ -18189,7 +18313,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
18189
18313
|
}
|
|
18190
18314
|
if (supportedProtocols.indexOf(protocol) === -1) return reject(new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config));
|
|
18191
18315
|
const headers = AxiosHeaders$1.from(config.headers).normalize();
|
|
18192
|
-
headers.set("User-Agent", "axios/1.
|
|
18316
|
+
headers.set("User-Agent", "axios/1.15.0", false);
|
|
18193
18317
|
const { onUploadProgress, onDownloadProgress } = config;
|
|
18194
18318
|
const maxRate = config.maxRate;
|
|
18195
18319
|
let maxUploadRate = void 0;
|
|
@@ -18199,7 +18323,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
18199
18323
|
data = formDataToStream(data, (formHeaders) => {
|
|
18200
18324
|
headers.set(formHeaders);
|
|
18201
18325
|
}, {
|
|
18202
|
-
tag: `axios-1.
|
|
18326
|
+
tag: `axios-1.15.0-boundary`,
|
|
18203
18327
|
boundary: userBoundary && userBoundary[1] || void 0
|
|
18204
18328
|
});
|
|
18205
18329
|
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
|
|
@@ -18419,13 +18543,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
18419
18543
|
});
|
|
18420
18544
|
};
|
|
18421
18545
|
//#endregion
|
|
18422
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18546
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
18423
18547
|
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
18424
18548
|
url = new URL(url, platform_default.origin);
|
|
18425
18549
|
return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
|
|
18426
18550
|
})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
|
|
18427
18551
|
//#endregion
|
|
18428
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18552
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/cookies.js
|
|
18429
18553
|
var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
18430
18554
|
write(name, value, expires, path, domain, secure, sameSite) {
|
|
18431
18555
|
if (typeof document === "undefined") return;
|
|
@@ -18453,7 +18577,7 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
|
18453
18577
|
remove() {}
|
|
18454
18578
|
};
|
|
18455
18579
|
//#endregion
|
|
18456
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18580
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/mergeConfig.js
|
|
18457
18581
|
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
18458
18582
|
/**
|
|
18459
18583
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -18531,7 +18655,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
18531
18655
|
return config;
|
|
18532
18656
|
}
|
|
18533
18657
|
//#endregion
|
|
18534
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18658
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/resolveConfig.js
|
|
18535
18659
|
var resolveConfig_default = (config) => {
|
|
18536
18660
|
const newConfig = mergeConfig$1({}, config);
|
|
18537
18661
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
@@ -18652,7 +18776,7 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
|
18652
18776
|
});
|
|
18653
18777
|
};
|
|
18654
18778
|
//#endregion
|
|
18655
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18779
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/composeSignals.js
|
|
18656
18780
|
const composeSignals = (signals, timeout) => {
|
|
18657
18781
|
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
18658
18782
|
if (timeout || length) {
|
|
@@ -18687,7 +18811,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
18687
18811
|
}
|
|
18688
18812
|
};
|
|
18689
18813
|
//#endregion
|
|
18690
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18814
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/trackStream.js
|
|
18691
18815
|
const streamChunk = function* (chunk, chunkSize) {
|
|
18692
18816
|
let len = chunk.byteLength;
|
|
18693
18817
|
if (!chunkSize || len < chunkSize) {
|
|
@@ -18755,7 +18879,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
18755
18879
|
}, { highWaterMark: 2 });
|
|
18756
18880
|
};
|
|
18757
18881
|
//#endregion
|
|
18758
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
18882
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/adapters/fetch.js
|
|
18759
18883
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
18760
18884
|
const { isFunction } = utils_default;
|
|
18761
18885
|
const globalFetchAPI = (({ Request, Response }) => ({
|
|
@@ -18781,14 +18905,16 @@ const factory = (env) => {
|
|
|
18781
18905
|
const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
18782
18906
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
18783
18907
|
let duplexAccessed = false;
|
|
18908
|
+
const body = new ReadableStream$1();
|
|
18784
18909
|
const hasContentType = new Request(platform_default.origin, {
|
|
18785
|
-
body
|
|
18910
|
+
body,
|
|
18786
18911
|
method: "POST",
|
|
18787
18912
|
get duplex() {
|
|
18788
18913
|
duplexAccessed = true;
|
|
18789
18914
|
return "half";
|
|
18790
18915
|
}
|
|
18791
18916
|
}).headers.has("Content-Type");
|
|
18917
|
+
body.cancel();
|
|
18792
18918
|
return duplexAccessed && !hasContentType;
|
|
18793
18919
|
});
|
|
18794
18920
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
@@ -18915,7 +19041,7 @@ const getFetch = (config) => {
|
|
|
18915
19041
|
};
|
|
18916
19042
|
getFetch();
|
|
18917
19043
|
//#endregion
|
|
18918
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19044
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/adapters/adapters.js
|
|
18919
19045
|
/**
|
|
18920
19046
|
* Known adapters mapping.
|
|
18921
19047
|
* Provides environment-specific adapters for Axios:
|
|
@@ -18993,7 +19119,7 @@ var adapters_default = {
|
|
|
18993
19119
|
adapters: knownAdapters
|
|
18994
19120
|
};
|
|
18995
19121
|
//#endregion
|
|
18996
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19122
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
18997
19123
|
/**
|
|
18998
19124
|
* Throws a `CanceledError` if cancellation has been requested.
|
|
18999
19125
|
*
|
|
@@ -19038,7 +19164,7 @@ function dispatchRequest(config) {
|
|
|
19038
19164
|
});
|
|
19039
19165
|
}
|
|
19040
19166
|
//#endregion
|
|
19041
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19167
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/validator.js
|
|
19042
19168
|
const validators$1 = {};
|
|
19043
19169
|
[
|
|
19044
19170
|
"object",
|
|
@@ -19111,7 +19237,7 @@ var validator_default = {
|
|
|
19111
19237
|
validators: validators$1
|
|
19112
19238
|
};
|
|
19113
19239
|
//#endregion
|
|
19114
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19240
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/Axios.js
|
|
19115
19241
|
const validators = validator_default.validators;
|
|
19116
19242
|
/**
|
|
19117
19243
|
* Create a new instance of Axios
|
|
@@ -19143,10 +19269,19 @@ var Axios$1 = class {
|
|
|
19143
19269
|
if (err instanceof Error) {
|
|
19144
19270
|
let dummy = {};
|
|
19145
19271
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
|
|
19146
|
-
const stack =
|
|
19272
|
+
const stack = (() => {
|
|
19273
|
+
if (!dummy.stack) return "";
|
|
19274
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
19275
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
19276
|
+
})();
|
|
19147
19277
|
try {
|
|
19148
19278
|
if (!err.stack) err.stack = stack;
|
|
19149
|
-
else if (stack
|
|
19279
|
+
else if (stack) {
|
|
19280
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
19281
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
19282
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
19283
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) err.stack += "\n" + stack;
|
|
19284
|
+
}
|
|
19150
19285
|
} catch (e) {}
|
|
19151
19286
|
}
|
|
19152
19287
|
throw err;
|
|
@@ -19275,7 +19410,7 @@ utils_default.forEach([
|
|
|
19275
19410
|
Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
19276
19411
|
});
|
|
19277
19412
|
//#endregion
|
|
19278
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19413
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
19279
19414
|
/**
|
|
19280
19415
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
19281
19416
|
*
|
|
@@ -19363,7 +19498,7 @@ var CancelToken$1 = class CancelToken$1 {
|
|
|
19363
19498
|
}
|
|
19364
19499
|
};
|
|
19365
19500
|
//#endregion
|
|
19366
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19501
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/spread.js
|
|
19367
19502
|
/**
|
|
19368
19503
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
19369
19504
|
*
|
|
@@ -19391,7 +19526,7 @@ function spread$1(callback) {
|
|
|
19391
19526
|
};
|
|
19392
19527
|
}
|
|
19393
19528
|
//#endregion
|
|
19394
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19529
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
19395
19530
|
/**
|
|
19396
19531
|
* Determines whether the payload is an error thrown by Axios
|
|
19397
19532
|
*
|
|
@@ -19403,7 +19538,7 @@ function isAxiosError$1(payload) {
|
|
|
19403
19538
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
19404
19539
|
}
|
|
19405
19540
|
//#endregion
|
|
19406
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19541
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
19407
19542
|
const HttpStatusCode$1 = {
|
|
19408
19543
|
Continue: 100,
|
|
19409
19544
|
SwitchingProtocols: 101,
|
|
@@ -19479,7 +19614,7 @@ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
|
|
19479
19614
|
HttpStatusCode$1[value] = key;
|
|
19480
19615
|
});
|
|
19481
19616
|
//#endregion
|
|
19482
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19617
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/axios.js
|
|
19483
19618
|
/**
|
|
19484
19619
|
* Create an instance of Axios
|
|
19485
19620
|
*
|
|
@@ -19518,10 +19653,10 @@ axios.getAdapter = adapters_default.getAdapter;
|
|
|
19518
19653
|
axios.HttpStatusCode = HttpStatusCode$1;
|
|
19519
19654
|
axios.default = axios;
|
|
19520
19655
|
//#endregion
|
|
19521
|
-
//#region ../../node_modules/.pnpm/axios@1.
|
|
19656
|
+
//#region ../../node_modules/.pnpm/axios@1.15.0/node_modules/axios/index.js
|
|
19522
19657
|
const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios;
|
|
19523
19658
|
//#endregion
|
|
19524
|
-
//#region ../../node_modules/.pnpm/@auriclabs+logger@0.1.1_@auriclabs+env@0.0.4_zod@4.3.6__axios@1.
|
|
19659
|
+
//#region ../../node_modules/.pnpm/@auriclabs+logger@0.1.1_@auriclabs+env@0.0.4_zod@4.3.6__axios@1.15.0_pino-lambda@4.4.1_pino@9.14.0__sst@4.5.1/node_modules/@auriclabs/logger/dist/index.mjs
|
|
19525
19660
|
var import_dist = require_dist();
|
|
19526
19661
|
const createBrowserTransport = () => {
|
|
19527
19662
|
return { write: (obj) => {
|
|
@@ -20833,6 +20968,27 @@ async function handleCloudCommand(command) {
|
|
|
20833
20968
|
}
|
|
20834
20969
|
};
|
|
20835
20970
|
}
|
|
20971
|
+
if (command.command === "runtime.restart") {
|
|
20972
|
+
if (!runtimeProcess) return {
|
|
20973
|
+
type: "COMMAND_ACK",
|
|
20974
|
+
commandId: command.commandId,
|
|
20975
|
+
status: "error",
|
|
20976
|
+
result: {
|
|
20977
|
+
code: "NO_RUNTIME",
|
|
20978
|
+
message: "No runtime process configured"
|
|
20979
|
+
}
|
|
20980
|
+
};
|
|
20981
|
+
logger$1.info("Restarting runtime process");
|
|
20982
|
+
runtimeProcess.restart().catch((err) => {
|
|
20983
|
+
logger$1.error({ err: err instanceof Error ? err.message : String(err) }, "Runtime restart failed");
|
|
20984
|
+
});
|
|
20985
|
+
return {
|
|
20986
|
+
type: "COMMAND_ACK",
|
|
20987
|
+
commandId: command.commandId,
|
|
20988
|
+
status: "ok",
|
|
20989
|
+
result: { restarted: true }
|
|
20990
|
+
};
|
|
20991
|
+
}
|
|
20836
20992
|
if (command.command === "integration.status") {
|
|
20837
20993
|
const payload = command.payload;
|
|
20838
20994
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Alfe local gateway daemon — persistent control plane for agent integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"ws": "^8.18.0",
|
|
25
25
|
"@alfe.ai/ai-proxy-local": "^0.0.7",
|
|
26
26
|
"@alfe.ai/config": "^0.0.7",
|
|
27
|
-
"@alfe.ai/integration-manifest": "^0.0.
|
|
28
|
-
"@alfe.ai/integrations": "^0.0.
|
|
27
|
+
"@alfe.ai/integration-manifest": "^0.0.10",
|
|
28
|
+
"@alfe.ai/integrations": "^0.0.28"
|
|
29
29
|
},
|
|
30
30
|
"license": "UNLICENSED",
|
|
31
31
|
"scripts": {
|