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

Commit

Permalink
fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed Apr 13, 2018
1 parent c1c23a4 commit 80646ed
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

[![Share via Facebook](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Facebook.png)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&quote=vscode-deploy-reloaded) [![Share via Twitter](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Twitter.png)](https://twitter.com/intent/tweet?source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&text=vscode-deploy-reloaded:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&via=mjkloubert) [![Share via Google+](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Google+.png)](https://plus.google.com/share?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded) [![Share via Pinterest](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Pinterest.png)](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&media=https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/demo1.gif&description=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.) [![Share via Reddit](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Reddit.png)](https://www.reddit.com/submit?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&title=vscode-deploy-reloaded) [![Share via LinkedIn](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/LinkedIn.png)](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&title=vscode-deploy-reloaded&summary=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.&source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded) [![Share via Wordpress](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Wordpress.png)](https://wordpress.com/press-this.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&quote=vscode-deploy-reloaded&s=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.&i=https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/demo1.gif) [![Share via Email](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Email.png)](mailto:?subject=vscode-deploy-reloaded&body=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20'vs-deploy'%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded)

## 0.73.0 (April 13th, 2018; fixes and improvements)

* bugfixes
* code cleanups and improvements
* added `isHidden` settings for [packages](https://github.com/mkloubert/vscode-deploy-reloaded/wiki#packages-) and [targets](https://github.com/mkloubert/vscode-deploy-reloaded/wiki#targets-)

## 0.72.1 (April 13th, 2018; file explorer operations)

* can list or remove directories on [targets](https://github.com/mkloubert/vscode-deploy-reloaded/wiki#targets-), from file explorer now
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 111 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-deploy-reloaded",
"displayName": "Deploy (Reloaded)",
"description": "Deploys files of a workspace to a destination.",
"version": "0.72.1",
"version": "0.73.0",
"publisher": "mkloubert",
"engines": {
"vscode": "^1.22.0"
Expand Down Expand Up @@ -1070,6 +1070,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide package in the GUI or not.",
"type": "boolean",
"default": false
},
"name": {
"description": "A (display) name for that package.",
"type": "string"
Expand Down Expand Up @@ -4035,6 +4040,11 @@
"inputScriptOptions": {
"description": "Options for the input script."
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -7718,6 +7728,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -11332,6 +11347,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -14973,6 +14993,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -18594,6 +18619,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -22226,6 +22256,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -26118,6 +26153,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -27315,6 +27355,11 @@
"type": "string"
}
},
"supportsDeepDirectoryCreation": {
"type": "boolean",
"description": "Server supports deep directory creation or not.",
"default": false
},
"transformer": {
"description": "The path (or URI) to the data transformer script.",
"type": "string"
Expand Down Expand Up @@ -29791,6 +29836,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -33422,6 +33472,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -37047,6 +37102,11 @@
"description": "Ignore TLS or not.",
"default": false
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -40723,6 +40783,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -44344,6 +44409,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -48111,6 +48181,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -51728,6 +51803,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -55628,6 +55708,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -56858,6 +56943,11 @@
"type": "string"
}
},
"supportsDeepDirectoryCreation": {
"type": "boolean",
"description": "Server supports deep directory creation or not.",
"default": false
},
"transformer": {
"description": "The path (or URI) to the data transformer script.",
"type": "string"
Expand Down Expand Up @@ -59306,6 +59396,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -62971,6 +63066,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -66643,6 +66743,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down Expand Up @@ -70261,6 +70366,11 @@
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"isHidden": {
"description": "Hide target in the GUI or not.",
"type": "boolean",
"default": false
},
"mappings": {
"description": "Defines one or more folder mappings by minimatch patterns.",
"type": "object",
Expand Down
10 changes: 10 additions & 0 deletions src/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ export interface Cancelable {
readonly isCancelling: boolean;
}

/**
* An object that can be hidden.
*/
export interface CanHide {
/**
* Is hidden or not.
*/
readonly isHidden?: boolean;
}

/**
* Possible values for a 'checkForRequirements' setting.
*/
Expand Down
23 changes: 9 additions & 14 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import * as deploy_contracts from './contracts';
import * as deploy_helpers from './helpers';
import * as HTTP from 'http';
import * as HTTPs from 'https';
Expand All @@ -30,36 +31,30 @@ export interface RequestOptions extends HTTP.RequestOptions {
/**
* The maximum number of redirections.
*/
maximumRedirections?: number;
readonly maximumRedirections?: number;
/**
* Do not redirect automatically.
*/
noRedirect?: boolean;
readonly noRedirect?: boolean;
/**
* Raise error on 4xx status code or not.
*/
raiseOnClientError?: boolean;
readonly raiseOnClientError?: boolean;
/**
* Raise error on 5xx status code or not.
*/
raiseOnServerError?: boolean;
readonly raiseOnServerError?: boolean;
/**
* Raise error on status code that is greater than 599 or less than 200. Default: (true)
*/
raiseOnUnsupportedResponse?: boolean;
readonly raiseOnUnsupportedResponse?: boolean;
/**
* Function or data for setting up the request.
*/
setup?: any;
readonly setup?: any;
}


/**
* Stores the address of the default host.
*/
export const DEFAULT_HOST = '127.0.0.1';


/**
* Reads the content of a HTTP request body.
*
Expand Down Expand Up @@ -106,7 +101,7 @@ function requestInner(url: string | URL.Url, opts: RequestOptions,
if (!deploy_helpers.isObject<URL.Url>(url)) {
url = deploy_helpers.toStringSafe(url);
if (deploy_helpers.isEmptyString(url)) {
url = `http://${DEFAULT_HOST}/`;
url = `http://${deploy_contracts.DEFAULT_HOST}/`;
}

url = URL.parse(url);
Expand Down Expand Up @@ -150,7 +145,7 @@ function requestInner(url: string | URL.Url, opts: RequestOptions,
DEFAULT_OPTS.port = port;

if (deploy_helpers.isEmptyString(DEFAULT_OPTS.hostname)) {
DEFAULT_OPTS.hostname = DEFAULT_HOST;
DEFAULT_OPTS.hostname = deploy_contracts.DEFAULT_HOST;
}

const FINAL_REQUEST_OPTS: RequestOptions = MergeDeep(DEFAULT_OPTS, opts);
Expand Down
5 changes: 4 additions & 1 deletion src/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface AutoDeployFileOptions {
* A package.
*/
export interface Package extends deploy_values.Applyable,
deploy_contracts.CanHide,
deploy_contracts.ConditionalItem,
deploy_contracts.FileFilter,
deploy_contracts.PlatformItem,
Expand Down Expand Up @@ -1138,7 +1139,9 @@ export function resetPackageUsage(context: vscode.ExtensionContext) {
export async function showPackageQuickPick(context: vscode.ExtensionContext,
packages: Package | Package[],
opts?: vscode.QuickPickOptions): Promise<Package | false> {
const QUICK_PICKS: deploy_contracts.ActionQuickPick<string>[] = deploy_helpers.asArray(packages).map(pkg => {
const QUICK_PICKS: deploy_contracts.ActionQuickPick<string>[] = deploy_helpers.asArray(packages).filter(pkg => {
return !deploy_helpers.toBooleanSafe(pkg.isHidden);
}).map(pkg => {
const WORKSPACE = pkg.__workspace;

return {
Expand Down
Loading

0 comments on commit 80646ed

Please sign in to comment.