Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

azuki-trusty / azk   deb

Repository URL to install this package:

Version: 0.5.1 

/ usr / lib / azk / node_modules / scp2 / package.json

{
  "name": "scp2",
  "version": "0.1.4",
  "description": "A pure javascript scp program based on ssh2.",
  "author": {
    "name": "Hsiaoming Yang",
    "email": "lepture@me.com"
  },
  "homepage": "https://github.com/lepture/node-scp2",
  "keywords": [
    "ssh",
    "scp",
    "copy",
    "remote",
    "ssh2"
  ],
  "dependencies": {
    "ssh2": "~0.2.12",
    "glob": "~3.2.6",
    "async": "~0.2.9",
    "lodash": "~2.0.0"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/lepture/node-scp2.git"
  },
  "bugs": {
    "url": "https://github.com/lepture/node-scp2/issues"
  },
  "devDependencies": {
    "jshint": "*",
    "mocha": "*",
    "expect.js": "*"
  },
  "bin": {
    "scp2": "bin/scp2"
  },
  "scripts": {
    "test": "make test"
  },
  "readme": "# scp2\n\nA pure javascript secure copy program based on ssh2.\n\n-----\n\nscp2 is greatly powered by [ssh2](https://github.com/mscdex/ssh2), implemented the `scp` in a `sftp` way.\n\nIt is written in pure javascript, and should work on every OS, even Windows. Nodejs (v0.8.7 or newer) is required to make it work.\n\n\n## Install\n\nYou can either use it as a library, or a program. For Windows users who miss scp on unix/linux world, you can get the command line now:\n\n    $ npm install scp2 -g\n\nYou will get a command line tool `scp2`, and let's try:\n\n    $ scp2 -h\n\nGet the development version from ninja channel:\n\n    $ npm install scp2@ninja\n\n\n## High level API\n\n\nGet the client:\n\n```js\nvar client = require('scp2')\n```\n\nCopy a file to the server:\n\n```js\nclient.scp('file.txt', 'admin:password@example.com:/home/admin/', function(err) {\n})\n```\n\nCopy a file to the server in another way:\n\n```js\nclient.scp('file.txt', {\n    host: 'example.com',\n    username: 'admin',\n    password: 'password',\n    path: '/home/admin/'\n}, function(err) {})\n```\n\nCopy a file to the server and rename it:\n\n```js\nclient.scp('file.txt', 'admin:password@example.com:/home/admin/rename.txt', function(err) {\n})\n```\n\nCopy a directory to the server:\n\n```js\nclient.scp('data/', 'admin:password@example.com:/home/admin/data/', function(err) {\n})\n```\n\nCopy via glob pattern:\n\n```js\nclient.scp('data/*.js', 'admin:password@example.com:/home/admin/data/', function(err) {\n})\n```\n\nDownload a file from server:\n\n```js\nclient.scp('admin:password@example.com:/home/admin/file.txt', './', function(err) {\n})\n```\n\nDownload a file from server in another way:\n\n```js\nclient.scp({\n    host: 'example.com',\n    username: 'admin',\n    password: 'password',\n    path: '/home/admin/file.txt'\n}, './', function(err) {})\n```\n\n**TODO**: download via glob pattern.\n\n\n## Low level API\n\nGet the client:\n\n```js\nvar Client = require('scp2').Client;\n```\n\nThe high level client is an instance of `Client`, but it contains the high level API `scp`.\n\n### Methods\n\n\n- **defaults** `function({})`\n\n  set the default values for the remote server.\n\n  ```js\n  client.defaults({\n      port: 22,\n      host: 'example.com',\n      username: 'admin',\n      privateKey: '....'\n  });\n  ```\n\n  You can also initialize the instance with these values:\n\n  ```js\n  var client = new Client({\n      port: 22\n  });\n  ```\n\n  More on the values at [ssh2](https://github.com/mscdex/ssh2).\n\n\n- **sftp** `function(callback) -> callback(err, sftp)`\n\n  Get the sftp.\n\n- **close** `function()`\n\n  Close all sessions.\n\n- **mkdir** `function(dir, [attr], callback) -> callback(err)`\n\n  Make a directory on the remote server. It behaves like `mdkir -p`.\n\n- **write** `function(options, callback) -> callback(err)`\n\n  Write content on the remote server.\n\n  ```js\n  client.write({\n      destination: '/home/admin/data/file.txt',\n      content: 'hello world'\n  }, callback)\n  ```\n\n  The options can contain:\n\n  - destination\n  - content: string or buffer\n  - attrs\n  - source: the source path, e.g. local/file.txt\n\n- **upload** `function(src, dest, callback) -> callback(err)`\n\n  upload a local file to the server.\n\n  ```js\n  client.upload('file.txt', '/home/admin/file.txt', callback)\n  ```\n\n- **download** `function(src, dest, callback) -> callback(err)`\n\n  download a server file to local.\n\n\n## Events\n\nYou can listen on these events:\n\n- connect\n- ready\n- error (err)\n- end\n- close\n- mkdir (dir)\n- write (object)\n- read (src)\n- transfer (buffer, uploaded, total)\n\n## Changelog\n\n**2013-11-07** `0.1.4` ~stable\n\n1. Bugfix\n\n**2013-06-04** `0.1.3` ~stable\n\n1. Fixed mkdir mode bug\n\n**2013-06-04** `0.1.2` ~stable\n\n1. Fixed for uploading a large file (beyond the limitation of fs.readFile)\n2. Event emit for `transfer`\n\n**2013-06-03** `0.1.1` ~stable\n\n1. Bugfix for scp a large file.\n\n**2013-03-08** `0.1.0` ~ stable\n\n1. remove the require of buffer, `Buffer` is on global\n\n**2013-03-07** `0.1.0b1` ~ ninja\n\n1. show version options on binary\n2. bugfix of upload, it should mkdir right\n\n**2013-03-06** `0.1.0a3` ~ ninja\n\n1. Fix path bug on windows.\n2. Pretty output log.\n\n**2013-03-06** `0.1.0a2` ~ ninja\n\n1. Download a file from server works.\n2. Documentation on this lib.\n\n**2013-03-05** `0.1.0a1` ~ ninja\n\n1. Init the program, take the name scp2 in npmjs.org.\n2. scp to server works.\n\n\n## License\n\nCopyright (c) 2013 Hsiaoming Yang\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n",
  "readmeFilename": "README.md",
  "_id": "scp2@0.1.4",
  "dist": {
    "shasum": "1d747d8f9b1026191f76ae2cd864803cc48c0e0a",
    "tarball": "http://registry.npmjs.org/scp2/-/scp2-0.1.4.tgz"
  },
  "_from": "scp2@^0.1.4",
  "_npmVersion": "1.3.8",
  "_npmUser": {
    "name": "lepture",
    "email": "sopheryoung@gmail.com"
  },
  "maintainers": [
    {
      "name": "lepture",
      "email": "lepture@me.com"
    }
  ],
  "directories": {},
  "_shasum": "1d747d8f9b1026191f76ae2cd864803cc48c0e0a",
  "_resolved": "https://registry.npmjs.org/scp2/-/scp2-0.1.4.tgz"
}