@vscode/vsce 2.30.1-2 → 2.31.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/out/package.js +16 -1
- package/package.json +1 -1
package/out/package.js
CHANGED
|
@@ -500,6 +500,8 @@ class MarkdownProcessor extends BaseProcessor {
|
|
|
500
500
|
super(manifest);
|
|
501
501
|
this.name = name;
|
|
502
502
|
this.assetType = assetType;
|
|
503
|
+
this.options = options;
|
|
504
|
+
this.filesProcessed = 0;
|
|
503
505
|
this.regexp = new RegExp(`^${util.filePathToVsixPath(filePath)}$`, 'i');
|
|
504
506
|
const guess = this.guessBaseUrls(options.githubBranch || options.gitlabBranch);
|
|
505
507
|
this.baseContentUrl = options.baseContentUrl || (guess && guess.content);
|
|
@@ -516,6 +518,7 @@ class MarkdownProcessor extends BaseProcessor {
|
|
|
516
518
|
if (!this.regexp.test(filePath)) {
|
|
517
519
|
return Promise.resolve(file);
|
|
518
520
|
}
|
|
521
|
+
this.filesProcessed++;
|
|
519
522
|
this.assets.push({ type: this.assetType, path: filePath });
|
|
520
523
|
let contents = await read(file);
|
|
521
524
|
if (/This is the README for your extension /.test(contents)) {
|
|
@@ -662,12 +665,24 @@ class ReadmeProcessor extends MarkdownProcessor {
|
|
|
662
665
|
constructor(manifest, options = {}) {
|
|
663
666
|
super(manifest, 'README.md', options.readmePath ?? 'readme.md', 'Microsoft.VisualStudio.Services.Content.Details', options);
|
|
664
667
|
}
|
|
668
|
+
async onEnd() {
|
|
669
|
+
if (this.options.readmePath && this.filesProcessed === 0) {
|
|
670
|
+
util.log.error(`The provided readme file (${this.options.readmePath}) could not be found.`);
|
|
671
|
+
process.exit(1);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
665
674
|
}
|
|
666
675
|
exports.ReadmeProcessor = ReadmeProcessor;
|
|
667
676
|
class ChangelogProcessor extends MarkdownProcessor {
|
|
668
677
|
constructor(manifest, options = {}) {
|
|
669
678
|
super(manifest, 'CHANGELOG.md', options.changelogPath ?? 'changelog.md', 'Microsoft.VisualStudio.Services.Content.Changelog', options);
|
|
670
679
|
}
|
|
680
|
+
async onEnd() {
|
|
681
|
+
if (this.options.changelogPath && this.filesProcessed === 0) {
|
|
682
|
+
util.log.error(`The provided changelog file (${this.options.changelogPath}) could not be found.`);
|
|
683
|
+
process.exit(1);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
671
686
|
}
|
|
672
687
|
exports.ChangelogProcessor = ChangelogProcessor;
|
|
673
688
|
class LicenseProcessor extends BaseProcessor {
|
|
@@ -1426,7 +1441,7 @@ async function ls(options = {}) {
|
|
|
1426
1441
|
}
|
|
1427
1442
|
exports.ls = ls;
|
|
1428
1443
|
/**
|
|
1429
|
-
* Prints the packaged files of an extension.
|
|
1444
|
+
* Prints the packaged files of an extension. And ensures .vscodeignore and files property in package.json are used correctly.
|
|
1430
1445
|
*/
|
|
1431
1446
|
async function printAndValidatePackagedFiles(files, cwd, manifest, options) {
|
|
1432
1447
|
// Warn if the extension contains a lot of files
|