deploy: current vibn theia state
Made-with: Cursor
This commit is contained in:
10
packages/core/.eslintrc.js
Normal file
10
packages/core/.eslintrc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'../../configs/build.eslintrc.json'
|
||||
],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: 'tsconfig.json'
|
||||
}
|
||||
};
|
||||
178
packages/core/README.md
Normal file
178
packages/core/README.md
Normal file
@@ -0,0 +1,178 @@
|
||||
<div align='center'>
|
||||
|
||||
<br />
|
||||
|
||||
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
||||
|
||||
<h2>ECLIPSE THEIA - CORE EXTENSION</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
|
||||
## Description
|
||||
|
||||
The `@theia/core` extension is the main extension for all Theia-based applications, and provides the main framework for all dependent extensions.
|
||||
The extension provides the base APIs for all Theia-based applications, including:
|
||||
|
||||
- Application APIs
|
||||
- Shell APIs
|
||||
- Base Widgets
|
||||
- Contribution Points (ex: commands, menu items, keybindings)
|
||||
|
||||
## Theia Extension
|
||||
|
||||
A Theia extension is a node package declaring `theiaExtensions` property in `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"theiaExtensions": [{
|
||||
"frontend": "lib/myExtension/browser/myextension-frontend-module",
|
||||
"backend": "lib/myExtension/node/myextension-backend-module",
|
||||
}, {
|
||||
"frontend": "lib/myExtension2/browser/myextension2-browser-module",
|
||||
"frontendElectron": "lib/myExtension2/electron-browser/myextension2-electron-browser-module",
|
||||
"backend": "lib/myExtension2/node/myextension2-node-module",
|
||||
"backendElectron": "lib/myExtension2/electron-main/myextension2-electron-main-module"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
Each extension can consist of the following modules:
|
||||
|
||||
- `frontend` is used in the browser env and as well in the electron if `frontendElectron` is not provided
|
||||
- `frontendElectron` is used in the electron env
|
||||
- `backend` is used in the node env and as well in the electron env if `backendElectron` is not provided
|
||||
- `backendElectron` is used in the electron env
|
||||
|
||||
An extension module should have a default export of `ContainerModule | Promise<ContainerModule>` type.
|
||||
|
||||
## Theia Application
|
||||
|
||||
A Theia application is a node package listing [Theia extensions](#theia-extension) as dependencies and managed with [Theia CLI](../../dev-packages/cli/README.md).
|
||||
|
||||
## Re-Exports Mechanism
|
||||
|
||||
In order to make application builds more stable `@theia/core` re-exports some common dependencies for Theia extensions to re-use. This is especially useful when having to re-use the same dependencies as `@theia/core` does: Since those dependencies will be pulled by Theia, instead of trying to match the same version in your own packages, you can use re-exports to consume it from the framework directly.
|
||||
|
||||
### Usage Example
|
||||
|
||||
Let's take inversify as an example since you will most likely use this package, you can import it by prefixing with `@theia/core/shared/`:
|
||||
|
||||
```ts
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
|
||||
@injectable()
|
||||
export class SomeClass {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Re-Exports
|
||||
|
||||
- `@theia/core/electron-shared/...`
|
||||
- `native-keymap` (from [`native-keymap@^2.2.1`](https://www.npmjs.com/package/native-keymap))
|
||||
- `electron` (from [`electron@38.4.0`](https://www.npmjs.com/package/electron/v/38.4.0))
|
||||
- `electron-store` (from [`electron-store@^8.0.0`](https://www.npmjs.com/package/electron-store))
|
||||
- `@theia/core/shared/...`
|
||||
- `@lumino/algorithm` (from [`@lumino/algorithm@^2.0.4`](https://www.npmjs.com/package/@lumino/algorithm))
|
||||
- `@lumino/commands` (from [`@lumino/commands@^2.3.3`](https://www.npmjs.com/package/@lumino/commands))
|
||||
- `@lumino/coreutils` (from [`@lumino/coreutils@^2.2.2`](https://www.npmjs.com/package/@lumino/coreutils))
|
||||
- `@lumino/domutils` (from [`@lumino/domutils@^2.0.4`](https://www.npmjs.com/package/@lumino/domutils))
|
||||
- `@lumino/dragdrop` (from [`@lumino/dragdrop@^2.1.7`](https://www.npmjs.com/package/@lumino/dragdrop))
|
||||
- `@lumino/messaging` (from [`@lumino/messaging@^2.0.4`](https://www.npmjs.com/package/@lumino/messaging))
|
||||
- `@lumino/properties` (from [`@lumino/properties@^2.0.4`](https://www.npmjs.com/package/@lumino/properties))
|
||||
- `@lumino/signaling` (from [`@lumino/signaling@^2.1.5`](https://www.npmjs.com/package/@lumino/signaling))
|
||||
- `@lumino/virtualdom` (from [`@lumino/virtualdom@^2.0.4`](https://www.npmjs.com/package/@lumino/virtualdom))
|
||||
- `@lumino/widgets` (from [`@lumino/widgets@2.7.2`](https://www.npmjs.com/package/@lumino/widgets/v/2.7.2))
|
||||
- `@theia/application-package` (from [`@theia/application-package@1.68.0`](https://www.npmjs.com/package/@theia/application-package/v/1.68.0))
|
||||
- `@theia/application-package/lib/api` (from [`@theia/application-package@1.68.0`](https://www.npmjs.com/package/@theia/application-package/v/1.68.0))
|
||||
- `@theia/application-package/lib/environment` (from [`@theia/application-package@1.68.0`](https://www.npmjs.com/package/@theia/application-package/v/1.68.0))
|
||||
- `@theia/request` (from [`@theia/request@1.68.0`](https://www.npmjs.com/package/@theia/request/v/1.68.0))
|
||||
- `@theia/request/lib/proxy` (from [`@theia/request@1.68.0`](https://www.npmjs.com/package/@theia/request/v/1.68.0))
|
||||
- `@theia/request/lib/node-request-service` (from [`@theia/request@1.68.0`](https://www.npmjs.com/package/@theia/request/v/1.68.0))
|
||||
- `fs-extra` (from [`fs-extra@^4.0.2`](https://www.npmjs.com/package/fs-extra))
|
||||
- `fuzzy` (from [`fuzzy@^0.1.3`](https://www.npmjs.com/package/fuzzy))
|
||||
- `inversify` (from [`inversify@^6.1.3`](https://www.npmjs.com/package/inversify))
|
||||
- `react-dom` (from [`react-dom@^18.2.0`](https://www.npmjs.com/package/react-dom))
|
||||
- `react-dom/client` (from [`react-dom@^18.2.0`](https://www.npmjs.com/package/react-dom))
|
||||
- `react-virtuoso` (from [`react-virtuoso@^2.17.0`](https://www.npmjs.com/package/react-virtuoso))
|
||||
- `vscode-languageserver-protocol` (from [`vscode-languageserver-protocol@^3.17.2`](https://www.npmjs.com/package/vscode-languageserver-protocol))
|
||||
- `vscode-uri` (from [`vscode-uri@^2.1.1`](https://www.npmjs.com/package/vscode-uri))
|
||||
- `@parcel/watcher` (from [`@parcel/watcher@^2.5.0`](https://www.npmjs.com/package/@parcel/watcher))
|
||||
- `dompurify` (from [`dompurify@^3.2.4`](https://www.npmjs.com/package/dompurify))
|
||||
- `express` (from [`express@^4.21.0`](https://www.npmjs.com/package/express))
|
||||
- `lodash.debounce` (from [`lodash.debounce@^4.0.8`](https://www.npmjs.com/package/lodash.debounce))
|
||||
- `lodash.throttle` (from [`lodash.throttle@^4.1.1`](https://www.npmjs.com/package/lodash.throttle))
|
||||
- `markdown-it` (from [`markdown-it@^14.1.0`](https://www.npmjs.com/package/markdown-it))
|
||||
- `markdown-it-anchor` (from [`markdown-it-anchor@^9.2.0`](https://www.npmjs.com/package/markdown-it-anchor))
|
||||
- `markdown-it-emoji` (from [`markdown-it-emoji@^3.0.0`](https://www.npmjs.com/package/markdown-it-emoji))
|
||||
- `react` (from [`react@^18.2.0`](https://www.npmjs.com/package/react))
|
||||
- `ws` (from [`ws@^8.17.1`](https://www.npmjs.com/package/ws))
|
||||
- `yargs` (from [`yargs@^15.3.1`](https://www.npmjs.com/package/yargs))
|
||||
|
||||
## Logging Configuration
|
||||
|
||||
It's possible to change the log level for the entire Theia application by
|
||||
passing it the `--log-level={fatal,error,warn,info,debug,trace}` option. For
|
||||
more fine-grained adjustment, it's also possible to set the log level per
|
||||
logger (i.e. per topic). The `root` logger is a special catch-all logger
|
||||
through which go all messages not sent through a particular logger. To change
|
||||
the log level of particular loggers, create a config file such as
|
||||
|
||||
```json
|
||||
{
|
||||
"defaultLevel": "info",
|
||||
"levels": {
|
||||
"terminal": "debug",
|
||||
"task": "error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
where `levels` contains the logger-to-log-level mapping. `defaultLevel`
|
||||
contains the log level to use for loggers not specified in `levels`. This file
|
||||
can then be specified using the `--log-config` option. Theia will watch that
|
||||
file for changes, so it's possible to change log levels at runtime by
|
||||
modifying this file.
|
||||
|
||||
It's unfortunately currently not possible to query Theia for the list of
|
||||
existing loggers. However, each log message specifies from which logger it
|
||||
comes from, which can give an idea, without having to read the code:
|
||||
|
||||
```
|
||||
root INFO [parcel-watcher: 10734] Started watching: /Users/captain.future/git/theia/CONTRIBUTING.md
|
||||
^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^
|
||||
```
|
||||
|
||||
Where `root` is the name of the logger and `INFO` is the log level. These are optionally followed by the name of a child process and the process ID.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `THEIA_HOSTS`
|
||||
- A comma-separated list of hosts expected to resolve to the current application.
|
||||
- e.g: `theia.app.com,some.other.domain:3000`
|
||||
- The port number is important if your application is not hosted on either `80` or `443`.
|
||||
- If possible, you should set this environment variable:
|
||||
- When not set, Theia will allow any origin to access the WebSocket services.
|
||||
- When set, Theia will only allow the origins defined in this environment variable.
|
||||
- `FRONTEND_CONNECTION_TIMEOUT`
|
||||
- The duration in milliseconds during which the backend keeps the connection contexts for the frontend to reconnect.
|
||||
- This duration defaults to '0' if not set.
|
||||
- If set to negative number, the backend will never close the connection.
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [API documentation for `@theia/core`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_core.html)
|
||||
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
||||
- [Theia - Website](https://theia-ide.org/)
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a trademark of the Eclipse Foundation
|
||||
<https://www.eclipse.org/theia>
|
||||
146
packages/core/README_TEMPLATE.md
Normal file
146
packages/core/README_TEMPLATE.md
Normal file
@@ -0,0 +1,146 @@
|
||||
<div align='center'>
|
||||
|
||||
<br />
|
||||
|
||||
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
||||
|
||||
<h2>ECLIPSE THEIA - CORE EXTENSION</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
|
||||
## Description
|
||||
|
||||
The `@theia/core` extension is the main extension for all Theia-based applications, and provides the main framework for all dependent extensions.
|
||||
The extension provides the base APIs for all Theia-based applications, including:
|
||||
|
||||
- Application APIs
|
||||
- Shell APIs
|
||||
- Base Widgets
|
||||
- Contribution Points (ex: commands, menu items, keybindings)
|
||||
|
||||
## Theia Extension
|
||||
|
||||
A Theia extension is a node package declaring `theiaExtensions` property in `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"theiaExtensions": [{
|
||||
"frontend": "lib/myExtension/browser/myextension-frontend-module",
|
||||
"backend": "lib/myExtension/node/myextension-backend-module",
|
||||
}, {
|
||||
"frontend": "lib/myExtension2/browser/myextension2-browser-module",
|
||||
"frontendElectron": "lib/myExtension2/electron-browser/myextension2-electron-browser-module",
|
||||
"backend": "lib/myExtension2/node/myextension2-node-module",
|
||||
"backendElectron": "lib/myExtension2/electron-main/myextension2-electron-main-module"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
Each extension can consist of the following modules:
|
||||
|
||||
- `frontend` is used in the browser env and as well in the electron if `frontendElectron` is not provided
|
||||
- `frontendElectron` is used in the electron env
|
||||
- `backend` is used in the node env and as well in the electron env if `backendElectron` is not provided
|
||||
- `backendElectron` is used in the electron env
|
||||
|
||||
An extension module should have a default export of `ContainerModule | Promise<ContainerModule>` type.
|
||||
|
||||
## Theia Application
|
||||
|
||||
A Theia application is a node package listing [Theia extensions](#theia-extension) as dependencies and managed with [Theia CLI](../../dev-packages/cli/README.md).
|
||||
|
||||
## Re-Exports Mechanism
|
||||
|
||||
In order to make application builds more stable `@theia/core` re-exports some common dependencies for Theia extensions to re-use. This is especially useful when having to re-use the same dependencies as `@theia/core` does: Since those dependencies will be pulled by Theia, instead of trying to match the same version in your own packages, you can use re-exports to consume it from the framework directly.
|
||||
|
||||
### Usage Example
|
||||
|
||||
Let's take inversify as an example since you will most likely use this package, you can import it by prefixing with `@theia/core/shared/`:
|
||||
|
||||
```ts
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
|
||||
@injectable()
|
||||
export class SomeClass {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Re-Exports
|
||||
|
||||
{{#reExportsDirectories}}
|
||||
- `@theia/core/{{&directory}}/...`
|
||||
{{#packages}}
|
||||
{{#modules}}
|
||||
- `{{&moduleName}}` (from [`{{&packageName}}@{{&versionRange}}`]({{&npmUrl}}))
|
||||
{{/modules}}
|
||||
{{/packages}}
|
||||
{{/reExportsDirectories}}
|
||||
|
||||
## Logging Configuration
|
||||
|
||||
It's possible to change the log level for the entire Theia application by
|
||||
passing it the `--log-level={fatal,error,warn,info,debug,trace}` option. For
|
||||
more fine-grained adjustment, it's also possible to set the log level per
|
||||
logger (i.e. per topic). The `root` logger is a special catch-all logger
|
||||
through which go all messages not sent through a particular logger. To change
|
||||
the log level of particular loggers, create a config file such as
|
||||
|
||||
```json
|
||||
{
|
||||
"defaultLevel": "info",
|
||||
"levels": {
|
||||
"terminal": "debug",
|
||||
"task": "error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
where `levels` contains the logger-to-log-level mapping. `defaultLevel`
|
||||
contains the log level to use for loggers not specified in `levels`. This file
|
||||
can then be specified using the `--log-config` option. Theia will watch that
|
||||
file for changes, so it's possible to change log levels at runtime by
|
||||
modifying this file.
|
||||
|
||||
It's unfortunately currently not possible to query Theia for the list of
|
||||
existing loggers. However, each log message specifies from which logger it
|
||||
comes from, which can give an idea, without having to read the code:
|
||||
|
||||
```
|
||||
root INFO [parcel-watcher: 10734] Started watching: /Users/captain.future/git/theia/CONTRIBUTING.md
|
||||
^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^
|
||||
```
|
||||
|
||||
Where `root` is the name of the logger and `INFO` is the log level. These are optionally followed by the name of a child process and the process ID.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `THEIA_HOSTS`
|
||||
- A comma-separated list of hosts expected to resolve to the current application.
|
||||
- e.g: `theia.app.com,some.other.domain:3000`
|
||||
- The port number is important if your application is not hosted on either `80` or `443`.
|
||||
- If possible, you should set this environment variable:
|
||||
- When not set, Theia will allow any origin to access the WebSocket services.
|
||||
- When set, Theia will only allow the origins defined in this environment variable.
|
||||
- `FRONTEND_CONNECTION_TIMEOUT`
|
||||
- The duration in milliseconds during which the backend keeps the connection contexts for the frontend to reconnect.
|
||||
- This duration defaults to '0' if not set.
|
||||
- If set to negative number, the backend will never close the connection.
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [API documentation for `@theia/core`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_core.html)
|
||||
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
||||
- [Theia - Website](https://theia-ide.org/)
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a trademark of the Eclipse Foundation
|
||||
<https://www.eclipse.org/theia>
|
||||
2
packages/core/electron-shared/electron-store/index.d.ts
vendored
Normal file
2
packages/core/electron-shared/electron-store/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import ElectronStore = require('@theia/electron/shared/electron-store');
|
||||
export = ElectronStore;
|
||||
1
packages/core/electron-shared/electron-store/index.js
Normal file
1
packages/core/electron-shared/electron-store/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/electron/shared/electron-store');
|
||||
2
packages/core/electron-shared/electron/index.d.ts
vendored
Normal file
2
packages/core/electron-shared/electron/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import Electron = require('@theia/electron/shared/electron');
|
||||
export = Electron;
|
||||
1
packages/core/electron-shared/electron/index.js
Normal file
1
packages/core/electron-shared/electron/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/electron/shared/electron');
|
||||
2
packages/core/electron-shared/fix-path/index.d.ts
vendored
Normal file
2
packages/core/electron-shared/fix-path/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import fixPath = require('@theia/electron/shared/fix-path');
|
||||
export = fixPath;
|
||||
1
packages/core/electron-shared/fix-path/index.js
Normal file
1
packages/core/electron-shared/fix-path/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/electron/shared/fix-path');
|
||||
1
packages/core/electron-shared/native-keymap/index.d.ts
vendored
Normal file
1
packages/core/electron-shared/native-keymap/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@theia/electron/shared/native-keymap';
|
||||
1
packages/core/electron-shared/native-keymap/index.js
Normal file
1
packages/core/electron-shared/native-keymap/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/electron/shared/native-keymap');
|
||||
2097
packages/core/i18n/nls.cs.json
Normal file
2097
packages/core/i18n/nls.cs.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.de.json
Normal file
2097
packages/core/i18n/nls.de.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.es.json
Normal file
2097
packages/core/i18n/nls.es.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.fr.json
Normal file
2097
packages/core/i18n/nls.fr.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.hu.json
Normal file
2097
packages/core/i18n/nls.hu.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.it.json
Normal file
2097
packages/core/i18n/nls.it.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.ja.json
Normal file
2097
packages/core/i18n/nls.ja.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.json
Normal file
2097
packages/core/i18n/nls.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.ko.json
Normal file
2097
packages/core/i18n/nls.ko.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.pl.json
Normal file
2097
packages/core/i18n/nls.pl.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.pt-br.json
Normal file
2097
packages/core/i18n/nls.pt-br.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.ru.json
Normal file
2097
packages/core/i18n/nls.ru.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.tr.json
Normal file
2097
packages/core/i18n/nls.tr.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.zh-cn.json
Normal file
2097
packages/core/i18n/nls.zh-cn.json
Normal file
File diff suppressed because it is too large
Load Diff
2097
packages/core/i18n/nls.zh-tw.json
Normal file
2097
packages/core/i18n/nls.zh-tw.json
Normal file
File diff suppressed because it is too large
Load Diff
225
packages/core/package.json
Normal file
225
packages/core/package.json
Normal file
@@ -0,0 +1,225 @@
|
||||
{
|
||||
"name": "@theia/core",
|
||||
"version": "1.68.0",
|
||||
"description": "Theia is a cloud & desktop IDE framework implemented in TypeScript.",
|
||||
"main": "lib/common/index.js",
|
||||
"typings": "lib/common/index.d.ts",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.0",
|
||||
"@parcel/watcher": "^2.5.0",
|
||||
"@lumino/algorithm": "^2.0.4",
|
||||
"@lumino/commands": "^2.3.3",
|
||||
"@lumino/coreutils": "^2.2.2",
|
||||
"@lumino/domutils": "^2.0.4",
|
||||
"@lumino/dragdrop": "^2.1.7",
|
||||
"@lumino/messaging": "^2.0.4",
|
||||
"@lumino/properties": "^2.0.4",
|
||||
"@lumino/signaling": "^2.1.5",
|
||||
"@lumino/virtualdom": "^2.0.4",
|
||||
"@lumino/widgets": "2.7.2",
|
||||
"@theia/application-package": "1.68.0",
|
||||
"@theia/request": "1.68.0",
|
||||
"@types/body-parser": "^1.16.4",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/fs-extra": "^4.0.2",
|
||||
"@types/lodash.debounce": "4.0.3",
|
||||
"@types/lodash.throttle": "^4.1.3",
|
||||
"@types/markdown-it": "^14.1.0",
|
||||
"@types/markdown-it-emoji": "^3.0.1",
|
||||
"@types/react": "^18.0.15",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/route-parser": "^0.1.1",
|
||||
"@types/safer-buffer": "^2.1.0",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@types/yargs": "^15",
|
||||
"@vscode/codicons": "*",
|
||||
"ajv": "^6.5.3",
|
||||
"async-mutex": "^0.4.0",
|
||||
"body-parser": "^1.17.2",
|
||||
"cookie": "^1.0.2",
|
||||
"dompurify": "^3.2.4",
|
||||
"drivelist": "^12.0.2",
|
||||
"express": "^4.21.0",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"file-icons-js": "~1.0.3",
|
||||
"font-awesome": "^4.7.0",
|
||||
"fs-extra": "^4.0.2",
|
||||
"fuzzy": "^0.1.3",
|
||||
"http-proxy-agent": "^5.0.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"iconv-lite": "^0.6.0",
|
||||
"inversify": "^6.1.3",
|
||||
"jschardet": "^2.1.1",
|
||||
"keytar": "7.9.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"markdown-it": "^14.1.0",
|
||||
"markdown-it-anchor": "^9.2.0",
|
||||
"markdown-it-emoji": "^3.0.0",
|
||||
"msgpackr": "^1.10.2",
|
||||
"p-debounce": "^2.1.0",
|
||||
"perfect-scrollbar": "1.5.5",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-tooltip": "^4.2.21",
|
||||
"react-virtuoso": "^2.17.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"route-parser": "^0.0.5",
|
||||
"safer-buffer": "^2.1.2",
|
||||
"socket.io": "^4.5.3",
|
||||
"socket.io-client": "^4.5.3",
|
||||
"tslib": "^2.6.2",
|
||||
"uuid": "^9.0.1",
|
||||
"vscode-languageserver-protocol": "^3.17.2",
|
||||
"vscode-uri": "^2.1.1",
|
||||
"ws": "^8.17.1",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@theia/electron": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@theia/electron": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"theiaReExports": {
|
||||
"electron-shared": {
|
||||
"copy": "@theia/electron#shared"
|
||||
},
|
||||
"shared": {
|
||||
"export *": [
|
||||
"@lumino/algorithm",
|
||||
"@lumino/commands",
|
||||
"@lumino/coreutils",
|
||||
"@lumino/domutils",
|
||||
"@lumino/dragdrop",
|
||||
"@lumino/messaging",
|
||||
"@lumino/properties",
|
||||
"@lumino/signaling",
|
||||
"@lumino/virtualdom",
|
||||
"@lumino/widgets",
|
||||
"@theia/application-package",
|
||||
"@theia/application-package/lib/api",
|
||||
"@theia/application-package/lib/environment",
|
||||
"@theia/request",
|
||||
"@theia/request/lib/proxy",
|
||||
"@theia/request/lib/node-request-service",
|
||||
"fs-extra",
|
||||
"fuzzy",
|
||||
"inversify",
|
||||
"react-dom",
|
||||
"react-dom/client",
|
||||
"react-virtuoso",
|
||||
"vscode-languageserver-protocol",
|
||||
"vscode-uri"
|
||||
],
|
||||
"export =": [
|
||||
"@parcel/watcher as parcelWatcher",
|
||||
"dompurify as DOMPurify",
|
||||
"express",
|
||||
"lodash.debounce as debounce",
|
||||
"lodash.throttle as throttle",
|
||||
"markdown-it as markdownit",
|
||||
"markdown-it-anchor as markdownitanchor",
|
||||
"markdown-it-emoji as markdownitemoji",
|
||||
"react as React",
|
||||
"ws as WebSocket",
|
||||
"yargs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"theiaExtensions": [
|
||||
{
|
||||
"frontendPreload": "lib/browser/preload/preload-module",
|
||||
"preload": "lib/electron-browser/preload"
|
||||
},
|
||||
{
|
||||
"frontendOnlyPreload": "lib/browser-only/preload/frontend-only-preload-module"
|
||||
},
|
||||
{
|
||||
"frontend": "lib/browser/i18n/i18n-frontend-module",
|
||||
"frontendOnly": "lib/browser-only/i18n/i18n-frontend-only-module",
|
||||
"backend": "lib/node/i18n/i18n-backend-module"
|
||||
},
|
||||
{
|
||||
"frontend": "lib/browser/menu/browser-menu-module",
|
||||
"frontendElectron": "lib/electron-browser/menu/electron-menu-module"
|
||||
},
|
||||
{
|
||||
"frontend": "lib/browser/window/browser-window-module",
|
||||
"frontendElectron": "lib/electron-browser/window/electron-window-module",
|
||||
"backendElectron": "lib/electron-node/window/electron-window-module"
|
||||
},
|
||||
{
|
||||
"backendElectron": "lib/electron-node/cli/electron-backend-cli-module"
|
||||
},
|
||||
{
|
||||
"frontend": "lib/browser/keyboard/browser-keyboard-module",
|
||||
"frontendElectron": "lib/electron-browser/keyboard/electron-keyboard-module",
|
||||
"backendElectron": "lib/electron-node/keyboard/electron-backend-keyboard-module"
|
||||
},
|
||||
{
|
||||
"frontendElectron": "lib/electron-browser/token/electron-token-frontend-module",
|
||||
"backendElectron": "lib/electron-node/token/electron-token-backend-module"
|
||||
},
|
||||
{
|
||||
"backend": "lib/node/hosting/backend-hosting-module",
|
||||
"backendElectron": "lib/electron-node/hosting/electron-backend-hosting-module"
|
||||
},
|
||||
{
|
||||
"frontend": "lib/browser/request/browser-request-module",
|
||||
"frontendElectron": "lib/electron-browser/request/electron-browser-request-module"
|
||||
},
|
||||
{
|
||||
"backend": "lib/node/request/backend-request-module",
|
||||
"backendElectron": "lib/electron-node/request/electron-backend-request-module"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"theia-extension"
|
||||
],
|
||||
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eclipse-theia/theia.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eclipse-theia/theia/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eclipse-theia/theia",
|
||||
"files": [
|
||||
"electron-shared",
|
||||
"i18n",
|
||||
"lib",
|
||||
"shared",
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "theiaext build",
|
||||
"clean": "theiaext clean",
|
||||
"compile": "theiaext compile",
|
||||
"generate-layout": "electron ./scripts/generate-layout",
|
||||
"afterInstall": "npm run generate-theia-re-exports && npm run download:json-schema",
|
||||
"generate-theia-re-exports": "theia-re-exports generate && theia-re-exports template README_TEMPLATE.md > README.md",
|
||||
"lint": "theiaext lint",
|
||||
"download:json-schema": "node ./scripts/download-catalog.js",
|
||||
"test": "theiaext test",
|
||||
"version": "npm run -s generate-theia-re-exports",
|
||||
"watch": "theiaext watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/ext-scripts": "1.68.0",
|
||||
"@theia/re-exports": "1.68.0",
|
||||
"minimist": "^1.2.0",
|
||||
"nodejs-file-downloader": "4.13.0"
|
||||
},
|
||||
"nyc": {
|
||||
"extends": "../../configs/nyc.json"
|
||||
},
|
||||
"gitHead": "21358137e41342742707f660b8e222f940a27652"
|
||||
}
|
||||
64
packages/core/scripts/download-catalog.js
Normal file
64
packages/core/scripts/download-catalog.js
Normal file
@@ -0,0 +1,64 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2024 STMicroelectronics and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
const path = require('path');
|
||||
const { Downloader } = require('nodejs-file-downloader');
|
||||
|
||||
const url = 'https://schemastore.org/api/json/catalog.json';
|
||||
|
||||
const targetDir = './lib/browser';
|
||||
const fileName = 'catalog.json';
|
||||
const targetFile = path.join(targetDir, fileName);
|
||||
|
||||
const downloader = new Downloader({
|
||||
url,
|
||||
directory: targetDir,
|
||||
fileName: 'catalog.json',
|
||||
timeout: 60000,
|
||||
proxy: process.env.http_proxy
|
||||
|| process.env.HTTP_PROXY
|
||||
|| process.env.https_proxy
|
||||
|| process.env.HTTPS_PROXY
|
||||
|| '',
|
||||
cloneFiles: false
|
||||
});
|
||||
|
||||
downloader.download().catch(error => {
|
||||
const errorMessage = `
|
||||
Failed to download ${fileName} from schemastore.org
|
||||
Error: ${error.message}
|
||||
|
||||
This is likely due to one of the following issues:
|
||||
1. Network connectivity issues
|
||||
2. Proxy configuration needed
|
||||
3. SSL certificate validation failure
|
||||
|
||||
Possible workarounds:
|
||||
|
||||
1. If behind a proxy, set proxy environment variables:
|
||||
export HTTPS_PROXY=http://your-proxy:port
|
||||
export HTTP_PROXY=http://your-proxy:port
|
||||
|
||||
2. If you have to use specific SSL certificates:
|
||||
export NODE_EXTRA_CA_CERTS=/path/to/certificate.crt
|
||||
|
||||
3. Download the file manually and place it at:
|
||||
${targetFile}
|
||||
Download from: ${url}
|
||||
Adapt core npm scripts to skip automatic download.
|
||||
`;
|
||||
console.error(errorMessage);
|
||||
process.exit(1);
|
||||
});
|
||||
91
packages/core/scripts/generate-layout.js
Normal file
91
packages/core/scripts/generate-layout.js
Normal file
@@ -0,0 +1,91 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2019 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
const parseArgs = require('minimist');
|
||||
const nativeKeymap = require('native-keymap');
|
||||
const fs = require('fs');
|
||||
const electron = require('electron');
|
||||
|
||||
/*
|
||||
* Generate keyboard layouts for using Theia as web application.
|
||||
*
|
||||
* Usage:
|
||||
* npm run generate-layout [--info] [--all] [--pretty] [--output file]
|
||||
*
|
||||
* --info Print the keyboard layout information; if omitted, the full
|
||||
* keyboard layout with info and mapping is printed.
|
||||
* --all Include all keys in the output, not only the relevant ones.
|
||||
* --pretty Pretty-print the JSON output.
|
||||
* --output file Write the output to the given file instead of stdout.
|
||||
*
|
||||
* Hint: keyboard layouts are stored in packages/core/src/common/keyboard/layouts
|
||||
* and have the following file name scheme:
|
||||
* <language>-<name>-<hardware>.json
|
||||
*
|
||||
* <language> A language subtag according to IETF BCP 47
|
||||
* <name> Display name of the keyboard layout (without dashes)
|
||||
* <hardware> `pc` or `mac`
|
||||
*/
|
||||
const args = parseArgs(process.argv);
|
||||
const printInfo = args['info'];
|
||||
const includeAll = args['all'];
|
||||
const prettyPrint = args['pretty'];
|
||||
const outFile = args['output'];
|
||||
|
||||
let output;
|
||||
if (printInfo) {
|
||||
output = nativeKeymap.getCurrentKeyboardLayout();
|
||||
} else {
|
||||
output = {
|
||||
info: nativeKeymap.getCurrentKeyboardLayout(),
|
||||
mapping: nativeKeymap.getKeyMap()
|
||||
};
|
||||
if (!includeAll) {
|
||||
// We store only key codes for the "writing system keys" as defined here:
|
||||
// https://w3c.github.io/uievents-code/#writing-system-keys
|
||||
const ACCEPTED_CODES = [
|
||||
'KeyA', 'KeyB', 'KeyC', 'KeyD', 'KeyE', 'KeyF', 'KeyG', 'KeyH', 'KeyI', 'KeyJ', 'KeyK', 'KeyL', 'KeyM',
|
||||
'KeyN', 'KeyO', 'KeyP', 'KeyQ', 'KeyR', 'KeyS', 'KeyT', 'KeyU', 'KeyV', 'KeyW', 'KeyX', 'KeyY', 'KeyZ',
|
||||
'Digit1', 'Digit2', 'Digit3', 'Digit4', 'Digit5', 'Digit6', 'Digit7', 'Digit8', 'Digit9', 'Digit0',
|
||||
'Minus', 'Equal', 'BracketLeft', 'BracketRight', 'Backslash', 'Semicolon', 'Quote', 'Backquote',
|
||||
'Comma', 'Period', 'Slash', 'IntlBackslash', 'IntlRo', 'IntlYen'
|
||||
];
|
||||
const ACCEPTED_VARIANTS = ['value', 'withShift', 'withAltGr', 'withShiftAltGr', 'vkey'];
|
||||
for (let code of Object.keys(output.mapping)) {
|
||||
if (ACCEPTED_CODES.indexOf(code) < 0) {
|
||||
delete output.mapping[code];
|
||||
} else {
|
||||
for (let variant of Object.keys(output.mapping[code])) {
|
||||
if (ACCEPTED_VARIANTS.indexOf(variant) < 0 || output.mapping[code][variant] === '') {
|
||||
delete output.mapping[code][variant];
|
||||
}
|
||||
}
|
||||
if (Object.keys(output.mapping[code]).length === 0) {
|
||||
delete output.mapping[code];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const stringOutput = JSON.stringify(output, undefined, prettyPrint ? 2 : undefined);
|
||||
if (outFile) {
|
||||
fs.writeFileSync(outFile, stringOutput);
|
||||
} else {
|
||||
console.log(stringOutput);
|
||||
}
|
||||
|
||||
electron.app.quit();
|
||||
1
packages/core/shared/@lumino/algorithm/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/algorithm/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/algorithm';
|
||||
1
packages/core/shared/@lumino/algorithm/index.js
Normal file
1
packages/core/shared/@lumino/algorithm/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/algorithm');
|
||||
1
packages/core/shared/@lumino/commands/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/commands/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/commands';
|
||||
1
packages/core/shared/@lumino/commands/index.js
Normal file
1
packages/core/shared/@lumino/commands/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/commands');
|
||||
1
packages/core/shared/@lumino/coreutils/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/coreutils/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/coreutils';
|
||||
1
packages/core/shared/@lumino/coreutils/index.js
Normal file
1
packages/core/shared/@lumino/coreutils/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/coreutils');
|
||||
1
packages/core/shared/@lumino/domutils/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/domutils/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/domutils';
|
||||
1
packages/core/shared/@lumino/domutils/index.js
Normal file
1
packages/core/shared/@lumino/domutils/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/domutils');
|
||||
1
packages/core/shared/@lumino/dragdrop/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/dragdrop/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/dragdrop';
|
||||
1
packages/core/shared/@lumino/dragdrop/index.js
Normal file
1
packages/core/shared/@lumino/dragdrop/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/dragdrop');
|
||||
1
packages/core/shared/@lumino/messaging/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/messaging/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/messaging';
|
||||
1
packages/core/shared/@lumino/messaging/index.js
Normal file
1
packages/core/shared/@lumino/messaging/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/messaging');
|
||||
1
packages/core/shared/@lumino/properties/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/properties/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/properties';
|
||||
1
packages/core/shared/@lumino/properties/index.js
Normal file
1
packages/core/shared/@lumino/properties/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/properties');
|
||||
1
packages/core/shared/@lumino/signaling/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/signaling/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/signaling';
|
||||
1
packages/core/shared/@lumino/signaling/index.js
Normal file
1
packages/core/shared/@lumino/signaling/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/signaling');
|
||||
1
packages/core/shared/@lumino/virtualdom/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/virtualdom/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/virtualdom';
|
||||
1
packages/core/shared/@lumino/virtualdom/index.js
Normal file
1
packages/core/shared/@lumino/virtualdom/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/virtualdom');
|
||||
1
packages/core/shared/@lumino/widgets/index.d.ts
vendored
Normal file
1
packages/core/shared/@lumino/widgets/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@lumino/widgets';
|
||||
1
packages/core/shared/@lumino/widgets/index.js
Normal file
1
packages/core/shared/@lumino/widgets/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@lumino/widgets');
|
||||
2
packages/core/shared/@parcel/watcher/index.d.ts
vendored
Normal file
2
packages/core/shared/@parcel/watcher/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import parcelWatcher = require('@parcel/watcher');
|
||||
export = parcelWatcher;
|
||||
1
packages/core/shared/@parcel/watcher/index.js
Normal file
1
packages/core/shared/@parcel/watcher/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@parcel/watcher');
|
||||
1
packages/core/shared/@theia/application-package/index.d.ts
vendored
Normal file
1
packages/core/shared/@theia/application-package/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@theia/application-package';
|
||||
1
packages/core/shared/@theia/application-package/index.js
Normal file
1
packages/core/shared/@theia/application-package/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/application-package');
|
||||
1
packages/core/shared/@theia/request/index.d.ts
vendored
Normal file
1
packages/core/shared/@theia/request/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@theia/request';
|
||||
1
packages/core/shared/@theia/request/index.js
Normal file
1
packages/core/shared/@theia/request/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@theia/request');
|
||||
2
packages/core/shared/ajv/index.d.ts
vendored
Normal file
2
packages/core/shared/ajv/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import Ajv = require('ajv');
|
||||
export = Ajv;
|
||||
1
packages/core/shared/ajv/index.js
Normal file
1
packages/core/shared/ajv/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('ajv');
|
||||
2
packages/core/shared/dompurify/index.d.ts
vendored
Normal file
2
packages/core/shared/dompurify/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import DOMPurify = require('dompurify');
|
||||
export = DOMPurify;
|
||||
1
packages/core/shared/dompurify/index.js
Normal file
1
packages/core/shared/dompurify/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('dompurify');
|
||||
2
packages/core/shared/express/index.d.ts
vendored
Normal file
2
packages/core/shared/express/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import express = require('express');
|
||||
export = express;
|
||||
1
packages/core/shared/express/index.js
Normal file
1
packages/core/shared/express/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('express');
|
||||
1
packages/core/shared/fs-extra/index.d.ts
vendored
Normal file
1
packages/core/shared/fs-extra/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'fs-extra';
|
||||
1
packages/core/shared/fs-extra/index.js
Normal file
1
packages/core/shared/fs-extra/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('fs-extra');
|
||||
1
packages/core/shared/fuzzy/index.d.ts
vendored
Normal file
1
packages/core/shared/fuzzy/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'fuzzy';
|
||||
1
packages/core/shared/fuzzy/index.js
Normal file
1
packages/core/shared/fuzzy/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('fuzzy');
|
||||
1
packages/core/shared/inversify/index.d.ts
vendored
Normal file
1
packages/core/shared/inversify/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'inversify';
|
||||
1
packages/core/shared/inversify/index.js
Normal file
1
packages/core/shared/inversify/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('inversify');
|
||||
2
packages/core/shared/lodash.debounce/index.d.ts
vendored
Normal file
2
packages/core/shared/lodash.debounce/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import debounce = require('lodash.debounce');
|
||||
export = debounce;
|
||||
1
packages/core/shared/lodash.debounce/index.js
Normal file
1
packages/core/shared/lodash.debounce/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('lodash.debounce');
|
||||
2
packages/core/shared/lodash.throttle/index.d.ts
vendored
Normal file
2
packages/core/shared/lodash.throttle/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import throttle = require('lodash.throttle');
|
||||
export = throttle;
|
||||
1
packages/core/shared/lodash.throttle/index.js
Normal file
1
packages/core/shared/lodash.throttle/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('lodash.throttle');
|
||||
2
packages/core/shared/markdown-it-anchor/index.d.ts
vendored
Normal file
2
packages/core/shared/markdown-it-anchor/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import markdownitanchor = require('markdown-it-anchor');
|
||||
export = markdownitanchor;
|
||||
1
packages/core/shared/markdown-it-anchor/index.js
Normal file
1
packages/core/shared/markdown-it-anchor/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('markdown-it-anchor');
|
||||
2
packages/core/shared/markdown-it-emoji/index.d.ts
vendored
Normal file
2
packages/core/shared/markdown-it-emoji/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import markdownitemoji = require('markdown-it-emoji');
|
||||
export = markdownitemoji;
|
||||
1
packages/core/shared/markdown-it-emoji/index.js
Normal file
1
packages/core/shared/markdown-it-emoji/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('markdown-it-emoji');
|
||||
2
packages/core/shared/markdown-it.d.ts
vendored
Normal file
2
packages/core/shared/markdown-it.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import markdownit = require('markdown-it');
|
||||
export = markdownit;
|
||||
1
packages/core/shared/markdown-it.js
Normal file
1
packages/core/shared/markdown-it.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('markdown-it');
|
||||
2
packages/core/shared/markdown-it/index.d.ts
vendored
Normal file
2
packages/core/shared/markdown-it/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import markdownit = require('markdown-it');
|
||||
export = markdownit;
|
||||
1
packages/core/shared/markdown-it/index.js
Normal file
1
packages/core/shared/markdown-it/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('markdown-it');
|
||||
1
packages/core/shared/react-dom/client/index.d.ts
vendored
Normal file
1
packages/core/shared/react-dom/client/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'react-dom/client';
|
||||
1
packages/core/shared/react-dom/client/index.js
vendored
Normal file
1
packages/core/shared/react-dom/client/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('react-dom/client');
|
||||
1
packages/core/shared/react-dom/index.d.ts
vendored
Normal file
1
packages/core/shared/react-dom/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'react-dom';
|
||||
1
packages/core/shared/react-dom/index.js
vendored
Normal file
1
packages/core/shared/react-dom/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('react-dom');
|
||||
1
packages/core/shared/react-virtuoso/index.d.ts
vendored
Normal file
1
packages/core/shared/react-virtuoso/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'react-virtuoso';
|
||||
1
packages/core/shared/react-virtuoso/index.js
vendored
Normal file
1
packages/core/shared/react-virtuoso/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('react-virtuoso');
|
||||
2
packages/core/shared/react/index.d.ts
vendored
Normal file
2
packages/core/shared/react/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import React = require('react');
|
||||
export = React;
|
||||
1
packages/core/shared/react/index.js
Normal file
1
packages/core/shared/react/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('react');
|
||||
1
packages/core/shared/reflect-metadata/index.d.ts
vendored
Normal file
1
packages/core/shared/reflect-metadata/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'reflect-metadata';
|
||||
1
packages/core/shared/reflect-metadata/index.js
Normal file
1
packages/core/shared/reflect-metadata/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('reflect-metadata');
|
||||
1
packages/core/shared/vscode-languageserver-protocol/index.d.ts
vendored
Normal file
1
packages/core/shared/vscode-languageserver-protocol/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'vscode-languageserver-protocol';
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('vscode-languageserver-protocol');
|
||||
1
packages/core/shared/vscode-languageserver-types/index.d.ts
vendored
Normal file
1
packages/core/shared/vscode-languageserver-types/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'vscode-languageserver-types';
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('vscode-languageserver-types');
|
||||
1
packages/core/shared/vscode-uri/index.d.ts
vendored
Normal file
1
packages/core/shared/vscode-uri/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'vscode-uri';
|
||||
1
packages/core/shared/vscode-uri/index.js
Normal file
1
packages/core/shared/vscode-uri/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('vscode-uri');
|
||||
2
packages/core/shared/ws/index.d.ts
vendored
Normal file
2
packages/core/shared/ws/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import WebSocket = require('ws');
|
||||
export = WebSocket;
|
||||
1
packages/core/shared/ws/index.js
Normal file
1
packages/core/shared/ws/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('ws');
|
||||
2
packages/core/shared/yargs/index.d.ts
vendored
Normal file
2
packages/core/shared/yargs/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import yargs = require('yargs');
|
||||
export = yargs;
|
||||
1
packages/core/shared/yargs/index.js
Normal file
1
packages/core/shared/yargs/index.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('yargs');
|
||||
@@ -0,0 +1,117 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2023 EclipseSource and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import { ContainerModule } from 'inversify';
|
||||
import { BackendStopwatch, CommandRegistry, Emitter, MeasurementOptions, OS } from '../common';
|
||||
import { ApplicationInfo, ApplicationServer, ExtensionInfo } from '../common/application-protocol';
|
||||
import { EnvVariable, EnvVariablesServer } from './../common/env-variables';
|
||||
import { bindMessageService } from '../browser/frontend-application-bindings';
|
||||
import { KeyStoreService } from '../common/key-store';
|
||||
import { QuickPickService } from '../common/quick-pick-service';
|
||||
import { QuickPickServiceImpl } from '../browser/quick-input';
|
||||
import { BackendRequestService, RequestService } from '@theia/request';
|
||||
import { ConnectionStatus, ConnectionStatusService } from '../browser/connection-status-service';
|
||||
|
||||
export { bindMessageService };
|
||||
|
||||
// is loaded directly after the regular frontend module
|
||||
export const frontendOnlyApplicationModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
|
||||
if (isBound(CommandRegistry)) {
|
||||
rebind(CommandRegistry).toSelf().inSingletonScope();
|
||||
} else {
|
||||
bind(CommandRegistry).toSelf().inSingletonScope();
|
||||
}
|
||||
|
||||
const stopwatch: BackendStopwatch = {
|
||||
start: async (_name: string, _options?: MeasurementOptions | undefined): Promise<number> => -1,
|
||||
stop: async (_measurement: number, _message: string, _messageArgs: unknown[]): Promise<void> => { }
|
||||
};
|
||||
if (isBound(BackendStopwatch)) {
|
||||
rebind(BackendStopwatch).toConstantValue(stopwatch);
|
||||
} else {
|
||||
bind(BackendStopwatch).toConstantValue(stopwatch);
|
||||
}
|
||||
|
||||
if (isBound(CommandRegistry)) {
|
||||
rebind(QuickPickService).to(QuickPickServiceImpl).inSingletonScope();
|
||||
} else {
|
||||
bind(QuickPickService).to(QuickPickServiceImpl).inSingletonScope();
|
||||
}
|
||||
|
||||
const mockedApplicationServer: ApplicationServer = {
|
||||
getExtensionsInfos: async (): Promise<ExtensionInfo[]> => [],
|
||||
getApplicationInfo: async (): Promise<ApplicationInfo | undefined> => undefined,
|
||||
getApplicationRoot: async (): Promise<string> => '',
|
||||
getApplicationPlatform: () => Promise.resolve('web'),
|
||||
getBackendOS: async (): Promise<OS.Type> => OS.Type.Linux
|
||||
};
|
||||
if (isBound(ApplicationServer)) {
|
||||
rebind(ApplicationServer).toConstantValue(mockedApplicationServer);
|
||||
} else {
|
||||
bind(ApplicationServer).toConstantValue(mockedApplicationServer);
|
||||
}
|
||||
|
||||
const varServer: EnvVariablesServer = {
|
||||
getExecPath: async (): Promise<string> => '',
|
||||
getVariables: async (): Promise<EnvVariable[]> => [],
|
||||
getValue: async (_key: string): Promise<EnvVariable | undefined> => undefined,
|
||||
getConfigDirUri: async (): Promise<string> => '',
|
||||
getHomeDirUri: async (): Promise<string> => '',
|
||||
getDrives: async (): Promise<string[]> => []
|
||||
};
|
||||
if (isBound(EnvVariablesServer)) {
|
||||
rebind(EnvVariablesServer).toConstantValue(varServer);
|
||||
} else {
|
||||
bind(EnvVariablesServer).toConstantValue(varServer);
|
||||
}
|
||||
|
||||
const keyStoreService: KeyStoreService = {
|
||||
deletePassword: () => Promise.resolve(false),
|
||||
findCredentials: () => Promise.resolve([]),
|
||||
findPassword: () => Promise.resolve(undefined),
|
||||
setPassword: () => Promise.resolve(),
|
||||
getPassword: () => Promise.resolve(undefined),
|
||||
keys: () => Promise.resolve([]),
|
||||
};
|
||||
if (isBound(KeyStoreService)) {
|
||||
rebind<KeyStoreService>(KeyStoreService).toConstantValue(keyStoreService);
|
||||
} else {
|
||||
bind<KeyStoreService>(KeyStoreService).toConstantValue(keyStoreService);
|
||||
}
|
||||
|
||||
const requestService: RequestService = {
|
||||
configure: () => Promise.resolve(),
|
||||
request: () => Promise.reject(),
|
||||
resolveProxy: () => Promise.resolve(undefined)
|
||||
};
|
||||
if (isBound(BackendRequestService)) {
|
||||
rebind<RequestService>(BackendRequestService).toConstantValue(requestService);
|
||||
} else {
|
||||
bind<RequestService>(BackendRequestService).toConstantValue(requestService);
|
||||
}
|
||||
|
||||
const connectionStatusService: ConnectionStatusService = {
|
||||
currentStatus: ConnectionStatus.ONLINE,
|
||||
onStatusChange: new Emitter<ConnectionStatus>().event
|
||||
};
|
||||
if (isBound(ConnectionStatusService)) {
|
||||
rebind<ConnectionStatusService>(ConnectionStatusService).toConstantValue(connectionStatusService);
|
||||
} else {
|
||||
bind<ConnectionStatusService>(ConnectionStatusService).toConstantValue(connectionStatusService);
|
||||
}
|
||||
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user