@vscode/vsce 3.3.3-2 → 3.3.3-3
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 +20 -16
- package/package.json +1 -1
package/out/package.js
CHANGED
|
@@ -742,27 +742,31 @@ exports.LicenseProcessor = LicenseProcessor;
|
|
|
742
742
|
class LaunchEntryPointProcessor extends BaseProcessor {
|
|
743
743
|
constructor(manifest) {
|
|
744
744
|
super(manifest);
|
|
745
|
-
this.
|
|
746
|
-
if (manifest.main) {
|
|
747
|
-
this.entryPoints.add(util.normalize(path.join('extension', this.appendJSExt(manifest.main))));
|
|
748
|
-
}
|
|
749
|
-
if (manifest.browser) {
|
|
750
|
-
this.entryPoints.add(util.normalize(path.join('extension', this.appendJSExt(manifest.browser))));
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
appendJSExt(filePath) {
|
|
754
|
-
if (filePath.endsWith('.js') || filePath.endsWith('.cjs')) {
|
|
755
|
-
return filePath;
|
|
756
|
-
}
|
|
757
|
-
return filePath + '.js';
|
|
745
|
+
this.seenFiles = new Set();
|
|
758
746
|
}
|
|
759
747
|
onFile(file) {
|
|
760
|
-
this.
|
|
748
|
+
this.seenFiles.add(util.normalize(file.path));
|
|
761
749
|
return Promise.resolve(file);
|
|
762
750
|
}
|
|
751
|
+
hasSeenEntrypointFile(filePath) {
|
|
752
|
+
return this.seenFiles.has(filePath) || this.seenFiles.has(filePath + '.js');
|
|
753
|
+
}
|
|
763
754
|
async onEnd() {
|
|
764
|
-
|
|
765
|
-
|
|
755
|
+
const missingEntryPoints = [];
|
|
756
|
+
if (this.manifest.main) {
|
|
757
|
+
const mainPath = util.normalize(path.join('extension', this.manifest.main));
|
|
758
|
+
if (!this.hasSeenEntrypointFile(mainPath)) {
|
|
759
|
+
missingEntryPoints.push(mainPath);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
if (this.manifest.browser) {
|
|
763
|
+
const browserPath = util.normalize(path.join('extension', this.manifest.browser));
|
|
764
|
+
if (!this.hasSeenEntrypointFile(browserPath)) {
|
|
765
|
+
missingEntryPoints.push(browserPath);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (missingEntryPoints.length > 0) {
|
|
769
|
+
const files = missingEntryPoints.join(',\n ');
|
|
766
770
|
throw new Error(`Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by '.vscodeignore':\n ${files}`);
|
|
767
771
|
}
|
|
768
772
|
}
|