@theia/bundle-plugin 1.72.0-next.11

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/README.md ADDED
@@ -0,0 +1,30 @@
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - BUNDLE-PLUGIN</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/bundle-plugin` package contains bundler plugins for bundling Theia based applications.
16
+
17
+ ## Additional Information
18
+
19
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
20
+ - [Theia - Website](https://theia-ide.org/)
21
+
22
+ ## License
23
+
24
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
25
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
26
+
27
+ ## Trademark
28
+
29
+ "Theia" is a trademark of the Eclipse Foundation
30
+ <https://www.eclipse.org/theia>
@@ -0,0 +1,30 @@
1
+ import type { Plugin } from 'esbuild';
2
+ /**
3
+ * Redirects Monaco's nls module to Theia's localization-aware version.
4
+ *
5
+ * esbuild's `alias` option cannot be used for this because it rejects absolute paths as keys.
6
+ * This plugin catches both package-style imports (`@theia/monaco-editor-core/esm/vs/nls`)
7
+ * and relative imports from within Monaco's source tree (e.g. `../nls.js`), which are
8
+ * identified by the importing file residing inside `monaco-editor-core`.
9
+ *
10
+ * If `@theia/monaco` is not installed the plugin is a no-op.
11
+ */
12
+ export declare function monacoNlsPlugin(): Plugin;
13
+ /**
14
+ * Expose bundled modules on the `globalThis['theia']` namespace, e.g.
15
+ * `window['theia']['@theia/core/lib/common/uri']`.
16
+ * Such syntax can be used by external code, for instance, for testing.
17
+ *
18
+ * This is the esbuild equivalent of the webpack `expose-loader`.
19
+ * It is opt-in: add it to the `plugins` array in your `esbuild.mjs` to enable it.
20
+ */
21
+ export declare function exposeModulePlugin(): Plugin;
22
+ export declare function problemMatcherPlugin(watch: boolean, type: string): Plugin;
23
+ export interface NativeDependenciesPluginOptions {
24
+ trash: boolean;
25
+ ripgrep: boolean;
26
+ pty: boolean;
27
+ nativeBindings: Record<string, string>;
28
+ }
29
+ export declare function nativeDependenciesPlugin(options: NativeDependenciesPluginOptions): Plugin;
30
+ //# sourceMappingURL=esbuild-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild-plugin.d.ts","sourceRoot":"","sources":["../src/esbuild-plugin.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,SAAS,CAAC;AAenD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAqBxC;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CA0C3C;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBzE;AAED,MAAM,WAAW,+BAA+B;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,GAAG,MAAM,CAQzF"}
@@ -0,0 +1,312 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2026 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.monacoNlsPlugin = monacoNlsPlugin;
19
+ exports.exposeModulePlugin = exposeModulePlugin;
20
+ exports.problemMatcherPlugin = problemMatcherPlugin;
21
+ exports.nativeDependenciesPlugin = nativeDependenciesPlugin;
22
+ const path = require("path");
23
+ const fs = require("fs");
24
+ const resolvePackagePath = require("resolve-package-path");
25
+ const os_1 = require("os");
26
+ function join(...parts) {
27
+ return path.join(...parts).replace(/\\/g, '/');
28
+ }
29
+ function resolveModulePath(module) {
30
+ const modulePath = resolvePackagePath(module, process.cwd());
31
+ if (!modulePath) {
32
+ throw new Error('Could not resolve path of module: ' + module);
33
+ }
34
+ return path.resolve(modulePath, '..');
35
+ }
36
+ /**
37
+ * Redirects Monaco's nls module to Theia's localization-aware version.
38
+ *
39
+ * esbuild's `alias` option cannot be used for this because it rejects absolute paths as keys.
40
+ * This plugin catches both package-style imports (`@theia/monaco-editor-core/esm/vs/nls`)
41
+ * and relative imports from within Monaco's source tree (e.g. `../nls.js`), which are
42
+ * identified by the importing file residing inside `monaco-editor-core`.
43
+ *
44
+ * If `@theia/monaco` is not installed the plugin is a no-op.
45
+ */
46
+ function monacoNlsPlugin() {
47
+ const monacoPackagePath = resolvePackagePath('@theia/monaco', process.cwd());
48
+ const redirectTarget = monacoPackagePath
49
+ ? path.join(monacoPackagePath, '..', 'lib', 'browser', 'monaco-nls.js')
50
+ : undefined;
51
+ return {
52
+ name: 'monaco-nls',
53
+ setup(build) {
54
+ if (!redirectTarget) {
55
+ return;
56
+ }
57
+ build.onResolve({ filter: /nls(\.js)?$/ }, args => {
58
+ if (args.path.startsWith('@theia/monaco-editor-core') ||
59
+ args.resolveDir.includes('monaco-editor-core')) {
60
+ return { path: redirectTarget };
61
+ }
62
+ });
63
+ }
64
+ };
65
+ }
66
+ /**
67
+ * Expose bundled modules on the `globalThis['theia']` namespace, e.g.
68
+ * `window['theia']['@theia/core/lib/common/uri']`.
69
+ * Such syntax can be used by external code, for instance, for testing.
70
+ *
71
+ * This is the esbuild equivalent of the webpack `expose-loader`.
72
+ * It is opt-in: add it to the `plugins` array in your `esbuild.mjs` to enable it.
73
+ */
74
+ function exposeModulePlugin() {
75
+ function findPackage(resourcePath) {
76
+ let dir = path.dirname(resourcePath);
77
+ while (true) {
78
+ try {
79
+ const { name } = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'));
80
+ if (name) {
81
+ return { name, dir };
82
+ }
83
+ }
84
+ catch {
85
+ // No package.json at this level — keep walking up.
86
+ }
87
+ const parent = path.dirname(dir);
88
+ if (parent === dir) {
89
+ return undefined; // Reached filesystem root.
90
+ }
91
+ dir = parent;
92
+ }
93
+ }
94
+ return {
95
+ name: 'expose-module',
96
+ setup(build) {
97
+ build.onLoad({ filter: /\.js$/ }, async (args) => {
98
+ const pkg = findPackage(args.path);
99
+ if (!pkg) {
100
+ return;
101
+ }
102
+ const source = await fs.promises.readFile(args.path, 'utf8');
103
+ const { dir, name } = path.parse(args.path);
104
+ let moduleName = path.join(pkg.name, dir.substring(pkg.dir.length));
105
+ if (name !== 'index') {
106
+ moduleName = path.join(moduleName, name);
107
+ }
108
+ if (path.sep !== '/') {
109
+ moduleName = moduleName.split(path.sep).join('/');
110
+ }
111
+ const exposure = `\n;(globalThis['theia'] = globalThis['theia'] || {})['${moduleName}'] = (typeof module === 'object' && module.exports) || this;\n`;
112
+ return { contents: source + exposure, loader: 'js' };
113
+ });
114
+ }
115
+ };
116
+ }
117
+ function problemMatcherPlugin(watch, type) {
118
+ const buildType = watch ? 'watch' : 'build';
119
+ const prefix = `[${buildType}/${type}]`;
120
+ let time = Date.now();
121
+ return {
122
+ name: 'esbuild-problem-matcher',
123
+ setup(build) {
124
+ build.onStart(() => {
125
+ time = Date.now();
126
+ console.log(prefix + ' Build started');
127
+ });
128
+ build.onEnd(result => {
129
+ console.log(prefix + ' Finished with ' + result.errors.length + ' errors in ' + (Date.now() - time) + 'ms.');
130
+ });
131
+ },
132
+ };
133
+ }
134
+ ;
135
+ function nativeDependenciesPlugin(options) {
136
+ const plugin = new PluginImpl(options);
137
+ // create wrapper object over plugin
138
+ // esbuild validates the plugin object and expects no additional properties
139
+ return {
140
+ name: plugin.name,
141
+ setup: plugin.setup.bind(plugin)
142
+ };
143
+ }
144
+ class PluginImpl {
145
+ constructor(options) {
146
+ this.name = '@theia/esbuild-plugin';
147
+ this.bindings = {};
148
+ this.options = options;
149
+ for (const [name, value] of Object.entries(options.nativeBindings)) {
150
+ this.nativeBinding(name, value);
151
+ }
152
+ }
153
+ nativeBinding(dependency, nodePath) {
154
+ this.bindings[dependency] = nodePath;
155
+ }
156
+ setup(build) {
157
+ const outdir = build.initialOptions.outdir;
158
+ if (!outdir) {
159
+ throw new Error('The `outdir` option is required.');
160
+ }
161
+ build.onResolve({ filter: /^@vscode\/windows-ca-certs$/ }, () => {
162
+ const windows = process.platform === 'win32';
163
+ return {
164
+ path: windows
165
+ ? join(resolveModulePath('@vscode/windows-ca-certs'), 'build', 'Release', 'crypt32.node')
166
+ : '',
167
+ // Simply mark the dependency as external on non-Windows platforms
168
+ external: !windows
169
+ };
170
+ });
171
+ build.onResolve({ filter: /\.\/build\/Release\/keymapping$/ }, () => ({
172
+ path: join(resolveModulePath('native-keymap'), 'build', 'Release', 'keymapping.node'),
173
+ namespace: 'node-file'
174
+ }));
175
+ build.onResolve({ filter: /\.\/build\/Release\/watcher\.node$/ }, () => {
176
+ let name = `@parcel/watcher-${process.platform}-${process.arch}`;
177
+ if (process.platform === 'linux') {
178
+ const { MUSL, family } = require('detect-libc');
179
+ if (family === MUSL) {
180
+ name += '-musl';
181
+ }
182
+ else {
183
+ name += '-glibc';
184
+ }
185
+ }
186
+ return {
187
+ path: join(resolveModulePath(name), 'watcher.node')
188
+ };
189
+ });
190
+ build.onLoad({ filter: /bindings[\\\/]bindings\.js$/ }, async () => ({
191
+ contents: bindingsReplacement(this.bindings),
192
+ loader: 'js'
193
+ }));
194
+ build.onLoad({ filter: /@vscode[\\\/]ripgrep[\\\/]lib[\\\/]index\.js$/ }, async () => ({
195
+ contents: 'exports.rgPath = require("path").join(__dirname, `./native/rg${process.platform === "win32" ? ".exe" : ""}`);',
196
+ loader: 'js'
197
+ }));
198
+ build.onLoad({ filter: /node_modules[/\\]node-pty[/\\]lib[/\\]utils\.js$/ }, async (args) => {
199
+ let contents = await fs.promises.readFile(args.path, 'utf8');
200
+ // node-pty's loadNativeModule() uses dynamic require() calls with paths computed
201
+ // at runtime (e.g. require(dir + "/" + name + ".node")). Routing them through a
202
+ // local alias prevents esbuild from attempting static analysis of those paths,
203
+ // so Node.js resolves them at runtime relative to the bundle's __dirname, where
204
+ // the prebuilt .node files are placed by copyNodePtySpawnHelper().
205
+ contents = 'const __nativePtyRequire = require;\n' + contents.replace(/\brequire\(/g, '__nativePtyRequire(');
206
+ return { contents, loader: 'js' };
207
+ });
208
+ build.onEnd(() => {
209
+ if (this.options.trash) {
210
+ copyTrashHelper(outdir);
211
+ }
212
+ if (this.options.ripgrep) {
213
+ copyRipgrep(outdir);
214
+ }
215
+ if (this.options.pty) {
216
+ copyNodePtySpawnHelper(outdir);
217
+ }
218
+ });
219
+ this.setupNodeRequires(build);
220
+ }
221
+ setupNodeRequires(build) {
222
+ // By default, ESBuild does not handle `.node` files. We need to handle them ourselves.
223
+ // When using the `file` loader directly, the files only get exposed via their paths.
224
+ // However, we want to load them directly as native modules via `require`.
225
+ build.onResolve({ filter: /\.node$/, namespace: 'file' }, args => {
226
+ try {
227
+ // Move the resolved path to the `node-file` namespace to load it as a native module.
228
+ const resolved = require.resolve(args.path, { paths: [args.resolveDir] });
229
+ return {
230
+ path: resolved,
231
+ namespace: 'node-file',
232
+ };
233
+ }
234
+ catch {
235
+ // If the module cannot be resolved, mark it as external.
236
+ return {
237
+ external: true
238
+ };
239
+ }
240
+ });
241
+ build.onLoad({ filter: /.*/, namespace: 'node-file' }, args => ({
242
+ // Replace the require statement with a direct require call to the native module.
243
+ contents: `
244
+ import path from ${JSON.stringify(args.path)}
245
+ try { module.exports = require(path) }
246
+ catch { throw new Error('Could not load native module from "${path.basename(args.path)}"') }
247
+ `,
248
+ }));
249
+ build.onResolve({ filter: /\.node$/, namespace: 'node-file' }, args => ({
250
+ // Finally, resolve the `.node` file to the local path.
251
+ path: args.path,
252
+ namespace: 'file',
253
+ }));
254
+ }
255
+ }
256
+ async function copyRipgrep(outdir) {
257
+ const fileName = process.platform === 'win32' ? 'rg.exe' : 'rg';
258
+ const sourceFile = join(resolveModulePath('@vscode/ripgrep'), 'bin', fileName);
259
+ const targetFile = path.join(outdir, 'native', fileName);
260
+ await copyExecutable(sourceFile, targetFile);
261
+ }
262
+ async function copyNodePtySpawnHelper(outdir) {
263
+ const dist = `${process.platform}-${process.arch}`;
264
+ const src = `node-pty/prebuilds/${dist}`;
265
+ const targetDirectory = path.resolve(outdir, '..', 'prebuilds', dist);
266
+ const copyFile = async (source) => {
267
+ const file = require.resolve(`${src}/${source}`);
268
+ const targetFile = path.join(targetDirectory, source);
269
+ await copyExecutable(file, targetFile);
270
+ };
271
+ if (process.platform === 'win32') {
272
+ await copyFile('conpty.node');
273
+ await copyFile('conpty_console_list.node');
274
+ await copyFile('conpty/conpty.dll');
275
+ await copyFile('conpty/OpenConsole.exe');
276
+ }
277
+ else if (process.platform === 'darwin') {
278
+ await copyFile('spawn-helper');
279
+ }
280
+ // On non-windows platforms
281
+ if (process.platform !== 'win32') {
282
+ await copyFile('pty.node');
283
+ }
284
+ }
285
+ async function copyTrashHelper(outdir) {
286
+ const fileName = process.platform === 'win32' ? 'windows-trash.exe' : 'macos-trash';
287
+ if (process.platform === 'win32' || process.platform === 'darwin') {
288
+ const sourceFile = join(resolveModulePath('trash'), 'lib', fileName);
289
+ const targetFile = path.join(outdir, fileName);
290
+ await copyExecutable(sourceFile, targetFile);
291
+ }
292
+ }
293
+ async function copyExecutable(source, target) {
294
+ const targetDirectory = path.dirname(target);
295
+ await fs.promises.mkdir(targetDirectory, { recursive: true });
296
+ await fs.promises.copyFile(source, target);
297
+ await fs.promises.chmod(target, 0o777);
298
+ }
299
+ const bindingsReplacement = (bindings) => {
300
+ const cases = [];
301
+ for (const [module, node] of Object.entries(bindings)) {
302
+ cases.push(`${' '.repeat(8)}case '${module}': return require('${node}');`);
303
+ }
304
+ return `
305
+ module.exports = function (jsModule) {
306
+ switch (jsModule) {
307
+ ${cases.join(os_1.EOL)}
308
+ }
309
+ throw new Error(\`unhandled module: "\${jsModule}"\`);
310
+ }`.trim();
311
+ };
312
+ //# sourceMappingURL=esbuild-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild-plugin.js","sourceRoot":"","sources":["../src/esbuild-plugin.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AA+BhF,0CAqBC;AAUD,gDA0CC;AAED,oDAgBC;AASD,4DAQC;AAzID,6BAA6B;AAC7B,yBAAyB;AACzB,2DAA4D;AAG5D,2BAAyB;AAEzB,SAAS,IAAI,CAAC,GAAG,KAAe;IAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACrC,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7D,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,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M,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,MAAM,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;AACL,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,MAAc;IACxD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,QAAgC,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,sBAAsB,IAAI,KAAK,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO;;;EAGT,KAAK,CAAC,IAAI,CAAC,QAAG,CAAC;;;EAGf,CAAC,IAAI,EAAE,CAAC;AACV,CAAC,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './esbuild-plugin';
2
+ export * from './webpack-plugin';
3
+ export * from './monaco-webpack-plugins';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const tslib_1 = require("tslib");
19
+ tslib_1.__exportStar(require("./esbuild-plugin"), exports);
20
+ tslib_1.__exportStar(require("./webpack-plugin"), exports);
21
+ tslib_1.__exportStar(require("./monaco-webpack-plugins"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,2DAAiC;AACjC,2DAAiC;AACjC,mEAAyC"}
@@ -0,0 +1,5 @@
1
+ import * as webpack from 'webpack';
2
+ export declare class MonacoWebpackPlugin {
3
+ apply(compiler: webpack.Compiler): void;
4
+ }
5
+ //# sourceMappingURL=monaco-webpack-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-webpack-plugins.d.ts","sourceRoot":"","sources":["../src/monaco-webpack-plugins.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,qBAAa,mBAAmB;IAC5B,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI;CAK1C"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MonacoWebpackPlugin = void 0;
19
+ class MonacoWebpackPlugin {
20
+ apply(compiler) {
21
+ compiler.hooks.contextModuleFactory.tap('MonacoBuildPlugin', cmf => {
22
+ cmf.hooks.contextModuleFiles.tap('MonacoBuildPlugin', files => files.filter(file => !file.endsWith('.d.ts')));
23
+ });
24
+ }
25
+ }
26
+ exports.MonacoWebpackPlugin = MonacoWebpackPlugin;
27
+ //# sourceMappingURL=monaco-webpack-plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-webpack-plugins.js","sourceRoot":"","sources":["../src/monaco-webpack-plugins.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAIhF,MAAa,mBAAmB;IAC5B,KAAK,CAAC,QAA0B;QAC5B,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,EAAE;YAC/D,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAClH,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAND,kDAMC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=package.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.spec.d.ts","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+ /* note: this bogus test file is required so that
17
+ we are able to run mocha unit tests on this
18
+ package, without having any actual unit tests in it.
19
+ This way a coverage report will be generated,
20
+ showing 0% coverage, instead of no report.
21
+ This file can be removed once we have real unit
22
+ tests in place. */
23
+ describe('request package', () => {
24
+ it('should support code coverage statistics', () => true);
25
+ });
26
+ //# sourceMappingURL=package.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF;;;;;;qBAMqB;AAErB,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAE7B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Compiler } from 'webpack';
2
+ export interface NativeWebpackPluginOptions {
3
+ out: string;
4
+ trash: boolean;
5
+ ripgrep: boolean;
6
+ pty: boolean;
7
+ replacements?: Record<string, string>;
8
+ nativeBindings?: Record<string, string>;
9
+ }
10
+ export declare class NativeWebpackPlugin {
11
+ private bindings;
12
+ private options;
13
+ constructor(options: NativeWebpackPluginOptions);
14
+ nativeBinding(dependency: string, nodePath: string): void;
15
+ apply(compiler: Compiler): void;
16
+ protected copyRipgrep(issuer: string, compiler: Compiler): Promise<void>;
17
+ protected copyNodePtyNativeDeps(issuer: string, compiler: Compiler): Promise<void>;
18
+ protected copyTrashHelper(issuer: string, compiler: Compiler): Promise<void>;
19
+ protected copyExecutable(source: string, target: string): Promise<void>;
20
+ }
21
+ //# sourceMappingURL=webpack-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack-plugin.d.ts","sourceRoot":"","sources":["../src/webpack-plugin.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAMxC,MAAM,WAAW,0BAA0B;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAED,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,OAAO,CAA6B;gBAEhC,OAAO,EAAE,0BAA0B;IAO/C,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIzD,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;cAiDf,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAO9D,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAyBxE,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAelE,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMhF"}