How to use the @theia/plugin-ext/lib/main/node/plugin-deployer-entry-impl.PluginDeployerEntryImpl function in @theia/plugin-ext

To help you get started, we’ve selected a few @theia/plugin-ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / plugin-dev / src / node / hosted-plugin-reader.ts View on Github external
async initialize(): Promise {
        this.pluginReader.getPluginMetadata(process.env.HOSTED_PLUGIN)
            .then(this.hostedPlugin.resolve.bind(this.hostedPlugin));

        const pluginPath = process.env.HOSTED_PLUGIN;
        if (pluginPath) {
            const hostedPlugin = new PluginDeployerEntryImpl('Hosted Plugin', pluginPath!, pluginPath);
            const hostedMetadata = await this.hostedPlugin.promise;
            if (hostedMetadata!.model.entryPoint && hostedMetadata!.model.entryPoint.backend) {
                this.deployerHandler.deployBackendPlugins([hostedPlugin]);
            }

            if (hostedMetadata!.model.entryPoint && hostedMetadata!.model.entryPoint.frontend) {
                this.deployerHandler.deployFrontendPlugins([hostedPlugin]);
            }
        }
    }