/******************************************************************************** * Copyright (C) 2017 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 WITH Classpath-exception-2.0 ********************************************************************************/ import { NpmRegistry, NodePackage, PublishedNodePackage } from './npm-registry'; import { Extension, ExtensionPackage } from './extension-package'; import { ApplicationProps } from './application-props'; export declare type ApplicationLog = (message?: any, ...optionalParams: any[]) => void; export declare class ApplicationPackageOptions { readonly projectPath: string; readonly log?: ApplicationLog; readonly error?: ApplicationLog; readonly registry?: NpmRegistry; readonly appTarget?: ApplicationProps.Target; } export declare type ApplicationModuleResolver = (modulePath: string) => string; export declare class ApplicationPackage { protected readonly options: ApplicationPackageOptions; readonly projectPath: string; readonly log: ApplicationLog; readonly error: ApplicationLog; constructor(options: ApplicationPackageOptions); protected _registry: NpmRegistry | undefined; readonly registry: NpmRegistry; readonly target: ApplicationProps.Target; protected _props: ApplicationProps | undefined; readonly props: ApplicationProps; protected _pck: NodePackage | undefined; readonly pck: NodePackage; protected _frontendModules: Map | undefined; protected _frontendElectronModules: Map | undefined; protected _backendModules: Map | undefined; protected _backendElectronModules: Map | undefined; protected _extensionPackages: ReadonlyArray | undefined; /** * Extension packages in the topological order. */ readonly extensionPackages: ReadonlyArray; getExtensionPackage(extension: string): ExtensionPackage | undefined; findExtensionPackage(extension: string): Promise; resolveExtensionPackage(extension: string): Promise; protected newExtensionPackage(raw: PublishedNodePackage): ExtensionPackage; readonly frontendModules: Map; readonly frontendElectronModules: Map; readonly backendModules: Map; readonly backendElectronModules: Map; protected computeModules

(primary: P, secondary?: S): Map; relative(path: string): string; path(...segments: string[]): string; readonly packagePath: string; lib(...segments: string[]): string; srcGen(...segments: string[]): string; backend(...segments: string[]): string; frontend(...segments: string[]): string; isBrowser(): boolean; isElectron(): boolean; ifBrowser(value: T): T | undefined; ifBrowser(value: T, defaultValue: T): T; ifElectron(value: T): T | undefined; ifElectron(value: T, defaultValue: T): T; readonly targetBackendModules: Map; readonly targetFrontendModules: Map; setDependency(name: string, version: string | undefined): boolean; save(): Promise; protected _moduleResolver: undefined | ApplicationModuleResolver; /** * A node module resolver in the context of the application package. */ readonly resolveModule: ApplicationModuleResolver; resolveModulePath(moduleName: string, ...segments: string[]): string; } //# sourceMappingURL=application-package.d.ts.map