Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@miniflare/shared

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/shared - npm Package Compare versions

Comparing version 2.6.0-d1.1 to 2.6.0

46

dist/src/index.d.ts
import { Awaitable as Awaitable_2 } from '@miniflare/shared';
import type { Database } from 'better-sqlite3';

@@ -60,4 +59,2 @@ export declare function addAll<T>(set: Set<T>, values: Iterable<T>): void;

export declare function getSQLiteNativeBindingLocation(): string;
export declare function globsToMatcher(globs?: string[]): Matcher;

@@ -262,2 +259,24 @@

export declare interface Range {
offset?: number;
length?: number;
suffix?: number;
}
export declare interface RangeStoredMeta<Meta = unknown> extends StoredMeta<Meta> {
range: {
offset: number;
length: number;
};
}
export declare interface RangeStoredValue extends StoredValue {
range: {
offset: number;
length: number;
};
}
export declare type RangeStoredValueMeta<Meta = unknown> = RangeStoredValue & RangeStoredMeta<Meta>;
export declare class RequestContext {

@@ -347,4 +366,7 @@ #private;

abstract has(key: string): Awaitable<boolean>;
abstract head<Meta = unknown>(key: string): Awaitable<StoredMeta<Meta> | undefined>;
abstract get<Meta = unknown>(key: string, skipMetadata?: false): Awaitable<StoredValueMeta<Meta> | undefined>;
abstract get(key: string, skipMetadata: true): Awaitable<StoredValue | undefined>;
abstract getRange<Meta = unknown>(key: string, range?: Range, skipMetadata?: false): Awaitable<RangeStoredValueMeta<Meta> | undefined>;
abstract getRange(key: string, range: undefined | Range, skipMetadata: true): Awaitable<RangeStoredValue | undefined>;
abstract put<Meta = unknown>(key: string, value: StoredValueMeta<Meta>): Awaitable<void>;

@@ -354,4 +376,2 @@ abstract delete(key: string): Awaitable<boolean>;

abstract list(options: StorageListOptions, skipMetadata: true): Awaitable<StorageListResult<StoredKey>>;
getSqliteDatabase(): Database;
getRangeMaybeExpired?<Meta = unknown>(key: string, start: number, length: number): Promise<StoredValueMeta<Meta> | undefined>;
hasMany(keys: string[]): Promise<number>;

@@ -382,2 +402,4 @@ getMany<Meta = unknown>(keys: string[], skipMetadata?: false): Promise<(StoredValueMeta<Meta> | undefined)[]>;

limit?: number;
/** If Delimiter, filter all keys containing delimiter and update cursor */
delimiter?: string;
}

@@ -389,2 +411,4 @@

cursor: string;
/** DelimitedPrefixes if delimiter */
delimitedPrefixes?: string[];
}

@@ -501,6 +525,6 @@

}[];
d1_databases?: {
r2_buckets?: {
binding: string;
database_name: string;
database_id: string;
bucket_name?: string;
preview_bucket_name?: string;
}[];

@@ -536,3 +560,3 @@ site?: {

kv_persist?: boolean | string;
d1_persist?: boolean | string;
r2_persist?: boolean | string;
cache?: boolean;

@@ -567,3 +591,5 @@ cache_persist?: boolean | string;

export declare interface WranglerServiceConfig {
name: string;
/** @deprecated Use `binding` instead */
name?: string;
binding?: string;
service: string;

@@ -570,0 +596,0 @@ environment: string;

@@ -53,3 +53,2 @@ var __create = Object.create;

getRequestContext: () => getRequestContext,
getSQLiteNativeBindingLocation: () => getSQLiteNativeBindingLocation,
globsToMatcher: () => globsToMatcher,

@@ -539,7 +538,3 @@ kWrapListener: () => kWrapListener,

// packages/shared/src/storage.ts
var import_node_path = __toModule(require("node:path"));
var Storage = class {
getSqliteDatabase() {
throw new Error("D1 not implemented for this Storage class");
}
async hasMany(keys) {

@@ -568,5 +563,2 @@ const results = keys.map(this.has.bind(this));

};
function getSQLiteNativeBindingLocation() {
return import_node_path.default.resolve(import_node_path.default.dirname(require.resolve("better-sqlite3")), "../build/Release/better_sqlite3.node");
}

@@ -742,3 +734,2 @@ // packages/shared/src/sync/clock.ts

getRequestContext,
getSQLiteNativeBindingLocation,
globsToMatcher,

@@ -745,0 +736,0 @@ kWrapListener,

{
"name": "@miniflare/shared",
"version": "2.6.0-d1.1",
"version": "2.6.0",
"description": "Shared utility module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -38,4 +38,2 @@ "keywords": [

"dependencies": {
"@types/better-sqlite3": "^7.5.0",
"better-sqlite3": "^7.5.3",
"ignore": "^5.1.8",

@@ -45,4 +43,4 @@ "kleur": "^4.1.4"

"devDependencies": {
"@miniflare/shared-test": "2.6.0-d1.1"
"@miniflare/shared-test": "2.6.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc