@theia/application-manager 1.72.0-next.5 → 1.72.0-next.50
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/lib/application-package-manager.d.ts.map +1 -1
- package/lib/application-package-manager.js +15 -5
- package/lib/application-package-manager.js.map +1 -1
- package/lib/application-process.d.ts +1 -1
- package/lib/application-process.d.ts.map +1 -1
- package/lib/application-process.js.map +1 -1
- package/lib/generator/bundler-generator.d.ts +22 -0
- package/lib/generator/bundler-generator.d.ts.map +1 -0
- package/lib/generator/{webpack-generator.js → bundler-generator.js} +312 -30
- package/lib/generator/bundler-generator.js.map +1 -0
- package/lib/generator/frontend-generator.d.ts +2 -2
- package/lib/generator/frontend-generator.d.ts.map +1 -1
- package/lib/generator/frontend-generator.js +7 -4
- package/lib/generator/frontend-generator.js.map +1 -1
- package/lib/generator/index.d.ts +1 -1
- package/lib/generator/index.js +1 -1
- package/package.json +14 -11
- package/src/application-package-manager.ts +16 -7
- package/src/application-process.ts +1 -1
- package/src/generator/{webpack-generator.ts → bundler-generator.ts} +318 -27
- package/src/generator/frontend-generator.ts +7 -4
- package/src/generator/index.ts +1 -1
- package/lib/generator/webpack-generator.d.ts +0 -12
- package/lib/generator/webpack-generator.d.ts.map +0 -1
- package/lib/generator/webpack-generator.js.map +0 -1
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"front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OAAO,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;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;AAlND,8CAkNC"}
|
package/lib/generator/index.d.ts
CHANGED
package/lib/generator/index.js
CHANGED
|
@@ -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("./
|
|
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.
|
|
3
|
+
"version": "1.72.0-next.50+f26609f54",
|
|
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.
|
|
36
|
-
"@electron/rebuild": "^4.0.
|
|
37
|
-
"@theia/application-package": "1.72.0-next.
|
|
38
|
-
"@theia/
|
|
39
|
-
"@theia/
|
|
35
|
+
"@babel/preset-env": "^7.29.3",
|
|
36
|
+
"@electron/rebuild": "^4.0.4",
|
|
37
|
+
"@theia/application-package": "1.72.0-next.50+f26609f54",
|
|
38
|
+
"@theia/bundle-plugin": "1.72.0-next.50+f26609f54",
|
|
39
|
+
"@theia/ffmpeg": "1.72.0-next.50+f26609f54",
|
|
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
|
-
"
|
|
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.
|
|
63
|
+
"tslib": "^2.8.1",
|
|
61
64
|
"umd-compat-loader": "^2.1.2",
|
|
62
|
-
"webpack": "^5.
|
|
65
|
+
"webpack": "^5.106.2",
|
|
63
66
|
"webpack-cli": "4.7.0",
|
|
64
67
|
"worker-loader": "^3.0.8",
|
|
65
|
-
"yargs": "^
|
|
68
|
+
"yargs": "^17.7.2"
|
|
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": "
|
|
84
|
+
"gitHead": "f26609f5411c7101a4b2f540584b8163a6036131"
|
|
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 {
|
|
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');
|
|
@@ -45,7 +45,7 @@ export class ApplicationPackageManager {
|
|
|
45
45
|
return cli
|
|
46
46
|
.option('mode', {
|
|
47
47
|
description: 'Generation mode to use',
|
|
48
|
-
choices: ['development', 'production'],
|
|
48
|
+
choices: ['development', 'production'] as const,
|
|
49
49
|
default: 'production' as const,
|
|
50
50
|
})
|
|
51
51
|
.option('split-frontend', {
|
|
@@ -73,12 +73,15 @@ export class ApplicationPackageManager {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
async clean(): Promise<void> {
|
|
76
|
-
const
|
|
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(
|
|
81
|
-
this.remove(
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
21
|
+
export class BundlerGenerator extends AbstractGenerator {
|
|
22
22
|
|
|
23
23
|
async generate(): Promise<void> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
|
|
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.
|
|
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/
|
|
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/
|
|
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,264 @@ 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, sourceMapPathsPlugin } 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
|
+
sourceMapPathsPlugin()
|
|
724
|
+
]
|
|
725
|
+
};
|
|
726
|
+
`;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
protected compileESBuildNodeConfig(): string {
|
|
730
|
+
return `/**
|
|
731
|
+
* Don't touch this file. It will be regenerated by theia build.
|
|
732
|
+
* To customize the build process, change ./esbuild.mjs
|
|
733
|
+
*/
|
|
734
|
+
import { nativeDependenciesPlugin, problemMatcherPlugin, sourceMapPathsPlugin } from '@theia/bundle-plugin';
|
|
735
|
+
import { watch, loader, minify, sourcemap, join, __dirname } from './gen-esbuild.browser.mjs';
|
|
736
|
+
import { copy } from 'esbuild-plugin-copy';
|
|
737
|
+
import resolvePackagePath from 'resolve-package-path';
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* @type {Record<string, string>}
|
|
741
|
+
*/
|
|
742
|
+
export const nativeBindings = {
|
|
743
|
+
drivelist: 'drivelist/build/Release/drivelist.node'
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @type {import('esbuild').BuildOptions}
|
|
748
|
+
*/
|
|
749
|
+
export const nodeOptions = {
|
|
750
|
+
entryPoints: {
|
|
751
|
+
'main': './src-gen/backend/main',
|
|
752
|
+
'ipc-bootstrap': '@theia/core/lib/node/messaging/ipc-bootstrap',
|
|
753
|
+
${this.ifElectron("'electron-main': './src-gen/backend/electron-main',")}
|
|
754
|
+
${this.ifPackage('@theia/plugin-ext', () => `// VS Code extension support:
|
|
755
|
+
'plugin-host': '@theia/plugin-ext/lib/hosted/node/plugin-host',`)}
|
|
756
|
+
${this.ifPackage('@theia/plugin-ext-headless', () => `// Theia Headless Plugin support:
|
|
757
|
+
'plugin-host-headless': '@theia/plugin-ext-headless/lib/hosted/node/plugin-host-headless',`)}
|
|
758
|
+
${this.ifPackage('@theia/process', () => `// Make sure the node-pty thread workers can be executed:
|
|
759
|
+
'worker/conoutSocketWorker': 'node-pty/lib/worker/conoutSocketWorker',
|
|
760
|
+
'conpty_console_list_agent': 'node-pty/lib/conpty_console_list_agent',`)}
|
|
761
|
+
${this.ifPackage('@theia/dev-container', () => `// VS Code Dev-Container communication:
|
|
762
|
+
'dev-container-server': '@theia/dev-container/lib/dev-container-server/dev-container-server',`)}
|
|
763
|
+
${this.ifPackage('@theia/plugin-ext', "'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia',")}
|
|
764
|
+
${this.ifPackage('@theia/filesystem', "'parcel-watcher': '@theia/filesystem/lib/node/parcel-watcher',")}
|
|
765
|
+
${this.ifPackage('@theia/plugin-ext-vscode', "'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init',")}
|
|
766
|
+
${this.ifPackage('@theia/api-provider-sample', "'gotd-api-init': '@theia/api-provider-sample/lib/plugin/gotd-api-init',")}
|
|
767
|
+
${this.ifPackage('@theia/git', "'git-locator-host': '@theia/git/lib/node/git-locator/git-locator-host',")}
|
|
768
|
+
},
|
|
769
|
+
assetNames: 'native/[name]',
|
|
770
|
+
bundle: true,
|
|
771
|
+
outdir: 'lib/backend',
|
|
772
|
+
platform: 'node',
|
|
773
|
+
mainFields: ['node', 'module', 'main'],
|
|
774
|
+
external: ['electron'],
|
|
775
|
+
loader,
|
|
776
|
+
minify,
|
|
777
|
+
sourcemap,
|
|
778
|
+
plugins: [
|
|
779
|
+
problemMatcherPlugin(watch, 'node'),
|
|
780
|
+
nativeDependenciesPlugin({
|
|
781
|
+
pty: ${this.ifPackage('@theia/process', 'true', 'false')},
|
|
782
|
+
ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
|
|
783
|
+
trash: ${this.ifPackage('@theia/filesystem', 'true', 'false')},
|
|
784
|
+
nativeBindings
|
|
785
|
+
}),
|
|
786
|
+
copy({
|
|
787
|
+
assets: [${this.ifPackage('@theia/terminal', `
|
|
788
|
+
{
|
|
789
|
+
// copy shell integration scripts
|
|
790
|
+
from: join(resolvePackagePath('@theia/terminal', __dirname), '..', 'src', 'node', 'shell-integrations', '**', '*'),
|
|
791
|
+
to: join(__dirname, 'lib', 'backend', 'shell-integrations')
|
|
792
|
+
},`)}
|
|
793
|
+
]
|
|
794
|
+
}),
|
|
795
|
+
sourceMapPathsPlugin()
|
|
796
|
+
]
|
|
797
|
+
};
|
|
798
|
+
`;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
protected compileESBuildUserConfig(): string {
|
|
802
|
+
return `/**
|
|
803
|
+
* This file can be edited to adjust the ESBuild build process.
|
|
804
|
+
* To reset, delete this file and rerun theia build again.
|
|
805
|
+
*/
|
|
806
|
+
import { browserOptions, watch } from './gen-esbuild.browser.mjs';
|
|
807
|
+
${this.ifBrowserOnly(`import esbuild from 'esbuild';
|
|
808
|
+
|
|
809
|
+
const browserContext = await esbuild.context(browserOptions);
|
|
810
|
+
|
|
811
|
+
if (watch) {
|
|
812
|
+
await browserContext.watch();
|
|
813
|
+
} else {
|
|
814
|
+
try {
|
|
815
|
+
await browserContext.rebuild();
|
|
816
|
+
await browserContext.dispose();
|
|
817
|
+
} catch {
|
|
818
|
+
process.exit(1);
|
|
819
|
+
}
|
|
820
|
+
}`, `import { nodeOptions } from './gen-esbuild.node.mjs';
|
|
821
|
+
${this.ifElectron("import { electronOptions } from './gen-esbuild.electron.mjs';")}
|
|
822
|
+
import esbuild from 'esbuild';
|
|
823
|
+
|
|
824
|
+
const browserContext = await esbuild.context(browserOptions);
|
|
825
|
+
const nodeContext = await esbuild.context(nodeOptions);
|
|
826
|
+
${this.ifElectron('const electronContext = await esbuild.context(electronOptions);')}
|
|
827
|
+
|
|
828
|
+
if (watch) {
|
|
829
|
+
await Promise.all([
|
|
830
|
+
browserContext.watch(),
|
|
831
|
+
nodeContext.watch(),${this.ifElectron(`
|
|
832
|
+
electronContext.watch(),`)}
|
|
833
|
+
]);
|
|
834
|
+
} else {
|
|
835
|
+
try {
|
|
836
|
+
await browserContext.rebuild();
|
|
837
|
+
await browserContext.dispose();
|
|
838
|
+
await nodeContext.rebuild();
|
|
839
|
+
await nodeContext.dispose();${this.ifElectron(`
|
|
840
|
+
await electronContext.rebuild();
|
|
841
|
+
await electronContext.dispose();`)}
|
|
842
|
+
} catch {
|
|
843
|
+
process.exit(1);
|
|
844
|
+
}
|
|
845
|
+
}`)}
|
|
846
|
+
`;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
protected compileESBuildElectronConfig(): string {
|
|
850
|
+
return `/**
|
|
851
|
+
* Don't touch this file. It will be regenerated by theia build.
|
|
852
|
+
* To customize the build process, change ./esbuild.mjs
|
|
853
|
+
*/
|
|
854
|
+
import { problemMatcherPlugin, sourceMapPathsPlugin } from '@theia/bundle-plugin';
|
|
855
|
+
import { watch, loader, minify, sourcemap } from './gen-esbuild.browser.mjs';
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* @type {import('esbuild').BuildOptions}
|
|
859
|
+
*/
|
|
860
|
+
export const electronOptions = {
|
|
861
|
+
entryPoints: {
|
|
862
|
+
'preload': './src-gen/frontend/preload'
|
|
863
|
+
},
|
|
864
|
+
bundle: true,
|
|
865
|
+
outdir: 'lib/frontend',
|
|
866
|
+
platform: 'node',
|
|
867
|
+
mainFields: ['node', 'module', 'main'],
|
|
868
|
+
external: ['electron'],
|
|
869
|
+
loader,
|
|
870
|
+
minify,
|
|
871
|
+
sourcemap,
|
|
872
|
+
plugins: [
|
|
873
|
+
problemMatcherPlugin(watch, 'electron'),
|
|
874
|
+
sourceMapPathsPlugin()
|
|
875
|
+
]
|
|
876
|
+
};
|
|
586
877
|
`;
|
|
587
878
|
}
|
|
588
879
|
|
|
@@ -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
|
|
package/src/generator/index.ts
CHANGED
|
@@ -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 './
|
|
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;IA4TxC,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAyB5C,SAAS,CAAC,wBAAwB,IAAI,MAAM;CAmM/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-generator.js","sourceRoot":"","sources":["../../src/generator/webpack-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;;;AAEh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