@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/runtime.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
|
|
|
@@ -2148,11 +2148,15 @@ var require_attributes = __commonJS({
|
|
|
2148
2148
|
if (typeof attributes !== "object" || attributes == null) {
|
|
2149
2149
|
return out;
|
|
2150
2150
|
}
|
|
2151
|
-
for (const
|
|
2151
|
+
for (const key in attributes) {
|
|
2152
|
+
if (!Object.prototype.hasOwnProperty.call(attributes, key)) {
|
|
2153
|
+
continue;
|
|
2154
|
+
}
|
|
2152
2155
|
if (!isAttributeKey(key)) {
|
|
2153
2156
|
api_1.diag.warn(`Invalid attribute key: ${key}`);
|
|
2154
2157
|
continue;
|
|
2155
2158
|
}
|
|
2159
|
+
const val = attributes[key];
|
|
2156
2160
|
if (!isAttributeValue(val)) {
|
|
2157
2161
|
api_1.diag.warn(`Invalid attribute value set for key: ${key}`);
|
|
2158
2162
|
continue;
|
|
@@ -2167,7 +2171,7 @@ var require_attributes = __commonJS({
|
|
|
2167
2171
|
}
|
|
2168
2172
|
exports2.sanitizeAttributes = sanitizeAttributes;
|
|
2169
2173
|
function isAttributeKey(key) {
|
|
2170
|
-
return typeof key === "string" && key
|
|
2174
|
+
return typeof key === "string" && key !== "";
|
|
2171
2175
|
}
|
|
2172
2176
|
exports2.isAttributeKey = isAttributeKey;
|
|
2173
2177
|
function isAttributeValue(val) {
|
|
@@ -2177,7 +2181,7 @@ var require_attributes = __commonJS({
|
|
|
2177
2181
|
if (Array.isArray(val)) {
|
|
2178
2182
|
return isHomogeneousAttributeValueArray(val);
|
|
2179
2183
|
}
|
|
2180
|
-
return
|
|
2184
|
+
return isValidPrimitiveAttributeValueType(typeof val);
|
|
2181
2185
|
}
|
|
2182
2186
|
exports2.isAttributeValue = isAttributeValue;
|
|
2183
2187
|
function isHomogeneousAttributeValueArray(arr) {
|
|
@@ -2185,22 +2189,23 @@ var require_attributes = __commonJS({
|
|
|
2185
2189
|
for (const element of arr) {
|
|
2186
2190
|
if (element == null)
|
|
2187
2191
|
continue;
|
|
2192
|
+
const elementType = typeof element;
|
|
2193
|
+
if (elementType === type) {
|
|
2194
|
+
continue;
|
|
2195
|
+
}
|
|
2188
2196
|
if (!type) {
|
|
2189
|
-
if (
|
|
2190
|
-
type =
|
|
2197
|
+
if (isValidPrimitiveAttributeValueType(elementType)) {
|
|
2198
|
+
type = elementType;
|
|
2191
2199
|
continue;
|
|
2192
2200
|
}
|
|
2193
2201
|
return false;
|
|
2194
2202
|
}
|
|
2195
|
-
if (typeof element === type) {
|
|
2196
|
-
continue;
|
|
2197
|
-
}
|
|
2198
2203
|
return false;
|
|
2199
2204
|
}
|
|
2200
2205
|
return true;
|
|
2201
2206
|
}
|
|
2202
|
-
function
|
|
2203
|
-
switch (
|
|
2207
|
+
function isValidPrimitiveAttributeValueType(valType) {
|
|
2208
|
+
switch (valType) {
|
|
2204
2209
|
case "number":
|
|
2205
2210
|
case "boolean":
|
|
2206
2211
|
case "string":
|
|
@@ -2362,7 +2367,7 @@ var require_version = __commonJS({
|
|
|
2362
2367
|
init_define_PACKAGE_VERSIONS();
|
|
2363
2368
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2364
2369
|
exports2.VERSION = void 0;
|
|
2365
|
-
exports2.VERSION = "2.
|
|
2370
|
+
exports2.VERSION = "2.2.0";
|
|
2366
2371
|
}
|
|
2367
2372
|
});
|
|
2368
2373
|
|
|
@@ -4500,21 +4505,6 @@ var require_sdk_info = __commonJS({
|
|
|
4500
4505
|
}
|
|
4501
4506
|
});
|
|
4502
4507
|
|
|
4503
|
-
// ../../node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js
|
|
4504
|
-
var require_timer_util = __commonJS({
|
|
4505
|
-
"../../node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js"(exports2) {
|
|
4506
|
-
"use strict";
|
|
4507
|
-
init_define_BUILD();
|
|
4508
|
-
init_define_PACKAGE_VERSIONS();
|
|
4509
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4510
|
-
exports2.unrefTimer = void 0;
|
|
4511
|
-
function unrefTimer(timer) {
|
|
4512
|
-
timer.unref();
|
|
4513
|
-
}
|
|
4514
|
-
exports2.unrefTimer = unrefTimer;
|
|
4515
|
-
}
|
|
4516
|
-
});
|
|
4517
|
-
|
|
4518
4508
|
// ../../node_modules/@opentelemetry/core/build/src/platform/node/index.js
|
|
4519
4509
|
var require_node = __commonJS({
|
|
4520
4510
|
"../../node_modules/@opentelemetry/core/build/src/platform/node/index.js"(exports2) {
|
|
@@ -4522,7 +4512,7 @@ var require_node = __commonJS({
|
|
|
4522
4512
|
init_define_BUILD();
|
|
4523
4513
|
init_define_PACKAGE_VERSIONS();
|
|
4524
4514
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4525
|
-
exports2.
|
|
4515
|
+
exports2.SDK_INFO = exports2.otperformance = exports2._globalThis = exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getBooleanFromEnv = exports2.getStringFromEnv = void 0;
|
|
4526
4516
|
var environment_1 = require_environment();
|
|
4527
4517
|
Object.defineProperty(exports2, "getStringFromEnv", { enumerable: true, get: function() {
|
|
4528
4518
|
return environment_1.getStringFromEnv;
|
|
@@ -4548,10 +4538,6 @@ var require_node = __commonJS({
|
|
|
4548
4538
|
Object.defineProperty(exports2, "SDK_INFO", { enumerable: true, get: function() {
|
|
4549
4539
|
return sdk_info_1.SDK_INFO;
|
|
4550
4540
|
} });
|
|
4551
|
-
var timer_util_1 = require_timer_util();
|
|
4552
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
4553
|
-
return timer_util_1.unrefTimer;
|
|
4554
|
-
} });
|
|
4555
4541
|
}
|
|
4556
4542
|
});
|
|
4557
4543
|
|
|
@@ -4562,7 +4548,7 @@ var require_platform = __commonJS({
|
|
|
4562
4548
|
init_define_BUILD();
|
|
4563
4549
|
init_define_PACKAGE_VERSIONS();
|
|
4564
4550
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4565
|
-
exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getStringFromEnv = exports2.getBooleanFromEnv = exports2.
|
|
4551
|
+
exports2.getStringListFromEnv = exports2.getNumberFromEnv = exports2.getStringFromEnv = exports2.getBooleanFromEnv = exports2.otperformance = exports2._globalThis = exports2.SDK_INFO = void 0;
|
|
4566
4552
|
var node_1 = require_node();
|
|
4567
4553
|
Object.defineProperty(exports2, "SDK_INFO", { enumerable: true, get: function() {
|
|
4568
4554
|
return node_1.SDK_INFO;
|
|
@@ -4573,9 +4559,6 @@ var require_platform = __commonJS({
|
|
|
4573
4559
|
Object.defineProperty(exports2, "otperformance", { enumerable: true, get: function() {
|
|
4574
4560
|
return node_1.otperformance;
|
|
4575
4561
|
} });
|
|
4576
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
4577
|
-
return node_1.unrefTimer;
|
|
4578
|
-
} });
|
|
4579
4562
|
Object.defineProperty(exports2, "getBooleanFromEnv", { enumerable: true, get: function() {
|
|
4580
4563
|
return node_1.getBooleanFromEnv;
|
|
4581
4564
|
} });
|
|
@@ -4692,6 +4675,23 @@ var require_time = __commonJS({
|
|
|
4692
4675
|
}
|
|
4693
4676
|
});
|
|
4694
4677
|
|
|
4678
|
+
// ../../node_modules/@opentelemetry/core/build/src/common/timer-util.js
|
|
4679
|
+
var require_timer_util = __commonJS({
|
|
4680
|
+
"../../node_modules/@opentelemetry/core/build/src/common/timer-util.js"(exports2) {
|
|
4681
|
+
"use strict";
|
|
4682
|
+
init_define_BUILD();
|
|
4683
|
+
init_define_PACKAGE_VERSIONS();
|
|
4684
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4685
|
+
exports2.unrefTimer = void 0;
|
|
4686
|
+
function unrefTimer(timer) {
|
|
4687
|
+
if (typeof timer !== "number") {
|
|
4688
|
+
timer.unref();
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
exports2.unrefTimer = unrefTimer;
|
|
4692
|
+
}
|
|
4693
|
+
});
|
|
4694
|
+
|
|
4695
4695
|
// ../../node_modules/@opentelemetry/core/build/src/ExportResult.js
|
|
4696
4696
|
var require_ExportResult = __commonJS({
|
|
4697
4697
|
"../../node_modules/@opentelemetry/core/build/src/ExportResult.js"(exports2) {
|
|
@@ -5352,7 +5352,7 @@ var require_src = __commonJS({
|
|
|
5352
5352
|
init_define_BUILD();
|
|
5353
5353
|
init_define_PACKAGE_VERSIONS();
|
|
5354
5354
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5355
|
-
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.
|
|
5355
|
+
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;
|
|
5356
5356
|
var W3CBaggagePropagator_1 = require_W3CBaggagePropagator();
|
|
5357
5357
|
Object.defineProperty(exports2, "W3CBaggagePropagator", { enumerable: true, get: function() {
|
|
5358
5358
|
return W3CBaggagePropagator_1.W3CBaggagePropagator;
|
|
@@ -5416,6 +5416,10 @@ var require_src = __commonJS({
|
|
|
5416
5416
|
Object.defineProperty(exports2, "timeInputToHrTime", { enumerable: true, get: function() {
|
|
5417
5417
|
return time_1.timeInputToHrTime;
|
|
5418
5418
|
} });
|
|
5419
|
+
var timer_util_1 = require_timer_util();
|
|
5420
|
+
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
5421
|
+
return timer_util_1.unrefTimer;
|
|
5422
|
+
} });
|
|
5419
5423
|
var ExportResult_1 = require_ExportResult();
|
|
5420
5424
|
Object.defineProperty(exports2, "ExportResultCode", { enumerable: true, get: function() {
|
|
5421
5425
|
return ExportResult_1.ExportResultCode;
|
|
@@ -5446,9 +5450,6 @@ var require_src = __commonJS({
|
|
|
5446
5450
|
Object.defineProperty(exports2, "otperformance", { enumerable: true, get: function() {
|
|
5447
5451
|
return platform_1.otperformance;
|
|
5448
5452
|
} });
|
|
5449
|
-
Object.defineProperty(exports2, "unrefTimer", { enumerable: true, get: function() {
|
|
5450
|
-
return platform_1.unrefTimer;
|
|
5451
|
-
} });
|
|
5452
5453
|
var composite_1 = require_composite();
|
|
5453
5454
|
Object.defineProperty(exports2, "CompositePropagator", { enumerable: true, get: function() {
|
|
5454
5455
|
return composite_1.CompositePropagator;
|
|
@@ -7142,7 +7143,9 @@ var require_BatchSpanProcessorBase = __commonJS({
|
|
|
7142
7143
|
if (this._timer !== void 0)
|
|
7143
7144
|
return;
|
|
7144
7145
|
this._timer = setTimeout(() => flush(), this._scheduledDelayMillis);
|
|
7145
|
-
(
|
|
7146
|
+
if (typeof this._timer !== "number") {
|
|
7147
|
+
this._timer.unref();
|
|
7148
|
+
}
|
|
7146
7149
|
}
|
|
7147
7150
|
_clearTimer() {
|
|
7148
7151
|
if (this._timer !== void 0) {
|
|
@@ -26362,7 +26365,7 @@ var init_InterceptorManager = __esm({
|
|
|
26362
26365
|
*
|
|
26363
26366
|
* @param {Number} id The ID that was returned by `use`
|
|
26364
26367
|
*
|
|
26365
|
-
* @returns {
|
|
26368
|
+
* @returns {void}
|
|
26366
26369
|
*/
|
|
26367
26370
|
eject(id) {
|
|
26368
26371
|
if (this.handlers[id]) {
|
|
@@ -28507,7 +28510,7 @@ var init_data = __esm({
|
|
|
28507
28510
|
"../../node_modules/axios/lib/env/data.js"() {
|
|
28508
28511
|
init_define_BUILD();
|
|
28509
28512
|
init_define_PACKAGE_VERSIONS();
|
|
28510
|
-
VERSION2 = "1.
|
|
28513
|
+
VERSION2 = "1.13.2";
|
|
28511
28514
|
}
|
|
28512
28515
|
});
|
|
28513
28516
|
|
|
@@ -29045,6 +29048,7 @@ var init_estimateDataURLDecodedBytes = __esm({
|
|
|
29045
29048
|
// ../../node_modules/axios/lib/adapters/http.js
|
|
29046
29049
|
import http2 from "http";
|
|
29047
29050
|
import https2 from "https";
|
|
29051
|
+
import http22 from "http2";
|
|
29048
29052
|
import util2 from "util";
|
|
29049
29053
|
import zlib from "zlib";
|
|
29050
29054
|
import stream3 from "stream";
|
|
@@ -29090,10 +29094,9 @@ function setProxy(options, configProxy, location) {
|
|
|
29090
29094
|
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
29091
29095
|
};
|
|
29092
29096
|
}
|
|
29093
|
-
var import_proxy_from_env, import_follow_redirects, zlibOptions, brotliOptions, isBrotliSupported, httpFollow, httpsFollow, isHttps, supportedProtocols, flushOnFinish, isHttpAdapterSupported, wrapAsync, resolveFamily, buildAddressEntry, http_default;
|
|
29097
|
+
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;
|
|
29094
29098
|
var init_http2 = __esm({
|
|
29095
29099
|
"../../node_modules/axios/lib/adapters/http.js"() {
|
|
29096
|
-
"use strict";
|
|
29097
29100
|
init_define_BUILD();
|
|
29098
29101
|
init_define_PACKAGE_VERSIONS();
|
|
29099
29102
|
init_utils5();
|
|
@@ -29134,6 +29137,76 @@ var init_http2 = __esm({
|
|
|
29134
29137
|
stream5.on("end", flush).on("error", flush);
|
|
29135
29138
|
return throttled;
|
|
29136
29139
|
};
|
|
29140
|
+
Http2Sessions = class {
|
|
29141
|
+
constructor() {
|
|
29142
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
29143
|
+
}
|
|
29144
|
+
getSession(authority, options) {
|
|
29145
|
+
options = Object.assign({
|
|
29146
|
+
sessionTimeout: 1e3
|
|
29147
|
+
}, options);
|
|
29148
|
+
let authoritySessions = this.sessions[authority];
|
|
29149
|
+
if (authoritySessions) {
|
|
29150
|
+
let len = authoritySessions.length;
|
|
29151
|
+
for (let i = 0; i < len; i++) {
|
|
29152
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
29153
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
29154
|
+
return sessionHandle;
|
|
29155
|
+
}
|
|
29156
|
+
}
|
|
29157
|
+
}
|
|
29158
|
+
const session = http22.connect(authority, options);
|
|
29159
|
+
let removed;
|
|
29160
|
+
const removeSession = () => {
|
|
29161
|
+
if (removed) {
|
|
29162
|
+
return;
|
|
29163
|
+
}
|
|
29164
|
+
removed = true;
|
|
29165
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
29166
|
+
while (i--) {
|
|
29167
|
+
if (entries[i][0] === session) {
|
|
29168
|
+
if (len === 1) {
|
|
29169
|
+
delete this.sessions[authority];
|
|
29170
|
+
} else {
|
|
29171
|
+
entries.splice(i, 1);
|
|
29172
|
+
}
|
|
29173
|
+
return;
|
|
29174
|
+
}
|
|
29175
|
+
}
|
|
29176
|
+
};
|
|
29177
|
+
const originalRequestFn = session.request;
|
|
29178
|
+
const { sessionTimeout } = options;
|
|
29179
|
+
if (sessionTimeout != null) {
|
|
29180
|
+
let timer;
|
|
29181
|
+
let streamsCount = 0;
|
|
29182
|
+
session.request = function() {
|
|
29183
|
+
const stream5 = originalRequestFn.apply(this, arguments);
|
|
29184
|
+
streamsCount++;
|
|
29185
|
+
if (timer) {
|
|
29186
|
+
clearTimeout(timer);
|
|
29187
|
+
timer = null;
|
|
29188
|
+
}
|
|
29189
|
+
stream5.once("close", () => {
|
|
29190
|
+
if (!--streamsCount) {
|
|
29191
|
+
timer = setTimeout(() => {
|
|
29192
|
+
timer = null;
|
|
29193
|
+
removeSession();
|
|
29194
|
+
}, sessionTimeout);
|
|
29195
|
+
}
|
|
29196
|
+
});
|
|
29197
|
+
return stream5;
|
|
29198
|
+
};
|
|
29199
|
+
}
|
|
29200
|
+
session.once("close", removeSession);
|
|
29201
|
+
let entry = [
|
|
29202
|
+
session,
|
|
29203
|
+
options
|
|
29204
|
+
];
|
|
29205
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
29206
|
+
return session;
|
|
29207
|
+
}
|
|
29208
|
+
};
|
|
29209
|
+
http2Sessions = new Http2Sessions();
|
|
29137
29210
|
isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
29138
29211
|
wrapAsync = (asyncExecutor) => {
|
|
29139
29212
|
return new Promise((resolve, reject) => {
|
|
@@ -29165,14 +29238,54 @@ var init_http2 = __esm({
|
|
|
29165
29238
|
};
|
|
29166
29239
|
};
|
|
29167
29240
|
buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
29241
|
+
http2Transport = {
|
|
29242
|
+
request(options, cb) {
|
|
29243
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
29244
|
+
const { http2Options, headers } = options;
|
|
29245
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
29246
|
+
const {
|
|
29247
|
+
HTTP2_HEADER_SCHEME,
|
|
29248
|
+
HTTP2_HEADER_METHOD,
|
|
29249
|
+
HTTP2_HEADER_PATH,
|
|
29250
|
+
HTTP2_HEADER_STATUS
|
|
29251
|
+
} = http22.constants;
|
|
29252
|
+
const http2Headers = {
|
|
29253
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
29254
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
29255
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
29256
|
+
};
|
|
29257
|
+
utils_default.forEach(headers, (header, name) => {
|
|
29258
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
29259
|
+
});
|
|
29260
|
+
const req = session.request(http2Headers);
|
|
29261
|
+
req.once("response", (responseHeaders) => {
|
|
29262
|
+
const response = req;
|
|
29263
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
29264
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
29265
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
29266
|
+
response.headers = responseHeaders;
|
|
29267
|
+
response.statusCode = +status;
|
|
29268
|
+
cb(response);
|
|
29269
|
+
});
|
|
29270
|
+
return req;
|
|
29271
|
+
}
|
|
29272
|
+
};
|
|
29168
29273
|
http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
29169
29274
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
29170
|
-
let { data, lookup, family } = config;
|
|
29275
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
29171
29276
|
const { responseType, responseEncoding } = config;
|
|
29172
29277
|
const method = config.method.toUpperCase();
|
|
29173
29278
|
let isDone;
|
|
29174
29279
|
let rejected = false;
|
|
29175
29280
|
let req;
|
|
29281
|
+
httpVersion = +httpVersion;
|
|
29282
|
+
if (Number.isNaN(httpVersion)) {
|
|
29283
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
29284
|
+
}
|
|
29285
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
29286
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
29287
|
+
}
|
|
29288
|
+
const isHttp2 = httpVersion === 2;
|
|
29176
29289
|
if (lookup) {
|
|
29177
29290
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
29178
29291
|
lookup = (hostname, opt, cb) => {
|
|
@@ -29185,7 +29298,15 @@ var init_http2 = __esm({
|
|
|
29185
29298
|
});
|
|
29186
29299
|
};
|
|
29187
29300
|
}
|
|
29188
|
-
const
|
|
29301
|
+
const abortEmitter = new EventEmitter();
|
|
29302
|
+
function abort(reason) {
|
|
29303
|
+
try {
|
|
29304
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
29305
|
+
} catch (err) {
|
|
29306
|
+
console.warn("emit error", err);
|
|
29307
|
+
}
|
|
29308
|
+
}
|
|
29309
|
+
abortEmitter.once("abort", reject);
|
|
29189
29310
|
const onFinished = () => {
|
|
29190
29311
|
if (config.cancelToken) {
|
|
29191
29312
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -29193,25 +29314,31 @@ var init_http2 = __esm({
|
|
|
29193
29314
|
if (config.signal) {
|
|
29194
29315
|
config.signal.removeEventListener("abort", abort);
|
|
29195
29316
|
}
|
|
29196
|
-
|
|
29317
|
+
abortEmitter.removeAllListeners();
|
|
29197
29318
|
};
|
|
29198
|
-
onDone((value, isRejected) => {
|
|
29199
|
-
isDone = true;
|
|
29200
|
-
if (isRejected) {
|
|
29201
|
-
rejected = true;
|
|
29202
|
-
onFinished();
|
|
29203
|
-
}
|
|
29204
|
-
});
|
|
29205
|
-
function abort(reason) {
|
|
29206
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
29207
|
-
}
|
|
29208
|
-
emitter.once("abort", reject);
|
|
29209
29319
|
if (config.cancelToken || config.signal) {
|
|
29210
29320
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
29211
29321
|
if (config.signal) {
|
|
29212
29322
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
29213
29323
|
}
|
|
29214
29324
|
}
|
|
29325
|
+
onDone((response, isRejected) => {
|
|
29326
|
+
isDone = true;
|
|
29327
|
+
if (isRejected) {
|
|
29328
|
+
rejected = true;
|
|
29329
|
+
onFinished();
|
|
29330
|
+
return;
|
|
29331
|
+
}
|
|
29332
|
+
const { data: data2 } = response;
|
|
29333
|
+
if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) {
|
|
29334
|
+
const offListeners = stream3.finished(data2, () => {
|
|
29335
|
+
offListeners();
|
|
29336
|
+
onFinished();
|
|
29337
|
+
});
|
|
29338
|
+
} else {
|
|
29339
|
+
onFinished();
|
|
29340
|
+
}
|
|
29341
|
+
});
|
|
29215
29342
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
29216
29343
|
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
29217
29344
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
@@ -29377,7 +29504,8 @@ var init_http2 = __esm({
|
|
|
29377
29504
|
protocol,
|
|
29378
29505
|
family,
|
|
29379
29506
|
beforeRedirect: dispatchBeforeRedirect,
|
|
29380
|
-
beforeRedirects: {}
|
|
29507
|
+
beforeRedirects: {},
|
|
29508
|
+
http2Options
|
|
29381
29509
|
};
|
|
29382
29510
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
29383
29511
|
if (config.socketPath) {
|
|
@@ -29390,18 +29518,22 @@ var init_http2 = __esm({
|
|
|
29390
29518
|
let transport;
|
|
29391
29519
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
29392
29520
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
29393
|
-
if (
|
|
29394
|
-
transport =
|
|
29395
|
-
} else if (config.maxRedirects === 0) {
|
|
29396
|
-
transport = isHttpsRequest ? https2 : http2;
|
|
29521
|
+
if (isHttp2) {
|
|
29522
|
+
transport = http2Transport;
|
|
29397
29523
|
} else {
|
|
29398
|
-
if (config.
|
|
29399
|
-
|
|
29400
|
-
}
|
|
29401
|
-
|
|
29402
|
-
|
|
29524
|
+
if (config.transport) {
|
|
29525
|
+
transport = config.transport;
|
|
29526
|
+
} else if (config.maxRedirects === 0) {
|
|
29527
|
+
transport = isHttpsRequest ? https2 : http2;
|
|
29528
|
+
} else {
|
|
29529
|
+
if (config.maxRedirects) {
|
|
29530
|
+
options.maxRedirects = config.maxRedirects;
|
|
29531
|
+
}
|
|
29532
|
+
if (config.beforeRedirect) {
|
|
29533
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
29534
|
+
}
|
|
29535
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
29403
29536
|
}
|
|
29404
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
29405
29537
|
}
|
|
29406
29538
|
if (config.maxBodyLength > -1) {
|
|
29407
29539
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -29414,7 +29546,7 @@ var init_http2 = __esm({
|
|
|
29414
29546
|
req = transport.request(options, function handleResponse(res) {
|
|
29415
29547
|
if (req.destroyed) return;
|
|
29416
29548
|
const streams2 = [res];
|
|
29417
|
-
const responseLength =
|
|
29549
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
29418
29550
|
if (onDownloadProgress || maxDownloadRate) {
|
|
29419
29551
|
const transformStream = new AxiosTransformStream_default({
|
|
29420
29552
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
@@ -29456,10 +29588,6 @@ var init_http2 = __esm({
|
|
|
29456
29588
|
}
|
|
29457
29589
|
}
|
|
29458
29590
|
responseStream = streams2.length > 1 ? stream3.pipeline(streams2, utils_default.noop) : streams2[0];
|
|
29459
|
-
const offListeners = stream3.finished(responseStream, () => {
|
|
29460
|
-
offListeners();
|
|
29461
|
-
onFinished();
|
|
29462
|
-
});
|
|
29463
29591
|
const response = {
|
|
29464
29592
|
status: res.statusCode,
|
|
29465
29593
|
statusText: res.statusMessage,
|
|
@@ -29479,7 +29607,7 @@ var init_http2 = __esm({
|
|
|
29479
29607
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
29480
29608
|
rejected = true;
|
|
29481
29609
|
responseStream.destroy();
|
|
29482
|
-
|
|
29610
|
+
abort(new AxiosError_default(
|
|
29483
29611
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
29484
29612
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
29485
29613
|
config,
|
|
@@ -29520,16 +29648,19 @@ var init_http2 = __esm({
|
|
|
29520
29648
|
settle(resolve, reject, response);
|
|
29521
29649
|
});
|
|
29522
29650
|
}
|
|
29523
|
-
|
|
29651
|
+
abortEmitter.once("abort", (err) => {
|
|
29524
29652
|
if (!responseStream.destroyed) {
|
|
29525
29653
|
responseStream.emit("error", err);
|
|
29526
29654
|
responseStream.destroy();
|
|
29527
29655
|
}
|
|
29528
29656
|
});
|
|
29529
29657
|
});
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
|
|
29658
|
+
abortEmitter.once("abort", (err) => {
|
|
29659
|
+
if (req.close) {
|
|
29660
|
+
req.close();
|
|
29661
|
+
} else {
|
|
29662
|
+
req.destroy(err);
|
|
29663
|
+
}
|
|
29533
29664
|
});
|
|
29534
29665
|
req.on("error", function handleRequestError(err) {
|
|
29535
29666
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -29540,7 +29671,7 @@ var init_http2 = __esm({
|
|
|
29540
29671
|
if (config.timeout) {
|
|
29541
29672
|
const timeout = parseInt(config.timeout, 10);
|
|
29542
29673
|
if (Number.isNaN(timeout)) {
|
|
29543
|
-
|
|
29674
|
+
abort(new AxiosError_default(
|
|
29544
29675
|
"error trying to parse `config.timeout` to int",
|
|
29545
29676
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
29546
29677
|
config,
|
|
@@ -29555,14 +29686,15 @@ var init_http2 = __esm({
|
|
|
29555
29686
|
if (config.timeoutErrorMessage) {
|
|
29556
29687
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
29557
29688
|
}
|
|
29558
|
-
|
|
29689
|
+
abort(new AxiosError_default(
|
|
29559
29690
|
timeoutErrorMessage,
|
|
29560
29691
|
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
29561
29692
|
config,
|
|
29562
29693
|
req
|
|
29563
29694
|
));
|
|
29564
|
-
abort();
|
|
29565
29695
|
});
|
|
29696
|
+
} else {
|
|
29697
|
+
req.setTimeout(0);
|
|
29566
29698
|
}
|
|
29567
29699
|
if (utils_default.isStream(data)) {
|
|
29568
29700
|
let ended = false;
|
|
@@ -29581,7 +29713,8 @@ var init_http2 = __esm({
|
|
|
29581
29713
|
});
|
|
29582
29714
|
data.pipe(req);
|
|
29583
29715
|
} else {
|
|
29584
|
-
req.
|
|
29716
|
+
data && req.write(data);
|
|
29717
|
+
req.end();
|
|
29585
29718
|
}
|
|
29586
29719
|
});
|
|
29587
29720
|
};
|
|
@@ -29616,20 +29749,33 @@ var init_cookies = __esm({
|
|
|
29616
29749
|
cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
29617
29750
|
// Standard browser envs support document.cookie
|
|
29618
29751
|
{
|
|
29619
|
-
write(name, value, expires, path4, domain, secure) {
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
utils_default.
|
|
29623
|
-
|
|
29624
|
-
|
|
29752
|
+
write(name, value, expires, path4, domain, secure, sameSite) {
|
|
29753
|
+
if (typeof document === "undefined") return;
|
|
29754
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
29755
|
+
if (utils_default.isNumber(expires)) {
|
|
29756
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
29757
|
+
}
|
|
29758
|
+
if (utils_default.isString(path4)) {
|
|
29759
|
+
cookie.push(`path=${path4}`);
|
|
29760
|
+
}
|
|
29761
|
+
if (utils_default.isString(domain)) {
|
|
29762
|
+
cookie.push(`domain=${domain}`);
|
|
29763
|
+
}
|
|
29764
|
+
if (secure === true) {
|
|
29765
|
+
cookie.push("secure");
|
|
29766
|
+
}
|
|
29767
|
+
if (utils_default.isString(sameSite)) {
|
|
29768
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
29769
|
+
}
|
|
29625
29770
|
document.cookie = cookie.join("; ");
|
|
29626
29771
|
},
|
|
29627
29772
|
read(name) {
|
|
29628
|
-
|
|
29629
|
-
|
|
29773
|
+
if (typeof document === "undefined") return null;
|
|
29774
|
+
const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
29775
|
+
return match2 ? decodeURIComponent(match2[1]) : null;
|
|
29630
29776
|
},
|
|
29631
29777
|
remove(name) {
|
|
29632
|
-
this.write(name, "", Date.now() - 864e5);
|
|
29778
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
29633
29779
|
}
|
|
29634
29780
|
}
|
|
29635
29781
|
) : (
|
|
@@ -30271,7 +30417,7 @@ var init_fetch = __esm({
|
|
|
30271
30417
|
};
|
|
30272
30418
|
seedCache = /* @__PURE__ */ new Map();
|
|
30273
30419
|
getFetch = (config) => {
|
|
30274
|
-
let env2 = config
|
|
30420
|
+
let env2 = config && config.env || {};
|
|
30275
30421
|
const { fetch: fetch2, Request, Response } = env2;
|
|
30276
30422
|
const seeds = [
|
|
30277
30423
|
Request,
|
|
@@ -30292,6 +30438,39 @@ var init_fetch = __esm({
|
|
|
30292
30438
|
});
|
|
30293
30439
|
|
|
30294
30440
|
// ../../node_modules/axios/lib/adapters/adapters.js
|
|
30441
|
+
function getAdapter(adapters, config) {
|
|
30442
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
30443
|
+
const { length } = adapters;
|
|
30444
|
+
let nameOrAdapter;
|
|
30445
|
+
let adapter2;
|
|
30446
|
+
const rejectedReasons = {};
|
|
30447
|
+
for (let i = 0; i < length; i++) {
|
|
30448
|
+
nameOrAdapter = adapters[i];
|
|
30449
|
+
let id;
|
|
30450
|
+
adapter2 = nameOrAdapter;
|
|
30451
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
30452
|
+
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
30453
|
+
if (adapter2 === void 0) {
|
|
30454
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
30455
|
+
}
|
|
30456
|
+
}
|
|
30457
|
+
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
30458
|
+
break;
|
|
30459
|
+
}
|
|
30460
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
30461
|
+
}
|
|
30462
|
+
if (!adapter2) {
|
|
30463
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
30464
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
30465
|
+
);
|
|
30466
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
30467
|
+
throw new AxiosError_default(
|
|
30468
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
30469
|
+
"ERR_NOT_SUPPORT"
|
|
30470
|
+
);
|
|
30471
|
+
}
|
|
30472
|
+
return adapter2;
|
|
30473
|
+
}
|
|
30295
30474
|
var knownAdapters, renderReason, isResolvedHandle, adapters_default;
|
|
30296
30475
|
var init_adapters = __esm({
|
|
30297
30476
|
"../../node_modules/axios/lib/adapters/adapters.js"() {
|
|
@@ -30321,39 +30500,15 @@ var init_adapters = __esm({
|
|
|
30321
30500
|
renderReason = (reason) => `- ${reason}`;
|
|
30322
30501
|
isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
30323
30502
|
adapters_default = {
|
|
30324
|
-
|
|
30325
|
-
|
|
30326
|
-
|
|
30327
|
-
|
|
30328
|
-
|
|
30329
|
-
|
|
30330
|
-
|
|
30331
|
-
|
|
30332
|
-
|
|
30333
|
-
adapter2 = nameOrAdapter;
|
|
30334
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
30335
|
-
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
30336
|
-
if (adapter2 === void 0) {
|
|
30337
|
-
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
30338
|
-
}
|
|
30339
|
-
}
|
|
30340
|
-
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
30341
|
-
break;
|
|
30342
|
-
}
|
|
30343
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
30344
|
-
}
|
|
30345
|
-
if (!adapter2) {
|
|
30346
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
30347
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
30348
|
-
);
|
|
30349
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
30350
|
-
throw new AxiosError_default(
|
|
30351
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
30352
|
-
"ERR_NOT_SUPPORT"
|
|
30353
|
-
);
|
|
30354
|
-
}
|
|
30355
|
-
return adapter2;
|
|
30356
|
-
},
|
|
30503
|
+
/**
|
|
30504
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
30505
|
+
* @type {Function}
|
|
30506
|
+
*/
|
|
30507
|
+
getAdapter,
|
|
30508
|
+
/**
|
|
30509
|
+
* Exposes all known adapters
|
|
30510
|
+
* @type {Object<string, Function|Object>}
|
|
30511
|
+
*/
|
|
30357
30512
|
adapters: knownAdapters
|
|
30358
30513
|
};
|
|
30359
30514
|
}
|
|
@@ -30882,7 +31037,13 @@ var init_HttpStatusCode = __esm({
|
|
|
30882
31037
|
InsufficientStorage: 507,
|
|
30883
31038
|
LoopDetected: 508,
|
|
30884
31039
|
NotExtended: 510,
|
|
30885
|
-
NetworkAuthenticationRequired: 511
|
|
31040
|
+
NetworkAuthenticationRequired: 511,
|
|
31041
|
+
WebServerIsDown: 521,
|
|
31042
|
+
ConnectionTimedOut: 522,
|
|
31043
|
+
OriginIsUnreachable: 523,
|
|
31044
|
+
TimeoutOccurred: 524,
|
|
31045
|
+
SslHandshakeFailed: 525,
|
|
31046
|
+
InvalidSslCertificate: 526
|
|
30886
31047
|
};
|
|
30887
31048
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
30888
31049
|
HttpStatusCode[value] = key;
|
|
@@ -30950,7 +31111,7 @@ var init_axios = __esm({
|
|
|
30950
31111
|
});
|
|
30951
31112
|
|
|
30952
31113
|
// ../../node_modules/axios/index.js
|
|
30953
|
-
var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON,
|
|
31114
|
+
var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter2, mergeConfig2;
|
|
30954
31115
|
var init_axios2 = __esm({
|
|
30955
31116
|
"../../node_modules/axios/index.js"() {
|
|
30956
31117
|
init_define_BUILD();
|
|
@@ -30971,7 +31132,7 @@ var init_axios2 = __esm({
|
|
|
30971
31132
|
AxiosHeaders: AxiosHeaders2,
|
|
30972
31133
|
HttpStatusCode: HttpStatusCode2,
|
|
30973
31134
|
formToJSON,
|
|
30974
|
-
getAdapter,
|
|
31135
|
+
getAdapter: getAdapter2,
|
|
30975
31136
|
mergeConfig: mergeConfig2
|
|
30976
31137
|
} = axios_default);
|
|
30977
31138
|
}
|
|
@@ -33482,10 +33643,16 @@ var init_conversation_instance = __esm({
|
|
|
33482
33643
|
init_define_BUILD();
|
|
33483
33644
|
init_define_PACKAGE_VERSIONS();
|
|
33484
33645
|
init_runtime();
|
|
33485
|
-
BaseConversationInstance = class {
|
|
33646
|
+
BaseConversationInstance = class _BaseConversationInstance {
|
|
33486
33647
|
id;
|
|
33487
33648
|
channel;
|
|
33488
33649
|
integration;
|
|
33650
|
+
/**
|
|
33651
|
+
* The integration alias (e.g., "telegram1", "telegram2").
|
|
33652
|
+
* This is useful when you have multiple instances of the same integration
|
|
33653
|
+
* with different configurations (multi-integration setup).
|
|
33654
|
+
*/
|
|
33655
|
+
alias;
|
|
33489
33656
|
conversation;
|
|
33490
33657
|
// @internal
|
|
33491
33658
|
client;
|
|
@@ -33493,10 +33660,25 @@ var init_conversation_instance = __esm({
|
|
|
33493
33660
|
TrackedState;
|
|
33494
33661
|
// @internal
|
|
33495
33662
|
TrackedTags;
|
|
33496
|
-
|
|
33663
|
+
/**
|
|
33664
|
+
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
33665
|
+
* @internal
|
|
33666
|
+
*/
|
|
33667
|
+
static extractAliasFromTags(tags) {
|
|
33668
|
+
if (!tags) return void 0;
|
|
33669
|
+
for (const tagKey of Object.keys(tags)) {
|
|
33670
|
+
const colonIndex = tagKey.indexOf(":");
|
|
33671
|
+
if (colonIndex > 0) {
|
|
33672
|
+
return tagKey.substring(0, colonIndex);
|
|
33673
|
+
}
|
|
33674
|
+
}
|
|
33675
|
+
return void 0;
|
|
33676
|
+
}
|
|
33677
|
+
constructor(conversation, client2, alias) {
|
|
33497
33678
|
this.id = conversation.id;
|
|
33498
|
-
this.channel = `${conversation.integration}.${conversation.channel}`;
|
|
33499
33679
|
this.integration = conversation.integration;
|
|
33680
|
+
this.alias = alias ?? _BaseConversationInstance.extractAliasFromTags(conversation.tags) ?? conversation.integration;
|
|
33681
|
+
this.channel = `${this.alias}.${conversation.channel}`;
|
|
33500
33682
|
this.conversation = conversation;
|
|
33501
33683
|
this.client = client2;
|
|
33502
33684
|
const states = context2.get("states", { optional: true });
|
|
@@ -37199,8 +37381,11 @@ var init_unescape = __esm({
|
|
|
37199
37381
|
"../../node_modules/minimatch/dist/esm/unescape.js"() {
|
|
37200
37382
|
init_define_BUILD();
|
|
37201
37383
|
init_define_PACKAGE_VERSIONS();
|
|
37202
|
-
unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
37203
|
-
|
|
37384
|
+
unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
37385
|
+
if (magicalBraces) {
|
|
37386
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
37387
|
+
}
|
|
37388
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
37204
37389
|
};
|
|
37205
37390
|
}
|
|
37206
37391
|
});
|
|
@@ -37563,7 +37748,7 @@ var init_ast = __esm({
|
|
|
37563
37748
|
if (this.#root === this)
|
|
37564
37749
|
this.#fillNegs();
|
|
37565
37750
|
if (!this.type) {
|
|
37566
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
37751
|
+
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
37567
37752
|
const src = this.#parts.map((p) => {
|
|
37568
37753
|
const [re2, _2, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
37569
37754
|
this.#hasMagic = this.#hasMagic || hasMagic2;
|
|
@@ -37673,10 +37858,7 @@ var init_ast = __esm({
|
|
|
37673
37858
|
}
|
|
37674
37859
|
}
|
|
37675
37860
|
if (c === "*") {
|
|
37676
|
-
|
|
37677
|
-
re2 += starNoEmpty;
|
|
37678
|
-
else
|
|
37679
|
-
re2 += star;
|
|
37861
|
+
re2 += noEmpty && glob2 === "*" ? starNoEmpty : star;
|
|
37680
37862
|
hasMagic2 = true;
|
|
37681
37863
|
continue;
|
|
37682
37864
|
}
|
|
@@ -37699,7 +37881,10 @@ var init_escape = __esm({
|
|
|
37699
37881
|
"../../node_modules/minimatch/dist/esm/escape.js"() {
|
|
37700
37882
|
init_define_BUILD();
|
|
37701
37883
|
init_define_PACKAGE_VERSIONS();
|
|
37702
|
-
escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
37884
|
+
escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
37885
|
+
if (magicalBraces) {
|
|
37886
|
+
return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
37887
|
+
}
|
|
37703
37888
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
37704
37889
|
};
|
|
37705
37890
|
}
|
|
@@ -38355,16 +38540,27 @@ var init_esm5 = __esm({
|
|
|
38355
38540
|
pp[i] = twoStar;
|
|
38356
38541
|
}
|
|
38357
38542
|
} else if (next === void 0) {
|
|
38358
|
-
pp[i - 1] = prev + "(
|
|
38543
|
+
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
38359
38544
|
} else if (next !== GLOBSTAR) {
|
|
38360
38545
|
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
38361
38546
|
pp[i + 1] = GLOBSTAR;
|
|
38362
38547
|
}
|
|
38363
38548
|
});
|
|
38364
|
-
|
|
38549
|
+
const filtered = pp.filter((p) => p !== GLOBSTAR);
|
|
38550
|
+
if (this.partial && filtered.length >= 1) {
|
|
38551
|
+
const prefixes = [];
|
|
38552
|
+
for (let i = 1; i <= filtered.length; i++) {
|
|
38553
|
+
prefixes.push(filtered.slice(0, i).join("/"));
|
|
38554
|
+
}
|
|
38555
|
+
return "(?:" + prefixes.join("|") + ")";
|
|
38556
|
+
}
|
|
38557
|
+
return filtered.join("/");
|
|
38365
38558
|
}).join("|");
|
|
38366
38559
|
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
38367
38560
|
re2 = "^" + open + re2 + close + "$";
|
|
38561
|
+
if (this.partial) {
|
|
38562
|
+
re2 = "^(?:\\/|" + open + re2.slice(1, -1) + close + ")$";
|
|
38563
|
+
}
|
|
38368
38564
|
if (this.negate)
|
|
38369
38565
|
re2 = "^(?!" + re2 + ").+$";
|
|
38370
38566
|
try {
|
|
@@ -47255,6 +47451,17 @@ function createDedent(options) {
|
|
|
47255
47451
|
if (escapeSpecialCharacters) {
|
|
47256
47452
|
result = result.replace(/\\n/g, "\n");
|
|
47257
47453
|
}
|
|
47454
|
+
if (typeof Bun !== "undefined") {
|
|
47455
|
+
result = result.replace(
|
|
47456
|
+
// Matches e.g. \\u{1f60a} or \\u5F1F
|
|
47457
|
+
/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,
|
|
47458
|
+
(_2, braced, unbraced) => {
|
|
47459
|
+
var _ref;
|
|
47460
|
+
const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : "";
|
|
47461
|
+
return String.fromCodePoint(parseInt(hex, 16));
|
|
47462
|
+
}
|
|
47463
|
+
);
|
|
47464
|
+
}
|
|
47258
47465
|
return result;
|
|
47259
47466
|
}
|
|
47260
47467
|
}
|
|
@@ -48100,7 +48307,20 @@ var init_conversation2 = __esm({
|
|
|
48100
48307
|
"event.payload": event.payload
|
|
48101
48308
|
},
|
|
48102
48309
|
async () => {
|
|
48103
|
-
|
|
48310
|
+
let alias = conversation.integration;
|
|
48311
|
+
const allTags = {
|
|
48312
|
+
...conversation.tags,
|
|
48313
|
+
...message.tags,
|
|
48314
|
+
...user2.tags
|
|
48315
|
+
};
|
|
48316
|
+
for (const tagKey of Object.keys(allTags)) {
|
|
48317
|
+
const colonIndex = tagKey.indexOf(":");
|
|
48318
|
+
if (colonIndex > 0) {
|
|
48319
|
+
alias = tagKey.substring(0, colonIndex);
|
|
48320
|
+
break;
|
|
48321
|
+
}
|
|
48322
|
+
}
|
|
48323
|
+
const handlerName = alias + "." + conversation.channel;
|
|
48104
48324
|
const handler = findMatchingHandler(adk.project.conversations, handlerName);
|
|
48105
48325
|
if (!handler) {
|
|
48106
48326
|
logger.debug(`Skipping message, no ADK Conversation defined for "${handlerName}"`);
|
|
@@ -48414,7 +48634,12 @@ var init_event = __esm({
|
|
|
48414
48634
|
logger.warn(`Skipping ${WorkflowCallbackEvent.name} event, conversation not found in context`);
|
|
48415
48635
|
return;
|
|
48416
48636
|
}
|
|
48417
|
-
|
|
48637
|
+
let alias = conversation.integration;
|
|
48638
|
+
const colonIndex = event.type.indexOf(":");
|
|
48639
|
+
if (colonIndex > 0) {
|
|
48640
|
+
alias = event.type.substring(0, colonIndex);
|
|
48641
|
+
}
|
|
48642
|
+
const handlerName = alias + "." + conversation.channel;
|
|
48418
48643
|
const handler = findMatchingHandler(adk.project.conversations, handlerName);
|
|
48419
48644
|
if (!handler) {
|
|
48420
48645
|
logger.debug(`Skipping message, no ADK Conversation defined for "${handlerName}"`);
|