gootenberg
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -16,3 +16,2 @@ 'use strict'; | ||
var validateArgs = _interopDefault(require('aproba')); | ||
var _objectSpread = _interopDefault(require('@babel/runtime/helpers/objectSpread')); | ||
var archieml = _interopDefault(require('archieml')); | ||
@@ -181,3 +180,3 @@ | ||
title, | ||
copyOpts, | ||
requestBody, | ||
_ref2, | ||
@@ -194,10 +193,11 @@ data, | ||
validateArgs('S', [src]); | ||
copyOpts = destination ? { | ||
requestBody = destination ? { | ||
parents: [destination] | ||
} : {}; | ||
_context.next = 5; | ||
return this.driveAPI.files.copy(_objectSpread({ | ||
return this.driveAPI.files.copy({ | ||
auth: this.client, | ||
fileId: src | ||
}, copyOpts)); | ||
fileId: src, | ||
requestBody: requestBody | ||
}); | ||
@@ -204,0 +204,0 @@ case 5: |
@@ -12,3 +12,2 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; | ||
import validateArgs from 'aproba'; | ||
import _objectSpread from '@babel/runtime/helpers/objectSpread'; | ||
import archieml from 'archieml'; | ||
@@ -177,3 +176,3 @@ | ||
title, | ||
copyOpts, | ||
requestBody, | ||
_ref2, | ||
@@ -190,10 +189,11 @@ data, | ||
validateArgs('S', [src]); | ||
copyOpts = destination ? { | ||
requestBody = destination ? { | ||
parents: [destination] | ||
} : {}; | ||
_context.next = 5; | ||
return this.driveAPI.files.copy(_objectSpread({ | ||
return this.driveAPI.files.copy({ | ||
auth: this.client, | ||
fileId: src | ||
}, copyOpts)); | ||
fileId: src, | ||
requestBody: requestBody | ||
}); | ||
@@ -200,0 +200,0 @@ case 5: |
{ | ||
"name": "gootenberg", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,3 @@ import validateArgs from 'aproba'; | ||
const copyOpts = destination ? { | ||
const requestBody = destination ? { | ||
parents: [destination], | ||
@@ -14,3 +14,3 @@ } : {}; | ||
fileId: src, | ||
...copyOpts, | ||
requestBody, | ||
}); | ||
@@ -17,0 +17,0 @@ |
@@ -16,2 +16,3 @@ import expect from 'expect.js'; | ||
copyDir: '1-qOZ0r4aELn5vdu2tVWR4icL3WSBXwOp', | ||
copyToDir: '107ZbnAKvuQbdvAYdZHNSFo-rZYdKg7ud', | ||
}; | ||
@@ -109,3 +110,2 @@ | ||
title: now, | ||
destination: TEST_DOCS.copyDir, | ||
}); | ||
@@ -122,2 +122,19 @@ | ||
it('Copies files into a different directory', async () => { | ||
const now = new Date().toISOString(); | ||
const copyMoveFile = await goot.drive.copy(TEST_DOCS.copyBase, { | ||
title: now, | ||
destination: TEST_DOCS.copyToDir, | ||
}); | ||
const filesInCopy = await goot.drive.ls(TEST_DOCS.copyToDir); | ||
expect(filesInCopy).to.be.an('array'); | ||
expect(!!find(filesInCopy, { name: now })).to.be(true); | ||
const baseContents = await goot.drive.export(TEST_DOCS.copyBase); | ||
const copyContents = await goot.drive.export(copyMoveFile.id); | ||
expect(copyContents).to.be(baseContents); | ||
}); | ||
it('Handles errors gracefully', async () => { | ||
@@ -124,0 +141,0 @@ try { |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
708139
2628
0