Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "targets"

Index

Type aliases

PrepareTargetOperationValue

PrepareTargetOperationValue: PrepareTargetOperation | string

A possible (prepare) target operation (setting) value.

TargetOperationExecutionResult

TargetOperationExecutionResult: void | null | boolean

Possible results for a target operation executor.

TargetOperationExecutor

TargetOperationExecutor: function

A target operation executor.

param

The context.

returns

The result.

TargetOperationValue

TargetOperationValue: TargetOperation | string

A possible target operation (setting) value.

TargetResolver

TargetResolver: function

A function that resolves one or more targets.

returns

The target name(s).

Type declaration

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

Variables

Const DEFAULT_OPERATION_TYPE

DEFAULT_OPERATION_TYPE: "open" = "open"

The default type or a target operation.

Const KEY_TARGET_USAGE

KEY_TARGET_USAGE: "vscdrLastExecutedTargetActions" = "vscdrLastExecutedTargetActions"

Const REGEX_ZIP_FILENAME

REGEX_ZIP_FILENAME: RegExp = /^(vscode\-ws)(.*)(_)([0-9]{8})(\-)([0-9]{6})(\.zip)$/i

The regular expression for testing a ZIP filename for a target.

Functions

createTargetSessionValue

  • createTargetSessionValue(target: Target): symbol
  • Creates a unique session value for a target.

    Parameters

    Returns symbol

    The session value.

executePrepareTargetOperations

  • Executes 'prepare' operations for a target.

    Parameters

    Returns Promise<boolean>

    The promise with the value, that indicates if whole operation has been cancelled (false) or not (true).

executeTargetOperations

  • Executes operations for a target.

    Parameters

    Returns Promise<boolean>

    The promise with the value, that indicates if whole operation has been cancelled (false) or not (true).

getNameAndPathForFileDeployment

  • getNameAndPathForFileDeployment(target: Target, file: string, dirs?: string[]): WithNameAndPath | false
  • Returns the name and path for a file deployment.

    Parameters

    • target: Target

      The target.

    • file: string

      The file.

    • Optional dirs: string[]

      One or more scope directories.

    Returns WithNameAndPath | false

    The object or (false) if not possible.

getScopeDirectoriesForTargetFolderMappings

  • getScopeDirectoriesForTargetFolderMappings(target: Target): Promise<string[]>
  • Returns the scope directories for target folder mappings.

    Parameters

    Returns Promise<string[]>

    The promise with the directories.

getTargetIdHash

  • getTargetIdHash(target: Target): string
  • Returns the hash of a target's ID.

    Parameters

    Returns string

    The hash of its ID.

getTargetName

  • getTargetName(target: Target): string
  • Returns the name for a target.

    Parameters

    Returns string

    The name.

getTargetOperationSafe

  • getTargetOperationSafe<TOperation>(val: TargetOperation | string): TOperation

getTargetsByName

  • getTargetsByName(targetNames: string | string[], targets: Target | Target[]): Target[] | false
  • Returns targets by their names and shows an error message if targets could not be found.

    Parameters

    • targetNames: string | string[]

      One or more target name.

    • targets: Target | Target[]

      One or more existing targets.

    Returns Target[] | false

    The list of matching targets or (false) if at least one target could not be found.

getZipFileName

  • getZipFileName(target: Target, time?: Moment.Moment): string
  • Returns the ZIP filename for a target.

    Parameters

    • target: Target

      The target.

    • Optional time: Moment.Moment

    Returns string

    The filename.

invokeForActiveEditorAndTarget

  • invokeForActiveEditorAndTarget(placeHolder: string, action: function): Promise<void>
  • Invokes an action for the file of an active text editor by selecting a target.

    Parameters

    • placeHolder: string

      The placeholder for the quick pick to use.

    • action: function

      The action to invoke.

        • (file: string, target: Target): any
        • Parameters

          Returns any

    Returns Promise<void>

isVisibleForPackage

  • Checks if a target is visible for a package.

    Parameters

    Returns boolean

    Is visible or not.

mapFilesForTarget

  • mapFilesForTarget<TFile>(target: Target, files: TFile | TFile[]): Promise<TFile[]>
  • Maps file objects for a specific target.

    Type parameters

    Parameters

    • target: Target

      The underlying target.

    • files: TFile | TFile[]

      The file targets to (re)map.

    Returns Promise<TFile[]>

    The promise with the new, mapped objects.

mapFoldersForTarget

  • mapFoldersForTarget<TFolder>(target: Target, folders: TFolder | TFolder[]): Promise<TFolder[]>
  • Maps folder objects for a specific target.

    Type parameters

    Parameters

    • target: Target

      The underlying target.

    • folders: TFolder | TFolder[]

      The folder targets to (re)map.

    Returns Promise<TFolder[]>

    The promise with the new, mapped objects.

normalizeTargetType

  • normalizeTargetType(target: Target): string
  • Normalizes the type of a target.

    Parameters

    Returns string

    The normalized target type.

resetTargetUsage

  • resetTargetUsage(context: vscode.ExtensionContext): void
  • Resets the target usage statistics.

    Parameters

    • context: vscode.ExtensionContext

      The extension context.

    Returns void

showTargetQuickPick

  • showTargetQuickPick(context: vscode.ExtensionContext, targets: Target | Target[], opts?: vscode.QuickPickOptions): Promise<Target | false>
  • Shows a quick pick for a list of targets.

    Parameters

    • context: vscode.ExtensionContext

      The extension context.

    • targets: Target | Target[]

      One or more targets.

    • Optional opts: vscode.QuickPickOptions

    Returns Promise<Target | false>

    The promise that contains the selected target (if selected) or (false) if no target is available.

throwOnRecurrence

  • Throws an error if a parent target is defined in a child list of targets.

    throws

    Found parent target in child list.

    Parameters

    • parentTarget: Target

      The target to check.

    • childTargets: Target | Target[]

      One or more children.

    Returns void

wrapOnBeforeFileCallbackForTarget

  • wrapOnBeforeFileCallbackForTarget<TFile>(file: TFile, target: Target, property: string | symbol): TFile
  • Wraps a 'before' callback of a file (context) object for a target.

    Type parameters

    Parameters

    • file: TFile

      The file (context).

    • target: Target

      The underlying target.

    • property: string | symbol

      The property (key) of the callback.

    Returns TFile

    The new object.

wrapOnBeforeFolderCallbackForTarget

  • wrapOnBeforeFolderCallbackForTarget<TFolder>(folder: TFolder, target: Target, property: string | symbol): TFolder
  • Wraps a 'before' callback of a folder (context) object for a target.

    Type parameters

    Parameters

    • folder: TFolder

      The folder (context).

    • target: Target

      The underlying target.

    • property: string | symbol

      The property (key) of the callback.

    Returns TFolder

    The new object.

Generated using TypeDoc