@botpress/runtime 1.8.3 → 1.9.0
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 +19 -19
- package/dist/definition.js +259 -99
- package/dist/definition.js.map +3 -3
- package/dist/internal.js +247 -87
- package/dist/internal.js.map +3 -3
- package/dist/library.js +247 -87
- package/dist/library.js.map +3 -3
- package/dist/primitives/data-sources/source-base.d.ts +49 -49
- package/dist/primitives/data-sources/source-directory.d.ts +23 -23
- package/dist/primitives/data-sources/source-directory.d.ts.map +1 -1
- package/dist/primitives/data-sources/source-table.d.ts +24 -24
- package/dist/primitives/data-sources/source-website.d.ts +31 -31
- package/dist/primitives/index.d.ts +23 -23
- package/dist/primitives/workflow-instance.d.ts +4 -4
- package/dist/primitives/workflow-instance.d.ts.map +1 -1
- 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 +76 -76
- package/dist/runtime/chat/transcript.d.ts +10 -10
- package/dist/runtime/events.d.ts +21 -21
- package/dist/runtime/tracked-state-schema.d.ts +7 -7
- package/dist/runtime/workflows/knowledge-indexing.d.ts +21 -21
- package/dist/runtime.js +247 -87
- package/dist/runtime.js.map +3 -3
- package/package.json +1 -1
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.9.0", adk: "1.9.0", sdk: "4.20.2", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -37128,7 +37128,7 @@ var InterceptorManager = class {
|
|
|
37128
37128
|
*
|
|
37129
37129
|
* @param {Number} id The ID that was returned by `use`
|
|
37130
37130
|
*
|
|
37131
|
-
* @returns {
|
|
37131
|
+
* @returns {void}
|
|
37132
37132
|
*/
|
|
37133
37133
|
eject(id) {
|
|
37134
37134
|
if (this.handlers[id]) {
|
|
@@ -37809,13 +37809,14 @@ var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
|
37809
37809
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
37810
37810
|
import http2 from "http";
|
|
37811
37811
|
import https2 from "https";
|
|
37812
|
+
import http22 from "http2";
|
|
37812
37813
|
import util2 from "util";
|
|
37813
37814
|
import zlib from "zlib";
|
|
37814
37815
|
|
|
37815
37816
|
// ../../node_modules/axios/lib/env/data.js
|
|
37816
37817
|
init_define_BUILD();
|
|
37817
37818
|
init_define_PACKAGE_VERSIONS();
|
|
37818
|
-
var VERSION2 = "1.
|
|
37819
|
+
var VERSION2 = "1.13.2";
|
|
37819
37820
|
|
|
37820
37821
|
// ../../node_modules/axios/lib/helpers/fromDataURI.js
|
|
37821
37822
|
init_define_BUILD();
|
|
@@ -38310,6 +38311,76 @@ var flushOnFinish = (stream5, [throttled, flush]) => {
|
|
|
38310
38311
|
stream5.on("end", flush).on("error", flush);
|
|
38311
38312
|
return throttled;
|
|
38312
38313
|
};
|
|
38314
|
+
var Http2Sessions = class {
|
|
38315
|
+
constructor() {
|
|
38316
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
38317
|
+
}
|
|
38318
|
+
getSession(authority, options) {
|
|
38319
|
+
options = Object.assign({
|
|
38320
|
+
sessionTimeout: 1e3
|
|
38321
|
+
}, options);
|
|
38322
|
+
let authoritySessions = this.sessions[authority];
|
|
38323
|
+
if (authoritySessions) {
|
|
38324
|
+
let len = authoritySessions.length;
|
|
38325
|
+
for (let i = 0; i < len; i++) {
|
|
38326
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
38327
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
38328
|
+
return sessionHandle;
|
|
38329
|
+
}
|
|
38330
|
+
}
|
|
38331
|
+
}
|
|
38332
|
+
const session = http22.connect(authority, options);
|
|
38333
|
+
let removed;
|
|
38334
|
+
const removeSession = () => {
|
|
38335
|
+
if (removed) {
|
|
38336
|
+
return;
|
|
38337
|
+
}
|
|
38338
|
+
removed = true;
|
|
38339
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
38340
|
+
while (i--) {
|
|
38341
|
+
if (entries[i][0] === session) {
|
|
38342
|
+
if (len === 1) {
|
|
38343
|
+
delete this.sessions[authority];
|
|
38344
|
+
} else {
|
|
38345
|
+
entries.splice(i, 1);
|
|
38346
|
+
}
|
|
38347
|
+
return;
|
|
38348
|
+
}
|
|
38349
|
+
}
|
|
38350
|
+
};
|
|
38351
|
+
const originalRequestFn = session.request;
|
|
38352
|
+
const { sessionTimeout } = options;
|
|
38353
|
+
if (sessionTimeout != null) {
|
|
38354
|
+
let timer;
|
|
38355
|
+
let streamsCount = 0;
|
|
38356
|
+
session.request = function() {
|
|
38357
|
+
const stream5 = originalRequestFn.apply(this, arguments);
|
|
38358
|
+
streamsCount++;
|
|
38359
|
+
if (timer) {
|
|
38360
|
+
clearTimeout(timer);
|
|
38361
|
+
timer = null;
|
|
38362
|
+
}
|
|
38363
|
+
stream5.once("close", () => {
|
|
38364
|
+
if (!--streamsCount) {
|
|
38365
|
+
timer = setTimeout(() => {
|
|
38366
|
+
timer = null;
|
|
38367
|
+
removeSession();
|
|
38368
|
+
}, sessionTimeout);
|
|
38369
|
+
}
|
|
38370
|
+
});
|
|
38371
|
+
return stream5;
|
|
38372
|
+
};
|
|
38373
|
+
}
|
|
38374
|
+
session.once("close", removeSession);
|
|
38375
|
+
let entry = [
|
|
38376
|
+
session,
|
|
38377
|
+
options
|
|
38378
|
+
];
|
|
38379
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
38380
|
+
return session;
|
|
38381
|
+
}
|
|
38382
|
+
};
|
|
38383
|
+
var http2Sessions = new Http2Sessions();
|
|
38313
38384
|
function dispatchBeforeRedirect(options, responseDetails) {
|
|
38314
38385
|
if (options.beforeRedirects.proxy) {
|
|
38315
38386
|
options.beforeRedirects.proxy(options);
|
|
@@ -38382,14 +38453,54 @@ var resolveFamily = ({ address, family }) => {
|
|
|
38382
38453
|
};
|
|
38383
38454
|
};
|
|
38384
38455
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
38456
|
+
var http2Transport = {
|
|
38457
|
+
request(options, cb) {
|
|
38458
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
38459
|
+
const { http2Options, headers } = options;
|
|
38460
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
38461
|
+
const {
|
|
38462
|
+
HTTP2_HEADER_SCHEME,
|
|
38463
|
+
HTTP2_HEADER_METHOD,
|
|
38464
|
+
HTTP2_HEADER_PATH,
|
|
38465
|
+
HTTP2_HEADER_STATUS
|
|
38466
|
+
} = http22.constants;
|
|
38467
|
+
const http2Headers = {
|
|
38468
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
38469
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
38470
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
38471
|
+
};
|
|
38472
|
+
utils_default.forEach(headers, (header, name) => {
|
|
38473
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
38474
|
+
});
|
|
38475
|
+
const req = session.request(http2Headers);
|
|
38476
|
+
req.once("response", (responseHeaders) => {
|
|
38477
|
+
const response = req;
|
|
38478
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
38479
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
38480
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
38481
|
+
response.headers = responseHeaders;
|
|
38482
|
+
response.statusCode = +status;
|
|
38483
|
+
cb(response);
|
|
38484
|
+
});
|
|
38485
|
+
return req;
|
|
38486
|
+
}
|
|
38487
|
+
};
|
|
38385
38488
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
38386
38489
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
38387
|
-
let { data, lookup, family } = config;
|
|
38490
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
38388
38491
|
const { responseType, responseEncoding } = config;
|
|
38389
38492
|
const method = config.method.toUpperCase();
|
|
38390
38493
|
let isDone;
|
|
38391
38494
|
let rejected = false;
|
|
38392
38495
|
let req;
|
|
38496
|
+
httpVersion = +httpVersion;
|
|
38497
|
+
if (Number.isNaN(httpVersion)) {
|
|
38498
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
38499
|
+
}
|
|
38500
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
38501
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
38502
|
+
}
|
|
38503
|
+
const isHttp2 = httpVersion === 2;
|
|
38393
38504
|
if (lookup) {
|
|
38394
38505
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
38395
38506
|
lookup = (hostname, opt, cb) => {
|
|
@@ -38402,7 +38513,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38402
38513
|
});
|
|
38403
38514
|
};
|
|
38404
38515
|
}
|
|
38405
|
-
const
|
|
38516
|
+
const abortEmitter = new EventEmitter();
|
|
38517
|
+
function abort(reason) {
|
|
38518
|
+
try {
|
|
38519
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
38520
|
+
} catch (err) {
|
|
38521
|
+
console.warn("emit error", err);
|
|
38522
|
+
}
|
|
38523
|
+
}
|
|
38524
|
+
abortEmitter.once("abort", reject);
|
|
38406
38525
|
const onFinished = () => {
|
|
38407
38526
|
if (config.cancelToken) {
|
|
38408
38527
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -38410,25 +38529,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38410
38529
|
if (config.signal) {
|
|
38411
38530
|
config.signal.removeEventListener("abort", abort);
|
|
38412
38531
|
}
|
|
38413
|
-
|
|
38532
|
+
abortEmitter.removeAllListeners();
|
|
38414
38533
|
};
|
|
38415
|
-
onDone((value, isRejected) => {
|
|
38416
|
-
isDone = true;
|
|
38417
|
-
if (isRejected) {
|
|
38418
|
-
rejected = true;
|
|
38419
|
-
onFinished();
|
|
38420
|
-
}
|
|
38421
|
-
});
|
|
38422
|
-
function abort(reason) {
|
|
38423
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
38424
|
-
}
|
|
38425
|
-
emitter.once("abort", reject);
|
|
38426
38534
|
if (config.cancelToken || config.signal) {
|
|
38427
38535
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
38428
38536
|
if (config.signal) {
|
|
38429
38537
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
38430
38538
|
}
|
|
38431
38539
|
}
|
|
38540
|
+
onDone((response, isRejected) => {
|
|
38541
|
+
isDone = true;
|
|
38542
|
+
if (isRejected) {
|
|
38543
|
+
rejected = true;
|
|
38544
|
+
onFinished();
|
|
38545
|
+
return;
|
|
38546
|
+
}
|
|
38547
|
+
const { data: data2 } = response;
|
|
38548
|
+
if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) {
|
|
38549
|
+
const offListeners = stream3.finished(data2, () => {
|
|
38550
|
+
offListeners();
|
|
38551
|
+
onFinished();
|
|
38552
|
+
});
|
|
38553
|
+
} else {
|
|
38554
|
+
onFinished();
|
|
38555
|
+
}
|
|
38556
|
+
});
|
|
38432
38557
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
38433
38558
|
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
38434
38559
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
@@ -38594,7 +38719,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38594
38719
|
protocol,
|
|
38595
38720
|
family,
|
|
38596
38721
|
beforeRedirect: dispatchBeforeRedirect,
|
|
38597
|
-
beforeRedirects: {}
|
|
38722
|
+
beforeRedirects: {},
|
|
38723
|
+
http2Options
|
|
38598
38724
|
};
|
|
38599
38725
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
38600
38726
|
if (config.socketPath) {
|
|
@@ -38607,18 +38733,22 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38607
38733
|
let transport;
|
|
38608
38734
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
38609
38735
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
38610
|
-
if (
|
|
38611
|
-
transport =
|
|
38612
|
-
} else if (config.maxRedirects === 0) {
|
|
38613
|
-
transport = isHttpsRequest ? https2 : http2;
|
|
38736
|
+
if (isHttp2) {
|
|
38737
|
+
transport = http2Transport;
|
|
38614
38738
|
} else {
|
|
38615
|
-
if (config.
|
|
38616
|
-
|
|
38617
|
-
}
|
|
38618
|
-
|
|
38619
|
-
|
|
38739
|
+
if (config.transport) {
|
|
38740
|
+
transport = config.transport;
|
|
38741
|
+
} else if (config.maxRedirects === 0) {
|
|
38742
|
+
transport = isHttpsRequest ? https2 : http2;
|
|
38743
|
+
} else {
|
|
38744
|
+
if (config.maxRedirects) {
|
|
38745
|
+
options.maxRedirects = config.maxRedirects;
|
|
38746
|
+
}
|
|
38747
|
+
if (config.beforeRedirect) {
|
|
38748
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
38749
|
+
}
|
|
38750
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
38620
38751
|
}
|
|
38621
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
38622
38752
|
}
|
|
38623
38753
|
if (config.maxBodyLength > -1) {
|
|
38624
38754
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -38631,7 +38761,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38631
38761
|
req = transport.request(options, function handleResponse(res) {
|
|
38632
38762
|
if (req.destroyed) return;
|
|
38633
38763
|
const streams2 = [res];
|
|
38634
|
-
const responseLength =
|
|
38764
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
38635
38765
|
if (onDownloadProgress || maxDownloadRate) {
|
|
38636
38766
|
const transformStream = new AxiosTransformStream_default({
|
|
38637
38767
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
@@ -38673,10 +38803,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38673
38803
|
}
|
|
38674
38804
|
}
|
|
38675
38805
|
responseStream = streams2.length > 1 ? stream3.pipeline(streams2, utils_default.noop) : streams2[0];
|
|
38676
|
-
const offListeners = stream3.finished(responseStream, () => {
|
|
38677
|
-
offListeners();
|
|
38678
|
-
onFinished();
|
|
38679
|
-
});
|
|
38680
38806
|
const response = {
|
|
38681
38807
|
status: res.statusCode,
|
|
38682
38808
|
statusText: res.statusMessage,
|
|
@@ -38696,7 +38822,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38696
38822
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
38697
38823
|
rejected = true;
|
|
38698
38824
|
responseStream.destroy();
|
|
38699
|
-
|
|
38825
|
+
abort(new AxiosError_default(
|
|
38700
38826
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
38701
38827
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
38702
38828
|
config,
|
|
@@ -38737,16 +38863,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38737
38863
|
settle(resolve, reject, response);
|
|
38738
38864
|
});
|
|
38739
38865
|
}
|
|
38740
|
-
|
|
38866
|
+
abortEmitter.once("abort", (err) => {
|
|
38741
38867
|
if (!responseStream.destroyed) {
|
|
38742
38868
|
responseStream.emit("error", err);
|
|
38743
38869
|
responseStream.destroy();
|
|
38744
38870
|
}
|
|
38745
38871
|
});
|
|
38746
38872
|
});
|
|
38747
|
-
|
|
38748
|
-
|
|
38749
|
-
|
|
38873
|
+
abortEmitter.once("abort", (err) => {
|
|
38874
|
+
if (req.close) {
|
|
38875
|
+
req.close();
|
|
38876
|
+
} else {
|
|
38877
|
+
req.destroy(err);
|
|
38878
|
+
}
|
|
38750
38879
|
});
|
|
38751
38880
|
req.on("error", function handleRequestError(err) {
|
|
38752
38881
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -38757,7 +38886,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38757
38886
|
if (config.timeout) {
|
|
38758
38887
|
const timeout = parseInt(config.timeout, 10);
|
|
38759
38888
|
if (Number.isNaN(timeout)) {
|
|
38760
|
-
|
|
38889
|
+
abort(new AxiosError_default(
|
|
38761
38890
|
"error trying to parse `config.timeout` to int",
|
|
38762
38891
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
38763
38892
|
config,
|
|
@@ -38772,14 +38901,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38772
38901
|
if (config.timeoutErrorMessage) {
|
|
38773
38902
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
38774
38903
|
}
|
|
38775
|
-
|
|
38904
|
+
abort(new AxiosError_default(
|
|
38776
38905
|
timeoutErrorMessage,
|
|
38777
38906
|
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
38778
38907
|
config,
|
|
38779
38908
|
req
|
|
38780
38909
|
));
|
|
38781
|
-
abort();
|
|
38782
38910
|
});
|
|
38911
|
+
} else {
|
|
38912
|
+
req.setTimeout(0);
|
|
38783
38913
|
}
|
|
38784
38914
|
if (utils_default.isStream(data)) {
|
|
38785
38915
|
let ended = false;
|
|
@@ -38798,7 +38928,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
38798
38928
|
});
|
|
38799
38929
|
data.pipe(req);
|
|
38800
38930
|
} else {
|
|
38801
|
-
req.
|
|
38931
|
+
data && req.write(data);
|
|
38932
|
+
req.end();
|
|
38802
38933
|
}
|
|
38803
38934
|
});
|
|
38804
38935
|
};
|
|
@@ -38828,20 +38959,33 @@ init_define_PACKAGE_VERSIONS();
|
|
|
38828
38959
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
38829
38960
|
// Standard browser envs support document.cookie
|
|
38830
38961
|
{
|
|
38831
|
-
write(name, value, expires, path5, domain, secure) {
|
|
38832
|
-
|
|
38833
|
-
|
|
38834
|
-
utils_default.
|
|
38835
|
-
|
|
38836
|
-
|
|
38962
|
+
write(name, value, expires, path5, domain, secure, sameSite) {
|
|
38963
|
+
if (typeof document === "undefined") return;
|
|
38964
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
38965
|
+
if (utils_default.isNumber(expires)) {
|
|
38966
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
38967
|
+
}
|
|
38968
|
+
if (utils_default.isString(path5)) {
|
|
38969
|
+
cookie.push(`path=${path5}`);
|
|
38970
|
+
}
|
|
38971
|
+
if (utils_default.isString(domain)) {
|
|
38972
|
+
cookie.push(`domain=${domain}`);
|
|
38973
|
+
}
|
|
38974
|
+
if (secure === true) {
|
|
38975
|
+
cookie.push("secure");
|
|
38976
|
+
}
|
|
38977
|
+
if (utils_default.isString(sameSite)) {
|
|
38978
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
38979
|
+
}
|
|
38837
38980
|
document.cookie = cookie.join("; ");
|
|
38838
38981
|
},
|
|
38839
38982
|
read(name) {
|
|
38840
|
-
|
|
38841
|
-
|
|
38983
|
+
if (typeof document === "undefined") return null;
|
|
38984
|
+
const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
38985
|
+
return match2 ? decodeURIComponent(match2[1]) : null;
|
|
38842
38986
|
},
|
|
38843
38987
|
remove(name) {
|
|
38844
|
-
this.write(name, "", Date.now() - 864e5);
|
|
38988
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
38845
38989
|
}
|
|
38846
38990
|
}
|
|
38847
38991
|
) : (
|
|
@@ -39418,7 +39562,7 @@ var factory = (env2) => {
|
|
|
39418
39562
|
};
|
|
39419
39563
|
var seedCache = /* @__PURE__ */ new Map();
|
|
39420
39564
|
var getFetch = (config) => {
|
|
39421
|
-
let env2 = config
|
|
39565
|
+
let env2 = config && config.env || {};
|
|
39422
39566
|
const { fetch: fetch2, Request, Response } = env2;
|
|
39423
39567
|
const seeds = [
|
|
39424
39568
|
Request,
|
|
@@ -39455,40 +39599,49 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
39455
39599
|
});
|
|
39456
39600
|
var renderReason = (reason) => `- ${reason}`;
|
|
39457
39601
|
var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
39458
|
-
|
|
39459
|
-
|
|
39460
|
-
|
|
39461
|
-
|
|
39462
|
-
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39466
|
-
|
|
39467
|
-
|
|
39468
|
-
|
|
39469
|
-
|
|
39470
|
-
|
|
39471
|
-
|
|
39472
|
-
|
|
39473
|
-
|
|
39474
|
-
|
|
39475
|
-
|
|
39476
|
-
break;
|
|
39477
|
-
}
|
|
39478
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
39479
|
-
}
|
|
39480
|
-
if (!adapter2) {
|
|
39481
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
39482
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
39483
|
-
);
|
|
39484
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
39485
|
-
throw new AxiosError_default(
|
|
39486
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
39487
|
-
"ERR_NOT_SUPPORT"
|
|
39488
|
-
);
|
|
39602
|
+
function getAdapter(adapters, config) {
|
|
39603
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
39604
|
+
const { length } = adapters;
|
|
39605
|
+
let nameOrAdapter;
|
|
39606
|
+
let adapter2;
|
|
39607
|
+
const rejectedReasons = {};
|
|
39608
|
+
for (let i = 0; i < length; i++) {
|
|
39609
|
+
nameOrAdapter = adapters[i];
|
|
39610
|
+
let id;
|
|
39611
|
+
adapter2 = nameOrAdapter;
|
|
39612
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
39613
|
+
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
39614
|
+
if (adapter2 === void 0) {
|
|
39615
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
39616
|
+
}
|
|
39617
|
+
}
|
|
39618
|
+
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
39619
|
+
break;
|
|
39489
39620
|
}
|
|
39490
|
-
|
|
39491
|
-
}
|
|
39621
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
39622
|
+
}
|
|
39623
|
+
if (!adapter2) {
|
|
39624
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
39625
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
39626
|
+
);
|
|
39627
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
39628
|
+
throw new AxiosError_default(
|
|
39629
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
39630
|
+
"ERR_NOT_SUPPORT"
|
|
39631
|
+
);
|
|
39632
|
+
}
|
|
39633
|
+
return adapter2;
|
|
39634
|
+
}
|
|
39635
|
+
var adapters_default = {
|
|
39636
|
+
/**
|
|
39637
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
39638
|
+
* @type {Function}
|
|
39639
|
+
*/
|
|
39640
|
+
getAdapter,
|
|
39641
|
+
/**
|
|
39642
|
+
* Exposes all known adapters
|
|
39643
|
+
* @type {Object<string, Function|Object>}
|
|
39644
|
+
*/
|
|
39492
39645
|
adapters: knownAdapters
|
|
39493
39646
|
};
|
|
39494
39647
|
|
|
@@ -39957,7 +40110,13 @@ var HttpStatusCode = {
|
|
|
39957
40110
|
InsufficientStorage: 507,
|
|
39958
40111
|
LoopDetected: 508,
|
|
39959
40112
|
NotExtended: 510,
|
|
39960
|
-
NetworkAuthenticationRequired: 511
|
|
40113
|
+
NetworkAuthenticationRequired: 511,
|
|
40114
|
+
WebServerIsDown: 521,
|
|
40115
|
+
ConnectionTimedOut: 522,
|
|
40116
|
+
OriginIsUnreachable: 523,
|
|
40117
|
+
TimeoutOccurred: 524,
|
|
40118
|
+
SslHandshakeFailed: 525,
|
|
40119
|
+
InvalidSslCertificate: 526
|
|
39961
40120
|
};
|
|
39962
40121
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
39963
40122
|
HttpStatusCode[value] = key;
|
|
@@ -40013,7 +40172,7 @@ var {
|
|
|
40013
40172
|
AxiosHeaders: AxiosHeaders2,
|
|
40014
40173
|
HttpStatusCode: HttpStatusCode2,
|
|
40015
40174
|
formToJSON,
|
|
40016
|
-
getAdapter,
|
|
40175
|
+
getAdapter: getAdapter2,
|
|
40017
40176
|
mergeConfig: mergeConfig2
|
|
40018
40177
|
} = axios_default;
|
|
40019
40178
|
|
|
@@ -43484,6 +43643,7 @@ var BaseWorkflowInstance = class _BaseWorkflowInstance {
|
|
|
43484
43643
|
},
|
|
43485
43644
|
abort: () => {
|
|
43486
43645
|
workflowControlContext.aborted = true;
|
|
43646
|
+
workflowControlContext.acked = true;
|
|
43487
43647
|
},
|
|
43488
43648
|
fail: (reason) => {
|
|
43489
43649
|
workflowControlContext.failed = true;
|