@miniflare/kv
Advanced tools
Comparing version 2.9.0-next.1 to 2.9.0
@@ -60,4 +60,4 @@ import { Clock } from '@miniflare/shared'; | ||
constructor(ctx: PluginContext, options?: KVOptions); | ||
getNamespace(storage: StorageFactory, namespace: string, blockGlobalAsyncIO?: boolean): Promise<KVNamespace>; | ||
setup(storageFactory: StorageFactory): Promise<SetupResult>; | ||
getNamespace(storage: StorageFactory, namespace: string, blockGlobalAsyncIO?: boolean): KVNamespace; | ||
setup(storageFactory: StorageFactory): SetupResult; | ||
} | ||
@@ -64,0 +64,0 @@ |
@@ -263,12 +263,12 @@ var __create = Object.create; | ||
} | ||
async getNamespace(storage, namespace, blockGlobalAsyncIO = false) { | ||
return new KVNamespace(await storage.storage(namespace, this.#persist), { | ||
getNamespace(storage, namespace, blockGlobalAsyncIO = false) { | ||
return new KVNamespace(storage.storage(namespace, this.#persist), { | ||
blockGlobalAsyncIO | ||
}); | ||
} | ||
async setup(storageFactory) { | ||
setup(storageFactory) { | ||
const blockGlobalAsyncIO = !this.ctx.globalAsyncIO; | ||
const bindings = {}; | ||
for (const namespace of this.kvNamespaces ?? []) { | ||
bindings[namespace] = await this.getNamespace(storageFactory, namespace, blockGlobalAsyncIO); | ||
bindings[namespace] = this.getNamespace(storageFactory, namespace, blockGlobalAsyncIO); | ||
} | ||
@@ -275,0 +275,0 @@ return { bindings }; |
{ | ||
"name": "@miniflare/kv", | ||
"version": "2.9.0-next.1", | ||
"version": "2.9.0", | ||
"description": "Workers KV module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers", | ||
@@ -38,7 +38,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@miniflare/shared": "2.9.0-next.1" | ||
"@miniflare/shared": "2.9.0" | ||
}, | ||
"devDependencies": { | ||
"@miniflare/shared-test": "2.9.0-next.1" | ||
"@miniflare/shared-test": "2.9.0" | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
21055
+ Added@miniflare/shared@2.9.0(transitive)
+ Added@types/better-sqlite3@7.6.11(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedbuiltins@5.1.0(transitive)
+ Addedcross-spawn@7.0.5(transitive)
+ Addedexeca@6.1.0(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedhuman-signals@3.0.1(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addednpx-import@1.1.4(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedparse-package-name@1.0.0(transitive)
+ Addedpath-key@3.1.14.0.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedvalidate-npm-package-name@4.0.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@miniflare/shared@2.9.0-next.1(transitive)
Updated@miniflare/shared@2.9.0