Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
added folder property to ScriptArguments interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed Dec 29, 2017
1 parent dad4884 commit 166c947
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Change Log (vscode-deploy-reloaded)

## 0.9.0 (December 30th, 2017; improvements)
## 0.9.0 (December 30th, 2017; scripts)

* bugfixes
* code improvements
* added `extension`, `folder` and `sessionState` properties to [ScriptArguments](https://mkloubert.github.io/vscode-deploy-reloaded/interfaces/_contracts_.scriptarguments.html)

## 0.8.0 (December 29th, 2017; target operations)

Expand Down
1 change: 1 addition & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export async function reloadCommands(newCfg: deploy_contracts.Configuration) {
command: id,
events: ME.workspaceSessionState['commands']['events'],
extension: ME.context.extension,
folder: ME.folder,
globalEvents: deploy_events.EVENTS,
globals: ME.globals,
globalState: GLOBAL_STATE,
Expand Down
4 changes: 4 additions & 0 deletions src/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ export interface ScriptArguments {
* The context of the underlying extension.
*/
readonly extension: vscode.ExtensionContext;
/**
* Gets the underlying workspace folder.
*/
readonly folder: vscode.WorkspaceFolder;
/**
* Gets the emitter for global extension events.
*/
Expand Down
1 change: 1 addition & 0 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ export abstract class FileToUploadBase implements FileToUpload {
const CONTEXT: deploy_transformers.DataTransformerContext = {
events: ME.workspace.workspaceSessionState['upload']['events'],
extension: ME.workspace.context.extension,
folder: ME.workspace.folder,
globalEvents: deploy_events.EVENTS,
globals: ME.workspace.globals,
globalState: ME.workspace.workspaceSessionState['upload']['states']['global'],
Expand Down
1 change: 1 addition & 0 deletions src/plugins/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class ScriptPlugin extends deploy_plugins.PluginBase<ScriptTarget> {
events: ME._EVENTS,
extension: context.target.__workspace.context.extension,
files: context['files'],
folder: context.target.__workspace.folder,
globalEvents: deploy_events.EVENTS,
globals: context.target.__workspace.globals,
globalState: ME._GLOBAL_STATE,
Expand Down
1 change: 1 addition & 0 deletions src/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ export async function pullFilesFrom(files: string[],
const CONTEXT: deploy_transformers.DataTransformerContext = {
events: ME.workspaceSessionState['pull']['events'],
extension: ME.context.extension,
folder: ME.folder,
globalEvents: deploy_events.EVENTS,
globals: ME.globals,
globalState: ME.workspaceSessionState['pull']['states']['global'],
Expand Down
1 change: 1 addition & 0 deletions src/targets/operations/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export async function execute(context: deploy_targets.TargetOperationExecutionCo
context: context,
events: WORKSPACE.workspaceSessionState['target_operations']['http']['events'],
extension: WORKSPACE.context.extension,
folder: WORKSPACE.folder,
globalEvents: deploy_events.EVENTS,
globals: WORKSPACE.globals,
globalState: WORKSPACE.workspaceSessionState['target_operations']['http']['global'],
Expand Down
1 change: 1 addition & 0 deletions src/targets/operations/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export async function execute(context: deploy_targets.TargetOperationExecutionCo
context: context,
events: WORKSPACE.workspaceSessionState['target_operations']['script']['events'],
extension: WORKSPACE.context.extension,
folder: WORKSPACE.folder,
globalEvents: deploy_events.EVENTS,
globals: WORKSPACE.globals,
globalState: WORKSPACE.workspaceSessionState['target_operations']['script']['global'],
Expand Down

0 comments on commit 166c947

Please sign in to comment.