onedrive-api
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -1,2 +0,2 @@ | ||
const got = require("got"); | ||
const got = import("got"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
@@ -29,3 +29,3 @@ const gotConfig = require("../helpers/gotHelper"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
method: "POST", | ||
@@ -32,0 +32,0 @@ hooks: { |
const gotConfig = require("../helpers/gotHelper"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
@@ -36,3 +36,3 @@ /** | ||
if (params.body) extendConfig.body = params.body; | ||
const gotExtend = got.extend(extendConfig); | ||
const gotExtend = (await got).got.extend(extendConfig); | ||
@@ -39,0 +39,0 @@ const response = await gotExtend(uri); |
@@ -1,2 +0,2 @@ | ||
const got = require("got"); | ||
const got = import("got"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
@@ -27,3 +27,3 @@ const gotConfig = require("../helpers/gotHelper"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
method: "DELETE", | ||
@@ -30,0 +30,0 @@ hooks: { |
// download.js | ||
const got = require("got"); | ||
const got = import("got"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
@@ -17,3 +17,3 @@ const gotConfig = require("../helpers/gotHelper"); | ||
*/ | ||
function download(params) { | ||
async function download(params) { | ||
if (!params.accessToken) { | ||
@@ -30,6 +30,8 @@ throw new Error("Missing params.accessToken"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), | ||
}, | ||
isStream: true, | ||
method: "GET", | ||
}); | ||
@@ -36,0 +38,0 @@ return gotExtend.stream(URI); |
@@ -1,2 +0,2 @@ | ||
const got = require("got"); | ||
const got = import("got"); | ||
const gotConfig = require("../helpers/gotHelper"); | ||
@@ -27,3 +27,3 @@ const userPathGenerator = require("../helpers/pathHelper"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -30,0 +30,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
const userPathGenerator = require("../helpers/pathHelper"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
const gotConfig = require("../helpers/gotHelper"); | ||
@@ -33,3 +33,3 @@ const isQueryStringUrlEncoded = require("../helpers/isQueryStringUrlEncoded"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -36,0 +36,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
// partialDownload.js | ||
const getMetadata = require("./getMetadata"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
const gotConfig = require("../helpers/gotHelper"); | ||
@@ -42,3 +42,3 @@ | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -45,0 +45,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
@@ -1,2 +0,2 @@ | ||
const got = require("got"); | ||
const got = import("got"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
@@ -23,3 +23,3 @@ const gotConfig = require("../helpers/gotHelper"); | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -26,0 +26,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
// update.js | ||
const isEmptyObject = require("is-empty-object"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
const gotConfig = require("../helpers/gotHelper"); | ||
@@ -34,3 +34,3 @@ | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -37,0 +37,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
// uploadSession.js | ||
const path = require("path"); | ||
const userPathGenerator = require("../helpers/pathHelper"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
const gotConfig = require("../helpers/gotHelper"); | ||
@@ -63,3 +63,3 @@ | ||
const initGotExtended = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -76,3 +76,3 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), | ||
let urlResponse = await initGotExtended(URI, { | ||
let urlResponse = await gotExtend(URI, { | ||
json: { | ||
@@ -101,3 +101,3 @@ "@microsoft.graph.conflictBehavior": params.conflictBehavior, | ||
const uploadGotExtended = got.extend({ | ||
const uploadGotExtended = (await got).got.extend({ | ||
method: "PUT", | ||
@@ -104,0 +104,0 @@ headers: { |
@@ -5,3 +5,3 @@ // uploadSimple.js | ||
const gotConfig = require("../helpers/gotHelper"); | ||
const got = require("got"); | ||
const got = import("got"); | ||
const { PassThrough } = require("stream"); | ||
@@ -47,3 +47,3 @@ | ||
const gotExtend = got.extend({ | ||
const gotExtend = (await got).got.extend({ | ||
hooks: { | ||
@@ -50,0 +50,0 @@ beforeRequest: gotConfig.beforeRequestHookGot(params.accessToken), |
{ | ||
"name": "onedrive-api", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "OneDrive module for communicating with oneDrive API. Built using functional programming pattern", | ||
@@ -26,3 +26,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"got": "11.8.3", | ||
"got": "12.6.0", | ||
"is-empty-object": "1.1.1" | ||
@@ -29,0 +29,0 @@ }, |
46695
599
+ Added@sindresorhus/is@5.6.0(transitive)
+ Added@szmarczak/http-timer@5.0.1(transitive)
+ Addedcacheable-lookup@7.0.0(transitive)
+ Addedcacheable-request@10.2.14(transitive)
+ Addedform-data-encoder@2.1.4(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedgot@12.6.0(transitive)
+ Addedhttp2-wrapper@2.2.1(transitive)
+ Addedlowercase-keys@3.0.0(transitive)
+ Addedmimic-response@4.0.0(transitive)
+ Addednormalize-url@8.0.1(transitive)
+ Addedp-cancelable@3.0.0(transitive)
+ Addedresponselike@3.0.0(transitive)
- Removed@sindresorhus/is@4.6.0(transitive)
- Removed@szmarczak/http-timer@4.0.6(transitive)
- Removed@types/cacheable-request@6.0.3(transitive)
- Removed@types/keyv@3.1.4(transitive)
- Removed@types/node@20.12.11(transitive)
- Removed@types/responselike@1.0.3(transitive)
- Removedcacheable-lookup@5.0.4(transitive)
- Removedcacheable-request@7.0.4(transitive)
- Removedclone-response@1.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedgot@11.8.3(transitive)
- Removedhttp2-wrapper@1.0.3(transitive)
- Removedlowercase-keys@2.0.0(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removednormalize-url@6.1.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-cancelable@2.1.1(transitive)
- Removedpump@3.0.0(transitive)
- Removedresponselike@2.0.1(transitive)
- Removedundici-types@5.26.5(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedgot@12.6.0