@platforma-sdk/block-tools 2.11.2 → 2.11.4
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/bin/run.js +9 -5
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +13 -13
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +845 -981
- package/dist/cli.mjs.map +1 -1
- package/dist/cmd/build-meta.d.ts +2 -9
- package/dist/cmd/build-model.d.ts +2 -10
- package/dist/cmd/list-overview-snapshots.d.ts +2 -9
- package/dist/cmd/mark-stable.d.ts +2 -13
- package/dist/cmd/pack.d.ts +2 -9
- package/dist/cmd/publish.d.ts +2 -12
- package/dist/cmd/refresh-registry.d.ts +2 -9
- package/dist/cmd/restore-overview-from-snapshot.d.ts +2 -10
- package/dist/cmd/structure/check.d.ts +2 -10
- package/dist/cmd/structure/init.d.ts +2 -18
- package/dist/cmd/structure/refresh.d.ts +10 -11
- package/dist/cmd/update-deps.d.ts +2 -6
- package/dist/cmd/upload-package-v1.d.ts +2 -14
- package/dist/config-BmJWc8sR.js +3 -0
- package/dist/config-BmJWc8sR.js.map +1 -0
- package/dist/{config-DpfTzcgG.mjs → config-CiC347sB.mjs} +453 -398
- package/dist/config-CiC347sB.mjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +15 -15
- package/dist/registry_v1/config_schema.d.ts +7 -7
- package/dist/registry_v1/flags.d.ts +2 -4
- package/dist/structure/cli/run-structure.d.ts +1 -1
- package/dist/structure/engine/discovery.d.ts +2 -3
- package/dist/structure/rules/block-package-json.d.ts +3 -3
- package/dist/structure/rules/shared/pascal-case.d.ts +1 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/model/block_components.d.ts +11 -0
- package/dist/v2/model/block_meta.d.ts +7 -0
- package/dist/v2/resolve_to_registry.d.ts +37 -0
- package/dist/v2/source_package.d.ts +12 -0
- package/package.json +9 -24
- package/src/cli.test.ts +56 -0
- package/src/cli.ts +50 -0
- package/src/cmd/build-meta.ts +11 -22
- package/src/cmd/build-model.ts +16 -33
- package/src/cmd/list-overview-snapshots.ts +24 -28
- package/src/cmd/mark-stable.ts +35 -55
- package/src/cmd/pack.ts +11 -22
- package/src/cmd/publish.test.ts +35 -0
- package/src/cmd/publish.ts +55 -49
- package/src/cmd/refresh-registry.ts +22 -26
- package/src/cmd/restore-overview-from-snapshot.ts +24 -34
- package/src/cmd/structure/check.ts +19 -28
- package/src/cmd/structure/init.ts +40 -47
- package/src/cmd/structure/refresh.ts +45 -36
- package/src/cmd/update-deps.ts +22 -12
- package/src/cmd/upload-package-v1.ts +42 -60
- package/src/registry_v1/flags.ts +7 -7
- package/src/structure/__tests__/discovery-shortname.test.ts +3 -0
- package/src/structure/__tests__/facade-end-state.test.ts +195 -0
- package/src/structure/__tests__/model-package-json.snapshot.test.ts +1 -1
- package/src/structure/cli/run-structure.ts +2 -2
- package/src/structure/engine/__tests__/discovery.test.ts +22 -26
- package/src/structure/engine/discovery.ts +12 -30
- package/src/structure/rules/block-package-json.ts +146 -64
- package/src/structure/rules/block.ts +40 -5
- package/src/structure/rules/model-package-json.ts +6 -1
- package/src/structure/rules/shared/pascal-case.ts +16 -0
- package/src/structure/rules/software-package-json.ts +6 -1
- package/src/structure/rules/test-package-json.ts +5 -1
- package/src/structure/rules/ui-package-json.ts +5 -1
- package/src/structure/rules/workflow-package-json.ts +5 -1
- package/src/structure/templates/static/block/src/AGENTS.ts +5 -0
- package/src/structure/templates/static/block/src/agents-extra.ts +8 -0
- package/src/structure/templates/static/block/src/block-extra.ts +9 -0
- package/src/structure/templates/static/block/tsconfig.json +4 -0
- package/src/structure/templates/text/block/src/index.tpl.ts +55 -0
- package/src/v2/from_pack_v2.test.ts +142 -0
- package/src/v2/index.ts +1 -0
- package/src/v2/model/block_components.ts +33 -0
- package/src/v2/model/block_meta.ts +18 -0
- package/src/v2/model/content_conversion.ts +0 -1
- package/src/v2/resolve_to_registry.ts +84 -0
- package/src/v2/source_package.ts +34 -1
- package/bin/dev.cmd +0 -3
- package/bin/dev.js +0 -6
- package/dist/cmd/index.d.ts +0 -28
- package/dist/config-DpfTzcgG.mjs.map +0 -1
- package/dist/config-xxVy3IQR.js +0 -3
- package/dist/config-xxVy3IQR.js.map +0 -1
- package/src/cmd/index.ts +0 -31
- package/src/structure/templates/static/block/index.d.ts +0 -6
- package/src/structure/templates/static/block/index.js +0 -8
|
@@ -1,59 +1,61 @@
|
|
|
1
1
|
import e from "node:path";
|
|
2
2
|
import * as t from "node:fs";
|
|
3
|
-
import n from "node:fs
|
|
4
|
-
import
|
|
5
|
-
import * as i from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
3
|
+
import n from "node:fs";
|
|
4
|
+
import r from "node:fs/promises";
|
|
5
|
+
import * as i from "mime-types";
|
|
6
|
+
import * as a from "tar";
|
|
7
|
+
import { tryResolve as o } from "@milaboratories/resolve-helper";
|
|
8
|
+
import { AnyChannel as s, BlockPackDescriptionFromPackageJsonRaw as c, BlockPackDescriptionManifest as l, BlockPackIdNoVersion as u, BlockPackManifest as d, BlockPackManifestFile as f, SemVer as p, Sha256Schema as m, VersionWithChannels as h, addPrefixToRelative as g, blockPackIdNoVersionEquals as _, blockPackIdToString as v, mapRemoteToAbsolute as y } from "@milaboratories/pl-model-middle-layer";
|
|
9
|
+
import { extractConfigGeneric as ee } from "@milaboratories/pl-model-common";
|
|
10
|
+
import { gunzip as te, gunzipSync as ne, gzip as re } from "node:zlib";
|
|
11
|
+
import { createHash as ie, randomUUID as ae } from "node:crypto";
|
|
12
|
+
import { ConsoleLoggerAdapter as oe, Retry2TimesWithDelay as b, notEmpty as se, retry as x } from "@milaboratories/ts-helpers";
|
|
13
|
+
import { fileURLToPath as ce } from "node:url";
|
|
14
|
+
import { promisify as le } from "node:util";
|
|
15
|
+
import { z as S } from "zod";
|
|
16
|
+
import ue from "canonicalize";
|
|
17
|
+
import { LRUCache as de } from "lru-cache";
|
|
18
|
+
import C from "node:path/posix";
|
|
19
|
+
import { S3 as fe, paginateListObjectsV2 as pe } from "@aws-sdk/client-s3";
|
|
20
|
+
import { request as me } from "undici";
|
|
21
|
+
import { defaultHttpDispatcher as he } from "@milaboratories/pl-http";
|
|
22
|
+
import ge from "yaml";
|
|
23
|
+
import * as _e from "node:os";
|
|
22
24
|
//#region \0rolldown/runtime.js
|
|
23
|
-
var
|
|
25
|
+
var ve = Object.create, w = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, be = Object.getOwnPropertyNames, xe = Object.getPrototypeOf, Se = Object.prototype.hasOwnProperty, T = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Ce = (e, t) => {
|
|
24
26
|
let n = {};
|
|
25
|
-
for (var r in e)
|
|
27
|
+
for (var r in e) w(n, r, {
|
|
26
28
|
get: e[r],
|
|
27
29
|
enumerable: !0
|
|
28
30
|
});
|
|
29
|
-
return t ||
|
|
30
|
-
},
|
|
31
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
31
|
+
return t || w(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
32
|
+
}, we = (e, t, n, r) => {
|
|
33
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Se.call(e, s) && s !== n && w(e, s, {
|
|
32
34
|
get: ((e) => t[e]).bind(null, s),
|
|
33
|
-
enumerable: !(r =
|
|
35
|
+
enumerable: !(r = ye(t, s)) || r.enumerable
|
|
34
36
|
});
|
|
35
37
|
return e;
|
|
36
|
-
},
|
|
38
|
+
}, Te = (e, t, n) => (n = e == null ? {} : ve(xe(e)), we(t || !e || !e.__esModule ? w(n, "default", {
|
|
37
39
|
value: e,
|
|
38
40
|
enumerable: !0
|
|
39
|
-
}) : n, e)),
|
|
41
|
+
}) : n, e)), Ee = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
40
42
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
41
43
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
42
44
|
});
|
|
43
45
|
//#endregion
|
|
44
46
|
//#region src/v2/model/content_conversion.ts
|
|
45
|
-
function
|
|
46
|
-
let n =
|
|
47
|
+
function De(e, t) {
|
|
48
|
+
let n = o(e, t);
|
|
47
49
|
if (n === void 0) throw Error(`Can't resolve ${t} against ${e}`);
|
|
48
50
|
return {
|
|
49
51
|
type: "absolute-file",
|
|
50
52
|
file: n
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function Oe(e, t, n) {
|
|
54
56
|
let r = t.endsWith("/") ? t : `${t}/`;
|
|
55
57
|
for (let t of n) {
|
|
56
|
-
let n =
|
|
58
|
+
let n = o(e, r + t);
|
|
57
59
|
if (n !== void 0) {
|
|
58
60
|
if (!n.endsWith(t)) throw Error(`Unexpected resolve result ${n} with index file ${t}`);
|
|
59
61
|
return {
|
|
@@ -64,37 +66,37 @@ function Te(e, t, n) {
|
|
|
64
66
|
}
|
|
65
67
|
throw Error(`Can't resolve ${t} folder against ${e}, no index file found (${n.join(", ")})`);
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function ke(t) {
|
|
68
70
|
return (n) => n.type === "relative" ? {
|
|
69
71
|
type: "absolute-file",
|
|
70
72
|
file: e.resolve(t, n.path)
|
|
71
73
|
} : n;
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
return async (e) => e.type === "absolute-file" ? await
|
|
75
|
+
function Ae() {
|
|
76
|
+
return async (e) => e.type === "absolute-file" ? await r.readFile(e.file, { encoding: "utf-8" }) : e.content;
|
|
75
77
|
}
|
|
76
|
-
function
|
|
78
|
+
function je() {
|
|
77
79
|
return async (e) => {
|
|
78
80
|
if (e.type === "absolute-file") {
|
|
79
|
-
let t =
|
|
81
|
+
let t = i.lookup(e.file);
|
|
80
82
|
if (!t) throw Error(`Can't recognize mime type of the file: ${e.file}.`);
|
|
81
83
|
return {
|
|
82
84
|
type: "explicit-base64",
|
|
83
85
|
mimeType: t,
|
|
84
|
-
content: await
|
|
86
|
+
content: await r.readFile(e.file, { encoding: "base64" })
|
|
85
87
|
};
|
|
86
88
|
} else return e;
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
|
-
function
|
|
91
|
+
function Me() {
|
|
90
92
|
return async (e) => {
|
|
91
93
|
if (e.type === "absolute-file") {
|
|
92
|
-
let t =
|
|
94
|
+
let t = i.lookup(e.file);
|
|
93
95
|
if (!t) throw Error(`Can't recognize mime type of the file: ${e.file}.`);
|
|
94
96
|
return {
|
|
95
97
|
type: "explicit-bytes",
|
|
96
98
|
mimeType: t,
|
|
97
|
-
content: Buffer.from(await
|
|
99
|
+
content: Buffer.from(await r.readFile(e.file))
|
|
98
100
|
};
|
|
99
101
|
} else if (e.type === "explicit-base64") return {
|
|
100
102
|
type: "explicit-bytes",
|
|
@@ -104,44 +106,44 @@ function ke() {
|
|
|
104
106
|
else return e;
|
|
105
107
|
};
|
|
106
108
|
}
|
|
107
|
-
function
|
|
109
|
+
function Ne(t, n) {
|
|
108
110
|
return async (i) => {
|
|
109
111
|
if (i.type === "absolute-file") {
|
|
110
112
|
let a = e.basename(i.file), o = e.resolve(t, a);
|
|
111
|
-
return
|
|
113
|
+
return n?.push(a), await r.cp(i.file, o), {
|
|
112
114
|
type: "relative",
|
|
113
115
|
path: a
|
|
114
116
|
};
|
|
115
117
|
} else return i;
|
|
116
118
|
};
|
|
117
119
|
}
|
|
118
|
-
function
|
|
120
|
+
function Pe(t, n, r) {
|
|
119
121
|
if (!n.endsWith(".tgz")) throw Error(`Unexpected tgz file name: ${n}`);
|
|
120
|
-
return async (
|
|
122
|
+
return async (i) => {
|
|
121
123
|
let o = e.resolve(t, n);
|
|
122
|
-
return await
|
|
124
|
+
return await a.create({
|
|
123
125
|
gzip: !0,
|
|
124
126
|
file: o,
|
|
125
|
-
cwd:
|
|
127
|
+
cwd: i.folder
|
|
126
128
|
}, ["."]), r?.push(n), {
|
|
127
129
|
type: "relative",
|
|
128
130
|
path: n
|
|
129
131
|
};
|
|
130
132
|
};
|
|
131
133
|
}
|
|
132
|
-
function
|
|
134
|
+
function Fe(e) {
|
|
133
135
|
return async (t) => t.type === "explicit-string" ? t : {
|
|
134
136
|
type: "explicit-string",
|
|
135
137
|
content: (await e(t.path)).toString("utf8")
|
|
136
138
|
};
|
|
137
139
|
}
|
|
138
|
-
function
|
|
140
|
+
function Ie(e) {
|
|
139
141
|
return async (t) => t.type === "explicit-string" ? t.content : (await e(t.path)).toString("utf8");
|
|
140
142
|
}
|
|
141
|
-
function
|
|
143
|
+
function Le(e) {
|
|
142
144
|
return async (t) => {
|
|
143
145
|
if (t.type === "explicit-base64") return t;
|
|
144
|
-
let n =
|
|
146
|
+
let n = i.lookup(t.path);
|
|
145
147
|
if (!n) throw Error(`Can't recognize mime type of the file: ${t.path}.`);
|
|
146
148
|
return {
|
|
147
149
|
type: "explicit-base64",
|
|
@@ -150,14 +152,14 @@ function Pe(e) {
|
|
|
150
152
|
};
|
|
151
153
|
};
|
|
152
154
|
}
|
|
153
|
-
function
|
|
155
|
+
function Re(e) {
|
|
154
156
|
return async (t) => {
|
|
155
157
|
if (t.type === "explicit-base64") return {
|
|
156
158
|
type: "explicit-bytes",
|
|
157
159
|
mimeType: t.mimeType,
|
|
158
160
|
content: new Uint8Array(Buffer.from(t.content, "base64"))
|
|
159
161
|
};
|
|
160
|
-
let n =
|
|
162
|
+
let n = i.lookup(t.path);
|
|
161
163
|
if (!n) throw Error(`Can't recognize mime type of the file: ${t.path}.`);
|
|
162
164
|
return {
|
|
163
165
|
type: "explicit-bytes",
|
|
@@ -168,7 +170,7 @@ function Fe(e) {
|
|
|
168
170
|
}
|
|
169
171
|
//#endregion
|
|
170
172
|
//#region src/v2/model/block_meta.ts
|
|
171
|
-
async function
|
|
173
|
+
async function E(e, t, n) {
|
|
172
174
|
let { organization: r } = e, { logo: i, ...a } = r;
|
|
173
175
|
return {
|
|
174
176
|
...e,
|
|
@@ -181,37 +183,58 @@ async function D(e, t, n) {
|
|
|
181
183
|
...e.logo === void 0 ? {} : { logo: await n(e.logo) }
|
|
182
184
|
};
|
|
183
185
|
}
|
|
184
|
-
async function
|
|
185
|
-
let n =
|
|
186
|
-
return
|
|
186
|
+
async function ze(e, t) {
|
|
187
|
+
let n = ke(t);
|
|
188
|
+
return E(e, async (e) => n(e), async (e) => n(e));
|
|
189
|
+
}
|
|
190
|
+
async function Be(e, t) {
|
|
191
|
+
let n = ke(t);
|
|
192
|
+
return E(e, async (e) => n(e), async (e) => n(e));
|
|
187
193
|
}
|
|
188
|
-
async function
|
|
189
|
-
let r =
|
|
190
|
-
return
|
|
194
|
+
async function Ve(e, t, n) {
|
|
195
|
+
let r = Ne(t, n);
|
|
196
|
+
return E(e, async (e) => r(e), async (e) => r(e));
|
|
191
197
|
}
|
|
192
|
-
async function
|
|
193
|
-
return
|
|
198
|
+
async function He(e) {
|
|
199
|
+
return E(e, Ae(), je());
|
|
194
200
|
}
|
|
195
|
-
async function
|
|
196
|
-
return
|
|
201
|
+
async function Ue(e) {
|
|
202
|
+
return E(e, Ae(), Me());
|
|
197
203
|
}
|
|
198
|
-
async function
|
|
199
|
-
return
|
|
204
|
+
async function We(e, t) {
|
|
205
|
+
return E(e, Ie(t), Re(t));
|
|
200
206
|
}
|
|
201
207
|
//#endregion
|
|
202
208
|
//#region src/v2/model/block_components.ts
|
|
203
|
-
function
|
|
209
|
+
function Ge(e, t) {
|
|
210
|
+
return {
|
|
211
|
+
workflow: {
|
|
212
|
+
type: "workflow-v1",
|
|
213
|
+
main: De(t, e.workflow.main)
|
|
214
|
+
},
|
|
215
|
+
model: De(t, e.model),
|
|
216
|
+
ui: Oe(t, e.ui, ["index.html"])
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function Ke(t, n) {
|
|
220
|
+
let r = (t) => ({
|
|
221
|
+
type: "absolute-file",
|
|
222
|
+
file: e.resolve(n, t.path)
|
|
223
|
+
});
|
|
204
224
|
return {
|
|
205
225
|
workflow: {
|
|
206
226
|
type: "workflow-v1",
|
|
207
|
-
main:
|
|
227
|
+
main: r(t.workflow.main)
|
|
208
228
|
},
|
|
209
|
-
model:
|
|
210
|
-
ui:
|
|
229
|
+
model: r(t.model),
|
|
230
|
+
ui: {
|
|
231
|
+
type: "absolute-folder",
|
|
232
|
+
folder: e.resolve(n, t.ui.path)
|
|
233
|
+
}
|
|
211
234
|
};
|
|
212
235
|
}
|
|
213
|
-
async function
|
|
214
|
-
let r =
|
|
236
|
+
async function qe(e, t, n) {
|
|
237
|
+
let r = Ne(t, n), i = Pe(t, "ui.tgz", n);
|
|
215
238
|
return {
|
|
216
239
|
workflow: {
|
|
217
240
|
type: "workflow-v1",
|
|
@@ -221,8 +244,8 @@ async function He(e, t, n) {
|
|
|
221
244
|
ui: await i(e.ui)
|
|
222
245
|
};
|
|
223
246
|
}
|
|
224
|
-
function
|
|
225
|
-
let n =
|
|
247
|
+
function Je(e, t) {
|
|
248
|
+
let n = y(t);
|
|
226
249
|
return {
|
|
227
250
|
workflow: {
|
|
228
251
|
type: "workflow-v1",
|
|
@@ -234,33 +257,33 @@ function Ue(e, t) {
|
|
|
234
257
|
}
|
|
235
258
|
//#endregion
|
|
236
259
|
//#region src/v2/model/block_description.ts
|
|
237
|
-
async function
|
|
238
|
-
let
|
|
260
|
+
async function Ye(e, t) {
|
|
261
|
+
let n = Ge(e.components, t), i = await ze(e.meta, t), a = ee(JSON.parse(await r.readFile(n.model.file, "utf-8")));
|
|
239
262
|
return {
|
|
240
263
|
...e,
|
|
241
|
-
components:
|
|
264
|
+
components: n,
|
|
242
265
|
meta: i,
|
|
243
266
|
featureFlags: a.featureFlags
|
|
244
267
|
};
|
|
245
268
|
}
|
|
246
|
-
async function
|
|
247
|
-
let r = await
|
|
269
|
+
async function Xe(e, t, n) {
|
|
270
|
+
let r = await qe(e.components, t, n), i = await Ve(e.meta, t, n);
|
|
248
271
|
return {
|
|
249
272
|
...e,
|
|
250
273
|
components: r,
|
|
251
274
|
meta: i
|
|
252
275
|
};
|
|
253
276
|
}
|
|
254
|
-
function
|
|
277
|
+
function Ze(e, t, n) {
|
|
255
278
|
return {
|
|
256
279
|
...e,
|
|
257
280
|
components: t(e.components),
|
|
258
281
|
meta: n(e.meta)
|
|
259
282
|
};
|
|
260
283
|
}
|
|
261
|
-
function
|
|
262
|
-
let n =
|
|
263
|
-
return
|
|
284
|
+
function D(e, t) {
|
|
285
|
+
let n = g(t);
|
|
286
|
+
return Ze(e, (e) => ({
|
|
264
287
|
workflow: {
|
|
265
288
|
type: "workflow-v1",
|
|
266
289
|
main: n(e.workflow.main)
|
|
@@ -283,23 +306,23 @@ function O(e, t) {
|
|
|
283
306
|
}
|
|
284
307
|
//#endregion
|
|
285
308
|
//#region src/util.ts
|
|
286
|
-
async function
|
|
309
|
+
async function Qe(e, t) {
|
|
287
310
|
try {
|
|
288
|
-
return t(await
|
|
311
|
+
return t(await r.readFile(e));
|
|
289
312
|
} catch (e) {
|
|
290
313
|
if (e instanceof Error && "code" in e && e.code === "ENOENT") return;
|
|
291
314
|
throw e;
|
|
292
315
|
}
|
|
293
316
|
}
|
|
294
|
-
function
|
|
295
|
-
return Promise.resolve(
|
|
317
|
+
function O(e) {
|
|
318
|
+
return Promise.resolve(ie("sha256").update(ArrayBuffer.isView(e) ? e : Buffer.from(e)).digest("hex").toUpperCase());
|
|
296
319
|
}
|
|
297
320
|
//#endregion
|
|
298
321
|
//#region src/v2/build_dist.ts
|
|
299
|
-
async function
|
|
300
|
-
let i = t.components.workflow.main, a = await
|
|
322
|
+
async function $e(t, n) {
|
|
323
|
+
let i = t.components.workflow.main, a = await r.readFile(e.resolve(n, i.path)), o;
|
|
301
324
|
try {
|
|
302
|
-
let e =
|
|
325
|
+
let e = ne(a).toString("utf-8");
|
|
303
326
|
o = JSON.parse(e);
|
|
304
327
|
} catch {
|
|
305
328
|
return;
|
|
@@ -307,33 +330,33 @@ async function Je(t, r) {
|
|
|
307
330
|
let s = o;
|
|
308
331
|
if (!(s.type !== "pl.tengo-template.v3" || !s.template)) return s.template.requiredCapabilities;
|
|
309
332
|
}
|
|
310
|
-
async function
|
|
311
|
-
await
|
|
312
|
-
let i = [], a = await
|
|
333
|
+
async function et(t, n) {
|
|
334
|
+
await r.mkdir(n, { recursive: !0 });
|
|
335
|
+
let i = [], a = await Xe(t, n, i), o = await $e(a, n);
|
|
313
336
|
o && o.length > 0 && (a.meta = {
|
|
314
337
|
...a.meta,
|
|
315
338
|
requiredCapabilities: o
|
|
316
339
|
});
|
|
317
340
|
let s = await Promise.all(i.map(async (t) => {
|
|
318
|
-
let i = await
|
|
341
|
+
let i = await r.readFile(e.resolve(n, t)), a = await O(i);
|
|
319
342
|
return {
|
|
320
343
|
name: t,
|
|
321
344
|
size: i.length,
|
|
322
345
|
sha256: a
|
|
323
346
|
};
|
|
324
|
-
})), c =
|
|
347
|
+
})), c = d.parse({
|
|
325
348
|
schema: "v2",
|
|
326
349
|
description: { ...a },
|
|
327
350
|
files: s,
|
|
328
351
|
timestamp: Date.now()
|
|
329
352
|
});
|
|
330
|
-
return await
|
|
353
|
+
return await r.writeFile(e.resolve(n, f), JSON.stringify(c)), c;
|
|
331
354
|
}
|
|
332
355
|
//#endregion
|
|
333
356
|
//#region src/v2/source_package.ts
|
|
334
|
-
var
|
|
335
|
-
function
|
|
336
|
-
let t = e.match(
|
|
357
|
+
var k = "block", tt = /(?:@[a-zA-Z0-9-.]+\/)?(?<organization>[a-zA-Z0-9-]+)\.(?<name>[a-zA-Z0-9-]+)/;
|
|
358
|
+
function nt(e) {
|
|
359
|
+
let t = e.match(tt);
|
|
337
360
|
if (!t) throw Error(`Malformed package name (${e}), can't infer organization and block pack name.`);
|
|
338
361
|
let { name: n, organization: r } = t.groups;
|
|
339
362
|
return {
|
|
@@ -341,17 +364,17 @@ function Ze(e) {
|
|
|
341
364
|
organization: r
|
|
342
365
|
};
|
|
343
366
|
}
|
|
344
|
-
async function
|
|
367
|
+
async function rt(t, n) {
|
|
345
368
|
let r = e.resolve(t, "package.json");
|
|
346
369
|
try {
|
|
347
|
-
let e = await
|
|
370
|
+
let e = await Qe(r, (e) => JSON.parse(e.toString("utf-8")));
|
|
348
371
|
if (e === void 0) return;
|
|
349
|
-
let n = e[
|
|
350
|
-
return n === void 0 ? void 0 : await
|
|
351
|
-
...
|
|
372
|
+
let n = e[k];
|
|
373
|
+
return n === void 0 ? void 0 : await Ye({
|
|
374
|
+
...c.parse(n),
|
|
352
375
|
id: {
|
|
353
|
-
...
|
|
354
|
-
version:
|
|
376
|
+
...nt(se(e.name, `"name" not found in ${r}`)),
|
|
377
|
+
version: p.parse(e.version)
|
|
355
378
|
}
|
|
356
379
|
}, t);
|
|
357
380
|
} catch (e) {
|
|
@@ -359,24 +382,56 @@ async function Qe(t, n) {
|
|
|
359
382
|
return;
|
|
360
383
|
}
|
|
361
384
|
}
|
|
362
|
-
async function
|
|
363
|
-
let
|
|
364
|
-
if (a === void 0) throw Error(`Block description (field ${
|
|
385
|
+
async function it(t) {
|
|
386
|
+
let n = e.resolve(t, "package.json"), i = JSON.parse(await r.readFile(n, { encoding: "utf-8" })), a = i[k];
|
|
387
|
+
if (a === void 0) throw Error(`Block description (field ${k}) not found in ${n}.`);
|
|
365
388
|
return {
|
|
366
|
-
...
|
|
389
|
+
...c.parse(a),
|
|
367
390
|
id: {
|
|
368
|
-
...
|
|
369
|
-
version:
|
|
391
|
+
...nt(se(i.name, `"name" not found in ${n}`)),
|
|
392
|
+
version: p.parse(i.version)
|
|
370
393
|
},
|
|
371
394
|
featureFlags: {}
|
|
372
395
|
};
|
|
373
396
|
}
|
|
374
|
-
async function
|
|
375
|
-
return await
|
|
397
|
+
async function at(e) {
|
|
398
|
+
return await Ye(await it(e), e);
|
|
399
|
+
}
|
|
400
|
+
var ot = "block-pack";
|
|
401
|
+
async function st(t) {
|
|
402
|
+
let n = e.resolve(t, f), i = JSON.parse(await r.readFile(n, { encoding: "utf-8" })), a = d.parse(i), o = Ke(a.description.components, t), s = await Be(a.description.meta, t);
|
|
403
|
+
return {
|
|
404
|
+
...a.description,
|
|
405
|
+
components: o,
|
|
406
|
+
meta: s
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region src/v2/resolve_to_registry.ts
|
|
411
|
+
var A = "published.json";
|
|
412
|
+
function ct(e) {
|
|
413
|
+
return {
|
|
414
|
+
registryUrl: e.registryUrl,
|
|
415
|
+
id: e.id
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
async function lt(t, n) {
|
|
419
|
+
let i = e.resolve(t, A);
|
|
420
|
+
await r.writeFile(i, JSON.stringify(n, null, 2), { encoding: "utf-8" });
|
|
421
|
+
}
|
|
422
|
+
async function ut(t) {
|
|
423
|
+
let i = t.type === "from-pack-v2" ? e.resolve(ce(t.packUrl), A) : e.resolve(t.folder, "block-pack", A);
|
|
424
|
+
if (!n.existsSync(i)) throw Error(`Block has no ${A} at ${i} — was the block published? Run block-tools publish before consuming via registry.`);
|
|
425
|
+
let a = JSON.parse(await r.readFile(i, { encoding: "utf-8" }));
|
|
426
|
+
return {
|
|
427
|
+
type: "from-registry-v2",
|
|
428
|
+
registryUrl: a.registryUrl,
|
|
429
|
+
id: a.id
|
|
430
|
+
};
|
|
376
431
|
}
|
|
377
432
|
//#endregion
|
|
378
433
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
379
|
-
var j = /* @__PURE__ */
|
|
434
|
+
var j = /* @__PURE__ */ T(((e, t) => {
|
|
380
435
|
var n = "2.0.0", r = 256;
|
|
381
436
|
t.exports = {
|
|
382
437
|
MAX_LENGTH: r,
|
|
@@ -396,9 +451,9 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
396
451
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
397
452
|
FLAG_LOOSE: 2
|
|
398
453
|
};
|
|
399
|
-
})), M = /* @__PURE__ */
|
|
454
|
+
})), M = /* @__PURE__ */ T(((e, t) => {
|
|
400
455
|
t.exports = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {};
|
|
401
|
-
})), N = /* @__PURE__ */
|
|
456
|
+
})), N = /* @__PURE__ */ T(((e, t) => {
|
|
402
457
|
var { MAX_SAFE_COMPONENT_LENGTH: n, MAX_SAFE_BUILD_LENGTH: r, MAX_LENGTH: i } = j(), a = M();
|
|
403
458
|
e = t.exports = {};
|
|
404
459
|
var o = e.re = [], s = e.safeRe = [], c = e.src = [], l = e.safeSrc = [], u = e.t = {}, d = 0, f = "[a-zA-Z0-9-]", p = [
|
|
@@ -413,10 +468,10 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
413
468
|
a(e, i, t), u[e] = i, c[i] = t, l[i] = r, o[i] = new RegExp(t, n ? "g" : void 0), s[i] = new RegExp(r, n ? "g" : void 0);
|
|
414
469
|
};
|
|
415
470
|
h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${f}*`), h("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${f}+`), h("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h("FULL", `^${c[u.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h("LOOSE", `^${c[u.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`), h("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[u.COERCE], !0), h("COERCERTLFULL", c[u.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
416
|
-
})),
|
|
471
|
+
})), dt = /* @__PURE__ */ T(((e, t) => {
|
|
417
472
|
var n = Object.freeze({ loose: !0 }), r = Object.freeze({});
|
|
418
473
|
t.exports = (e) => e ? typeof e == "object" ? e : n : r;
|
|
419
|
-
})),
|
|
474
|
+
})), ft = /* @__PURE__ */ T(((e, t) => {
|
|
420
475
|
var n = /^[0-9]+$/, r = (e, t) => {
|
|
421
476
|
let r = n.test(e), i = n.test(t);
|
|
422
477
|
return r && i && (e = +e, t = +t), e === t ? 0 : r && !i ? -1 : i && !r ? 1 : e < t ? -1 : 1;
|
|
@@ -425,8 +480,8 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
425
480
|
compareIdentifiers: r,
|
|
426
481
|
rcompareIdentifiers: (e, t) => r(t, e)
|
|
427
482
|
};
|
|
428
|
-
})), P = /* @__PURE__ */
|
|
429
|
-
var n = M(), { MAX_LENGTH: r, MAX_SAFE_INTEGER: i } = j(), { safeRe: a, t: o } = N(), s =
|
|
483
|
+
})), P = /* @__PURE__ */ T(((e, t) => {
|
|
484
|
+
var n = M(), { MAX_LENGTH: r, MAX_SAFE_INTEGER: i } = j(), { safeRe: a, t: o } = N(), s = dt(), { compareIdentifiers: c } = ft();
|
|
430
485
|
t.exports = class e {
|
|
431
486
|
constructor(t, c) {
|
|
432
487
|
if (c = s(c), t instanceof e) {
|
|
@@ -546,7 +601,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
546
601
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
547
602
|
}
|
|
548
603
|
};
|
|
549
|
-
})), F = /* @__PURE__ */
|
|
604
|
+
})), F = /* @__PURE__ */ T(((e, t) => {
|
|
550
605
|
var n = P();
|
|
551
606
|
t.exports = (e, t, r = !1) => {
|
|
552
607
|
if (e instanceof n) return e;
|
|
@@ -557,19 +612,19 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
557
612
|
throw e;
|
|
558
613
|
}
|
|
559
614
|
};
|
|
560
|
-
})),
|
|
615
|
+
})), pt = /* @__PURE__ */ T(((e, t) => {
|
|
561
616
|
var n = F();
|
|
562
617
|
t.exports = (e, t) => {
|
|
563
618
|
let r = n(e, t);
|
|
564
619
|
return r ? r.version : null;
|
|
565
620
|
};
|
|
566
|
-
})),
|
|
621
|
+
})), mt = /* @__PURE__ */ T(((e, t) => {
|
|
567
622
|
var n = F();
|
|
568
623
|
t.exports = (e, t) => {
|
|
569
624
|
let r = n(e.trim().replace(/^[=v]+/, ""), t);
|
|
570
625
|
return r ? r.version : null;
|
|
571
626
|
};
|
|
572
|
-
})),
|
|
627
|
+
})), ht = /* @__PURE__ */ T(((e, t) => {
|
|
573
628
|
var n = P();
|
|
574
629
|
t.exports = (e, t, r, i, a) => {
|
|
575
630
|
typeof r == "string" && (a = i, i = r, r = void 0);
|
|
@@ -579,7 +634,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
579
634
|
return null;
|
|
580
635
|
}
|
|
581
636
|
};
|
|
582
|
-
})),
|
|
637
|
+
})), gt = /* @__PURE__ */ T(((e, t) => {
|
|
583
638
|
var n = F();
|
|
584
639
|
t.exports = (e, t) => {
|
|
585
640
|
let r = n(e, null, !0), i = n(t, null, !0), a = r.compare(i);
|
|
@@ -592,62 +647,62 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
592
647
|
let u = l ? "pre" : "";
|
|
593
648
|
return r.major === i.major ? r.minor === i.minor ? r.patch === i.patch ? "prerelease" : u + "patch" : u + "minor" : u + "major";
|
|
594
649
|
};
|
|
595
|
-
})),
|
|
650
|
+
})), _t = /* @__PURE__ */ T(((e, t) => {
|
|
596
651
|
var n = P();
|
|
597
652
|
t.exports = (e, t) => new n(e, t).major;
|
|
598
|
-
})),
|
|
653
|
+
})), vt = /* @__PURE__ */ T(((e, t) => {
|
|
599
654
|
var n = P();
|
|
600
655
|
t.exports = (e, t) => new n(e, t).minor;
|
|
601
|
-
})),
|
|
656
|
+
})), yt = /* @__PURE__ */ T(((e, t) => {
|
|
602
657
|
var n = P();
|
|
603
658
|
t.exports = (e, t) => new n(e, t).patch;
|
|
604
|
-
})),
|
|
659
|
+
})), bt = /* @__PURE__ */ T(((e, t) => {
|
|
605
660
|
var n = F();
|
|
606
661
|
t.exports = (e, t) => {
|
|
607
662
|
let r = n(e, t);
|
|
608
663
|
return r && r.prerelease.length ? r.prerelease : null;
|
|
609
664
|
};
|
|
610
|
-
})), I = /* @__PURE__ */
|
|
665
|
+
})), I = /* @__PURE__ */ T(((e, t) => {
|
|
611
666
|
var n = P();
|
|
612
667
|
t.exports = (e, t, r) => new n(e, r).compare(new n(t, r));
|
|
613
|
-
})),
|
|
668
|
+
})), xt = /* @__PURE__ */ T(((e, t) => {
|
|
614
669
|
var n = I();
|
|
615
670
|
t.exports = (e, t, r) => n(t, e, r);
|
|
616
|
-
})),
|
|
671
|
+
})), St = /* @__PURE__ */ T(((e, t) => {
|
|
617
672
|
var n = I();
|
|
618
673
|
t.exports = (e, t) => n(e, t, !0);
|
|
619
|
-
})),
|
|
674
|
+
})), Ct = /* @__PURE__ */ T(((e, t) => {
|
|
620
675
|
var n = P();
|
|
621
676
|
t.exports = (e, t, r) => {
|
|
622
677
|
let i = new n(e, r), a = new n(t, r);
|
|
623
678
|
return i.compare(a) || i.compareBuild(a);
|
|
624
679
|
};
|
|
625
|
-
})),
|
|
626
|
-
var n =
|
|
680
|
+
})), wt = /* @__PURE__ */ T(((e, t) => {
|
|
681
|
+
var n = Ct();
|
|
627
682
|
t.exports = (e, t) => e.sort((e, r) => n(e, r, t));
|
|
628
|
-
})),
|
|
629
|
-
var n =
|
|
683
|
+
})), Tt = /* @__PURE__ */ T(((e, t) => {
|
|
684
|
+
var n = Ct();
|
|
630
685
|
t.exports = (e, t) => e.sort((e, r) => n(r, e, t));
|
|
631
|
-
})), L = /* @__PURE__ */
|
|
686
|
+
})), L = /* @__PURE__ */ T(((e, t) => {
|
|
632
687
|
var n = I();
|
|
633
688
|
t.exports = (e, t, r) => n(e, t, r) > 0;
|
|
634
|
-
})),
|
|
689
|
+
})), Et = /* @__PURE__ */ T(((e, t) => {
|
|
635
690
|
var n = I();
|
|
636
691
|
t.exports = (e, t, r) => n(e, t, r) < 0;
|
|
637
|
-
})),
|
|
692
|
+
})), Dt = /* @__PURE__ */ T(((e, t) => {
|
|
638
693
|
var n = I();
|
|
639
694
|
t.exports = (e, t, r) => n(e, t, r) === 0;
|
|
640
|
-
})),
|
|
695
|
+
})), Ot = /* @__PURE__ */ T(((e, t) => {
|
|
641
696
|
var n = I();
|
|
642
697
|
t.exports = (e, t, r) => n(e, t, r) !== 0;
|
|
643
|
-
})),
|
|
698
|
+
})), kt = /* @__PURE__ */ T(((e, t) => {
|
|
644
699
|
var n = I();
|
|
645
700
|
t.exports = (e, t, r) => n(e, t, r) >= 0;
|
|
646
|
-
})),
|
|
701
|
+
})), At = /* @__PURE__ */ T(((e, t) => {
|
|
647
702
|
var n = I();
|
|
648
703
|
t.exports = (e, t, r) => n(e, t, r) <= 0;
|
|
649
|
-
})),
|
|
650
|
-
var n =
|
|
704
|
+
})), jt = /* @__PURE__ */ T(((e, t) => {
|
|
705
|
+
var n = Dt(), r = Ot(), i = L(), a = kt(), o = Et(), s = At();
|
|
651
706
|
t.exports = (e, t, c, l) => {
|
|
652
707
|
switch (t) {
|
|
653
708
|
case "===": return typeof e == "object" && (e = e.version), typeof c == "object" && (c = c.version), e === c;
|
|
@@ -663,7 +718,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
663
718
|
default: throw TypeError(`Invalid operator: ${t}`);
|
|
664
719
|
}
|
|
665
720
|
};
|
|
666
|
-
})),
|
|
721
|
+
})), Mt = /* @__PURE__ */ T(((e, t) => {
|
|
667
722
|
var n = P(), r = F(), { safeRe: i, t: a } = N();
|
|
668
723
|
t.exports = (e, t) => {
|
|
669
724
|
if (e instanceof n) return e;
|
|
@@ -680,7 +735,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
680
735
|
let s = o[2];
|
|
681
736
|
return r(`${s}.${o[3] || "0"}.${o[4] || "0"}${t.includePrerelease && o[5] ? `-${o[5]}` : ""}${t.includePrerelease && o[6] ? `+${o[6]}` : ""}`, t);
|
|
682
737
|
};
|
|
683
|
-
})),
|
|
738
|
+
})), Nt = /* @__PURE__ */ T(((e, t) => {
|
|
684
739
|
t.exports = class {
|
|
685
740
|
constructor() {
|
|
686
741
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
@@ -703,7 +758,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
703
758
|
return this;
|
|
704
759
|
}
|
|
705
760
|
};
|
|
706
|
-
})), R = /* @__PURE__ */
|
|
761
|
+
})), R = /* @__PURE__ */ T(((e, t) => {
|
|
707
762
|
var n = /\s+/g;
|
|
708
763
|
t.exports = class e {
|
|
709
764
|
constructor(t, r) {
|
|
@@ -743,8 +798,8 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
743
798
|
let t = ((this.options.includePrerelease && p) | (this.options.loose && m)) + ":" + e, n = r.get(t);
|
|
744
799
|
if (n) return n;
|
|
745
800
|
let i = this.options.loose, s = i ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE];
|
|
746
|
-
e = e.replace(s,
|
|
747
|
-
let g = e.split(" ").map((e) => v(e, this.options)).join(" ").split(/\s+/).map((e) =>
|
|
801
|
+
e = e.replace(s, se(this.options.includePrerelease)), o("hyphen replace", e), e = e.replace(c[l.COMPARATORTRIM], u), o("comparator trim", e), e = e.replace(c[l.TILDETRIM], d), o("tilde trim", e), e = e.replace(c[l.CARETTRIM], f), o("caret trim", e);
|
|
802
|
+
let g = e.split(" ").map((e) => v(e, this.options)).join(" ").split(/\s+/).map((e) => b(e, this.options));
|
|
748
803
|
i && (g = g.filter((e) => (o("loose invalid filter", e, this.options), !!e.match(c[l.COMPARATORLOOSE])))), o("range list", g);
|
|
749
804
|
let _ = /* @__PURE__ */ new Map(), y = g.map((e) => new a(e, this.options));
|
|
750
805
|
for (let e of y) {
|
|
@@ -752,8 +807,8 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
752
807
|
_.set(e.value, e);
|
|
753
808
|
}
|
|
754
809
|
_.size > 1 && _.has("") && _.delete("");
|
|
755
|
-
let
|
|
756
|
-
return r.set(t,
|
|
810
|
+
let ee = [..._.values()];
|
|
811
|
+
return r.set(t, ee), ee;
|
|
757
812
|
}
|
|
758
813
|
intersects(t, n) {
|
|
759
814
|
if (!(t instanceof e)) throw TypeError("a Range is required");
|
|
@@ -766,22 +821,22 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
766
821
|
} catch {
|
|
767
822
|
return !1;
|
|
768
823
|
}
|
|
769
|
-
for (let t = 0; t < this.set.length; t++) if (
|
|
824
|
+
for (let t = 0; t < this.set.length; t++) if (x(this.set[t], e, this.options)) return !0;
|
|
770
825
|
return !1;
|
|
771
826
|
}
|
|
772
827
|
};
|
|
773
|
-
var r = new (
|
|
828
|
+
var r = new (Nt())(), i = dt(), a = z(), o = M(), s = P(), { safeRe: c, t: l, comparatorTrimReplace: u, tildeTrimReplace: d, caretTrimReplace: f } = N(), { FLAG_INCLUDE_PRERELEASE: p, FLAG_LOOSE: m } = j(), h = (e) => e.value === "<0.0.0-0", g = (e) => e.value === "", _ = (e, t) => {
|
|
774
829
|
let n = !0, r = e.slice(), i = r.pop();
|
|
775
830
|
for (; n && r.length;) n = r.every((e) => i.intersects(e, t)), i = r.pop();
|
|
776
831
|
return n;
|
|
777
|
-
}, v = (e, t) => (o("comp", e, t), e =
|
|
832
|
+
}, v = (e, t) => (o("comp", e, t), e = ne(e, t), o("caret", e), e = ee(e, t), o("tildes", e), e = ie(e, t), o("xrange", e), e = oe(e, t), o("stars", e), e), y = (e) => !e || e.toLowerCase() === "x" || e === "*", ee = (e, t) => e.trim().split(/\s+/).map((e) => te(e, t)).join(" "), te = (e, t) => {
|
|
778
833
|
let n = t.loose ? c[l.TILDELOOSE] : c[l.TILDE];
|
|
779
834
|
return e.replace(n, (t, n, r, i, a) => {
|
|
780
835
|
o("tilde", e, t, n, r, i, a);
|
|
781
836
|
let s;
|
|
782
837
|
return y(n) ? s = "" : y(r) ? s = `>=${n}.0.0 <${+n + 1}.0.0-0` : y(i) ? s = `>=${n}.${r}.0 <${n}.${+r + 1}.0-0` : a ? (o("replaceTilde pr", a), s = `>=${n}.${r}.${i}-${a} <${n}.${+r + 1}.0-0`) : s = `>=${n}.${r}.${i} <${n}.${+r + 1}.0-0`, o("tilde return", s), s;
|
|
783
838
|
});
|
|
784
|
-
},
|
|
839
|
+
}, ne = (e, t) => e.trim().split(/\s+/).map((e) => re(e, t)).join(" "), re = (e, t) => {
|
|
785
840
|
o("caret", e, t);
|
|
786
841
|
let n = t.loose ? c[l.CARETLOOSE] : c[l.CARET], r = t.includePrerelease ? "-0" : "";
|
|
787
842
|
return e.replace(n, (t, n, i, a, s) => {
|
|
@@ -789,7 +844,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
789
844
|
let c;
|
|
790
845
|
return y(n) ? c = "" : y(i) ? c = `>=${n}.0.0${r} <${+n + 1}.0.0-0` : y(a) ? c = n === "0" ? `>=${n}.${i}.0${r} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.0${r} <${+n + 1}.0.0-0` : s ? (o("replaceCaret pr", s), c = n === "0" ? i === "0" ? `>=${n}.${i}.${a}-${s} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a}-${s} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a}-${s} <${+n + 1}.0.0-0`) : (o("no pr"), c = n === "0" ? i === "0" ? `>=${n}.${i}.${a}${r} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a}${r} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a} <${+n + 1}.0.0-0`), o("caret return", c), c;
|
|
791
846
|
});
|
|
792
|
-
},
|
|
847
|
+
}, ie = (e, t) => (o("replaceXRanges", e, t), e.split(/\s+/).map((e) => ae(e, t)).join(" ")), ae = (e, t) => {
|
|
793
848
|
e = e.trim();
|
|
794
849
|
let n = t.loose ? c[l.XRANGELOOSE] : c[l.XRANGE];
|
|
795
850
|
return e.replace(n, (n, r, i, a, s, c) => {
|
|
@@ -797,7 +852,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
797
852
|
let l = y(i), u = l || y(a), d = u || y(s), f = d;
|
|
798
853
|
return r === "=" && f && (r = ""), c = t.includePrerelease ? "-0" : "", l ? n = r === ">" || r === "<" ? "<0.0.0-0" : "*" : r && f ? (u && (a = 0), s = 0, r === ">" ? (r = ">=", u ? (i = +i + 1, a = 0, s = 0) : (a = +a + 1, s = 0)) : r === "<=" && (r = "<", u ? i = +i + 1 : a = +a + 1), r === "<" && (c = "-0"), n = `${r + i}.${a}.${s}${c}`) : u ? n = `>=${i}.0.0${c} <${+i + 1}.0.0-0` : d && (n = `>=${i}.${a}.0${c} <${i}.${+a + 1}.0-0`), o("xRange return", n), n;
|
|
799
854
|
});
|
|
800
|
-
},
|
|
855
|
+
}, oe = (e, t) => (o("replaceStars", e, t), e.trim().replace(c[l.STAR], "")), b = (e, t) => (o("replaceGTE0", e, t), e.trim().replace(c[t.includePrerelease ? l.GTE0PRE : l.GTE0], "")), se = (e) => (t, n, r, i, a, o, s, c, l, u, d, f) => (n = y(r) ? "" : y(i) ? `>=${r}.0.0${e ? "-0" : ""}` : y(a) ? `>=${r}.${i}.0${e ? "-0" : ""}` : o ? `>=${n}` : `>=${n}${e ? "-0" : ""}`, c = y(l) ? "" : y(u) ? `<${+l + 1}.0.0-0` : y(d) ? `<${l}.${+u + 1}.0-0` : f ? `<=${l}.${u}.${d}-${f}` : e ? `<${l}.${u}.${+d + 1}-0` : `<=${c}`, `${n} ${c}`.trim()), x = (e, t, n) => {
|
|
801
856
|
for (let n = 0; n < e.length; n++) if (!e[n].test(t)) return !1;
|
|
802
857
|
if (t.prerelease.length && !n.includePrerelease) {
|
|
803
858
|
for (let n = 0; n < e.length; n++) if (o(e[n].semver), e[n].semver !== a.ANY && e[n].semver.prerelease.length > 0) {
|
|
@@ -808,7 +863,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
808
863
|
}
|
|
809
864
|
return !0;
|
|
810
865
|
};
|
|
811
|
-
})), z = /* @__PURE__ */
|
|
866
|
+
})), z = /* @__PURE__ */ T(((e, t) => {
|
|
812
867
|
var n = Symbol("SemVer ANY");
|
|
813
868
|
t.exports = class e {
|
|
814
869
|
static get ANY() {
|
|
@@ -843,8 +898,8 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
843
898
|
return this.operator === "" ? this.value === "" ? !0 : new l(t.value, n).test(this.value) : t.operator === "" ? t.value === "" ? !0 : new l(this.value, n).test(t.semver) : (n = r(n), n.includePrerelease && (this.value === "<0.0.0-0" || t.value === "<0.0.0-0") || !n.includePrerelease && (this.value.startsWith("<0.0.0") || t.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && t.operator.startsWith(">") || this.operator.startsWith("<") && t.operator.startsWith("<") || this.semver.version === t.semver.version && this.operator.includes("=") && t.operator.includes("=") || o(this.semver, "<", t.semver, n) && this.operator.startsWith(">") && t.operator.startsWith("<") || o(this.semver, ">", t.semver, n) && this.operator.startsWith("<") && t.operator.startsWith(">")));
|
|
844
899
|
}
|
|
845
900
|
};
|
|
846
|
-
var r =
|
|
847
|
-
})), B = /* @__PURE__ */
|
|
901
|
+
var r = dt(), { safeRe: i, t: a } = N(), o = jt(), s = M(), c = P(), l = R();
|
|
902
|
+
})), B = /* @__PURE__ */ T(((e, t) => {
|
|
848
903
|
var n = R();
|
|
849
904
|
t.exports = (e, t, r) => {
|
|
850
905
|
try {
|
|
@@ -854,10 +909,10 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
854
909
|
}
|
|
855
910
|
return t.test(e);
|
|
856
911
|
};
|
|
857
|
-
})),
|
|
912
|
+
})), Pt = /* @__PURE__ */ T(((e, t) => {
|
|
858
913
|
var n = R();
|
|
859
914
|
t.exports = (e, t) => new n(e, t).set.map((e) => e.map((e) => e.value).join(" ").trim().split(" "));
|
|
860
|
-
})),
|
|
915
|
+
})), Ft = /* @__PURE__ */ T(((e, t) => {
|
|
861
916
|
var n = P(), r = R();
|
|
862
917
|
t.exports = (e, t, i) => {
|
|
863
918
|
let a = null, o = null, s = null;
|
|
@@ -870,7 +925,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
870
925
|
s.test(e) && (!a || o.compare(e) === -1) && (a = e, o = new n(a, i));
|
|
871
926
|
}), a;
|
|
872
927
|
};
|
|
873
|
-
})),
|
|
928
|
+
})), It = /* @__PURE__ */ T(((e, t) => {
|
|
874
929
|
var n = P(), r = R();
|
|
875
930
|
t.exports = (e, t, i) => {
|
|
876
931
|
let a = null, o = null, s = null;
|
|
@@ -883,7 +938,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
883
938
|
s.test(e) && (!a || o.compare(e) === 1) && (a = e, o = new n(a, i));
|
|
884
939
|
}), a;
|
|
885
940
|
};
|
|
886
|
-
})),
|
|
941
|
+
})), Lt = /* @__PURE__ */ T(((e, t) => {
|
|
887
942
|
var n = P(), r = R(), i = L();
|
|
888
943
|
t.exports = (e, t) => {
|
|
889
944
|
e = new r(e, t);
|
|
@@ -909,7 +964,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
909
964
|
}
|
|
910
965
|
return a && e.test(a) ? a : null;
|
|
911
966
|
};
|
|
912
|
-
})),
|
|
967
|
+
})), Rt = /* @__PURE__ */ T(((e, t) => {
|
|
913
968
|
var n = R();
|
|
914
969
|
t.exports = (e, t) => {
|
|
915
970
|
try {
|
|
@@ -918,8 +973,8 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
918
973
|
return null;
|
|
919
974
|
}
|
|
920
975
|
};
|
|
921
|
-
})),
|
|
922
|
-
var n = P(), r = z(), { ANY: i } = r, a = R(), o = B(), s = L(), c =
|
|
976
|
+
})), zt = /* @__PURE__ */ T(((e, t) => {
|
|
977
|
+
var n = P(), r = z(), { ANY: i } = r, a = R(), o = B(), s = L(), c = Et(), l = At(), u = kt();
|
|
923
978
|
t.exports = (e, t, d, f) => {
|
|
924
979
|
e = new n(e, f), t = new a(t, f);
|
|
925
980
|
let p, m, h, g, _;
|
|
@@ -941,16 +996,16 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
941
996
|
}
|
|
942
997
|
return !0;
|
|
943
998
|
};
|
|
944
|
-
})),
|
|
945
|
-
var n =
|
|
999
|
+
})), Bt = /* @__PURE__ */ T(((e, t) => {
|
|
1000
|
+
var n = zt();
|
|
946
1001
|
t.exports = (e, t, r) => n(e, t, ">", r);
|
|
947
|
-
})),
|
|
948
|
-
var n =
|
|
1002
|
+
})), Vt = /* @__PURE__ */ T(((e, t) => {
|
|
1003
|
+
var n = zt();
|
|
949
1004
|
t.exports = (e, t, r) => n(e, t, "<", r);
|
|
950
|
-
})),
|
|
1005
|
+
})), Ht = /* @__PURE__ */ T(((e, t) => {
|
|
951
1006
|
var n = R();
|
|
952
1007
|
t.exports = (e, t, r) => (e = new n(e, r), t = new n(t, r), e.intersects(t, r));
|
|
953
|
-
})),
|
|
1008
|
+
})), Ut = /* @__PURE__ */ T(((e, t) => {
|
|
954
1009
|
var n = B(), r = I();
|
|
955
1010
|
t.exports = (e, t, i) => {
|
|
956
1011
|
let a = [], o = null, s = null, c = e.sort((e, t) => r(e, t, i));
|
|
@@ -961,7 +1016,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
961
1016
|
let u = l.join(" || "), d = typeof t.raw == "string" ? t.raw : String(t);
|
|
962
1017
|
return u.length < d.length ? u : t;
|
|
963
1018
|
};
|
|
964
|
-
})),
|
|
1019
|
+
})), Wt = /* @__PURE__ */ T(((e, t) => {
|
|
965
1020
|
var n = R(), r = z(), { ANY: i } = r, a = B(), o = I(), s = (e, t, r = {}) => {
|
|
966
1021
|
if (e === t) return !0;
|
|
967
1022
|
e = new n(e, r), t = new n(t, r);
|
|
@@ -1020,46 +1075,46 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
1020
1075
|
return r < 0 ? e : r > 0 || t.operator === "<" && e.operator === "<=" ? t : e;
|
|
1021
1076
|
};
|
|
1022
1077
|
t.exports = s;
|
|
1023
|
-
})), V = /* @__PURE__ */
|
|
1024
|
-
var n = N(), r = j(), i = P(), a =
|
|
1078
|
+
})), V = /* @__PURE__ */ Te((/* @__PURE__ */ T(((e, t) => {
|
|
1079
|
+
var n = N(), r = j(), i = P(), a = ft();
|
|
1025
1080
|
t.exports = {
|
|
1026
1081
|
parse: F(),
|
|
1027
|
-
valid:
|
|
1028
|
-
clean:
|
|
1029
|
-
inc:
|
|
1030
|
-
diff:
|
|
1031
|
-
major:
|
|
1032
|
-
minor:
|
|
1033
|
-
patch:
|
|
1034
|
-
prerelease:
|
|
1082
|
+
valid: pt(),
|
|
1083
|
+
clean: mt(),
|
|
1084
|
+
inc: ht(),
|
|
1085
|
+
diff: gt(),
|
|
1086
|
+
major: _t(),
|
|
1087
|
+
minor: vt(),
|
|
1088
|
+
patch: yt(),
|
|
1089
|
+
prerelease: bt(),
|
|
1035
1090
|
compare: I(),
|
|
1036
|
-
rcompare:
|
|
1037
|
-
compareLoose:
|
|
1038
|
-
compareBuild:
|
|
1039
|
-
sort:
|
|
1040
|
-
rsort:
|
|
1091
|
+
rcompare: xt(),
|
|
1092
|
+
compareLoose: St(),
|
|
1093
|
+
compareBuild: Ct(),
|
|
1094
|
+
sort: wt(),
|
|
1095
|
+
rsort: Tt(),
|
|
1041
1096
|
gt: L(),
|
|
1042
|
-
lt:
|
|
1043
|
-
eq:
|
|
1044
|
-
neq:
|
|
1045
|
-
gte:
|
|
1046
|
-
lte:
|
|
1047
|
-
cmp:
|
|
1048
|
-
coerce:
|
|
1097
|
+
lt: Et(),
|
|
1098
|
+
eq: Dt(),
|
|
1099
|
+
neq: Ot(),
|
|
1100
|
+
gte: kt(),
|
|
1101
|
+
lte: At(),
|
|
1102
|
+
cmp: jt(),
|
|
1103
|
+
coerce: Mt(),
|
|
1049
1104
|
Comparator: z(),
|
|
1050
1105
|
Range: R(),
|
|
1051
1106
|
satisfies: B(),
|
|
1052
|
-
toComparators:
|
|
1053
|
-
maxSatisfying:
|
|
1054
|
-
minSatisfying:
|
|
1055
|
-
minVersion:
|
|
1056
|
-
validRange:
|
|
1057
|
-
outside:
|
|
1058
|
-
gtr:
|
|
1059
|
-
ltr:
|
|
1060
|
-
intersects:
|
|
1061
|
-
simplifyRange:
|
|
1062
|
-
subset:
|
|
1107
|
+
toComparators: Pt(),
|
|
1108
|
+
maxSatisfying: Ft(),
|
|
1109
|
+
minSatisfying: It(),
|
|
1110
|
+
minVersion: Lt(),
|
|
1111
|
+
validRange: Rt(),
|
|
1112
|
+
outside: zt(),
|
|
1113
|
+
gtr: Bt(),
|
|
1114
|
+
ltr: Vt(),
|
|
1115
|
+
intersects: Ht(),
|
|
1116
|
+
simplifyRange: Ut(),
|
|
1117
|
+
subset: Wt(),
|
|
1063
1118
|
SemVer: i,
|
|
1064
1119
|
re: n.re,
|
|
1065
1120
|
src: n.src,
|
|
@@ -1069,58 +1124,58 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
1069
1124
|
compareIdentifiers: a.compareIdentifiers,
|
|
1070
1125
|
rcompareIdentifiers: a.rcompareIdentifiers
|
|
1071
1126
|
};
|
|
1072
|
-
})))()),
|
|
1073
|
-
function
|
|
1074
|
-
return `${
|
|
1127
|
+
})))()), Gt = "_updates_v2/per_package_version/";
|
|
1128
|
+
function Kt(e, t) {
|
|
1129
|
+
return `${Gt}${e.organization}/${e.name}/${e.version}/${t}`;
|
|
1075
1130
|
}
|
|
1076
|
-
var
|
|
1077
|
-
function
|
|
1078
|
-
return `${
|
|
1131
|
+
var qt = /(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<name>[^/]+))\/(?<version>[^/]+)\/(?<seed>[^/]+)$/, Jt = "_updates_v2/_global_update_in", Yt = "_updates_v2/_global_update_out", Xt = "_overview_snapshots_v2/global/", Zt = "_overview_snapshots_v2/per_package/", Qt = /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z-[a-z0-9]+)\.json\.gz$/;
|
|
1132
|
+
function $t(e) {
|
|
1133
|
+
return `${Xt}${e}.json.gz`;
|
|
1079
1134
|
}
|
|
1080
|
-
function
|
|
1081
|
-
return `${
|
|
1135
|
+
function en(e, t) {
|
|
1136
|
+
return `${Zt}${e.organization}/${e.name}/${t}.json.gz`;
|
|
1082
1137
|
}
|
|
1083
1138
|
//#endregion
|
|
1084
1139
|
//#region src/v2/registry/schema_public.ts
|
|
1085
|
-
var
|
|
1140
|
+
var tn = "v2/", nn = "overview.json", rn = "overview.json.gz", an = "overview.json", H = "manifest.json", U = "channels", W = /^[-a-z0-9]+$/;
|
|
1086
1141
|
function G(e) {
|
|
1087
1142
|
return `${e.organization}/${e.name}/${e.version}`;
|
|
1088
1143
|
}
|
|
1089
1144
|
function K(e) {
|
|
1090
1145
|
return `v2/${G(e)}`;
|
|
1091
1146
|
}
|
|
1092
|
-
var
|
|
1093
|
-
description:
|
|
1094
|
-
channels:
|
|
1095
|
-
manifestSha256:
|
|
1096
|
-
}).passthrough(), q =
|
|
1097
|
-
schema:
|
|
1098
|
-
versions:
|
|
1147
|
+
var on = "/" + H, sn = S.object({
|
|
1148
|
+
description: l,
|
|
1149
|
+
channels: S.array(S.string()).default(() => []),
|
|
1150
|
+
manifestSha256: m
|
|
1151
|
+
}).passthrough(), q = S.object({
|
|
1152
|
+
schema: S.literal("v2"),
|
|
1153
|
+
versions: S.array(sn)
|
|
1099
1154
|
}).passthrough();
|
|
1100
|
-
function
|
|
1101
|
-
return `${e.organization}/${e.name}/${
|
|
1155
|
+
function cn(e) {
|
|
1156
|
+
return `${e.organization}/${e.name}/${an}`;
|
|
1102
1157
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return `v2/${
|
|
1158
|
+
function ln(e) {
|
|
1159
|
+
return `v2/${cn(e)}`;
|
|
1105
1160
|
}
|
|
1106
|
-
function
|
|
1161
|
+
function un(e) {
|
|
1107
1162
|
return `${G(e)}/${U}/`;
|
|
1108
1163
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return `v2/${
|
|
1111
|
-
}
|
|
1112
|
-
var
|
|
1113
|
-
id:
|
|
1114
|
-
allVersions:
|
|
1115
|
-
allVersionsWithChannels:
|
|
1116
|
-
latest:
|
|
1117
|
-
latestManifestSha256:
|
|
1118
|
-
latestByChannel:
|
|
1119
|
-
description:
|
|
1120
|
-
manifestSha256:
|
|
1164
|
+
function dn(e) {
|
|
1165
|
+
return `v2/${un(e)}`;
|
|
1166
|
+
}
|
|
1167
|
+
var fn = /(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<name>[^/]+))\/(?<version>[^/]+)\/manifest\.json$/, J = `v2/${nn}`, pn = `v2/${rn}`, mn = S.object({
|
|
1168
|
+
id: u,
|
|
1169
|
+
allVersions: S.array(S.string()).optional(),
|
|
1170
|
+
allVersionsWithChannels: S.array(h).optional(),
|
|
1171
|
+
latest: l.optional(),
|
|
1172
|
+
latestManifestSha256: m.optional(),
|
|
1173
|
+
latestByChannel: S.record(S.string(), S.object({
|
|
1174
|
+
description: l,
|
|
1175
|
+
manifestSha256: m
|
|
1121
1176
|
}).passthrough()).default({})
|
|
1122
1177
|
}).passthrough();
|
|
1123
|
-
function
|
|
1178
|
+
function hn(e) {
|
|
1124
1179
|
let t = `${e.id.organization}/${e.id.name}`, n = e.allVersionsWithChannels;
|
|
1125
1180
|
if (n === void 0) {
|
|
1126
1181
|
if (e.allVersions === void 0) throw Error(`GlobalOverviewEntry ${t} is missing both 'allVersionsWithChannels' and the deprecated 'allVersions' fallback`);
|
|
@@ -1130,11 +1185,11 @@ function an(e) {
|
|
|
1130
1185
|
}));
|
|
1131
1186
|
}
|
|
1132
1187
|
let r = e.latestByChannel;
|
|
1133
|
-
if (!r[
|
|
1188
|
+
if (!r[s]) {
|
|
1134
1189
|
if (e.latest === void 0 || e.latestManifestSha256 === void 0) throw Error(`GlobalOverviewEntry ${t} is missing the 'latestByChannel[any]' slot and the deprecated 'latest'/'latestManifestSha256' fallback`);
|
|
1135
1190
|
r = {
|
|
1136
1191
|
...r,
|
|
1137
|
-
[
|
|
1192
|
+
[s]: {
|
|
1138
1193
|
description: e.latest,
|
|
1139
1194
|
manifestSha256: e.latestManifestSha256
|
|
1140
1195
|
}
|
|
@@ -1146,23 +1201,23 @@ function an(e) {
|
|
|
1146
1201
|
latestByChannel: r
|
|
1147
1202
|
};
|
|
1148
1203
|
}
|
|
1149
|
-
var
|
|
1150
|
-
schema:
|
|
1151
|
-
packages:
|
|
1204
|
+
var gn = S.object({
|
|
1205
|
+
schema: S.literal("v2"),
|
|
1206
|
+
packages: S.array(mn)
|
|
1152
1207
|
}).passthrough();
|
|
1153
1208
|
function Y(e) {
|
|
1154
|
-
let t =
|
|
1209
|
+
let t = gn.parse(e);
|
|
1155
1210
|
return {
|
|
1156
1211
|
...t,
|
|
1157
|
-
packages: t.packages.map(
|
|
1212
|
+
packages: t.packages.map(hn)
|
|
1158
1213
|
};
|
|
1159
1214
|
}
|
|
1160
1215
|
//#endregion
|
|
1161
1216
|
//#region src/v2/registry/registry.ts
|
|
1162
|
-
var
|
|
1163
|
-
gzipAsync =
|
|
1164
|
-
gunzipAsync =
|
|
1165
|
-
constructor(e, t = new
|
|
1217
|
+
var _n = class {
|
|
1218
|
+
gzipAsync = le(re);
|
|
1219
|
+
gunzipAsync = le(te);
|
|
1220
|
+
constructor(e, t = new oe(), n = {}) {
|
|
1166
1221
|
this.storage = e, this.logger = t, this.settings = n;
|
|
1167
1222
|
}
|
|
1168
1223
|
generateTimestamp() {
|
|
@@ -1173,7 +1228,7 @@ var sn = class {
|
|
|
1173
1228
|
}
|
|
1174
1229
|
async createGlobalOverviewSnapshot(e, t) {
|
|
1175
1230
|
if (!this.settings.skipSnapshotCreation) try {
|
|
1176
|
-
let n = await this.gzipAsync(e), r =
|
|
1231
|
+
let n = await this.gzipAsync(e), r = $t(t);
|
|
1177
1232
|
await this.storage.putFile(r, Buffer.from(n)), this.logger.info(`Global overview snapshot created at ${r}`);
|
|
1178
1233
|
} catch (e) {
|
|
1179
1234
|
this.logger.warn(`Failed to create global overview snapshot: ${String(e)}`);
|
|
@@ -1181,7 +1236,7 @@ var sn = class {
|
|
|
1181
1236
|
}
|
|
1182
1237
|
async createPackageOverviewSnapshot(e, t, n) {
|
|
1183
1238
|
if (!this.settings.skipSnapshotCreation) try {
|
|
1184
|
-
let r = JSON.stringify(t), i = await this.gzipAsync(r), a =
|
|
1239
|
+
let r = JSON.stringify(t), i = await this.gzipAsync(r), a = en(e, n);
|
|
1185
1240
|
await this.storage.putFile(a, Buffer.from(i)), this.logger.info(`Package overview snapshot created at ${a} for ${e.organization}:${e.name}`);
|
|
1186
1241
|
} catch (t) {
|
|
1187
1242
|
this.logger.warn(`Failed to create package overview snapshot for ${e.organization}:${e.name}: ${String(t)}`);
|
|
@@ -1189,7 +1244,7 @@ var sn = class {
|
|
|
1189
1244
|
}
|
|
1190
1245
|
async updateRegistry(e = "normal") {
|
|
1191
1246
|
this.logger.info("Initiating registry refresh...");
|
|
1192
|
-
let t = this.generateTimestamp(), n = /* @__PURE__ */ new Map(), r = [], i = await this.storage.listFiles(
|
|
1247
|
+
let t = this.generateTimestamp(), n = /* @__PURE__ */ new Map(), r = [], i = await this.storage.listFiles(Gt), a = ({ organization: e, name: t, version: r }) => {
|
|
1193
1248
|
let i = `${e}:${t}`, a = n.get(i);
|
|
1194
1249
|
return a ? a.versions.has(r) ? !1 : (a.versions.add(r), !0) : (n.set(i, {
|
|
1195
1250
|
package: {
|
|
@@ -1201,7 +1256,7 @@ var sn = class {
|
|
|
1201
1256
|
};
|
|
1202
1257
|
this.logger.info("Packages to be updated:");
|
|
1203
1258
|
for (let e of i) {
|
|
1204
|
-
let t = e.match(
|
|
1259
|
+
let t = e.match(qt);
|
|
1205
1260
|
if (!t) continue;
|
|
1206
1261
|
r.push(e);
|
|
1207
1262
|
let { organization: n, name: i, version: o, seed: s } = t.groups, c = a({
|
|
@@ -1214,7 +1269,7 @@ var sn = class {
|
|
|
1214
1269
|
if (e === "force") {
|
|
1215
1270
|
let e = await this.storage.listFiles("v2/");
|
|
1216
1271
|
for (let t of e) {
|
|
1217
|
-
let e = t.match(
|
|
1272
|
+
let e = t.match(fn);
|
|
1218
1273
|
if (!e) continue;
|
|
1219
1274
|
let { organization: n, name: r, version: i } = e.groups, o = a({
|
|
1220
1275
|
organization: n,
|
|
@@ -1224,18 +1279,18 @@ var sn = class {
|
|
|
1224
1279
|
this.logger.info(` - ${n}:${r}:${i} force_added:${o}`);
|
|
1225
1280
|
}
|
|
1226
1281
|
}
|
|
1227
|
-
let
|
|
1228
|
-
if (e === "force" &&
|
|
1282
|
+
let o = await this.storage.getFile(J);
|
|
1283
|
+
if (e === "force" && o !== void 0) {
|
|
1229
1284
|
let e = this.generatePreWriteTimestamp();
|
|
1230
|
-
await this.createGlobalOverviewSnapshot(
|
|
1285
|
+
await this.createGlobalOverviewSnapshot(o.toString(), e);
|
|
1231
1286
|
}
|
|
1232
|
-
let c = (e === "force" ||
|
|
1287
|
+
let c = (e === "force" || o === void 0 ? {
|
|
1233
1288
|
schema: "v2",
|
|
1234
1289
|
packages: []
|
|
1235
|
-
} : Y(JSON.parse(
|
|
1290
|
+
} : Y(JSON.parse(o.toString()))).packages;
|
|
1236
1291
|
this.logger.info(`Global overview ${e === "force" ? "starting empty (force mode)" : "loaded"}, ${c.length} records`);
|
|
1237
1292
|
for (let [, r] of n.entries()) {
|
|
1238
|
-
let n =
|
|
1293
|
+
let n = ln(r.package), i = await this.storage.getFile(n);
|
|
1239
1294
|
if (e === "force" && i !== void 0) {
|
|
1240
1295
|
let e = this.generatePreWriteTimestamp(), t = q.parse(JSON.parse(i.toString()));
|
|
1241
1296
|
await this.createPackageOverviewSnapshot(r.package, t, e);
|
|
@@ -1245,28 +1300,28 @@ var sn = class {
|
|
|
1245
1300
|
versions: []
|
|
1246
1301
|
} : q.parse(JSON.parse(i.toString()));
|
|
1247
1302
|
this.logger.info(`Updating ${r.package.organization}:${r.package.name} overview${e === "force" ? " (starting empty in force mode)" : ""}, ${a.versions.length} records`);
|
|
1248
|
-
let
|
|
1303
|
+
let o = a.versions.filter((e) => !r.versions.has(e.description.id.version));
|
|
1249
1304
|
for (let [e] of r.versions.entries()) {
|
|
1250
1305
|
let t = e.toString(), n = {
|
|
1251
1306
|
...r.package,
|
|
1252
1307
|
version: t
|
|
1253
|
-
}, i = await this.storage.getFile(K(n) +
|
|
1308
|
+
}, i = await this.storage.getFile(K(n) + on);
|
|
1254
1309
|
if (!i) continue;
|
|
1255
|
-
let a = await
|
|
1256
|
-
|
|
1257
|
-
description:
|
|
1310
|
+
let a = await O(i), s = (await this.storage.listFiles(dn(n))).filter((e) => e.match(W) ? !0 : (this.logger.warn(`Unexpected channel in ${v(n)}: ${e}`), !1));
|
|
1311
|
+
o.push({
|
|
1312
|
+
description: D(d.parse(JSON.parse(i.toString("utf8"))).description, t),
|
|
1258
1313
|
manifestSha256: a,
|
|
1259
|
-
channels:
|
|
1314
|
+
channels: s
|
|
1260
1315
|
});
|
|
1261
1316
|
}
|
|
1262
|
-
|
|
1317
|
+
o.sort((e, t) => (0, V.compare)(t.description.id.version, e.description.id.version));
|
|
1263
1318
|
let l = {
|
|
1264
1319
|
schema: "v2",
|
|
1265
|
-
versions:
|
|
1320
|
+
versions: o
|
|
1266
1321
|
};
|
|
1267
|
-
e !== "dry-run" && (await this.storage.putFile(n, Buffer.from(JSON.stringify(l))), await this.createPackageOverviewSnapshot(r.package, l, t)), this.logger.info(`Done (${
|
|
1268
|
-
let
|
|
1269
|
-
for (let e of
|
|
1322
|
+
e !== "dry-run" && (await this.storage.putFile(n, Buffer.from(JSON.stringify(l))), await this.createPackageOverviewSnapshot(r.package, l, t)), this.logger.info(`Done (${o.length} records)`);
|
|
1323
|
+
let u = /* @__PURE__ */ new Set();
|
|
1324
|
+
for (let e of o) for (let t of e.channels) u.add(t);
|
|
1270
1325
|
c = c.filter((e) => e.id.organization !== r.package.organization || e.id.name !== r.package.name);
|
|
1271
1326
|
let f = `${r.package.organization}/${r.package.name}`;
|
|
1272
1327
|
c.push({
|
|
@@ -1274,18 +1329,18 @@ var sn = class {
|
|
|
1274
1329
|
organization: r.package.organization,
|
|
1275
1330
|
name: r.package.name
|
|
1276
1331
|
},
|
|
1277
|
-
allVersions:
|
|
1278
|
-
allVersionsWithChannels:
|
|
1332
|
+
allVersions: o.map((e) => e.description.id.version).reverse(),
|
|
1333
|
+
allVersionsWithChannels: o.map((e) => ({
|
|
1279
1334
|
version: e.description.id.version,
|
|
1280
1335
|
channels: e.channels
|
|
1281
1336
|
})).reverse(),
|
|
1282
|
-
latest:
|
|
1283
|
-
latestManifestSha256:
|
|
1284
|
-
latestByChannel: Object.fromEntries([...
|
|
1285
|
-
let t =
|
|
1337
|
+
latest: D(o[0].description, f),
|
|
1338
|
+
latestManifestSha256: o[0].manifestSha256,
|
|
1339
|
+
latestByChannel: Object.fromEntries([...u, s].map((e) => {
|
|
1340
|
+
let t = o.find((t) => e === s || t.channels.indexOf(e) !== -1);
|
|
1286
1341
|
if (!t) throw Error("Assertion error");
|
|
1287
1342
|
return [e, {
|
|
1288
|
-
description:
|
|
1343
|
+
description: D(t.description, f),
|
|
1289
1344
|
manifestSha256: t?.manifestSha256
|
|
1290
1345
|
}];
|
|
1291
1346
|
}))
|
|
@@ -1298,13 +1353,13 @@ var sn = class {
|
|
|
1298
1353
|
}), n = Buffer.from(e);
|
|
1299
1354
|
await this.storage.putFile(J, n);
|
|
1300
1355
|
let r = await this.gzipAsync(e);
|
|
1301
|
-
await this.storage.putFile(
|
|
1356
|
+
await this.storage.putFile(pn, Buffer.from(r)), await this.createGlobalOverviewSnapshot(e, t);
|
|
1302
1357
|
}
|
|
1303
|
-
this.logger.info(`Global overview updated (${c.length} records)`), e !== "dry-run" && await this.storage.deleteFiles(...r.map((e) => `${
|
|
1358
|
+
this.logger.info(`Global overview updated (${c.length} records)`), e !== "dry-run" && await this.storage.deleteFiles(...r.map((e) => `${Gt}${e}`)), this.logger.info("Version update requests cleared");
|
|
1304
1359
|
}
|
|
1305
1360
|
async updateIfNeeded(e = "normal") {
|
|
1306
1361
|
this.logger.info("Checking if registry requires refresh...");
|
|
1307
|
-
let t = await this.storage.getFile(
|
|
1362
|
+
let t = await this.storage.getFile(Jt), n = await this.storage.getFile(Yt);
|
|
1308
1363
|
if (e !== "force" && t === void 0 && n === void 0) {
|
|
1309
1364
|
this.logger.info("No global seed files found, update not needed.");
|
|
1310
1365
|
return;
|
|
@@ -1313,10 +1368,10 @@ var sn = class {
|
|
|
1313
1368
|
this.logger.info("Registry is up to date.");
|
|
1314
1369
|
return;
|
|
1315
1370
|
}
|
|
1316
|
-
await this.updateRegistry(e), t && (e !== "dry-run" && await this.storage.putFile(
|
|
1371
|
+
await this.updateRegistry(e), t && (e !== "dry-run" && await this.storage.putFile(Yt, t), this.logger.info("Refresh finished."));
|
|
1317
1372
|
}
|
|
1318
1373
|
async getPackageOverview(e) {
|
|
1319
|
-
let t = await this.storage.getFile(
|
|
1374
|
+
let t = await this.storage.getFile(ln(e));
|
|
1320
1375
|
if (t !== void 0) return q.parse(JSON.parse(t.toString()));
|
|
1321
1376
|
}
|
|
1322
1377
|
async getGlobalOverview() {
|
|
@@ -1324,34 +1379,34 @@ var sn = class {
|
|
|
1324
1379
|
if (e !== void 0) return Y(JSON.parse(e.toString()));
|
|
1325
1380
|
}
|
|
1326
1381
|
async marchChanged(e) {
|
|
1327
|
-
let t =
|
|
1328
|
-
this.logger.info(`Creating update seed at ${n} ...`), await this.storage.putFile(n, Buffer.from(t)), this.logger.info(`Touching global update seed ${
|
|
1382
|
+
let t = ae(), n = Kt(e, t);
|
|
1383
|
+
this.logger.info(`Creating update seed at ${n} ...`), await this.storage.putFile(n, Buffer.from(t)), this.logger.info(`Touching global update seed ${Jt} ...`), await this.storage.putFile(Jt, Buffer.from(t));
|
|
1329
1384
|
}
|
|
1330
1385
|
async addPackageToChannel(e, t) {
|
|
1331
1386
|
if (!t.match(W)) throw Error(`Illegal characters in channel name: ${t}`);
|
|
1332
1387
|
let n = K(e);
|
|
1333
|
-
if (await this.storage.getFile(`${n}/manifest.json`) === void 0) throw Error(`Package ${
|
|
1388
|
+
if (await this.storage.getFile(`${n}/manifest.json`) === void 0) throw Error(`Package ${v(e)} not found in the registry.`);
|
|
1334
1389
|
await this.storage.putFile(`${n}/${U}/${t}`, Buffer.from(t)), await this.marchChanged(e);
|
|
1335
1390
|
}
|
|
1336
1391
|
async removePackageFromChannel(e, t) {
|
|
1337
1392
|
if (!t.match(W)) throw Error(`Illegal characters in channel name: ${t}`);
|
|
1338
1393
|
let n = K(e);
|
|
1339
|
-
if (await this.storage.getFile(`${n}/manifest.json`) === void 0) throw Error(`Package ${
|
|
1394
|
+
if (await this.storage.getFile(`${n}/manifest.json`) === void 0) throw Error(`Package ${v(e)} not found in the registry.`);
|
|
1340
1395
|
await this.storage.deleteFiles(`${n}/${U}/${t}`), await this.marchChanged(e);
|
|
1341
1396
|
}
|
|
1342
1397
|
async listGlobalOverviewSnapshots() {
|
|
1343
|
-
let e = await this.storage.listFiles(
|
|
1398
|
+
let e = await this.storage.listFiles(Xt), t = [];
|
|
1344
1399
|
for (let n of e) {
|
|
1345
|
-
let e = n.indexOf("/") === -1 ? n : n.substring(n.lastIndexOf("/") + 1), r = e.match(
|
|
1400
|
+
let e = n.indexOf("/") === -1 ? n : n.substring(n.lastIndexOf("/") + 1), r = e.match(Qt);
|
|
1346
1401
|
r && t.push({
|
|
1347
1402
|
timestamp: r.groups.timestamp,
|
|
1348
|
-
path:
|
|
1403
|
+
path: Xt + e
|
|
1349
1404
|
});
|
|
1350
1405
|
}
|
|
1351
1406
|
return t.sort((e, t) => t.timestamp.localeCompare(e.timestamp)), t;
|
|
1352
1407
|
}
|
|
1353
1408
|
async restoreGlobalOverviewFromSnapshot(e) {
|
|
1354
|
-
let t =
|
|
1409
|
+
let t = $t(e), n = await this.storage.getFile(t);
|
|
1355
1410
|
if (!n) throw Error(`Snapshot ${e} not found at ${t}`);
|
|
1356
1411
|
let r = (await this.gunzipAsync(n)).toString("utf8");
|
|
1357
1412
|
try {
|
|
@@ -1362,14 +1417,14 @@ var sn = class {
|
|
|
1362
1417
|
let i = Buffer.from(r);
|
|
1363
1418
|
await this.storage.putFile(J, i);
|
|
1364
1419
|
let a = await this.gzipAsync(r);
|
|
1365
|
-
await this.storage.putFile(
|
|
1420
|
+
await this.storage.putFile(pn, Buffer.from(a)), this.logger.info(`Global overview restored from snapshot ${e}`);
|
|
1366
1421
|
}
|
|
1367
1422
|
async publishPackage(e, t) {
|
|
1368
1423
|
let n = K(e.description.id);
|
|
1369
1424
|
for (let r of e.files) {
|
|
1370
1425
|
let e = await t(r.name);
|
|
1371
1426
|
if (e.length !== r.size) throw Error(`Actual file size don't match file size from the manifest file for ${r.name} (actual = ${e.length}; manifest = ${r.size})`);
|
|
1372
|
-
let i = await
|
|
1427
|
+
let i = await O(e);
|
|
1373
1428
|
if (i !== r.sha256.toUpperCase()) throw Error(`Actual file SHA-256 don't match the checksum from the manifest file for ${r.name} (actual = ${i}; manifest = ${r.sha256.toUpperCase()})`);
|
|
1374
1429
|
let a = n + "/" + r.name;
|
|
1375
1430
|
this.logger.info(`Uploading ${r.name} -> ${a} ...`), await this.storage.putFile(a, e);
|
|
@@ -1377,11 +1432,11 @@ var sn = class {
|
|
|
1377
1432
|
let r = n + "/" + H;
|
|
1378
1433
|
this.logger.info(`Uploading manifest to ${r} ...`), await this.storage.putFile(r, Buffer.from(JSON.stringify(e))), await this.marchChanged(e.description.id);
|
|
1379
1434
|
}
|
|
1380
|
-
},
|
|
1435
|
+
}, vn = {
|
|
1381
1436
|
cacheBlockListFor: 45e3,
|
|
1382
1437
|
keepStaleBlockListFor: 3e5
|
|
1383
1438
|
};
|
|
1384
|
-
function
|
|
1439
|
+
function yn(e, t) {
|
|
1385
1440
|
let n = V.inc(e, "minor"), r = V.inc(e, "major"), i = [], a = t.find((t) => V.gt(t, e) && V.lt(t, n)), o = t.find((e) => V.gte(e, n) && V.lt(e, r)), s = t.find((e) => V.gte(e, r));
|
|
1386
1441
|
return a && i.push({
|
|
1387
1442
|
type: "patch",
|
|
@@ -1394,24 +1449,24 @@ function ln(e, t) {
|
|
|
1394
1449
|
update: s
|
|
1395
1450
|
}), i;
|
|
1396
1451
|
}
|
|
1397
|
-
var
|
|
1452
|
+
var bn = class {
|
|
1398
1453
|
v2RootFolderReader;
|
|
1399
1454
|
ops;
|
|
1400
1455
|
constructor(e, t) {
|
|
1401
1456
|
this.registryReader = e, this.v2RootFolderReader = e.relativeReader("v2/"), this.ops = {
|
|
1402
|
-
...
|
|
1457
|
+
...vn,
|
|
1403
1458
|
...t
|
|
1404
1459
|
};
|
|
1405
1460
|
}
|
|
1406
|
-
embeddedGlobalMetaCache = new
|
|
1461
|
+
embeddedGlobalMetaCache = new de({
|
|
1407
1462
|
max: 500,
|
|
1408
|
-
fetchMethod: async (e, t, n) => await
|
|
1463
|
+
fetchMethod: async (e, t, n) => await x(async () => {
|
|
1409
1464
|
let e = n.context.relativeTo === void 0 ? this.v2RootFolderReader.getContentReader() : this.v2RootFolderReader.relativeReader(G(n.context.relativeTo)).getContentReader();
|
|
1410
|
-
return await
|
|
1411
|
-
},
|
|
1465
|
+
return await We(n.context.meta, e);
|
|
1466
|
+
}, b)
|
|
1412
1467
|
});
|
|
1413
1468
|
async embedMetaContent(e, t, n, r) {
|
|
1414
|
-
return await this.embeddedGlobalMetaCache.forceFetch(
|
|
1469
|
+
return await this.embeddedGlobalMetaCache.forceFetch(ue({
|
|
1415
1470
|
id: e,
|
|
1416
1471
|
sha256: t,
|
|
1417
1472
|
absolutePath: n
|
|
@@ -1425,8 +1480,8 @@ var un = class {
|
|
|
1425
1480
|
async listBlockPacks(e) {
|
|
1426
1481
|
if (this.listCache !== void 0 && Date.now() - this.listCacheTimestamp <= this.ops.cacheBlockListFor) return this.listCache;
|
|
1427
1482
|
try {
|
|
1428
|
-
return await
|
|
1429
|
-
let t = Y(JSON.parse(Buffer.from(await this.v2RootFolderReader.readFile(
|
|
1483
|
+
return await x(async () => {
|
|
1484
|
+
let t = Y(JSON.parse(Buffer.from(await this.v2RootFolderReader.readFile(nn, { signal: e?.signal })).toString())), n = await Promise.all(t.packages.map(async (e) => {
|
|
1430
1485
|
let t = await Promise.all(Object.entries(e.latestByChannel).map(async ([e, t]) => [e, {
|
|
1431
1486
|
id: t.description.id,
|
|
1432
1487
|
meta: await this.embedMetaContent(t.description.id, t.manifestSha256, !0, t.description.meta),
|
|
@@ -1445,28 +1500,28 @@ var un = class {
|
|
|
1445
1500
|
};
|
|
1446
1501
|
}));
|
|
1447
1502
|
return this.listCache = n, this.listCacheTimestamp = Date.now(), n;
|
|
1448
|
-
},
|
|
1503
|
+
}, b);
|
|
1449
1504
|
} catch (e) {
|
|
1450
1505
|
if (this.listCache !== void 0 && Date.now() - this.listCacheTimestamp <= this.ops.keepStaleBlockListFor) return this.listCache;
|
|
1451
1506
|
throw e;
|
|
1452
1507
|
}
|
|
1453
1508
|
}
|
|
1454
1509
|
async getLatestOverview(e, t) {
|
|
1455
|
-
let n = (await this.listBlockPacks()).find((t) =>
|
|
1510
|
+
let n = (await this.listBlockPacks()).find((t) => _(e, t.id));
|
|
1456
1511
|
if (n !== void 0) return n.latestByChannel[t];
|
|
1457
1512
|
}
|
|
1458
1513
|
async getUpdateSuggestions(e, t) {
|
|
1459
|
-
let n = (await this.listBlockPacks()).find((t) =>
|
|
1514
|
+
let n = (await this.listBlockPacks()).find((t) => _(e, t.id));
|
|
1460
1515
|
if (n === void 0) return;
|
|
1461
|
-
let r = n.allVersions.filter((e) => t ===
|
|
1462
|
-
return r.reverse(),
|
|
1516
|
+
let r = n.allVersions.filter((e) => t === s || e.channels.indexOf(t) >= 0).map((e) => e.version);
|
|
1517
|
+
return r.reverse(), yn(e.version, r);
|
|
1463
1518
|
}
|
|
1464
1519
|
async getSpecificOverview(e, t) {
|
|
1465
|
-
return await
|
|
1466
|
-
let n = await this.v2RootFolderReader.readFile(G(e) +
|
|
1520
|
+
return await x(async () => {
|
|
1521
|
+
let n = await this.v2RootFolderReader.readFile(G(e) + on), r = d.parse(JSON.parse(Buffer.from(n).toString()));
|
|
1467
1522
|
return {
|
|
1468
1523
|
id: e,
|
|
1469
|
-
meta: await this.embedMetaContent(e, await
|
|
1524
|
+
meta: await this.embedMetaContent(e, await O(n), !1, r.description.meta),
|
|
1470
1525
|
spec: {
|
|
1471
1526
|
type: "from-registry-v2",
|
|
1472
1527
|
id: e,
|
|
@@ -1474,19 +1529,19 @@ var un = class {
|
|
|
1474
1529
|
channel: t
|
|
1475
1530
|
}
|
|
1476
1531
|
};
|
|
1477
|
-
},
|
|
1532
|
+
}, b);
|
|
1478
1533
|
}
|
|
1479
|
-
componentsCache = new
|
|
1534
|
+
componentsCache = new de({
|
|
1480
1535
|
max: 500,
|
|
1481
|
-
fetchMethod: async (e, t, { context: n }) => await
|
|
1536
|
+
fetchMethod: async (e, t, { context: n }) => await x(async () => {
|
|
1482
1537
|
let e = this.v2RootFolderReader.relativeReader(G(n));
|
|
1483
|
-
return
|
|
1484
|
-
},
|
|
1538
|
+
return Je(d.parse(JSON.parse(Buffer.from(await e.readFile(H)).toString())).description.components, e.rootUrl.toString());
|
|
1539
|
+
}, b)
|
|
1485
1540
|
});
|
|
1486
1541
|
async getComponents(e) {
|
|
1487
|
-
return await this.componentsCache.forceFetch(
|
|
1542
|
+
return await this.componentsCache.forceFetch(ue(e), { context: e });
|
|
1488
1543
|
}
|
|
1489
|
-
},
|
|
1544
|
+
}, xn = class {
|
|
1490
1545
|
constructor(e, t, n) {
|
|
1491
1546
|
this.client = e, this.bucket = t, this.root = n;
|
|
1492
1547
|
}
|
|
@@ -1494,7 +1549,7 @@ var un = class {
|
|
|
1494
1549
|
try {
|
|
1495
1550
|
return Buffer.from(await (await this.client.getObject({
|
|
1496
1551
|
Bucket: this.bucket,
|
|
1497
|
-
Key:
|
|
1552
|
+
Key: C.join(this.root, e)
|
|
1498
1553
|
})).Body.transformToByteArray());
|
|
1499
1554
|
} catch (e) {
|
|
1500
1555
|
if (e instanceof Error && e.name === "NoSuchKey") return;
|
|
@@ -1502,35 +1557,35 @@ var un = class {
|
|
|
1502
1557
|
}
|
|
1503
1558
|
}
|
|
1504
1559
|
async listFiles(e) {
|
|
1505
|
-
let t =
|
|
1560
|
+
let t = C.join(this.root, e), n = pe({ client: this.client }, {
|
|
1506
1561
|
Bucket: this.bucket,
|
|
1507
1562
|
Prefix: t
|
|
1508
1563
|
}), r = [];
|
|
1509
|
-
for await (let e of n) r.push(...(e.Contents ?? []).map((e) =>
|
|
1564
|
+
for await (let e of n) r.push(...(e.Contents ?? []).map((e) => C.relative(t, e.Key)));
|
|
1510
1565
|
return r;
|
|
1511
1566
|
}
|
|
1512
1567
|
async putFile(e, t) {
|
|
1513
1568
|
await this.client.putObject({
|
|
1514
1569
|
Bucket: this.bucket,
|
|
1515
|
-
Key:
|
|
1570
|
+
Key: C.join(this.root, e),
|
|
1516
1571
|
Body: t
|
|
1517
1572
|
});
|
|
1518
1573
|
}
|
|
1519
1574
|
async deleteFiles(...e) {
|
|
1520
1575
|
let t = await this.client.deleteObjects({
|
|
1521
1576
|
Bucket: this.bucket,
|
|
1522
|
-
Delete: { Objects: e.map((e) => ({ Key:
|
|
1577
|
+
Delete: { Objects: e.map((e) => ({ Key: C.join(this.root, e) })) }
|
|
1523
1578
|
});
|
|
1524
1579
|
if (t.Errors !== void 0 && t.Errors.length > 0) throw Error(`Errors encountered while deleting files: ${t.Errors.map((e) => e.Message ?? e.Code ?? "Unknown error").join("\n")}`);
|
|
1525
1580
|
}
|
|
1526
|
-
},
|
|
1581
|
+
}, Sn = class {
|
|
1527
1582
|
root;
|
|
1528
1583
|
constructor(t) {
|
|
1529
1584
|
this.root = e.resolve(t);
|
|
1530
1585
|
}
|
|
1531
1586
|
toAbsolutePath(t) {
|
|
1532
|
-
if (
|
|
1533
|
-
return e.resolve(this.root, t.split(
|
|
1587
|
+
if (C.isAbsolute(t)) throw Error("absolute path");
|
|
1588
|
+
return e.resolve(this.root, t.split(C.sep).join(e.sep));
|
|
1534
1589
|
}
|
|
1535
1590
|
async getFile(e) {
|
|
1536
1591
|
try {
|
|
@@ -1546,7 +1601,7 @@ var un = class {
|
|
|
1546
1601
|
return (await t.promises.readdir(r, {
|
|
1547
1602
|
recursive: !0,
|
|
1548
1603
|
withFileTypes: !0
|
|
1549
|
-
})).filter((e) => e.isFile()).map((t) => e.relative(r, e.resolve(t.parentPath, t.name)).split(e.sep).join(
|
|
1604
|
+
})).filter((e) => e.isFile()).map((t) => e.relative(r, e.resolve(t.parentPath, t.name)).split(e.sep).join(C.sep));
|
|
1550
1605
|
} catch (e) {
|
|
1551
1606
|
if (e instanceof Error && "code" in e && e.code === "ENOENT") return [];
|
|
1552
1607
|
throw e;
|
|
@@ -1560,27 +1615,27 @@ var un = class {
|
|
|
1560
1615
|
for (let n of e) await t.promises.rm(this.toAbsolutePath(n));
|
|
1561
1616
|
}
|
|
1562
1617
|
};
|
|
1563
|
-
function
|
|
1564
|
-
let n = new URL(t, `file:${e.resolve(".").split(e.sep).join(
|
|
1618
|
+
function Cn(t) {
|
|
1619
|
+
let n = new URL(t, `file:${e.resolve(".").split(e.sep).join(C.sep)}/`);
|
|
1565
1620
|
switch (n.protocol) {
|
|
1566
|
-
case "file:": return new
|
|
1621
|
+
case "file:": return new Sn(e.resolve(n.pathname));
|
|
1567
1622
|
case "s3:": {
|
|
1568
1623
|
let e = {}, t = n.searchParams.get("region");
|
|
1569
1624
|
t && (e.region = t);
|
|
1570
1625
|
let r = n.hostname;
|
|
1571
|
-
return new
|
|
1626
|
+
return new xn(new fe(e), r, n.pathname.replace(/^\//, ""));
|
|
1572
1627
|
}
|
|
1573
1628
|
default: throw Error(`Unknown protocol: ${n.protocol}`);
|
|
1574
1629
|
}
|
|
1575
1630
|
}
|
|
1576
1631
|
//#endregion
|
|
1577
1632
|
//#region src/io/folder_reader.ts
|
|
1578
|
-
var
|
|
1633
|
+
var wn = class e {
|
|
1579
1634
|
constructor(e, t) {
|
|
1580
1635
|
this.rootUrl = e, this.httpDispatcher = t;
|
|
1581
1636
|
}
|
|
1582
1637
|
async readFile(e, t) {
|
|
1583
|
-
let n = await
|
|
1638
|
+
let n = await me(new URL(e, this.rootUrl), {
|
|
1584
1639
|
dispatcher: this.httpDispatcher,
|
|
1585
1640
|
signal: t?.signal
|
|
1586
1641
|
});
|
|
@@ -1593,82 +1648,82 @@ var mn = class e {
|
|
|
1593
1648
|
let t = e === void 0 ? this : this.relativeReader(e);
|
|
1594
1649
|
return (e) => t.readFile(e);
|
|
1595
1650
|
}
|
|
1596
|
-
},
|
|
1651
|
+
}, Tn = class t {
|
|
1597
1652
|
constructor(e, t) {
|
|
1598
1653
|
this.rootUrl = e, this.root = t;
|
|
1599
1654
|
}
|
|
1600
|
-
async readFile(t,
|
|
1601
|
-
let i = e.join(this.root, ...t.split(
|
|
1602
|
-
return await
|
|
1655
|
+
async readFile(t, n) {
|
|
1656
|
+
let i = e.join(this.root, ...t.split(C.sep));
|
|
1657
|
+
return await r.readFile(i, { signal: n?.signal });
|
|
1603
1658
|
}
|
|
1604
1659
|
relativeReader(n) {
|
|
1605
|
-
return n.endsWith("/") || (n += "/"), new t(new URL(n, this.rootUrl), e.join(this.root, ...n.split(
|
|
1660
|
+
return n.endsWith("/") || (n += "/"), new t(new URL(n, this.rootUrl), e.join(this.root, ...n.split(C.sep)));
|
|
1606
1661
|
}
|
|
1607
1662
|
getContentReader(e) {
|
|
1608
1663
|
let t = e === void 0 ? this : this.relativeReader(e);
|
|
1609
1664
|
return (e) => t.readFile(e);
|
|
1610
1665
|
}
|
|
1611
1666
|
};
|
|
1612
|
-
function
|
|
1613
|
-
return t.split(
|
|
1667
|
+
function En(t) {
|
|
1668
|
+
return t.split(C.sep).join(e.sep);
|
|
1614
1669
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return t.split(e.sep).join(
|
|
1670
|
+
function Dn(t) {
|
|
1671
|
+
return t.split(e.sep).join(C.sep);
|
|
1617
1672
|
}
|
|
1618
|
-
function
|
|
1673
|
+
function On(t, n) {
|
|
1619
1674
|
t.endsWith("/") || (t += "/");
|
|
1620
|
-
let r = new URL(t, `file:${
|
|
1675
|
+
let r = new URL(t, `file:${Dn(e.resolve("."))}/`);
|
|
1621
1676
|
switch (r.protocol) {
|
|
1622
|
-
case "file:": return new
|
|
1677
|
+
case "file:": return new Tn(r, En(r.pathname));
|
|
1623
1678
|
case "https:":
|
|
1624
|
-
case "http:": return new
|
|
1679
|
+
case "http:": return new wn(r, n ?? he());
|
|
1625
1680
|
default: throw Error(`Unknown protocol: ${r.protocol}`);
|
|
1626
1681
|
}
|
|
1627
1682
|
}
|
|
1628
1683
|
//#endregion
|
|
1629
1684
|
//#region src/common_types.ts
|
|
1630
|
-
var
|
|
1631
|
-
organization:
|
|
1632
|
-
package:
|
|
1633
|
-
version:
|
|
1634
|
-
files:
|
|
1635
|
-
meta:
|
|
1636
|
-
}),
|
|
1637
|
-
registries:
|
|
1638
|
-
registry:
|
|
1639
|
-
}),
|
|
1685
|
+
var kn = S.string().regex(/^(?:s3:|file:)/), An = S.object({
|
|
1686
|
+
organization: S.string(),
|
|
1687
|
+
package: S.string(),
|
|
1688
|
+
version: p.optional(),
|
|
1689
|
+
files: S.record(S.string().regex(/^[^/]+$/), S.string()).default({}),
|
|
1690
|
+
meta: S.object({}).passthrough()
|
|
1691
|
+
}), jn = S.object({
|
|
1692
|
+
registries: S.record(S.string(), kn).default({}),
|
|
1693
|
+
registry: S.string().optional()
|
|
1694
|
+
}), Mn = jn.merge(An).required({
|
|
1640
1695
|
registry: !0,
|
|
1641
1696
|
version: !0
|
|
1642
|
-
}), X =
|
|
1697
|
+
}), X = Mn.partial().required({
|
|
1643
1698
|
registries: !0,
|
|
1644
1699
|
files: !0
|
|
1645
|
-
}),
|
|
1646
|
-
function
|
|
1700
|
+
}), Nn = "pl.package.json", Pn = "pl.package.yaml", Z = "v1/";
|
|
1701
|
+
function Fn(e) {
|
|
1647
1702
|
return `${Z}${e.organization}/${e.package}/${e.version}`;
|
|
1648
1703
|
}
|
|
1649
|
-
function
|
|
1704
|
+
function In(e, t) {
|
|
1650
1705
|
return `${Z}${e.organization}/${e.package}/${e.version}/${t}`;
|
|
1651
1706
|
}
|
|
1652
|
-
function
|
|
1707
|
+
function Ln(e) {
|
|
1653
1708
|
return `${Z}${e.organization}/${e.package}/overview.json`;
|
|
1654
1709
|
}
|
|
1655
|
-
var Q = `${Z}overview.json`,
|
|
1656
|
-
function
|
|
1657
|
-
return `${
|
|
1710
|
+
var Q = `${Z}overview.json`, Rn = "meta.json", zn = "_updates_v1/per_package_version/";
|
|
1711
|
+
function Bn(e, t) {
|
|
1712
|
+
return `${zn}${e.organization}/${e.package}/${e.version}/${t}`;
|
|
1658
1713
|
}
|
|
1659
|
-
var
|
|
1714
|
+
var Vn = /(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<pkg>[^/]+))\/(?<version>[^/]+)\/(?<seed>[^/]+)$/, Hn = "_updates_v1/_global_update_in", Un = "_updates_v1/_global_update_out", Wn = class {
|
|
1660
1715
|
constructor(e, t) {
|
|
1661
1716
|
this.storage = e, this.logger = t;
|
|
1662
1717
|
}
|
|
1663
1718
|
constructNewPackage(e) {
|
|
1664
|
-
return new
|
|
1719
|
+
return new Gn(this.storage, e);
|
|
1665
1720
|
}
|
|
1666
1721
|
async updateRegistry() {
|
|
1667
1722
|
this.logger?.info("Initiating registry refresh...");
|
|
1668
|
-
let e = /* @__PURE__ */ new Map(), t = [], n = await this.storage.listFiles(
|
|
1723
|
+
let e = /* @__PURE__ */ new Map(), t = [], n = await this.storage.listFiles(zn);
|
|
1669
1724
|
this.logger?.info("Packages to be updated:");
|
|
1670
1725
|
for (let r of n) {
|
|
1671
|
-
let n = r.match(
|
|
1726
|
+
let n = r.match(Vn);
|
|
1672
1727
|
if (!n) continue;
|
|
1673
1728
|
t.push(r);
|
|
1674
1729
|
let { packageKeyWithoutVersion: i, organization: a, pkg: o, version: s, seed: c } = n.groups, l = e.get(i);
|
|
@@ -1683,13 +1738,13 @@ var jn = /(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<pkg>[^/]+))\/(?
|
|
|
1683
1738
|
let r = await this.storage.getFile(Q), i = r === void 0 ? [] : JSON.parse(r.toString());
|
|
1684
1739
|
this.logger?.info(`Global overview loaded, ${i.length} records`);
|
|
1685
1740
|
for (let [, t] of e.entries()) {
|
|
1686
|
-
let e =
|
|
1741
|
+
let e = Ln(t.package), n = await this.storage.getFile(e), r = n === void 0 ? [] : JSON.parse(n.toString());
|
|
1687
1742
|
this.logger?.info(`Updating ${t.package.organization}:${t.package.package} overview, ${r.length} records`), r = r.filter((e) => !t.versions.has(e.version));
|
|
1688
1743
|
for (let [e] of t.versions.entries()) {
|
|
1689
|
-
let n = e.toString(), i = await this.storage.getFile(
|
|
1744
|
+
let n = e.toString(), i = await this.storage.getFile(In({
|
|
1690
1745
|
...t.package,
|
|
1691
1746
|
version: n
|
|
1692
|
-
},
|
|
1747
|
+
}, Rn));
|
|
1693
1748
|
i && r.push({
|
|
1694
1749
|
version: n,
|
|
1695
1750
|
meta: JSON.parse(i.toString())
|
|
@@ -1703,36 +1758,36 @@ var jn = /(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<pkg>[^/]+))\/(?
|
|
|
1703
1758
|
latestMeta: r[0].meta
|
|
1704
1759
|
});
|
|
1705
1760
|
}
|
|
1706
|
-
await this.storage.putFile(Q, Buffer.from(JSON.stringify(i))), this.logger?.info(`Global overview updated (${i.length} records)`), await this.storage.deleteFiles(...t.map((e) => `${
|
|
1761
|
+
await this.storage.putFile(Q, Buffer.from(JSON.stringify(i))), this.logger?.info(`Global overview updated (${i.length} records)`), await this.storage.deleteFiles(...t.map((e) => `${zn}${e}`)), this.logger?.info("Version update requests cleared");
|
|
1707
1762
|
}
|
|
1708
1763
|
async updateIfNeeded(e = !1) {
|
|
1709
1764
|
this.logger?.info("Checking if registry requires refresh...");
|
|
1710
|
-
let t = await this.storage.getFile(
|
|
1711
|
-
!e && t === void 0 && n === void 0 || !e && t !== void 0 && n !== void 0 && t.equals(n) || (await this.updateRegistry(), t && (await this.storage.putFile(
|
|
1765
|
+
let t = await this.storage.getFile(Hn), n = await this.storage.getFile(Un);
|
|
1766
|
+
!e && t === void 0 && n === void 0 || !e && t !== void 0 && n !== void 0 && t.equals(n) || (await this.updateRegistry(), t && (await this.storage.putFile(Un, t), this.logger?.info("Refresh finished")));
|
|
1712
1767
|
}
|
|
1713
1768
|
async getPackageOverview(e) {
|
|
1714
|
-
let t = await this.storage.getFile(
|
|
1769
|
+
let t = await this.storage.getFile(Ln(e));
|
|
1715
1770
|
if (t !== void 0) return JSON.parse(t.toString());
|
|
1716
1771
|
}
|
|
1717
1772
|
async getGlobalOverview() {
|
|
1718
1773
|
let e = await this.storage.getFile(Q);
|
|
1719
1774
|
if (e !== void 0) return JSON.parse(e.toString());
|
|
1720
1775
|
}
|
|
1721
|
-
},
|
|
1776
|
+
}, Gn = class {
|
|
1722
1777
|
metaAdded = !1;
|
|
1723
|
-
seed =
|
|
1778
|
+
seed = ae();
|
|
1724
1779
|
constructor(e, t) {
|
|
1725
1780
|
this.storage = e, this.name = t;
|
|
1726
1781
|
}
|
|
1727
1782
|
async addFile(e, t) {
|
|
1728
|
-
await this.storage.putFile(
|
|
1783
|
+
await this.storage.putFile(In(this.name, e), t);
|
|
1729
1784
|
}
|
|
1730
1785
|
async writeMeta(e) {
|
|
1731
|
-
await this.addFile(
|
|
1786
|
+
await this.addFile(Rn, Buffer.from(JSON.stringify(e))), this.metaAdded = !0;
|
|
1732
1787
|
}
|
|
1733
1788
|
async finish() {
|
|
1734
1789
|
if (!this.metaAdded) throw Error("meta not added");
|
|
1735
|
-
await this.storage.putFile(
|
|
1790
|
+
await this.storage.putFile(Bn(this.name, this.seed), Buffer.of(0)), await this.storage.putFile(Hn, Buffer.from(this.seed));
|
|
1736
1791
|
}
|
|
1737
1792
|
};
|
|
1738
1793
|
//#endregion
|
|
@@ -1751,17 +1806,17 @@ function $(e, t) {
|
|
|
1751
1806
|
}
|
|
1752
1807
|
};
|
|
1753
1808
|
}
|
|
1754
|
-
async function
|
|
1755
|
-
return
|
|
1809
|
+
async function Kn(e) {
|
|
1810
|
+
return Qe(e, (e) => X.parse(JSON.parse(e.toString())));
|
|
1756
1811
|
}
|
|
1757
|
-
async function
|
|
1758
|
-
return
|
|
1812
|
+
async function qn(e) {
|
|
1813
|
+
return Qe(e, (e) => X.parse(ge.parse(e.toString())));
|
|
1759
1814
|
}
|
|
1760
|
-
async function
|
|
1815
|
+
async function Jn() {
|
|
1761
1816
|
let e = X.parse({});
|
|
1762
|
-
return e = $(e, await
|
|
1817
|
+
return e = $(e, await Kn("./.pl.reg.json")), e = $(e, await qn("./.pl.reg.yaml")), e = $(e, await Kn(`${_e.homedir()}/.pl.reg.json`)), e = $(e, await qn(`${_e.homedir()}/.pl.reg.yaml`)), e = $(e, await Kn(Nn)), e = $(e, await qn(Pn)), e;
|
|
1763
1818
|
}
|
|
1764
|
-
var
|
|
1819
|
+
var Yn = class {
|
|
1765
1820
|
constructor(e) {
|
|
1766
1821
|
this.conf = e;
|
|
1767
1822
|
}
|
|
@@ -1772,7 +1827,7 @@ var zn = class {
|
|
|
1772
1827
|
if (!e) throw Error(`Registry with alias "${t}" not found`);
|
|
1773
1828
|
t = e;
|
|
1774
1829
|
}
|
|
1775
|
-
return new
|
|
1830
|
+
return new Wn(Cn(t), e);
|
|
1776
1831
|
}
|
|
1777
1832
|
get fullPackageName() {
|
|
1778
1833
|
return {
|
|
@@ -1782,11 +1837,11 @@ var zn = class {
|
|
|
1782
1837
|
};
|
|
1783
1838
|
}
|
|
1784
1839
|
};
|
|
1785
|
-
async function
|
|
1786
|
-
let t = await
|
|
1787
|
-
return new
|
|
1840
|
+
async function Xn(e) {
|
|
1841
|
+
let t = await Jn();
|
|
1842
|
+
return new Yn(Mn.parse($(t, e)));
|
|
1788
1843
|
}
|
|
1789
1844
|
//#endregion
|
|
1790
|
-
export {
|
|
1845
|
+
export { D as $, fn as A, Y as B, nn as C, Oe as Ct, tn as D, J as E, un as F, k as G, ct as H, K as I, st as J, ot as K, G as L, an as M, sn as N, H as O, dn as P, et as Q, ln as R, U as S, De as St, pn as T, Ee as Tt, ut as U, A as V, lt as W, nt as X, it as Y, rt as Z, Cn as _, Pe as _t, Fn as a, Ke as at, _n as b, Re as bt, An as c, Ue as ct, jn as d, Be as dt, Xe as et, Mn as f, je as ft, xn as g, ke as gt, Sn as h, Ne as ht, Rn as i, Ge as it, q as j, on as k, Nn as l, We as lt, On as m, Ae as mt, Xn as n, Je as nt, Ln as o, Ve as ot, X as p, Me as pt, at as q, Q as r, qe as rt, In as s, He as st, Yn as t, Ye as tt, Pn as u, ze as ut, bn as v, Ie as vt, rn as w, Ce as wt, W as x, Fe as xt, yn as y, Le as yt, cn as z };
|
|
1791
1846
|
|
|
1792
|
-
//# sourceMappingURL=config-
|
|
1847
|
+
//# sourceMappingURL=config-CiC347sB.mjs.map
|