You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lib/src/support/types.ts

53 lines
1.5 KiB

/**
* Partial package.json that may contain a partial Extollo discovery config.
*/
export interface ExtolloPackageDiscoveryConfig {
extollo?: {
discover?: boolean,
units?: {
discover?: boolean,
paths?: string[],
},
recursiveDependencies?: {
discover?: boolean,
},
routes?: {
loadFrom?: string[],
},
assets?: {
discover?: boolean,
basePath?: string[],
},
},
}
/**
* Interface that defines a NodeModule dependency.
*/
export interface NodeDependencySpecEntry {
from: string,
version: string,
resolved?: string,
dependencies?: {[key: string]: NodeDependencySpecEntry},
devDependencies?: {[key: string]: NodeDependencySpecEntry},
unsavedDependencies?: {[key: string]: NodeDependencySpecEntry},
optionalDependencies?: {[key: string]: NodeDependencySpecEntry},
}
/**
* Defines information and dependencies of an NPM package.
*/
export interface NodeModule {
name?: string,
version?: string,
dependencies?: {[key: string]: NodeDependencySpecEntry},
devDependencies?: {[key: string]: NodeDependencySpecEntry},
unsavedDependencies?: {[key: string]: NodeDependencySpecEntry},
optionalDependencies?: {[key: string]: NodeDependencySpecEntry},
}
/**
* Type alias for a NodeModule that contains an ExtolloPackageDiscoveryConfig.
*/
export type ExtolloAwareNodeModule = NodeModule & ExtolloPackageDiscoveryConfig