ovsx 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -1
- package/lib/get.js +1 -1
- package/lib/get.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/list-options.d.ts +24 -0
- package/lib/list-options.d.ts.map +1 -0
- package/lib/list-options.js +15 -0
- package/lib/list-options.js.map +1 -0
- package/lib/list.d.ts +18 -0
- package/lib/list.d.ts.map +1 -0
- package/lib/list.js +46 -0
- package/lib/list.js.map +1 -0
- package/lib/main.js +78 -2
- package/lib/main.js.map +1 -1
- package/lib/oidc.d.ts +22 -0
- package/lib/oidc.d.ts.map +1 -0
- package/lib/oidc.js +101 -0
- package/lib/oidc.js.map +1 -0
- package/lib/publish-options.d.ts +8 -1
- package/lib/publish-options.d.ts.map +1 -1
- package/lib/publish.d.ts.map +1 -1
- package/lib/publish.js +73 -4
- package/lib/publish.js.map +1 -1
- package/lib/registry-options.d.ts +8 -0
- package/lib/registry-options.d.ts.map +1 -1
- package/lib/registry.d.ts +119 -1
- package/lib/registry.d.ts.map +1 -1
- package/lib/registry.js +187 -19
- package/lib/registry.js.map +1 -1
- package/lib/search-options.d.ts +48 -0
- package/lib/search-options.d.ts.map +1 -0
- package/lib/search-options.js +15 -0
- package/lib/search-options.js.map +1 -0
- package/lib/search.d.ts +22 -0
- package/lib/search.d.ts.map +1 -0
- package/lib/search.js +86 -0
- package/lib/search.js.map +1 -0
- package/lib/show-options.d.ts +33 -0
- package/lib/show-options.d.ts.map +1 -0
- package/lib/show-options.js +15 -0
- package/lib/show-options.js.map +1 -0
- package/lib/show.d.ts +18 -0
- package/lib/show.d.ts.map +1 -0
- package/lib/show.js +289 -0
- package/lib/show.js.map +1 -0
- package/lib/table.d.ts +27 -0
- package/lib/table.d.ts.map +1 -0
- package/lib/table.js +56 -0
- package/lib/table.js.map +1 -0
- package/lib/trusted-publishing-options.d.ts +30 -0
- package/lib/trusted-publishing-options.d.ts.map +1 -0
- package/lib/trusted-publishing-options.js +15 -0
- package/lib/trusted-publishing-options.js.map +1 -0
- package/lib/trusted-publishing.d.ts +35 -0
- package/lib/trusted-publishing.d.ts.map +1 -0
- package/lib/trusted-publishing.js +112 -0
- package/lib/trusted-publishing.js.map +1 -0
- package/lib/unpublish-options.d.ts +34 -0
- package/lib/unpublish-options.d.ts.map +1 -0
- package/lib/unpublish-options.js +15 -0
- package/lib/unpublish-options.js.map +1 -0
- package/lib/unpublish.d.ts +22 -0
- package/lib/unpublish.d.ts.map +1 -0
- package/lib/unpublish.js +137 -0
- package/lib/unpublish.js.map +1 -0
- package/lib/util.d.ts +39 -1
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +91 -5
- package/lib/util.js.map +1 -1
- package/lib/verify-options.d.ts +24 -0
- package/lib/verify-options.d.ts.map +1 -0
- package/lib/verify-options.js +15 -0
- package/lib/verify-options.js.map +1 -0
- package/lib/verify-signature-options.d.ts +32 -0
- package/lib/verify-signature-options.d.ts.map +1 -0
- package/lib/verify-signature-options.js +15 -0
- package/lib/verify-signature-options.js.map +1 -0
- package/lib/verify-signature.d.ts +28 -0
- package/lib/verify-signature.d.ts.map +1 -0
- package/lib/verify-signature.js +105 -0
- package/lib/verify-signature.js.map +1 -0
- package/lib/verify.d.ts +21 -0
- package/lib/verify.d.ts.map +1 -0
- package/lib/verify.js +97 -0
- package/lib/verify.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/zip.d.ts +10 -0
- package/lib/zip.d.ts.map +1 -1
- package/lib/zip.js +31 -0
- package/lib/zip.js.map +1 -1
- package/package.json +9 -5
- package/src/get.ts +1 -1
- package/src/index.ts +4 -0
- package/src/list-options.ts +25 -0
- package/src/list.ts +48 -0
- package/src/main.ts +89 -3
- package/src/oidc.ts +107 -0
- package/src/publish-options.ts +8 -1
- package/src/publish.ts +97 -5
- package/src/registry-options.ts +8 -0
- package/src/registry.ts +292 -19
- package/src/search-options.ts +49 -0
- package/src/search.ts +95 -0
- package/src/show-options.ts +34 -0
- package/src/show.ts +328 -0
- package/src/table.ts +53 -0
- package/src/trusted-publishing-options.ts +30 -0
- package/src/trusted-publishing.ts +148 -0
- package/src/unpublish-options.ts +35 -0
- package/src/unpublish.ts +160 -0
- package/src/util.ts +102 -5
- package/src/verify-options.ts +25 -0
- package/src/verify-signature-options.ts +32 -0
- package/src/verify-signature.ts +124 -0
- package/src/verify.ts +107 -0
- package/src/version.ts +1 -1
- package/src/zip.ts +31 -1
package/lib/registry.js
CHANGED
|
@@ -9,13 +9,17 @@
|
|
|
9
9
|
* SPDX-License-Identifier: EPL-2.0
|
|
10
10
|
********************************************************************************/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Registry = exports.DEFAULT_PUBLISH_SIZE = exports.DEFAULT_NAMESPACE_SIZE = exports.DEFAULT_URL = void 0;
|
|
12
|
+
exports.Registry = exports.DEFAULT_DELETE_SIZE = exports.DEFAULT_TOKEN_REQUEST_SIZE = exports.DEFAULT_TIMEOUT = exports.DEFAULT_PUBLISH_SIZE = exports.DEFAULT_NAMESPACE_SIZE = exports.DEFAULT_URL = void 0;
|
|
13
13
|
const fs = require("fs");
|
|
14
|
+
const stream_1 = require("stream");
|
|
14
15
|
const followRedirects = require("follow-redirects");
|
|
15
16
|
const util_1 = require("./util");
|
|
17
|
+
Object.defineProperty(exports, "DEFAULT_TIMEOUT", { enumerable: true, get: function () { return util_1.DEFAULT_TIMEOUT; } });
|
|
16
18
|
exports.DEFAULT_URL = 'https://open-vsx.org';
|
|
17
19
|
exports.DEFAULT_NAMESPACE_SIZE = 1024;
|
|
18
20
|
exports.DEFAULT_PUBLISH_SIZE = 512 * 1024 * 1024;
|
|
21
|
+
exports.DEFAULT_TOKEN_REQUEST_SIZE = 8 * 1024;
|
|
22
|
+
exports.DEFAULT_DELETE_SIZE = 64 * 1024;
|
|
19
23
|
class Registry {
|
|
20
24
|
constructor(options = {}) {
|
|
21
25
|
if (options.registryUrl?.endsWith('/'))
|
|
@@ -26,6 +30,7 @@ class Registry {
|
|
|
26
30
|
this.url = exports.DEFAULT_URL;
|
|
27
31
|
this.maxNamespaceSize = options.maxNamespaceSize ?? exports.DEFAULT_NAMESPACE_SIZE;
|
|
28
32
|
this.maxPublishSize = options.maxPublishSize ?? exports.DEFAULT_PUBLISH_SIZE;
|
|
33
|
+
this.timeout = options.timeout ?? util_1.DEFAULT_TIMEOUT;
|
|
29
34
|
this.username = options.username;
|
|
30
35
|
this.password = options.password;
|
|
31
36
|
}
|
|
@@ -53,6 +58,14 @@ class Registry {
|
|
|
53
58
|
return (0, util_1.rejectError)(err);
|
|
54
59
|
}
|
|
55
60
|
}
|
|
61
|
+
getRegistryVersion() {
|
|
62
|
+
try {
|
|
63
|
+
return this.getJson(this.getUrl(['api', 'version']));
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
return (0, util_1.rejectError)(err);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
56
69
|
publish(file, pat) {
|
|
57
70
|
try {
|
|
58
71
|
const url = this.getUrl(['api', '-', 'publish'], { token: pat });
|
|
@@ -64,42 +77,166 @@ class Registry {
|
|
|
64
77
|
return (0, util_1.rejectError)(err);
|
|
65
78
|
}
|
|
66
79
|
}
|
|
67
|
-
|
|
80
|
+
requestTrustedPublishingToken(namespace, extension, idToken) {
|
|
81
|
+
try {
|
|
82
|
+
const url = this.getUrl(['api', '-', 'trusted-publishing', 'token']);
|
|
83
|
+
const request = { namespace, extension, token: idToken };
|
|
84
|
+
return this.post(JSON.stringify(request), url, {
|
|
85
|
+
'Content-Type': 'application/json'
|
|
86
|
+
}, exports.DEFAULT_TOKEN_REQUEST_SIZE);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
return (0, util_1.rejectError)(err);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Deletes extension versions. Omitting `targetVersions` deletes the extension as a whole,
|
|
94
|
+
* i.e. all versions the personal access token's user is allowed to delete.
|
|
95
|
+
*/
|
|
96
|
+
deleteExtension(namespace, extension, targetVersions, pat) {
|
|
97
|
+
try {
|
|
98
|
+
if (!targetVersions) {
|
|
99
|
+
const url = this.getUrl(['api', namespace, extension, 'delete'], { token: pat, allVersions: 'true' });
|
|
100
|
+
return this.post('', url, undefined, exports.DEFAULT_DELETE_SIZE);
|
|
101
|
+
}
|
|
102
|
+
const url = this.getUrl(['api', namespace, extension, 'delete'], { token: pat });
|
|
103
|
+
return this.post(JSON.stringify(targetVersions), url, {
|
|
104
|
+
'Content-Type': 'application/json'
|
|
105
|
+
}, exports.DEFAULT_DELETE_SIZE);
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
return (0, util_1.rejectError)(err);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
getMetadata(namespace, extension, target, version) {
|
|
68
112
|
try {
|
|
69
113
|
const segments = ['api', namespace, extension];
|
|
70
114
|
if (target) {
|
|
71
115
|
segments.push(target);
|
|
72
116
|
}
|
|
117
|
+
if (version) {
|
|
118
|
+
segments.push(version);
|
|
119
|
+
}
|
|
73
120
|
return this.getJson(this.getUrl(segments));
|
|
74
121
|
}
|
|
75
122
|
catch (err) {
|
|
76
123
|
return (0, util_1.rejectError)(err);
|
|
77
124
|
}
|
|
78
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Returns a page of an extension's published versions, newest first, one entry per version and
|
|
128
|
+
* target platform. `allVersions` on the metadata response carries version numbers and links
|
|
129
|
+
* only, so this is what makes the target platforms of each version available.
|
|
130
|
+
*/
|
|
131
|
+
getVersionReferences(namespace, extension, target, size, offset) {
|
|
132
|
+
try {
|
|
133
|
+
const segments = ['api', namespace, extension];
|
|
134
|
+
if (target) {
|
|
135
|
+
segments.push(target);
|
|
136
|
+
}
|
|
137
|
+
segments.push('version-references');
|
|
138
|
+
return this.getJson(this.getUrl(segments, {
|
|
139
|
+
size: String(size),
|
|
140
|
+
offset: String(offset)
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
return (0, util_1.rejectError)(err);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Full-text search across the registry. Returns the purpose-built summary shape rather than
|
|
149
|
+
* whole extension records, so a page of results stays small.
|
|
150
|
+
*/
|
|
151
|
+
search(options) {
|
|
152
|
+
try {
|
|
153
|
+
const query = {
|
|
154
|
+
size: String(options.size),
|
|
155
|
+
offset: String(options.offset)
|
|
156
|
+
};
|
|
157
|
+
if (options.query) {
|
|
158
|
+
query.query = options.query;
|
|
159
|
+
}
|
|
160
|
+
if (options.category) {
|
|
161
|
+
query.category = options.category;
|
|
162
|
+
}
|
|
163
|
+
if (options.targetPlatform) {
|
|
164
|
+
query.targetPlatform = options.targetPlatform;
|
|
165
|
+
}
|
|
166
|
+
if (options.sortBy) {
|
|
167
|
+
query.sortBy = options.sortBy;
|
|
168
|
+
}
|
|
169
|
+
if (options.sortOrder) {
|
|
170
|
+
query.sortOrder = options.sortOrder;
|
|
171
|
+
}
|
|
172
|
+
return this.getJson(this.getUrl(['api', '-', 'search'], query));
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
return (0, util_1.rejectError)(err);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/** Returns a namespace and the extensions published in it. */
|
|
179
|
+
getNamespace(namespace) {
|
|
180
|
+
try {
|
|
181
|
+
return this.getJson(this.getUrl(['api', namespace]));
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
return (0, util_1.rejectError)(err);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
79
187
|
download(file, url) {
|
|
80
188
|
return new Promise((resolve, reject) => {
|
|
81
|
-
|
|
189
|
+
// Written beside the target and renamed into place on success, so the caller's path holds
|
|
190
|
+
// either what it held before or the whole download, never part of one. Deferring the open
|
|
191
|
+
// until the status is known is not enough on its own: a connection dropped mid-body has
|
|
192
|
+
// already truncated the file by then, and `get` is handed a path the user chose.
|
|
193
|
+
const partial = `${file}.part`;
|
|
194
|
+
let stream;
|
|
195
|
+
// Claimed synchronously, before the cleanup that has to happen before rejecting. A timeout
|
|
196
|
+
// mid-body drives both the request's error handler and pipeline's callback, and each used
|
|
197
|
+
// to wait on its own fs.rm - so whichever landed first decided what the caller was told,
|
|
198
|
+
// and the partial was removed twice.
|
|
199
|
+
let failed = false;
|
|
200
|
+
const fail = (err) => {
|
|
201
|
+
if (failed) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
failed = true;
|
|
205
|
+
stream?.destroy();
|
|
206
|
+
fs.rm(partial, { force: true }, () => reject(err));
|
|
207
|
+
};
|
|
82
208
|
const requestOptions = this.getRequestOptions();
|
|
83
209
|
const request = this.getProtocol(url)
|
|
84
210
|
.request(url, requestOptions, response => {
|
|
85
|
-
response.
|
|
86
|
-
|
|
87
|
-
|
|
211
|
+
if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode > 299)) {
|
|
212
|
+
response.resume();
|
|
213
|
+
reject((0, util_1.statusError)(response));
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
stream = fs.createWriteStream(partial);
|
|
217
|
+
// pipeline rather than response.pipe: pipe installs its own error handler on the
|
|
218
|
+
// source, so a connection dropped mid-body is swallowed - the write stream is never
|
|
219
|
+
// ended, nothing settles, and the caller waits for a file that will never arrive.
|
|
220
|
+
// pipeline propagates that error and tears both ends down. Its callback also waits
|
|
221
|
+
// for the file to close, which matters in its own right: a write stream opens and
|
|
222
|
+
// flushes asynchronously, so the last byte having arrived says nothing about the
|
|
223
|
+
// file being on disk.
|
|
224
|
+
(0, stream_1.pipeline)(response, stream, (err) => {
|
|
225
|
+
if (err) {
|
|
226
|
+
fail(err);
|
|
227
|
+
}
|
|
228
|
+
else if (!response.complete) {
|
|
229
|
+
// A body cut short still ends the stream cleanly; `complete` is what tells
|
|
230
|
+
// that apart from having received all of it.
|
|
231
|
+
fail(new Error(`The connection closed before the whole of ${(0, util_1.redactUrl)(url)} was received.`));
|
|
88
232
|
}
|
|
89
233
|
else {
|
|
90
|
-
resolve();
|
|
234
|
+
fs.rename(partial, file, renameErr => renameErr ? fail(renameErr) : resolve());
|
|
91
235
|
}
|
|
92
236
|
});
|
|
93
|
-
response.pipe(stream);
|
|
94
|
-
});
|
|
95
|
-
stream.on('error', (err) => {
|
|
96
|
-
request.abort();
|
|
97
|
-
reject(err);
|
|
98
|
-
});
|
|
99
|
-
request.on('error', (err) => {
|
|
100
|
-
stream.close();
|
|
101
|
-
reject(err);
|
|
102
237
|
});
|
|
238
|
+
request.on('error', (err) => fail(err));
|
|
239
|
+
this.failOnTimeout(request, url, fail);
|
|
103
240
|
request.end();
|
|
104
241
|
});
|
|
105
242
|
}
|
|
@@ -109,6 +246,7 @@ class Registry {
|
|
|
109
246
|
const request = this.getProtocol(url)
|
|
110
247
|
.request(url, requestOptions, this.getJsonResponse(resolve, reject));
|
|
111
248
|
request.on('error', reject);
|
|
249
|
+
this.failOnTimeout(request, url, reject);
|
|
112
250
|
request.end();
|
|
113
251
|
});
|
|
114
252
|
}
|
|
@@ -118,6 +256,7 @@ class Registry {
|
|
|
118
256
|
const request = this.getProtocol(url)
|
|
119
257
|
.request(url, requestOptions, this.getJsonResponse(resolve, reject));
|
|
120
258
|
request.on('error', reject);
|
|
259
|
+
this.failOnTimeout(request, url, reject);
|
|
121
260
|
request.write(content);
|
|
122
261
|
request.end();
|
|
123
262
|
});
|
|
@@ -129,13 +268,14 @@ class Registry {
|
|
|
129
268
|
const request = this.getProtocol(url)
|
|
130
269
|
.request(url, requestOptions, this.getJsonResponse(resolve, reject));
|
|
131
270
|
stream.on('error', (err) => {
|
|
132
|
-
request.
|
|
271
|
+
request.destroy();
|
|
133
272
|
reject(err);
|
|
134
273
|
});
|
|
135
274
|
request.on('error', (err) => {
|
|
136
275
|
stream.close();
|
|
137
276
|
reject(err);
|
|
138
277
|
});
|
|
278
|
+
this.failOnTimeout(request, url, reject);
|
|
139
279
|
stream.on('open', () => stream.pipe(request));
|
|
140
280
|
});
|
|
141
281
|
}
|
|
@@ -152,6 +292,27 @@ class Registry {
|
|
|
152
292
|
getProtocol(url) {
|
|
153
293
|
return url.protocol === 'https:' ? followRedirects.https : followRedirects.http;
|
|
154
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Node's `timeout` option only raises an event - the request stays open, which is why a server
|
|
297
|
+
* that accepts a connection and then says nothing used to hold a command open indefinitely.
|
|
298
|
+
* Destroying the request with an error routes through the error handling each caller already
|
|
299
|
+
* has, so a stalled request rejects the way any other failure does. With a timeout of zero the
|
|
300
|
+
* event never fires and this does nothing.
|
|
301
|
+
*/
|
|
302
|
+
// Typed on Writable because both http.ClientRequest and follow-redirects' wrapper are ones, and
|
|
303
|
+
// all this needs is the timeout event and destroy.
|
|
304
|
+
failOnTimeout(request, url, fail) {
|
|
305
|
+
request.on('timeout', () => {
|
|
306
|
+
// Reported before the request is torn down, rather than by destroying it with the error.
|
|
307
|
+
// Destroying raises errors of its own - ECONNRESET on the response, a premature close
|
|
308
|
+
// from pipeline - and node guarantees no order between those and the request's own. In
|
|
309
|
+
// practice the request's arrives first, so this is belt and braces rather than the thing
|
|
310
|
+
// that stops the wrong error being reported; that is the caller claiming the failure
|
|
311
|
+
// before it does any asynchronous cleanup.
|
|
312
|
+
fail(new Error(`No response from ${(0, util_1.redactUrl)(url)} for ${this.timeout} ms.`));
|
|
313
|
+
request.destroy();
|
|
314
|
+
});
|
|
315
|
+
}
|
|
155
316
|
getRequestOptions(method, headers, maxBodyLength) {
|
|
156
317
|
if (this.username && this.password) {
|
|
157
318
|
headers ?? (headers = {});
|
|
@@ -161,13 +322,19 @@ class Registry {
|
|
|
161
322
|
return {
|
|
162
323
|
method,
|
|
163
324
|
headers,
|
|
164
|
-
maxBodyLength
|
|
325
|
+
maxBodyLength,
|
|
326
|
+
timeout: this.timeout
|
|
165
327
|
};
|
|
166
328
|
}
|
|
167
329
|
getJsonResponse(resolve, reject) {
|
|
168
330
|
return response => {
|
|
169
331
|
response.setEncoding('utf-8');
|
|
170
332
|
let json = '';
|
|
333
|
+
// A connection lost after the headers have arrived ends the response without 'end' ever
|
|
334
|
+
// firing, so without this the promise is never settled and the command waits on a body
|
|
335
|
+
// that is not coming. The configured timeout would eventually rescue it, but rejecting
|
|
336
|
+
// here reports what actually happened instead of thirty seconds of silence.
|
|
337
|
+
response.on('error', reject);
|
|
171
338
|
response.on('data', chunk => json += chunk);
|
|
172
339
|
response.on('end', () => {
|
|
173
340
|
if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode > 299)) {
|
|
@@ -176,7 +343,8 @@ class Registry {
|
|
|
176
343
|
const parsed = JSON.parse(json);
|
|
177
344
|
const message = parsed.message || parsed.error;
|
|
178
345
|
if (message) {
|
|
179
|
-
|
|
346
|
+
// keep the status: the message alone cannot say whether retrying is worth it
|
|
347
|
+
reject((0, util_1.withStatus)(new Error(message), response.statusCode));
|
|
180
348
|
return;
|
|
181
349
|
}
|
|
182
350
|
}
|
package/lib/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;kFAQkF;;;AAGlF,yBAAyB;AACzB,oDAAoD;AAEpD,iCAAkD;AAErC,QAAA,WAAW,GAAG,sBAAsB,CAAC;AACrC,QAAA,sBAAsB,GAAG,IAAI,CAAC;AAC9B,QAAA,oBAAoB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAa,QAAQ;IAQjB,YAAY,UAA2B,EAAE;QACrC,IAAI,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC;YAClC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,WAAW,CAA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AC;oBAAC,OAAO,GAAG,EAAE,CAAC;wBACX,MAAM,CAAC,GAAG,CAAC,CAAC;oBAChB,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;IACN,CAAC;CAEJ;AA1XD,4BA0XC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
3
|
+
*
|
|
4
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
5
|
+
* information regarding copyright ownership.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
9
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*****************************************************************************/
|
|
13
|
+
import { RegistryOptions } from './registry-options';
|
|
14
|
+
export interface SearchOptions extends RegistryOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Text to search for. Omit to browse, which is what makes `--category` useful on its own.
|
|
17
|
+
*/
|
|
18
|
+
text?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Restrict results to a category, e.g. `Programming Languages`.
|
|
21
|
+
*/
|
|
22
|
+
category?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Restrict results to extensions published for a target platform.
|
|
25
|
+
*/
|
|
26
|
+
target?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Sort key: `relevance`, `timestamp`, `rating` or `downloadCount`.
|
|
29
|
+
*/
|
|
30
|
+
sortBy?: string;
|
|
31
|
+
/**
|
|
32
|
+
* `asc` or `desc`.
|
|
33
|
+
*/
|
|
34
|
+
sortOrder?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Number of results to return.
|
|
37
|
+
*/
|
|
38
|
+
size?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Index of the first result, for paging through a large result set.
|
|
41
|
+
*/
|
|
42
|
+
offset?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Print the raw results as JSON instead of a table.
|
|
45
|
+
*/
|
|
46
|
+
json?: boolean;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=search-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-options.d.ts","sourceRoot":"","sources":["../src/search-options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,eAAe;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/******************************************************************************
|
|
3
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
4
|
+
*
|
|
5
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
6
|
+
* information regarding copyright ownership.
|
|
7
|
+
*
|
|
8
|
+
* This program and the accompanying materials are made available under the
|
|
9
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
10
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
*
|
|
12
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
13
|
+
*****************************************************************************/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
//# sourceMappingURL=search-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-options.js","sourceRoot":"","sources":["../src/search-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E"}
|
package/lib/search.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
3
|
+
*
|
|
4
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
5
|
+
* information regarding copyright ownership.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
9
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*****************************************************************************/
|
|
13
|
+
import { SearchOptions } from './search-options';
|
|
14
|
+
/** Sort keys the registry accepts, for an up-front check with a better message than a 400. */
|
|
15
|
+
export declare const SORT_KEYS: string[];
|
|
16
|
+
export declare const SORT_ORDERS: string[];
|
|
17
|
+
export declare const DEFAULT_SEARCH_SIZE = 20;
|
|
18
|
+
/**
|
|
19
|
+
* Searches the registry for extensions.
|
|
20
|
+
*/
|
|
21
|
+
export declare function search(options: SearchOptions): Promise<void>;
|
|
22
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAG/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,8FAA8F;AAC9F,eAAO,MAAM,SAAS,UAAwD,CAAC;AAE/E,eAAO,MAAM,WAAW,UAAkB,CAAC;AAE3C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAKtC;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BlE"}
|
package/lib/search.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/******************************************************************************
|
|
3
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
4
|
+
*
|
|
5
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
6
|
+
* information regarding copyright ownership.
|
|
7
|
+
*
|
|
8
|
+
* This program and the accompanying materials are made available under the
|
|
9
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
10
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
*
|
|
12
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
13
|
+
*****************************************************************************/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DEFAULT_SEARCH_SIZE = exports.SORT_ORDERS = exports.SORT_KEYS = void 0;
|
|
16
|
+
exports.search = search;
|
|
17
|
+
const registry_1 = require("./registry");
|
|
18
|
+
const table_1 = require("./table");
|
|
19
|
+
const util_1 = require("./util");
|
|
20
|
+
/** Sort keys the registry accepts, for an up-front check with a better message than a 400. */
|
|
21
|
+
exports.SORT_KEYS = ['relevance', 'timestamp', 'rating', 'downloadCount'];
|
|
22
|
+
exports.SORT_ORDERS = ['asc', 'desc'];
|
|
23
|
+
exports.DEFAULT_SEARCH_SIZE = 20;
|
|
24
|
+
/** Keeps a row from wrapping on a normal terminal, where the other columns take about half of it. */
|
|
25
|
+
const DESCRIPTION_WIDTH = 60;
|
|
26
|
+
/**
|
|
27
|
+
* Searches the registry for extensions.
|
|
28
|
+
*/
|
|
29
|
+
async function search(options) {
|
|
30
|
+
(0, util_1.addEnvOptions)(options);
|
|
31
|
+
if (options.sortBy && !exports.SORT_KEYS.includes(options.sortBy)) {
|
|
32
|
+
throw new Error(`Sort key must be one of ${exports.SORT_KEYS.join(', ')}.`);
|
|
33
|
+
}
|
|
34
|
+
if (options.sortOrder && !exports.SORT_ORDERS.includes(options.sortOrder)) {
|
|
35
|
+
throw new Error(`Sort order must be one of ${exports.SORT_ORDERS.join(', ')}.`);
|
|
36
|
+
}
|
|
37
|
+
const size = options.size ?? exports.DEFAULT_SEARCH_SIZE;
|
|
38
|
+
const offset = options.offset ?? 0;
|
|
39
|
+
const registry = new registry_1.Registry(options);
|
|
40
|
+
const result = await registry.search({
|
|
41
|
+
query: options.text,
|
|
42
|
+
category: options.category,
|
|
43
|
+
targetPlatform: options.target,
|
|
44
|
+
sortBy: options.sortBy,
|
|
45
|
+
sortOrder: options.sortOrder,
|
|
46
|
+
size,
|
|
47
|
+
offset
|
|
48
|
+
});
|
|
49
|
+
if (result.error) {
|
|
50
|
+
throw new Error(result.error);
|
|
51
|
+
}
|
|
52
|
+
if (options.json) {
|
|
53
|
+
console.log(JSON.stringify(result, null, 4));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
printResults(result.extensions ?? [], result.totalSize, offset);
|
|
57
|
+
}
|
|
58
|
+
function printResults(entries, totalSize, offset) {
|
|
59
|
+
if (entries.length === 0) {
|
|
60
|
+
console.log('No extensions found.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const rows = entries.map(entry => [
|
|
64
|
+
`${entry.namespace}.${entry.name}`,
|
|
65
|
+
entry.version,
|
|
66
|
+
(0, table_1.formatNumber)(entry.downloadCount),
|
|
67
|
+
entry.averageRating !== undefined ? entry.averageRating.toFixed(1) : '-',
|
|
68
|
+
describe(entry)
|
|
69
|
+
]);
|
|
70
|
+
(0, table_1.printRows)([['Extension', 'Version', 'Downloads', 'Rating', 'Description'], ...rows]);
|
|
71
|
+
const last = offset + entries.length;
|
|
72
|
+
console.log();
|
|
73
|
+
console.log(`Showing ${offset + 1}-${last} of ${(0, table_1.formatNumber)(totalSize)}.`);
|
|
74
|
+
if (last < totalSize) {
|
|
75
|
+
console.log(`Pass --offset ${last} for the next page.`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The description, prefixed with anything a reader should weigh before installing. Deprecation is
|
|
80
|
+
* the one flag worth spending row width on here; `show` reports the rest.
|
|
81
|
+
*/
|
|
82
|
+
function describe(entry) {
|
|
83
|
+
const description = (0, table_1.truncate)(entry.description ?? '', DESCRIPTION_WIDTH);
|
|
84
|
+
return entry.deprecated ? `(deprecated) ${description}`.trimEnd() : description;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E;;;AAoB/E,wBA+BC;AAjDD,yCAAmD;AAEnD,mCAA4D;AAC5D,iCAAuC;AAEvC,8FAA8F;AACjF,QAAA,SAAS,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AAElE,QAAA,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAE9B,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,qGAAqG;AACrG,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;GAEG;AACI,KAAK,UAAU,MAAM,CAAC,OAAsB;IAC/C,IAAA,oBAAa,EAAC,OAAO,CAAC,CAAC;IACvB,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,iBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,2BAA2B,iBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,OAAO,CAAC,SAAS,IAAI,CAAC,mBAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,6BAA6B,mBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5E,CAAC;IAED,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AAC;QACjC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,QAAQ,CAAC,KAAK,CAAC;KAClB,CAAC,CAAC;IACH,IAAA,iBAAS,EAAC,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAErF,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,WAAW,MAAM,GAAG,CAAC,IAAI,IAAI,OAAO,IAAA,oBAAY,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC5E,IAAI,IAAI,GAAG,SAAS,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,qBAAqB,CAAC,CAAC;IAC5D,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAS,QAAQ,CAAC,KAAkB;IAChC,MAAM,WAAW,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,WAAW,IAAI,EAAE,EAAE,iBAAiB,CAAC,CAAC;IACzE,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
3
|
+
*
|
|
4
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
5
|
+
* information regarding copyright ownership.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
9
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*****************************************************************************/
|
|
13
|
+
import { RegistryOptions } from './registry-options';
|
|
14
|
+
export interface ShowOptions extends RegistryOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Identifier in the form `namespace.extension` or `namespace/extension`, optionally suffixed
|
|
17
|
+
* with `@<version>` - an exact version, or one of the `latest` / `pre-release` aliases.
|
|
18
|
+
*/
|
|
19
|
+
extensionId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Target platform to report on. Defaults to whichever the registry considers current.
|
|
22
|
+
*/
|
|
23
|
+
target?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Print the raw metadata as JSON instead of a readable summary.
|
|
26
|
+
*/
|
|
27
|
+
json?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* List every published version rather than the most recent few.
|
|
30
|
+
*/
|
|
31
|
+
allVersions?: boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=show-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-options.d.ts","sourceRoot":"","sources":["../src/show-options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,WAAY,SAAQ,eAAe;IAChD;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/******************************************************************************
|
|
3
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
4
|
+
*
|
|
5
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
6
|
+
* information regarding copyright ownership.
|
|
7
|
+
*
|
|
8
|
+
* This program and the accompanying materials are made available under the
|
|
9
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
10
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
*
|
|
12
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
13
|
+
*****************************************************************************/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
//# sourceMappingURL=show-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-options.js","sourceRoot":"","sources":["../src/show-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E"}
|
package/lib/show.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
|
|
3
|
+
*
|
|
4
|
+
* See the NOTICE file(s) distributed with this work for additional
|
|
5
|
+
* information regarding copyright ownership.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License 2.0 which is available at
|
|
9
|
+
* https://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*****************************************************************************/
|
|
13
|
+
import { ShowOptions } from './show-options';
|
|
14
|
+
/**
|
|
15
|
+
* Prints an extension's metadata.
|
|
16
|
+
*/
|
|
17
|
+
export declare function show(options: ShowOptions): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../src/show.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAK/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA4B7C;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9D"}
|