Class: Packager<T>
Generate a ZIP Package of the application
It can add a file as entrypoint
Param
path to store the package
Param
file to integrate as entrypoint.js
Webda Deployer
WebdaDeployer/Packager
Extends
Deployer
<T
>
Type parameters
• T extends PackagerResources
Constructors
new Packager(manager, resources)
new Packager<
T
>(manager
,resources
):Packager
<T
>
Parameters
• manager: DeploymentManager
• resources: T
= undefined
Returns
Packager
<T
>
Inherited from
Source
packages/shell/src/deployers/deployer.ts:41
Properties
_defaulted
_defaulted:
boolean
=false
Inherited from
Source
packages/shell/src/deployers/deployer.ts:27
app
app:
SourceApplication
Current application being deployed
Inherited from
Source
packages/shell/src/deployers/deployer.ts:22
logger
logger:
Logger
Logger to use
Inherited from
Source
packages/shell/src/deployers/deployer.ts:31
manager
manager:
DeploymentManager
Service who manage all deployments
See
DeploymentManager
Inherited from
Source
packages/shell/src/deployers/deployer.ts:18
name
name:
string
Inherited from
Source
packages/shell/src/deployers/deployer.ts:32
now
now:
number
Current date
Inherited from
Source
packages/shell/src/deployers/deployer.ts:37
packageDescription
packageDescription:
any
Package description from package.json
Inherited from
Source
packages/shell/src/deployers/deployer.ts:26
packagesGenerated
packagesGenerated:
Object
={}
Index signature
[key
: string
]: boolean
Source
packages/shell/src/deployers/packager.ts:33
parameters
parameters:
any
Inherited from
Source
packages/shell/src/deployers/deployer.ts:39
resources
resources:
T
Inherited from
Source
packages/core/lib/utils/abstractdeployer.d.ts:7
type
type:
string
Inherited from
Source
packages/shell/src/deployers/deployer.ts:33
Methods
addLinkPackage()
protected
addLinkPackage(archive
,fromPath
,toPath
):void
Add a symbolic linked package from dependency
Parameters
• archive: any
to add to
• fromPath: string
absolutePath of package
• toPath: string
relative path within archive
Returns
void
Source
packages/shell/src/deployers/packager.ts:340
defaultResources()
defaultResources():
Promise
<void
>
Initiate the default value for resources
Returns
Promise
<void
>
Inherited from
Source
packages/shell/src/deployers/deployer.ts:77
deploy()
deploy():
Promise
<any
>
Generate a full code package including dependencies
Returns
Promise
<any
>
Overrides
Source
packages/shell/src/deployers/packager.ts:190
execute()
execute(
command
,stdin
,resolveOnError
,logLevel
):Promise
<Object
>
Parameters
• command: string
• stdin: string
= undefined
• resolveOnError: boolean
= false
• logLevel: WorkerLogLevel
= "TRACE"
Returns
Promise
<Object
>
error
error:
string
output
output:
string
status
status:
number
Inherited from
Source
packages/shell/src/deployers/deployer.ts:127
getApplication()
getApplication():
Application
Return the Webda Application
Returns
Application
Inherited from
Source
packages/shell/src/deployers/deployer.ts:70
getArchiver()
getArchiver():
Promise
<any
>
Import the archiver
Returns
Promise
<any
>
Source
packages/shell/src/deployers/packager.ts:182
getPackagedConfiguration()
protected
getPackagedConfiguration():Configuration
Returns
Configuration
Source
packages/shell/src/deployers/packager.ts:326
loadDefaults()
loadDefaults():
Promise
<void
>
Load default resources
Returns
Promise
<void
>
Overrides
Source
packages/shell/src/deployers/packager.ts:162
replaceResourcesVariables()
replaceResourcesVariables():
void
Replace the resources variables
this.resources = this.replaceVariables(this.resources);
Returns
void
Inherited from
Deployer
.replaceResourcesVariables
Source
packages/shell/src/deployers/deployer.ts:118
replaceVariables()
replaceVariables(
obj
):any
Replace variables in resources
Parameters
• obj: any
to replace variables from
Returns
any
Inherited from
Source
packages/shell/src/deployers/deployer.ts:98
setName()
setName(
name
):void
Set the deployer name
Parameters
• name: string
Returns
void
Inherited from
Source
packages/shell/src/deployers/deployer.ts:55
setType()
setType(
type
):void
Set the deployer name
Parameters
• type: string
Returns
void
Inherited from
Source
packages/shell/src/deployers/deployer.ts:63
getDependencies()
static
getDependencies(pkg
):Object
Parameters
• pkg: string
Returns
Object
Source
packages/shell/src/deployers/packager.ts:109
getPackageLastChanges()
static
getPackageLastChanges(pkg
,includeWorkspace
):string
Parameters
• pkg: string
• includeWorkspace: boolean
= false
Returns
string
Source
packages/shell/src/deployers/packager.ts:78
getResolvedDependencies()
static
getResolvedDependencies(pkg
):Object
Parameters
• pkg: string
Returns
Object
Source
packages/shell/src/deployers/packager.ts:143
getSchema()
static
getSchema():JSONSchema6
Allow to specify the JSONSchema to configure this service
Return undefined by default to fallback on the guess from ServiceParamaters
Using this method should only be exception
Returns
JSONSchema6
Inherited from
Source
packages/core/lib/utils/abstractdeployer.d.ts:15
getWorkspacesPackages()
static
getWorkspacesPackages(dir
):string
[]
Parameters
• dir: string
= ""
Returns
string
[]
Source
packages/shell/src/deployers/packager.ts:39
getWorkspacesRoot()
static
getWorkspacesRoot(dir
):string
Retrieve Yarn workspaces root
Parameters
• dir: string
= ""
Returns
string
Source
packages/shell/src/deployers/packager.ts:53
loadPackageInfo()
static
loadPackageInfo(dir
):any
Parameters
• dir: any
Returns
any