Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "mock-gcs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Mock implementation of the Google Cloud Storage SDK for Node.js", | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/aldipermanaetikaputra/mock-gcs", |
@@ -75,3 +75,3 @@ # mock-gcs | ||
const [url] = await file.getSignedUrl(); | ||
console.log(url); // "https://storage.googleapis.com/my-bucket/my-file.txt" | ||
console.log(url); // "https://storage.googleapis.com/my-bucket/my-file.txt?X-Goog-Algorithm=MOCKED" | ||
@@ -88,3 +88,7 @@ await file.delete(); | ||
await file.save('Will not be saved!'); // An error thrown | ||
try { | ||
await file.save('Will not be saved!'); // An error thrown | ||
} catch (error) { | ||
console.error(error.message); // Failed to save | ||
} | ||
console.log('exists:', await file.exists()); // exists: [false] | ||
@@ -134,3 +138,3 @@ | ||
console.log(files.map(file => file.name)); // ["file.txt"] | ||
console.log(files.map(file => file.name)); // [ 'file.txt' ] | ||
``` | ||
@@ -137,0 +141,0 @@ |
31248
169