@vscode/vsce 3.1.2-0 → 3.1.2-1
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/dist/vsce.d.ts +8 -0
- package/out/main.js +9 -4
- package/out/package.js +8 -8
- package/package.json +1 -1
package/dist/vsce.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ export declare interface IPackageOptions {
|
|
|
72
72
|
* @default false
|
|
73
73
|
*/
|
|
74
74
|
readonly ignoreOtherTargetFolders?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Recurse into symlinked directories instead of treating them as files.
|
|
77
|
+
*/
|
|
78
|
+
readonly followSymlinks?: boolean;
|
|
75
79
|
readonly commitMessage?: string;
|
|
76
80
|
readonly gitTagVersion?: boolean;
|
|
77
81
|
readonly updatePackageJson?: boolean;
|
|
@@ -158,6 +162,10 @@ export declare interface IPublishOptions {
|
|
|
158
162
|
readonly useYarn?: boolean;
|
|
159
163
|
readonly dependencyEntryPoints?: string[];
|
|
160
164
|
readonly ignoreFile?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Recurse into symlinked directories instead of treating them as files
|
|
167
|
+
*/
|
|
168
|
+
readonly followSymlinks?: boolean;
|
|
161
169
|
/**
|
|
162
170
|
* The Personal Access Token to use.
|
|
163
171
|
*
|
package/out/main.js
CHANGED
|
@@ -86,7 +86,8 @@ module.exports = function (argv) {
|
|
|
86
86
|
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
|
|
87
87
|
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
|
|
88
88
|
.option('--readme-path <path>', 'Path to README file (defaults to README.md)')
|
|
89
|
-
.
|
|
89
|
+
.option('--follow-symlinks', 'Recurse into symlinked directories instead of treating them as files')
|
|
90
|
+
.action(({ tree, yarn, packagedDependencies, ignoreFile, dependencies, readmePath, followSymlinks }) => main((0, package_1.ls)({ tree, useYarn: yarn, packagedDependencies, ignoreFile, dependencies, readmePath, followSymlinks })));
|
|
90
91
|
commander_1.default
|
|
91
92
|
.command('package [version]')
|
|
92
93
|
.alias('pack')
|
|
@@ -118,7 +119,8 @@ module.exports = function (argv) {
|
|
|
118
119
|
.option('--allow-unused-files-pattern', 'Allow include patterns for the files field in package.json that does not match any file')
|
|
119
120
|
.option('--skip-license', 'Allow packaging without license file')
|
|
120
121
|
.option('--sign-tool <path>', 'Path to the VSIX signing tool. Will be invoked with two arguments: `SIGNTOOL <path/to/extension.signature.manifest> <path/to/extension.signature.p7s>`.')
|
|
121
|
-
.
|
|
122
|
+
.option('--follow-symlinks', 'Recurse into symlinked directories instead of treating them as files')
|
|
123
|
+
.action((version, { out, target, ignoreOtherTargetFolders, readmePath, changelogPath, message, gitTagVersion, updatePackageJson, githubBranch, gitlabBranch, rewriteRelativeLinks, baseContentUrl, baseImagesUrl, yarn, ignoreFile, gitHubIssueLinking, gitLabIssueLinking, dependencies, preRelease, allowStarActivation, allowMissingRepository, allowUnusedFilesPattern, skipLicense, signTool, followSymlinks, }) => main((0, package_1.packageCommand)({
|
|
122
124
|
packagePath: out,
|
|
123
125
|
version,
|
|
124
126
|
target,
|
|
@@ -144,6 +146,7 @@ module.exports = function (argv) {
|
|
|
144
146
|
allowUnusedFilesPattern,
|
|
145
147
|
skipLicense,
|
|
146
148
|
signTool,
|
|
149
|
+
followSymlinks,
|
|
147
150
|
})));
|
|
148
151
|
commander_1.default
|
|
149
152
|
.command('publish [version]')
|
|
@@ -181,7 +184,8 @@ module.exports = function (argv) {
|
|
|
181
184
|
.option('--allow-unused-files-pattern', 'Allow include patterns for the files field in package.json that does not match any file')
|
|
182
185
|
.option('--skip-duplicate', 'Fail silently if version already exists on the marketplace')
|
|
183
186
|
.option('--skip-license', 'Allow publishing without license file')
|
|
184
|
-
.
|
|
187
|
+
.option('--follow-symlinks', 'Recurse into symlinked directories instead of treating them as files')
|
|
188
|
+
.action((version, { pat, azureCredential, target, ignoreOtherTargetFolders, readmePath, changelogPath, message, gitTagVersion, updatePackageJson, packagePath, manifestPath, signaturePath, sigzipPath, githubBranch, gitlabBranch, baseContentUrl, baseImagesUrl, yarn, noVerify, allowProposedApis, allowAllProposedApis, ignoreFile, dependencies, preRelease, allowStarActivation, allowMissingRepository, allowUnusedFilesPattern, skipDuplicate, skipLicense, signTool, followSymlinks, }) => main((0, publish_1.publish)({
|
|
185
189
|
pat,
|
|
186
190
|
azureCredential,
|
|
187
191
|
version,
|
|
@@ -212,7 +216,8 @@ module.exports = function (argv) {
|
|
|
212
216
|
allowUnusedFilesPattern,
|
|
213
217
|
skipDuplicate,
|
|
214
218
|
skipLicense,
|
|
215
|
-
signTool
|
|
219
|
+
signTool,
|
|
220
|
+
followSymlinks
|
|
216
221
|
})));
|
|
217
222
|
commander_1.default
|
|
218
223
|
.command('unpublish [extensionid]')
|
package/out/package.js
CHANGED
|
@@ -1203,9 +1203,9 @@ const defaultIgnore = [
|
|
|
1203
1203
|
'**/.vscode-test/**',
|
|
1204
1204
|
'**/.vscode-test-web/**',
|
|
1205
1205
|
];
|
|
1206
|
-
async function collectAllFiles(cwd, dependencies, dependencyEntryPoints) {
|
|
1206
|
+
async function collectAllFiles(cwd, dependencies, dependencyEntryPoints, followSymlinks = true) {
|
|
1207
1207
|
const deps = await (0, npm_1.getDependencies)(cwd, dependencies, dependencyEntryPoints);
|
|
1208
|
-
const promises = deps.map(dep => (0, glob_1.glob)('**', { cwd: dep, nodir: true, dot: true, ignore: 'node_modules/**' }).then(files => files.map(f => path.relative(cwd, path.join(dep, f))).map(f => f.replace(/\\/g, '/'))));
|
|
1208
|
+
const promises = deps.map(dep => (0, glob_1.glob)('**', { cwd: dep, nodir: true, follow: followSymlinks, dot: true, ignore: 'node_modules/**' }).then(files => files.map(f => path.relative(cwd, path.join(dep, f))).map(f => f.replace(/\\/g, '/'))));
|
|
1209
1209
|
return Promise.all(promises).then(util.flatten);
|
|
1210
1210
|
}
|
|
1211
1211
|
function getDependenciesOption(options) {
|
|
@@ -1221,10 +1221,10 @@ function getDependenciesOption(options) {
|
|
|
1221
1221
|
return undefined;
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile, manifestFileIncludes, readmePath) {
|
|
1224
|
+
function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile, manifestFileIncludes, readmePath, followSymlinks = false) {
|
|
1225
1225
|
readmePath = readmePath ?? 'README.md';
|
|
1226
1226
|
const notIgnored = ['!package.json', `!${readmePath}`];
|
|
1227
|
-
return collectAllFiles(cwd, dependencies, dependencyEntryPoints).then(files => {
|
|
1227
|
+
return collectAllFiles(cwd, dependencies, dependencyEntryPoints, followSymlinks).then(files => {
|
|
1228
1228
|
files = files.filter(f => !/\r$/m.test(f));
|
|
1229
1229
|
return (fs.promises
|
|
1230
1230
|
.readFile(ignoreFile ? ignoreFile : path.join(cwd, '.vscodeignore'), 'utf8')
|
|
@@ -1236,7 +1236,7 @@ function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile, mani
|
|
|
1236
1236
|
manifestFileIncludes ?
|
|
1237
1237
|
// include all files in manifestFileIncludes and ignore the rest
|
|
1238
1238
|
Promise.resolve(manifestFileIncludes.map(file => `!${file}`).concat(['**']).join('\n\r')) :
|
|
1239
|
-
// "files" property not used in package.json
|
|
1239
|
+
// "files" property not used in package.json
|
|
1240
1240
|
Promise.resolve(''))
|
|
1241
1241
|
// Parse raw ignore by splitting output into lines and filtering out empty lines and comments
|
|
1242
1242
|
.then(rawIgnore => rawIgnore
|
|
@@ -1305,7 +1305,7 @@ function collect(manifest, options = {}) {
|
|
|
1305
1305
|
const packagedDependencies = options.dependencyEntryPoints || undefined;
|
|
1306
1306
|
const ignoreFile = options.ignoreFile || undefined;
|
|
1307
1307
|
const processors = createDefaultProcessors(manifest, options);
|
|
1308
|
-
return collectFiles(cwd, getDependenciesOption(options), packagedDependencies, ignoreFile, manifest.files, options.readmePath).then(fileNames => {
|
|
1308
|
+
return collectFiles(cwd, getDependenciesOption(options), packagedDependencies, ignoreFile, manifest.files, options.readmePath, options.followSymlinks).then(fileNames => {
|
|
1309
1309
|
const files = fileNames.map(f => ({ path: util.filePathToVsixPath(f), localPath: path.join(cwd, f) }));
|
|
1310
1310
|
return processFiles(processors, files);
|
|
1311
1311
|
});
|
|
@@ -1451,7 +1451,7 @@ async function listFiles(options = {}) {
|
|
|
1451
1451
|
if (options.prepublish) {
|
|
1452
1452
|
await prepublish(cwd, manifest, options.useYarn);
|
|
1453
1453
|
}
|
|
1454
|
-
return await collectFiles(cwd, getDependenciesOption(options), options.packagedDependencies, options.ignoreFile, manifest.files, options.readmePath);
|
|
1454
|
+
return await collectFiles(cwd, getDependenciesOption(options), options.packagedDependencies, options.ignoreFile, manifest.files, options.readmePath, options.followSymlinks);
|
|
1455
1455
|
}
|
|
1456
1456
|
exports.listFiles = listFiles;
|
|
1457
1457
|
/**
|
|
@@ -1501,7 +1501,7 @@ async function printAndValidatePackagedFiles(files, cwd, manifest, options) {
|
|
|
1501
1501
|
util.log.error(message);
|
|
1502
1502
|
process.exit(1);
|
|
1503
1503
|
}
|
|
1504
|
-
// Throw an error if the extension uses the files property in package.json and
|
|
1504
|
+
// Throw an error if the extension uses the files property in package.json and
|
|
1505
1505
|
// the package does not include at least one file for each include pattern
|
|
1506
1506
|
else if (manifest.files !== undefined && manifest.files.length > 0 && !options.allowUnusedFilesPattern) {
|
|
1507
1507
|
const localPaths = files.filter(f => !isInMemoryFile(f)).map(f => util.normalize(f.localPath));
|