How to use the @theia/application-package.PublishedNodePackage.is function in @theia/application-package

To help you get started, we’ve selected a few @theia/application-package 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 / extension-manager / src / node / node-extension-server.ts View on Github external
async search(param: SearchParam): Promise {
        const manager = this.project.createPackageManager();
        const query = this.prepareQuery(param.query);
        const packages = await npms.search(query, param.from, param.size);
        const extensions = [];
        for (const raw of packages) {
            if (PublishedNodePackage.is(raw)) {
                const extensionPackage = await manager.pck.findExtensionPackage(raw.name);
                if (extensionPackage) {
                    const extension = this.toRawExtension(extensionPackage);
                    extensions.push(extension);
                }
            }
        }
        return extensions;
    }
    protected prepareQuery(query: string): string {

@theia/application-package

Theia application package API.

EPL-2.0
Latest version published 14 days ago

Package Health Score

93 / 100
Full package analysis

Similar packages