diff --git a/dev-packages/application-manager/src/generator/webpack-generator.ts b/dev-packages/application-manager/src/generator/webpack-generator.ts index fa942815843b9..0eeb0b38dc269 100644 --- a/dev-packages/application-manager/src/generator/webpack-generator.ts +++ b/dev-packages/application-manager/src/generator/webpack-generator.ts @@ -378,6 +378,7 @@ for (const [entryPointName, entryPointPath] of Object.entries({ ${this.ifPackage('@theia/plugin-ext', "'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia',")} ${this.ifPackage('@theia/filesystem', "'nsfw-watcher': '@theia/filesystem/lib/node/nsfw-watcher',")} ${this.ifPackage('@theia/plugin-ext-vscode', "'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init',")} + ${this.ifPackage('@theia/api-provider-sample', "'gotd-api-init': '@theia/api-provider-sample/lib/plugin/gotd-api-init',")} })) { commonJsLibraries[entryPointName] = { import: require.resolve(entryPointPath), @@ -429,6 +430,8 @@ const config = { 'ipc-bootstrap': require.resolve('@theia/core/lib/node/messaging/ipc-bootstrap'), ${this.ifPackage('@theia/plugin-ext', () => `// VS Code extension support: 'plugin-host': require.resolve('@theia/plugin-ext/lib/hosted/node/plugin-host'),`)} + ${this.ifPackage('@theia/plugin-ext-headless', () => `// Theia Headless Plugin support: + 'plugin-host-headless': require.resolve('@theia/plugin-ext-headless/lib/hosted/node/plugin-host-headless'),`)} ${this.ifPackage('@theia/process', () => `// Make sure the node-pty thread worker can be executed: 'worker/conoutSocketWorker': require.resolve('node-pty/lib/worker/conoutSocketWorker'),`)} ${this.ifPackage('@theia/git', () => `// Ensure the git locator process can the started diff --git a/examples/api-provider-sample/.eslintrc.js b/examples/api-provider-sample/.eslintrc.js new file mode 100644 index 0000000000000..13089943582b6 --- /dev/null +++ b/examples/api-provider-sample/.eslintrc.js @@ -0,0 +1,10 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + extends: [ + '../../configs/build.eslintrc.json' + ], + parserOptions: { + tsconfigRootDir: __dirname, + project: 'tsconfig.json' + } +}; diff --git a/examples/api-provider-sample/README.md b/examples/api-provider-sample/README.md new file mode 100644 index 0000000000000..dff79d5296502 --- /dev/null +++ b/examples/api-provider-sample/README.md @@ -0,0 +1,48 @@ +
> {
/** initialize the manager, should be called only once */
- $init(params: PluginManagerInitializeParams): Promise