@codingame/monaco-vscode-rollup-vsix-plugin 1.83.4 → 1.83.5
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/package.json +2 -2
- package/rollup-vsix-plugin.d.ts +2 -1
- package/rollup-vsix-plugin.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-rollup-vsix-plugin",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.5",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "rollup-vsix-plugin.js",
|
|
19
19
|
"types": "rollup-vsix-plugin.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.83.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.5",
|
|
22
22
|
"memfs": "^4.6.0",
|
|
23
23
|
"mime-types": "^2.1.35",
|
|
24
24
|
"yauzl": "^2.10.0"
|
package/rollup-vsix-plugin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
3
|
import { Plugin, InputPluginOption } from 'rollup';
|
|
3
4
|
import { IExtensionManifest } from './vscode/src/vs/platform/extensions/common/extensions.js';
|
|
@@ -8,7 +9,7 @@ interface Options {
|
|
|
8
9
|
exclude?: FilterPattern;
|
|
9
10
|
rollupPlugins?: InputPluginOption[];
|
|
10
11
|
transformManifest?: (manifest: IExtensionManifest) => IExtensionManifest;
|
|
11
|
-
getAdditionalResources?: (manifest: IExtensionManifest) => Promise<ExtensionResource[]>;
|
|
12
|
+
getAdditionalResources?: (manifest: IExtensionManifest, getFileContent: (path: string) => Promise<Buffer>, listFiles: (path: string) => Promise<string[]>) => Promise<ExtensionResource[]>;
|
|
12
13
|
}
|
|
13
14
|
declare function plugin({ include, exclude, transformManifest, getAdditionalResources }?: Options): Plugin;
|
|
14
15
|
|
package/rollup-vsix-plugin.js
CHANGED
|
@@ -1168,14 +1168,14 @@ function plugin({ include = '**/*.vsix', exclude, transformManifest = manifest =
|
|
|
1168
1168
|
const getFileContent = async (filePath) => {
|
|
1169
1169
|
return readFileSync(filePath);
|
|
1170
1170
|
};
|
|
1171
|
-
const listFiles = async (
|
|
1172
|
-
return vsixFS.readdirSync(path);
|
|
1171
|
+
const listFiles = async (filePath) => {
|
|
1172
|
+
return vsixFS.readdirSync(path.join('/', filePath));
|
|
1173
1173
|
};
|
|
1174
1174
|
const extensionResources = (await extractResourcesFromExtensionManifest(manifest, getFileContent, listFiles))
|
|
1175
1175
|
.filter(resource => vsixFS.existsSync(path.join('/', resource.realPath ?? resource.path)));
|
|
1176
1176
|
const resources = [
|
|
1177
1177
|
...extensionResources,
|
|
1178
|
-
...await getAdditionalResources(manifest)
|
|
1178
|
+
...await getAdditionalResources(manifest, getFileContent, listFiles)
|
|
1179
1179
|
];
|
|
1180
1180
|
const pathMapping = (await Promise.all(resources.map(async (resource) => {
|
|
1181
1181
|
const assetPath = getVsixPath(resource.realPath ?? resource.path);
|