Giter Club home page Giter Club logo

mkloubert / vscode-deploy-reloaded Goto Github PK

View Code? Open in Web Editor NEW
161.0 15.0 38.0 20.4 MB

Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.

Home Page: https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-deploy-reloaded

License: GNU Lesser General Public License v3.0

TypeScript 99.84% CSS 0.09% JavaScript 0.01% HTML 0.06%
vscode-extension deployment ftp sftp dropbox nodejs compare-files smtp coffeescript uglifyjs

vscode-deploy-reloaded's Introduction

vscode-deploy-reloaded

Share via Facebook Share via Twitter Share via Google+ Share via Pinterest Share via Reddit Share via LinkedIn Share via Wordpress Share via Email

Latest Release Installs Rating

Recoded version of Visual Studio Code extension vs-deploy, which provides commands to deploy files to one or more destinations.

The extension supports the following destinations:

Type
Amazon AWS S3 buckets
Apps or shell/batch scripts
Azure blob storages
Compiler
DropBox
External Node.js based scripts
FTP(S)
Local or shared network folders inside a LAN
Mail (SMTP)
SFTP
Slack
ZIP files

Table of contents

  1. Demos
  2. Preview
  3. Install
  4. How to use
  5. Install offline
  6. Support and contribute
  7. Related projects

Demos []

Deploying to SFTP []

Demo Deploying to SFTP

Deploy git commit []

Demo Deploy git commit

Sync when open []

Demo Sync when open

Auto remove on remote []

Demo Auto remove on remote

Download files []

Demo Download files

Check before deploy []

Demo Check before deploy

Compare files []

Demo Compare files

List remote files []

Demo List remote files

Tools []

Quick code execution []

Demo Quick code execution

Send files to other editors []

The following demo shows, how you can send a file to another VS Code instance over a secure and encrypted TCP connection:

Demo Send files to other editors

NPM helpers []

Provides some helpers for handling npm:

Demo NPM helpers

Preview []

Keep in mind, that this is a preview extension, which is in a good beta state.

The goal is to create a refactored version of vs-deploy, with a clean API and lots of more helpful tools and features, like multi workspace support.

If you are already using vs-deploy, it is recommended to disable the old extension, before you use vscode-deploy-reloaded.

Install []

Launch VS Code Quick Open (Ctrl + P), paste the following command, and press enter:

ext install vscode-deploy-reloaded

Or search for things like vscode-deploy-reloaded in your editor.

Demo Install extension

How to use []

Detailed information can be found at the wiki.

Otherwise...

Settings []

Open (or create) your settings.json in your .vscode subfolder of your workspace.

Add a deploy.reloaded section:

{
    "deploy.reloaded": {
    }
}

Packages []

A package is a description of files of your workspace that should be deployed.

Add the subsection packages and add one or more entry:

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "Version 2.3.4",
                "description": "Package version 2.3.4",
                "files": [
                    "**/*.php",
                    "/*.json"
                ],
                "exclude": [
                    "tests/**"
                ]
            }
        ]
    }
}

Have a look at the wiki, to get more information about packages.

Targets []

A target describes where a file or package should be transfered to.

Add the subsection targets and add one or more entry:

{
    "deploy.reloaded": {
        "targets": [
            {
                "type": "sftp",
                "name": "My SFTP folder",
                "description": "A SFTP folder",

                "dir": "/my_package_files",
                "host": "localhost", "port": 22,
                "user": "tester", "password": "password",

                "mappings": {
                    "/dir/of/files/that/should/be/mapped/**/*": "dir/on/target"
                }
            },
            {
                "type": "ftp",
                "name": "My FTP folder",
                "description": "A FTP folder",

                "dir": "/my_package_files",
                "host": "localhost", "port": 21,
                "user": "anonymous", "password": "",

                "deployed": [
                    {
                        "type": "sql",
                        "engine": "mysql",

                        "queries": [
                            "TRUNCATE TABLE `debug`",
                            "TRUNCATE TABLE `logs`"
                        ]
                    },
                    {
                        "target": "https://github.com/mkloubert"
                    }
                ]
            },
            {
                "type": "local",
                "name": "My local folder",
                "description": "A local folder",

                "dir": "E:/test/my_package_files"
            },
            {
                "type": "local",
                "name": "My network folder",
                "description": "A SMB shared network folder",

                "dir": "\\\\MyServer\\my_package_files"
            },
            {
                "type": "zip",
                "name": "My ZIP file",
                "description": "Create a ZIP file in a target directory",

                "target": "E:/test"
            },
            {
                "type": "mail",
                "name": "My mail server",
                "description": "An email deployer",

                "host": "smtp.example.com", "port": 465,
                "secure": true, "requireTLS": true,
                "user": "[email protected]", "password": "P@assword123!",
                "from": "[email protected]",
                "to": "[email protected], [email protected]"
            },
            {
                "type": "script",
                "name": "My script",
                "description": "A deploy script",

                "script": "E:/test/deploy.js",
                "options": {
                    "TM": 5979,
                    "MK": "23979"
                }
            },
            {
                "type": "batch",
                "name": "My Batch",
                "description": "A batch operation",

                "targets": ["My mail server", "My ZIP file"]
            },
            {
                "type": "azureblob",
                "name": "My Azure blob storage",
                "description": "An container in an Azure blob storage",

                "container": "my-container",
                "account": "my-storage-account",
                "accessKey": "<ACCESS-KEY-FROM-AZURE-PORTAL>"
            },
            {
                "type": "s3bucket",
                "name": "My Amazon Bucket",
                "description": "An Amazon AWS S3 bucket",

                "bucket": "my-bucket"
            },
            {
                "type": "dropbox",
                "name": "My DropBox folder",
                "description": "Deploy to my DropBox folder",

                "token": "<ACCESS-TOKEN>"
            }
        ]
    }
}

Have a look at the wiki, to get more information about targets.

How to execute []

Press F1 and enter one of the following commands:

Name Description
Deploy Reloaded: API ... Handles API hosts.
Deploy Reloaded: Compare ... Opens a set of commands, to compare local and remote files.
Deploy Reloaded: Delete ... Commands for deleting files.
Deploy Reloaded: Deploy ... List of commands for deploying files.
Deploy Reloaded: List directory ... Lists a (remote) directory.
Deploy Reloaded: Log files ... Opens a log file of that extension.
Deploy Reloaded: Proxies ... Handles TCP proxies.
Deploy Reloaded: Pull ... Pull or download files from remote.
Deploy Reloaded: Select deploy operation ... Lets the user select an operation for the active document.
Deploy Reloaded: Show notification(s) ... (Re-)Shows one or more notifications from the extension's author(s).
Deploy Reloaded: Switches ... Handle switch targets.
Deploy Reloaded: Tools ... A set of helpful tools.

You can also use the following, predefined, shortcuts:

Command Shortcut (CTRL is CMD on Mac) Description
extension.deploy.reloaded.deleteFile CTRL + ALT + D, F Deletes the current file on remote.
extension.deploy.reloaded.deletePackage CTRL + ALT + D, W Deletes files of a package on remote.
extension.deploy.reloaded.deployFile CTRL + ALT + F Deploys the current file.
extension.deploy.reloaded.deployWorkspace CTRL + ALT + W Deploys files of a package.
extension.deploy.reloaded.listDirectory CTRL + ALT + L, D Lists a directory on remote.
extension.deploy.reloaded.pullFile CTRL + ALT + P, F Pulls / downloads the current file.
extension.deploy.reloaded.pullWorkspace CTRL + ALT + P, W Pulls / downloads files of a package from remote.
extension.deploy.reloaded.quickExecution CTRL + SHIFT + Q Quick JavaScript code execution.
extension.deploy.reloaded.receiveFile CTRL + ALT + S, R Waits for a file from a remote editor.
extension.deploy.reloaded.receiveFile.closeServer CTRL + ALT + S, C Cancels the receiving of a file from a remote editor.
extension.deploy.reloaded.sendFile CTRL + ALT + S, S Sends the current file to a remote editor.

Install offline []

If you have problems with a newer version of that extension (or have no connection to the Visual Studio Marketplace server), you can try to install a .vsix file from release section (s. Assets):

  • open the extension sidebar (CTRL + SHIFT + X)
  • click on the ellipsis in the right upper corner (More)
  • choose Install from VSIX...

Support and contribute []

If you like the extension, you can support the project by sending a donation via PayPal to me.

To contribute, you can open an issue and/or fork this repository.

To work with the code:

  • clone this repository
  • create and change to a new branch, like git checkout -b my_new_feature
  • run npm install from your project folder
  • open that project folder in Visual Studio Code
  • now you can edit and debug there
  • commit your changes to your new branch and sync it with your forked GitHub repo
  • make a pull request

If you like to create a translation, for example, you can take a look at this directory.

The API documentation can be found here.

Contributors []

Related projects []

node-enumerable []

node-enumerable is a LINQ implementation for JavaScript, which runs in Node.js and browsers.

node-simple-socket []

node-simple-socket is a simple socket class, which supports automatic RSA encryption and compression for two connected endpoints and runs in Node.js.

vscode-helpers []

vscode-helpers is a NPM module, which you can use in your own VSCode extension and contains a lot of helpful classes and functions.

vscode-deploy-reloaded's People

Contributors

denis-gorin avatar drummersi avatar hajekj avatar mkloubert avatar oliveira131 avatar rehlers avatar solid-pixel avatar zypa13510 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-deploy-reloaded's Issues

Tiny doc update

Description

Incorrect syntax in the Readme showing deployOnSave description. The Wiki page is correct.

Actual behavior

Readme section (under package) contains:
"deployOnSave": true

Expected behavior

should be
"deployOnSave": [ "My SFTP folder" ]

Steps to reproduce

n/a

Example config

n/a

Screenshot

n/a

Your environment

https://github.com/mkloubert/vscode-deploy-reloaded#packages-

Additional comments

Sorry for the trivial bug report :)

Allow write like as specific user/permission

Description

I know I can, set chmod on the remote server to allow write via ftp / sftp. but my designs are in production whose permissions are safe. And since I always foresee making changes to the files, I would like to know if there is an option or argument to pass a command that enables writing during deploy.

In the vs-deploy extension I used the connected arguments that allow to pass commands on the remote server, so I would pass something like sudo chmod 775 enabling writing before of sending the files, and then returned to normal by the uploaded argument.

Actual behavior

I do not find an option or form to allow deploy writing on projects that are in production.

Expected behavior

I need suggestions that do not include manually changing the permissions of the remote directory.

My environment

  • Operating system: Windows 10 Pro
  • Visual Studio Code version: 1.20.0
  • Extension version: 0.53.3

Additional comments

My remote environment is a Virtual Machine on Google Cloud Engine with this specs:
OS: Ubuntu Server 16.04.4
WebServer: Nginx (custom-build), HHVM (PHP 7.1), MariaDB
Web Root Directories: /var/www/
Web Root Permissions: Directories => chmod 755, Files => chmod 644, chown www-data

bug: deploy operation: can't stop

Actual behavior

if I selected a deployment on sftp and canceled it before starting the deployment
The extension is suspended for "canceling the deployment operation ..."

Expected behavior

it's must stop :-)

Example config

{
  "deploy.reloaded": {
    "targets": [
      {
        "type": "sftp",
        "name": "#some project",
        "description": "some folder",
        "dir": "/some path",
        "host": "123.123.123.123",
        "port": 22,
        "user": "user",
        "privateKey" : "some path/.ssh/id_rsa",
        "checkBeforeDeploy": true
      }
    ]
  }
}

Logs

no logs.

Screenshot

image

Your environment

  • Operating system: win10
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.51.0

deploy all open files also is catching .git file

Description

The new option to deploy all open text files (which is awesome) seems to be including a file from whatever filename is in the active window with '.git' appended. This is just throwing an error on deploy, as it seems the filename is bogus. I tried this multiple times and the ".git" file seems to always be the one file that I have open in the window. This happens if the active file has been Modified or has already been committed into git.

Actual behavior

Deploying file '/app/admin/views.py' to '/var/www/app/admin (server-01)' ... [OK]
Deploying file '/app/models.py' to '/var/www/app (server-01)' ... [OK]
Deploying file '/app/admin/forms.py' to '/var/www/app/admin (server-01)' ... [OK]
Deploying file '/app/templates/base.html' to '/var/www/app/templates (server-01)' ... [OK]
Deploying file '/app/admin/templates/admin/main.html' to '/var/www/app/admin/templates/admin (server-01)' ... [OK]
Deploying file '/app/admin/forms.py.git' to '/var/www/app/admin (server-01)' ... [ERROR: 'ENOENT: no such file or directory, open '/app/admin/forms.py.git'']

Expected behavior

Deploying file '/app/admin/views.py' to '/var/www/app/admin (server-01)' ... [OK]
Deploying file '/app/models.py' to '/var/www/app (server-01)' ... [OK]
Deploying file '/app/admin/forms.py' to '/var/www/app/admin (server-01)' ... [OK]
Deploying file '/app/templates/base.html' to '/var/www/app/templates (server-01)' ... [OK]
Deploying file '/app/admin/templates/admin/main.html' to '/var/www/app/admin/templates/admin (server-01)' ... [OK]

Steps to reproduce

Open multiple files in VS. Choose deploy All open files. pick a target.

Example config

{
    "deploy.reloaded": {
        // your config
    }
}

Screenshot

see actual and expected above

Your environment

  • Operating system: MacOS 10.12.6
  • Visual Studio Code version: 1.19.1
  • Extension version: 0.16.0

Additional comments

{Please write here, if there is something more to tell}

Unable to deploy twice with FTP (engine = ftp)

This issue only occurs with engine == ftp.

It seems this engine is not able to create the dir folder automatically. Not sure if it is the intended behavior. So first I need to create the dir folder manually.

Then:

The first time, I can deploy a file without any problem. However, if I try to deploy the file a second time, deployment gets stuck to:

Deploying file 'c:\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\index.html' to '/ (my_target)' ...

Only if I delete the file on the server and restart vscode can I upload again and get the success message:

Deploying file 'c:\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\index.html' to '/ (my_target)' ... [OK]

Additionally, I get the same issue whenever I try to deploy to the root of my ftp server, whether the file is initially there or not. So anything like dir == "/" or dir == "" or no dir at all in settings.json leads to the error above.

Deploying current file works even though current file is not part of any package

When executing "F1 > Deploy Reloaded: Deploy > Current file", the current file is deployed even though it's not part of any package. Is this the expected behavior? Aren't we supposed to be able to define which files/folders we want to deploy or am I missing the point entirely? How can I prevent files/folders to be deployed by mistake?

My settings:

"deploy.reloaded": {
  "packages": [
    {
      "name": "my-package",
      "files": [
        "my-sub-folder/**"
      ]
      "targets": ["my-target"]
    }
  ],	 
  "targets": [        
    {
      "type": "sftp",
      "name": "my-target",
      ...
    }			
  ]
}

With those settings, I expect files from my-sub-folder to be deployed, and none other.

My environment:

  • Operating system: Windows 7
  • Visual Studio Code version: 1.21.0
  • Extension version: Deploy (Reloaded) 0.56.0

None of the menu option works: command 'extension.deploy.reloaded.anyCommand' not found

Description

When bring up the menu by Ctrl+Shift+P, typed deploy and clicked any command that belong to deploy-reload, error message would occur, such as
command 'extension.deploy.reloaded.listDirectory' not found
command 'extension.deploy.reloaded.showTools' not found

Actual behavior

Error messages come out.

Expected behavior

Should go into whichever option that was selected

Example config

{
  "deploy.reloaded": {
    "packages": [
      {
        "name": "mobile",
        "description": "Package version 2.3.4",
        "exclude": [
          "tests/**",
          ".vscode/**",
          ".vscode",
          "sftp-config.json",
        ],
        "files": [
          "**"
        ],
      }
    ],
    "targets": [
      {
        "type": "sftp",
        "name": "mobile-site3",
        "description": "mobile v3",
        "dir": "/home/zfeng/src/mobile-site2",
        "host": "***********",
        "user": "*****",
        "privateKey": "/**********",
      }
    ]
  }
}

Your environment

  • Operating system: Linux 17.10 64 bit
  • Visual Studio Code version:
Version 1.19.3
Commit 7c4205b5c6e52a53b81c69d2b2dc8a627abaa0ba
Date 2018-01-25T10:32:23.601Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
  • Extension version: 0.34.1

ShortCut

FeatureRequst

Shortcut for deploy active file.
Or button for deploy, but only the active file.

(deployOnSave is on false)

beforeDeploy not executed , if no files founds

Description

I go a sftp target , and packages listing files under a dist repositiry
the dist directory is produced by beforeDeploy task.

Actual behavior

deploy does nothing , since no files found because the dist directory did'nt exist yiet.

Expected behavior

the deploy should run the beforeDeploy , event if no files found

Steps to reproduce

remove the dist repository

Example config

{
    "deploy.reloaded": {
           "packages": [
            {
                "name": "TEST",
                "description": "TEST",
                "files": [
                    "dist/**/*.php",
                    "dist/*.js",
                    "dist/*.css",
                    "dist/*.woff",
                    "dist/*.ttf",
                    "dist/*.svg",
                    "dist/*.woff2",
                    "dist/*.eot",
                    "dist/index.html",
                    "dist/assets/**"
                ],
                "exclude": [
                    "tests/**"
                ],
                "deployOnSave": false,
                "button": {
                    "text": "Deploy",
                    "tooltip": "Click here to deploy to the target...",
                    "targets": [ "TEST" ]
                }

            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "TEST",
                "description": "A SFTP folder",
                "dir": "/var/www/test",
                "host": "localhost", "port": 22,
                "user": "root", 
                "beforeDeploy": [
                    {
                        "type": "exec",
                        "command": "npm run prod"
                    }
                ],
    }
}

Your environment

  • Operating system: Windows
  • Visual Studio Code version: 1.19.1
  • Extension version: 0.15.0

Additional comments

may be necessary to add some force atribute to the task .

[help-needed]Can I pull remote files into an empty folder?

Description

I am trying to pull remote directory to an empty folder, just as a SFTP does.

Actual behavior

If I asked it to List Directory, it will show everything in the remote directory. However, when I asked it to pull, it would be:
[vscode-deploy-reloaded]::[testing_student4] No files found!

Expected behavior

I was hoping it could pull all the files.

Steps to reproduce

{Please write here, including precondition and an example config, if possible}

Example config

{
  "deploy.reloaded": {
    "packages": [
      {
        "name": "test",
        "description": "Package version 2.3.4",
        "exclude": [
          "tests/**",
          ".vscode/**",
          ".vscode",
          "node_modules/**",
          "app/bower_components/**",
        ],
        "files": [
          "**"
        ],
        // "removeOnChange": [
        //   "student4"
        // ],
        // "deployOnSave": [
        //   "student4"
        // ],
        "syncWhenOpen": "student4"
      }
    ],
    "targets": [
      {
        "type": "sftp",
        "name": "student4",
        "description": "A SFTP folder",
        "dir": "/XXXXXXX",
        "host": "XXXXXX",
        "user": "XXX",
        "privateKey": "XXXXXX",
      }
    ]
  }
}

Your environment

  • Operating system: Linux 17.10
  • Visual Studio Code version: 1.19.2
  • Extension version: 0.28.5

Missing 'app' target

Why was the app target from vscode-deploy removed in this reloaded version?
It's the only reason I didn't switch to this one

Enhance notification text for showPopupOnSuccess

Description

The new showPopupOnSuccess/showPopupWhenFinished options are really helpful! Thanks for that. I'd like to ask / recommend an improvement to the notification that's posted:

  • If there was only one file deployed/pulled (i.e. using showPopupWhenFinished=1) which usually happens when you also have deployOnSave/deployOnChange=true, can the notification include the relative workspace file path in the notification?

  • If there were > 1 file deployed/pulled, can the notification include how many files were deployed/pulled (since you can't list them all in the notification, it would be too large in many cases).

Actual behavior

  • Current notifications look like:
    [vscode-deploy-reloaded]::[project1] All files have been deployed.
    [vscode-deploy-reloaded]::[project1] All files have been pulled.

Requested behavior

  • For single-file case:
    [vscode-deploy-reloaded]::[project1] File the/deployed/file.css has been deployed.
    [vscode-deploy-reloaded]::[project1] File the/deployed/file.css has been pulled.

  • For multiple file case:
    [vscode-deploy-reloaded]::[project1] Total of 5 files have been deployed.
    [vscode-deploy-reloaded]::[project1] Total of 5 files have been pulled.

Steps to reproduce

Not a bug. Just a request.

Example config

{
    "deploy.reloaded": {
...
        "showPopupOnSuccess": true,
        "showPopupWhenFinished": 1,
...
    }
}

Logs

Not applicable.

Screenshot

Not applicable.

Your environment

  • Operating system: MacOS X 10.12.6
  • Visual Studio Code version: 1.21.1
  • Extension version: 0.60.0

Additional comments

Thanks!

Noob issue

Description

Greetings :) I am unable to successfully deploy to my SFTP.

Actual behavior

When I CTRL+S a file I've edited, I see one empty line printed to the Output > Deploy Reloaded, and "Deploying files to 'blah'" in the status bar. Then nothing happens (waited for a long while)

Expected behavior

Quickly upload :)

Steps to reproduce

{
	"deploy.reloaded": {
		"packages": [
			{
				"name": "main",
				"description": "Package version 2.3.4",
				"deployOnSave": true,
				"fastCheckOnSave": true,
				"files": [
					"**/*.php",
					"/*.json"
				],
				"exclude": [
					"tests/**"
				],
				"targets": [
					"blah"
				]
			}
		],
		"targets": [
			{
				"type": "sftp",
				"name": "blah",
				"host": "blah.com",
				"port": 22,
				"user": "blah",
				"password": "blah",
				"dir": "/var/www/myproject",
				"debug": true
			}
		],
		"fastFileCheck": true,
		"deployOnSave": true
	},
	"search.exclude": {
		"**/node_modules": true,
		"**/bower_components": true
	},
	"composer.executablePath": "C:\\ProgramData\\ComposerSetup\\bin\\composer.bat",
	"git.ignoreLimitWarning": true
}

Logs

How? I only see one empty line printed when I activate the plugin with CTRL+S

Your environment

  • Operating system: Win 8.1, vscode latest, deploy-reloaded latest
  • Visual Studio Code version:
    Version 1.20.1
    Commit f88bbf9137d24d36d968ea6b2911786bfe103002
    Date 2018-02-13T15:34:36.336Z
    Shell 1.7.9
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64
  • Extension version: latest today

Additional comments

I've had this exact problem for about a year (with non-reloaded version). I've never been able to use your plugin.

List Directory always looking for '/' no matter what "dir" is set to in targets in settings.json

Description

List Directory always looking for '/' no matter what "dir" is set to in "targets" within the settings.json file.
Appears to always use default.
Note: All other entries work when changed.

Actual behavior

[vscode-deploy-reloaded]::[my_site] Could not list directory '/'

Expected behavior

Should try to open "dir": "/test/test1"

Steps to reproduce

CTRL+SHIFT+P
Select Deployed Reloaded List Directory
[vscode-deploy-reloaded]::[my_site] Could not list directory '/'

Example config

{
    "deploy.reloaded": {
        // your config
               "type": "sftp",
               "name": "myname",
               "description": "mydescription",
               "host": "myhost",
               "port": 22,
               "user": "myusername", 
               "password": "mypassword",
               "dir": "/test/test1"     -> ignores
    }
}

Logs

// write log messages here, if possible

// maybe one or more log files are available
// in sub folder '.vscode-deploy-reloaded/.logs'
// inside your home directory

Screenshot

{Please write here, if possible}

Your environment

  • Operating system: Windows 10
  • Visual Studio Code version: 1.20.0
  • Extension version: 0.39.1

Additional comments

{Please write here, if there is something more to tell}

Slow deployOnSave with big projects

Description

Hi Marcel,

I am experiencing some pretty lengthy delays between saving a file and the file being actually deployed when using deployOnSave. It would seem that the bigger the package, the longer it takes for a file to be deployed after saving it.

I know that the old extension had the fastCheckOnSave setting which speeds up the deployment on save by a lot but it seems that the new extension doesn't recognize it.

Actual behavior

In a pretty big project (1.5GB and 25,000+ files), I am seeing a 30~60seconds delay after saving a single file for it to be deployed.

Expected behavior

For comparison sakes, the old extension with fastCheckOnSave set to true and the same big project would normally have a ~1 second delay.

Steps to reproduce

  • Open a really big project (25000+ files).
  • Configure it to use deployOnSave.
  • Save a file and see how long it takes for it to deploy the saved file.

Example config

"deploy.reloaded": {
    "packages": [
      {
        "name": "MyLocalPackage",
        "deployOnSave": true,
        "files": [
          "**"
        ],
        "targets": [
          "RemoteSFTP"
        ]
      }
    ],
    "targets": [
      {
        "type": "sftp",
        "name": "RemoteSFTP",
        "dir": "/path/to/remote/dir",
        "host": "example.com",
        "agent": "${SSH_AUTH_SOCK}",
        "user": "username"
      }
    ]
  }

Screenshot

{Please write here, if possible}

Your environment

  • Operating system: macOS Sierra v10.12.6
  • Visual Studio Code version: v1.19.1
  • Extension version: v0.16.2

Additional comments

{Please write here, if there is something more to tell}

RemoveOnChange not deleting dirs

Description

When deleting a local file, the files also gets deleted on the server (as expected from removeOnChange: true)
But deleting a directory, gives this error:
Deleting file 'd:\edutec\projets\bildungslandschaft\htdocs\test' in '[localhost] D:\wamp64\www\bildungslandschaft.local (bildungslandschaft switch)' ... [ERROR: ''D:\wamp64\www\bildungslandschaft.local\test' is no file!']

It should also delete directories, if possible :)

Deploying file '' to '' ... message is missing target name.

Description

When deploying code, the message Deploying file 'xxxx' to 'xxxx' does not include the target name. This would be very useful for me, especially when deploying the same file to multiple targets via a batch.

Actual behavior

Deploying file '[whatever]/pp/test.py' to '/usr/local/etc/pp' ... [OK]

Expected behavior

Deploying file '[whatever]/pp/test.py' to '/usr/local/etc/pp (server02)' ... [OK]

Steps to reproduce

Deploy a single file to a SFTP (or batch) target.

Example config

{
    "deploy.reloaded": {
        // your config
    }
}

Screenshot

See actual vs expected above

Your environment

  • Operating system: MacOS 10.12.6
  • Visual Studio Code version: 1.19.1
  • Extension version: 0.15.0

Additional comments

If I update the deploy.ts:

LF.onBeforeUpload = async function(destination?: string) {
   if (arguments.length < 1) {
      destination = `${deploy_helpers.toDisplayablePath(NAME_AND_PATH.path)} (${TARGET_NAME})`;
   }
   else {
      destination = `${deploy_helpers.toStringSafe(destination)}`;
   }

to change the last destination line to:

destination = `${deploy_helpers.toStringSafe(destination)} (${TARGET_NAME})`;

Then I get the output I would like to see for a single target. However, if I am doing a batch mode, then the target name is the name of the batch target, instead of each individual target being cycled through. It would be great if when I do a batch deploy, I can see each target being uploaded to by name.

[help-needed documentation?] ignore/exclude files

Description

I'm attempting to ignore some files from deployment, download or upload using sftp.

Looking over the documentation in the examples I see "exclude" being used but cannot find that as a json property listed in the tables. I do see ignore in the documentation tables.

Which is appropriate to use for ignoring/excluding things?

Actual behavior

Add ignore/exclude section to packages specifically to exclude old .svn directories from download.
Pulling folder down and subfolders pulls files mentioned in the package ignore/exclude.

Expected behavior

Adding a ignore/exclude with correct syntax prevents Deploy Reloaded from downloading files matching those rules.

Steps to reproduce

Add ignore or exclude (unsure which is correct to use) for remote files to exclude.
Use action to list remote directory with SFTP, choose "Pull files with Subfolders"

Example config

}
  "deploy.reloaded": {
    "packages": [
        {
            "name": "MODULES",
            "description": "MODULES",
            "deployOnSave": true,
            "files": [
                "**"
            ],
            "ignore": [
                ".vscode/**",
                ".vscode",
                ".svn/**",
                ".svn"
            ],
            "targets": [ "modules" ],
            "exclude": [
                ".vscode/**",
                ".vscode",
                ".svn/**",
                ".svn"
            ]
        }
    ],

    "targets": [
        {
            "type": "sftp",
            "name": "modules",
            "description": "modules folder",
            "host": "ip_address_of_host",
            "user": "username",
            "privateKey": "/path/to/keyfile",
            "privateKeyPassphrase": "passphrase",
            "dir": "/remotedir"
        }
    ]
  }
}

Your environment

  • Operating system: macOS 10.13.3
  • Visual Studio Code version: 1.20.0
  • Extension version: 0.40.0

Additional comments

It is very possible that I'm using the incorrect syntax in the ignore or exclude. Just not sure what might be wrong there and if I should be using ignore or exclude.

Thanks!

Prebuild process

Feature Request

A nice to have feature, might be a "prebuild" before deploy
for example before deploy , I need to build a production version
using a npm script like "prod": "ng build --aot=true --build-optimizer --environment prod --prod "
this would produce a dist repository , that I deploy to production server.
so the prebuild commands might be something like

"prebuilds" : {
"npm run prod"
}

Help needed getting deployOnChange to work

Description

When I change something in a scss file and it updates the css files, the css files are not deployed.
However making a manual change in those files and then saving does trigger a deploy.

Actual behavior

deployOnChange is not triggered when gulp makes the change.
deployOnSave works as expected.

Expected behavior

When gulp updates the css/js files they should be deployed.

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "My project",
                "fastCheckOnSave": true,
                "deployOnChange": {
                "files": [
                    "**/css/**",
                    "**/js/**",
                ],
                "targets": [ "My FTP folder" ]
                },
                "deployOnSave": {
                "files": [
                    "**/css/*",
                    "**/js/*",
                    "**/*.php"
                ],
                "targets": [ "My FTP folder" ]
                }
            }
        ],
        "targets": [
            {
                "type": "ftp",
                "name": "My FTP folder",
                "description": "A FTP folder",

                "dir": "/var/www/myproject/",
                "host": "10.0.0.10", "port": 21,
                "user": "admin", "password": "password",
                "debug": true
            }
        ]
    }
}

### Your environment

- Operating system: Windows 10
- Visual Studio Code version: 1.12.1
- Extension version: 0.58.0

Options in sidebar context menu

I guess this is a big one, and I´m not known with the challenges to make something like this in vscode.
This is a screenshot of the Sublime text SFTP context menu
screen shot on 2018-01-21 at 00_07_56

The feature I´m missing the most is to upload a complete folder to remote.

too many SFTP connections

Description

when using deploy-reloaded with the below config, i get more and more stale sftpd processes on the target machine (I am frequently saving)
when I close VSC the stale sftd processes go away

I am deploying to a Raspberry Pi so memory consumption is a problem

Actual behavior

deploy-reloaded opens more and more sftp connections to the target machine and does not close them

Expected behavior

close sftp connection
or
reuse sftp connection

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "xgpioPack",
                "description": "Package version 2.3.4",

                "files": [
                    "/*.ts",
                    "/*.json",
                    "build/**"
                ],
                "exclude": [
                    "node_modules/**"
                ],

          
                "deployOnChange":[ "xgpioTar" ]
            }
        ],

        "targets": [
            {
                "type": "sftp",
                "name": "xgpioTar",
                "description": "A SFTP folder",

                "host": "10.2.x.x", 
                "port": 22,
                "user": "stefan", 
                "password": "x",

                "dir": "/x"
            }
        ]
    }
}

Your environment

  • Operating system: ubuntu x64 16.04
  • Visual Studio Code version: 1.19.2
  • Extension version: 0.29.0

Mappings setting not including hidden files

Description

Hello, I have a .htaccess file for my server that I also want to deploy.
My mapping looks like this now to make it work:

"dir": "/htdocs/",
				"mappings": {
					"frontend/**/*": "/",
					"frontend/.htaccess": "/",
				}

But shouldn't this config also work when I only use "frontend/**": "/" ?
Without the second line, it creates a frontend folder inside the htdocs folder...

sftp modes not applying to file not in a sub-directory

Description

When deploying a file that is not in a directory the mode does not appear to change.
If I move the file into a directory, within the workspace, the new mode is set.

Actual behavior

The attributes of the uploaded file are not changed.
No error is reported; response is ... [OK]

Expected behavior

File attributes should change.

Steps to reproduce

Upload a file in the root of the workspace.

Example config

{
    "deploy.reloaded": {
        "targets": [
            {
                "name": "Device",
                "type": "sftp",
                "host": "device",
                "dir": "/root",
                "user": "root",
                "password": "xxx"
            }
        ]
    }
}

Logs

Deploying file '...' to '/. (Device)' ... [OK]

Screenshot

{Please write here, if possible}

Your environment

  • Operating system: Debian Jessie (running in Docker container)
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.53.1

Additional comments

The target device is an embedded board running Debian Jessie.

I am cross-compiling an executable and using your extension to upload the file.
As a workaround I have changed the makefile to store the target in a folder.

Extension stop working

Description

After update my VSC to new version extension stop working.
I have list of all commands but no one working

Logs

command 'extension.deploy.reloaded.deploy' not found

Screenshot

list of command
default

Error
default

Your environment

  • Operating system:Windows 10
  • Visual Studio Code version: Version 1.21.1
    Commit 79b44aa704ce542d8ca4a3cc44cfca566e7720f1
    Date 2018-03-14T14:46:47.128Z
    Shell 1.7.9
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64
  • Extension version: v0.64.0

Additional comments

I already tried to disable/enable extension and reinstall it. Nothing helps

SFTP target does not obey specified "modes" setting

Description

I've tried to use "modes" globally (just a single value), and with specific file mapping. No matter what I try, the files always deploy with 0777 file mode.

Actual behavior

Using this:

        "targets": [
            {
                "type": "sftp",
...
                "modes": 644
            }
        ]

All files that deploy still have file mode 0777 on the remote.

I have also tried:

                "modes": [ "**": 644 ]

and just with a single file:

                "modes": [ "readme.txt": 644 ]

Expected behavior

All files that deploy should have file mode 0644 on the remote.
All cases above fail.

Steps to reproduce

Use an SFTP target, set "modes" to 0644.

Example config

    "deploy.reloaded": {
        "packages": [
            {
                "name": "Local",
                "description": "Local source",
                "deployOnSave": [
                    "SRVR"
                ],
                "files": [
                    "**/*",
                    "**/.*"
                ]
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "SRVR",
                "description": "Remote target",
                "host": "myserver.domain.com",
                "port": 22,
                "user": "myuser",
                "privateKey": "${homeDir}/.ssh/id_rsa_mykey",
                "dir": "/some/path/on/my/remote",
                "modes": 644
            }
        ]
    }

Logs

Deploying file '/Users/myuser/src/localwork/readme.txt' to '/. (SRVR)' ... [OK]

Screenshot

Not applicable.

Your environment

  • Operating system: MacOS 10.12.6, remote server Linux RHEL 6.5
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.53.1

Additional comments

I have also tried the original "Deploy" extension, and it correctly handles the "modes" option when I use it instead. However, I prefer to use the new "Reloaded" version as it has more command / features that I prefer.

mappings drop folder

Have 2 Mappings:

"mappings": { 
      "webs/dev/site/**/*"    : "/HAimperia/apache-develop/site",
      "webs/dev/htdocs/**/*"  : "/HAimperia/apache-develop/htdocs"
  }

All for htdocs work fine, but in site, evrything goes to /HAimperia/apache-develop/site, nu subfolders

Log:
This is ok:
Stelle Datei '...\webs\dev\htdoc\static\shared\css\header.css' in '/HAimperia/apache-develop/htdocs/static/shared/css (vm-fuh)' bereit ... [OK]

Thats wrong:
Stelle Datei '...\webs\dev\site\metafiles\universitaet.meta' in '/HAimperia/apache-develop/site (vm-fuh)' bereit ... [OK]

Target must /HAimperia/apache-develop/site/metafiles

Tested with some other files:
Stelle Datei ...\webs\dev\site\include\shared\config.inc' in '/HAimperia/apache-develop/site/shared (vm-fuh)' bereit ... [OK]

"include" is missing oon target.

Stelle Datei '...\webs\dev\site\modules\core\Project\Shared\Export.pm' in '/HAimperia/apache-develop/site/core/Project/Shared (vm-fuh)' bereit ... [OK]

"modules" is missing on target.
Looks like only the fiirst folder where dropped.

Also i have testedd with other mappings: "webs/dev/**/*": "/HAimperia/apache-develop"

Now the htdocs is missing:
Stelle Datei '...\webs\dev\htdocs\static\shared\css\header.css' in '/HAimperia/apache-develop/static/shared/css (vm-fuh)' bereit ... [OK]

This mappings where working correct, but target on /dev/**/* on .../site is bad.

                    "mappings": {
                        "webs/dev/htdocs/**/*"  : "/HAimperia/apache-develop/htdocs",
                        "webs/dev/**/*": "/HAimperia/apache-develop/site",
                    }

Password prompt

Description

Just switched from the "classic" version. Password is not prompted for sftp. I tried to use the prompt target, but the password is not remembered.

Actual behavior

None.

Expected behavior

Prompt for password when the password is not provided in settings.

deployOnSave does not work

Description

I have "deployOnSave": true in my Package Configuration, but files are not deployed when saved.

Actual behavior

nothing happens

Expected behavior

file copied to target

Example config

{
    "deploy.reloaded": {
        "showPopupOnSuccess": false,
        "packages": [
            {
                "name": "production",
                "deployOnSave": true,

                "exclude": [
                    ".vscode/**",
                    "*.code-workspace"
                ],

                "targets": [ "db1" ]
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "db1",
                "host": "10.10.10.1", "port": 22,
                "user": "admin", "password": "password",

                "dir": "/var/www",
            }
        ]
    }
}

Your environment

  • Operating system: Windows 10
  • Visual Studio Code version:
Commit 490ef761b76b3f3b3832eff7a588aac891e5fe80
Date 2018-01-10T15:55:03.538Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
  • Extension version: 0.32.0

Additional comments

When I add "fastCheckOnSave": true to the package config, deployOnSave works again.

Making current directory path copy friendly in list directory

It would be great if path to current directory listed on remote server (SFTP) could be copied.

This way we would start of with / as dir, browse remote with Deploy Reloaded: List directory, navigate to the correct directory and copy the path.

Even better I guess would be to skip the whole copy / paste action and have a "Set as remote dir" functionality, but that would be the next level 😄

ERROR: '553 Could not create file.' using ftp

Description

Hello, I try to upload files to an ftp server, but I always get this message:
Deploying file 'd:\edutec\projets\script\frontend\js\cms\app.js' to '/htdocs/js/cms (www2.script.lu)' ... [ERROR: '553 Could not create file.']
Using filezilla it works

###My config:

{
				"name": "www2.script.lu",
				"type": "ftp",
				"host": "script.hosting-restena.lu",
				"port": 21,
				"user": "****",
				"password": "******",
				"dir": "/htdocs/",
				"mappings": {
					"frontend/**": "/htdocs/",
					"frontend/.htaccess": "/htdocs/",
				}
			},

Multiple Buttons for different deployments

Description

Hello, I have a local wamp server and a live webserver, and want to have 2 separate buttons with 2 different targets, but for one package, I can only have 1 button

Actual behavior

{Please write here}

Expected behavior

"packages": [
            {
                "name": "vcmamer",
                "files": [
                    "htdocs/**"
                ],
                "deployOnSave": true,
                "targets": [
                    "local webserver"
                ],
                "button": [
                    {
                        "text": "Deploy to live webserver!! :)",
                        "targets": [
                            "gilles server",
                        ]
                    },
                    {
                        "text": "Deploy to my local webserver)",
                        "targets": [
                            "local webserver",
                        ]
                    }
                   ]
            }
        ],

Info on done

atm we see only the message in output.
If u save multiple times same file, you cant't see if file deployed.

Can u insert something like this?

deploy.js: 451
vscode.window.showInformationMessage( ME.t('deploy.deployingFile', F, destination) );

Subdirectories not deployed

Hello,
for some reason deploying to ftp does not include subdirectories. I have included my script. It should deploy all files except the subdirectory data in dist/assets. There are other subdirectories (images, brand, etc) in dist/assets as well.
When I run the deploy package it deploys everything including the files in dist/ assets but it won't create any of the subdirectories od dist/assets.

Is it a bug or it's me not quite getting the globbing syntax?

`{
"deploy.reloaded": {

    "showPopupOnSuccess": true,
    "packages": [
        {
            "name": "Version 0.0.0",
            "description": "WebApp Package version 0.0.0",
            "files": [
                "dist/**"
            ],
            "exclude": [
                "dist/assets/data/**"
            ],               
            "deployOnSave": false,
            
            "button": {
                "text": "Deploy to 'test WebApp Dev'",
                "tooltip": "Click here to deploy to the target...",
                "targets": [ "test WebApp Dev" ],
                "showPrompt": true,
                "enabled":false
            }
        },
    ],


    "targets": [
        {
            "type": "prompt",
            "name": "FTP Server",
            "prompts": [
                {
                    "placeHolder": "Please enter the password",
                    "isPassword": true,
                    "properties": [ "password" ]                    
                }
            ],
            "targets": ["test WebApp Dev" ]
        },

        {
            "type": "ftp",
            "name": "test WebApp Dev",
            "description": "test WebApp Dev",

            "dir": "/development",
            "host": "ftp.dev.xxxxxxx.com", "port": 21,
            "user": "user",
            "password": "", 
            "debug": true,
            "mappings": {
                "/dist/**/*": "/"
            }
           
        }
    ]
}

}`

  • Operating system: Ubuntu 17.190
  • Visual Studio Code version: 1.21.0
  • Extension version: 0.56

Add option to define a Pull button as well

Description

Currently, we have the ability to defined a button for the Deploy package files action. It would be helpful for some of my projects if I could also specify a Pull button for the Pull package files action. I suppose it would maybe also be useful if we could specify any number of buttons that correspond to the different actions for Deploy or Pull (current file, package files, all open files).

Actual behavior

Currently, you can specify a deploy button with:

                "button": {
                    "text": "Deploy to Remote",
                    "tooltip": "Click to deploy files to remote...",
                }

Expected behavior

It would be nice if we could define other action buttons. It would mean your button definition would also need to allow specification of what action to perform. Crude suggestion:

                "buttons": [{
                    "text": "Deploy to Remote",
                    "tooltip": "Click to deploy package files from remote...",
                    "action": "deploy.packagefiles",
                },
                {
                    "text": "Pull from Remote",
                    "tooltip": "Click to pull package files from remote...",
                    "action": "pull.packagefiles",
                }]

Steps to reproduce

Not a bug.

Example config

Current style:

                "button": {
                    "text": "Deploy to Remote",
                    "tooltip": "Click to deploy files to remote...",
                }

New style example above, but final implementation totally up to you.

Logs

Not applicable.

Screenshot

Not applicable.

Your environment

  • Operating system: MacOSX 10.12.6
  • Visual Studio Code version: 1.21.1
  • Extension version: 0.67.0

Additional comments

Thanks!

sftp deployment fails on windows

Description

I cannot get the extension to recognise a private key for SFTP deployment; the log file shows a mysterious ENOENT error

Actual behavior

All attempts to log me in to a linux server using a private key fail with the message
[ERROR] Could not deploy files to 'Birdcam': 'All configured authentication methods failed'

Expected behavior

Attempts to upload a file to a linux server using SFTP configured to log me in with a private key should work. I have tried every possible relative and absolute path to these keys, which work perfectly well when invoked with putty or ssh from the command line

Steps to reproduce

Attempt to upload a file. This will happen

Example config

{
    "deploy.reloaded": {
        "targets": [
            {
                "type":"sftp",
                "name":"Moode",
                "description":"the test script",
                "dir":"/home/pi/scripts/",
                "host":"192.168.1.66",
                "port":22,
                "user":"pi", 
               // "agent":"pageant",
                "privatekey":"/ssh/for_moode_id_rsa"
            },
            {
                "type":"sftp",
                "name":"Birdcam",
                "description":"camerazero",
                "dir":"/home/pi/scripts/",
                "host":"192.168.1.12",
                "port":22,
                "user":"pi", 
                //"agent":"pageant",
                "privatekey":"/ssh/camerazero_id_rsa"
            }
        ],
     "packages": [
            {
             "name":"package",
             "files":["**/*.py"]
             }  
        ] 
    }
}

Logs

INFO extension.deploy.reloaded.loadplugins - [27/Feb/2018:07:13:03 +0000] "Loaded 19 plugins:
- app
- azureblob
- batch
- compiler
- dropbox
- each
- ftp
- list
- local
- mail
- map
- prompt
- s3bucket
- script
- sftp
- slack
- switch
- test
- zip
"
INFO extension.deploy.reloaded.loadplugins - [27/Feb/2018:08:47:16 +0000] "Loaded 19 plugins:
- app
- azureblob
- batch
- compiler
- dropbox
- each
- ftp
- list
- local
- mail
- map
- prompt
- s3bucket
- script
- sftp
- slack
- switch
- test
- zip
"
TRACE extension.deploy.reloaded.currentfileorfolder - [27/Feb/2018:09:13:57 +0000] "ENOENT: no such file or directory, lstat 'C:\8\settings.json'

Stack:
    at NEW_CONSOLE_LOGGER.addAction (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:313:52)
    at ActionLogger.<anonymous> (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:245:25)
    at Generator.next (<anonymous>:null:null)
    at C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:23:71
    at Promise (<anonymous>:null:null)
    at __awaiter (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:19:12)
    at ActionLogger.onLog (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:225:16)
    at ActionLogger.<anonymous> (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:117:95)
    at Generator.next (<anonymous>:null:null)
    at C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:23:71
    at Promise (<anonymous>:null:null)
    at __awaiter (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:19:12)
    at ActionLogger.log (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:110:16)
    at ActionLogger.trace (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\log.js:143:14)
    at Object.<anonymous> (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\commands.js:385:18)
    at Generator.throw (<anonymous>:null:null)
    at rejected (C:\Users\Andrew\.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.53.1\out\commands.js:21:65)
    at <anonymous>:null:null"

Screenshot

{Please write here, if possible}

Your environment

  • Operating system: Windows 10 Home

  • Visual Studio Code version: Version 1.20.0

  • Extension version: 0.53.1

Additional comments

I have no idea where the file that can't be found ought to be, or which configuration setting contains it

Unable to deploy twice with FTP (engine = jsftp)

This issue only occurs with engine == jsftp.

I can deploy a file on an "empty" FTP without any problem: the dir folder is created automatically and the file is uploaded. However, if I try to deploy the file a second time, I get this error:

Deploying file 'c:\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\index.html' to '/ (my_target)' ... [ERROR: 'Unexpected command 227 Entering Passive Mode (xxx,xx,xx,xxx,217,111).']

If I remove the file on the ftp server (but not the folder) and try to deploy again, deployment gets stuck to:

Deploying file 'c:\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\index.html' to '/ (my_target)' ...

Only if I delete the dir folder entirely can I upload again and get the success message:

Deploying file 'c:\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\xxxx\index.html' to '/ (my_target)' ... [OK]

As a corollary, I am not able to deploy to the root of my ftp server, probably because the root folder is always there and cannot be removed. So anything like dir == "/" or dir == "" or no dir at all in settings.json leads to the first error above.

Disable Autoswitch of Output Tab

Description

Whenever a folder, workspace, etc is opened and the Integrated Terminal is open; it switches to the output panel regardless of the focused tab.

Actual behavior

Terminal tab loses focuses to output for extension initialization output.

Expected behavior

Preserve active tab focus.

Steps to reproduce

Leave terminal panel open before closing a project / workspace. Reopen the project.

Config

{
    "deploy.reloaded": {
        "clearOutputOnStartup": true,
        "openOutputOnStartup": false
    }
}

Logs

N/A

Screenshot

N/A

Your environment

  • Operating system: Windows 10 | 64 bit & MacOS Sierra
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.53.3

Additional comments

I can understand if you're using this initialization output for working on the extension, however forcing a UI focus switch is jarring. For example I use the terminal / powershell constantly, and expect the terminal to remain open when I reopen a project. Especially since I'm not using Deploy on most of my projects.

P.S this extension is amazing otherwise!

[help-needed] privateKey without privateKeyPassphrase

Description

Trying to list a remote directory using and sftp target using a privateKey but without a privateKeyPassphrase.

When I run the list directory command it says it could not list the directory.
The key was created without a passphrase. I have confirmed that a different key WITH a passphrase does work to list the directory along with a test of just username and password auth.

Actual behavior

Get a message saying [vscode-deploy-reloaded]::[target_name] Could not list directory '/' ('target_name'):

Expected behavior

Directory is listed with secondary commands

Steps to reproduce

Create privateKey without a passphrase.
Specify in target sftp config: example below

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "MODULES",
                "description": "MODULES",
                "exclude": [
                    ".vscode/**",
                    ".vscode",
                    ".svn/**",
                    ".svn"
                ]
            }
        ],

        "targets": [
            {
                "type": "sftp",
                "name": "target_name",
                "description": "target_name folder",
                "host": "192.168.5.3",
                "user": "username",
                "privateKey": "/Users/username/.ssh/id_rsa",
                "dir": "/remotedir/"
            }
        ]
    }
}

Logs

INFO extension.deploy.reloaded.loadplugins - [08/Feb/2018:15:51:18 +0000] "Loaded 19 plugins:
- app
- azureblob
- batch
- compiler
- dropbox
- each
- ftp
- list
- local
- mail
- map
- prompt
- s3bucket
- script
- sftp
- slack
- switch
- test
- zip
"

Your environment

  • Operating system: macOS 10.13.3
  • Visual Studio Code version: 1.20.0
  • Extension version: 0.39.1

Additional comments

I'm looking for a replacement for an old sublime sftp that I was using that is broken in macOS High Sierra. This plugin is awesome but I'm just having trouble figuring out how I can create the config without having to save passwords in it, either regular passwords or keyfile passphrases.

Any help is appreciated!

mappings do not work in batch target

Description

I have directory mappings configured for my sftp targets. They work correctly when I deploy the file directly to each server. When I include each target as part of a batch target, it seems to be ignoring the mappings.

Actual behavior

type batch target ignores mappings from each target

Expected behavior

type batch target should use the mappings from each target

Steps to reproduce

Deploy a file that uses a mapping from an individual server to see that it works.
Then use a batch target type that includes the server to see that the mapping is ignored.

Example config

{
    "deploy.reloaded": {
        "targets": [
            {
                "type": "sftp",
                "name": "server01",
                "host": "server01", "port": 22,
                "user": "uname", "password": "pword",
                "mappings": 
                    {
                        "/pp/**/*": "/usr/local/etc/pp",
                        "/misc/**/*": "/usr/local/etc"
                    }
            },
            {
                "type": "sftp",
                "name": "server02",
                "host": "server02", "port": 22,
                "user": "uname", "password": "pword",
                "mappings": 
                    {
                        "/pp/**/*": "/usr/local/etc/pp",
                        "/misc/**/*": "/usr/local/etc"
                    }
            },
            {
                "type": "batch",
                "name": "All Servers",
                "targets": ["server01", "server02"]
            }

        ]
    }
}

Screenshot

{Please write here, if possible}

Your environment

  • Operating system: MacOS 10.12.6
  • Visual Studio Code version: 1.19.1
  • Extension version: 13.0

Additional comments

{Please write here, if there is something more to tell}

[help-needed] Button for deploy specific folder

Hello!
I want to create a button to deploy specific folder from anywhere in project. Is this possible?

I'll try to do the following

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "Public to test",
                
                "button": {
                    "text": "Deploy to 'test'",
                    "tooltip": "Click here to deploy to the target...",
                    "targets": [ "Test" ]
                }
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "Test",
                "description": "Test server",
                "dir": "/var/www/html/myProject",
                "mappings": {
                    "/public": "/public"
                }
            }          
        ]
       }
} 

But it deploy all my project to server instead one folder

Your environment

  • Operating system: Windows 10
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.50.0

Default excluded files / ignores

Tried looking but couldn't find any reference.
However, it seems like some files are excluded by default. Tried files like .gitignore and .gitattributes. They wouldn't upload even on an explicit deploy file action.

I want to exclude those, so that's good. Is there an overview of the default excluded files?

umask overriden

Description

I have a sftp target , the deploy is OK but the files modes on unix is 666 rw-rw-rw
the umask as no effect on the deploy .

Actual behavior

the sftp deploy override the umask set on the account

Expected behavior

the sftp should respect the umask , the expected mode shoud be rw-r---r-- with a umask 022

Your environment

  • Operating system: Windows 10 , target linux
  • Visual Studio Code version: 1.19.1
  • Extension version: 0.14.2

SFTP deploy of binary file (e.g. jpg, ttf, etc.) is fine, but pull of same file corrupts it

Description

If I have a binary file (e.g. jpg, ttf, etc.), the file will deploy correctly using SFTP. However, if I try to pull a binary file (e.g. jpg, ttf, etc.) from the server, the local copy is then not the same as the the remote, and is corrupted.

Actual behavior

Deploy a JPG file (or any binary file), file on remote SFTP is fine.
Pull the same JPG file (or any binary file) from remote SFTPT, the local file is now corrupt.

Expected behavior

Pull of JPG file (or any binary file) should not get corrupted.

Steps to reproduce

  1. Add a JPG file to workspace.
  2. Deploy it using SFTP.
  3. Remote JPG is fine.
  4. Pull same JPG from SFTP.
  5. Local JPG file is now corrupt.

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "Local",
                "description": "Local source",
                "files": [
                    "**/*",
                ]
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "SRVR",
                "description": "SRVR target",
                "host": "myserver.domain.com",
                "port": 22,
                "user": "myuser",
                "privateKey": "${homeDir}/.ssh/id_rsa_mykey",
                "dir": "/path/to/remote/location"
            }
        ]
    }
}

Logs

Deploying file '/path/to/remote/location/images/banner.jpg' to '/images (EOD)' ... [OK]

Pulling file '/path/to/remote/location/images/banner.jpg' from  '/images (EOD)' ... [OK]

Screenshot

Not applicable.

Your environment

  • Operating system: MacOS 10.12.6, remote server is Linux RHEL 6.5
  • Visual Studio Code version: 1.20.1
  • Extension version: 0.53.1

Additional comments

Deploy and pull of same file should never corrupt it, text or otherwise. Period.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.