Skip to main content

packageApplication

@webda/core


Function: packageApplication()

packageApplication(app, options?): Promise<ApplicationPackage>

Defined in: packages/core/src/deployers/packager.ts:255

Compute the content of a deployable application: its files, its production dependencies and its packaged configuration

The application files are its package.json files, or its top-level entries minus the ignored ones. Production dependencies (dependencies, optionalDependencies and resolvable peerDependencies) are resolved like Node.js from the real path of each package, so pnpm, npm and workspace layouts work: they are placed in node_modules/<name>, or nested under the requiring package on a version conflict.

The configuration is the current configuration (with the deployment applied) without the deployment units, its cachedModules imports rewritten to the packaged locations and the git information baked; with the PACKAGED_MARKER file, the CLI loads it without scanning the modules.

Parameters​

app​

Application

the loaded application

options?​

PackageOptions = {}

ignores, excludes and modules

Returns​

Promise<ApplicationPackage>

the files and configuration of the package