Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var fs = require('fs');
var path = require('path');
var fstream = require('fstream');
var requestModule = require('request');
var tar = require('tar');
var zlib = require('zlib');
var http = require('http');
var eventStream = require('event-stream');
var fs = require('fs');
var ignoreGlobs = require('superstatic').ignore.globs;
var Ignore = require('fstream-ignore');
var file = require('file');
var through = require('through');
var minimatch = require('minimatch');
var TEN_MB = 10000000;
module.exports = function (app) {
app.program
.command('push')
.description('deploy your app to the specified environment')
.example('push [environment]')
.option('-z, --zip ', 'upload a zip file instead of a tar (for testing/diagnostics)', readStream)
.option('-f, --file ', 'PUT a single file (for testing/diagnostics)', readStream)
.withAuth()
.withConfig()
.handler(function () {
var _ = require('lodash');
var tarzan = require('tarzan');
var ignoreGlobs = require('superstatic').ignore.globs;
var Deployment = function (types, loadpoint, exclude) {
this._types = types;
this._loadpoint = loadpoint;
this._exclude = exclude;
this._requestOptions = {
method: 'PUT',
headers: {
'Content-Type': 'application/octet-stream',
Authorization: this._loadpoint.authorization
}
};
};
Deployment.prototype.push = function (appRootDir) {