Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ lib
# ide apps
*-app/*
!*-app/package.json
!*-app/webpack.config.js
fusion-studio-extension/src/browser/style/index.css

# integration test files
Expand Down
17 changes: 9 additions & 8 deletions browser-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
"version": "1.1.0",
"dependencies": {
"@theia/core": "^1.15.0",
"@theia/editor": "^1.15.0",
"@theia/filesystem": "^1.15.0",
"@theia/workspace": "^1.15.0",
"@theia/preferences": "^1.15.0",
"@theia/markers": "^1.15.0",
"@theia/messages": "^1.15.0",
"@theia/monaco": "^1.15.0",
"@theia/navigator": "^1.15.0",
"@theia/preferences": "^1.15.0",
"@theia/process": "^1.15.0",
"@theia/terminal": "^1.15.0",
"@theia/editor": "^1.15.0",
"@theia/markers": "^1.15.0",
"@theia/monaco": "^1.15.0",
"@theia/messages": "^1.15.0",
"fusion-studio-extension": "1.2.0"
"@theia/workspace": "^1.15.0",
"fusion-studio-extension": "1.2.0",
"process": "^0.11.10"
},
"devDependencies": {
"@theia/cli": "^1.15.0"
Expand All @@ -32,4 +33,4 @@
}
}
}
}
}
13 changes: 13 additions & 0 deletions browser-app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file can be edited to customize webpack configuration.
* To reset delete this file and rerun theia build again.
*/
const webpack = require('webpack');
const config = require('./gen-webpack.config.js');
const yargs = require('yargs');

if (yargs.option('mode').argv.mode === 'development') {
console.log('Development mode. Including process variable...');
config.plugins.push(new webpack.ProvidePlugin({ process: require.resolve('process/browser') }));
}
module.exports = config;
41 changes: 0 additions & 41 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,4 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
config.process = {
chrome: process.chrome,
defaultApp: process.defaultApp,
electron: process.electron,
isMainFrame: process.isMainFrame,
mas: process.mas,
noAsar: process.noAsar,
noDeprecation: process.noDeprecation,
resourcesPath: process.resourcesPath,
sandboxed: process.sandboxed,
throwDeprecation: process.throwDeprecation,
traceDeprecation: process.traceDeprecation,
traceProcessWarnings: process.traceProcessWarnings,
type: process.type,
stdout: process.stdout,
stderr: process.stderr,
stdin: process.stdin,
argv: process.argv,
argv0: process.argv0,
execArgv: process.execArgv,
execPath: process.execPath,
debugPort: process.debugPort,
env: process.env,
exitCode: process.exitCode,
version: process.version,
versions: process.versions,
config: process.config,
pid: process.pid,
ppid: process.ppid,
title: process.title,
arch: process.arch,
platform: process.platform,
memoryUsage: process.memoryUsage,
release: process.release,
features: process.features,
hrtime: process.hrtime,
connected: process.connected,
report: process.report,
traceDeprecation: process.traceDeprecation,
};
return config;
}
12 changes: 0 additions & 12 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ Cypress.Commands.add("connect", () => {
localStorage.setItem('connections', JSON.stringify(obj))

})
Cypress.Commands.overwrite('visit', (orig, url, options) => {
// this is a fix to include the process variable when using the Electron browser
return orig(url, Cypress.isBrowser('electron') ? {
...options,
onBeforeLoad(win) {
win.process = Cypress.config('process');
if (options?.onBeforeLoad) {
options.onBeforeLoad(win);
}
}
} : options);
})
//
//
// -- This is a child command --
Expand Down
17 changes: 17 additions & 0 deletions electron-app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This file can be edited to customize webpack configuration.
* To reset delete this file and rerun theia build again.
*/
// @ts-check
const config = require('./gen-webpack.config.js');

/**
* Expose bundled modules on window.theia.moduleName namespace, e.g.
* window['theia']['@theia/core/lib/common/uri'].
* Such syntax can be used by external code, for instance, for testing.
config.module.rules.push({
test: /\.js$/,
loader: require.resolve('@theia/application-manager/lib/expose-loader')
}); */

module.exports = config;
Loading