@theia/application-manager 1.39.0-next.9 → 1.40.0
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 +24 -7
- package/lib/application-package-manager.js.map +1 -1
- package/lib/application-process.js +1 -1
- package/lib/application-process.js.map +1 -1
- package/lib/expose-loader.js +2 -2
- package/lib/expose-loader.js.map +1 -1
- package/lib/generator/abstract-generator.d.ts +1 -0
- package/lib/generator/abstract-generator.d.ts.map +1 -1
- package/lib/generator/abstract-generator.js +14 -2
- package/lib/generator/abstract-generator.js.map +1 -1
- package/lib/generator/backend-generator.d.ts +1 -0
- package/lib/generator/backend-generator.d.ts.map +1 -1
- package/lib/generator/backend-generator.js +72 -3
- package/lib/generator/backend-generator.js.map +1 -1
- package/lib/generator/frontend-generator.d.ts +0 -1
- package/lib/generator/frontend-generator.d.ts.map +1 -1
- package/lib/generator/frontend-generator.js +1 -68
- package/lib/generator/frontend-generator.js.map +1 -1
- package/lib/generator/index.js +1 -1
- package/lib/generator/index.js.map +1 -1
- package/lib/generator/webpack-generator.d.ts +2 -0
- package/lib/generator/webpack-generator.d.ts.map +1 -1
- package/lib/generator/webpack-generator.js +161 -9
- package/lib/generator/webpack-generator.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/package.spec.js +1 -1
- package/lib/package.spec.js.map +1 -1
- package/lib/rebuild.d.ts.map +1 -1
- package/lib/rebuild.js +4 -1
- package/lib/rebuild.js.map +1 -1
- package/package.json +8 -6
- package/src/application-package-manager.ts +16 -5
- package/src/application-process.ts +1 -1
- package/src/expose-loader.ts +1 -1
- package/src/generator/abstract-generator.ts +14 -2
- package/src/generator/backend-generator.ts +73 -3
- package/src/generator/frontend-generator.ts +1 -69
- package/src/generator/index.ts +1 -1
- package/src/generator/webpack-generator.ts +163 -9
- package/src/index.ts +1 -1
- package/src/package.spec.ts +1 -1
- package/src/rebuild.ts +4 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// with the GNU Classpath Exception which is available at
|
|
13
13
|
// https://www.gnu.org/software/classpath/license.html.
|
|
14
14
|
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.WebpackGenerator = void 0;
|
|
@@ -22,6 +22,7 @@ const abstract_generator_1 = require("./abstract-generator");
|
|
|
22
22
|
class WebpackGenerator extends abstract_generator_1.AbstractGenerator {
|
|
23
23
|
async generate() {
|
|
24
24
|
await this.write(this.genConfigPath, this.compileWebpackConfig());
|
|
25
|
+
await this.write(this.genNodeConfigPath, this.compileNodeWebpackConfig());
|
|
25
26
|
if (await this.shouldGenerateUserWebpackConfig()) {
|
|
26
27
|
await this.write(this.configPath, this.compileUserWebpackConfig());
|
|
27
28
|
}
|
|
@@ -39,6 +40,9 @@ class WebpackGenerator extends abstract_generator_1.AbstractGenerator {
|
|
|
39
40
|
get genConfigPath() {
|
|
40
41
|
return this.pck.path('gen-webpack.config.js');
|
|
41
42
|
}
|
|
43
|
+
get genNodeConfigPath() {
|
|
44
|
+
return this.pck.path('gen-webpack.node.config.js');
|
|
45
|
+
}
|
|
42
46
|
resolve(moduleName, path) {
|
|
43
47
|
return this.pck.resolveModulePath(moduleName, path).split(paths.sep).join('/');
|
|
44
48
|
}
|
|
@@ -51,11 +55,12 @@ class WebpackGenerator extends abstract_generator_1.AbstractGenerator {
|
|
|
51
55
|
const path = require('path');
|
|
52
56
|
const webpack = require('webpack');
|
|
53
57
|
const yargs = require('yargs');
|
|
58
|
+
const resolvePackagePath = require('resolve-package-path');
|
|
54
59
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
55
60
|
const CompressionPlugin = require('compression-webpack-plugin')
|
|
56
61
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
57
62
|
|
|
58
|
-
const outputPath = path.resolve(__dirname, 'lib');
|
|
63
|
+
const outputPath = path.resolve(__dirname, 'lib', 'frontend');
|
|
59
64
|
const { mode, staticCompression } = yargs.option('mode', {
|
|
60
65
|
description: "Mode to use",
|
|
61
66
|
choices: ["development", "production"],
|
|
@@ -69,10 +74,17 @@ const development = mode === 'development';
|
|
|
69
74
|
|
|
70
75
|
const plugins = [
|
|
71
76
|
new CopyWebpackPlugin({
|
|
72
|
-
patterns: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
patterns: [
|
|
78
|
+
{
|
|
79
|
+
// copy secondary window html file to lib folder
|
|
80
|
+
from: path.resolve(__dirname, 'src-gen/frontend/secondary-window.html')
|
|
81
|
+
}${this.ifPackage('@theia/plugin-ext', `,
|
|
82
|
+
{
|
|
83
|
+
// copy webview files to lib folder
|
|
84
|
+
from: path.join(resolvePackagePath('@theia/plugin-ext', __dirname), '..', 'src', 'main', 'browser', 'webview', 'pre'),
|
|
85
|
+
to: path.resolve(__dirname, 'lib', 'webview', 'pre')
|
|
86
|
+
}`)}
|
|
87
|
+
]
|
|
76
88
|
}),
|
|
77
89
|
new webpack.ProvidePlugin({
|
|
78
90
|
// the Buffer class doesn't exist in the browser but some dependencies rely on it
|
|
@@ -299,18 +311,158 @@ module.exports = [{
|
|
|
299
311
|
* To reset delete this file and rerun theia build again.
|
|
300
312
|
*/
|
|
301
313
|
// @ts-check
|
|
302
|
-
const
|
|
314
|
+
const configs = require('./${paths.basename(this.genConfigPath)}');
|
|
315
|
+
const nodeConfig = require('./${paths.basename(this.genNodeConfigPath)}');
|
|
303
316
|
|
|
304
317
|
/**
|
|
305
318
|
* Expose bundled modules on window.theia.moduleName namespace, e.g.
|
|
306
319
|
* window['theia']['@theia/core/lib/common/uri'].
|
|
307
320
|
* Such syntax can be used by external code, for instance, for testing.
|
|
308
|
-
|
|
321
|
+
configs[0].module.rules.push({
|
|
309
322
|
test: /\\.js$/,
|
|
310
323
|
loader: require.resolve('@theia/application-manager/lib/expose-loader')
|
|
311
324
|
}); */
|
|
312
325
|
|
|
313
|
-
module.exports =
|
|
326
|
+
module.exports = [
|
|
327
|
+
...configs,
|
|
328
|
+
nodeConfig.config
|
|
329
|
+
];`;
|
|
330
|
+
}
|
|
331
|
+
compileNodeWebpackConfig() {
|
|
332
|
+
return `/**
|
|
333
|
+
* Don't touch this file. It will be regenerated by theia build.
|
|
334
|
+
* To customize webpack configuration change ${this.configPath}
|
|
335
|
+
*/
|
|
336
|
+
// @ts-check
|
|
337
|
+
const path = require('path');
|
|
338
|
+
const yargs = require('yargs');
|
|
339
|
+
const webpack = require('webpack');
|
|
340
|
+
const TerserPlugin = require('terser-webpack-plugin');
|
|
341
|
+
const NativeWebpackPlugin = require('@theia/native-webpack-plugin');
|
|
342
|
+
|
|
343
|
+
const { mode } = yargs.option('mode', {
|
|
344
|
+
description: "Mode to use",
|
|
345
|
+
choices: ["development", "production"],
|
|
346
|
+
default: "production"
|
|
347
|
+
}).argv;
|
|
348
|
+
|
|
349
|
+
const production = mode === 'production';
|
|
350
|
+
|
|
351
|
+
/** @type {import('webpack').EntryObject} */
|
|
352
|
+
const commonJsLibraries = {};
|
|
353
|
+
for (const [entryPointName, entryPointPath] of Object.entries({
|
|
354
|
+
${this.ifPackage('@theia/plugin-ext', "'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia',")}
|
|
355
|
+
${this.ifPackage('@theia/filesystem', "'nsfw-watcher': '@theia/filesystem/lib/node/nsfw-watcher',")}
|
|
356
|
+
${this.ifPackage('@theia/plugin-ext-vscode', "'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init',")}
|
|
357
|
+
})) {
|
|
358
|
+
commonJsLibraries[entryPointName] = {
|
|
359
|
+
import: require.resolve(entryPointPath),
|
|
360
|
+
library: {
|
|
361
|
+
type: 'commonjs2',
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const ignoredResources = new Set();
|
|
367
|
+
|
|
368
|
+
if (process.platform !== 'win32') {
|
|
369
|
+
ignoredResources.add('@vscode/windows-ca-certs');
|
|
370
|
+
ignoredResources.add('@vscode/windows-ca-certs/build/Release/crypt32.node');
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const nativePlugin = new NativeWebpackPlugin({
|
|
374
|
+
out: 'native',
|
|
375
|
+
ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
|
|
376
|
+
pty: ${this.ifPackage('@theia/process', 'true', 'false')},
|
|
377
|
+
nativeBindings: {
|
|
378
|
+
drivelist: 'drivelist/build/Release/drivelist.node'
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
/** @type {import('webpack').Configuration} */
|
|
383
|
+
const config = {
|
|
384
|
+
mode,
|
|
385
|
+
devtool: mode === 'development' ? 'source-map' : false,
|
|
386
|
+
target: 'node',
|
|
387
|
+
node: {
|
|
388
|
+
global: false,
|
|
389
|
+
__filename: false,
|
|
390
|
+
__dirname: false
|
|
391
|
+
},
|
|
392
|
+
output: {
|
|
393
|
+
filename: '[name].js',
|
|
394
|
+
path: path.resolve(__dirname, 'lib', 'backend'),
|
|
395
|
+
devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]?[loaders]',
|
|
396
|
+
},${this.ifElectron(`
|
|
397
|
+
externals: {
|
|
398
|
+
electron: 'require("electron")'
|
|
399
|
+
},`)}
|
|
400
|
+
entry: {
|
|
401
|
+
// Main entry point of the Theia application backend:
|
|
402
|
+
'main': require.resolve('./src-gen/backend/main'),
|
|
403
|
+
// Theia's IPC mechanism:
|
|
404
|
+
'ipc-bootstrap': require.resolve('@theia/core/lib/node/messaging/ipc-bootstrap'),
|
|
405
|
+
${this.ifPackage('@theia/plugin-ext', () => `// VS Code extension support:
|
|
406
|
+
'plugin-host': require.resolve('@theia/plugin-ext/lib/hosted/node/plugin-host'),`)}
|
|
407
|
+
${this.ifPackage('@theia/process', () => `// Make sure the node-pty thread worker can be executed:
|
|
408
|
+
'worker/conoutSocketWorker': require.resolve('node-pty/lib/worker/conoutSocketWorker'),`)}
|
|
409
|
+
${this.ifPackage('@theia/git', () => `// Ensure the git locator process can the started
|
|
410
|
+
'git-locator-host': require.resolve('@theia/git/lib/node/git-locator/git-locator-host'),`)}
|
|
411
|
+
${this.ifElectron("'electron-main': require.resolve('./src-gen/backend/electron-main'),")}
|
|
412
|
+
...commonJsLibraries
|
|
413
|
+
},
|
|
414
|
+
module: {
|
|
415
|
+
rules: [
|
|
416
|
+
// Make sure we can still find and load our native addons.
|
|
417
|
+
{
|
|
418
|
+
test: /\\.node$/,
|
|
419
|
+
loader: 'node-loader',
|
|
420
|
+
options: {
|
|
421
|
+
name: 'native/[name].[ext]'
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
test: /\\.js$/,
|
|
426
|
+
enforce: 'pre',
|
|
427
|
+
loader: 'source-map-loader'
|
|
428
|
+
},
|
|
429
|
+
// jsonc-parser exposes its UMD implementation by default, which
|
|
430
|
+
// confuses Webpack leading to missing js in the bundles.
|
|
431
|
+
{
|
|
432
|
+
test: /node_modules[\\/](jsonc-parser)/,
|
|
433
|
+
loader: 'umd-compat-loader'
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
plugins: [
|
|
438
|
+
// Some native dependencies (bindings, @vscode/ripgrep) need special code replacements
|
|
439
|
+
nativePlugin,
|
|
440
|
+
// Optional node dependencies can be safely ignored
|
|
441
|
+
new webpack.IgnorePlugin({
|
|
442
|
+
checkResource: resource => ignoredResources.has(resource)
|
|
443
|
+
})
|
|
444
|
+
],
|
|
445
|
+
optimization: {
|
|
446
|
+
// Split and reuse code across the various entry points
|
|
447
|
+
splitChunks: {
|
|
448
|
+
chunks: 'all'
|
|
449
|
+
},
|
|
450
|
+
// Only minimize if we run webpack in production mode
|
|
451
|
+
minimize: production,
|
|
452
|
+
minimizer: [
|
|
453
|
+
new TerserPlugin({
|
|
454
|
+
exclude: /^(lib|builtins)\\//
|
|
455
|
+
})
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
module.exports = {
|
|
461
|
+
config,
|
|
462
|
+
nativePlugin,
|
|
463
|
+
ignoredResources
|
|
464
|
+
};
|
|
465
|
+
`;
|
|
314
466
|
}
|
|
315
467
|
}
|
|
316
468
|
exports.WebpackGenerator = WebpackGenerator;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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;;;AAEhF,8BAA8B;AAC9B,+BAA+B;AAC/B,6DAAyD;AAEzD,MAAa,gBAAiB,SAAQ,sCAAiB;IAEnD,KAAK,CAAC,QAAQ;QACV,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;QAClE,MAAM,IAAI,CAAC,KAAK,CAAC,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AC;UACvF,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC;iGACoD,CAAC;UACxF,IAAI,CAAC,UAAU,CAAC,sEAAsE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDhG,CAAC;IACE,CAAC;CAEJ;AAvcD,4CAucC"}
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// with the GNU Classpath Exception which is available at
|
|
13
13
|
// https://www.gnu.org/software/classpath/license.html.
|
|
14
14
|
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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,4CAA0B;AAC1B,gEAA8C;AAC9C,wDAAsC"}
|
package/lib/package.spec.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
/* note: this bogus test file is required so that
|
|
17
17
|
we are able to run mocha unit tests on this
|
package/lib/package.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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,6BAA6B,EAAE,GAAG,EAAE;IAEzC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
|
package/lib/rebuild.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebuild.d.ts","sourceRoot":"","sources":["../src/rebuild.ts"],"names":[],"mappings":"AAqBA,oBAAY,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;AASnD,aAAK,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/B,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"rebuild.d.ts","sourceRoot":"","sources":["../src/rebuild.ts"],"names":[],"mappings":"AAqBA,oBAAY,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;AASnD,aAAK,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/B,eAAO,MAAM,eAAe,UAS3B,CAAC;AAEF,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,cAAmB,GAAG,IAAI,CAuBjF"}
|
package/lib/rebuild.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// with the GNU Classpath Exception which is available at
|
|
13
13
|
// https://www.gnu.org/software/classpath/license.html.
|
|
14
14
|
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.rebuild = exports.DEFAULT_MODULES = void 0;
|
|
@@ -27,6 +27,9 @@ exports.DEFAULT_MODULES = [
|
|
|
27
27
|
'native-keymap',
|
|
28
28
|
'find-git-repositories',
|
|
29
29
|
'drivelist',
|
|
30
|
+
'keytar',
|
|
31
|
+
'ssh2',
|
|
32
|
+
'cpu-features'
|
|
30
33
|
];
|
|
31
34
|
/**
|
|
32
35
|
* @param target What to rebuild for.
|
package/lib/rebuild.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../src/rebuild.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,
|
|
1
|
+
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../src/rebuild.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,oCAAqC;AACrC,+BAAgC;AAChC,6BAA8B;AAC9B,yBAA0B;AAI1B,MAAM,YAAY,GAAqB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAShD,QAAA,eAAe,GAAG;IAC3B,UAAU;IACV,MAAM;IACN,eAAe;IACf,uBAAuB;IACvB,WAAW;IACX,QAAQ;IACR,MAAM;IACN,cAAc;CACjB,CAAC;AAkBF;;;GAGG;AACH,SAAgB,OAAO,CAAC,MAAqB,EAAE,UAA0B,EAAE;IACvE,MAAM,EACF,OAAO,GAAG,uBAAe,EACzB,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,EACzB,QAAQ,GACX,GAAG,OAAO,CAAC;IACZ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACxC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iBvE,CAAC;IAdG,QAAQ,CAAC,QAA0C;QAC/C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,aAAa;QACT,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,WAAW,CAAC,MAAsB;QAC9B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;YACpC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACpB;IACL,CAAC;CACJ;AAED;;GAEG;AACH,KAAK,UAAU,aAAa,CAAC,KAAgB,EAAE,OAA6B;IACxE,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE;QACvB,IAAI;YACA,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,CAAA,CAAC;SACrB;gBAAS;YACN,4CAA4C;YAC5C,MAAM,KAAK,CAAC,aAAa,EAAG,CAAC;SAChC;KACJ;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/application-manager",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "Theia application manager API.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
|
|
8
|
+
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/eclipse-theia/theia.git"
|
|
@@ -33,8 +33,9 @@
|
|
|
33
33
|
"@babel/plugin-transform-classes": "^7.10.0",
|
|
34
34
|
"@babel/plugin-transform-runtime": "^7.10.0",
|
|
35
35
|
"@babel/preset-env": "^7.10.0",
|
|
36
|
-
"@theia/application-package": "1.
|
|
37
|
-
"@theia/ffmpeg": "1.
|
|
36
|
+
"@theia/application-package": "1.40.0",
|
|
37
|
+
"@theia/ffmpeg": "1.40.0",
|
|
38
|
+
"@theia/native-webpack-plugin": "1.40.0",
|
|
38
39
|
"@types/fs-extra": "^4.0.2",
|
|
39
40
|
"@types/semver": "^7.3.8",
|
|
40
41
|
"babel-loader": "^8.2.2",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"less": "^3.0.3",
|
|
49
50
|
"mini-css-extract-plugin": "^2.6.1",
|
|
50
51
|
"node-abi": "*",
|
|
52
|
+
"node-loader": "^2.0.0",
|
|
51
53
|
"path-browserify": "^1.0.1",
|
|
52
54
|
"semver": "^7.3.5",
|
|
53
55
|
"setimmediate": "^1.0.5",
|
|
@@ -71,11 +73,11 @@
|
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
"devDependencies": {
|
|
74
|
-
"@theia/ext-scripts": "1.
|
|
76
|
+
"@theia/ext-scripts": "1.40.0",
|
|
75
77
|
"@types/node-abi": "*"
|
|
76
78
|
},
|
|
77
79
|
"nyc": {
|
|
78
80
|
"extends": "../../configs/nyc.json"
|
|
79
81
|
},
|
|
80
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "b2c84f963c24bde22dbdecd8c506eccc0768f400"
|
|
81
83
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as path from 'path';
|
|
@@ -104,8 +104,8 @@ export class ApplicationPackageManager {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
async copy(): Promise<void> {
|
|
107
|
-
await fs.ensureDir(this.pck.lib());
|
|
108
|
-
await fs.copy(this.pck.frontend('index.html'), this.pck.lib('index.html'));
|
|
107
|
+
await fs.ensureDir(this.pck.lib('frontend'));
|
|
108
|
+
await fs.copy(this.pck.frontend('index.html'), this.pck.lib('frontend', 'index.html'));
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
async build(args: string[] = [], options: GeneratorOptions = {}): Promise<void> {
|
|
@@ -127,7 +127,12 @@ export class ApplicationPackageManager {
|
|
|
127
127
|
let appPath = this.pck.projectPath;
|
|
128
128
|
|
|
129
129
|
if (!this.pck.pck.main) {
|
|
130
|
-
|
|
130
|
+
// Try the bundled electron app first
|
|
131
|
+
appPath = this.pck.lib('backend', 'electron-main.js');
|
|
132
|
+
if (!fs.existsSync(appPath)) {
|
|
133
|
+
// Fallback to the generated electron app in src-gen
|
|
134
|
+
appPath = this.pck.backend('electron-main.js');
|
|
135
|
+
}
|
|
131
136
|
|
|
132
137
|
console.warn(
|
|
133
138
|
`WARNING: ${this.pck.packagePath} does not have a "main" entry.\n` +
|
|
@@ -146,7 +151,13 @@ export class ApplicationPackageManager {
|
|
|
146
151
|
// The backend must be a process group leader on UNIX in order to kill the tree later.
|
|
147
152
|
// See https://nodejs.org/api/child_process.html#child_process_options_detached
|
|
148
153
|
options.detached = process.platform !== 'win32';
|
|
149
|
-
|
|
154
|
+
// Try the bundled backend app first
|
|
155
|
+
let mainPath = this.pck.lib('backend', 'main.js');
|
|
156
|
+
if (!fs.existsSync(mainPath)) {
|
|
157
|
+
// Fallback to the generated backend file in src-gen
|
|
158
|
+
mainPath = this.pck.backend('main.js');
|
|
159
|
+
}
|
|
160
|
+
return this.__process.fork(mainPath, mainArgs, options);
|
|
150
161
|
}
|
|
151
162
|
|
|
152
163
|
/**
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as path from 'path';
|
package/src/expose-loader.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as fs from 'fs-extra';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as os from 'os';
|
|
@@ -71,7 +71,19 @@ export abstract class AbstractGenerator {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
protected ifMonaco(value: () => string, defaultValue: () => string = () => ''): string {
|
|
74
|
-
return
|
|
74
|
+
return this.ifPackage([
|
|
75
|
+
'@theia/monaco',
|
|
76
|
+
'@theia/monaco-editor-core'
|
|
77
|
+
], value, defaultValue);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
protected ifPackage(packageName: string | string[], value: string | (() => string), defaultValue: string | (() => string) = ''): string {
|
|
81
|
+
const packages = Array.isArray(packageName) ? packageName : [packageName];
|
|
82
|
+
if (this.pck.extensionPackages.some(e => packages.includes(e.name))) {
|
|
83
|
+
return typeof value === 'string' ? value : value();
|
|
84
|
+
} else {
|
|
85
|
+
return typeof defaultValue === 'string' ? defaultValue : defaultValue();
|
|
86
|
+
}
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
protected prettyStringify(object: object): string {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// with the GNU Classpath Exception which is available at
|
|
12
12
|
// https://www.gnu.org/software/classpath/license.html.
|
|
13
13
|
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { AbstractGenerator } from './abstract-generator';
|
|
@@ -22,6 +22,76 @@ export class BackendGenerator extends AbstractGenerator {
|
|
|
22
22
|
const backendModules = this.pck.targetBackendModules;
|
|
23
23
|
await this.write(this.pck.backend('server.js'), this.compileServer(backendModules));
|
|
24
24
|
await this.write(this.pck.backend('main.js'), this.compileMain(backendModules));
|
|
25
|
+
if (this.pck.isElectron()) {
|
|
26
|
+
await this.write(this.pck.backend('electron-main.js'), this.compileElectronMain(this.pck.targetElectronMainModules));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
protected compileElectronMain(electronMainModules?: Map<string, string>): string {
|
|
31
|
+
return `// @ts-check
|
|
32
|
+
|
|
33
|
+
require('reflect-metadata');
|
|
34
|
+
|
|
35
|
+
// Useful for Electron/NW.js apps as GUI apps on macOS doesn't inherit the \`$PATH\` define
|
|
36
|
+
// in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).
|
|
37
|
+
// https://github.com/electron/electron/issues/550#issuecomment-162037357
|
|
38
|
+
// https://github.com/eclipse-theia/theia/pull/3534#issuecomment-439689082
|
|
39
|
+
require('fix-path')();
|
|
40
|
+
|
|
41
|
+
// Workaround for https://github.com/electron/electron/issues/9225. Chrome has an issue where
|
|
42
|
+
// in certain locales (e.g. PL), image metrics are wrongly computed. We explicitly set the
|
|
43
|
+
// LC_NUMERIC to prevent this from happening (selects the numeric formatting category of the
|
|
44
|
+
// C locale, http://en.cppreference.com/w/cpp/locale/LC_categories).
|
|
45
|
+
if (process.env.LC_ALL) {
|
|
46
|
+
process.env.LC_ALL = 'C';
|
|
47
|
+
}
|
|
48
|
+
process.env.LC_NUMERIC = 'C';
|
|
49
|
+
|
|
50
|
+
const { default: electronMainApplicationModule } = require('@theia/core/lib/electron-main/electron-main-application-module');
|
|
51
|
+
const { ElectronMainApplication, ElectronMainApplicationGlobals } = require('@theia/core/lib/electron-main/electron-main-application');
|
|
52
|
+
const { Container } = require('inversify');
|
|
53
|
+
const { resolve } = require('path');
|
|
54
|
+
const { app } = require('electron');
|
|
55
|
+
|
|
56
|
+
// Fix the window reloading issue, see: https://github.com/electron/electron/issues/22119
|
|
57
|
+
app.allowRendererProcessReuse = false;
|
|
58
|
+
|
|
59
|
+
const config = ${this.prettyStringify(this.pck.props.frontend.config)};
|
|
60
|
+
const isSingleInstance = ${this.pck.props.backend.config.singleInstance === true ? 'true' : 'false'};
|
|
61
|
+
|
|
62
|
+
if (isSingleInstance && !app.requestSingleInstanceLock()) {
|
|
63
|
+
// There is another instance running, exit now. The other instance will request focus.
|
|
64
|
+
app.quit();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const container = new Container();
|
|
69
|
+
container.load(electronMainApplicationModule);
|
|
70
|
+
container.bind(ElectronMainApplicationGlobals).toConstantValue({
|
|
71
|
+
THEIA_APP_PROJECT_PATH: resolve(__dirname, '..', '..'),
|
|
72
|
+
THEIA_BACKEND_MAIN_PATH: resolve(__dirname, 'main.js'),
|
|
73
|
+
THEIA_FRONTEND_HTML_PATH: resolve(__dirname, '..', '..', 'lib', 'frontend', 'index.html'),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
function load(raw) {
|
|
77
|
+
return Promise.resolve(raw.default).then(module =>
|
|
78
|
+
container.load(module)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function start() {
|
|
83
|
+
const application = container.get(ElectronMainApplication);
|
|
84
|
+
await application.start(config);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = Promise.resolve()${this.compileElectronMainModuleImports(electronMainModules)}
|
|
88
|
+
.then(start).catch(reason => {
|
|
89
|
+
console.error('Failed to start the electron application.');
|
|
90
|
+
if (reason) {
|
|
91
|
+
console.error(reason);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
`;
|
|
25
95
|
}
|
|
26
96
|
|
|
27
97
|
protected compileServer(backendModules: Map<string, string>): string {
|
|
@@ -52,7 +122,7 @@ container.load(messagingBackendModule);
|
|
|
52
122
|
container.load(loggerBackendModule);
|
|
53
123
|
|
|
54
124
|
function defaultServeStatic(app) {
|
|
55
|
-
app.use(express.static(path.resolve(__dirname, '../../lib')))
|
|
125
|
+
app.use(express.static(path.resolve(__dirname, '../../lib/frontend')))
|
|
56
126
|
}
|
|
57
127
|
|
|
58
128
|
function load(raw) {
|
|
@@ -96,7 +166,7 @@ serverAddress.then(({ port, address }) => {
|
|
|
96
166
|
}
|
|
97
167
|
});
|
|
98
168
|
|
|
99
|
-
|
|
169
|
+
globalThis.serverAddress = serverAddress;
|
|
100
170
|
`;
|
|
101
171
|
}
|
|
102
172
|
|