{"_id":"@antonio.presto/sftp-sync","_rev":"1-1aa97d3fcde566eff1f23b69151b0fc4","name":"@antonio.presto/sftp-sync","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@antonio.presto/sftp-sync","version":"0.1.0","description":"Sync local files to remote using SFTP.","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc && tsc -d","prepare":"npm run build"},"author":{"name":"dobbydog - antoniopresto"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dobbydog/sftp-sync-deploy.git"},"dependencies":{"@types/minimatch":"^3.0.3","@types/node":"^9.4.1","@types/ssh2":"^0.5.33","@types/ssh2-streams":"^0.1.2","chalk":"^2.3.0","minimatch":"^3.0.3","queue":"^5.0.0","ssh2":"^0.5.4"},"devDependencies":{"typescript":"^2.7.1"},"gitHead":"d9666e2eb33da35e4c0b8825bb9f76652099b075","bugs":{"url":"https://github.com/dobbydog/sftp-sync-deploy/issues"},"homepage":"https://github.com/dobbydog/sftp-sync-deploy#readme","_id":"@antonio.presto/sftp-sync@0.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ylKQ+ArchIPidwFL9VpC1GVo3uE8cJ5sABAIDk8ykX4Q22rnDfoEqIfpGUSoObZsogzOWt7V1zgt6AyWx2yZAA==","shasum":"1719e7d7121c7d6e2782b44ec5ba5e1a90d4c90d","tarball":"https://registry.npmjs.org/@antonio.presto/sftp-sync/-/sftp-sync-0.1.0.tgz","fileCount":15,"unpackedSize":33205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkGpmCRA9TVsSAnZWagAAxrwP/ji6YtsiKFAxY5owWNAz\niOHawvwxoag5PJWGn1BrFVWp4ez12hOdzeIoLkzzd7zQWJFE2kyLVrpgi09L\n3WjWDGa4Wqae9LKJNFH6hiGPvQl6dkeFOJkvSbZLDQA6XTF8gD/4cF44LGxs\nfQyiOrqp4pHFqM5B6EVuwU28T6RB4NSVRlt8kjbrrHX4fA9yvXipR0Ied+nM\nhGIdOyCPLHrSiCbyBwIIPU2WoALviEMBChj8LeybKAUAczmI7cz5Hoq00Ji4\nDJKKpCe7OJPAG5y5WNOurdM/+uKvLiNyNQgRZNyUUF7UAsnqYmADl+p2+gz6\nxTsNobVv9onOx4QQ5XUp8cp6Z0QtRb/FaV/c0sH5utC41vTP38daV/I7h6jS\nqT1DZ6l5IQpPSVjhMTcly9Mam0GwqkDANBsW0vJMMK19LQpxCMicdPfSiIQg\nDFd85qtRU5XwjlU09Alof/Sn1G36zm33ofl3c0A9o9DQObAn7IaXx00OOKkx\nB7sSDbpQNKue9MRKkkH1AwcIjedVC5+s0OnXor3xyaBetXTsisYdPqDVHQ3w\n3NhRT0KAc9q/4VL8JT4FRPgJ0dIbpbKU+5sM3QQY5+ox6WkkPZ9XZBae/qyd\nM4w8atYf7Yj/gH/YKgWjqCRcZqM8y5fDrbbBeixPDzitLmmBp/aRoOKsjQr8\nFtRk\r\n=bgCQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3hhDd4NSIE8mImFdthsePWarOg4p7r2rGkFkBnVrlMQIhAL6n4+0G613i05aLtCoel7NzHZeadRW8ewlVwXJtyMWr"}]},"_npmUser":{"name":"antonio.presto","email":"antonio@paper.sh"},"directories":{},"maintainers":[{"name":"antonio.presto","email":"antonio@paper.sh"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sftp-sync_0.1.0_1620077158462_0.9459757623332692"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-03T21:25:58.421Z","0.1.0":"2021-05-03T21:25:58.586Z","modified":"2022-04-04T14:23:15.608Z"},"maintainers":[{"name":"antonio.presto","email":"antonio@paper.sh"}],"description":"Sync local files to remote using SFTP.","homepage":"https://github.com/dobbydog/sftp-sync-deploy#readme","repository":{"type":"git","url":"git+https://github.com/dobbydog/sftp-sync-deploy.git"},"author":{"name":"dobbydog - antoniopresto"},"bugs":{"url":"https://github.com/dobbydog/sftp-sync-deploy/issues"},"license":"MIT","readme":"# sftp-sync-deploy\n\nSync local files to remote using SFTP.\n\n## Usage\n\n### Javscript\n\n```js\nconst { deploy } = require('sftp-sync-deploy');\n\nlet config = {\n  host: 'example.com',            // Required.\n  port: 22,                       // Optional, Default to 22.\n  username: 'user',               // Required.\n  password: 'password',           // Optional.\n  privateKey: '/path/to/key.pem', // Optional.\n  passphrase: 'passphrase',       // Optional.\n  agent: '/path/to/agent.sock',   // Optional, path to the ssh-agent socket.\n  localDir: 'dist',               // Required, Absolute or relative to cwd.\n  remoteDir: '/path/to/dest'      // Required, Absolute path only.\n};\n\nlet options = {\n  dryRun: false,                  // Enable dry-run mode. Default to false\n  exclude: [                      // exclude patterns (glob)\n    'node_modules',\n    'src/**/*.spec.ts'\n  ],\n  excludeMode: 'remove',          // Behavior for excluded files ('remove' or 'ignore'), Default to 'remove'.\n  forceUpload: false,             // Force uploading all files, Default to false(upload only newer files).\n  concurrency: 100                // Max number of SFTP tasks processed concurrently. Default to 100.\n};\n\ndeploy(config, options).then(() => {\n  console.log('success!');\n}).catch(err => {\n  console.error('error! ', err);\n});\n```\n\n### TypeScript\n\n```ts\nimport { deploy, SftpSyncConfig, SftpSyncOptions } from 'sftp-sync-deploy';\n\nlet config: SftpSyncConfig = {...};\nlet options: SftpSyncOptions = {...};\n\ndeploy(config, options);\n```\n\n## Dry run mode\n\n```js\ndeploy(config, {dryRun: true});\n```\n\nOutputs the tasks to be done for each file in following format. Any changes of the files will not be performed.\n\n```\n[ (local file status) | (remote file status) ] (file path)\n                                               -> (task)\n```\n\n### Output example\n\n```\n# Local is a file (upload the file)\n[ F | F ] index.html\n          -> upload\n\n# Local is a directory (sync recursively)\n[ D | D ] lib\n          -> sync\n\n# Remote exists and local doesn't (remove the remote file or directory)\n[   | F ] index.html.bak\n          -> remove remote\n\n# Excluded (do nothing)\n[ X |   ] node_modules\n          -> ignore\n\n# Excluded and remote exists (operation depends on excludeMode option)\n[ X | D ] .bin\n          -> remove remote # if excludeMode is 'remove'\n          -> ignore        # if excludeMode is 'ignore'\n\n# Local and remote have the same name but different types (remove remote then upload local)\n[ F | D ] test\n          -> remove remote and upload\n\n# Permission error on a remote server (ignored)\n[ F | ! ] secret.txt\n          -> denied\n```\n","readmeFilename":"README.md"}