@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/define-config.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { Autonomous } from './runtime/autonomous';
|
|
2
2
|
import { z } from '@botpress/sdk';
|
|
3
3
|
import type { Dependencies } from './_types/dependencies';
|
|
4
|
-
declare const configSchema: import("@
|
|
5
|
-
name: import("@
|
|
6
|
-
description: import("@
|
|
7
|
-
user: import("@
|
|
8
|
-
state: import("@
|
|
4
|
+
declare const configSchema: import("@botpress/sdk").ZodObject<{
|
|
5
|
+
name: import("@botpress/sdk").ZodOptional<import("@botpress/sdk").ZodString>;
|
|
6
|
+
description: import("@botpress/sdk").ZodOptional<import("@botpress/sdk").ZodString>;
|
|
7
|
+
user: import("@botpress/sdk").ZodOptional<import("@botpress/sdk").ZodObject<{
|
|
8
|
+
state: import("@botpress/sdk").ZodOptional<z.Schema<z.Schema<any, import("@botpress/sdk").ZodTypeDef, any>, import("@botpress/sdk").ZodTypeDef, z.Schema<any, import("@botpress/sdk").ZodTypeDef, any>>>;
|
|
9
9
|
}, "strip", {
|
|
10
|
-
state?: z.Schema<any, import("@
|
|
10
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
11
11
|
}, {
|
|
12
|
-
state?: z.Schema<any, import("@
|
|
12
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
13
13
|
}>>;
|
|
14
|
-
bot: import("@
|
|
15
|
-
state: import("@
|
|
14
|
+
bot: import("@botpress/sdk").ZodOptional<import("@botpress/sdk").ZodObject<{
|
|
15
|
+
state: import("@botpress/sdk").ZodOptional<z.Schema<z.Schema<any, import("@botpress/sdk").ZodTypeDef, any>, import("@botpress/sdk").ZodTypeDef, z.Schema<any, import("@botpress/sdk").ZodTypeDef, any>>>;
|
|
16
16
|
}, "strip", {
|
|
17
|
-
state?: z.Schema<any, import("@
|
|
17
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
18
18
|
}, {
|
|
19
|
-
state?: z.Schema<any, import("@
|
|
19
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
20
20
|
}>>;
|
|
21
|
-
defaultModels: z.ZodTransformer<import("@
|
|
22
|
-
zai: z.Schema<Autonomous.Model | Autonomous.Model[], import("@
|
|
23
|
-
autonomous: z.Schema<Autonomous.Model | Autonomous.Model[], import("@
|
|
21
|
+
defaultModels: z.ZodTransformer<import("@botpress/sdk").ZodOptional<import("@botpress/sdk").ZodObject<{
|
|
22
|
+
zai: z.Schema<Autonomous.Model | Autonomous.Model[], import("@botpress/sdk").ZodTypeDef, Autonomous.Model | Autonomous.Model[]>;
|
|
23
|
+
autonomous: z.Schema<Autonomous.Model | Autonomous.Model[], import("@botpress/sdk").ZodTypeDef, Autonomous.Model | Autonomous.Model[]>;
|
|
24
24
|
}, "strip", {
|
|
25
25
|
zai: Autonomous.Model | Autonomous.Model[];
|
|
26
26
|
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
@@ -34,7 +34,7 @@ declare const configSchema: import("@bpinternal/zui").ZodObject<{
|
|
|
34
34
|
zai: Autonomous.Model | Autonomous.Model[];
|
|
35
35
|
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
36
36
|
} | undefined>;
|
|
37
|
-
dependencies: z.Schema<Dependencies, import("@
|
|
37
|
+
dependencies: z.Schema<Dependencies, import("@botpress/sdk").ZodTypeDef, Dependencies>;
|
|
38
38
|
}, "strip", {
|
|
39
39
|
defaultModels: {
|
|
40
40
|
zai: Autonomous.Model | Autonomous.Model[];
|
|
@@ -44,20 +44,20 @@ declare const configSchema: import("@bpinternal/zui").ZodObject<{
|
|
|
44
44
|
description?: string | undefined;
|
|
45
45
|
name?: string | undefined;
|
|
46
46
|
user?: {
|
|
47
|
-
state?: z.Schema<any, import("@
|
|
47
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
48
48
|
} | undefined;
|
|
49
49
|
bot?: {
|
|
50
|
-
state?: z.Schema<any, import("@
|
|
50
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
51
51
|
} | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
dependencies: Dependencies;
|
|
54
54
|
description?: string | undefined;
|
|
55
55
|
name?: string | undefined;
|
|
56
56
|
user?: {
|
|
57
|
-
state?: z.Schema<any, import("@
|
|
57
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
58
58
|
} | undefined;
|
|
59
59
|
bot?: {
|
|
60
|
-
state?: z.Schema<any, import("@
|
|
60
|
+
state?: z.Schema<any, import("@botpress/sdk").ZodTypeDef, any> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
defaultModels?: {
|
|
63
63
|
zai: Autonomous.Model | Autonomous.Model[];
|
package/dist/definition.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
|
|
|
@@ -10113,7 +10113,7 @@ var require_form_data = __commonJS({
|
|
|
10113
10113
|
var CombinedStream = require_combined_stream();
|
|
10114
10114
|
var util3 = __require("util");
|
|
10115
10115
|
var path4 = __require("path");
|
|
10116
|
-
var
|
|
10116
|
+
var http4 = __require("http");
|
|
10117
10117
|
var https3 = __require("https");
|
|
10118
10118
|
var parseUrl = __require("url").parse;
|
|
10119
10119
|
var fs3 = __require("fs");
|
|
@@ -10385,7 +10385,7 @@ var require_form_data = __commonJS({
|
|
|
10385
10385
|
if (options.protocol === "https:") {
|
|
10386
10386
|
request = https3.request(options);
|
|
10387
10387
|
} else {
|
|
10388
|
-
request =
|
|
10388
|
+
request = http4.request(options);
|
|
10389
10389
|
}
|
|
10390
10390
|
this.getLength(function(err, length) {
|
|
10391
10391
|
if (err && err !== "Unknown stream") {
|
|
@@ -11303,7 +11303,7 @@ var require_follow_redirects = __commonJS({
|
|
|
11303
11303
|
init_define_PACKAGE_VERSIONS();
|
|
11304
11304
|
var url2 = __require("url");
|
|
11305
11305
|
var URL2 = url2.URL;
|
|
11306
|
-
var
|
|
11306
|
+
var http4 = __require("http");
|
|
11307
11307
|
var https3 = __require("https");
|
|
11308
11308
|
var Writable = __require("stream").Writable;
|
|
11309
11309
|
var assert3 = __require("assert");
|
|
@@ -11789,7 +11789,7 @@ var require_follow_redirects = __commonJS({
|
|
|
11789
11789
|
function isURL(value) {
|
|
11790
11790
|
return URL2 && value instanceof URL2;
|
|
11791
11791
|
}
|
|
11792
|
-
module.exports = wrap({ http:
|
|
11792
|
+
module.exports = wrap({ http: http4, https: https3 });
|
|
11793
11793
|
module.exports.wrap = wrap;
|
|
11794
11794
|
}
|
|
11795
11795
|
});
|
|
@@ -35047,7 +35047,7 @@ var InterceptorManager = class {
|
|
|
35047
35047
|
*
|
|
35048
35048
|
* @param {Number} id The ID that was returned by `use`
|
|
35049
35049
|
*
|
|
35050
|
-
* @returns {
|
|
35050
|
+
* @returns {void}
|
|
35051
35051
|
*/
|
|
35052
35052
|
eject(id) {
|
|
35053
35053
|
if (this.handlers[id]) {
|
|
@@ -35728,13 +35728,14 @@ var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
|
35728
35728
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
35729
35729
|
import http from "http";
|
|
35730
35730
|
import https from "https";
|
|
35731
|
+
import http2 from "http2";
|
|
35731
35732
|
import util2 from "util";
|
|
35732
35733
|
import zlib from "zlib";
|
|
35733
35734
|
|
|
35734
35735
|
// ../../node_modules/axios/lib/env/data.js
|
|
35735
35736
|
init_define_BUILD();
|
|
35736
35737
|
init_define_PACKAGE_VERSIONS();
|
|
35737
|
-
var VERSION = "1.
|
|
35738
|
+
var VERSION = "1.13.2";
|
|
35738
35739
|
|
|
35739
35740
|
// ../../node_modules/axios/lib/helpers/fromDataURI.js
|
|
35740
35741
|
init_define_BUILD();
|
|
@@ -36229,6 +36230,76 @@ var flushOnFinish = (stream5, [throttled, flush]) => {
|
|
|
36229
36230
|
stream5.on("end", flush).on("error", flush);
|
|
36230
36231
|
return throttled;
|
|
36231
36232
|
};
|
|
36233
|
+
var Http2Sessions = class {
|
|
36234
|
+
constructor() {
|
|
36235
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
36236
|
+
}
|
|
36237
|
+
getSession(authority, options) {
|
|
36238
|
+
options = Object.assign({
|
|
36239
|
+
sessionTimeout: 1e3
|
|
36240
|
+
}, options);
|
|
36241
|
+
let authoritySessions = this.sessions[authority];
|
|
36242
|
+
if (authoritySessions) {
|
|
36243
|
+
let len = authoritySessions.length;
|
|
36244
|
+
for (let i = 0; i < len; i++) {
|
|
36245
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
36246
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
36247
|
+
return sessionHandle;
|
|
36248
|
+
}
|
|
36249
|
+
}
|
|
36250
|
+
}
|
|
36251
|
+
const session = http2.connect(authority, options);
|
|
36252
|
+
let removed;
|
|
36253
|
+
const removeSession = () => {
|
|
36254
|
+
if (removed) {
|
|
36255
|
+
return;
|
|
36256
|
+
}
|
|
36257
|
+
removed = true;
|
|
36258
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
36259
|
+
while (i--) {
|
|
36260
|
+
if (entries[i][0] === session) {
|
|
36261
|
+
if (len === 1) {
|
|
36262
|
+
delete this.sessions[authority];
|
|
36263
|
+
} else {
|
|
36264
|
+
entries.splice(i, 1);
|
|
36265
|
+
}
|
|
36266
|
+
return;
|
|
36267
|
+
}
|
|
36268
|
+
}
|
|
36269
|
+
};
|
|
36270
|
+
const originalRequestFn = session.request;
|
|
36271
|
+
const { sessionTimeout } = options;
|
|
36272
|
+
if (sessionTimeout != null) {
|
|
36273
|
+
let timer;
|
|
36274
|
+
let streamsCount = 0;
|
|
36275
|
+
session.request = function() {
|
|
36276
|
+
const stream5 = originalRequestFn.apply(this, arguments);
|
|
36277
|
+
streamsCount++;
|
|
36278
|
+
if (timer) {
|
|
36279
|
+
clearTimeout(timer);
|
|
36280
|
+
timer = null;
|
|
36281
|
+
}
|
|
36282
|
+
stream5.once("close", () => {
|
|
36283
|
+
if (!--streamsCount) {
|
|
36284
|
+
timer = setTimeout(() => {
|
|
36285
|
+
timer = null;
|
|
36286
|
+
removeSession();
|
|
36287
|
+
}, sessionTimeout);
|
|
36288
|
+
}
|
|
36289
|
+
});
|
|
36290
|
+
return stream5;
|
|
36291
|
+
};
|
|
36292
|
+
}
|
|
36293
|
+
session.once("close", removeSession);
|
|
36294
|
+
let entry = [
|
|
36295
|
+
session,
|
|
36296
|
+
options
|
|
36297
|
+
];
|
|
36298
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
36299
|
+
return session;
|
|
36300
|
+
}
|
|
36301
|
+
};
|
|
36302
|
+
var http2Sessions = new Http2Sessions();
|
|
36232
36303
|
function dispatchBeforeRedirect(options, responseDetails) {
|
|
36233
36304
|
if (options.beforeRedirects.proxy) {
|
|
36234
36305
|
options.beforeRedirects.proxy(options);
|
|
@@ -36301,14 +36372,54 @@ var resolveFamily = ({ address, family }) => {
|
|
|
36301
36372
|
};
|
|
36302
36373
|
};
|
|
36303
36374
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
36375
|
+
var http2Transport = {
|
|
36376
|
+
request(options, cb) {
|
|
36377
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
36378
|
+
const { http2Options, headers } = options;
|
|
36379
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
36380
|
+
const {
|
|
36381
|
+
HTTP2_HEADER_SCHEME,
|
|
36382
|
+
HTTP2_HEADER_METHOD,
|
|
36383
|
+
HTTP2_HEADER_PATH,
|
|
36384
|
+
HTTP2_HEADER_STATUS
|
|
36385
|
+
} = http2.constants;
|
|
36386
|
+
const http2Headers = {
|
|
36387
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
36388
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
36389
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
36390
|
+
};
|
|
36391
|
+
utils_default.forEach(headers, (header, name) => {
|
|
36392
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
36393
|
+
});
|
|
36394
|
+
const req = session.request(http2Headers);
|
|
36395
|
+
req.once("response", (responseHeaders) => {
|
|
36396
|
+
const response = req;
|
|
36397
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
36398
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
36399
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
36400
|
+
response.headers = responseHeaders;
|
|
36401
|
+
response.statusCode = +status;
|
|
36402
|
+
cb(response);
|
|
36403
|
+
});
|
|
36404
|
+
return req;
|
|
36405
|
+
}
|
|
36406
|
+
};
|
|
36304
36407
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
36305
36408
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
36306
|
-
let { data, lookup, family } = config;
|
|
36409
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
36307
36410
|
const { responseType, responseEncoding } = config;
|
|
36308
36411
|
const method = config.method.toUpperCase();
|
|
36309
36412
|
let isDone;
|
|
36310
36413
|
let rejected = false;
|
|
36311
36414
|
let req;
|
|
36415
|
+
httpVersion = +httpVersion;
|
|
36416
|
+
if (Number.isNaN(httpVersion)) {
|
|
36417
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
36418
|
+
}
|
|
36419
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
36420
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
36421
|
+
}
|
|
36422
|
+
const isHttp2 = httpVersion === 2;
|
|
36312
36423
|
if (lookup) {
|
|
36313
36424
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
36314
36425
|
lookup = (hostname, opt, cb) => {
|
|
@@ -36321,7 +36432,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36321
36432
|
});
|
|
36322
36433
|
};
|
|
36323
36434
|
}
|
|
36324
|
-
const
|
|
36435
|
+
const abortEmitter = new EventEmitter();
|
|
36436
|
+
function abort(reason) {
|
|
36437
|
+
try {
|
|
36438
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
36439
|
+
} catch (err) {
|
|
36440
|
+
console.warn("emit error", err);
|
|
36441
|
+
}
|
|
36442
|
+
}
|
|
36443
|
+
abortEmitter.once("abort", reject);
|
|
36325
36444
|
const onFinished = () => {
|
|
36326
36445
|
if (config.cancelToken) {
|
|
36327
36446
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -36329,25 +36448,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36329
36448
|
if (config.signal) {
|
|
36330
36449
|
config.signal.removeEventListener("abort", abort);
|
|
36331
36450
|
}
|
|
36332
|
-
|
|
36451
|
+
abortEmitter.removeAllListeners();
|
|
36333
36452
|
};
|
|
36334
|
-
onDone((value, isRejected) => {
|
|
36335
|
-
isDone = true;
|
|
36336
|
-
if (isRejected) {
|
|
36337
|
-
rejected = true;
|
|
36338
|
-
onFinished();
|
|
36339
|
-
}
|
|
36340
|
-
});
|
|
36341
|
-
function abort(reason) {
|
|
36342
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
36343
|
-
}
|
|
36344
|
-
emitter.once("abort", reject);
|
|
36345
36453
|
if (config.cancelToken || config.signal) {
|
|
36346
36454
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
36347
36455
|
if (config.signal) {
|
|
36348
36456
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
36349
36457
|
}
|
|
36350
36458
|
}
|
|
36459
|
+
onDone((response, isRejected) => {
|
|
36460
|
+
isDone = true;
|
|
36461
|
+
if (isRejected) {
|
|
36462
|
+
rejected = true;
|
|
36463
|
+
onFinished();
|
|
36464
|
+
return;
|
|
36465
|
+
}
|
|
36466
|
+
const { data: data2 } = response;
|
|
36467
|
+
if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) {
|
|
36468
|
+
const offListeners = stream3.finished(data2, () => {
|
|
36469
|
+
offListeners();
|
|
36470
|
+
onFinished();
|
|
36471
|
+
});
|
|
36472
|
+
} else {
|
|
36473
|
+
onFinished();
|
|
36474
|
+
}
|
|
36475
|
+
});
|
|
36351
36476
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
36352
36477
|
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
36353
36478
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
@@ -36513,7 +36638,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36513
36638
|
protocol,
|
|
36514
36639
|
family,
|
|
36515
36640
|
beforeRedirect: dispatchBeforeRedirect,
|
|
36516
|
-
beforeRedirects: {}
|
|
36641
|
+
beforeRedirects: {},
|
|
36642
|
+
http2Options
|
|
36517
36643
|
};
|
|
36518
36644
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
36519
36645
|
if (config.socketPath) {
|
|
@@ -36526,18 +36652,22 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36526
36652
|
let transport;
|
|
36527
36653
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
36528
36654
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
36529
|
-
if (
|
|
36530
|
-
transport =
|
|
36531
|
-
} else if (config.maxRedirects === 0) {
|
|
36532
|
-
transport = isHttpsRequest ? https : http;
|
|
36655
|
+
if (isHttp2) {
|
|
36656
|
+
transport = http2Transport;
|
|
36533
36657
|
} else {
|
|
36534
|
-
if (config.
|
|
36535
|
-
|
|
36536
|
-
}
|
|
36537
|
-
|
|
36538
|
-
|
|
36658
|
+
if (config.transport) {
|
|
36659
|
+
transport = config.transport;
|
|
36660
|
+
} else if (config.maxRedirects === 0) {
|
|
36661
|
+
transport = isHttpsRequest ? https : http;
|
|
36662
|
+
} else {
|
|
36663
|
+
if (config.maxRedirects) {
|
|
36664
|
+
options.maxRedirects = config.maxRedirects;
|
|
36665
|
+
}
|
|
36666
|
+
if (config.beforeRedirect) {
|
|
36667
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
36668
|
+
}
|
|
36669
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
36539
36670
|
}
|
|
36540
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
36541
36671
|
}
|
|
36542
36672
|
if (config.maxBodyLength > -1) {
|
|
36543
36673
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -36550,7 +36680,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36550
36680
|
req = transport.request(options, function handleResponse(res) {
|
|
36551
36681
|
if (req.destroyed) return;
|
|
36552
36682
|
const streams2 = [res];
|
|
36553
|
-
const responseLength =
|
|
36683
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
36554
36684
|
if (onDownloadProgress || maxDownloadRate) {
|
|
36555
36685
|
const transformStream = new AxiosTransformStream_default({
|
|
36556
36686
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
@@ -36592,10 +36722,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36592
36722
|
}
|
|
36593
36723
|
}
|
|
36594
36724
|
responseStream = streams2.length > 1 ? stream3.pipeline(streams2, utils_default.noop) : streams2[0];
|
|
36595
|
-
const offListeners = stream3.finished(responseStream, () => {
|
|
36596
|
-
offListeners();
|
|
36597
|
-
onFinished();
|
|
36598
|
-
});
|
|
36599
36725
|
const response = {
|
|
36600
36726
|
status: res.statusCode,
|
|
36601
36727
|
statusText: res.statusMessage,
|
|
@@ -36615,7 +36741,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36615
36741
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
36616
36742
|
rejected = true;
|
|
36617
36743
|
responseStream.destroy();
|
|
36618
|
-
|
|
36744
|
+
abort(new AxiosError_default(
|
|
36619
36745
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
36620
36746
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
36621
36747
|
config,
|
|
@@ -36656,16 +36782,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36656
36782
|
settle(resolve, reject, response);
|
|
36657
36783
|
});
|
|
36658
36784
|
}
|
|
36659
|
-
|
|
36785
|
+
abortEmitter.once("abort", (err) => {
|
|
36660
36786
|
if (!responseStream.destroyed) {
|
|
36661
36787
|
responseStream.emit("error", err);
|
|
36662
36788
|
responseStream.destroy();
|
|
36663
36789
|
}
|
|
36664
36790
|
});
|
|
36665
36791
|
});
|
|
36666
|
-
|
|
36667
|
-
|
|
36668
|
-
|
|
36792
|
+
abortEmitter.once("abort", (err) => {
|
|
36793
|
+
if (req.close) {
|
|
36794
|
+
req.close();
|
|
36795
|
+
} else {
|
|
36796
|
+
req.destroy(err);
|
|
36797
|
+
}
|
|
36669
36798
|
});
|
|
36670
36799
|
req.on("error", function handleRequestError(err) {
|
|
36671
36800
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -36676,7 +36805,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36676
36805
|
if (config.timeout) {
|
|
36677
36806
|
const timeout = parseInt(config.timeout, 10);
|
|
36678
36807
|
if (Number.isNaN(timeout)) {
|
|
36679
|
-
|
|
36808
|
+
abort(new AxiosError_default(
|
|
36680
36809
|
"error trying to parse `config.timeout` to int",
|
|
36681
36810
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
36682
36811
|
config,
|
|
@@ -36691,14 +36820,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36691
36820
|
if (config.timeoutErrorMessage) {
|
|
36692
36821
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
36693
36822
|
}
|
|
36694
|
-
|
|
36823
|
+
abort(new AxiosError_default(
|
|
36695
36824
|
timeoutErrorMessage,
|
|
36696
36825
|
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
36697
36826
|
config,
|
|
36698
36827
|
req
|
|
36699
36828
|
));
|
|
36700
|
-
abort();
|
|
36701
36829
|
});
|
|
36830
|
+
} else {
|
|
36831
|
+
req.setTimeout(0);
|
|
36702
36832
|
}
|
|
36703
36833
|
if (utils_default.isStream(data)) {
|
|
36704
36834
|
let ended = false;
|
|
@@ -36717,7 +36847,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
36717
36847
|
});
|
|
36718
36848
|
data.pipe(req);
|
|
36719
36849
|
} else {
|
|
36720
|
-
req.
|
|
36850
|
+
data && req.write(data);
|
|
36851
|
+
req.end();
|
|
36721
36852
|
}
|
|
36722
36853
|
});
|
|
36723
36854
|
};
|
|
@@ -36747,20 +36878,33 @@ init_define_PACKAGE_VERSIONS();
|
|
|
36747
36878
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
36748
36879
|
// Standard browser envs support document.cookie
|
|
36749
36880
|
{
|
|
36750
|
-
write(name, value, expires, path4, domain, secure) {
|
|
36751
|
-
|
|
36752
|
-
|
|
36753
|
-
utils_default.
|
|
36754
|
-
|
|
36755
|
-
|
|
36881
|
+
write(name, value, expires, path4, domain, secure, sameSite) {
|
|
36882
|
+
if (typeof document === "undefined") return;
|
|
36883
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
36884
|
+
if (utils_default.isNumber(expires)) {
|
|
36885
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
36886
|
+
}
|
|
36887
|
+
if (utils_default.isString(path4)) {
|
|
36888
|
+
cookie.push(`path=${path4}`);
|
|
36889
|
+
}
|
|
36890
|
+
if (utils_default.isString(domain)) {
|
|
36891
|
+
cookie.push(`domain=${domain}`);
|
|
36892
|
+
}
|
|
36893
|
+
if (secure === true) {
|
|
36894
|
+
cookie.push("secure");
|
|
36895
|
+
}
|
|
36896
|
+
if (utils_default.isString(sameSite)) {
|
|
36897
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
36898
|
+
}
|
|
36756
36899
|
document.cookie = cookie.join("; ");
|
|
36757
36900
|
},
|
|
36758
36901
|
read(name) {
|
|
36759
|
-
|
|
36760
|
-
|
|
36902
|
+
if (typeof document === "undefined") return null;
|
|
36903
|
+
const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
36904
|
+
return match2 ? decodeURIComponent(match2[1]) : null;
|
|
36761
36905
|
},
|
|
36762
36906
|
remove(name) {
|
|
36763
|
-
this.write(name, "", Date.now() - 864e5);
|
|
36907
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
36764
36908
|
}
|
|
36765
36909
|
}
|
|
36766
36910
|
) : (
|
|
@@ -37337,7 +37481,7 @@ var factory = (env2) => {
|
|
|
37337
37481
|
};
|
|
37338
37482
|
var seedCache = /* @__PURE__ */ new Map();
|
|
37339
37483
|
var getFetch = (config) => {
|
|
37340
|
-
let env2 = config
|
|
37484
|
+
let env2 = config && config.env || {};
|
|
37341
37485
|
const { fetch: fetch2, Request, Response } = env2;
|
|
37342
37486
|
const seeds = [
|
|
37343
37487
|
Request,
|
|
@@ -37374,40 +37518,49 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
37374
37518
|
});
|
|
37375
37519
|
var renderReason = (reason) => `- ${reason}`;
|
|
37376
37520
|
var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
37377
|
-
|
|
37378
|
-
|
|
37379
|
-
|
|
37380
|
-
|
|
37381
|
-
|
|
37382
|
-
|
|
37383
|
-
|
|
37384
|
-
|
|
37385
|
-
|
|
37386
|
-
|
|
37387
|
-
|
|
37388
|
-
|
|
37389
|
-
|
|
37390
|
-
|
|
37391
|
-
|
|
37392
|
-
|
|
37393
|
-
|
|
37394
|
-
|
|
37395
|
-
break;
|
|
37396
|
-
}
|
|
37397
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
37398
|
-
}
|
|
37399
|
-
if (!adapter2) {
|
|
37400
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
37401
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
37402
|
-
);
|
|
37403
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
37404
|
-
throw new AxiosError_default(
|
|
37405
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
37406
|
-
"ERR_NOT_SUPPORT"
|
|
37407
|
-
);
|
|
37521
|
+
function getAdapter(adapters, config) {
|
|
37522
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
37523
|
+
const { length } = adapters;
|
|
37524
|
+
let nameOrAdapter;
|
|
37525
|
+
let adapter2;
|
|
37526
|
+
const rejectedReasons = {};
|
|
37527
|
+
for (let i = 0; i < length; i++) {
|
|
37528
|
+
nameOrAdapter = adapters[i];
|
|
37529
|
+
let id;
|
|
37530
|
+
adapter2 = nameOrAdapter;
|
|
37531
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
37532
|
+
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
37533
|
+
if (adapter2 === void 0) {
|
|
37534
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
37535
|
+
}
|
|
37536
|
+
}
|
|
37537
|
+
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
37538
|
+
break;
|
|
37408
37539
|
}
|
|
37409
|
-
|
|
37410
|
-
}
|
|
37540
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
37541
|
+
}
|
|
37542
|
+
if (!adapter2) {
|
|
37543
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
37544
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
37545
|
+
);
|
|
37546
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
37547
|
+
throw new AxiosError_default(
|
|
37548
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
37549
|
+
"ERR_NOT_SUPPORT"
|
|
37550
|
+
);
|
|
37551
|
+
}
|
|
37552
|
+
return adapter2;
|
|
37553
|
+
}
|
|
37554
|
+
var adapters_default = {
|
|
37555
|
+
/**
|
|
37556
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
37557
|
+
* @type {Function}
|
|
37558
|
+
*/
|
|
37559
|
+
getAdapter,
|
|
37560
|
+
/**
|
|
37561
|
+
* Exposes all known adapters
|
|
37562
|
+
* @type {Object<string, Function|Object>}
|
|
37563
|
+
*/
|
|
37411
37564
|
adapters: knownAdapters
|
|
37412
37565
|
};
|
|
37413
37566
|
|
|
@@ -37876,7 +38029,13 @@ var HttpStatusCode = {
|
|
|
37876
38029
|
InsufficientStorage: 507,
|
|
37877
38030
|
LoopDetected: 508,
|
|
37878
38031
|
NotExtended: 510,
|
|
37879
|
-
NetworkAuthenticationRequired: 511
|
|
38032
|
+
NetworkAuthenticationRequired: 511,
|
|
38033
|
+
WebServerIsDown: 521,
|
|
38034
|
+
ConnectionTimedOut: 522,
|
|
38035
|
+
OriginIsUnreachable: 523,
|
|
38036
|
+
TimeoutOccurred: 524,
|
|
38037
|
+
SslHandshakeFailed: 525,
|
|
38038
|
+
InvalidSslCertificate: 526
|
|
37880
38039
|
};
|
|
37881
38040
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
37882
38041
|
HttpStatusCode[value] = key;
|
|
@@ -37932,7 +38091,7 @@ var {
|
|
|
37932
38091
|
AxiosHeaders: AxiosHeaders2,
|
|
37933
38092
|
HttpStatusCode: HttpStatusCode2,
|
|
37934
38093
|
formToJSON,
|
|
37935
|
-
getAdapter,
|
|
38094
|
+
getAdapter: getAdapter2,
|
|
37936
38095
|
mergeConfig: mergeConfig2
|
|
37937
38096
|
} = axios_default;
|
|
37938
38097
|
|
|
@@ -38360,7 +38519,7 @@ init_define_BUILD();
|
|
|
38360
38519
|
init_define_PACKAGE_VERSIONS();
|
|
38361
38520
|
init_esm();
|
|
38362
38521
|
import { randomBytes } from "node:crypto";
|
|
38363
|
-
import
|
|
38522
|
+
import http3 from "node:http";
|
|
38364
38523
|
import https2 from "node:https";
|
|
38365
38524
|
import { Dispatcher, getGlobalDispatcher, setGlobalDispatcher } from "undici";
|
|
38366
38525
|
init_esm();
|
|
@@ -38524,16 +38683,16 @@ function installHttpClientInstrumentation({ injectTraceHeader = true } = {}) {
|
|
|
38524
38683
|
};
|
|
38525
38684
|
var wrapRequest = wrapRequest2;
|
|
38526
38685
|
const orig = {
|
|
38527
|
-
httpRequest:
|
|
38528
|
-
httpGet:
|
|
38686
|
+
httpRequest: http3.request,
|
|
38687
|
+
httpGet: http3.get,
|
|
38529
38688
|
httpsRequest: https2.request,
|
|
38530
38689
|
httpsGet: https2.get
|
|
38531
38690
|
};
|
|
38532
38691
|
;
|
|
38533
|
-
|
|
38692
|
+
http3.request = wrapRequest2(orig.httpRequest);
|
|
38534
38693
|
https2.request = wrapRequest2(orig.httpsRequest);
|
|
38535
|
-
|
|
38536
|
-
const r =
|
|
38694
|
+
http3.get = function wrappedGet(...a) {
|
|
38695
|
+
const r = http3.request(...a);
|
|
38537
38696
|
r.end();
|
|
38538
38697
|
return r;
|
|
38539
38698
|
};
|
|
@@ -38543,8 +38702,8 @@ function installHttpClientInstrumentation({ injectTraceHeader = true } = {}) {
|
|
|
38543
38702
|
return r;
|
|
38544
38703
|
};
|
|
38545
38704
|
restores.push(() => {
|
|
38546
|
-
|
|
38547
|
-
|
|
38705
|
+
http3.request = orig.httpRequest;
|
|
38706
|
+
http3.get = orig.httpGet;
|
|
38548
38707
|
https2.request = orig.httpsRequest;
|
|
38549
38708
|
https2.get = orig.httpsGet;
|
|
38550
38709
|
});
|
|
@@ -44275,6 +44434,7 @@ var BaseWorkflowInstance = class _BaseWorkflowInstance {
|
|
|
44275
44434
|
},
|
|
44276
44435
|
abort: () => {
|
|
44277
44436
|
workflowControlContext.aborted = true;
|
|
44437
|
+
workflowControlContext.acked = true;
|
|
44278
44438
|
},
|
|
44279
44439
|
fail: (reason) => {
|
|
44280
44440
|
workflowControlContext.failed = true;
|