Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gcs-resumable-upload

Package Overview
Dependencies
Maintainers
17
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gcs-resumable-upload - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

1

build/src/cli.d.ts

@@ -0,1 +1,2 @@

#!/usr/bin/env node
export {};

4

build/src/cli.js
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var upload = require('./');
var _1 = require(".");
var args = process.argv.slice(2);

@@ -10,3 +10,3 @@ var opts = {

};
process.stdin.pipe(upload(opts))
process.stdin.pipe(_1.upload(opts))
.on('error', console.error)

@@ -13,0 +13,0 @@ .on('response', function (resp, metadata) {

@@ -1,10 +0,7 @@

/// <reference types="request" />
/// <reference types="node" />
/// <reference types="pumpify" />
/// <reference types="configstore" />
import { AxiosRequestConfig, AxiosResponse } from 'axios';
import * as ConfigStore from 'configstore';
import ConfigStore from 'configstore';
import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library';
import * as Pumpify from 'pumpify';
import * as r from 'request';
import Pumpify from 'pumpify';
import r from 'request';
export declare type RequestBody = any;

@@ -130,18 +127,18 @@ export declare type RequestResponse = AxiosResponse;

createURI(callback: CreateUriCallback): void;
private continueUploading();
private startUploading();
private onChunk(chunk, enc, next);
private getAndSetOffset(callback);
private makeRequest(reqOpts, callback);
private getRequestStream(reqOpts, callback);
private restart();
private get(prop);
private set(props);
private deleteConfig();
private continueUploading;
private startUploading;
private onChunk;
private getAndSetOffset;
private makeRequest;
private getRequestStream;
private restart;
private get;
private set;
private deleteConfig;
/**
* @return {bool} is the request good?
*/
private onResponse(resp);
private onResponse;
}
export declare function upload(cfg: UploadConfig): Upload;
export declare function createURI(cfg: UploadConfig, callback: CreateUriCallback): void;

@@ -12,11 +12,21 @@ "use strict";

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ConfigStore = require("configstore");
var crypto = require("crypto");
var configstore_1 = __importDefault(require("configstore"));
var crypto = __importStar(require("crypto"));
var google_auth_library_1 = require("google-auth-library");
var Pumpify = require("pumpify");
var r = require("request");
var pumpify_1 = __importDefault(require("pumpify"));
var request_1 = __importDefault(require("request"));
var stream_1 = require("stream");
var streamEvents = require("stream-events");
var request = r.defaults({ json: true, pool: { maxSockets: Infinity } });
var stream_events_1 = __importDefault(require("stream-events"));
var request = request_1.default.defaults({ json: true, pool: { maxSockets: Infinity } });
var BASE_URI = 'https://www.googleapis.com/upload/storage/v1/b';

@@ -35,3 +45,3 @@ var TERMINATED_UPLOAD_STATUS_CODE = 410;

_this.numRetries = 0;
streamEvents.call(_this);
stream_events_1.default.call(_this);
cfg = cfg || {};

@@ -70,3 +80,3 @@ if (!cfg.bucket || !cfg.file) {

_this.predefinedAcl = 'publicRead';
_this.configStore = new ConfigStore('gcs-resumable-upload');
_this.configStore = new configstore_1.default('gcs-resumable-upload');
_this.uriProvidedManually = !!cfg.uri;

@@ -341,3 +351,3 @@ _this.uri = cfg.uri || _this.get('uri');

return Upload;
}(Pumpify));
}(pumpify_1.default));
exports.Upload = Upload;

@@ -344,0 +354,0 @@ function axiosToRequest(opts) {

{
"name": "gcs-resumable-upload",
"version": "0.11.0",
"version": "0.11.1",
"description": "Upload a file to Google Cloud Storage with built-in resumable behavior",

@@ -12,3 +12,4 @@ "repository": "stephenplusplus/gcs-resumable-upload",

"scripts": {
"test": "mocha build/test -r source-map-support/register --timeout 4000",
"test": "npm run test-only",
"test-only": "mocha build/test -r source-map-support/register --timeout 4000",
"check": "gts check",

@@ -39,6 +40,6 @@ "clean": "gts clean",

"configstore": "^3.1.2",
"google-auth-library": "^1.4.0",
"pumpify": "^1.4.0",
"request": "^2.85.0",
"stream-events": "^1.0.3"
"google-auth-library": "^1.5.0",
"pumpify": "^1.5.1",
"request": "^2.87.0",
"stream-events": "^1.0.4"
},

@@ -48,18 +49,18 @@ "devDependencies": {

"@types/is-stream": "^1.1.0",
"@types/mocha": "^5.0.0",
"@types/mocha": "^5.2.1",
"@types/mockery": "^1.4.29",
"@types/nock": "^9.1.3",
"@types/node": "^9.6.1",
"@types/pumpify": "^1.4.0",
"@types/node": "^10.3.0",
"@types/pumpify": "^1.4.1",
"@types/request": "^2.47.0",
"@types/through2": "^2.0.33",
"gts": "^0.5.4",
"gts": "^0.7.0",
"is-stream": "^1.1.0",
"mocha": "^5.0.5",
"mocha": "^5.2.0",
"mockery": "^2.1.0",
"nock": "^9.2.5",
"source-map-support": "^0.5.4",
"nock": "^9.3.0",
"source-map-support": "^0.5.6",
"through2": "^2.0.3",
"typescript": "~2.8.0"
"typescript": "~2.9.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc