Skip to content

Commit df8a6a1

Browse files
committed
fix: expose githubBranch via API
Fixes #591
1 parent e3e5334 commit df8a6a1

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

Diff for: src/api.ts

+28-29
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,51 @@
11
import { publish as _publish } from './publish';
22
import { packageCommand, listFiles as _listFiles } from './package';
33

4-
export interface ICreateVSIXOptions {
4+
export interface IVSIXOptions {
55
/**
6-
* The location of the extension in the file system.
7-
*
8-
* Defaults to `process.cwd()`.
6+
* The base URL for links detected in Markdown files.
97
*/
10-
cwd?: string;
8+
baseContentUrl?: string;
119

1210
/**
13-
* The destination of the packaged the VSIX.
14-
*
15-
* Defaults to `NAME-VERSION.vsix`.
11+
* The base URL for images detected in Markdown files.
1612
*/
17-
packagePath?: string;
13+
baseImagesUrl?: string;
1814

1915
/**
20-
* The base URL for links detected in Markdown files.
16+
* Github branch used to publish the package. Used to automatically infer
17+
* the base content and images URI.
2118
*/
22-
baseContentUrl?: string;
19+
githubBranch?: string;
2320

2421
/**
25-
* The base URL for images detected in Markdown files.
22+
* Gitlab branch used to publish the package. Used to automatically infer
23+
* the base content and images URI.
2624
*/
27-
baseImagesUrl?: string;
25+
gitlabBranch?: string;
2826

2927
/**
3028
* Should use Yarn instead of NPM.
3129
*/
3230
useYarn?: boolean;
3331
}
3432

33+
export interface ICreateVSIXOptions extends IVSIXOptions {
34+
/**
35+
* The location of the extension in the file system.
36+
*
37+
* Defaults to `process.cwd()`.
38+
*/
39+
cwd?: string;
40+
41+
/**
42+
* The destination of the packaged the VSIX.
43+
*
44+
* Defaults to `NAME-VERSION.vsix`.
45+
*/
46+
packagePath?: string;
47+
}
48+
3549
export interface IPublishOptions {
3650
/**
3751
* The location of the extension in the file system.
@@ -97,28 +111,13 @@ export interface IListFilesOptions {
97111
ignoreFile?: string;
98112
}
99113

100-
export interface IPublishVSIXOptions {
114+
export interface IPublishVSIXOptions extends IVSIXOptions {
101115
/**
102116
* The Personal Access Token to use.
103117
*
104118
* Defaults to the stored one.
105119
*/
106120
pat?: string;
107-
108-
/**
109-
* The base URL for links detected in Markdown files.
110-
*/
111-
baseContentUrl?: string;
112-
113-
/**
114-
* The base URL for images detected in Markdown files.
115-
*/
116-
baseImagesUrl?: string;
117-
118-
/**
119-
* Should use Yarn instead of NPM.
120-
*/
121-
useYarn?: boolean;
122121
}
123122

124123
/**

0 commit comments

Comments
 (0)