{
  "_args": [
    [
      {
        "raw": "gcs-resumable-upload@https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
        "scope": null,
        "escapedName": "gcs-resumable-upload",
        "name": "gcs-resumable-upload",
        "rawSpec": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
        "spec": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
        "type": "remote"
      },
      "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin"
    ]
  ],
  "_from": "gcs-resumable-upload@>=0.8.0 <0.9.0",
  "_id": "gcs-resumable-upload@0.8.1",
  "_inCache": true,
  "_location": "/firebase-admin/gcs-resumable-upload",
  "_phantomChildren": {},
  "_requested": {
    "raw": "gcs-resumable-upload@https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
    "scope": null,
    "escapedName": "gcs-resumable-upload",
    "name": "gcs-resumable-upload",
    "rawSpec": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
    "spec": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/firebase-admin",
    "/firebase-admin/@google-cloud/storage"
  ],
  "_resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
  "_shasum": "bb9eb7dfbacc8d77f2136b99661e693058fa3be3",
  "_shrinkwrap": null,
  "_spec": "gcs-resumable-upload@https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.8.1.tgz",
  "_where": "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin",
  "author": {
    "name": "Stephen Sawchuk",
    "email": "sawchuk@gmail.com"
  },
  "bin": {
    "gcs-upload": "./cli.js"
  },
  "dependencies": {
    "buffer-equal": "^1.0.0",
    "configstore": "^3.0.0",
    "google-auto-auth": "^0.7.1",
    "pumpify": "^1.3.3",
    "request": "^2.81.0",
    "stream-events": "^1.0.1",
    "through2": "^2.0.0"
  },
  "description": "Upload a file to Google Cloud Storage with built-in resumable behavior",
  "devDependencies": {
    "is-stream": "^1.0.1",
    "mocha": "^3.2.0",
    "mockery": "^2.0.0",
    "standard": "^10.0.1"
  },
  "files": [
    "cli.js",
    "index.js"
  ],
  "keywords": [
    "google",
    "gcloud",
    "storage",
    "gcs",
    "upload",
    "resumable"
  ],
  "license": "MIT",
  "main": "index.js",
  "name": "gcs-resumable-upload",
  "optionalDependencies": {},
  "readme": "# gcs-resumable-upload [![Build Status](https://travis-ci.org/stephenplusplus/gcs-resumable-upload.svg?branch=master)](https://travis-ci.org/stephenplusplus/gcs-resumable-upload)\n> Upload a file to Google Cloud Storage with built-in resumable behavior\n\n```sh\n$ npm install --save gcs-resumable-upload\n```\n```js\nvar upload = require('gcs-resumable-upload');\nvar fs = require('fs');\n\nfs.createReadStream('titanic.mov')\n  .pipe(upload({ bucket: 'legally-owned-movies', file: 'titanic.mov' }))\n  .on('finish', function () {\n    // Uploaded!\n  });\n```\n\nOr from the command line:\n\n```sh\n$ npm install -g gcs-resumable-upload\n$ cat titanic.mov | gcs-upload legally-owned-movies titanic.mov\n```\n\nIf somewhere during the operation, you lose your connection to the internet or your tough-guy brother slammed your laptop shut when he saw what you were uploading, the next time you try to upload to that file, it will resume automatically from where you left off.\n\n## How it works\n\nThis module stores a file using [ConfigStore](http://gitnpm.com/configstore) that is written to when you first start an upload. It is aliased by the file name you are uploading to and holds the first 16kb chunk of data* as well as the unique resumable upload URI. ([Resumable uploads are complicated](https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#resumable))\n\nIf your upload was interrupted, next time you run the code, we ask the API how much data it has already, then simply dump all of the data coming through the pipe that it already has.\n\nAfter the upload completes, the entry in the config file is removed. Done!\n\n\\* The first 16kb chunk is stored to validate if you are sending the same data when you resume the upload. If not, a new resumable upload is started with the new data.\n\n## Authentication\n\nOh, right. This module uses [google-auto-auth](http://gitnpm.com/google-auto-auth) and accepts all of the configuration that module does to strike up a connection as `config.authConfig`. See [`authConfig`](https://github.com/stephenplusplus/google-auto-auth#authconfig).\n\n## API\n\n### upload = require('gcs-resumable-upload')\n\n---\n\n#### upload(config)\n\n- Returns: [`Duplexify`](http://gitnpm.com/duplexify)\n\n<a name=\"config\"></a>\n##### config\n\n- Type: `object`\n\nConfiguration object.\n\n###### config.authClient\n\n- Type: [`GoogleAutoAuth`](http://gitnpm.com/google-auto-auth)\n- *Optional*\n\nIf you want to re-use an auth client from [google-auto-auth](http://gitnpm.com/google-auto-auth), pass an instance here.\n\n###### config.authConfig\n\n- Type: `object`\n- *Optional*\n\nSee [`authConfig`](https://github.com/stephenplusplus/google-auto-auth#authconfig).\n\n###### config.bucket\n\n- Type: `string`\n- **Required**\n\nThe name of the destination bucket.\n\n###### config.file\n\n- Type: `string`\n- **Required**\n\nThe name of the destination file.\n\n###### config.generation\n\n- Type: `number`\n- *Optional*\n\nThis will cause the upload to fail if the current generation of the remote object does not match the one provided here.\n\n###### config.key\n\n- Type: `string|buffer`\n- *Optional*\n\nA [customer-supplied encryption key](https://cloud.google.com/storage/docs/encryption#customer-supplied).\n\n###### config.metadata\n\n- Type: `object`\n- *Optional*\n\nAny metadata you wish to set on the object.\n\n###### *config.metadata.contentLength*\n\nSet the length of the file being uploaded.\n\n###### *config.metadata.contentType*\n\nSet the content type of the incoming data.\n\n###### config.offset\n\n- Type: `number`\n- *Optional*\n\nThe starting byte of the upload stream, for [resuming an interrupted upload](https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#resume-upload).\n\n###### config.origin\n\n- Type: `string`\n- *Optional*\n\nSet an Origin header when creating the resumable upload URI.\n\n###### config.predefinedAcl\n\n- Type: `string`\n- *Optional*\n\nApply a predefined set of access controls to the created file.\n\nAcceptable values are:\n\n  - **`authenticatedRead`** - Object owner gets `OWNER` access, and `allAuthenticatedUsers` get `READER` access.\n  - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and project team owners get `OWNER` access.\n  - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project team owners get `READER` access.\n  - **`private`** - Object owner gets `OWNER` access.\n  - **`projectPrivate`** - Object owner gets `OWNER` access, and project team members get access according to their roles.\n  - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` get `READER` access.\n\n###### config.private\n\n- Type: `boolean`\n- *Optional*\n\nMake the uploaded file private. (Alias for `config.predefinedAcl = 'private'`)\n\n###### config.public\n\n- Type: `boolean`\n- *Optional*\n\nMake the uploaded file public. (Alias for `config.predefinedAcl = 'publicRead'`)\n\n###### config.uri\n\n- Type: `string`\n- *Optional*\n\nIf you already have a resumable URI from a previously-created resumable upload, just pass it in here and we'll use that.\n\n###### config.userProject\n\n- Type: `string`\n- *Optional*\n\nIf the bucket being accessed has `requesterPays` functionality enabled, this can be set to control which project is billed for the access of this file.\n\n--\n\n#### Events\n\n##### .on('error', function (err) {})\n\n###### err\n\n- Type: `Error`\n\nInvoked if the authorization failed, the request failed, or the file wasn't successfully uploaded.\n\n##### .on('response', function (resp, metadata) {})\n\n###### resp\n\n- Type: `Object`\n\nThe HTTP response from [`request`](http://gitnpm.com/request).\n\n###### metadata\n\n- Type: `Object`\n\nThe file's new metadata.\n\n##### .on('finish', function () {})\n\nThe file was uploaded successfully.\n\n---\n\n#### upload.createURI([config](#config), callback)\n\n##### callback(err, resumableURI)\n\n###### callback.err\n\n- Type: `Error`\n\nInvoked if the authorization failed or the request to start a resumable session failed.\n\n###### callback.resumableURI\n\n- Type: `String`\n\nThe resumable upload session URI.\n",
  "readmeFilename": "readme.md",
  "scripts": {
    "test": "standard && mocha"
  },
  "standard": {
    "global": [
      "after",
      "before",
      "beforeEach",
      "describe",
      "it"
    ]
  },
  "version": "0.8.1"
}
