ovsx 1.1.1 → 1.3.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 +73 -1
- package/lib/check-license.d.ts.map +1 -1
- package/lib/check-license.js +3 -2
- package/lib/check-license.js.map +1 -1
- package/lib/get.js +6 -6
- package/lib/get.js.map +1 -1
- package/lib/http.d.ts +32 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +170 -0
- package/lib/http.js.map +1 -0
- 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 +111 -32
- 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 +59 -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 +150 -13
- 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 +161 -5
- package/lib/registry.d.ts.map +1 -1
- package/lib/registry.js +259 -100
- 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 +51 -9
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +130 -67
- 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/zip.d.ts +10 -0
- package/lib/zip.d.ts.map +1 -1
- package/lib/zip.js +33 -10
- package/lib/zip.js.map +1 -1
- package/package.json +21 -14
- package/src/check-license.ts +4 -3
- package/src/get.ts +7 -7
- package/src/http.ts +176 -0
- package/src/index.ts +4 -0
- package/src/list-options.ts +25 -0
- package/src/list.ts +48 -0
- package/src/main.ts +125 -34
- package/src/oidc.ts +65 -0
- package/src/publish-options.ts +8 -1
- package/src/publish.ts +208 -14
- package/src/registry-options.ts +8 -0
- package/src/registry.ts +379 -98
- 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 +138 -70
- 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/zip.ts +33 -13
- package/lib/version.d.ts +0 -2
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js +0 -5
- package/lib/version.js.map +0 -1
- package/src/version.ts +0 -1
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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qB,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"}
|
package/lib/show.js
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
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.show = show;
|
|
16
|
+
const semver = require("semver");
|
|
17
|
+
const registry_1 = require("./registry");
|
|
18
|
+
const table_1 = require("./table");
|
|
19
|
+
const util_1 = require("./util");
|
|
20
|
+
/**
|
|
21
|
+
* How many versions the history table prints unless `--all-versions` is given. Matches what
|
|
22
|
+
* `vsce show` lists; the remainder is reported as a count rather than dropped silently.
|
|
23
|
+
*/
|
|
24
|
+
const VERSION_HISTORY_SIZE = 6;
|
|
25
|
+
/**
|
|
26
|
+
* Tags starting with `__` are internal bookkeeping (e.g. `__web_extension`) rather than anything
|
|
27
|
+
* the publisher wrote, and the web UI hides them too.
|
|
28
|
+
*/
|
|
29
|
+
const INTERNAL_TAG_PREFIX = '__';
|
|
30
|
+
/**
|
|
31
|
+
* Page size for the version-reference listing. Versions come back newest first, and each version
|
|
32
|
+
* contributes one entry per target platform, so a page has to be comfortably larger than the
|
|
33
|
+
* number of versions shown for the default table to be filled from a single request.
|
|
34
|
+
*/
|
|
35
|
+
const VERSION_PAGE_SIZE = 100;
|
|
36
|
+
/**
|
|
37
|
+
* Prints an extension's metadata.
|
|
38
|
+
*/
|
|
39
|
+
async function show(options) {
|
|
40
|
+
(0, util_1.addEnvOptions)(options);
|
|
41
|
+
const { id, version } = splitVersion(options.extensionId);
|
|
42
|
+
const match = (0, util_1.matchExtensionId)(id);
|
|
43
|
+
if (!match) {
|
|
44
|
+
throw new Error('The extension identifier must have the form `namespace.extension` or `namespace/extension`.');
|
|
45
|
+
}
|
|
46
|
+
const [, namespace, name] = match;
|
|
47
|
+
const registry = new registry_1.Registry(options);
|
|
48
|
+
const extension = await registry.getMetadata(namespace, name, options.target, version);
|
|
49
|
+
if (extension.error) {
|
|
50
|
+
throw new Error(extension.error);
|
|
51
|
+
}
|
|
52
|
+
if (options.json) {
|
|
53
|
+
console.log(JSON.stringify(extension, null, 4));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const allVersions = options.allVersions === true;
|
|
57
|
+
const versions = await getVersions(registry, namespace, name, options.target, allVersions);
|
|
58
|
+
printSummary(extension, versions, allVersions);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Splits a trailing `@<version>` off the identifier, the way `vsce show` accepts it. Only the last
|
|
62
|
+
* `@` is considered, so it stays out of the way of the identifier itself.
|
|
63
|
+
*
|
|
64
|
+
* An `@` with nothing after it is rejected rather than read as "no version given". It usually means a
|
|
65
|
+
* shell variable that did not expand - `ovsx show redhat.java@$VERSION` with `VERSION` unset - and
|
|
66
|
+
* reporting the latest version for that would answer a question the caller did not ask.
|
|
67
|
+
*/
|
|
68
|
+
function splitVersion(extensionId) {
|
|
69
|
+
const at = extensionId.lastIndexOf('@');
|
|
70
|
+
if (at <= 0) {
|
|
71
|
+
return { id: extensionId };
|
|
72
|
+
}
|
|
73
|
+
const version = extensionId.substring(at + 1);
|
|
74
|
+
if (version.length === 0) {
|
|
75
|
+
throw new Error('A version must follow `@`, as in `namespace.extension@1.2.3`.');
|
|
76
|
+
}
|
|
77
|
+
return { id: extensionId.substring(0, at), version };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Collects the version history, collapsing the one-entry-per-target-platform rows the registry
|
|
81
|
+
* returns into a single row per version. Fetches one page unless every version is wanted, in which
|
|
82
|
+
* case it pages to the end - `totalSize` counts version/target-platform pairs, not versions, so
|
|
83
|
+
* paging has to run on what has actually been returned rather than on a version count.
|
|
84
|
+
*
|
|
85
|
+
* Best-effort: a registry that doesn't serve this endpoint still gets everything else, just
|
|
86
|
+
* without the history table.
|
|
87
|
+
*/
|
|
88
|
+
async function getVersions(registry, namespace, name, target, allVersions) {
|
|
89
|
+
const references = [];
|
|
90
|
+
let offset = 0;
|
|
91
|
+
try {
|
|
92
|
+
for (;;) {
|
|
93
|
+
const page = await registry.getVersionReferences(namespace, name, target, VERSION_PAGE_SIZE, offset);
|
|
94
|
+
if (page.error) {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
const versions = page.versions ?? [];
|
|
98
|
+
references.push(...versions);
|
|
99
|
+
offset += versions.length;
|
|
100
|
+
if (!allVersions || versions.length === 0 || offset >= page.totalSize) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
const byVersion = new Map();
|
|
109
|
+
for (const reference of references) {
|
|
110
|
+
let summary = byVersion.get(reference.version);
|
|
111
|
+
if (!summary) {
|
|
112
|
+
summary = { version: reference.version, targetPlatforms: [] };
|
|
113
|
+
byVersion.set(reference.version, summary);
|
|
114
|
+
}
|
|
115
|
+
if (reference.targetPlatform && !summary.targetPlatforms.includes(reference.targetPlatform)) {
|
|
116
|
+
summary.targetPlatforms.push(reference.targetPlatform);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return [...byVersion.values()].sort(byNewestFirst);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Newest version first. Anything that isn't valid semver (the registry accepts such versions from
|
|
123
|
+
* a mirror) sorts after everything that is, rather than being compared incomparably.
|
|
124
|
+
*
|
|
125
|
+
* Deliberately `valid` and not `coerce`: coerce drops prerelease identifiers, so `1.2.0-alpha.1`
|
|
126
|
+
* and `1.2.0` would compare equal and order unstably, and it accepts inputs semver itself rejects
|
|
127
|
+
* (`v1.2` becomes `1.2.0`), which would defeat the fallback below.
|
|
128
|
+
*/
|
|
129
|
+
function byNewestFirst(a, b) {
|
|
130
|
+
const left = semver.valid(a.version);
|
|
131
|
+
const right = semver.valid(b.version);
|
|
132
|
+
if (left && right) {
|
|
133
|
+
return semver.rcompare(left, right);
|
|
134
|
+
}
|
|
135
|
+
if (left) {
|
|
136
|
+
return -1;
|
|
137
|
+
}
|
|
138
|
+
if (right) {
|
|
139
|
+
return 1;
|
|
140
|
+
}
|
|
141
|
+
return b.version.localeCompare(a.version);
|
|
142
|
+
}
|
|
143
|
+
function printSummary(extension, versions, allVersions) {
|
|
144
|
+
const publisher = extension.namespaceDisplayName || extension.namespace;
|
|
145
|
+
console.log(extension.displayName || extension.name);
|
|
146
|
+
console.log(` ${publisher}${extension.verified ? ' (verified publisher)' : ''}`);
|
|
147
|
+
console.log(` ${(0, table_1.formatCount)(extension.downloadCount, 'download')} ${formatRating(extension)}`);
|
|
148
|
+
if (extension.description) {
|
|
149
|
+
console.log();
|
|
150
|
+
console.log(` ${extension.description}`);
|
|
151
|
+
}
|
|
152
|
+
printNotices(extension);
|
|
153
|
+
printVersionHistory(versions, allVersions);
|
|
154
|
+
printList('Categories', extension.categories);
|
|
155
|
+
printList('Tags', extension.tags?.filter(tag => !tag.startsWith(INTERNAL_TAG_PREFIX)));
|
|
156
|
+
printTable('More Info', moreInfo(extension));
|
|
157
|
+
printTable('Registry', registryInfo(extension));
|
|
158
|
+
printTable('Statistics', statistics(extension));
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Anything a consumer of this extension should see before its metadata: deprecation first, since
|
|
162
|
+
* it changes whether they should install it at all.
|
|
163
|
+
*/
|
|
164
|
+
function printNotices(extension) {
|
|
165
|
+
const notices = [];
|
|
166
|
+
if (extension.deprecated) {
|
|
167
|
+
const replacement = extension.replacement;
|
|
168
|
+
notices.push(replacement
|
|
169
|
+
? `Deprecated - superseded by ${replacement.displayName ?? replacement.url}`
|
|
170
|
+
: 'Deprecated');
|
|
171
|
+
}
|
|
172
|
+
if (extension.downloadable === false) {
|
|
173
|
+
notices.push('Not downloadable from this registry');
|
|
174
|
+
}
|
|
175
|
+
if (extension.preview) {
|
|
176
|
+
notices.push('Preview');
|
|
177
|
+
}
|
|
178
|
+
if (extension.namespaceOwnershipConflict) {
|
|
179
|
+
notices.push('The namespace ownership of this extension is disputed');
|
|
180
|
+
}
|
|
181
|
+
if (notices.length > 0) {
|
|
182
|
+
console.log();
|
|
183
|
+
for (const notice of notices) {
|
|
184
|
+
console.log(` ! ${notice}`);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function printVersionHistory(versions, allVersions) {
|
|
189
|
+
if (versions.length === 0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const shown = allVersions ? versions : versions.slice(0, VERSION_HISTORY_SIZE);
|
|
193
|
+
const rows = shown.map(v => [v.version, v.targetPlatforms.join(', ')]);
|
|
194
|
+
console.log();
|
|
195
|
+
console.log('Version History:');
|
|
196
|
+
(0, table_1.printRows)([['Version', 'Target Platforms'], ...rows]);
|
|
197
|
+
const remaining = versions.length - shown.length;
|
|
198
|
+
if (remaining > 0) {
|
|
199
|
+
console.log(` ... and ${remaining} more (pass --all-versions to list them)`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function moreInfo(extension) {
|
|
203
|
+
const rows = [
|
|
204
|
+
['Unique Identifier', `${extension.namespace}.${extension.name}`],
|
|
205
|
+
['Version', extension.version]
|
|
206
|
+
];
|
|
207
|
+
if (extension.versionAlias?.length > 0) {
|
|
208
|
+
rows.push(['Version Aliases', extension.versionAlias.join(', ')]);
|
|
209
|
+
}
|
|
210
|
+
if (extension.targetPlatform) {
|
|
211
|
+
rows.push(['Target Platform', extension.targetPlatform]);
|
|
212
|
+
}
|
|
213
|
+
rows.push(['Last Updated', extension.timestamp]);
|
|
214
|
+
rows.push(['Published By', extension.publishedBy?.loginName ?? '']);
|
|
215
|
+
addIfPresent(rows, 'License', extension.license);
|
|
216
|
+
addIfPresent(rows, 'Homepage', extension.homepage);
|
|
217
|
+
addIfPresent(rows, 'Repository', extension.repository);
|
|
218
|
+
addIfPresent(rows, 'Bugs', extension.bugs);
|
|
219
|
+
addIfPresent(rows, 'Q&A', extension.qna);
|
|
220
|
+
addIfPresent(rows, 'Sponsor', extension.sponsorLink);
|
|
221
|
+
if (extension.engines) {
|
|
222
|
+
rows.push(['Engines', Object.entries(extension.engines).map(([e, v]) => `${e} ${v}`).join(', ')]);
|
|
223
|
+
}
|
|
224
|
+
return rows;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The parts an Open VSX compatible registry reports that the Marketplace has no equivalent for.
|
|
228
|
+
* Kept in its own block rather than mixed into "More Info" so it's obvious what is registry
|
|
229
|
+
* specific, and omitted entirely when none of it applies.
|
|
230
|
+
*/
|
|
231
|
+
function registryInfo(extension) {
|
|
232
|
+
const rows = [];
|
|
233
|
+
if (extension.verified !== undefined) {
|
|
234
|
+
rows.push(['Verified Publisher', yesNo(extension.verified)]);
|
|
235
|
+
}
|
|
236
|
+
if (extension.publishedWithTrustedPublishing) {
|
|
237
|
+
rows.push(['Trusted Publishing', 'yes']);
|
|
238
|
+
}
|
|
239
|
+
if (extension.preRelease !== undefined) {
|
|
240
|
+
rows.push(['Pre-Release', yesNo(extension.preRelease)]);
|
|
241
|
+
}
|
|
242
|
+
addIfPresent(rows, 'Extension Kind', extension.extensionKind?.join(', '));
|
|
243
|
+
addIfPresent(rows, 'Localized', extension.localizedLanguages?.join(', '));
|
|
244
|
+
addIfPresent(rows, 'Dependencies', extension.dependencies?.map(referenceId).join(', '));
|
|
245
|
+
addIfPresent(rows, 'Bundled Extensions', extension.bundledExtensions?.map(referenceId).join(', '));
|
|
246
|
+
return rows;
|
|
247
|
+
}
|
|
248
|
+
function statistics(extension) {
|
|
249
|
+
const rows = [['Downloads', (0, table_1.formatNumber)(extension.downloadCount)]];
|
|
250
|
+
if (extension.averageRating !== undefined) {
|
|
251
|
+
rows.push(['Average Rating', `${extension.averageRating.toFixed(1)}/5`]);
|
|
252
|
+
}
|
|
253
|
+
rows.push(['Reviews', (0, table_1.formatNumber)(Number(extension.reviewCount ?? 0))]);
|
|
254
|
+
return rows;
|
|
255
|
+
}
|
|
256
|
+
function referenceId(reference) {
|
|
257
|
+
return `${reference.namespace}.${reference.extension}`;
|
|
258
|
+
}
|
|
259
|
+
function addIfPresent(rows, label, value) {
|
|
260
|
+
if (value) {
|
|
261
|
+
rows.push([label, value]);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function printList(title, values) {
|
|
265
|
+
if (!values || values.length === 0) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
console.log();
|
|
269
|
+
console.log(`${title}:`);
|
|
270
|
+
console.log(` ${values.join(', ')}`);
|
|
271
|
+
}
|
|
272
|
+
function printTable(title, rows) {
|
|
273
|
+
if (rows.length === 0) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
console.log();
|
|
277
|
+
console.log(`${title}:`);
|
|
278
|
+
(0, table_1.printRows)(rows);
|
|
279
|
+
}
|
|
280
|
+
function formatRating(extension) {
|
|
281
|
+
if (extension.averageRating === undefined) {
|
|
282
|
+
return 'no ratings';
|
|
283
|
+
}
|
|
284
|
+
return `${extension.averageRating.toFixed(1)}/5 from ${(0, table_1.formatCount)(extension.reviewCount, 'review')}`;
|
|
285
|
+
}
|
|
286
|
+
function yesNo(value) {
|
|
287
|
+
return value ? 'yes' : 'no';
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=show.js.map
|
package/lib/show.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../src/show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E;;AAoC/E,oBAuBC;AAzDD,iCAAiC;AACjC,yCAAmE;AACnE,mCAA+D;AAE/D,iCAAyD;AAEzD;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B;;;GAGG;AACH,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAQjC;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B;;GAEG;AACI,KAAK,UAAU,IAAI,CAAC,OAAoB;IAC3C,IAAA,oBAAa,EAAC,OAAO,CAAC,CAAC;IACvB,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAA,uBAAgB,EAAC,EAAE,CAAC,CAAC;IACnC,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAC;IACnH,CAAC;IAED,MAAM,CAAC,EAAE,SAAS,E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,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,IAAgB;IAC/C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO;IACX,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IACzB,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;AACpB,CAAC;AAED,SAAS,YAAY,CAAC,SAAoB;IACtC,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,OAAO,GAAG,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,IAAA,mBAAW,EAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;AAC1G,CAAC;AAED,SAAS,KAAK,CAAC,KAAc;IACzB,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAChC,CAAC"}
|
package/lib/table.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
14
|
+
* Prints rows as an aligned table, indented by two spaces. Every column but the last is padded,
|
|
15
|
+
* so a trailing empty cell doesn't leave ragged whitespace behind.
|
|
16
|
+
*/
|
|
17
|
+
export declare function printRows(rows: string[][]): void;
|
|
18
|
+
/** Formats a count with thousands separators, and the noun pluralised to match. */
|
|
19
|
+
export declare function formatCount(count: number | undefined, noun: string): string;
|
|
20
|
+
export declare function formatNumber(value: number | undefined): string;
|
|
21
|
+
/**
|
|
22
|
+
* Shortens `text` to at most `max` characters, marking that it was cut. A `max` of zero or less
|
|
23
|
+
* leaves no room for the marker either, so it yields nothing rather than an ellipsis wider than the
|
|
24
|
+
* budget it was given.
|
|
25
|
+
*/
|
|
26
|
+
export declare function truncate(text: string, max: number): string;
|
|
27
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAE/E;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAYhD;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAM1D"}
|
package/lib/table.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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.printRows = printRows;
|
|
16
|
+
exports.formatCount = formatCount;
|
|
17
|
+
exports.formatNumber = formatNumber;
|
|
18
|
+
exports.truncate = truncate;
|
|
19
|
+
/**
|
|
20
|
+
* Prints rows as an aligned table, indented by two spaces. Every column but the last is padded,
|
|
21
|
+
* so a trailing empty cell doesn't leave ragged whitespace behind.
|
|
22
|
+
*/
|
|
23
|
+
function printRows(rows) {
|
|
24
|
+
const widths = [];
|
|
25
|
+
for (const row of rows) {
|
|
26
|
+
row.forEach((cell, i) => widths[i] = Math.max(widths[i] ?? 0, cell.length));
|
|
27
|
+
}
|
|
28
|
+
for (const row of rows) {
|
|
29
|
+
const line = row
|
|
30
|
+
.map((cell, i) => (i === row.length - 1 ? cell : cell.padEnd(widths[i])))
|
|
31
|
+
.join(' ')
|
|
32
|
+
.trimEnd();
|
|
33
|
+
console.log(` ${line}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Formats a count with thousands separators, and the noun pluralised to match. */
|
|
37
|
+
function formatCount(count, noun) {
|
|
38
|
+
const value = count ?? 0;
|
|
39
|
+
return `${formatNumber(value)} ${value === 1 ? noun : noun + 's'}`;
|
|
40
|
+
}
|
|
41
|
+
function formatNumber(value) {
|
|
42
|
+
return (value ?? 0).toLocaleString('en-US');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Shortens `text` to at most `max` characters, marking that it was cut. A `max` of zero or less
|
|
46
|
+
* leaves no room for the marker either, so it yields nothing rather than an ellipsis wider than the
|
|
47
|
+
* budget it was given.
|
|
48
|
+
*/
|
|
49
|
+
function truncate(text, max) {
|
|
50
|
+
if (max <= 0) {
|
|
51
|
+
return '';
|
|
52
|
+
}
|
|
53
|
+
const collapsed = text.replace(/\s+/g, ' ').trim();
|
|
54
|
+
return collapsed.length <= max ? collapsed : `${collapsed.substring(0, max - 1)}…`;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=table.js.map
|
package/lib/table.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E;;AAM/E,8BAYC;AAGD,kCAGC;AAED,oCAEC;AAOD,4BAMC;AAvCD;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAgB;IACtC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,GAAG;aACX,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACxE,IAAI,CAAC,IAAI,CAAC;aACV,OAAO,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC;AAED,mFAAmF;AACnF,SAAgB,WAAW,CAAC,KAAyB,EAAE,IAAY;IAC/D,MAAM,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;IACzB,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,EAAE,CAAC;AACvE,CAAC;AAED,SAAgB,YAAY,CAAC,KAAyB;IAClD,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,GAAW;IAC9C,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACd,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACnD,OAAO,SAAS,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
export interface TrustedPublishingOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Obtain a short-lived publishing token by exchanging an OIDC ID token. If unset, trusted
|
|
16
|
+
* publishing is used whenever an ID token source is detected and no access token is available.
|
|
17
|
+
*/
|
|
18
|
+
trustedPublishing?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The OIDC ID token to exchange. Only needed for CI systems that expose the token directly,
|
|
21
|
+
* such as GitLab CI; on GitHub Actions the token is requested from the workflow runtime.
|
|
22
|
+
*/
|
|
23
|
+
idToken?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The audience to request for the OIDC ID token. Defaults to the registry URL and must match
|
|
26
|
+
* the audience the registry expects.
|
|
27
|
+
*/
|
|
28
|
+
oidcAudience?: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=trusted-publishing-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-publishing-options.d.ts","sourceRoot":"","sources":["../src/trusted-publishing-options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;+EAW+E;AAE/E,MAAM,WAAW,wBAAwB;IACrC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,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=trusted-publishing-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-publishing-options.js","sourceRoot":"","sources":["../src/trusted-publishing-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;+EAW+E"}
|