diff --git a/dlp/inspect.js b/dlp/inspect.js index b01032e467..7b4b49fd11 100644 --- a/dlp/inspect.js +++ b/dlp/inspect.js @@ -104,7 +104,7 @@ function inspectFile (filepath, minLikelihood, maxFindings, infoTypes, includeQu // Construct file data to inspect const fileItems = [{ - type: mime.lookup(filepath) || 'application/octet-stream', + type: mime.getType(filepath) || 'application/octet-stream', data: Buffer.from(fs.readFileSync(filepath)).toString('base64') }]; diff --git a/dlp/package.json b/dlp/package.json index 24ac62fa84..549176e7ee 100644 --- a/dlp/package.json +++ b/dlp/package.json @@ -64,19 +64,19 @@ ] }, "dependencies": { - "@google-cloud/bigquery": "^0.9.6", - "@google-cloud/dlp": "^0.1.0", - "google-auth-library": "0.10.0", + "@google-cloud/bigquery": "^0.10.0", + "@google-cloud/dlp": "^0.2.0", + "google-auth-library": "0.11.0", "google-auto-auth": "0.7.2", - "google-proto-files": "0.13.0", - "mime": "1.4.0", - "request": "2.81.0", - "request-promise": "4.2.1", + "google-proto-files": "0.13.1", + "mime": "2.0.3", + "request": "2.83.0", + "request-promise": "4.2.2", "safe-buffer": "5.1.1", - "yargs": "8.0.2" + "yargs": "10.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.17", - "ava": "0.22.0" + "@google-cloud/nodejs-repo-tools": "2.1.0", + "ava": "0.23.0" } } diff --git a/dlp/redact.js b/dlp/redact.js index 2bc1c23902..5d7caf87a6 100644 --- a/dlp/redact.js +++ b/dlp/redact.js @@ -89,7 +89,7 @@ function redactImage (filepath, minLikelihood, infoTypes, outputPath) { // const outputPath = 'result.png'; const fileItems = [{ - type: mime.lookup(filepath) || 'application/octet-stream', + type: mime.getType(filepath) || 'application/octet-stream', data: Buffer.from(fs.readFileSync(filepath)).toString('base64') }];