@nemesis-oss/ollama-sdk 1.4.0 → 1.4.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/generated-api.cjs +54 -11
- package/dist/generated-api.cjs.map +1 -1
- package/dist/generated-api.js +54 -11
- package/dist/generated-api.js.map +1 -1
- package/dist/generated-models-schemas.cjs +192 -192
- package/dist/generated-models-schemas.cjs.map +1 -1
- package/dist/generated-models-schemas.js +192 -192
- package/dist/generated-models-schemas.js.map +1 -1
- package/dist/generated-runtime.cjs +68 -8
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.js +68 -8
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +245 -144
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +245 -144
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.json +19 -70
- package/dist/mcp-generated.cjs +54 -11
- package/dist/mcp-generated.cjs.map +1 -1
- package/dist/mcp-generated.js +54 -11
- package/dist/mcp-generated.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
4
|
+
var __typeError = (msg) => {
|
|
5
|
+
throw TypeError(msg);
|
|
6
|
+
};
|
|
7
|
+
var __using = (stack, value, async) => {
|
|
8
|
+
if (value != null) {
|
|
9
|
+
if (typeof value !== "object" && typeof value !== "function") __typeError("Object expected");
|
|
10
|
+
var dispose, inner;
|
|
11
|
+
if (async) dispose = value[__knownSymbol("asyncDispose")];
|
|
12
|
+
if (dispose === void 0) {
|
|
13
|
+
dispose = value[__knownSymbol("dispose")];
|
|
14
|
+
if (async) inner = dispose;
|
|
15
|
+
}
|
|
16
|
+
if (typeof dispose !== "function") __typeError("Object not disposable");
|
|
17
|
+
if (inner) dispose = function() {
|
|
18
|
+
try {
|
|
19
|
+
inner.call(this);
|
|
20
|
+
} catch (e) {
|
|
21
|
+
return Promise.reject(e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
stack.push([async, dispose, value]);
|
|
25
|
+
} else if (async) {
|
|
26
|
+
stack.push([async]);
|
|
27
|
+
}
|
|
28
|
+
return value;
|
|
29
|
+
};
|
|
30
|
+
var __callDispose = (stack, error, hasError) => {
|
|
31
|
+
var E = typeof SuppressedError === "function" ? SuppressedError : function(e, s, m, _) {
|
|
32
|
+
return _ = Error(m), _.name = "SuppressedError", _.error = e, _.suppressed = s, _;
|
|
33
|
+
};
|
|
34
|
+
var fail = (e) => error = hasError ? new E(e, error, "An error was suppressed during disposal") : (hasError = true, e);
|
|
35
|
+
var next = (it) => {
|
|
36
|
+
while (it = stack.pop()) {
|
|
37
|
+
try {
|
|
38
|
+
var result = it[1] && it[1].call(it[2]);
|
|
39
|
+
if (it[0]) return Promise.resolve(result).then(next, (e) => (fail(e), next()));
|
|
40
|
+
} catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (hasError) throw error;
|
|
45
|
+
};
|
|
46
|
+
return next();
|
|
47
|
+
};
|
|
48
|
+
|
|
3
49
|
// src/config.ts
|
|
4
50
|
var DEFAULT_BASE_URL = "http://localhost:11434";
|
|
5
51
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
@@ -492,12 +538,65 @@ function composeMiddleware(middlewares, finalHandler) {
|
|
|
492
538
|
};
|
|
493
539
|
}
|
|
494
540
|
|
|
541
|
+
// src/utils.ts
|
|
542
|
+
async function encodeImage(image) {
|
|
543
|
+
if (typeof image === "string") return image;
|
|
544
|
+
const bufferCtor = globalThis.Buffer;
|
|
545
|
+
if (bufferCtor !== void 0) return bufferCtor.from(image).toString("base64");
|
|
546
|
+
const CHUNK_SIZE = 32768;
|
|
547
|
+
let binary = "";
|
|
548
|
+
for (let i = 0; i < image.length; i += CHUNK_SIZE) {
|
|
549
|
+
binary += String.fromCharCode(...image.subarray(i, i + CHUNK_SIZE));
|
|
550
|
+
}
|
|
551
|
+
return btoa(binary);
|
|
552
|
+
}
|
|
553
|
+
async function encodeImages(images) {
|
|
554
|
+
if (images === void 0) return void 0;
|
|
555
|
+
return Promise.all(images.map((image) => encodeImage(image)));
|
|
556
|
+
}
|
|
557
|
+
async function withEncodedImages(req) {
|
|
558
|
+
if (!req.images?.some((image) => image instanceof Uint8Array)) return req;
|
|
559
|
+
return { ...req, images: await encodeImages(req.images) };
|
|
560
|
+
}
|
|
561
|
+
async function withEncodedMessageImages(messages) {
|
|
562
|
+
if (!messages.some((message) => message.images?.some((image) => image instanceof Uint8Array)))
|
|
563
|
+
return messages;
|
|
564
|
+
return Promise.all(messages.map((message) => withEncodedImages(message)));
|
|
565
|
+
}
|
|
566
|
+
function disposableTimer(timer) {
|
|
567
|
+
return {
|
|
568
|
+
[Symbol.dispose]() {
|
|
569
|
+
clearTimeout(timer);
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
function disposableReader(reader) {
|
|
574
|
+
return {
|
|
575
|
+
async [Symbol.asyncDispose]() {
|
|
576
|
+
try {
|
|
577
|
+
await reader.cancel();
|
|
578
|
+
} catch {
|
|
579
|
+
}
|
|
580
|
+
reader.releaseLock();
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function disposableSpan(span) {
|
|
585
|
+
return {
|
|
586
|
+
[Symbol.dispose]() {
|
|
587
|
+
span.end();
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
|
|
495
592
|
// src/streaming/ndjson.ts
|
|
496
593
|
async function* parseNdjsonStream(stream) {
|
|
497
|
-
|
|
498
|
-
const decoder = new TextDecoder();
|
|
499
|
-
let buffer = "";
|
|
594
|
+
var _stack = [];
|
|
500
595
|
try {
|
|
596
|
+
const reader = stream.getReader();
|
|
597
|
+
const decoder = new TextDecoder();
|
|
598
|
+
let buffer = "";
|
|
599
|
+
const _reader = __using(_stack, disposableReader(reader), true);
|
|
501
600
|
while (true) {
|
|
502
601
|
const { done, value } = await reader.read();
|
|
503
602
|
if (done) break;
|
|
@@ -519,12 +618,11 @@ async function* parseNdjsonStream(stream) {
|
|
|
519
618
|
if (buffer.trim()) {
|
|
520
619
|
yield JSON.parse(buffer.trim());
|
|
521
620
|
}
|
|
621
|
+
} catch (_) {
|
|
622
|
+
var _error = _, _hasError = true;
|
|
522
623
|
} finally {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
} catch {
|
|
526
|
-
}
|
|
527
|
-
reader.releaseLock();
|
|
624
|
+
var _promise = __callDispose(_stack, _error, _hasError);
|
|
625
|
+
_promise && await _promise;
|
|
528
626
|
}
|
|
529
627
|
}
|
|
530
628
|
|
|
@@ -540,47 +638,51 @@ function dispatch(event, data, id, retry) {
|
|
|
540
638
|
};
|
|
541
639
|
}
|
|
542
640
|
async function* parseSseStream(stream) {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
if (
|
|
641
|
+
var _stack = [];
|
|
642
|
+
try {
|
|
643
|
+
const reader = stream.getReader();
|
|
644
|
+
const decoder = new TextDecoder();
|
|
645
|
+
let buffer = "";
|
|
646
|
+
let eventType;
|
|
647
|
+
let data = [];
|
|
648
|
+
let lastEventId;
|
|
649
|
+
let retry;
|
|
650
|
+
const processLine = (line) => {
|
|
651
|
+
if (line.length === 0) {
|
|
652
|
+
const event = dispatch(eventType, data, lastEventId, retry);
|
|
653
|
+
eventType = void 0;
|
|
654
|
+
data = [];
|
|
655
|
+
retry = void 0;
|
|
656
|
+
return event;
|
|
657
|
+
}
|
|
658
|
+
if (line.startsWith(":")) return void 0;
|
|
659
|
+
const separator = line.indexOf(":");
|
|
660
|
+
const field = separator === -1 ? line : line.slice(0, separator);
|
|
661
|
+
let value = separator === -1 ? "" : line.slice(separator + 1);
|
|
662
|
+
if (value.startsWith(" ")) value = value.slice(1);
|
|
663
|
+
switch (field) {
|
|
664
|
+
case "event":
|
|
665
|
+
eventType = value;
|
|
666
|
+
break;
|
|
667
|
+
case "data":
|
|
668
|
+
data.push(value);
|
|
669
|
+
break;
|
|
670
|
+
case "id":
|
|
671
|
+
if (!value.includes("\0")) lastEventId = value;
|
|
672
|
+
break;
|
|
673
|
+
case "retry": {
|
|
674
|
+
if (/^\d+$/.test(value)) {
|
|
675
|
+
const parsed = Number(value);
|
|
676
|
+
if (Number.isSafeInteger(parsed)) retry = parsed;
|
|
677
|
+
}
|
|
678
|
+
break;
|
|
577
679
|
}
|
|
578
|
-
|
|
680
|
+
default:
|
|
681
|
+
break;
|
|
579
682
|
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
try {
|
|
683
|
+
return void 0;
|
|
684
|
+
};
|
|
685
|
+
const _reader = __using(_stack, disposableReader(reader), true);
|
|
584
686
|
while (true) {
|
|
585
687
|
const { done, value } = await reader.read();
|
|
586
688
|
if (done) break;
|
|
@@ -608,12 +710,11 @@ async function* parseSseStream(stream) {
|
|
|
608
710
|
}
|
|
609
711
|
const terminal = dispatch(eventType, data, lastEventId, retry);
|
|
610
712
|
if (terminal) yield terminal;
|
|
713
|
+
} catch (_) {
|
|
714
|
+
var _error = _, _hasError = true;
|
|
611
715
|
} finally {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
} catch {
|
|
615
|
-
}
|
|
616
|
-
reader.releaseLock();
|
|
716
|
+
var _promise = __callDispose(_stack, _error, _hasError);
|
|
717
|
+
_promise && await _promise;
|
|
617
718
|
}
|
|
618
719
|
}
|
|
619
720
|
|
|
@@ -641,16 +742,22 @@ async function withSpan(name, attributes, fn) {
|
|
|
641
742
|
}
|
|
642
743
|
const tracer = api.trace.getTracer(INSTRUMENTATION_NAME, INSTRUMENTATION_VERSION);
|
|
643
744
|
return tracer.startActiveSpan(name, async (span) => {
|
|
644
|
-
|
|
745
|
+
var _stack = [];
|
|
645
746
|
try {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
747
|
+
span.setAttributes(cleanAttributes(attributes));
|
|
748
|
+
const _span = __using(_stack, disposableSpan(span));
|
|
749
|
+
try {
|
|
750
|
+
return await fn(span);
|
|
751
|
+
} catch (err) {
|
|
752
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
753
|
+
span.recordException(error);
|
|
754
|
+
span.setStatus({ code: api.SpanStatusCode.ERROR, message: error.message });
|
|
755
|
+
throw error;
|
|
756
|
+
}
|
|
757
|
+
} catch (_) {
|
|
758
|
+
var _error = _, _hasError = true;
|
|
652
759
|
} finally {
|
|
653
|
-
|
|
760
|
+
__callDispose(_stack, _error, _hasError);
|
|
654
761
|
}
|
|
655
762
|
});
|
|
656
763
|
}
|
|
@@ -1060,42 +1167,48 @@ var HttpClient = class {
|
|
|
1060
1167
|
|
|
1061
1168
|
// src/providers/health-check.ts
|
|
1062
1169
|
async function checkEndpointHealth(endpoint, fetchImpl, timeoutMs = 5e3, middleware, onLifecycleEvent) {
|
|
1063
|
-
|
|
1064
|
-
baseUrl: endpoint.baseUrl,
|
|
1065
|
-
apiKey: endpoint.apiKey,
|
|
1066
|
-
headers: endpoint.headers,
|
|
1067
|
-
fetch: fetchImpl,
|
|
1068
|
-
middleware,
|
|
1069
|
-
onLifecycleEvent
|
|
1070
|
-
});
|
|
1071
|
-
const startTime = Date.now();
|
|
1072
|
-
const controller = new AbortController();
|
|
1073
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
1170
|
+
var _stack = [];
|
|
1074
1171
|
try {
|
|
1075
|
-
const
|
|
1076
|
-
path: "/api/version",
|
|
1077
|
-
method: "GET",
|
|
1078
|
-
signal: controller.signal
|
|
1079
|
-
});
|
|
1080
|
-
const latencyMs = Date.now() - startTime;
|
|
1081
|
-
return {
|
|
1082
|
-
name: endpoint.name,
|
|
1172
|
+
const client = new HttpClient({
|
|
1083
1173
|
baseUrl: endpoint.baseUrl,
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1174
|
+
apiKey: endpoint.apiKey,
|
|
1175
|
+
headers: endpoint.headers,
|
|
1176
|
+
fetch: fetchImpl,
|
|
1177
|
+
middleware,
|
|
1178
|
+
onLifecycleEvent
|
|
1179
|
+
});
|
|
1180
|
+
const startTime = Date.now();
|
|
1181
|
+
const controller = new AbortController();
|
|
1182
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
1183
|
+
const _timer = __using(_stack, disposableTimer(timer));
|
|
1184
|
+
try {
|
|
1185
|
+
const res = await client.request({
|
|
1186
|
+
path: "/api/version",
|
|
1187
|
+
method: "GET",
|
|
1188
|
+
signal: controller.signal
|
|
1189
|
+
});
|
|
1190
|
+
const latencyMs = Date.now() - startTime;
|
|
1191
|
+
return {
|
|
1192
|
+
name: endpoint.name,
|
|
1193
|
+
baseUrl: endpoint.baseUrl,
|
|
1194
|
+
reachable: true,
|
|
1195
|
+
latencyMs,
|
|
1196
|
+
version: res.version
|
|
1197
|
+
};
|
|
1198
|
+
} catch (err) {
|
|
1199
|
+
const latencyMs = Date.now() - startTime;
|
|
1200
|
+
return {
|
|
1201
|
+
name: endpoint.name,
|
|
1202
|
+
baseUrl: endpoint.baseUrl,
|
|
1203
|
+
reachable: false,
|
|
1204
|
+
latencyMs,
|
|
1205
|
+
error: err instanceof Error ? err.message : String(err)
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
} catch (_) {
|
|
1209
|
+
var _error = _, _hasError = true;
|
|
1097
1210
|
} finally {
|
|
1098
|
-
|
|
1211
|
+
__callDispose(_stack, _error, _hasError);
|
|
1099
1212
|
}
|
|
1100
1213
|
}
|
|
1101
1214
|
|
|
@@ -2706,32 +2819,6 @@ var OllamaRuntime = class {
|
|
|
2706
2819
|
}
|
|
2707
2820
|
};
|
|
2708
2821
|
|
|
2709
|
-
// src/utils.ts
|
|
2710
|
-
async function encodeImage(image) {
|
|
2711
|
-
if (typeof image === "string") return image;
|
|
2712
|
-
const bufferCtor = globalThis.Buffer;
|
|
2713
|
-
if (bufferCtor !== void 0) return bufferCtor.from(image).toString("base64");
|
|
2714
|
-
const CHUNK_SIZE = 32768;
|
|
2715
|
-
let binary = "";
|
|
2716
|
-
for (let i = 0; i < image.length; i += CHUNK_SIZE) {
|
|
2717
|
-
binary += String.fromCharCode(...image.subarray(i, i + CHUNK_SIZE));
|
|
2718
|
-
}
|
|
2719
|
-
return btoa(binary);
|
|
2720
|
-
}
|
|
2721
|
-
async function encodeImages(images) {
|
|
2722
|
-
if (images === void 0) return void 0;
|
|
2723
|
-
return Promise.all(images.map((image) => encodeImage(image)));
|
|
2724
|
-
}
|
|
2725
|
-
async function withEncodedImages(req) {
|
|
2726
|
-
if (!req.images?.some((image) => image instanceof Uint8Array)) return req;
|
|
2727
|
-
return { ...req, images: await encodeImages(req.images) };
|
|
2728
|
-
}
|
|
2729
|
-
async function withEncodedMessageImages(messages) {
|
|
2730
|
-
if (!messages.some((message) => message.images?.some((image) => image instanceof Uint8Array)))
|
|
2731
|
-
return messages;
|
|
2732
|
-
return Promise.all(messages.map((message) => withEncodedImages(message)));
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
2822
|
// src/client.ts
|
|
2736
2823
|
var logicalRequestSequence = 0;
|
|
2737
2824
|
function createLogicalRequestId() {
|
|
@@ -3138,9 +3225,15 @@ var OllamaClient = class {
|
|
|
3138
3225
|
* multi-candidate loop, since `webSearch`/`webFetch` only ever have the one endpoint.
|
|
3139
3226
|
*/
|
|
3140
3227
|
async executeCloudRequest(operation, options) {
|
|
3141
|
-
|
|
3142
|
-
const requestId = createLogicalRequestId();
|
|
3228
|
+
var _stack = [];
|
|
3143
3229
|
try {
|
|
3230
|
+
const timeout = createTimeoutSignal(options.timeoutMs ?? this.timeoutMs, options.signal);
|
|
3231
|
+
const _timeout = __using(_stack, {
|
|
3232
|
+
[Symbol.dispose]() {
|
|
3233
|
+
timeout.cancel();
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
3236
|
+
const requestId = createLogicalRequestId();
|
|
3144
3237
|
const http = new HttpClient({
|
|
3145
3238
|
baseUrl: OLLAMA_CLOUD_BASE_URL,
|
|
3146
3239
|
apiKey: this.cloudApiKey,
|
|
@@ -3167,8 +3260,10 @@ var OllamaClient = class {
|
|
|
3167
3260
|
},
|
|
3168
3261
|
timeout.signal
|
|
3169
3262
|
);
|
|
3263
|
+
} catch (_) {
|
|
3264
|
+
var _error = _, _hasError = true;
|
|
3170
3265
|
} finally {
|
|
3171
|
-
|
|
3266
|
+
__callDispose(_stack, _error, _hasError);
|
|
3172
3267
|
}
|
|
3173
3268
|
}
|
|
3174
3269
|
// --- Capabilities & Health ---
|
|
@@ -3529,25 +3624,32 @@ var ToolRegistry = class {
|
|
|
3529
3624
|
return results;
|
|
3530
3625
|
}
|
|
3531
3626
|
async runWithTimeout(tool, params, ctx, toolName) {
|
|
3532
|
-
|
|
3533
|
-
if (!timeoutMs || timeoutMs <= 0) {
|
|
3534
|
-
return tool.execute(params, ctx);
|
|
3535
|
-
}
|
|
3536
|
-
const controller = new AbortController();
|
|
3537
|
-
const onParentAbort = () => controller.abort(ctx.signal?.reason);
|
|
3538
|
-
if (ctx.signal) {
|
|
3539
|
-
if (ctx.signal.aborted) {
|
|
3540
|
-
controller.abort(ctx.signal.reason);
|
|
3541
|
-
} else {
|
|
3542
|
-
ctx.signal.addEventListener("abort", onParentAbort, { once: true });
|
|
3543
|
-
}
|
|
3544
|
-
}
|
|
3545
|
-
let timedOut = false;
|
|
3546
|
-
const timer = setTimeout(() => {
|
|
3547
|
-
timedOut = true;
|
|
3548
|
-
controller.abort();
|
|
3549
|
-
}, timeoutMs);
|
|
3627
|
+
var _stack = [];
|
|
3550
3628
|
try {
|
|
3629
|
+
const timeoutMs = tool.timeoutMs ?? this.defaultTimeoutMs;
|
|
3630
|
+
if (!timeoutMs || timeoutMs <= 0) {
|
|
3631
|
+
return tool.execute(params, ctx);
|
|
3632
|
+
}
|
|
3633
|
+
const controller = new AbortController();
|
|
3634
|
+
const onParentAbort = () => controller.abort(ctx.signal?.reason);
|
|
3635
|
+
if (ctx.signal) {
|
|
3636
|
+
if (ctx.signal.aborted) {
|
|
3637
|
+
controller.abort(ctx.signal.reason);
|
|
3638
|
+
} else {
|
|
3639
|
+
ctx.signal.addEventListener("abort", onParentAbort, { once: true });
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
let timedOut = false;
|
|
3643
|
+
const timer = setTimeout(() => {
|
|
3644
|
+
timedOut = true;
|
|
3645
|
+
controller.abort();
|
|
3646
|
+
}, timeoutMs);
|
|
3647
|
+
const _timer = __using(_stack, disposableTimer(timer));
|
|
3648
|
+
const _listener = __using(_stack, {
|
|
3649
|
+
[Symbol.dispose]() {
|
|
3650
|
+
ctx.signal?.removeEventListener("abort", onParentAbort);
|
|
3651
|
+
}
|
|
3652
|
+
});
|
|
3551
3653
|
const executePromise = Promise.resolve(
|
|
3552
3654
|
tool.execute(params, { ...ctx, signal: controller.signal })
|
|
3553
3655
|
);
|
|
@@ -3564,11 +3666,10 @@ var ToolRegistry = class {
|
|
|
3564
3666
|
});
|
|
3565
3667
|
})
|
|
3566
3668
|
]);
|
|
3669
|
+
} catch (_) {
|
|
3670
|
+
var _error = _, _hasError = true;
|
|
3567
3671
|
} finally {
|
|
3568
|
-
|
|
3569
|
-
if (ctx.signal) {
|
|
3570
|
-
ctx.signal.removeEventListener("abort", onParentAbort);
|
|
3571
|
-
}
|
|
3672
|
+
__callDispose(_stack, _error, _hasError);
|
|
3572
3673
|
}
|
|
3573
3674
|
}
|
|
3574
3675
|
truncateOutput(output) {
|