hexo-deployer-ftpsync
Advanced tools
Comparing version 0.1.1 to 0.2.0
44
index.js
@@ -1,43 +0,5 @@ | ||
var ftpsync = require('ftpsync'); | ||
'use strict'; | ||
hexo.extend.deployer.register('ftpsync', function(args, callback){ | ||
if (!args.host || !args.user || args.pass == null){ | ||
var help = [ | ||
'You should argsure deployment settings in _config.yml first!', | ||
'', | ||
'Example:', | ||
' deploy:', | ||
' type: ftpsync', | ||
' host: <host>', | ||
' port: [port] # Default is 21', | ||
' remote: [remote] # Default is `/`', | ||
' user: <user>', | ||
' pass: <pass>', | ||
' ignore: [ignore]', | ||
' connections: [connections] # Default is 1', | ||
'', | ||
'For more help, you can check the docs: ' + 'http://hexo.io/docs/deployment.html'.underline | ||
]; | ||
/* global hexo */ | ||
console.log(help.join('\n')); | ||
return callback(); | ||
} | ||
ftpsync.settings = { | ||
local: hexo.public_dir, | ||
host: args.host, | ||
port: args.port || 21, | ||
remote: args.remote || '/', | ||
user: args.user, | ||
pass: args.pass, | ||
connections: args.connections || 1, | ||
ignore: args.ignore || [] | ||
}; | ||
ftpsync.log.verbose = (args.verbose || false); | ||
if (ftpsync.settings.port > 65535 || ftpsync.settings.port < 1){ | ||
ftpsync.settings.port = 21; | ||
} | ||
ftpsync.run(callback); | ||
}); | ||
hexo.extend.deployer.register('ftpsync', require('./lib/deployer')); |
{ | ||
"name": "hexo-deployer-ftpsync", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "FTP deployer for Hexo", | ||
"main": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hexojs/hexo-deployer-ftpsync.git" | ||
"main": "index.js", | ||
"files": [ | ||
"lib/", | ||
"index.js" | ||
], | ||
"scripts": { | ||
"eslint": "eslint index.js lib test", | ||
"test": "mocha test/index.js", | ||
"test-cov": "nyc npm run test" | ||
}, | ||
"repository": "hexojs/hexo-deployer-ftpsync", | ||
"bugs": { | ||
@@ -21,9 +27,18 @@ "url": "https://github.com/hexojs/hexo-deployer-ftpsync/issues" | ||
"author": "Tommy Chen <tommy351@gmail.com> (http://zespia.tw)", | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://raw.github.com/tommy351/hexo/master/LICENSE" | ||
"license": "MIT", | ||
"dependencies": { | ||
"basic-ftp": "^5.0.5" | ||
}, | ||
"dependencies": { | ||
"ftpsync": "^0.1.5" | ||
"devDependencies": { | ||
"chai": "^4.3.7", | ||
"eslint": "^8.57.0", | ||
"eslint-config-hexo": "^5.0.0", | ||
"ftp-srv": "^4.6.3", | ||
"hexo-fs": "^4.1.1", | ||
"mocha": "^10.4.0", | ||
"nyc": "^15.1.0" | ||
}, | ||
"engines": { | ||
"node": ">=14" | ||
} | ||
} |
# FTP deployer | ||
[![Build Status](https://img.shields.io/github/actions/workflow/status/hexojs/hexo-deployer-ftpsync/tester.yml?branch=master&label=test)](https://github.com/hexojs/hexo-deployer-ftpsync/actions?query=workflow%3ATester) | ||
[![NPM version](https://badge.fury.io/js/hexo-deployer-ftpsync.svg)](https://www.npmjs.com/package/hexo-deployer-ftpsync) | ||
Deploy your site via FTP. | ||
@@ -9,2 +12,10 @@ | ||
$ npm install hexo-deployer-ftpsync --save | ||
``` | ||
``` | ||
## Usage | ||
See https://hexo.io/docs/one-command-deployment#FTPSync | ||
## Warning | ||
This application will delete files and directories on the remote server to match the local machine. Use this application in production at your own risk. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4047
48
21
7
1
1
+ Addedbasic-ftp@^5.0.5
+ Addedbasic-ftp@5.0.5(transitive)
- Removedftpsync@^0.1.5
- Removedabbrev@1.1.1(transitive)
- Removedasync@0.2.101.5.2(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.0.20(transitive)
- Removedfrom@0.1.7(transitive)
- Removedftpsync@0.1.10(transitive)
- Removedjsftp@1.1.1(transitive)
- Removedmap-stream@0.0.7(transitive)
- Removedminimatch@3.1.2(transitive)
- Removednopt@1.0.10(transitive)
- Removedparse-listing@1.0.1(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedsplit@0.2.10(transitive)
- Removedstream-combiner@0.0.4(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtouch@1.0.0(transitive)