UNPKG

2.17 kBTypeScriptView Raw
1import { IPublishOptions as _IPublishOptions } from './publish';
2import { IPackageOptions } from './package';
3export type { IPackageOptions } from './package';
4/**
5 * @deprecated prefer IPackageOptions instead
6 */
7export declare type IBaseVSIXOptions = Pick<IPackageOptions, 'baseContentUrl' | 'baseImagesUrl' | 'githubBranch' | 'gitlabBranch' | 'useYarn' | 'target' | 'preRelease'>;
8/**
9 * @deprecated prefer IPackageOptions instead
10 */
11export declare type ICreateVSIXOptions = Pick<IPackageOptions, 'cwd' | 'packagePath'> & IBaseVSIXOptions;
12/**
13 * The supported list of package managers.
14 */
15export declare enum PackageManager {
16 Npm = 0,
17 Yarn = 1,
18 None = 2
19}
20export interface IListFilesOptions {
21 /**
22 * The working directory of the extension. Defaults to `process.cwd()`.
23 */
24 cwd?: string;
25 /**
26 * The package manager to use. Defaults to `PackageManager.Npm`.
27 */
28 packageManager?: PackageManager;
29 /**
30 * A subset of the top level dependencies which should be included. The
31 * default is `undefined` which include all dependencies, an empty array means
32 * no dependencies will be included.
33 */
34 packagedDependencies?: string[];
35 /**
36 * The location of an alternative .vscodeignore file to be used.
37 * The `.vscodeignore` file located at the root of the project will be taken
38 * instead, if none is specified.
39 */
40 ignoreFile?: string;
41}
42export declare type IPublishVSIXOptions = IPublishOptions & Pick<IPackageOptions, 'target'>;
43export declare type IPublishOptions = _IPublishOptions;
44/**
45 * Creates a VSIX from the extension in the current working directory.
46 */
47export declare function createVSIX(options?: IPackageOptions): Promise<any>;
48/**
49 * Publishes the extension in the current working directory.
50 */
51export declare function publish(options?: IPublishOptions): Promise<any>;
52/**
53 * Lists the files included in the extension's package.
54 */
55export declare function listFiles(options?: IListFilesOptions): Promise<string[]>;
56/**
57 * Publishes a pre-build VSIX.
58 */
59export declare function publishVSIX(packagePath: string | string[], options?: IPublishVSIXOptions): Promise<any>;