{"analyzedAt":"2022-07-10T12:33:59.116Z","collected":{"metadata":{"name":"deployator","scope":"unscoped","version":"3.0.0","description":"Deploy releases over SSH with rsync, archive ZIP / TAR, symlinks, SCP","date":"2022-06-02T10:45:19.649Z","author":{"name":"La Haute Société","email":"dev@lahautesociete.com","url":"http://www.lahautesociete.com"},"publisher":{"username":"lahautesociete","email":"tech@lahautesociete.com"},"maintainers":[{"username":"lahautesociete","email":"tech@lahautesociete.com"}],"repository":{"type":"git","url":"git+https://github.com/la-haute-societe/deployator.git"},"links":{"npm":"https://www.npmjs.com/package/deployator","homepage":"https://github.com/la-haute-societe/deployator#readme","repository":"https://github.com/la-haute-societe/deployator","bugs":"https://github.com/la-haute-societe/deployator/issues"},"license":"MIT","dependencies":{"chalk":"^2.4.2","columnify":"^1.5.4","extend":"^3.0.2","make-dir":"^3.0.0","ssh-deploy-release":"^4.0.0","yargs":"^13.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/node":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/register":"^7.5.5","chai":"^4.2.0","jsdom":"^15.1.1","jsdom-global":"^3.0.2","mocha":"^6.2.0","rimraf":"^2.6.3","sinon":"^7.3.2","supports-color":"^7.0.0","tmp":"^0.1.0"},"releases":[{"from":"2022-06-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":0},{"from":"2022-04-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":2},{"from":"2022-01-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":2},{"from":"2021-07-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":2},{"from":"2020-07-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":2}],"hasTestScript":true,"readme":"# Deployator\n\n[![NPM version](https://badge.fury.io/js/deployator.svg)](https://badge.fury.io/js/deployator)\n![npm (tag)](https://img.shields.io/npm/v/deployator/beta)\n![](https://img.shields.io/npm/dm/deployator.svg)\n\n> Deploy releases over SSH with rsync, archive ZIP / TAR, symlinks, SCP ...\n\n> The [ssh-deploy-release](https://github.com/la-haute-societe/ssh-deploy-release) command line interface.\n\n\nExample of directory tree after deployment on your server :\n\n````\n/deployPath\n    |\n    ├── www --> symlink to ./releases/<currentRelease>  -- It's the webroot\n    |\n    ├── releases\n    |   ├── 2017-02-08-17-14-21-867-UTC\n    |   ├── ...\n    |   └── 2017-02-09-18-01-10-765-UTC\n    |       ├── ...\n    |       └── logs --> symlink to shared/logs\n    |\n    ├── synchronized --> folder synchronized with rsync \n    |\n    └── shared\n        └── logs                    \n````\n\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration file](#configuration-file)\n- [Custom parameters](#custom-parameters)\n- [Contributing](#contributing)\n\n\n\n\n## Installation\n\nAccording to the installation method, __locally__ or __globally__, the path to the \n``deployator`` will be different:\n\n### Locally\n\n````sh\nnpm install -D deployator\n````\n\nYou have to specify the path of the `deployator` binary inside the ``node_modules`` folder, example:\n````sh\nnode_modules/.bin/deployator init ....\n````\nor add ``deployator`` in the ``scripts`` section of your ``package.json``: \n````sh\nscripts: {\n    \"deployator\": \"deployator\"\n},\n````\n\nUse the ``deployator`` like this:\n````sh\nnpm run deployator -- init --config ...\n````\n\n### Globally\n````sh\nnpm install -g deployator\n````\n\nUse the ``deployator`` like this:\n````sh\ndeployator init --config ...\n````\n\n\n\n## Usage\n\n> In the following examples, let's assume that you installed deployator globally. If you installed it locally, you'll need to adjust the path. See [above](#locally)\n\n\n### Initialize configuration file\n\n````sh\n  deployator init [--config]\n\nOptions:\n  --config, -c       Path of configuration file\n````\n\nThis command will create a new configuration file in the current folder.\n\nBy default, the file will be named ``deployment-config.js`` but it is possible to change it with the parameter ``config``\n\n````sh\ndeployator init --config path/to/another-config-file-name.js\n````\n\n### Deploy release\n\n\n````sh\n  deployator deploy [--config] [--environment] [--debug] [--synchronize]\n  \nOptions:\n  --config, -c       Path of configuration file\n  --environment, -e  Environment name (example: review, preproduction)\n  --debug, -d        Enable debug mode\n  --synchronize, -s  Enable synchronize mode\n````\n\nThis command will deploy a new release using the configuration contained in  ``deployment-config.js`` file.\nYou must specify the parameter ``environment`` to indicate on which environment the release should be deployed.\n\n````sh\ndeployator deploy --environment review\n````\n\nYou could specify another confguration file with the ``config`` parameter.\n\n````sh\ndeployator deploy --config path/to/config.js --environment review\n````\n\n\n### Remove release\n\n````sh\n  deployator remove [--config] [--environment] [--debug]\n\nOptions:\n  --config, -c       Path of configuration file\n  --environment, -e  Environment name (example: review, preproduction)\n  --debug, -d        Enable debug mode\n````\n\nTo use this command, the [``allowRemove`` option](https://github.com/la-haute-societe/ssh-deploy-release#optionsallowremove) must be enabled.\n\n````sh\ndeployator remove --environment review\n````\n\nAgain, you could specify another confguration file with the ``config`` parameter, like with the ``deploy`` command.\n\n\n### Rollback to previous release\n\n````sh\n  deployator rollback [--config] [--environment] [--debug]\n\nOptions:\n  --config, -c       Path of configuration file\n  --environment, -e  Environment name (example: review, preproduction)\n  --debug, -d        Enable debug mode\n````\n\nThis command will rollback to the previous release on the specified environment.\n\nThe previous release will be renamed before updating the symlink of the current version, for example 2019-01-09-10-53-35-265-UTC will become 2019-01-09-13-46-45-457-UTC_rollback-to_2019-01-09-10-53-35-265-UTC.\n\nIf this command is called several times, the current version will switch between the last two releases. current date + \"_rollbackTo_\" will be prepended to the release name on each call of this command so be careful not to exceed the size limit of the folder name.\n\n````sh\ndeployator rollback --environment review\n````\n\n\n### List available environments\n\n````sh\n  deployator list [--config]\n\nOptions:\n  --config, -c       Path of configuration file\n````\n\nThis command displays the list of environments available in the configuration file.\n\n\n## Configuration file\n\n> See all the available options on the [ssh-deploy-release documentation](https://github.com/la-haute-societe/ssh-deploy-release).\n\nExample:\n````js\nmodule.exports = function (options) {\n\n    // @see https://www.npmjs.com/package/ssh-deploy-release\n\n    return {\n\n        // Common configuration\n        // These options will be merged with those specific to the environment\n        common: {\n            localPath: 'www',\n            share: {},\n            exclude: [],\n            create: []\n        },\n\n\n        // Environment specific configuration\n        environments: {\n\n            review: {\n                host: 'my.server.com',\n                username: 'username',\n                password: 'password',\n                deployPath: '/path/to/review/' + options.get('branch'),\n                allowRemove: true,\n            },\n\n            preproduction: {\n                host: 'my.server.com',\n                username: 'username',\n                password: 'password',\n                deployPath: '/path/to',\n            },\n\n            production: {\n                host: 'my.server.com',\n                username: 'username',\n                password: 'password',\n                deployPath: '/path/to',\n            }\n\n        }\n    }\n};\n````\n\n\n## Custom parameters\n\nAll parameters passed to `deployator` can be read with `options.get('optionName')`.\n\nExample: Deploy to different folder following the git branch \n\n````sh\ndeployator deploy --config ... --branch master\n````\n\nIn the configuration file:\n````js\n{\n    environments: {\n        review: {\n            ...\n            deployPath: '/path/to/review/' + options.get('branch'),\n            ...\n        },\n    }\n}\n````\n\n\n\n\n## Contributing\n\n### Build\n````sh\n# Build (with Babel)\nnpm run build\n\n# Build + watch (with Babel)\nnpm run build -- --watch\n````\n\n### Unit tests\n````sh\n# Launch tests (Mocha + SinonJS)\nnpm test\n\n# Launch tests + watch (Mocha + SinonJS)\nnpm test -- --watch\n````"},"npm":{"downloads":[{"from":"2022-07-09T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":39},{"from":"2022-07-03T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":213},{"from":"2022-06-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":784},{"from":"2022-04-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":2279},{"from":"2022-01-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":4306},{"from":"2021-07-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":8459}],"starsCount":0},"github":{"starsCount":9,"forksCount":0,"subscribersCount":7,"issues":{"count":12,"openCount":3,"distribution":{"3600":1,"10800":2,"32400":1,"97200":4,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":1,"212576400":3},"isDisabled":false},"contributors":[{"username":"nstCactus","commitsCount":34}],"commits":[{"from":"2022-07-03T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":0},{"from":"2022-06-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":0},{"from":"2022-04-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":3},{"from":"2022-01-11T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":3},{"from":"2021-07-10T00:00:00.000Z","to":"2022-07-10T00:00:00.000Z","count":4}]},"source":{"files":{"readmeSize":6789,"testsSize":11723,"hasNpmIgnore":true},"badges":[{"urls":{"original":"https://img.shields.io/npm/dm/deployator.svg","shields":"https://img.shields.io/npm/dm/deployator.svg","content":"https://img.shields.io/npm/dm/deployator.json"},"info":{"service":"npm","type":"downloads","modifiers":{"type":"dm"}}}],"outdatedDependencies":{"chalk":{"required":"^2.4.2","stable":"5.0.1","latest":"5.0.1"},"yargs":{"required":"^13.3.0","stable":"17.5.1","latest":"17.5.1"}}}},"evaluation":{"quality":{"carefulness":0.7899999999999999,"tests":0.6,"health":0.5,"branding":0.15},"popularity":{"communityInterest":17,"downloadsCount":759.6666666666666,"downloadsAcceleration":0.9262176560121764,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9166666666666667,"issuesDistribution":0.9}},"score":{"final":0.6259491798793699,"detail":{"quality":0.8463901095809027,"popularity":0.06301344093892634,"maintenance":0.9999355505042142}}}