@botpress/runtime 1.12.4 → 1.13.1
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/define-config.d.ts +39 -39
- package/dist/definition.js +362 -155
- package/dist/definition.js.map +4 -4
- package/dist/internal.js +350 -143
- package/dist/internal.js.map +4 -4
- package/dist/library.js +350 -143
- package/dist/library.js.map +4 -4
- package/dist/primitives/conversation-instance.d.ts +7 -1
- package/dist/primitives/conversation-instance.d.ts.map +1 -1
- package/dist/primitives/data-sources/source-base.d.ts +51 -51
- package/dist/primitives/data-sources/source-directory.d.ts +24 -24
- package/dist/primitives/data-sources/source-directory.d.ts.map +1 -1
- package/dist/primitives/data-sources/source-table.d.ts +25 -25
- package/dist/primitives/data-sources/source-website.d.ts +32 -32
- package/dist/primitives/index.d.ts +24 -24
- package/dist/primitives/workflow-instance.d.ts +4 -4
- package/dist/primitives/workflow.d.ts +3 -3
- package/dist/runtime/actions/computed-columns.d.ts +10 -10
- package/dist/runtime/actions/index.d.ts +10 -10
- package/dist/runtime/chat/components.d.ts +72 -101
- package/dist/runtime/chat/components.d.ts.map +1 -1
- package/dist/runtime/chat/transcript.d.ts +10 -10
- package/dist/runtime/events.d.ts +21 -21
- package/dist/runtime/handlers/conversation.d.ts.map +1 -1
- package/dist/runtime/handlers/event.d.ts.map +1 -1
- package/dist/runtime/tracked-state-schema.d.ts +7 -7
- package/dist/runtime/workflows/knowledge-indexing.d.ts +22 -22
- package/dist/runtime.js +370 -145
- package/dist/runtime.js.map +4 -4
- package/package.json +18 -18
package/dist/internal.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.13.1", adk: "1.13.1", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.5", cognitive: "0.3.3" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -2242,11 +2242,15 @@ var require_attributes = __commonJS({
|
|
|
2242
2242
|
if (typeof attributes !== "object" || attributes == null) {
|
|
2243
2243
|
return out;
|
|
2244
2244
|
}
|
|
2245
|
-
for (const
|
|
2245
|
+
for (const key in attributes) {
|
|
2246
|
+
if (!Object.prototype.hasOwnProperty.call(attributes, key)) {
|
|
2247
|
+
continue;
|
|
2248
|
+
}
|
|
2246
2249
|
if (!isAttributeKey(key)) {
|
|
2247
2250
|
api_1.diag.warn(`Invalid attribute key: ${key}`);
|
|
2248
2251
|
continue;
|
|
2249
2252
|
}
|
|
2253
|
+
const val = attributes[key];
|
|
2250
2254
|
if (!isAttributeValue(val)) {
|
|
2251
2255
|
api_1.diag.warn(`Invalid attribute value set for key: ${key}`);
|
|
2252
2256
|
continue;
|
|
@@ -2261,7 +2265,7 @@ var require_attributes = __commonJS({
|
|
|
2261
2265
|
}
|
|
2262
2266
|
exports2.sanitizeAttributes = sanitizeAttributes;
|
|
2263
2267
|
function isAttributeKey(key) {
|
|
2264
|
-
return typeof key === "string" && key
|
|
2268
|
+
return typeof key === "string" && key !== "";
|
|
2265
2269
|
}
|
|
2266
2270
|
exports2.isAttributeKey = isAttributeKey;
|
|
2267
2271
|
function isAttributeValue(val) {
|
|
@@ -2271,7 +2275,7 @@ var require_attributes = __commonJS({
|
|
|
2271
2275
|
if (Array.isArray(val)) {
|
|
2272
2276
|
return isHomogeneousAttributeValueArray(val);
|
|
2273
2277
|
}
|
|
2274
|
-
return
|
|
2278
|
+
return isValidPrimitiveAttributeValueType(typeof val);
|
|
2275
2279
|
}
|
|
2276
2280
|
exports2.isAttributeValue = isAttributeValue;
|
|
2277
2281
|
function isHomogeneousAttributeValueArray(arr) {
|
|
@@ -2279,22 +2283,23 @@ var require_attributes = __commonJS({
|
|
|
2279
2283
|
for (const element of arr) {
|
|
2280
2284
|
if (element == null)
|
|
2281
2285
|
continue;
|
|
2286
|
+
const elementType = typeof element;
|
|
2287
|
+
if (elementType === type) {
|
|
2288
|
+
continue;
|
|
2289
|
+
}
|
|
2282
2290
|
if (!type) {
|
|
2283
|
-
if (
|
|
2284
|
-
type =
|
|
2291
|
+
if (isValidPrimitiveAttributeValueType(elementType)) {
|
|
2292
|
+
type = elementType;
|
|
2285
2293
|
continue;
|
|
2286
2294
|
}
|
|
2287
2295
|
return false;
|
|
2288
2296
|
}
|
|
2289
|
-
if (typeof element === type) {
|
|
2290
|
-
continue;
|
|
2291
|
-
}
|
|
2292
2297
|
return false;
|
|
2293
2298
|
}
|
|
2294
2299
|
return true;
|
|
2295
2300
|
}
|
|
2296
|
-
function
|
|
2297
|
-
switch (
|
|
2301
|
+
function isValidPrimitiveAttributeValueType(valType) {
|
|
2302
|
+
switch (valType) {
|
|
2298
2303
|
case "number":
|
|
2299
2304
|
case "boolean":
|
|
2300
2305
|
case "string":
|
|
@@ -2456,7 +2461,7 @@ var require_version = __commonJS({
|
|
|
2456
2461
|
init_define_PACKAGE_VERSIONS();
|
|
2457
2462
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2458
2463
|
exports2.VERSION = void 0;
|
|
2459
|
-
exports2.VERSION = "2.
|
|
2464
|
+
exports2.VERSION = "2.2.0";
|
|
2460
2465
|
}
|
|
2461
2466
|
});
|
|
2462
2467
|
|
|
@@ -4594,21 +4599,6 @@ var require_sdk_info = __commonJS({
|
|
|
4594
4599
|
}
|
|
4595
4600
|
});
|
|
4596
4601
|
|
|
4597
|
-
// ../../node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js
|
|
4598
|
-
var require_timer_util = __commonJS({
|
|
4599
|
-
"../../node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js"(exports2) {
|
|
4600
|
-
"use strict";
|
|
4601
|
-
init_define_BUILD();
|
|
4602
|
-
init_define_PACKAGE_VERSIONS();
|
|
4603
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4604
|
-
exports2.unrefTimer = void 0;
|
|
4605
|
-
function unrefTimer(timer) {
|
|
4606
|
-
timer.unref();
|
|
4607
|
-
}
|
|
4608
|
-
exports2.unrefTimer = unrefTimer;
|
|
4609
|
-
}
|
|
4610
|
-
});
|
|
4611
|
-
|
|
4612
4602
|
// ../../node_modules/@opentelemetry/core/build/src/platform/node/index.js
|
|
4613
4603
|
var require_node = __commonJS({
|
|
4614
4604
|
"../../node_modules/@opentelemetry/core/build/src/platform/node/index.js"(exports2) {
|
|
@@ -4616,7 +4606,7 @@ var require_node = __commonJS({
|
|
|
4616
4606
|
init_define_BUILD();
|
|
4617
4607
|
init_define_PACKAGE_VERSIONS();
|
|
4618
4608
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4619
|
-
exports2.
|
|
4609
|
+
exports2.SDK_INFO = exports2.otperformance = exports2._globalThis = exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getBooleanFromEnv = exports2.getStringFromEnv = void 0;
|
|
4620
4610
|
var environment_1 = require_environment();
|
|
4621
4611
|
Object.defineProperty(exports2, "getStringFromEnv", { enumerable: true, get: function() {
|
|
4622
4612
|
return environment_1.getStringFromEnv;
|
|
@@ -4642,10 +4632,6 @@ var require_node = __commonJS({
|
|
|
4642
4632
|
Object.defineProperty(exports2, "SDK_INFO", { enumerable: true, get: function() {
|
|
4643
4633
|
return sdk_info_1.SDK_INFO;
|
|
4644
4634
|
} });
|
|
4645
|
-
var timer_util_1 = require_timer_util();
|
|
4646
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
4647
|
-
return timer_util_1.unrefTimer;
|
|
4648
|
-
} });
|
|
4649
4635
|
}
|
|
4650
4636
|
});
|
|
4651
4637
|
|
|
@@ -4656,7 +4642,7 @@ var require_platform = __commonJS({
|
|
|
4656
4642
|
init_define_BUILD();
|
|
4657
4643
|
init_define_PACKAGE_VERSIONS();
|
|
4658
4644
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4659
|
-
exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getStringFromEnv = exports2.getBooleanFromEnv = exports2.
|
|
4645
|
+
exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getStringFromEnv = exports2.getBooleanFromEnv = exports2.otperformance = exports2._globalThis = exports2.SDK_INFO = void 0;
|
|
4660
4646
|
var node_1 = require_node();
|
|
4661
4647
|
Object.defineProperty(exports2, "SDK_INFO", { enumerable: true, get: function() {
|
|
4662
4648
|
return node_1.SDK_INFO;
|
|
@@ -4667,9 +4653,6 @@ var require_platform = __commonJS({
|
|
|
4667
4653
|
Object.defineProperty(exports2, "otperformance", { enumerable: true, get: function() {
|
|
4668
4654
|
return node_1.otperformance;
|
|
4669
4655
|
} });
|
|
4670
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
4671
|
-
return node_1.unrefTimer;
|
|
4672
|
-
} });
|
|
4673
4656
|
Object.defineProperty(exports2, "getBooleanFromEnv", { enumerable: true, get: function() {
|
|
4674
4657
|
return node_1.getBooleanFromEnv;
|
|
4675
4658
|
} });
|
|
@@ -4786,6 +4769,23 @@ var require_time = __commonJS({
|
|
|
4786
4769
|
}
|
|
4787
4770
|
});
|
|
4788
4771
|
|
|
4772
|
+
// ../../node_modules/@opentelemetry/core/build/src/common/timer-util.js
|
|
4773
|
+
var require_timer_util = __commonJS({
|
|
4774
|
+
"../../node_modules/@opentelemetry/core/build/src/common/timer-util.js"(exports2) {
|
|
4775
|
+
"use strict";
|
|
4776
|
+
init_define_BUILD();
|
|
4777
|
+
init_define_PACKAGE_VERSIONS();
|
|
4778
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4779
|
+
exports2.unrefTimer = void 0;
|
|
4780
|
+
function unrefTimer(timer) {
|
|
4781
|
+
if (typeof timer !== "number") {
|
|
4782
|
+
timer.unref();
|
|
4783
|
+
}
|
|
4784
|
+
}
|
|
4785
|
+
exports2.unrefTimer = unrefTimer;
|
|
4786
|
+
}
|
|
4787
|
+
});
|
|
4788
|
+
|
|
4789
4789
|
// ../../node_modules/@opentelemetry/core/build/src/ExportResult.js
|
|
4790
4790
|
var require_ExportResult = __commonJS({
|
|
4791
4791
|
"../../node_modules/@opentelemetry/core/build/src/ExportResult.js"(exports2) {
|
|
@@ -5446,7 +5446,7 @@ var require_src = __commonJS({
|
|
|
5446
5446
|
init_define_BUILD();
|
|
5447
5447
|
init_define_PACKAGE_VERSIONS();
|
|
5448
5448
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5449
|
-
exports2.internal = exports2.diagLogLevelFromString = exports2.BindOnceFuture = exports2.urlMatches = exports2.isUrlIgnored = exports2.callWithTimeout = exports2.TimeoutError = exports2.merge = exports2.TraceState = exports2.unsuppressTracing = exports2.suppressTracing = exports2.isTracingSuppressed = exports2.setRPCMetadata = exports2.getRPCMetadata = exports2.deleteRPCMetadata = exports2.RPCType = exports2.parseTraceParent = exports2.W3CTraceContextPropagator = exports2.TRACE_STATE_HEADER = exports2.TRACE_PARENT_HEADER = exports2.CompositePropagator = exports2.
|
|
5449
|
+
exports2.internal = exports2.diagLogLevelFromString = exports2.BindOnceFuture = exports2.urlMatches = exports2.isUrlIgnored = exports2.callWithTimeout = exports2.TimeoutError = exports2.merge = exports2.TraceState = exports2.unsuppressTracing = exports2.suppressTracing = exports2.isTracingSuppressed = exports2.setRPCMetadata = exports2.getRPCMetadata = exports2.deleteRPCMetadata = exports2.RPCType = exports2.parseTraceParent = exports2.W3CTraceContextPropagator = exports2.TRACE_STATE_HEADER = exports2.TRACE_PARENT_HEADER = exports2.CompositePropagator = exports2.otperformance = exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getBooleanFromEnv = exports2.getStringFromEnv = exports2._globalThis = exports2.SDK_INFO = exports2.parseKeyPairsIntoRecord = exports2.ExportResultCode = exports2.unrefTimer = exports2.timeInputToHrTime = exports2.millisToHrTime = exports2.isTimeInputHrTime = exports2.isTimeInput = exports2.hrTimeToTimeStamp = exports2.hrTimeToNanoseconds = exports2.hrTimeToMilliseconds = exports2.hrTimeToMicroseconds = exports2.hrTimeDuration = exports2.hrTime = exports2.getTimeOrigin = exports2.addHrTimes = exports2.loggingErrorHandler = exports2.setGlobalErrorHandler = exports2.globalErrorHandler = exports2.sanitizeAttributes = exports2.isAttributeValue = exports2.AnchoredClock = exports2.W3CBaggagePropagator = void 0;
|
|
5450
5450
|
var W3CBaggagePropagator_1 = require_W3CBaggagePropagator();
|
|
5451
5451
|
Object.defineProperty(exports2, "W3CBaggagePropagator", { enumerable: true, get: function() {
|
|
5452
5452
|
return W3CBaggagePropagator_1.W3CBaggagePropagator;
|
|
@@ -5510,6 +5510,10 @@ var require_src = __commonJS({
|
|
|
5510
5510
|
Object.defineProperty(exports2, "timeInputToHrTime", { enumerable: true, get: function() {
|
|
5511
5511
|
return time_1.timeInputToHrTime;
|
|
5512
5512
|
} });
|
|
5513
|
+
var timer_util_1 = require_timer_util();
|
|
5514
|
+
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
5515
|
+
return timer_util_1.unrefTimer;
|
|
5516
|
+
} });
|
|
5513
5517
|
var ExportResult_1 = require_ExportResult();
|
|
5514
5518
|
Object.defineProperty(exports2, "ExportResultCode", { enumerable: true, get: function() {
|
|
5515
5519
|
return ExportResult_1.ExportResultCode;
|
|
@@ -5540,9 +5544,6 @@ var require_src = __commonJS({
|
|
|
5540
5544
|
Object.defineProperty(exports2, "otperformance", { enumerable: true, get: function() {
|
|
5541
5545
|
return platform_1.otperformance;
|
|
5542
5546
|
} });
|
|
5543
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
5544
|
-
return platform_1.unrefTimer;
|
|
5545
|
-
} });
|
|
5546
5547
|
var composite_1 = require_composite();
|
|
5547
5548
|
Object.defineProperty(exports2, "CompositePropagator", { enumerable: true, get: function() {
|
|
5548
5549
|
return composite_1.CompositePropagator;
|
|
@@ -7236,7 +7237,9 @@ var require_BatchSpanProcessorBase = __commonJS({
|
|
|
7236
7237
|
if (this._timer !== void 0)
|
|
7237
7238
|
return;
|
|
7238
7239
|
this._timer = setTimeout(() => flush(), this._scheduledDelayMillis);
|
|
7239
|
-
(
|
|
7240
|
+
if (typeof this._timer !== "number") {
|
|
7241
|
+
this._timer.unref();
|
|
7242
|
+
}
|
|
7240
7243
|
}
|
|
7241
7244
|
_clearTimer() {
|
|
7242
7245
|
if (this._timer !== void 0) {
|
|
@@ -27064,7 +27067,7 @@ var init_InterceptorManager = __esm({
|
|
|
27064
27067
|
*
|
|
27065
27068
|
* @param {Number} id The ID that was returned by `use`
|
|
27066
27069
|
*
|
|
27067
|
-
* @returns {
|
|
27070
|
+
* @returns {void}
|
|
27068
27071
|
*/
|
|
27069
27072
|
eject(id) {
|
|
27070
27073
|
if (this.handlers[id]) {
|
|
@@ -29209,7 +29212,7 @@ var init_data = __esm({
|
|
|
29209
29212
|
"../../node_modules/axios/lib/env/data.js"() {
|
|
29210
29213
|
init_define_BUILD();
|
|
29211
29214
|
init_define_PACKAGE_VERSIONS();
|
|
29212
|
-
VERSION2 = "1.
|
|
29215
|
+
VERSION2 = "1.13.2";
|
|
29213
29216
|
}
|
|
29214
29217
|
});
|
|
29215
29218
|
|
|
@@ -29747,6 +29750,7 @@ var init_estimateDataURLDecodedBytes = __esm({
|
|
|
29747
29750
|
// ../../node_modules/axios/lib/adapters/http.js
|
|
29748
29751
|
import http2 from "http";
|
|
29749
29752
|
import https2 from "https";
|
|
29753
|
+
import http22 from "http2";
|
|
29750
29754
|
import util2 from "util";
|
|
29751
29755
|
import zlib from "zlib";
|
|
29752
29756
|
import stream3 from "stream";
|
|
@@ -29792,10 +29796,9 @@ function setProxy(options, configProxy, location) {
|
|
|
29792
29796
|
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
29793
29797
|
};
|
|
29794
29798
|
}
|
|
29795
|
-
var import_proxy_from_env, import_follow_redirects, zlibOptions, brotliOptions, isBrotliSupported, httpFollow, httpsFollow, isHttps, supportedProtocols, flushOnFinish, isHttpAdapterSupported, wrapAsync, resolveFamily, buildAddressEntry, http_default;
|
|
29799
|
+
var import_proxy_from_env, import_follow_redirects, zlibOptions, brotliOptions, isBrotliSupported, httpFollow, httpsFollow, isHttps, supportedProtocols, flushOnFinish, Http2Sessions, http2Sessions, isHttpAdapterSupported, wrapAsync, resolveFamily, buildAddressEntry, http2Transport, http_default;
|
|
29796
29800
|
var init_http2 = __esm({
|
|
29797
29801
|
"../../node_modules/axios/lib/adapters/http.js"() {
|
|
29798
|
-
"use strict";
|
|
29799
29802
|
init_define_BUILD();
|
|
29800
29803
|
init_define_PACKAGE_VERSIONS();
|
|
29801
29804
|
init_utils5();
|
|
@@ -29836,6 +29839,76 @@ var init_http2 = __esm({
|
|
|
29836
29839
|
stream5.on("end", flush).on("error", flush);
|
|
29837
29840
|
return throttled;
|
|
29838
29841
|
};
|
|
29842
|
+
Http2Sessions = class {
|
|
29843
|
+
constructor() {
|
|
29844
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
29845
|
+
}
|
|
29846
|
+
getSession(authority, options) {
|
|
29847
|
+
options = Object.assign({
|
|
29848
|
+
sessionTimeout: 1e3
|
|
29849
|
+
}, options);
|
|
29850
|
+
let authoritySessions = this.sessions[authority];
|
|
29851
|
+
if (authoritySessions) {
|
|
29852
|
+
let len = authoritySessions.length;
|
|
29853
|
+
for (let i = 0; i < len; i++) {
|
|
29854
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
29855
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
29856
|
+
return sessionHandle;
|
|
29857
|
+
}
|
|
29858
|
+
}
|
|
29859
|
+
}
|
|
29860
|
+
const session = http22.connect(authority, options);
|
|
29861
|
+
let removed;
|
|
29862
|
+
const removeSession = () => {
|
|
29863
|
+
if (removed) {
|
|
29864
|
+
return;
|
|
29865
|
+
}
|
|
29866
|
+
removed = true;
|
|
29867
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
29868
|
+
while (i--) {
|
|
29869
|
+
if (entries[i][0] === session) {
|
|
29870
|
+
if (len === 1) {
|
|
29871
|
+
delete this.sessions[authority];
|
|
29872
|
+
} else {
|
|
29873
|
+
entries.splice(i, 1);
|
|
29874
|
+
}
|
|
29875
|
+
return;
|
|
29876
|
+
}
|
|
29877
|
+
}
|
|
29878
|
+
};
|
|
29879
|
+
const originalRequestFn = session.request;
|
|
29880
|
+
const { sessionTimeout } = options;
|
|
29881
|
+
if (sessionTimeout != null) {
|
|
29882
|
+
let timer;
|
|
29883
|
+
let streamsCount = 0;
|
|
29884
|
+
session.request = function() {
|
|
29885
|
+
const stream5 = originalRequestFn.apply(this, arguments);
|
|
29886
|
+
streamsCount++;
|
|
29887
|
+
if (timer) {
|
|
29888
|
+
clearTimeout(timer);
|
|
29889
|
+
timer = null;
|
|
29890
|
+
}
|
|
29891
|
+
stream5.once("close", () => {
|
|
29892
|
+
if (!--streamsCount) {
|
|
29893
|
+
timer = setTimeout(() => {
|
|
29894
|
+
timer = null;
|
|
29895
|
+
removeSession();
|
|
29896
|
+
}, sessionTimeout);
|
|
29897
|
+
}
|
|
29898
|
+
});
|
|
29899
|
+
return stream5;
|
|
29900
|
+
};
|
|
29901
|
+
}
|
|
29902
|
+
session.once("close", removeSession);
|
|
29903
|
+
let entry = [
|
|
29904
|
+
session,
|
|
29905
|
+
options
|
|
29906
|
+
];
|
|
29907
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
29908
|
+
return session;
|
|
29909
|
+
}
|
|
29910
|
+
};
|
|
29911
|
+
http2Sessions = new Http2Sessions();
|
|
29839
29912
|
isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
29840
29913
|
wrapAsync = (asyncExecutor) => {
|
|
29841
29914
|
return new Promise((resolve, reject) => {
|
|
@@ -29867,14 +29940,54 @@ var init_http2 = __esm({
|
|
|
29867
29940
|
};
|
|
29868
29941
|
};
|
|
29869
29942
|
buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
29943
|
+
http2Transport = {
|
|
29944
|
+
request(options, cb) {
|
|
29945
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
29946
|
+
const { http2Options, headers } = options;
|
|
29947
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
29948
|
+
const {
|
|
29949
|
+
HTTP2_HEADER_SCHEME,
|
|
29950
|
+
HTTP2_HEADER_METHOD,
|
|
29951
|
+
HTTP2_HEADER_PATH,
|
|
29952
|
+
HTTP2_HEADER_STATUS
|
|
29953
|
+
} = http22.constants;
|
|
29954
|
+
const http2Headers = {
|
|
29955
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
29956
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
29957
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
29958
|
+
};
|
|
29959
|
+
utils_default.forEach(headers, (header, name) => {
|
|
29960
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
29961
|
+
});
|
|
29962
|
+
const req = session.request(http2Headers);
|
|
29963
|
+
req.once("response", (responseHeaders) => {
|
|
29964
|
+
const response = req;
|
|
29965
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
29966
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
29967
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
29968
|
+
response.headers = responseHeaders;
|
|
29969
|
+
response.statusCode = +status;
|
|
29970
|
+
cb(response);
|
|
29971
|
+
});
|
|
29972
|
+
return req;
|
|
29973
|
+
}
|
|
29974
|
+
};
|
|
29870
29975
|
http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
29871
29976
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
29872
|
-
let { data, lookup, family } = config;
|
|
29977
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
29873
29978
|
const { responseType, responseEncoding } = config;
|
|
29874
29979
|
const method = config.method.toUpperCase();
|
|
29875
29980
|
let isDone;
|
|
29876
29981
|
let rejected = false;
|
|
29877
29982
|
let req;
|
|
29983
|
+
httpVersion = +httpVersion;
|
|
29984
|
+
if (Number.isNaN(httpVersion)) {
|
|
29985
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
29986
|
+
}
|
|
29987
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
29988
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
29989
|
+
}
|
|
29990
|
+
const isHttp2 = httpVersion === 2;
|
|
29878
29991
|
if (lookup) {
|
|
29879
29992
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
29880
29993
|
lookup = (hostname, opt, cb) => {
|
|
@@ -29887,7 +30000,15 @@ var init_http2 = __esm({
|
|
|
29887
30000
|
});
|
|
29888
30001
|
};
|
|
29889
30002
|
}
|
|
29890
|
-
const
|
|
30003
|
+
const abortEmitter = new EventEmitter();
|
|
30004
|
+
function abort(reason) {
|
|
30005
|
+
try {
|
|
30006
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
30007
|
+
} catch (err) {
|
|
30008
|
+
console.warn("emit error", err);
|
|
30009
|
+
}
|
|
30010
|
+
}
|
|
30011
|
+
abortEmitter.once("abort", reject);
|
|
29891
30012
|
const onFinished = () => {
|
|
29892
30013
|
if (config.cancelToken) {
|
|
29893
30014
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -29895,25 +30016,31 @@ var init_http2 = __esm({
|
|
|
29895
30016
|
if (config.signal) {
|
|
29896
30017
|
config.signal.removeEventListener("abort", abort);
|
|
29897
30018
|
}
|
|
29898
|
-
|
|
30019
|
+
abortEmitter.removeAllListeners();
|
|
29899
30020
|
};
|
|
29900
|
-
onDone((value, isRejected) => {
|
|
29901
|
-
isDone = true;
|
|
29902
|
-
if (isRejected) {
|
|
29903
|
-
rejected = true;
|
|
29904
|
-
onFinished();
|
|
29905
|
-
}
|
|
29906
|
-
});
|
|
29907
|
-
function abort(reason) {
|
|
29908
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
29909
|
-
}
|
|
29910
|
-
emitter.once("abort", reject);
|
|
29911
30021
|
if (config.cancelToken || config.signal) {
|
|
29912
30022
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
29913
30023
|
if (config.signal) {
|
|
29914
30024
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
29915
30025
|
}
|
|
29916
30026
|
}
|
|
30027
|
+
onDone((response, isRejected) => {
|
|
30028
|
+
isDone = true;
|
|
30029
|
+
if (isRejected) {
|
|
30030
|
+
rejected = true;
|
|
30031
|
+
onFinished();
|
|
30032
|
+
return;
|
|
30033
|
+
}
|
|
30034
|
+
const { data: data2 } = response;
|
|
30035
|
+
if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) {
|
|
30036
|
+
const offListeners = stream3.finished(data2, () => {
|
|
30037
|
+
offListeners();
|
|
30038
|
+
onFinished();
|
|
30039
|
+
});
|
|
30040
|
+
} else {
|
|
30041
|
+
onFinished();
|
|
30042
|
+
}
|
|
30043
|
+
});
|
|
29917
30044
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
29918
30045
|
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
29919
30046
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
@@ -30079,7 +30206,8 @@ var init_http2 = __esm({
|
|
|
30079
30206
|
protocol,
|
|
30080
30207
|
family,
|
|
30081
30208
|
beforeRedirect: dispatchBeforeRedirect,
|
|
30082
|
-
beforeRedirects: {}
|
|
30209
|
+
beforeRedirects: {},
|
|
30210
|
+
http2Options
|
|
30083
30211
|
};
|
|
30084
30212
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
30085
30213
|
if (config.socketPath) {
|
|
@@ -30092,18 +30220,22 @@ var init_http2 = __esm({
|
|
|
30092
30220
|
let transport;
|
|
30093
30221
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
30094
30222
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
30095
|
-
if (
|
|
30096
|
-
transport =
|
|
30097
|
-
} else if (config.maxRedirects === 0) {
|
|
30098
|
-
transport = isHttpsRequest ? https2 : http2;
|
|
30223
|
+
if (isHttp2) {
|
|
30224
|
+
transport = http2Transport;
|
|
30099
30225
|
} else {
|
|
30100
|
-
if (config.
|
|
30101
|
-
|
|
30102
|
-
}
|
|
30103
|
-
|
|
30104
|
-
|
|
30226
|
+
if (config.transport) {
|
|
30227
|
+
transport = config.transport;
|
|
30228
|
+
} else if (config.maxRedirects === 0) {
|
|
30229
|
+
transport = isHttpsRequest ? https2 : http2;
|
|
30230
|
+
} else {
|
|
30231
|
+
if (config.maxRedirects) {
|
|
30232
|
+
options.maxRedirects = config.maxRedirects;
|
|
30233
|
+
}
|
|
30234
|
+
if (config.beforeRedirect) {
|
|
30235
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
30236
|
+
}
|
|
30237
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
30105
30238
|
}
|
|
30106
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
30107
30239
|
}
|
|
30108
30240
|
if (config.maxBodyLength > -1) {
|
|
30109
30241
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -30116,7 +30248,7 @@ var init_http2 = __esm({
|
|
|
30116
30248
|
req = transport.request(options, function handleResponse(res) {
|
|
30117
30249
|
if (req.destroyed) return;
|
|
30118
30250
|
const streams2 = [res];
|
|
30119
|
-
const responseLength =
|
|
30251
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
30120
30252
|
if (onDownloadProgress || maxDownloadRate) {
|
|
30121
30253
|
const transformStream = new AxiosTransformStream_default({
|
|
30122
30254
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
@@ -30158,10 +30290,6 @@ var init_http2 = __esm({
|
|
|
30158
30290
|
}
|
|
30159
30291
|
}
|
|
30160
30292
|
responseStream = streams2.length > 1 ? stream3.pipeline(streams2, utils_default.noop) : streams2[0];
|
|
30161
|
-
const offListeners = stream3.finished(responseStream, () => {
|
|
30162
|
-
offListeners();
|
|
30163
|
-
onFinished();
|
|
30164
|
-
});
|
|
30165
30293
|
const response = {
|
|
30166
30294
|
status: res.statusCode,
|
|
30167
30295
|
statusText: res.statusMessage,
|
|
@@ -30181,7 +30309,7 @@ var init_http2 = __esm({
|
|
|
30181
30309
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
30182
30310
|
rejected = true;
|
|
30183
30311
|
responseStream.destroy();
|
|
30184
|
-
|
|
30312
|
+
abort(new AxiosError_default(
|
|
30185
30313
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
30186
30314
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
30187
30315
|
config,
|
|
@@ -30222,16 +30350,19 @@ var init_http2 = __esm({
|
|
|
30222
30350
|
settle(resolve, reject, response);
|
|
30223
30351
|
});
|
|
30224
30352
|
}
|
|
30225
|
-
|
|
30353
|
+
abortEmitter.once("abort", (err) => {
|
|
30226
30354
|
if (!responseStream.destroyed) {
|
|
30227
30355
|
responseStream.emit("error", err);
|
|
30228
30356
|
responseStream.destroy();
|
|
30229
30357
|
}
|
|
30230
30358
|
});
|
|
30231
30359
|
});
|
|
30232
|
-
|
|
30233
|
-
|
|
30234
|
-
|
|
30360
|
+
abortEmitter.once("abort", (err) => {
|
|
30361
|
+
if (req.close) {
|
|
30362
|
+
req.close();
|
|
30363
|
+
} else {
|
|
30364
|
+
req.destroy(err);
|
|
30365
|
+
}
|
|
30235
30366
|
});
|
|
30236
30367
|
req.on("error", function handleRequestError(err) {
|
|
30237
30368
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -30242,7 +30373,7 @@ var init_http2 = __esm({
|
|
|
30242
30373
|
if (config.timeout) {
|
|
30243
30374
|
const timeout = parseInt(config.timeout, 10);
|
|
30244
30375
|
if (Number.isNaN(timeout)) {
|
|
30245
|
-
|
|
30376
|
+
abort(new AxiosError_default(
|
|
30246
30377
|
"error trying to parse `config.timeout` to int",
|
|
30247
30378
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
30248
30379
|
config,
|
|
@@ -30257,14 +30388,15 @@ var init_http2 = __esm({
|
|
|
30257
30388
|
if (config.timeoutErrorMessage) {
|
|
30258
30389
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
30259
30390
|
}
|
|
30260
|
-
|
|
30391
|
+
abort(new AxiosError_default(
|
|
30261
30392
|
timeoutErrorMessage,
|
|
30262
30393
|
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
30263
30394
|
config,
|
|
30264
30395
|
req
|
|
30265
30396
|
));
|
|
30266
|
-
abort();
|
|
30267
30397
|
});
|
|
30398
|
+
} else {
|
|
30399
|
+
req.setTimeout(0);
|
|
30268
30400
|
}
|
|
30269
30401
|
if (utils_default.isStream(data)) {
|
|
30270
30402
|
let ended = false;
|
|
@@ -30283,7 +30415,8 @@ var init_http2 = __esm({
|
|
|
30283
30415
|
});
|
|
30284
30416
|
data.pipe(req);
|
|
30285
30417
|
} else {
|
|
30286
|
-
req.
|
|
30418
|
+
data && req.write(data);
|
|
30419
|
+
req.end();
|
|
30287
30420
|
}
|
|
30288
30421
|
});
|
|
30289
30422
|
};
|
|
@@ -30318,20 +30451,33 @@ var init_cookies = __esm({
|
|
|
30318
30451
|
cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
30319
30452
|
// Standard browser envs support document.cookie
|
|
30320
30453
|
{
|
|
30321
|
-
write(name, value, expires, path5, domain, secure) {
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
utils_default.
|
|
30325
|
-
|
|
30326
|
-
|
|
30454
|
+
write(name, value, expires, path5, domain, secure, sameSite) {
|
|
30455
|
+
if (typeof document === "undefined") return;
|
|
30456
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
30457
|
+
if (utils_default.isNumber(expires)) {
|
|
30458
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
30459
|
+
}
|
|
30460
|
+
if (utils_default.isString(path5)) {
|
|
30461
|
+
cookie.push(`path=${path5}`);
|
|
30462
|
+
}
|
|
30463
|
+
if (utils_default.isString(domain)) {
|
|
30464
|
+
cookie.push(`domain=${domain}`);
|
|
30465
|
+
}
|
|
30466
|
+
if (secure === true) {
|
|
30467
|
+
cookie.push("secure");
|
|
30468
|
+
}
|
|
30469
|
+
if (utils_default.isString(sameSite)) {
|
|
30470
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
30471
|
+
}
|
|
30327
30472
|
document.cookie = cookie.join("; ");
|
|
30328
30473
|
},
|
|
30329
30474
|
read(name) {
|
|
30330
|
-
|
|
30331
|
-
|
|
30475
|
+
if (typeof document === "undefined") return null;
|
|
30476
|
+
const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
30477
|
+
return match2 ? decodeURIComponent(match2[1]) : null;
|
|
30332
30478
|
},
|
|
30333
30479
|
remove(name) {
|
|
30334
|
-
this.write(name, "", Date.now() - 864e5);
|
|
30480
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
30335
30481
|
}
|
|
30336
30482
|
}
|
|
30337
30483
|
) : (
|
|
@@ -30973,7 +31119,7 @@ var init_fetch = __esm({
|
|
|
30973
31119
|
};
|
|
30974
31120
|
seedCache = /* @__PURE__ */ new Map();
|
|
30975
31121
|
getFetch = (config) => {
|
|
30976
|
-
let env2 = config
|
|
31122
|
+
let env2 = config && config.env || {};
|
|
30977
31123
|
const { fetch: fetch2, Request, Response } = env2;
|
|
30978
31124
|
const seeds = [
|
|
30979
31125
|
Request,
|
|
@@ -30994,6 +31140,39 @@ var init_fetch = __esm({
|
|
|
30994
31140
|
});
|
|
30995
31141
|
|
|
30996
31142
|
// ../../node_modules/axios/lib/adapters/adapters.js
|
|
31143
|
+
function getAdapter(adapters, config) {
|
|
31144
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
31145
|
+
const { length } = adapters;
|
|
31146
|
+
let nameOrAdapter;
|
|
31147
|
+
let adapter2;
|
|
31148
|
+
const rejectedReasons = {};
|
|
31149
|
+
for (let i = 0; i < length; i++) {
|
|
31150
|
+
nameOrAdapter = adapters[i];
|
|
31151
|
+
let id;
|
|
31152
|
+
adapter2 = nameOrAdapter;
|
|
31153
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
31154
|
+
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
31155
|
+
if (adapter2 === void 0) {
|
|
31156
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
31157
|
+
}
|
|
31158
|
+
}
|
|
31159
|
+
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
31160
|
+
break;
|
|
31161
|
+
}
|
|
31162
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
31163
|
+
}
|
|
31164
|
+
if (!adapter2) {
|
|
31165
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
31166
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
31167
|
+
);
|
|
31168
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
31169
|
+
throw new AxiosError_default(
|
|
31170
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
31171
|
+
"ERR_NOT_SUPPORT"
|
|
31172
|
+
);
|
|
31173
|
+
}
|
|
31174
|
+
return adapter2;
|
|
31175
|
+
}
|
|
30997
31176
|
var knownAdapters, renderReason, isResolvedHandle, adapters_default;
|
|
30998
31177
|
var init_adapters = __esm({
|
|
30999
31178
|
"../../node_modules/axios/lib/adapters/adapters.js"() {
|
|
@@ -31023,39 +31202,15 @@ var init_adapters = __esm({
|
|
|
31023
31202
|
renderReason = (reason) => `- ${reason}`;
|
|
31024
31203
|
isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
31025
31204
|
adapters_default = {
|
|
31026
|
-
|
|
31027
|
-
|
|
31028
|
-
|
|
31029
|
-
|
|
31030
|
-
|
|
31031
|
-
|
|
31032
|
-
|
|
31033
|
-
|
|
31034
|
-
|
|
31035
|
-
adapter2 = nameOrAdapter;
|
|
31036
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
31037
|
-
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
31038
|
-
if (adapter2 === void 0) {
|
|
31039
|
-
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
31040
|
-
}
|
|
31041
|
-
}
|
|
31042
|
-
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
31043
|
-
break;
|
|
31044
|
-
}
|
|
31045
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
31046
|
-
}
|
|
31047
|
-
if (!adapter2) {
|
|
31048
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
31049
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
31050
|
-
);
|
|
31051
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
31052
|
-
throw new AxiosError_default(
|
|
31053
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
31054
|
-
"ERR_NOT_SUPPORT"
|
|
31055
|
-
);
|
|
31056
|
-
}
|
|
31057
|
-
return adapter2;
|
|
31058
|
-
},
|
|
31205
|
+
/**
|
|
31206
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
31207
|
+
* @type {Function}
|
|
31208
|
+
*/
|
|
31209
|
+
getAdapter,
|
|
31210
|
+
/**
|
|
31211
|
+
* Exposes all known adapters
|
|
31212
|
+
* @type {Object<string, Function|Object>}
|
|
31213
|
+
*/
|
|
31059
31214
|
adapters: knownAdapters
|
|
31060
31215
|
};
|
|
31061
31216
|
}
|
|
@@ -31584,7 +31739,13 @@ var init_HttpStatusCode = __esm({
|
|
|
31584
31739
|
InsufficientStorage: 507,
|
|
31585
31740
|
LoopDetected: 508,
|
|
31586
31741
|
NotExtended: 510,
|
|
31587
|
-
NetworkAuthenticationRequired: 511
|
|
31742
|
+
NetworkAuthenticationRequired: 511,
|
|
31743
|
+
WebServerIsDown: 521,
|
|
31744
|
+
ConnectionTimedOut: 522,
|
|
31745
|
+
OriginIsUnreachable: 523,
|
|
31746
|
+
TimeoutOccurred: 524,
|
|
31747
|
+
SslHandshakeFailed: 525,
|
|
31748
|
+
InvalidSslCertificate: 526
|
|
31588
31749
|
};
|
|
31589
31750
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
31590
31751
|
HttpStatusCode[value] = key;
|
|
@@ -31652,7 +31813,7 @@ var init_axios = __esm({
|
|
|
31652
31813
|
});
|
|
31653
31814
|
|
|
31654
31815
|
// ../../node_modules/axios/index.js
|
|
31655
|
-
var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON,
|
|
31816
|
+
var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter2, mergeConfig2;
|
|
31656
31817
|
var init_axios2 = __esm({
|
|
31657
31818
|
"../../node_modules/axios/index.js"() {
|
|
31658
31819
|
init_define_BUILD();
|
|
@@ -31673,7 +31834,7 @@ var init_axios2 = __esm({
|
|
|
31673
31834
|
AxiosHeaders: AxiosHeaders2,
|
|
31674
31835
|
HttpStatusCode: HttpStatusCode2,
|
|
31675
31836
|
formToJSON,
|
|
31676
|
-
getAdapter,
|
|
31837
|
+
getAdapter: getAdapter2,
|
|
31677
31838
|
mergeConfig: mergeConfig2
|
|
31678
31839
|
} = axios_default);
|
|
31679
31840
|
}
|
|
@@ -36575,6 +36736,17 @@ function createDedent(options) {
|
|
|
36575
36736
|
if (escapeSpecialCharacters) {
|
|
36576
36737
|
result = result.replace(/\\n/g, "\n");
|
|
36577
36738
|
}
|
|
36739
|
+
if (typeof Bun !== "undefined") {
|
|
36740
|
+
result = result.replace(
|
|
36741
|
+
// Matches e.g. \\u{1f60a} or \\u5F1F
|
|
36742
|
+
/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,
|
|
36743
|
+
(_2, braced, unbraced) => {
|
|
36744
|
+
var _ref;
|
|
36745
|
+
const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : "";
|
|
36746
|
+
return String.fromCodePoint(parseInt(hex, 16));
|
|
36747
|
+
}
|
|
36748
|
+
);
|
|
36749
|
+
}
|
|
36578
36750
|
return result;
|
|
36579
36751
|
}
|
|
36580
36752
|
}
|
|
@@ -36982,10 +37154,16 @@ var init_conversation_instance = __esm({
|
|
|
36982
37154
|
init_define_BUILD();
|
|
36983
37155
|
init_define_PACKAGE_VERSIONS();
|
|
36984
37156
|
init_runtime2();
|
|
36985
|
-
BaseConversationInstance = class {
|
|
37157
|
+
BaseConversationInstance = class _BaseConversationInstance {
|
|
36986
37158
|
id;
|
|
36987
37159
|
channel;
|
|
36988
37160
|
integration;
|
|
37161
|
+
/**
|
|
37162
|
+
* The integration alias (e.g., "telegram1", "telegram2").
|
|
37163
|
+
* This is useful when you have multiple instances of the same integration
|
|
37164
|
+
* with different configurations (multi-integration setup).
|
|
37165
|
+
*/
|
|
37166
|
+
alias;
|
|
36989
37167
|
conversation;
|
|
36990
37168
|
// @internal
|
|
36991
37169
|
client;
|
|
@@ -36993,10 +37171,25 @@ var init_conversation_instance = __esm({
|
|
|
36993
37171
|
TrackedState;
|
|
36994
37172
|
// @internal
|
|
36995
37173
|
TrackedTags;
|
|
36996
|
-
|
|
37174
|
+
/**
|
|
37175
|
+
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
37176
|
+
* @internal
|
|
37177
|
+
*/
|
|
37178
|
+
static extractAliasFromTags(tags) {
|
|
37179
|
+
if (!tags) return void 0;
|
|
37180
|
+
for (const tagKey of Object.keys(tags)) {
|
|
37181
|
+
const colonIndex = tagKey.indexOf(":");
|
|
37182
|
+
if (colonIndex > 0) {
|
|
37183
|
+
return tagKey.substring(0, colonIndex);
|
|
37184
|
+
}
|
|
37185
|
+
}
|
|
37186
|
+
return void 0;
|
|
37187
|
+
}
|
|
37188
|
+
constructor(conversation, client2, alias) {
|
|
36997
37189
|
this.id = conversation.id;
|
|
36998
|
-
this.channel = `${conversation.integration}.${conversation.channel}`;
|
|
36999
37190
|
this.integration = conversation.integration;
|
|
37191
|
+
this.alias = alias ?? _BaseConversationInstance.extractAliasFromTags(conversation.tags) ?? conversation.integration;
|
|
37192
|
+
this.channel = `${this.alias}.${conversation.channel}`;
|
|
37000
37193
|
this.conversation = conversation;
|
|
37001
37194
|
this.client = client2;
|
|
37002
37195
|
const states = context.get("states", { optional: true });
|
|
@@ -41366,8 +41559,11 @@ var init_unescape = __esm({
|
|
|
41366
41559
|
"../../node_modules/minimatch/dist/esm/unescape.js"() {
|
|
41367
41560
|
init_define_BUILD();
|
|
41368
41561
|
init_define_PACKAGE_VERSIONS();
|
|
41369
|
-
unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
41370
|
-
|
|
41562
|
+
unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
41563
|
+
if (magicalBraces) {
|
|
41564
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
41565
|
+
}
|
|
41566
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
41371
41567
|
};
|
|
41372
41568
|
}
|
|
41373
41569
|
});
|
|
@@ -41730,7 +41926,7 @@ var init_ast = __esm({
|
|
|
41730
41926
|
if (this.#root === this)
|
|
41731
41927
|
this.#fillNegs();
|
|
41732
41928
|
if (!this.type) {
|
|
41733
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
41929
|
+
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
41734
41930
|
const src = this.#parts.map((p) => {
|
|
41735
41931
|
const [re2, _2, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
41736
41932
|
this.#hasMagic = this.#hasMagic || hasMagic2;
|
|
@@ -41840,10 +42036,7 @@ var init_ast = __esm({
|
|
|
41840
42036
|
}
|
|
41841
42037
|
}
|
|
41842
42038
|
if (c === "*") {
|
|
41843
|
-
|
|
41844
|
-
re2 += starNoEmpty;
|
|
41845
|
-
else
|
|
41846
|
-
re2 += star;
|
|
42039
|
+
re2 += noEmpty && glob2 === "*" ? starNoEmpty : star;
|
|
41847
42040
|
hasMagic2 = true;
|
|
41848
42041
|
continue;
|
|
41849
42042
|
}
|
|
@@ -41866,7 +42059,10 @@ var init_escape = __esm({
|
|
|
41866
42059
|
"../../node_modules/minimatch/dist/esm/escape.js"() {
|
|
41867
42060
|
init_define_BUILD();
|
|
41868
42061
|
init_define_PACKAGE_VERSIONS();
|
|
41869
|
-
escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
42062
|
+
escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
42063
|
+
if (magicalBraces) {
|
|
42064
|
+
return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
42065
|
+
}
|
|
41870
42066
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
41871
42067
|
};
|
|
41872
42068
|
}
|
|
@@ -42522,16 +42718,27 @@ var init_esm5 = __esm({
|
|
|
42522
42718
|
pp[i] = twoStar;
|
|
42523
42719
|
}
|
|
42524
42720
|
} else if (next === void 0) {
|
|
42525
|
-
pp[i - 1] = prev + "(
|
|
42721
|
+
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
42526
42722
|
} else if (next !== GLOBSTAR) {
|
|
42527
42723
|
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
42528
42724
|
pp[i + 1] = GLOBSTAR;
|
|
42529
42725
|
}
|
|
42530
42726
|
});
|
|
42531
|
-
|
|
42727
|
+
const filtered = pp.filter((p) => p !== GLOBSTAR);
|
|
42728
|
+
if (this.partial && filtered.length >= 1) {
|
|
42729
|
+
const prefixes = [];
|
|
42730
|
+
for (let i = 1; i <= filtered.length; i++) {
|
|
42731
|
+
prefixes.push(filtered.slice(0, i).join("/"));
|
|
42732
|
+
}
|
|
42733
|
+
return "(?:" + prefixes.join("|") + ")";
|
|
42734
|
+
}
|
|
42735
|
+
return filtered.join("/");
|
|
42532
42736
|
}).join("|");
|
|
42533
42737
|
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
42534
42738
|
re2 = "^" + open + re2 + close + "$";
|
|
42739
|
+
if (this.partial) {
|
|
42740
|
+
re2 = "^(?:\\/|" + open + re2.slice(1, -1) + close + ")$";
|
|
42741
|
+
}
|
|
42535
42742
|
if (this.negate)
|
|
42536
42743
|
re2 = "^(?!" + re2 + ").+$";
|
|
42537
42744
|
try {
|