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

Commit

Permalink
added loadFrom properties for packages and targets
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed May 31, 2017
1 parent b7ea03e commit 585ce8b
Show file tree
Hide file tree
Showing 14 changed files with 342 additions and 88 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log (vs-deploy)

## 9.12.0 (May 31st, 2017; load settings from external files)

* added `loadFrom` for [packages](https://github.com/mkloubert/vs-deploy/wiki#packages-) and [targets](https://github.com/mkloubert/vs-deploy/wiki#targets-), which can define a path to an external JSON file with data to use as base settings for the underlying objects

## 9.11.0 (May 29th, 2017; dropbox, settings and placeholders)

* added `alwaysShowPackageList` setting that indicates if package list is shown, even if there is only 1 entry
Expand Down
86 changes: 85 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vs-deploy",
"displayName": "Deploy",
"description": "Commands for deploying files of your workspace to a destination.",
"version": "9.11.0",
"version": "9.12.0",
"publisher": "mkloubert",
"engines": {
"vscode": "^1.6.0"
Expand Down Expand Up @@ -917,6 +917,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"name": {
"type": "string",
"description": "The name of the package."
Expand Down Expand Up @@ -1352,6 +1356,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2774,6 +2782,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -4174,6 +4186,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -5541,6 +5557,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -6930,6 +6950,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -8332,6 +8356,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -9829,6 +9857,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -11241,6 +11273,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -12616,6 +12652,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -14051,6 +14091,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -15459,6 +15503,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -16836,6 +16884,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -18205,6 +18257,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -19603,6 +19659,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -21076,6 +21136,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -22620,6 +22684,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -23986,6 +24054,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -25381,6 +25453,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -26746,6 +26822,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down Expand Up @@ -28125,6 +28205,10 @@
}
]
},
"loadFrom": {
"type": "string",
"description": "The path to the JSON file from where to import data."
},
"deployed": {
"type": "array",
"items": {
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export function mergeConfig(cfg: deploy_contracts.DeployConfiguration): Promise<
// isFor
allImports = allImports.filter(imp => {
let validHosts = deploy_helpers.asArray(imp.isFor)
.map(x => deploy_helpers.toStringSafe(x).toLowerCase().trim())
.filter(x => x);
.map(x => deploy_helpers.normalizeString(x))
.filter(x => '' !== x);

if (validHosts.length < 1) {
return true;
Expand Down
14 changes: 12 additions & 2 deletions src/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ export interface BeforeDeployWaitOperation extends BeforeDeployOperation, Deploy
export interface BeforeDeployWebDeployOperation extends BeforeDeployOperation, DeployWebDeployOperation {
}

/**
* An object that can load (parts) of its data from a source.
*/
export interface CanLoadFrom {
/**
* The source from where to load the data from.
*/
loadFrom?: string;
}

/**
* A value with a name that is generated by code.
*/
Expand Down Expand Up @@ -1085,7 +1095,7 @@ export enum DeployOperationKind {
/**
* A package.
*/
export interface DeployPackage extends Applyable, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable {
export interface DeployPackage extends Applyable, CanLoadFrom, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable {
/**
* Settings for a "package button".
*/
Expand Down Expand Up @@ -1464,7 +1474,7 @@ export interface DeploySqlOperation extends DeployOperation {
/**
* A target.
*/
export interface DeployTarget extends Applyable, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable {
export interface DeployTarget extends Applyable, CanLoadFrom, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable {
/**
* List of operations that should be invoked BEFORE
* target is being deployed.
Expand Down
Loading

0 comments on commit 585ce8b

Please sign in to comment.