Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Deployer

Deployer class.

Hierarchy

  • EventEmitter
    • Deployer

Implements

  • Disposable

Index

Constructors

Properties

Accessors

Methods

Object literals

Constructors

constructor

  • new Deployer(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel, pkgFile: PackageFile): Deployer
  • Initializes a new instance of that class.

    Parameters

    • context: vscode.ExtensionContext

      The underlying extension context.

    • outputChannel: vscode.OutputChannel

      The global output channel to use.

    • pkgFile: PackageFile

      The package file of that extension.

    Returns Deployer

Properties

Protected _AFTER_DEPLOYMENT_STATUS_ITEM

_AFTER_DEPLOYMENT_STATUS_ITEM: vscode.StatusBarItem

Information button that is shown after a deployment has been finished.

Protected _CONTEXT

_CONTEXT: vscode.ExtensionContext

Stores the underlying extension context.

Protected _EVENTS

_EVENTS: EventEntry[] = []

Stores the current list of global events.

Protected _OUTPUT_CHANNEL

_OUTPUT_CHANNEL: vscode.OutputChannel

Stores the global output channel.

Protected _PACKAGE_FILE

_PACKAGE_FILE: PackageFile

Stores the package file of that extension.

Protected _QUICK_DEPLOY_STATUS_ITEM

_QUICK_DEPLOY_STATUS_ITEM: vscode.StatusBarItem

The "quick deploy button".

Protected _WORKSPACE_IN_PROGRESS

_WORKSPACE_IN_PROGRESS: any

Stores the packages that are currently deploy.

Protected _additionalValues

_additionalValues: ValueBase[]

Additional values.

Protected _allTargets

_allTargets: DeployTarget[]

Stores all known targets from config as copies.

Protected _config

Stores the current configuration.

Protected _currentTextEditor

_currentTextEditor: vscode.TextEditor

Stores the current active text editor.

Protected _deployOnChangeFreezer

_deployOnChangeFreezer: Timer

The timeout for freezing 'deploy on change' feature.

Protected _fileSystemWatcher

_fileSystemWatcher: vscode.FileSystemWatcher

The global file system watcher.

Protected _globalScriptOperationState

_globalScriptOperationState: Object

The global state value for deploy operation scripts.

Protected _host

_host: DeployHost

Stores the current host.

Protected _htmlDocs

_htmlDocs: Document[]

Stores the current list of HTML documents.

Protected _isDeployOnChangeEnabled

_isDeployOnChangeEnabled: boolean = true

Stores if 'deploy on change' feature is enabled or not.

Protected _isDeployOnChangeFreezed

_isDeployOnChangeFreezed: boolean = false

Stores if 'deploy on change' feature is freezed or not.

Protected _isDeployOnSaveEnabled

_isDeployOnSaveEnabled: boolean = true

Stores if 'deploy on save' feature is enabled or not.

Protected _isReloadingConfig

_isReloadingConfig: boolean = false

Stores if extension is reloading its configuration or not.

Protected _isSyncWhenOpenEnabled

_isSyncWhenOpenEnabled: boolean = true

Stores if 'sync when open' feature is enabled or not.

Protected _lastAfterDeploymentButtonDisapearTimeout

_lastAfterDeploymentButtonDisapearTimeout: Timer

The ID of the last timeout that autmatically disapears the deploy result button in the status bar.

Protected _lastConfigUpdate

_lastConfigUpdate: Moment.Moment

Stores the timestamp of the last config update.

Protected _oldEnvVars

_oldEnvVars: EnvVarEntry[]

Stores the last list of environment vars.

Protected _plugins

Loaded plugins.

Protected _scriptOperationStates

_scriptOperationStates: Object

The states values for deploy operation scripts.

Protected _serverStatusItem

_serverStatusItem: vscode.StatusBarItem

The current status item of the running server.

Protected _startTime

_startTime: Moment.Moment

Stores the extension's start time.

Protected _targetCache

_targetCache: DeployTargetCache

Cache for deploy targets.

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

allTargetsFromConfig

config

context

  • get context(): vscode.ExtensionContext
  • Gets the extension context.

    Returns vscode.ExtensionContext

htmlDocuments

isActive

  • get isActive(): boolean
  • Gets if the extension is currently active or not.

    Returns boolean

lastConfigUpdate

  • get lastConfigUpdate(): Moment.Moment
  • Gets the timestamp of the last config update.

    Returns Moment.Moment

name

  • get name(): string
  • Get the name that represents that machine.

    Returns string

outputChannel

  • get outputChannel(): vscode.OutputChannel
  • Gets the global output channel.

    Returns vscode.OutputChannel

packageFile

plugins

pluginsWithContextes

settingsFile

  • get settingsFile(): string
  • Gets the underlying settings file.

    Returns string

startTime

  • get startTime(): Moment.Moment
  • Gets the start time of the extension.

    Returns Moment.Moment

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected afterDeployment

  • afterDeployment(files: string[], target: DeployTarget): Promise<boolean>
  • Invokes 'after deployed' operations for a target.

    Parameters

    • files: string[]

      The files that have been deployed.

    • target: DeployTarget

      The target.

    Returns Promise<boolean>

    The promise.

Protected beforeDeploy

  • beforeDeploy(files: string[], target: DeployTarget): Promise<boolean>
  • Invokes 'before deploy' operations for a target.

    Parameters

    • files: string[]

      The files to deploy.

    • target: DeployTarget

      The target.

    Returns Promise<boolean>

    The promise.

changeSwitch

  • changeSwitch(): Promise<any>
  • Changes a switch target.

    Returns Promise<any>

clearOutputOrNot

  • clearOutputOrNot(): void
  • Clears the output on startup depending on the current configuration.

    Returns void

compareFiles

  • compareFiles(uri?: any): Promise<any>
  • Compares a local file with a version from a target.

    Parameters

    • Optional uri: any

    Returns Promise<any>

    The promise.

Protected deployFile

  • deployFile(file: string): void
  • Deploys a file.

    Parameters

    • file: string

      The path of the file to deploy.

    Returns void

deployFileOrFolder

  • deployFileOrFolder(uri?: any): void
  • Deploys a file or folder.

    Parameters

    • Optional uri: any

    Returns void

Protected deployFileTo

  • deployFileTo(file: string, target: DeployTarget): Promise<boolean>
  • Deploys a file to a target.

    Parameters

    • file: string

      The file to deploy.

    • target: DeployTarget

      The target to deploy to.

    Returns Promise<boolean>

    The promise.

Protected deployFolder

  • deployFolder(dir: string): void
  • Deploys a folder.

    Parameters

    • dir: string

      The path of the folder to deploy.

    Returns void

deployWorkspace

Protected deployWorkspaceTo

  • deployWorkspaceTo(files: string[], target: DeployTarget): Promise<boolean>
  • Deploys files of the workspace to a target.

    Parameters

    • files: string[]

      The files to deploy.

    • target: DeployTarget

      The target.

    Returns Promise<boolean>

    The promise.

displayNetworkInfo

  • displayNetworkInfo(force?: boolean): void
  • Displays information about the network of this machine.

    Parameters

    • Default value force: boolean = false

    Returns void

dispose

  • dispose(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

emitGlobal

  • emitGlobal(event: string | symbol, ...args: any[]): boolean
  • Emits a global event.

    Parameters

    • event: string | symbol

      The event.

    • Rest ...args: any[]

      The arguments.

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

Protected executeStartupCommands

  • executeStartupCommands(): void
  • Executes the startup commands, defined in the config.

    Returns void

filterConditionalItems

  • filterConditionalItems<T>(items: T | T[]): T[]
  • Filters "conditional" items.

    Type parameters

    Parameters

    • items: T | T[]

      The items to filter.

    Returns T[]

    The filtered items.

filterTargetsByPackage

getGlobals

  • getGlobals(): deploy_contracts.GlobalVariables
  • Returns the global variables defined in settings.

    Returns deploy_contracts.GlobalVariables

    The globals.

getMaxListeners

  • getMaxListeners(): number
  • Returns number

Protected getNextAfterDeploymentButtonColor

  • getNextAfterDeploymentButtonColor(category: string): string
  • Returns the next color for the deploy result in the status bar by category.

    Parameters

    • category: string

      The category.

    Returns string

    The color.

getPackages

getTargets

Protected getTargetsFromPackage

getValues

Protected handleCommonDeployOperation

hideAfterDeploymentStatusBarItem

  • hideAfterDeploymentStatusBarItem(): void
  • Hides the 'after deploy' status bar item.

    Returns void

isFileIgnored

  • isFileIgnored(fileOrDir: string): boolean
  • Checks if a file (or directory) path is ignored.

    Parameters

    • fileOrDir: string

      The file / directory to check.

    Returns boolean

    Is ignored or not.

listen

  • listen(): void

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

log

  • Logs a message.

    chainable

    Parameters

    • msg: any

      The message to log.

    Returns Deployer

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

onActivated

  • onActivated(): void

onCancelling

  • onCancelling(callback: deploy_contracts.EventHandler): void
  • Registers for a callback for a 'cancel' event that is called once.

    Parameters

    • callback: deploy_contracts.EventHandler

      The callback to register.

    Returns void

onDeactivate

  • onDeactivate(): void

onDidChangeActiveTextEditor

  • onDidChangeActiveTextEditor(editor: vscode.TextEditor): void
  • Is invoked after active text editor has been changed.

    Parameters

    • editor: vscode.TextEditor

      The new editor.

    Returns void

onDidChangeConfiguration

  • onDidChangeConfiguration(e: vscode.ConfigurationChangeEvent): void
  • Event after configuration changed.

    Parameters

    • e: vscode.ConfigurationChangeEvent

    Returns void

onDidChangeWorkspaceFolders

  • onDidChangeWorkspaceFolders(e: vscode.WorkspaceFoldersChangeEvent): void
  • Event after list of workspace folders changed.

    Parameters

    • e: vscode.WorkspaceFoldersChangeEvent

      The event arguments.

    Returns void

onDidOpenTextDocument

  • onDidOpenTextDocument(doc: vscode.TextDocument): void
  • Event after text document has been opened.

    Parameters

    • doc: vscode.TextDocument

      The document.

    Returns void

onDidSaveFile

  • onDidSaveFile(fileName: string, packagesToDeploy?: DeployPackage[]): void
  • Event after a document has been saved.

    Parameters

    • fileName: string

      The path of the file.

    • Optional packagesToDeploy: DeployPackage[]

    Returns void

onDidSaveTextDocument

  • onDidSaveTextDocument(doc: vscode.TextDocument): void
  • Event after a document has been saved.

    Parameters

    • doc: vscode.TextDocument

      The document.

    Returns void

Protected onFileChange

  • onFileChange(e: vscode.Uri, type: string): void
  • Is invoked on a file / directory change.

    Parameters

    • e: vscode.Uri

      The URI of the item.

    • type: string

      The type of change.

    Returns void

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected openFiles

  • openFiles(): void
  • Opens the files that are defined in the config.

    Returns void

openHtml

  • openHtml(html: string, title?: string, id?: any): Promise<any>
  • Opens a HTML document in a new tab.

    Parameters

    • html: string

      The HTML document (source code).

    • Optional title: string
    • Optional id: any

    Returns Promise<any>

    The promise.

openOutputAfterDeploment

  • openOutputAfterDeploment(): void
  • Action to open the output after an deployment.

    Returns void

openTemplate

  • openTemplate(): void

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected pullFile

  • pullFile(file: string): void
  • Pulls a file.

    Parameters

    • file: string

      The path of the file to deploy.

    Returns void

Protected pullFileFrom

  • pullFileFrom(file: string, target: DeployTarget): Promise<boolean>
  • Pulls a file from a target.

    Parameters

    • file: string

      The file to pull.

    • target: DeployTarget

      The target from where to pull.

    Returns Promise<boolean>

    The promise.

pullFileOrFolder

  • pullFileOrFolder(uri?: any): void
  • Pulls a file or folder.

    Parameters

    • Optional uri: any

    Returns void

Protected pullFolder

  • pullFolder(dir: string): void
  • Pulls a folder.

    Parameters

    • dir: string

      The path of the folder to pull.

    Returns void

pullWorkspace

  • pullWorkspace(): void
  • Pulls files to the workspace.

    Returns void

Protected pullWorkspaceFrom

  • pullWorkspaceFrom(files: string[], target: DeployTarget): Promise<boolean>
  • Pulls files of the workspace from a target.

    Parameters

    • files: string[]

      The files to pull.

    • target: DeployTarget

      The target from where to pull from.

    Returns Promise<boolean>

    The promise.

quickDeploy

  • quickDeploy(): void

Protected registerGlobalEvents

  • registerGlobalEvents(): void

Protected reloadCommands

  • reloadCommands(): void
  • Reloads the defined commands from the config.

    Returns void

reloadConfiguration

  • reloadConfiguration(): void

Protected reloadEnvironmentVars

  • reloadEnvironmentVars(): void
  • Reloads the list of variables for the current process.

    Returns void

Protected reloadEvents

  • reloadEvents(): void
  • Reloads the global events defined in the config file.

    Returns void

reloadPlugins

  • reloadPlugins(forceDisplay?: boolean): void
  • Reloads plugins.

    Parameters

    • Default value forceDisplay: boolean = false

    Returns void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

replaceWithValues

  • replaceWithValues(val: any): string
  • Handles a value as string and replaces placeholders.

    Parameters

    • val: any

      The value to parse.

    Returns string

    The parsed value.

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Protected setupFileSystemWatcher

  • setupFileSystemWatcher(): void
  • Set ups the file system watcher.

    Returns void

Protected showExtensionInfoPopups

  • showExtensionInfoPopups(): void
  • Shows info popups of / for this extension.

    Returns void

Protected showNewVersionPopup

  • showNewVersionPopup(): void
  • Shows the popup of for new version.

    Returns void

Protected showStatusBarItemAfterDeployment

  • showStatusBarItemAfterDeployment(text: string, files: string[], succeeded: string[], failed: string[]): void
  • Shows the 'after deploy' status bar item based of the current settings.

    Parameters

    • text: string

      The text for the item.

    • files: string[]

      The list of all files.

    • succeeded: string[]

      The list of succeeded files.

    • failed: string[]

      The list of failed files.

    Returns void

Private showVSCodeDeployReloadedInfo

  • showVSCodeDeployReloadedInfo(): void

showWarningIfNotActive

  • showWarningIfNotActive(ifActive?: function): Promise<boolean>
  • Shows a warning message if extension is currently active or not.

    Parameters

    • Optional ifActive: function
        • (): any
        • Returns any

    Returns Promise<boolean>

Protected startExternalExtensions

  • startExternalExtensions(): Promise<any>
  • Starts external extensions.

    Returns Promise<any>

    The promise.

useGitIgnoreStylePatternsInFilter

  • useGitIgnoreStylePatternsInFilter(filter: FileFilter, defaultValue?: boolean): boolean
  • Gets if a file filter should also use patterns for directories like in .gitignore files or not.

    Parameters

    • filter: FileFilter

      The filter to check.

    • Default value defaultValue: boolean = true

    Returns boolean

    Also use directory patterns or not.

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Object literals

Private _NEXT_AFTER_DEPLOYMENT_BUTTON_COLORS

_NEXT_AFTER_DEPLOYMENT_BUTTON_COLORS: object

e

e: number = 0

s

s: number = 0

w

w: number = 0

Generated using TypeDoc