UNPKG

1.59 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.publishVSIX = exports.listFiles = exports.publish = exports.createVSIX = exports.PackageManager = void 0;
4const publish_1 = require("./publish");
5const package_1 = require("./package");
6/**
7 * The supported list of package managers.
8 */
9var PackageManager;
10(function (PackageManager) {
11 PackageManager[PackageManager["Npm"] = 0] = "Npm";
12 PackageManager[PackageManager["Yarn"] = 1] = "Yarn";
13 PackageManager[PackageManager["None"] = 2] = "None";
14})(PackageManager = exports.PackageManager || (exports.PackageManager = {}));
15/**
16 * Creates a VSIX from the extension in the current working directory.
17 */
18function createVSIX(options = {}) {
19 return (0, package_1.packageCommand)(options);
20}
21exports.createVSIX = createVSIX;
22/**
23 * Publishes the extension in the current working directory.
24 */
25function publish(options = {}) {
26 return (0, publish_1.publish)(options);
27}
28exports.publish = publish;
29/**
30 * Lists the files included in the extension's package.
31 */
32function listFiles(options = {}) {
33 return (0, package_1.listFiles)(options);
34}
35exports.listFiles = listFiles;
36/**
37 * Publishes a pre-build VSIX.
38 */
39function publishVSIX(packagePath, options = {}) {
40 return (0, publish_1.publish)({
41 packagePath: typeof packagePath === 'string' ? [packagePath] : packagePath,
42 ...options,
43 targets: typeof options.target === 'string' ? [options.target] : undefined,
44 ...{ target: undefined },
45 });
46}
47exports.publishVSIX = publishVSIX;
48//# sourceMappingURL=api.js.map
\No newline at end of file