@redocly/replay 0.28.0-next.0 → 0.28.0-next.10
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/replay-AiChatProvider-BWL86hXh.js +6 -0
- package/dist/{replay-AiChatProvider-BZUzXfD-.js → replay-AiChatProvider-CY3b_ggu.js} +376 -376
- package/dist/{replay-AiChatSqliteDBStorage-CTVtufnx.js → replay-AiChatSqliteDBStorage-BtV53vvj.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-JpKE0iGm.js → replay-AiChatSqliteDBStorage-CjzLqUwK.js} +6 -6
- package/dist/{replay-AiPanel-DkR-vZTK.js → replay-AiPanel-B3HBaMPh.js} +706 -709
- package/dist/replay-AiPanel-BzaoPsXZ.js +742 -0
- package/dist/replay-FileWatcher-BFtAqsmL.js +1 -0
- package/dist/replay-FileWatcher-d1_qKRfS.js +364 -0
- package/dist/{replay-HistorySqliteDBStorage-CtF6-vY8.js → replay-HistorySqliteDBStorage-Bi5vBQ2T.js} +2 -2
- package/dist/replay-SemanticSearchService-CTWesmRy.js +1 -0
- package/dist/{replay-SemanticSearchService-CSsOmkV_.js → replay-SemanticSearchService-DcR4Q6w6.js} +27 -31
- package/dist/{replay-SqliteDBStorage-DpAEbsAQ.js → replay-SqliteDBStorage-BeDAsnlF.js} +1 -1
- package/dist/{replay-SqliteDBStorage-BSMAgfUS.js → replay-SqliteDBStorage-BlVDbZhU.js} +49 -49
- package/dist/{replay-StepContextSqliteDBStorage-BfAAKDwA.js → replay-StepContextSqliteDBStorage-BkB2NM27.js} +2 -2
- package/dist/replay-TauriFileSystemAdapter-B_VaAUfL.js +1 -0
- package/dist/replay-TauriFileSystemAdapter-Cu-Q6QS_.js +108 -0
- package/dist/replay-TauriRootStorage-Cidjagk-.js +1 -0
- package/dist/{replay-TauriRootStorage-g9zf2-FS.js → replay-TauriRootStorage-DVeU3RvV.js} +213 -210
- package/dist/{replay-agent-loop-be2meQsN.js → replay-agent-loop-B42P9R-q.js} +1 -1
- package/dist/{replay-agent-loop-ClVUvt0C.js → replay-agent-loop-DweKWrQp.js} +5 -5
- package/dist/{replay-ai-chat-mappers-JOZvaHV_.js → replay-ai-chat-mappers-Cno0s3T8.js} +1 -1
- package/dist/{replay-ai-chat-mappers-CwvRub6i.js → replay-ai-chat-mappers-DusPRQPG.js} +3 -3
- package/dist/{replay-ai-message-parts.schema-E9u9-nqr.js → replay-ai-message-parts.schema-DKLf0SiG.js} +1 -1
- package/dist/{replay-create-model-rzGPB8KT.js → replay-create-model-CeSlm24x.js} +4 -4
- package/dist/{replay-create-model-CJ3dsZg8.js → replay-create-model-DdPq1CIm.js} +3 -3
- package/dist/{replay-db-CW7044b2.js → replay-db-Bj8Qpvpw.js} +1 -1
- package/dist/{replay-db-zC1KPTH0.js → replay-db-he8XQjrM.js} +1 -1
- package/dist/{replay-external-resolver-BDPRz7Xd.js → replay-external-resolver-BRs5F07f.js} +7 -7
- package/dist/{replay-external-resolver-Dty0CDYE.js → replay-external-resolver-gQ0egbx7.js} +1 -1
- package/dist/{replay-history.schema-5ce6X0R1.js → replay-history.schema-B0lLwmdG.js} +3 -3
- package/dist/replay-index-B1qPs-GR.js +4 -0
- package/dist/replay-index-C2b91LJZ.js +7013 -0
- package/dist/{replay-index--hMZLQs8.js → replay-index-CA6OI1Qg.js} +1 -1
- package/dist/replay-index-CYphcClc.js +1 -0
- package/dist/{replay-index-F4GEOEUz.js → replay-index-DRb3mixV.js} +65311 -63618
- package/dist/replay-index-Dtxwps1s.js +574 -0
- package/dist/replay-index-NgGicGfR.js +1 -0
- package/dist/{replay-index-DZN7KzbY.js → replay-index-uF3nFq_Y.js} +1 -1
- package/dist/{replay-indexes-CfsvVMi_.js → replay-indexes-B3PJtgeh.js} +43 -43
- package/dist/replay-lint-C2hyYWRS.js +177 -0
- package/dist/{replay-lint-9YeYgRBU.js → replay-lint-gY_wyYPJ.js} +17581 -21140
- package/dist/{replay-lint-graphql-Dba0twW-.js → replay-lint-graphql-BA9t8-Ua.js} +1 -1
- package/dist/{replay-lint-graphql-BelJUl9-.js → replay-lint-graphql-DDrnrINc.js} +1 -1
- package/dist/replay-periodic-revalidation-BbAt74oL.js +21 -0
- package/dist/replay-periodic-revalidation-kmD2RQn1.js +1 -0
- package/dist/replay-resolve-BJ_AY-Mn.js +47 -0
- package/dist/{replay-resolve-RxCCaHXw.js → replay-resolve-_V8uYdTK.js} +470 -468
- package/dist/replay-respect-run-CLLZoRh1.js +8392 -0
- package/dist/replay-respect-run-qOz91QPQ.js +82 -0
- package/dist/replay-step-context.schema-BOprzd6Z.js +21 -0
- package/dist/{replay-tauri-path-hGM_JYax.js → replay-tauri-path-lH8t5rdX.js} +1 -1
- package/dist/replay-tauri-path-twTA2lKs.js +22 -0
- package/dist/replay-useAiChatQueries-BIqM2KQW.js +215 -0
- package/dist/{replay-useAiChatQueries-DD84oZan.js → replay-useAiChatQueries-yCsYY1j2.js} +1583 -1371
- package/dist/{replay-validate-key-xk-9xmJ6.js → replay-validate-key-Bh41yY9h.js} +2 -2
- package/dist/{replay-validate-key-PS5qrafQ.js → replay-validate-key-_oaOw5Jy.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +10 -3
- package/dist/replay.js +14 -14
- package/package.json +20 -13
- package/dist/replay-AiChatProvider-Dllh11wo.js +0 -6
- package/dist/replay-AiPanel-DruBN19L.js +0 -742
- package/dist/replay-FileWatcher-D3W6TGFC.js +0 -1
- package/dist/replay-FileWatcher-v7Qw29PS.js +0 -343
- package/dist/replay-SemanticSearchService-Dfx2W4Za.js +0 -1
- package/dist/replay-TauriFileSystemAdapter-BLPH1Vx3.js +0 -1
- package/dist/replay-TauriFileSystemAdapter-Ddq9xfo1.js +0 -99
- package/dist/replay-TauriRootStorage-l_sNXRNW.js +0 -1
- package/dist/replay-index-5UkXwLrd.js +0 -504
- package/dist/replay-index-9h4E2FR8.js +0 -1
- package/dist/replay-index-B7GU_aMu.js +0 -25
- package/dist/replay-index-DbWKCsKW.js +0 -6906
- package/dist/replay-index-ko78Z8QX.js +0 -1
- package/dist/replay-lint-DK6LCpO2.js +0 -184
- package/dist/replay-periodic-revalidation-BoyLQHtg.js +0 -1
- package/dist/replay-periodic-revalidation-Dsp-n7ui.js +0 -21
- package/dist/replay-resolve-CRBvIGPM.js +0 -47
- package/dist/replay-respect-run-BP5Q5L8N.js +0 -78
- package/dist/replay-respect-run-CRGPD-UQ.js +0 -8200
- package/dist/replay-step-context.schema-DBk4jufr.js +0 -21
- package/dist/replay-tauri-path-BmHpvlYp.js +0 -22
- package/dist/replay-useAiChatQueries-KVveua_P.js +0 -215
|
@@ -1,179 +1,179 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as
|
|
3
|
-
import { TauriFileSystemAdapter as X } from "./replay-TauriFileSystemAdapter-
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return Z || (Z = 1, (function(
|
|
1
|
+
import { K as he, L as fe, N as k, O as de, Q as N, U as H, V as pe, W as ve, X as _e, F, u as me, E as O, i as we, Y as ye, Z as ge, P as Pe, D as be } from "./replay-index-DRb3mixV.js";
|
|
2
|
+
import { p as J } from "./replay-promise-map-limit-Db_42GvV.js";
|
|
3
|
+
import { TauriFileSystemAdapter as X } from "./replay-TauriFileSystemAdapter-Cu-Q6QS_.js";
|
|
4
|
+
var K = { exports: {} }, Z;
|
|
5
|
+
function Ee() {
|
|
6
|
+
return Z || (Z = 1, (function(n) {
|
|
7
7
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
8
8
|
function r() {
|
|
9
9
|
}
|
|
10
10
|
Object.create && (r.prototype = /* @__PURE__ */ Object.create(null), new r().__proto__ || (t = !1));
|
|
11
|
-
function
|
|
12
|
-
this.fn =
|
|
11
|
+
function a(i, l, h) {
|
|
12
|
+
this.fn = i, this.context = l, this.once = h || !1;
|
|
13
13
|
}
|
|
14
|
-
function o(
|
|
15
|
-
if (typeof
|
|
14
|
+
function o(i, l, h, f, w) {
|
|
15
|
+
if (typeof h != "function")
|
|
16
16
|
throw new TypeError("The listener must be a function");
|
|
17
|
-
var
|
|
18
|
-
return
|
|
17
|
+
var y = new a(h, f || i, w), p = t ? t + l : l;
|
|
18
|
+
return i._events[p] ? i._events[p].fn ? i._events[p] = [i._events[p], y] : i._events[p].push(y) : (i._events[p] = y, i._eventsCount++), i;
|
|
19
19
|
}
|
|
20
|
-
function d(
|
|
21
|
-
--
|
|
20
|
+
function d(i, l) {
|
|
21
|
+
--i._eventsCount === 0 ? i._events = new r() : delete i._events[l];
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function c() {
|
|
24
24
|
this._events = new r(), this._eventsCount = 0;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
var l = [],
|
|
26
|
+
c.prototype.eventNames = function() {
|
|
27
|
+
var l = [], h, f;
|
|
28
28
|
if (this._eventsCount === 0) return l;
|
|
29
|
-
for (
|
|
30
|
-
e.call(
|
|
31
|
-
return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(
|
|
32
|
-
},
|
|
33
|
-
var
|
|
34
|
-
if (!
|
|
35
|
-
if (
|
|
36
|
-
for (var
|
|
37
|
-
p[
|
|
29
|
+
for (f in h = this._events)
|
|
30
|
+
e.call(h, f) && l.push(t ? f.slice(1) : f);
|
|
31
|
+
return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(h)) : l;
|
|
32
|
+
}, c.prototype.listeners = function(l) {
|
|
33
|
+
var h = t ? t + l : l, f = this._events[h];
|
|
34
|
+
if (!f) return [];
|
|
35
|
+
if (f.fn) return [f.fn];
|
|
36
|
+
for (var w = 0, y = f.length, p = new Array(y); w < y; w++)
|
|
37
|
+
p[w] = f[w].fn;
|
|
38
38
|
return p;
|
|
39
|
-
},
|
|
40
|
-
var
|
|
41
|
-
return
|
|
42
|
-
},
|
|
39
|
+
}, c.prototype.listenerCount = function(l) {
|
|
40
|
+
var h = t ? t + l : l, f = this._events[h];
|
|
41
|
+
return f ? f.fn ? 1 : f.length : 0;
|
|
42
|
+
}, c.prototype.emit = function(l, h, f, w, y, p) {
|
|
43
43
|
var b = t ? t + l : l;
|
|
44
44
|
if (!this._events[b]) return !1;
|
|
45
|
-
var
|
|
46
|
-
if (
|
|
47
|
-
switch (
|
|
45
|
+
var u = this._events[b], A = arguments.length, T, m;
|
|
46
|
+
if (u.fn) {
|
|
47
|
+
switch (u.once && this.removeListener(l, u.fn, void 0, !0), A) {
|
|
48
48
|
case 1:
|
|
49
|
-
return
|
|
49
|
+
return u.fn.call(u.context), !0;
|
|
50
50
|
case 2:
|
|
51
|
-
return
|
|
51
|
+
return u.fn.call(u.context, h), !0;
|
|
52
52
|
case 3:
|
|
53
|
-
return
|
|
53
|
+
return u.fn.call(u.context, h, f), !0;
|
|
54
54
|
case 4:
|
|
55
|
-
return
|
|
55
|
+
return u.fn.call(u.context, h, f, w), !0;
|
|
56
56
|
case 5:
|
|
57
|
-
return
|
|
57
|
+
return u.fn.call(u.context, h, f, w, y), !0;
|
|
58
58
|
case 6:
|
|
59
|
-
return
|
|
59
|
+
return u.fn.call(u.context, h, f, w, y, p), !0;
|
|
60
60
|
}
|
|
61
|
-
for (
|
|
62
|
-
T[
|
|
63
|
-
|
|
61
|
+
for (m = 1, T = new Array(A - 1); m < A; m++)
|
|
62
|
+
T[m - 1] = arguments[m];
|
|
63
|
+
u.fn.apply(u.context, T);
|
|
64
64
|
} else {
|
|
65
|
-
var ce =
|
|
66
|
-
for (
|
|
67
|
-
switch (
|
|
65
|
+
var ce = u.length, x;
|
|
66
|
+
for (m = 0; m < ce; m++)
|
|
67
|
+
switch (u[m].once && this.removeListener(l, u[m].fn, void 0, !0), A) {
|
|
68
68
|
case 1:
|
|
69
|
-
|
|
69
|
+
u[m].fn.call(u[m].context);
|
|
70
70
|
break;
|
|
71
71
|
case 2:
|
|
72
|
-
|
|
72
|
+
u[m].fn.call(u[m].context, h);
|
|
73
73
|
break;
|
|
74
74
|
case 3:
|
|
75
|
-
|
|
75
|
+
u[m].fn.call(u[m].context, h, f);
|
|
76
76
|
break;
|
|
77
77
|
case 4:
|
|
78
|
-
|
|
78
|
+
u[m].fn.call(u[m].context, h, f, w);
|
|
79
79
|
break;
|
|
80
80
|
default:
|
|
81
81
|
if (!T) for (x = 1, T = new Array(A - 1); x < A; x++)
|
|
82
82
|
T[x - 1] = arguments[x];
|
|
83
|
-
|
|
83
|
+
u[m].fn.apply(u[m].context, T);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
return !0;
|
|
87
|
-
},
|
|
88
|
-
return o(this, l,
|
|
89
|
-
},
|
|
90
|
-
return o(this, l,
|
|
91
|
-
},
|
|
92
|
-
var
|
|
93
|
-
if (!this._events[
|
|
94
|
-
if (!
|
|
95
|
-
return d(this,
|
|
96
|
-
var p = this._events[
|
|
87
|
+
}, c.prototype.on = function(l, h, f) {
|
|
88
|
+
return o(this, l, h, f, !1);
|
|
89
|
+
}, c.prototype.once = function(l, h, f) {
|
|
90
|
+
return o(this, l, h, f, !0);
|
|
91
|
+
}, c.prototype.removeListener = function(l, h, f, w) {
|
|
92
|
+
var y = t ? t + l : l;
|
|
93
|
+
if (!this._events[y]) return this;
|
|
94
|
+
if (!h)
|
|
95
|
+
return d(this, y), this;
|
|
96
|
+
var p = this._events[y];
|
|
97
97
|
if (p.fn)
|
|
98
|
-
p.fn ===
|
|
98
|
+
p.fn === h && (!w || p.once) && (!f || p.context === f) && d(this, y);
|
|
99
99
|
else {
|
|
100
|
-
for (var b = 0,
|
|
101
|
-
(p[b].fn !==
|
|
102
|
-
|
|
100
|
+
for (var b = 0, u = [], A = p.length; b < A; b++)
|
|
101
|
+
(p[b].fn !== h || w && !p[b].once || f && p[b].context !== f) && u.push(p[b]);
|
|
102
|
+
u.length ? this._events[y] = u.length === 1 ? u[0] : u : d(this, y);
|
|
103
103
|
}
|
|
104
104
|
return this;
|
|
105
|
-
},
|
|
106
|
-
var
|
|
107
|
-
return l ? (
|
|
108
|
-
},
|
|
109
|
-
})(
|
|
105
|
+
}, c.prototype.removeAllListeners = function(l) {
|
|
106
|
+
var h;
|
|
107
|
+
return l ? (h = t ? t + l : l, this._events[h] && d(this, h)) : (this._events = new r(), this._eventsCount = 0), this;
|
|
108
|
+
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = t, c.EventEmitter = c, n.exports = c;
|
|
109
|
+
})(K)), K.exports;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
const
|
|
111
|
+
var Se = Ee();
|
|
112
|
+
const Ae = /* @__PURE__ */ he(Se);
|
|
113
113
|
class ae extends Error {
|
|
114
114
|
constructor(e) {
|
|
115
115
|
super(e), this.name = "TimeoutError";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
let
|
|
118
|
+
let Ie = class extends Error {
|
|
119
119
|
constructor(e) {
|
|
120
120
|
super(), this.name = "AbortError", this.message = e;
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
const ee = (
|
|
124
|
-
const e =
|
|
123
|
+
const ee = (n) => globalThis.DOMException === void 0 ? new Ie(n) : new DOMException(n), te = (n) => {
|
|
124
|
+
const e = n.reason === void 0 ? ee("This operation was aborted.") : n.reason;
|
|
125
125
|
return e instanceof Error ? e : ee(e);
|
|
126
126
|
};
|
|
127
|
-
function
|
|
128
|
-
let
|
|
129
|
-
const o = new Promise((d,
|
|
127
|
+
function Ce(n, e, t, r) {
|
|
128
|
+
let a;
|
|
129
|
+
const o = new Promise((d, c) => {
|
|
130
130
|
if (typeof e != "number" || Math.sign(e) !== 1)
|
|
131
131
|
throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${e}\``);
|
|
132
132
|
if (e === Number.POSITIVE_INFINITY) {
|
|
133
|
-
d(
|
|
133
|
+
d(n);
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
if (r = {
|
|
137
137
|
customTimers: { setTimeout, clearTimeout },
|
|
138
138
|
...r
|
|
139
139
|
}, r.signal) {
|
|
140
|
-
const { signal:
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
const { signal: i } = r;
|
|
141
|
+
i.aborted && c(te(i)), i.addEventListener("abort", () => {
|
|
142
|
+
c(te(i));
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
typeof
|
|
145
|
+
a = r.customTimers.setTimeout.call(void 0, () => {
|
|
146
|
+
const i = `Promise timed out after ${e} milliseconds`, l = t instanceof Error ? t : new ae(i);
|
|
147
|
+
typeof n.cancel == "function" && n.cancel(), c(l);
|
|
148
148
|
}, e), (async () => {
|
|
149
149
|
try {
|
|
150
|
-
d(await
|
|
151
|
-
} catch (
|
|
152
|
-
|
|
150
|
+
d(await n);
|
|
151
|
+
} catch (i) {
|
|
152
|
+
c(i);
|
|
153
153
|
} finally {
|
|
154
|
-
r.customTimers.clearTimeout.call(void 0,
|
|
154
|
+
r.customTimers.clearTimeout.call(void 0, a);
|
|
155
155
|
}
|
|
156
156
|
})();
|
|
157
157
|
});
|
|
158
158
|
return o.clear = () => {
|
|
159
|
-
clearTimeout(
|
|
159
|
+
clearTimeout(a), a = void 0;
|
|
160
160
|
}, o;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
let r = 0,
|
|
164
|
-
for (;
|
|
165
|
-
const o = Math.trunc(
|
|
162
|
+
function Te(n, e, t) {
|
|
163
|
+
let r = 0, a = n.length;
|
|
164
|
+
for (; a > 0; ) {
|
|
165
|
+
const o = Math.trunc(a / 2);
|
|
166
166
|
let d = r + o;
|
|
167
|
-
t(
|
|
167
|
+
t(n[d], e) <= 0 ? (r = ++d, a -= o + 1) : a = o;
|
|
168
168
|
}
|
|
169
169
|
return r;
|
|
170
170
|
}
|
|
171
|
-
var Q = function(
|
|
171
|
+
var Q = function(n, e, t, r) {
|
|
172
172
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
173
|
-
if (typeof e == "function" ?
|
|
174
|
-
return t === "m" ? r : t === "a" ? r.call(
|
|
173
|
+
if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
174
|
+
return t === "m" ? r : t === "a" ? r.call(n) : r ? r.value : e.get(n);
|
|
175
175
|
}, S;
|
|
176
|
-
class
|
|
176
|
+
class Qe {
|
|
177
177
|
constructor() {
|
|
178
178
|
S.set(this, []);
|
|
179
179
|
}
|
|
@@ -190,8 +190,8 @@ class Ae {
|
|
|
190
190
|
Q(this, S, "f").push(r);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
const
|
|
194
|
-
Q(this, S, "f").splice(
|
|
193
|
+
const a = Te(Q(this, S, "f"), r, (o, d) => d.priority - o.priority);
|
|
194
|
+
Q(this, S, "f").splice(a, 0, r);
|
|
195
195
|
}
|
|
196
196
|
dequeue() {
|
|
197
197
|
const e = Q(this, S, "f").shift();
|
|
@@ -205,23 +205,23 @@ class Ae {
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
S = /* @__PURE__ */ new WeakMap();
|
|
208
|
-
var
|
|
208
|
+
var v = function(n, e, t, r, a) {
|
|
209
209
|
if (r === "m") throw new TypeError("Private method is not writable");
|
|
210
|
-
if (r === "a" && !
|
|
211
|
-
if (typeof e == "function" ?
|
|
212
|
-
return r === "a" ?
|
|
213
|
-
}, s = function(
|
|
210
|
+
if (r === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
|
|
211
|
+
if (typeof e == "function" ? n !== e || !a : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
212
|
+
return r === "a" ? a.call(n, t) : a ? a.value = t : e.set(n, t), t;
|
|
213
|
+
}, s = function(n, e, t, r) {
|
|
214
214
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
215
|
-
if (typeof e == "function" ?
|
|
216
|
-
return t === "m" ? r : t === "a" ? r.call(
|
|
217
|
-
},
|
|
215
|
+
if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
216
|
+
return t === "m" ? r : t === "a" ? r.call(n) : r ? r.value : e.get(n);
|
|
217
|
+
}, _, M, W, C, Y, z, j, E, L, g, q, P, D, I, R, re, se, oe, ne, ie, $, B, G, V, le, U;
|
|
218
218
|
class ue extends Error {
|
|
219
219
|
}
|
|
220
|
-
class
|
|
220
|
+
class xe extends Ae {
|
|
221
221
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
222
222
|
constructor(e) {
|
|
223
|
-
var t, r,
|
|
224
|
-
if (super(),
|
|
223
|
+
var t, r, a, o;
|
|
224
|
+
if (super(), _.add(this), M.set(this, void 0), W.set(this, void 0), C.set(this, 0), Y.set(this, void 0), z.set(this, void 0), j.set(this, 0), E.set(this, void 0), L.set(this, void 0), g.set(this, void 0), q.set(this, void 0), P.set(this, 0), D.set(this, void 0), I.set(this, void 0), R.set(this, void 0), Object.defineProperty(this, "timeout", {
|
|
225
225
|
enumerable: !0,
|
|
226
226
|
configurable: !0,
|
|
227
227
|
writable: !0,
|
|
@@ -232,48 +232,48 @@ class Ie extends Pe {
|
|
|
232
232
|
interval: 0,
|
|
233
233
|
concurrency: Number.POSITIVE_INFINITY,
|
|
234
234
|
autoStart: !0,
|
|
235
|
-
queueClass:
|
|
235
|
+
queueClass: Qe,
|
|
236
236
|
...e
|
|
237
237
|
}, !(typeof e.intervalCap == "number" && e.intervalCap >= 1))
|
|
238
238
|
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r = (t = e.intervalCap) === null || t === void 0 ? void 0 : t.toString()) !== null && r !== void 0 ? r : ""}\` (${typeof e.intervalCap})`);
|
|
239
239
|
if (e.interval === void 0 || !(Number.isFinite(e.interval) && e.interval >= 0))
|
|
240
|
-
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(o = (
|
|
241
|
-
|
|
240
|
+
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(o = (a = e.interval) === null || a === void 0 ? void 0 : a.toString()) !== null && o !== void 0 ? o : ""}\` (${typeof e.interval})`);
|
|
241
|
+
v(this, M, e.carryoverConcurrencyCount, "f"), v(this, W, e.intervalCap === Number.POSITIVE_INFINITY || e.interval === 0, "f"), v(this, Y, e.intervalCap, "f"), v(this, z, e.interval, "f"), v(this, g, new e.queueClass(), "f"), v(this, q, e.queueClass, "f"), this.concurrency = e.concurrency, this.timeout = e.timeout, v(this, R, e.throwOnTimeout === !0, "f"), v(this, I, e.autoStart === !1, "f");
|
|
242
242
|
}
|
|
243
243
|
get concurrency() {
|
|
244
|
-
return s(this,
|
|
244
|
+
return s(this, D, "f");
|
|
245
245
|
}
|
|
246
246
|
set concurrency(e) {
|
|
247
247
|
if (!(typeof e == "number" && e >= 1))
|
|
248
248
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);
|
|
249
|
-
|
|
249
|
+
v(this, D, e, "f"), s(this, _, "m", V).call(this);
|
|
250
250
|
}
|
|
251
251
|
async add(e, t = {}) {
|
|
252
252
|
return t = {
|
|
253
253
|
timeout: this.timeout,
|
|
254
|
-
throwOnTimeout: s(this,
|
|
254
|
+
throwOnTimeout: s(this, R, "f"),
|
|
255
255
|
...t
|
|
256
|
-
}, new Promise((r,
|
|
256
|
+
}, new Promise((r, a) => {
|
|
257
257
|
s(this, g, "f").enqueue(async () => {
|
|
258
|
-
var o, d,
|
|
259
|
-
|
|
258
|
+
var o, d, c;
|
|
259
|
+
v(this, P, (d = s(this, P, "f"), d++, d), "f"), v(this, C, (c = s(this, C, "f"), c++, c), "f");
|
|
260
260
|
try {
|
|
261
261
|
if (!((o = t.signal) === null || o === void 0) && o.aborted)
|
|
262
262
|
throw new ue("The task was aborted.");
|
|
263
|
-
let
|
|
264
|
-
t.timeout && (
|
|
265
|
-
const l = await
|
|
263
|
+
let i = e({ signal: t.signal });
|
|
264
|
+
t.timeout && (i = Ce(Promise.resolve(i), t.timeout)), t.signal && (i = Promise.race([i, s(this, _, "m", le).call(this, t.signal)]));
|
|
265
|
+
const l = await i;
|
|
266
266
|
r(l), this.emit("completed", l);
|
|
267
|
-
} catch (
|
|
268
|
-
if (
|
|
267
|
+
} catch (i) {
|
|
268
|
+
if (i instanceof ae && !t.throwOnTimeout) {
|
|
269
269
|
r();
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
a(i), this.emit("error", i);
|
|
273
273
|
} finally {
|
|
274
|
-
s(this,
|
|
274
|
+
s(this, _, "m", oe).call(this);
|
|
275
275
|
}
|
|
276
|
-
}, t), this.emit("add"), s(this,
|
|
276
|
+
}, t), this.emit("add"), s(this, _, "m", $).call(this);
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
async addAll(e, t) {
|
|
@@ -283,19 +283,19 @@ class Ie extends Pe {
|
|
|
283
283
|
Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
|
|
284
284
|
*/
|
|
285
285
|
start() {
|
|
286
|
-
return s(this, I, "f") ? (
|
|
286
|
+
return s(this, I, "f") ? (v(this, I, !1, "f"), s(this, _, "m", V).call(this), this) : this;
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
289
|
Put queue execution on hold.
|
|
290
290
|
*/
|
|
291
291
|
pause() {
|
|
292
|
-
|
|
292
|
+
v(this, I, !0, "f");
|
|
293
293
|
}
|
|
294
294
|
/**
|
|
295
295
|
Clear the queue.
|
|
296
296
|
*/
|
|
297
297
|
clear() {
|
|
298
|
-
|
|
298
|
+
v(this, g, new (s(this, q, "f"))(), "f");
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -303,7 +303,7 @@ class Ie extends Pe {
|
|
|
303
303
|
@returns A promise that settles when the queue becomes empty.
|
|
304
304
|
*/
|
|
305
305
|
async onEmpty() {
|
|
306
|
-
s(this, g, "f").size !== 0 && await s(this,
|
|
306
|
+
s(this, g, "f").size !== 0 && await s(this, _, "m", U).call(this, "empty");
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
309
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -313,7 +313,7 @@ class Ie extends Pe {
|
|
|
313
313
|
Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
|
|
314
314
|
*/
|
|
315
315
|
async onSizeLessThan(e) {
|
|
316
|
-
s(this, g, "f").size < e || await s(this,
|
|
316
|
+
s(this, g, "f").size < e || await s(this, _, "m", U).call(this, "next", () => s(this, g, "f").size < e);
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
319
319
|
The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
|
|
@@ -321,7 +321,7 @@ class Ie extends Pe {
|
|
|
321
321
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
322
322
|
*/
|
|
323
323
|
async onIdle() {
|
|
324
|
-
s(this, P, "f") === 0 && s(this, g, "f").size === 0 || await s(this,
|
|
324
|
+
s(this, P, "f") === 0 && s(this, g, "f").size === 0 || await s(this, _, "m", U).call(this, "idle");
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
327
|
Size of the queue, the number of queued items waiting to run.
|
|
@@ -350,46 +350,46 @@ class Ie extends Pe {
|
|
|
350
350
|
return s(this, I, "f");
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
return s(this,
|
|
353
|
+
M = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakSet(), re = function() {
|
|
354
|
+
return s(this, W, "f") || s(this, C, "f") < s(this, Y, "f");
|
|
355
355
|
}, se = function() {
|
|
356
|
-
return s(this, P, "f") < s(this,
|
|
356
|
+
return s(this, P, "f") < s(this, D, "f");
|
|
357
357
|
}, oe = function() {
|
|
358
358
|
var e;
|
|
359
|
-
|
|
360
|
-
}, ie = function() {
|
|
361
|
-
s(this, v, "m", V).call(this), s(this, v, "m", G).call(this), m(this, L, void 0, "f");
|
|
359
|
+
v(this, P, (e = s(this, P, "f"), e--, e), "f"), s(this, _, "m", $).call(this), this.emit("next");
|
|
362
360
|
}, ne = function() {
|
|
361
|
+
s(this, _, "m", G).call(this), s(this, _, "m", B).call(this), v(this, L, void 0, "f");
|
|
362
|
+
}, ie = function() {
|
|
363
363
|
const e = Date.now();
|
|
364
364
|
if (s(this, E, "f") === void 0) {
|
|
365
365
|
const t = s(this, j, "f") - e;
|
|
366
366
|
if (t < 0)
|
|
367
|
-
|
|
367
|
+
v(this, C, s(this, M, "f") ? s(this, P, "f") : 0, "f");
|
|
368
368
|
else
|
|
369
|
-
return s(this, L, "f") === void 0 &&
|
|
370
|
-
s(this,
|
|
369
|
+
return s(this, L, "f") === void 0 && v(this, L, setTimeout(() => {
|
|
370
|
+
s(this, _, "m", ne).call(this);
|
|
371
371
|
}, t), "f"), !0;
|
|
372
372
|
}
|
|
373
373
|
return !1;
|
|
374
|
-
},
|
|
374
|
+
}, $ = function() {
|
|
375
375
|
if (s(this, g, "f").size === 0)
|
|
376
|
-
return s(this, E, "f") && clearInterval(s(this, E, "f")),
|
|
376
|
+
return s(this, E, "f") && clearInterval(s(this, E, "f")), v(this, E, void 0, "f"), this.emit("empty"), s(this, P, "f") === 0 && this.emit("idle"), !1;
|
|
377
377
|
if (!s(this, I, "f")) {
|
|
378
|
-
const e = !s(this,
|
|
379
|
-
if (s(this,
|
|
378
|
+
const e = !s(this, _, "a", ie);
|
|
379
|
+
if (s(this, _, "a", re) && s(this, _, "a", se)) {
|
|
380
380
|
const t = s(this, g, "f").dequeue();
|
|
381
|
-
return t ? (this.emit("active"), t(), e && s(this,
|
|
381
|
+
return t ? (this.emit("active"), t(), e && s(this, _, "m", B).call(this), !0) : !1;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
return !1;
|
|
385
|
+
}, B = function() {
|
|
386
|
+
s(this, W, "f") || s(this, E, "f") !== void 0 || (v(this, E, setInterval(() => {
|
|
387
|
+
s(this, _, "m", G).call(this);
|
|
388
|
+
}, s(this, z, "f")), "f"), v(this, j, Date.now() + s(this, z, "f"), "f"));
|
|
385
389
|
}, G = function() {
|
|
386
|
-
s(this,
|
|
387
|
-
s(this, v, "m", V).call(this);
|
|
388
|
-
}, s(this, N, "f")), "f"), m(this, j, Date.now() + s(this, N, "f"), "f"));
|
|
390
|
+
s(this, C, "f") === 0 && s(this, P, "f") === 0 && s(this, E, "f") && (clearInterval(s(this, E, "f")), v(this, E, void 0, "f")), v(this, C, s(this, M, "f") ? s(this, P, "f") : 0, "f"), s(this, _, "m", V).call(this);
|
|
389
391
|
}, V = function() {
|
|
390
|
-
|
|
391
|
-
}, K = function() {
|
|
392
|
-
for (; s(this, v, "m", R).call(this); )
|
|
392
|
+
for (; s(this, _, "m", $).call(this); )
|
|
393
393
|
;
|
|
394
394
|
}, le = async function(e) {
|
|
395
395
|
return new Promise((t, r) => {
|
|
@@ -399,20 +399,20 @@ z = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), C = /* @__
|
|
|
399
399
|
});
|
|
400
400
|
}, U = async function(e, t) {
|
|
401
401
|
return new Promise((r) => {
|
|
402
|
-
const
|
|
403
|
-
t && !t() || (this.off(e,
|
|
402
|
+
const a = () => {
|
|
403
|
+
t && !t() || (this.off(e, a), r());
|
|
404
404
|
};
|
|
405
|
-
this.on(e,
|
|
405
|
+
this.on(e, a);
|
|
406
406
|
});
|
|
407
407
|
};
|
|
408
|
-
class
|
|
408
|
+
class Fe {
|
|
409
409
|
constructor(e) {
|
|
410
410
|
this.apisStorage = e;
|
|
411
411
|
}
|
|
412
412
|
apisStorage;
|
|
413
413
|
data = /* @__PURE__ */ new Map();
|
|
414
414
|
loading = /* @__PURE__ */ new Set();
|
|
415
|
-
pQueue = new
|
|
415
|
+
pQueue = new xe({ concurrency: 20 });
|
|
416
416
|
async get(e) {
|
|
417
417
|
return this.data.has(e) ? this.data.get(e) ?? null : (await this.loadAndParse(e), this.data.get(e) ?? null);
|
|
418
418
|
}
|
|
@@ -425,24 +425,24 @@ class Ce {
|
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
427
|
t && this.data.delete(e), this.loading.add(e), await this.pQueue.add(async () => {
|
|
428
|
-
const r = fe(e) ?
|
|
428
|
+
const r = fe(e) ? k.WEB : k.FS, a = r === k.WEB ? e : await this.apisStorage.getAbsolutePath(e);
|
|
429
429
|
try {
|
|
430
|
-
const { definition: o, fileDependencies: d } = await de(
|
|
430
|
+
const { definition: o, fileDependencies: d } = await de(a);
|
|
431
431
|
if (!o) {
|
|
432
|
-
this.data.set(e, null), await
|
|
432
|
+
this.data.set(e, null), await N(e);
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
435
|
+
const c = this.apisStorage.parse({ uri: e, type: r, content: o });
|
|
436
436
|
this.data.set(e, {
|
|
437
|
-
...
|
|
437
|
+
...c,
|
|
438
438
|
fileDependencies: d
|
|
439
|
-
}), await
|
|
439
|
+
}), await N(e);
|
|
440
440
|
} catch (o) {
|
|
441
441
|
if (this.data.set(e, null), o instanceof Error && (o.message.includes("Unsupported specification") || o.message.includes("File not found"))) {
|
|
442
|
-
await
|
|
442
|
+
await N(e);
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
console.info("Error loading api " + e, o), await
|
|
445
|
+
console.info("Error loading api " + e, o), await H(e, o);
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
}), this.loading.delete(e);
|
|
@@ -460,18 +460,23 @@ class Ce {
|
|
|
460
460
|
this.data.clear(), this.loading.clear();
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
class
|
|
463
|
+
class We extends pe {
|
|
464
464
|
apiLoader;
|
|
465
465
|
constructor(e, t, r) {
|
|
466
|
-
const
|
|
466
|
+
const a = new X(e.systemFilesDir), o = new X(e.userFilesDir);
|
|
467
467
|
super(
|
|
468
|
-
|
|
468
|
+
a,
|
|
469
469
|
o,
|
|
470
470
|
e,
|
|
471
471
|
!0,
|
|
472
|
+
{
|
|
473
|
+
filePaths: _e,
|
|
474
|
+
basePath: ve,
|
|
475
|
+
rebuildWhenUnparseable: !1
|
|
476
|
+
},
|
|
472
477
|
t,
|
|
473
478
|
r
|
|
474
|
-
), this.apiLoader = new
|
|
479
|
+
), this.apiLoader = new Fe(this.apisStorage), this.setupWriteListeners(o);
|
|
475
480
|
}
|
|
476
481
|
setupWriteListeners(e) {
|
|
477
482
|
e.on("write-start", (t) => {
|
|
@@ -489,24 +494,22 @@ class Oe extends pe {
|
|
|
489
494
|
"com.redocly.storage.loadUserState",
|
|
490
495
|
[F("storageOperation", "loadUserState", "storage")],
|
|
491
496
|
e?.parentCtx
|
|
492
|
-
), [r,
|
|
497
|
+
), [r, a, o] = await Promise.all([
|
|
493
498
|
this.activeEnvironmentIdStorage.read(),
|
|
494
499
|
this.tabsStateStorage.read(),
|
|
495
500
|
this.environmentsStorage.read()
|
|
496
|
-
]);
|
|
501
|
+
]), d = o.length > 0 ? o : me(be);
|
|
497
502
|
t?.setAttribute("status", "completed"), t?.setAttribute("environmentCount", o.length), t?.setStatus(O.OK), t?.end();
|
|
498
|
-
const { apiFiles:
|
|
499
|
-
await this.loadAndParseApis(
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
const f = this.apiLoader.getAll();
|
|
503
|
-
return this.apisStorage.setItemIds(f.map((u) => u.id)), e?.setAttribute("status", "completed"), e?.setStatus(O.OK), e?.end(), {
|
|
503
|
+
const { apiFiles: c, collectionFiles: i } = await this.detectProjectFiles(e);
|
|
504
|
+
await this.loadAndParseApis(c, e);
|
|
505
|
+
const h = (await this.loadAndParseCollections(i, e)).filter((w) => w !== null), f = this.apiLoader.getAll();
|
|
506
|
+
return e?.setAttribute("status", "completed"), e?.setStatus(O.OK), e?.end(), {
|
|
504
507
|
project: this.project,
|
|
505
508
|
activeEnvironmentId: r,
|
|
506
|
-
tabsState:
|
|
507
|
-
environments:
|
|
509
|
+
tabsState: a,
|
|
510
|
+
environments: d,
|
|
508
511
|
apis: f,
|
|
509
|
-
collections:
|
|
512
|
+
collections: h
|
|
510
513
|
};
|
|
511
514
|
}
|
|
512
515
|
async detectProjectFiles(e) {
|
|
@@ -514,23 +517,23 @@ class Oe extends pe {
|
|
|
514
517
|
"com.redocly.storage.detectFiles",
|
|
515
518
|
[F("storageOperation", "detectFiles", "storage")],
|
|
516
519
|
e?.parentCtx
|
|
517
|
-
), { api_files: r, collection_files:
|
|
520
|
+
), { api_files: r, collection_files: a } = await we(
|
|
518
521
|
"fs_scan",
|
|
519
522
|
{ dir: this.project.userFilesDir }
|
|
520
523
|
);
|
|
521
|
-
return t?.setAttribute("status", "completed"), t?.setAttribute("filesCount", r.length +
|
|
524
|
+
return t?.setAttribute("status", "completed"), t?.setAttribute("filesCount", r.length + a.length), t?.setAttribute("apiFilesCount", r.length), t?.setAttribute("collectionFilesCount", a.length), t?.setStatus(O.OK), t?.end(), {
|
|
522
525
|
apiFiles: r,
|
|
523
|
-
collectionFiles:
|
|
526
|
+
collectionFiles: a
|
|
524
527
|
};
|
|
525
528
|
}
|
|
526
|
-
|
|
529
|
+
readEnvironments() {
|
|
527
530
|
return this.environmentsStorage.read();
|
|
528
531
|
}
|
|
529
532
|
deleteApiFromCache(e) {
|
|
530
533
|
this.apiLoader.delete(e);
|
|
531
534
|
}
|
|
532
535
|
async loadAndParseApis(e, t, r = !1) {
|
|
533
|
-
const
|
|
536
|
+
const a = this.telemetry?.startSpan(
|
|
534
537
|
"com.redocly.storage.parseApis",
|
|
535
538
|
[
|
|
536
539
|
{
|
|
@@ -539,14 +542,14 @@ class Oe extends pe {
|
|
|
539
542
|
}
|
|
540
543
|
],
|
|
541
544
|
t?.parentCtx
|
|
542
|
-
), o = await
|
|
545
|
+
), o = await J(e, 20, async (d) => {
|
|
543
546
|
try {
|
|
544
547
|
return await this.apiLoader.load(d.relative_path, r), this.apiLoader.get(d.relative_path);
|
|
545
|
-
} catch (
|
|
546
|
-
return console.info(`Error parsing YAML/JSON file ${d.absolute_path}:`,
|
|
548
|
+
} catch (c) {
|
|
549
|
+
return console.info(`Error parsing YAML/JSON file ${d.absolute_path}:`, c), await H(d.relative_path, c), null;
|
|
547
550
|
}
|
|
548
551
|
});
|
|
549
|
-
return
|
|
552
|
+
return a?.setAttribute("status", "completed"), a?.setAttribute("parsedApisCount", this.apiLoader.size), a?.setStatus(O.OK), a?.end(), o;
|
|
550
553
|
}
|
|
551
554
|
async loadAndParseCollections(e, t) {
|
|
552
555
|
const r = this.telemetry?.startSpan(
|
|
@@ -558,48 +561,48 @@ class Oe extends pe {
|
|
|
558
561
|
}
|
|
559
562
|
],
|
|
560
563
|
t?.parentCtx
|
|
561
|
-
),
|
|
564
|
+
), a = await J(e, 20, async (o) => {
|
|
562
565
|
try {
|
|
563
566
|
const d = await this.userFilesStorage.get(o.relative_path);
|
|
564
567
|
if (!d)
|
|
565
568
|
return null;
|
|
566
|
-
const
|
|
567
|
-
if (typeof
|
|
568
|
-
return await
|
|
569
|
-
const
|
|
569
|
+
const c = ye.load(d);
|
|
570
|
+
if (typeof c != "object" || c === null || typeof c.arazzo != "string")
|
|
571
|
+
return await N(o.relative_path), null;
|
|
572
|
+
const i = [];
|
|
570
573
|
await Promise.all(
|
|
571
|
-
|
|
572
|
-
const
|
|
574
|
+
c.sourceDescriptions?.map(async (f) => {
|
|
575
|
+
const w = f.type, y = f.url, p = !w || w === "openapi", b = await ge({
|
|
573
576
|
projectPath: this.project.userFilesDir,
|
|
574
|
-
apiUrl:
|
|
577
|
+
apiUrl: y,
|
|
575
578
|
collectionId: o.relative_path
|
|
576
579
|
});
|
|
577
580
|
if (p) {
|
|
578
|
-
const
|
|
579
|
-
|
|
581
|
+
const u = await this.apiLoader.get(b);
|
|
582
|
+
u && i.push(u);
|
|
580
583
|
}
|
|
581
584
|
})
|
|
582
585
|
);
|
|
583
|
-
const l = await
|
|
586
|
+
const l = await Pe.join(
|
|
584
587
|
this.project.userFilesDir,
|
|
585
588
|
o.relative_path
|
|
586
|
-
),
|
|
589
|
+
), h = await this.collectionsStorage.parse(
|
|
587
590
|
{
|
|
588
591
|
uri: o.relative_path,
|
|
589
|
-
type:
|
|
590
|
-
content:
|
|
592
|
+
type: k.FS,
|
|
593
|
+
content: c,
|
|
591
594
|
fileDependencies: /* @__PURE__ */ new Set([l])
|
|
592
595
|
},
|
|
593
|
-
|
|
596
|
+
i
|
|
594
597
|
);
|
|
595
|
-
return await
|
|
598
|
+
return await N(o.relative_path), h;
|
|
596
599
|
} catch (d) {
|
|
597
|
-
return console.info(`Error parsing Arazzo file ${o.relative_path}:`, d), await
|
|
600
|
+
return console.info(`Error parsing Arazzo file ${o.relative_path}:`, d), await H(o.relative_path, d), null;
|
|
598
601
|
}
|
|
599
602
|
});
|
|
600
|
-
return r?.setAttribute("status", "completed"), r?.setAttribute("parsedCollectionsCount",
|
|
603
|
+
return r?.setAttribute("status", "completed"), r?.setAttribute("parsedCollectionsCount", a.length), r?.setStatus(O.OK), r?.end(), a;
|
|
601
604
|
}
|
|
602
605
|
}
|
|
603
606
|
export {
|
|
604
|
-
|
|
607
|
+
We as TauriRootStorage
|
|
605
608
|
};
|