@fromdeno/cache
Advanced tools
Comparing version 0.1.8 to 0.1.9
{ | ||
"name": "@fromdeno/cache", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Simple API for Deno cache.", | ||
@@ -21,2 +21,3 @@ "type": "module", | ||
"prepare": "deno2node tsconfig.json", | ||
"postprepare": "globstar fdt out/test/*.test.js", | ||
"clean": "git clean -fXde !node_modules/", | ||
@@ -45,8 +46,9 @@ "fmt": "deno fmt --ignore=out/,node_modules/", | ||
"dependencies": { | ||
"deno.ns": "^0.4.2" | ||
"deno.ns": "^0.4.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.4.10", | ||
"deno2node": "^0.8.0" | ||
"deno2node": "^0.8.0", | ||
"globstar": "^1.0.0" | ||
} | ||
} |
@@ -51,2 +51,3 @@ import { Path, sha256 } from "./deps.deno.ts"; | ||
async read(options?: Deno.ReadFileOptions): Promise<Response> { | ||
await Deno.permissions.request({ name: "read", path: getCacheDir() }); | ||
const [body, { headers }] = await Promise.all([ | ||
@@ -64,2 +65,3 @@ Deno.readFile(this.path, options), | ||
async write(res: Response): Promise<void> { | ||
await Deno.permissions.request({ name: "write", path: getCacheDir() }); | ||
const body = new Uint8Array(await res.arrayBuffer()); | ||
@@ -66,0 +68,0 @@ const meta = { headers: Object.fromEntries(res.headers), url: this.url }; |
Sorry, the diff of this file is not supported yet
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
9925
224
3
Updateddeno.ns@^0.4.3