@miniflare/durable-objects
Advanced tools
Comparing version 2.12.2 to 2.13.0
@@ -90,3 +90,4 @@ /// <reference types="node" /> | ||
constructor(objectName: string, factory: DurableObjectFactory, ctx?: PluginContext); | ||
newUniqueId(_options?: NewUniqueIdOptions): DurableObjectId; | ||
jurisdiction(name: string): DurableObjectNamespace; | ||
newUniqueId(options?: NewUniqueIdOptions): DurableObjectId; | ||
idFromName(name: string): DurableObjectId; | ||
@@ -93,0 +94,0 @@ idFromString(hexId: string): DurableObjectId; |
@@ -175,2 +175,6 @@ var __create = Object.create; | ||
} | ||
function checkJurisdiction(jurisdiction) { | ||
const allowedJurisdictions = ["eu", "fedramp"]; | ||
return jurisdiction === void 0 || allowedJurisdictions.includes(jurisdiction); | ||
} | ||
var kObjectName = Symbol("kObjectName"); | ||
@@ -290,3 +294,12 @@ var DurableObjectId = class { | ||
} | ||
newUniqueId(_options) { | ||
jurisdiction(name) { | ||
if (!checkJurisdiction(name)) { | ||
throw new TypeError(`jurisdiction called with an unsupported jurisdiction: "${name}"`); | ||
} | ||
return this; | ||
} | ||
newUniqueId(options) { | ||
if (!checkJurisdiction(options?.jurisdiction)) { | ||
throw new TypeError(`newUniqueId called with an unsupported jurisdiction: "${options?.jurisdiction}"`); | ||
} | ||
const id = new Uint8Array(32); | ||
@@ -293,0 +306,0 @@ const view = new DataView(id.buffer); |
{ | ||
"name": "@miniflare/durable-objects", | ||
"version": "2.12.2", | ||
"version": "2.13.0", | ||
"description": "Durable Objects module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers", | ||
@@ -38,12 +38,12 @@ "keywords": [ | ||
"dependencies": { | ||
"@miniflare/core": "2.12.2", | ||
"@miniflare/shared": "2.12.2", | ||
"@miniflare/storage-memory": "2.12.2", | ||
"@miniflare/core": "2.13.0", | ||
"@miniflare/shared": "2.13.0", | ||
"@miniflare/storage-memory": "2.13.0", | ||
"undici": "5.20.0" | ||
}, | ||
"devDependencies": { | ||
"@miniflare/cache": "2.12.2", | ||
"@miniflare/runner-vm": "2.12.2", | ||
"@miniflare/shared-test": "2.12.2" | ||
"@miniflare/cache": "2.13.0", | ||
"@miniflare/runner-vm": "2.13.0", | ||
"@miniflare/shared-test": "2.13.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
79022
1452
+ Added@miniflare/core@2.13.0(transitive)
+ Added@miniflare/queues@2.13.0(transitive)
+ Added@miniflare/shared@2.13.0(transitive)
+ Added@miniflare/storage-memory@2.13.0(transitive)
+ Added@miniflare/watcher@2.13.0(transitive)
- Removed@miniflare/core@2.12.2(transitive)
- Removed@miniflare/queues@2.12.2(transitive)
- Removed@miniflare/shared@2.12.2(transitive)
- Removed@miniflare/storage-memory@2.12.2(transitive)
- Removed@miniflare/watcher@2.12.2(transitive)
Updated@miniflare/core@2.13.0
Updated@miniflare/shared@2.13.0