@theia/application-manager 1.72.0-next.2 → 1.72.0-next.20

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.
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-generator.js","sourceRoot":"","sources":["../../src/generator/frontend-generator.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,8CAA8C;AAE9C,2BAAyB;AACzB,6DAA2E;AAC3E,2BAA8C;AAE9C,MAAa,iBAAkB,SAAQ,sCAAiB;IAEpD,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACrC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACzG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CAAC;QAC5I,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC;QAChG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAA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C;IACrE,CAAC;IAED,mEAAmE;IACzD,0BAA0B;QAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgCP,CAAC;IACL,CAAC;IAES,uBAAuB,CAAC,sBAA2C;QACzE,OAAO;;;;;;;;;EASb,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC;8BAChC,YAAY,cAAc,CAAC,CAAC,IAAI,CAAC,QAAG,CAAC;;CAElE,CAAC;IACE,CAAC;IAED,gBAAgB;QACZ,OAAO;;EAEb,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,YAAY,IAAI,eAAe,CAAC,CAAC,IAAI,CAAC,QAAG,CAAC;CAChG,CAAC;IACE,CAAC;CACJ;AAhND,8CAgNC"}
1
+ {"version":3,"file":"frontend-generator.js","sourceRoot":"","sources":["../../src/generator/frontend-generator.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,8CAA8C;AAE9C,2BAAyB;AACzB,6DAA2E;AAC3E,2BAA8C;AAC9C,2DAAuD;AAEvD,MAAa,iBAAkB,SAAQ,sCAAiB;IAEpD,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACrC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC/G,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC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@ -1,4 +1,4 @@
1
- export * from './webpack-generator';
1
+ export * from './bundler-generator';
2
2
  export * from './frontend-generator';
3
3
  export * from './backend-generator';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -16,7 +16,7 @@
16
16
  // *****************************************************************************
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const tslib_1 = require("tslib");
19
- tslib_1.__exportStar(require("./webpack-generator"), exports);
19
+ tslib_1.__exportStar(require("./bundler-generator"), exports);
20
20
  tslib_1.__exportStar(require("./frontend-generator"), exports);
21
21
  tslib_1.__exportStar(require("./backend-generator"), exports);
22
22
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/application-manager",
3
- "version": "1.72.0-next.2+c6615252d",
3
+ "version": "1.72.0-next.20+60dd3f3d5",
4
4
  "description": "Theia application manager API.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,11 +32,11 @@
32
32
  "@babel/core": "^7.29.0",
33
33
  "@babel/plugin-transform-classes": "^7.28.6",
34
34
  "@babel/plugin-transform-runtime": "^7.29.0",
35
- "@babel/preset-env": "^7.29.2",
36
- "@electron/rebuild": "^4.0.3",
37
- "@theia/application-package": "1.72.0-next.2+c6615252d",
38
- "@theia/ffmpeg": "1.72.0-next.2+c6615252d",
39
- "@theia/native-webpack-plugin": "1.72.0-next.2+c6615252d",
35
+ "@babel/preset-env": "^7.29.3",
36
+ "@electron/rebuild": "^4.0.4",
37
+ "@theia/application-package": "1.72.0-next.20+60dd3f3d5",
38
+ "@theia/bundle-plugin": "1.72.0-next.20+60dd3f3d5",
39
+ "@theia/ffmpeg": "1.72.0-next.20+60dd3f3d5",
40
40
  "@types/fs-extra": "^4.0.15",
41
41
  "@types/semver": "^7.7.1",
42
42
  "babel-loader": "^8.4.1",
@@ -44,7 +44,10 @@
44
44
  "compression-webpack-plugin": "^9.2.0",
45
45
  "copy-webpack-plugin": "^8.1.1",
46
46
  "css-loader": "^6.11.0",
47
- "fs-extra": "^4.0.2",
47
+ "esbuild": "^0.24.0",
48
+ "esbuild-plugin-copy": "^2.1.1",
49
+ "esbuild-plugins-node-modules-polyfill": "^1.6.7",
50
+ "fs-extra": "^4.0.3",
48
51
  "http-server": "^14.1.1",
49
52
  "ignore-loader": "^0.1.2",
50
53
  "less": "^3.13.1",
@@ -57,12 +60,12 @@
57
60
  "source-map-support": "^0.5.21",
58
61
  "string-replace-loader": "^3.3.0",
59
62
  "style-loader": "^2.0.0",
60
- "tslib": "^2.6.2",
63
+ "tslib": "^2.8.1",
61
64
  "umd-compat-loader": "^2.1.2",
62
- "webpack": "^5.105.4",
65
+ "webpack": "^5.106.2",
63
66
  "webpack-cli": "4.7.0",
64
67
  "worker-loader": "^3.0.8",
65
- "yargs": "^15.3.1"
68
+ "yargs": "^15.4.1"
66
69
  },
67
70
  "peerDependencies": {
68
71
  "@theia/electron": "*"
@@ -78,5 +81,5 @@
78
81
  "nyc": {
79
82
  "extends": "../../configs/nyc.json"
80
83
  },
81
- "gitHead": "c6615252d35303058e0bde98e8a3ca56b5efcd82"
84
+ "gitHead": "60dd3f3d5ca48aabc06ab532c215257b061f9725"
82
85
  }
@@ -19,7 +19,7 @@ import * as fs from 'fs-extra';
19
19
  import * as cp from 'child_process';
20
20
  import * as semver from 'semver';
21
21
  import { ApplicationPackage, ApplicationPackageOptions } from '@theia/application-package';
22
- import { WebpackGenerator, FrontendGenerator, BackendGenerator } from './generator';
22
+ import { BundlerGenerator, FrontendGenerator, BackendGenerator } from './generator';
23
23
  import { ApplicationProcess } from './application-process';
24
24
  import { GeneratorOptions } from './generator/abstract-generator';
25
25
  import yargs = require('yargs');
@@ -73,12 +73,15 @@ export class ApplicationPackageManager {
73
73
  }
74
74
 
75
75
  async clean(): Promise<void> {
76
- const webpackGenerator = new WebpackGenerator(this.pck);
76
+ const bundlerGenerator = new BundlerGenerator(this.pck);
77
77
  await Promise.all([
78
78
  this.remove(this.pck.lib()),
79
79
  this.remove(this.pck.srcGen()),
80
- this.remove(webpackGenerator.genConfigPath),
81
- this.remove(webpackGenerator.genNodeConfigPath)
80
+ this.remove(bundlerGenerator.genConfigPath),
81
+ this.remove(bundlerGenerator.genNodeConfigPath),
82
+ this.remove(bundlerGenerator.genESBuildBrowserPath),
83
+ this.remove(bundlerGenerator.genESBuildNodePath),
84
+ this.remove(bundlerGenerator.genESBuildElectronPath),
82
85
  ]);
83
86
  }
84
87
 
@@ -99,7 +102,7 @@ export class ApplicationPackageManager {
99
102
  throw error;
100
103
  }
101
104
  await Promise.all([
102
- new WebpackGenerator(this.pck, options).generate(),
105
+ new BundlerGenerator(this.pck, options).generate(),
103
106
  new BackendGenerator(this.pck, options).generate(),
104
107
  new FrontendGenerator(this.pck, options).generate(),
105
108
  ]);
@@ -111,9 +114,15 @@ export class ApplicationPackageManager {
111
114
  }
112
115
 
113
116
  async build(args: string[] = [], options: GeneratorOptions = {}): Promise<void> {
117
+ const bundlerGenerator = new BundlerGenerator(this.pck);
114
118
  await this.generate(options);
115
119
  await this.copy();
116
- return this.__process.run('webpack', args);
120
+ if (await bundlerGenerator.preferESBuild()) {
121
+ const process = this.__process.spawn('node', [bundlerGenerator.esbuildPath, ...args]);
122
+ return this.__process.promisify('esbuild', process);
123
+ } else {
124
+ return this.__process.run('webpack', args);
125
+ }
117
126
  }
118
127
 
119
128
  start(args: string[] = []): cp.ChildProcess {
@@ -78,7 +78,7 @@ export class ApplicationProcess {
78
78
  return this.resolveBin(parentDir, command);
79
79
  }
80
80
 
81
- protected promisify(command: string, p: cp.ChildProcess): Promise<void> {
81
+ promisify(command: string, p: cp.ChildProcess): Promise<void> {
82
82
  return new Promise((resolve, reject) => {
83
83
  p.stdout!.on('data', data => this.pck.log(data.toString()));
84
84
  p.stderr!.on('data', data => this.pck.error(data.toString()));
@@ -18,16 +18,42 @@ import * as paths from 'path';
18
18
  import * as fs from 'fs-extra';
19
19
  import { AbstractGenerator } from './abstract-generator';
20
20
 
21
- export class WebpackGenerator extends AbstractGenerator {
21
+ export class BundlerGenerator extends AbstractGenerator {
22
22
 
23
23
  async generate(): Promise<void> {
24
- await this.write(this.genConfigPath, this.compileWebpackConfig());
25
- if (!this.pck.isBrowserOnly()) {
26
- await this.write(this.genNodeConfigPath, this.compileNodeWebpackConfig());
24
+ if (await this.preferESBuild()) {
25
+ await this.write(this.genESBuildBrowserPath, this.compileESBuildBrowserConfig());
26
+ if (!this.pck.isBrowserOnly()) {
27
+ await this.write(this.genESBuildNodePath, this.compileESBuildNodeConfig());
28
+ if (this.pck.isElectron()) {
29
+ await this.write(this.genESBuildElectronPath, this.compileESBuildElectronConfig());
30
+ }
31
+ }
32
+ if (await this.shouldGenerateUserESBuildConfig()) {
33
+ await this.write(this.esbuildPath, this.compileESBuildUserConfig());
34
+ }
35
+ } else {
36
+ await this.write(this.genConfigPath, this.compileWebpackConfig());
37
+ if (!this.pck.isBrowserOnly()) {
38
+ await this.write(this.genNodeConfigPath, this.compileNodeWebpackConfig());
39
+ }
40
+ if (await this.shouldGenerateUserWebpackConfig()) {
41
+ await this.write(this.configPath, this.compileUserWebpackConfig());
42
+ }
27
43
  }
28
- if (await this.shouldGenerateUserWebpackConfig()) {
29
- await this.write(this.configPath, this.compileUserWebpackConfig());
44
+ }
45
+
46
+ async preferESBuild(): Promise<boolean> {
47
+ // If an esbuild file already exists, prefer esbuild
48
+ if (await fs.pathExists(this.esbuildPath)) {
49
+ return true;
50
+ }
51
+ // If a webpack file already exists, prefer webpack
52
+ if (await fs.pathExists(this.configPath)) {
53
+ return false;
30
54
  }
55
+ // Otherwise, prefer ESBuild (for performance)
56
+ return true;
31
57
  }
32
58
 
33
59
  protected async shouldGenerateUserWebpackConfig(): Promise<boolean> {
@@ -35,7 +61,15 @@ export class WebpackGenerator extends AbstractGenerator {
35
61
  return true;
36
62
  }
37
63
  const content = await fs.readFile(this.configPath, 'utf8');
38
- return content.indexOf('gen-webpack') === -1;
64
+ return !content.includes('gen-webpack');
65
+ }
66
+
67
+ protected async shouldGenerateUserESBuildConfig(): Promise<boolean> {
68
+ if (!(await fs.pathExists(this.esbuildPath))) {
69
+ return true;
70
+ }
71
+ const content = await fs.readFile(this.esbuildPath, 'utf8');
72
+ return !content.includes('gen-esbuild');
39
73
  }
40
74
 
41
75
  get configPath(): string {
@@ -50,6 +84,22 @@ export class WebpackGenerator extends AbstractGenerator {
50
84
  return this.pck.path('gen-webpack.node.config.js');
51
85
  }
52
86
 
87
+ get esbuildPath(): string {
88
+ return this.pck.path('esbuild.mjs');
89
+ }
90
+
91
+ get genESBuildBrowserPath(): string {
92
+ return this.pck.path('gen-esbuild.browser.mjs');
93
+ }
94
+
95
+ get genESBuildNodePath(): string {
96
+ return this.pck.path('gen-esbuild.node.mjs');
97
+ }
98
+
99
+ get genESBuildElectronPath(): string {
100
+ return this.pck.path('gen-esbuild.electron.mjs');
101
+ }
102
+
53
103
  protected compileWebpackConfig(): string {
54
104
  return `/**
55
105
  * Don't touch this file. It will be regenerated by theia build.
@@ -63,7 +113,7 @@ const resolvePackagePath = require('resolve-package-path');
63
113
  const CopyWebpackPlugin = require('copy-webpack-plugin');
64
114
  const CompressionPlugin = require('compression-webpack-plugin');
65
115
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
66
- const { MonacoWebpackPlugin } = require('@theia/native-webpack-plugin/lib/monaco-webpack-plugins.js');
116
+ const { MonacoWebpackPlugin } = require('@theia/bundle-plugin');
67
117
 
68
118
  const outputPath = path.resolve(__dirname, 'lib', 'frontend');
69
119
  const { mode, staticCompression } = yargs.option('mode', {
@@ -120,6 +170,7 @@ module.exports = [{
120
170
  devtool: 'source-map',
121
171
  entry: {
122
172
  bundle: path.resolve(__dirname, 'src-gen/frontend/index.js'),
173
+ ${this.ifPackage('@theia/plugin-ext', "'plugin-worker': '@theia/plugin-ext/lib/hosted/browser/worker/worker-main.js',")}
123
174
  },
124
175
  output: {
125
176
  filename: '[name].js',
@@ -133,25 +184,8 @@ module.exports = [{
133
184
  rules: [
134
185
  {
135
186
  test: /\\.css$/,
136
- exclude: /materialcolors\\.css$|\\.useable\\.css$/,
137
187
  use: ['style-loader', 'css-loader']
138
188
  },
139
- {
140
- test: /materialcolors\\.css$|\\.useable\\.css$/,
141
- use: [
142
- {
143
- loader: 'style-loader',
144
- options: {
145
- esModule: false,
146
- injectType: 'lazySingletonStyleTag',
147
- attributes: {
148
- id: 'theia-theme'
149
- }
150
- }
151
- },
152
- 'css-loader'
153
- ]
154
- },
155
189
  {
156
190
  test: /\\.(ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,
157
191
  type: 'asset',
@@ -401,8 +435,7 @@ const path = require('path');
401
435
  const yargs = require('yargs');
402
436
  const webpack = require('webpack');
403
437
  const TerserPlugin = require('terser-webpack-plugin');
404
- const NativeWebpackPlugin = require('@theia/native-webpack-plugin');
405
- const { MonacoWebpackPlugin } = require('@theia/native-webpack-plugin/lib/monaco-webpack-plugins.js');
438
+ const { NativeWebpackPlugin, MonacoWebpackPlugin } = require('@theia/bundle-plugin');
406
439
 
407
440
  const { mode } = yargs.option('mode', {
408
441
  description: "Mode to use",
@@ -583,6 +616,261 @@ module.exports = {
583
616
  nativePlugin,
584
617
  ignoredResources
585
618
  };
619
+ `;
620
+ }
621
+
622
+ protected compileESBuildBrowserConfig(): string {
623
+ return `/**
624
+ * Don't touch this file. It will be regenerated by theia build.
625
+ * To customize the build process, change ./esbuild.mjs
626
+ */
627
+ import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill';
628
+ import { copy } from 'esbuild-plugin-copy';
629
+ import { monacoNlsPlugin, problemMatcherPlugin } from '@theia/bundle-plugin';
630
+ import yargs from 'yargs';
631
+ import resolvePackagePath from 'resolve-package-path';
632
+ import path from 'node:path';
633
+ import { fileURLToPath } from 'node:url';
634
+
635
+ export const __dirname = path.dirname(fileURLToPath(import.meta.url));
636
+
637
+ export function join(...parts) {
638
+ return path.join(...parts).replace(/\\\\/g, '/');
639
+ }
640
+
641
+ const { mode, watch } = yargs.option('mode', {
642
+ description: "Mode to use",
643
+ choices: ["development", "production"],
644
+ default: "production"
645
+ }).option('watch', {
646
+ description: 'Controls whether to enable watch mode',
647
+ type: 'boolean',
648
+ default: false
649
+ }).argv;
650
+
651
+ const production = mode === 'production';
652
+ const sourcemap = production ? false : 'linked';
653
+ const minify = production;
654
+
655
+ export { mode, watch, sourcemap, minify };
656
+
657
+ /**
658
+ * @type {Record<string, import('esbuild').Loader>}
659
+ */
660
+ export const loader = {
661
+ '.css': 'css',
662
+ '.ttf': 'dataurl',
663
+ '.eot': 'dataurl',
664
+ '.svg': 'dataurl',
665
+ '.woff': 'dataurl',
666
+ '.woff2': 'dataurl',
667
+ '.jpg': 'dataurl',
668
+ '.png': 'dataurl',
669
+ '.gif': 'dataurl',
670
+ '.wasm': 'dataurl',
671
+ '.plist': 'dataurl',
672
+ '.node': 'file'
673
+ };
674
+
675
+ /**
676
+ * @type {import('esbuild').BuildOptions}
677
+ */
678
+ export const browserOptions = {
679
+ entryPoints: {
680
+ 'bundle': './src-gen/frontend/index.js',
681
+ 'secondary-window': './src-gen/frontend/secondary-index.js',
682
+ ${this.ifMonaco(() => "'editor.worker': '@theia/monaco-editor-core/esm/vs/editor/common/services/editorWebWorkerMain.js',")}
683
+ ${this.ifPackage('@theia/plugin-ext', "'plugin-worker': '@theia/plugin-ext/lib/hosted/browser/worker/worker-main.js',")}
684
+ },
685
+ assetNames: '[name]',
686
+ bundle: true,
687
+ outdir: 'lib/frontend',
688
+ platform: 'browser',
689
+ // Support UMD libraries
690
+ // but ensure that we also prioritize browser exports where possible
691
+ mainFields: ['browser', 'module', 'main'],
692
+ loader,
693
+ minify,
694
+ sourcemap,
695
+ plugins: [
696
+ problemMatcherPlugin(watch, 'browser'),
697
+ ${this.ifMonaco(() => 'monacoNlsPlugin(),')}
698
+ nodeModulesPolyfillPlugin({
699
+ globals: {
700
+ Buffer: true,
701
+ process: false
702
+ }
703
+ }),
704
+ copy({
705
+ assets: [
706
+ {
707
+ // copy secondary window html file to lib folder
708
+ from: join(__dirname, 'src-gen/frontend/secondary-window.html'),
709
+ to: join(__dirname, 'lib', 'frontend')
710
+ }${this.ifPackage('@theia/plugin-ext', `,
711
+ {
712
+ // copy webview files to lib folder
713
+ from: join(resolvePackagePath('@theia/plugin-ext', __dirname), '..', 'src', 'main', 'browser', 'webview', 'pre', '*'),
714
+ to: join(__dirname, 'lib', 'webview', 'pre')
715
+ }`)}${this.ifPackage('@theia/plugin-ext-vscode', `,
716
+ {
717
+ // copy frontend plugin host files
718
+ from: join(resolvePackagePath('@theia/plugin-ext-vscode', __dirname), '..', 'lib', 'node', 'context', 'plugin-vscode-init-fe.js'),
719
+ to: join(__dirname, 'lib', 'frontend', 'context')
720
+ }`)}
721
+ ]
722
+ })
723
+ ]
724
+ };
725
+ `;
726
+ }
727
+
728
+ protected compileESBuildNodeConfig(): string {
729
+ return `/**
730
+ * Don't touch this file. It will be regenerated by theia build.
731
+ * To customize the build process, change ./esbuild.mjs
732
+ */
733
+ import { nativeDependenciesPlugin, problemMatcherPlugin } from '@theia/bundle-plugin';
734
+ import { watch, loader, minify, sourcemap, join, __dirname } from './gen-esbuild.browser.mjs';
735
+ import { copy } from 'esbuild-plugin-copy';
736
+ import resolvePackagePath from 'resolve-package-path';
737
+
738
+ /**
739
+ * @type {Record<string, string>}
740
+ */
741
+ export const nativeBindings = {
742
+ drivelist: 'drivelist/build/Release/drivelist.node'
743
+ };
744
+
745
+ /**
746
+ * @type {import('esbuild').BuildOptions}
747
+ */
748
+ export const nodeOptions = {
749
+ entryPoints: {
750
+ 'main': './src-gen/backend/main',
751
+ 'ipc-bootstrap': '@theia/core/lib/node/messaging/ipc-bootstrap',
752
+ ${this.ifElectron("'electron-main': './src-gen/backend/electron-main',")}
753
+ ${this.ifPackage('@theia/plugin-ext', () => `// VS Code extension support:
754
+ 'plugin-host': '@theia/plugin-ext/lib/hosted/node/plugin-host',`)}
755
+ ${this.ifPackage('@theia/plugin-ext-headless', () => `// Theia Headless Plugin support:
756
+ 'plugin-host-headless': '@theia/plugin-ext-headless/lib/hosted/node/plugin-host-headless',`)}
757
+ ${this.ifPackage('@theia/process', () => `// Make sure the node-pty thread workers can be executed:
758
+ 'worker/conoutSocketWorker': 'node-pty/lib/worker/conoutSocketWorker',
759
+ 'conpty_console_list_agent': 'node-pty/lib/conpty_console_list_agent',`)}
760
+ ${this.ifPackage('@theia/dev-container', () => `// VS Code Dev-Container communication:
761
+ 'dev-container-server': '@theia/dev-container/lib/dev-container-server/dev-container-server',`)}
762
+ ${this.ifPackage('@theia/plugin-ext', "'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia',")}
763
+ ${this.ifPackage('@theia/filesystem', "'parcel-watcher': '@theia/filesystem/lib/node/parcel-watcher',")}
764
+ ${this.ifPackage('@theia/plugin-ext-vscode', "'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init',")}
765
+ ${this.ifPackage('@theia/api-provider-sample', "'gotd-api-init': '@theia/api-provider-sample/lib/plugin/gotd-api-init',")}
766
+ ${this.ifPackage('@theia/git', "'git-locator-host': '@theia/git/lib/node/git-locator/git-locator-host',")}
767
+ },
768
+ assetNames: 'native/[name]',
769
+ bundle: true,
770
+ outdir: 'lib/backend',
771
+ platform: 'node',
772
+ mainFields: ['node', 'module', 'main'],
773
+ external: ['electron'],
774
+ loader,
775
+ minify,
776
+ sourcemap,
777
+ plugins: [
778
+ problemMatcherPlugin(watch, 'node'),
779
+ nativeDependenciesPlugin({
780
+ pty: ${this.ifPackage('@theia/process', 'true', 'false')},
781
+ ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
782
+ trash: ${this.ifPackage('@theia/filesystem', 'true', 'false')},
783
+ nativeBindings
784
+ }),
785
+ copy({
786
+ assets: [${this.ifPackage('@theia/terminal', `
787
+ {
788
+ // copy shell integration scripts
789
+ from: join(resolvePackagePath('@theia/terminal', __dirname), '..', 'src', 'node', 'shell-integrations', '**', '*'),
790
+ to: join(__dirname, 'lib', 'backend', 'shell-integrations')
791
+ },`)}
792
+ ]
793
+ })
794
+ ]
795
+ };
796
+ `;
797
+ }
798
+
799
+ protected compileESBuildUserConfig(): string {
800
+ return `/**
801
+ * This file can be edited to adjust the ESBuild build process.
802
+ * To reset, delete this file and rerun theia build again.
803
+ */
804
+ import { browserOptions, watch } from './gen-esbuild.browser.mjs';
805
+ ${this.ifBrowserOnly(`import esbuild from 'esbuild';
806
+
807
+ const browserContext = await esbuild.context(browserOptions);
808
+
809
+ if (watch) {
810
+ await browserContext.watch();
811
+ } else {
812
+ try {
813
+ await browserContext.rebuild();
814
+ await browserContext.dispose();
815
+ } catch {
816
+ process.exit(1);
817
+ }
818
+ }`, `import { nodeOptions } from './gen-esbuild.node.mjs';
819
+ ${this.ifElectron("import { electronOptions } from './gen-esbuild.electron.mjs';")}
820
+ import esbuild from 'esbuild';
821
+
822
+ const browserContext = await esbuild.context(browserOptions);
823
+ const nodeContext = await esbuild.context(nodeOptions);
824
+ ${this.ifElectron('const electronContext = await esbuild.context(electronOptions);')}
825
+
826
+ if (watch) {
827
+ await Promise.all([
828
+ browserContext.watch(),
829
+ nodeContext.watch(),${this.ifElectron(`
830
+ electronContext.watch(),`)}
831
+ ]);
832
+ } else {
833
+ try {
834
+ await browserContext.rebuild();
835
+ await browserContext.dispose();
836
+ await nodeContext.rebuild();
837
+ await nodeContext.dispose();${this.ifElectron(`
838
+ await electronContext.rebuild();
839
+ await electronContext.dispose();`)}
840
+ } catch {
841
+ process.exit(1);
842
+ }
843
+ }`)}
844
+ `;
845
+ }
846
+
847
+ protected compileESBuildElectronConfig(): string {
848
+ return `/**
849
+ * Don't touch this file. It will be regenerated by theia build.
850
+ * To customize the build process, change ./esbuild.mjs
851
+ */
852
+ import { problemMatcherPlugin } from '@theia/bundle-plugin';
853
+ import { watch, loader, minify, sourcemap } from './gen-esbuild.browser.mjs';
854
+
855
+ /**
856
+ * @type {import('esbuild').BuildOptions}
857
+ */
858
+ export const electronOptions = {
859
+ entryPoints: {
860
+ 'preload': './src-gen/frontend/preload'
861
+ },
862
+ bundle: true,
863
+ outdir: 'lib/frontend',
864
+ platform: 'node',
865
+ mainFields: ['node', 'module', 'main'],
866
+ external: ['electron'],
867
+ loader,
868
+ minify,
869
+ sourcemap,
870
+ plugins: [
871
+ problemMatcherPlugin(watch, 'electron')
872
+ ]
873
+ };
586
874
  `;
587
875
  }
588
876
 
@@ -19,11 +19,12 @@
19
19
  import { EOL } from 'os';
20
20
  import { AbstractGenerator, GeneratorOptions } from './abstract-generator';
21
21
  import { existsSync, readFileSync } from 'fs';
22
+ import { BundlerGenerator } from './bundler-generator';
22
23
 
23
24
  export class FrontendGenerator extends AbstractGenerator {
24
25
 
25
26
  async generate(options?: GeneratorOptions): Promise<void> {
26
- await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
27
+ await this.write(this.pck.frontend('index.html'), await this.compileIndexHtml(this.pck.targetFrontendModules));
27
28
  await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.targetFrontendPreloadModules));
28
29
  await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
29
30
  await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
@@ -46,11 +47,11 @@ export class FrontendGenerator extends AbstractGenerator {
46
47
  return template;
47
48
  }
48
49
 
49
- protected compileIndexHtml(frontendModules: Map<string, string>): string {
50
+ protected async compileIndexHtml(frontendModules: Map<string, string>): Promise<string> {
50
51
  return `<!DOCTYPE html>
51
52
  <html lang="en">
52
53
 
53
- <head>${this.compileIndexHead(frontendModules)}
54
+ <head>${await this.compileIndexHead(frontendModules)}
54
55
  </head>
55
56
 
56
57
  <body>
@@ -61,11 +62,13 @@ export class FrontendGenerator extends AbstractGenerator {
61
62
  </html>`;
62
63
  }
63
64
 
64
- protected compileIndexHead(frontendModules: Map<string, string>): string {
65
+ protected async compileIndexHead(frontendModules: Map<string, string>): Promise<string> {
66
+ const preferEsbuild = await new BundlerGenerator(this.pck, this.options).preferESBuild();
65
67
  return `
66
68
  <meta charset="UTF-8">
67
69
  <meta name="viewport" content="width=device-width, initial-scale=1">
68
70
  <meta name="apple-mobile-web-app-capable" content="yes">
71
+ ${preferEsbuild ? '<link rel="stylesheet" href="./bundle.css">' : ''}
69
72
  <title>${this.pck.props.frontend.config.applicationName}</title>`;
70
73
  }
71
74
 
@@ -14,6 +14,6 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- export * from './webpack-generator';
17
+ export * from './bundler-generator';
18
18
  export * from './frontend-generator';
19
19
  export * from './backend-generator';
@@ -1,12 +0,0 @@
1
- import { AbstractGenerator } from './abstract-generator';
2
- export declare class WebpackGenerator extends AbstractGenerator {
3
- generate(): Promise<void>;
4
- protected shouldGenerateUserWebpackConfig(): Promise<boolean>;
5
- get configPath(): string;
6
- get genConfigPath(): string;
7
- get genNodeConfigPath(): string;
8
- protected compileWebpackConfig(): string;
9
- protected compileUserWebpackConfig(): string;
10
- protected compileNodeWebpackConfig(): string;
11
- }
12
- //# sourceMappingURL=webpack-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack-generator.d.ts","sourceRoot":"","sources":["../../src/generator/webpack-generator.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,qBAAa,gBAAiB,SAAQ,iBAAiB;IAE7C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;cAUf,+BAA+B,IAAI,OAAO,CAAC,OAAO,CAAC;IAQnE,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,SAAS,CAAC,oBAAoB,IAAI,MAAM;IA4Tx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