keyv-registry 2.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -22
- package/dist/cjs/constants.d.cts +3 -0
- package/dist/cjs/constants.d.ts +3 -0
- package/dist/cjs/constants.js +37 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/index.d.cts +2 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/loadAdapter.js +14 -2
- package/dist/cjs/loadAdapter.js.map +1 -1
- package/dist/cjs/migrate-keyv5.d.cts +18 -0
- package/dist/cjs/migrate-keyv5.d.ts +18 -0
- package/dist/cjs/migrate-keyv5.js +554 -0
- package/dist/cjs/migrate-keyv5.js.map +1 -0
- package/dist/cjs/registry.js +2 -2
- package/dist/cjs/registry.js.map +1 -1
- package/dist/cjs/types.d.cts +4 -8
- package/dist/cjs/types.d.ts +4 -8
- package/dist/cjs/utils.d.cts +14 -1
- package/dist/cjs/utils.d.ts +14 -1
- package/dist/cjs/utils.js +24 -12
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/worker.d.cts +7 -0
- package/dist/cjs/worker.d.ts +7 -0
- package/dist/cjs/worker.js +66 -53
- package/dist/cjs/worker.js.map +1 -1
- package/dist/esm/constants.d.ts +3 -0
- package/dist/esm/constants.js +18 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loadAdapter.js +14 -2
- package/dist/esm/loadAdapter.js.map +1 -1
- package/dist/esm/migrate-keyv5.d.ts +18 -0
- package/dist/esm/migrate-keyv5.js +74 -0
- package/dist/esm/migrate-keyv5.js.map +1 -0
- package/dist/esm/registry.js +2 -2
- package/dist/esm/registry.js.map +1 -1
- package/dist/esm/types.d.ts +4 -8
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils.d.ts +14 -1
- package/dist/esm/utils.js +21 -12
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/worker.d.ts +7 -0
- package/dist/esm/worker.js +25 -21
- package/dist/esm/worker.js.map +1 -1
- package/package.json +7 -5
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/types.ts"],"sourcesContent":["import type Keyv from 'keyv';\n\n/**\n * Configuration for a protocol adapter\n */\nexport interface AdapterConfig {\n /** npm package name, or null for built-in adapters */\n package: string | null;\n /** Named export from the package (default: 'default') */\n exportName?: string;\n /** How to instantiate the adapter */\n mode?: 'string' | 'options';\n /** Custom function to map URL to adapter options */\n optionsMapper?: (url: URL) => Record<string, unknown>;\n}\n\n/**\n * Options for createStore\n */\nexport interface CreateStoreOptions {\n /** Pre-instantiated adapter (bypasses URI loading) */\n store?:
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/types.ts"],"sourcesContent":["import type { Keyv, KeyvOptions } from 'keyv';\n\n/**\n * Configuration for a protocol adapter\n */\nexport interface AdapterConfig {\n /** npm package name, or null for built-in adapters */\n package: string | null;\n /** Named export from the package (default: 'default') */\n exportName?: string;\n /** How to instantiate the adapter */\n mode?: 'string' | 'options';\n /** Custom function to map URL to adapter options */\n optionsMapper?: (url: URL) => Record<string, unknown>;\n}\n\n/**\n * Options for createStore\n */\nexport interface CreateStoreOptions extends Partial<KeyvOptions> {\n /** Pre-instantiated adapter (bypasses URI loading) */\n store?: KeyvOptions['store'];\n /** Options passed through to the adapter constructor */\n [key: string]: unknown;\n}\n\n/**\n * Callback type for createStore\n */\nexport type CreateStoreCallback<T> = (err: Error | null, store?: Keyv<T>) => void;\n\n/**\n * Internal callback type for loadAdapter\n */\nexport type LoadAdapterCallback = (err: Error | null, Adapter?: unknown) => void;\n"],"names":[],"mappings":"AA+BA;;CAEC,GACD,WAAiF"}
|
package/dist/esm/utils.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Parse a store URI, keeping a Windows drive letter written after `//` in the path
|
|
3
|
+
*/
|
|
4
|
+
export declare function parseUri(uri: string): URL;
|
|
5
|
+
export interface ToFilePathOptions {
|
|
6
|
+
windows?: boolean;
|
|
7
|
+
homedir?: string;
|
|
8
|
+
cwd?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Convert a file-backed store URL to a native path, handling ~ and . prefixes (no filesystem access)
|
|
12
|
+
*/
|
|
13
|
+
export declare function toFilePath(url: URL, options?: ToFilePathOptions): string;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve file path from URL and create its parent directory
|
|
3
16
|
*/
|
|
4
17
|
export declare function resolveFilePath(url: URL): string;
|
|
5
18
|
/**
|
package/dist/esm/utils.js
CHANGED
|
@@ -2,20 +2,29 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import * as os from 'node:os';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
+
// `scheme://C:/x` parses the drive letter as a host and drops the colon, so it is rewritten to `scheme:///C:/x` first.
|
|
6
|
+
const DRIVE_AS_HOST = /^([a-zA-Z][a-zA-Z0-9+.-]*:)\/\/([a-zA-Z]:[/\\])/;
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Parse a store URI, keeping a Windows drive letter written after `//` in the path
|
|
9
|
+
*/ export function parseUri(uri) {
|
|
10
|
+
return new URL(uri.replace(DRIVE_AS_HOST, '$1///$2'));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Convert a file-backed store URL to a native path, handling ~ and . prefixes (no filesystem access)
|
|
14
|
+
*/ export function toFilePath(url, options = {}) {
|
|
15
|
+
var _options_windows, _options_homedir, _options_cwd;
|
|
16
|
+
const windows = (_options_windows = options.windows) !== null && _options_windows !== void 0 ? _options_windows : process.platform === 'win32';
|
|
17
|
+
const p = windows ? path.win32 : path.posix;
|
|
18
|
+
if (url.host === '~') return p.join((_options_homedir = options.homedir) !== null && _options_homedir !== void 0 ? _options_homedir : os.homedir(), decodeURIComponent(url.pathname.slice(1)));
|
|
19
|
+
if (url.host === '.') return p.join((_options_cwd = options.cwd) !== null && _options_cwd !== void 0 ? _options_cwd : process.cwd(), decodeURIComponent(url.pathname.slice(1)));
|
|
20
|
+
return fileURLToPath(new URL(`file://${url.host}${url.pathname}`), {
|
|
21
|
+
windows
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve file path from URL and create its parent directory
|
|
7
26
|
*/ export function resolveFilePath(url) {
|
|
8
|
-
|
|
9
|
-
// Handle ~ for home directory
|
|
10
|
-
if (url.host === '~') {
|
|
11
|
-
filePath = path.join(os.homedir(), decodeURIComponent(filePath.slice(1)));
|
|
12
|
-
} else if (url.host === '.') {
|
|
13
|
-
filePath = path.join(process.cwd(), decodeURIComponent(filePath.slice(1)));
|
|
14
|
-
} else {
|
|
15
|
-
// File-backed adapters such as duckdb use the same native path conversion.
|
|
16
|
-
filePath = fileURLToPath(new URL(`file://${url.host}${url.pathname}`));
|
|
17
|
-
}
|
|
18
|
-
// Ensure directory exists
|
|
27
|
+
const filePath = toFilePath(url);
|
|
19
28
|
fs.mkdirSync(path.dirname(filePath), {
|
|
20
29
|
recursive: true
|
|
21
30
|
});
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/utils.ts"],"sourcesContent":["import * as fs from 'node:fs';\nimport * as os from 'node:os';\nimport * as path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/utils.ts"],"sourcesContent":["import * as fs from 'node:fs';\nimport * as os from 'node:os';\nimport * as path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n// `scheme://C:/x` parses the drive letter as a host and drops the colon, so it is rewritten to `scheme:///C:/x` first.\nconst DRIVE_AS_HOST = /^([a-zA-Z][a-zA-Z0-9+.-]*:)\\/\\/([a-zA-Z]:[/\\\\])/;\n\n/**\n * Parse a store URI, keeping a Windows drive letter written after `//` in the path\n */\nexport function parseUri(uri: string): URL {\n return new URL(uri.replace(DRIVE_AS_HOST, '$1///$2'));\n}\n\nexport interface ToFilePathOptions {\n windows?: boolean;\n homedir?: string;\n cwd?: string;\n}\n\n/**\n * Convert a file-backed store URL to a native path, handling ~ and . prefixes (no filesystem access)\n */\nexport function toFilePath(url: URL, options: ToFilePathOptions = {}): string {\n const windows = options.windows ?? process.platform === 'win32';\n const p = windows ? path.win32 : path.posix;\n if (url.host === '~') return p.join(options.homedir ?? os.homedir(), decodeURIComponent(url.pathname.slice(1)));\n if (url.host === '.') return p.join(options.cwd ?? process.cwd(), decodeURIComponent(url.pathname.slice(1)));\n return fileURLToPath(new URL(`file://${url.host}${url.pathname}`), { windows });\n}\n\n/**\n * Resolve file path from URL and create its parent directory\n */\nexport function resolveFilePath(url: URL): string {\n const filePath = toFilePath(url);\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n return filePath;\n}\n\n/**\n * Parse URL search params into options object with type conversion\n */\nexport function parseUriOptions(url: URL): Record<string, unknown> {\n const options: Record<string, unknown> = {};\n\n for (const [key, value] of url.searchParams) {\n // Auto-convert types\n if (value === 'true') options[key] = true;\n else if (value === 'false') options[key] = false;\n else if (/^\\d+$/.test(value)) options[key] = Number.parseInt(value, 10);\n else if (/^\\d+\\.\\d+$/.test(value)) options[key] = Number.parseFloat(value);\n else options[key] = value;\n }\n\n return options;\n}\n"],"names":["fs","os","path","fileURLToPath","DRIVE_AS_HOST","parseUri","uri","URL","replace","toFilePath","url","options","windows","process","platform","p","win32","posix","host","join","homedir","decodeURIComponent","pathname","slice","cwd","resolveFilePath","filePath","mkdirSync","dirname","recursive","parseUriOptions","key","value","searchParams","test","Number","parseInt","parseFloat"],"mappings":"AAAA,YAAYA,QAAQ,UAAU;AAC9B,YAAYC,QAAQ,UAAU;AAC9B,YAAYC,UAAU,YAAY;AAClC,SAASC,aAAa,QAAQ,WAAW;AAEzC,uHAAuH;AACvH,MAAMC,gBAAgB;AAEtB;;CAEC,GACD,OAAO,SAASC,SAASC,GAAW;IAClC,OAAO,IAAIC,IAAID,IAAIE,OAAO,CAACJ,eAAe;AAC5C;AAQA;;CAEC,GACD,OAAO,SAASK,WAAWC,GAAQ,EAAEC,UAA6B,CAAC,CAAC;QAClDA,kBAEoBA,kBACAA;IAHpC,MAAMC,WAAUD,mBAAAA,QAAQC,OAAO,cAAfD,8BAAAA,mBAAmBE,QAAQC,QAAQ,KAAK;IACxD,MAAMC,IAAIH,UAAUV,KAAKc,KAAK,GAAGd,KAAKe,KAAK;IAC3C,IAAIP,IAAIQ,IAAI,KAAK,KAAK,OAAOH,EAAEI,IAAI,EAACR,mBAAAA,QAAQS,OAAO,cAAfT,8BAAAA,mBAAmBV,GAAGmB,OAAO,IAAIC,mBAAmBX,IAAIY,QAAQ,CAACC,KAAK,CAAC;IAC3G,IAAIb,IAAIQ,IAAI,KAAK,KAAK,OAAOH,EAAEI,IAAI,EAACR,eAAAA,QAAQa,GAAG,cAAXb,0BAAAA,eAAeE,QAAQW,GAAG,IAAIH,mBAAmBX,IAAIY,QAAQ,CAACC,KAAK,CAAC;IACxG,OAAOpB,cAAc,IAAII,IAAI,CAAC,OAAO,EAAEG,IAAIQ,IAAI,GAAGR,IAAIY,QAAQ,EAAE,GAAG;QAAEV;IAAQ;AAC/E;AAEA;;CAEC,GACD,OAAO,SAASa,gBAAgBf,GAAQ;IACtC,MAAMgB,WAAWjB,WAAWC;IAC5BV,GAAG2B,SAAS,CAACzB,KAAK0B,OAAO,CAACF,WAAW;QAAEG,WAAW;IAAK;IACvD,OAAOH;AACT;AAEA;;CAEC,GACD,OAAO,SAASI,gBAAgBpB,GAAQ;IACtC,MAAMC,UAAmC,CAAC;IAE1C,KAAK,MAAM,CAACoB,KAAKC,MAAM,IAAItB,IAAIuB,YAAY,CAAE;QAC3C,qBAAqB;QACrB,IAAID,UAAU,QAAQrB,OAAO,CAACoB,IAAI,GAAG;aAChC,IAAIC,UAAU,SAASrB,OAAO,CAACoB,IAAI,GAAG;aACtC,IAAI,QAAQG,IAAI,CAACF,QAAQrB,OAAO,CAACoB,IAAI,GAAGI,OAAOC,QAAQ,CAACJ,OAAO;aAC/D,IAAI,aAAaE,IAAI,CAACF,QAAQrB,OAAO,CAACoB,IAAI,GAAGI,OAAOE,UAAU,CAACL;aAC/DrB,OAAO,CAACoB,IAAI,GAAGC;IACtB;IAEA,OAAOrB;AACT"}
|
package/dist/esm/worker.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { CreateStoreCallback, CreateStoreOptions } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Split code options: Keyv's own keys go to `new Keyv`, the rest to the adapter constructor
|
|
4
|
+
*/
|
|
5
|
+
export declare function splitOptions(merged: Record<string, unknown>): {
|
|
6
|
+
keyvOptions: Record<string, unknown>;
|
|
7
|
+
adapterOptions: Record<string, unknown>;
|
|
8
|
+
};
|
|
2
9
|
/**
|
|
3
10
|
* Core worker function that creates a Keyv store
|
|
4
11
|
*/
|
package/dist/esm/worker.js
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import Keyv from 'keyv';
|
|
2
|
+
import { KEYV_OPTION_KEYS } from './constants.js';
|
|
2
3
|
import loadAdapter from './loadAdapter.js';
|
|
3
4
|
import { getAdapterConfig } from './registry.js';
|
|
4
|
-
import { parseUriOptions } from './utils.js';
|
|
5
|
+
import { parseUri, parseUriOptions } from './utils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Split code options: Keyv's own keys go to `new Keyv`, the rest to the adapter constructor
|
|
8
|
+
*/ export function splitOptions(merged) {
|
|
9
|
+
const keyvOptions = {};
|
|
10
|
+
const adapterOptions = {};
|
|
11
|
+
for (const key of Object.keys(merged)){
|
|
12
|
+
if (key === 'store') continue;
|
|
13
|
+
(KEYV_OPTION_KEYS.has(key) ? keyvOptions : adapterOptions)[key] = merged[key];
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
keyvOptions,
|
|
17
|
+
adapterOptions
|
|
18
|
+
};
|
|
19
|
+
}
|
|
5
20
|
/**
|
|
6
21
|
* Core worker function that creates a Keyv store
|
|
7
22
|
*/ export default function worker(uri, options, callback) {
|
|
@@ -20,7 +35,7 @@ import { parseUriOptions } from './utils.js';
|
|
|
20
35
|
// Parse URI
|
|
21
36
|
let url;
|
|
22
37
|
try {
|
|
23
|
-
url =
|
|
38
|
+
url = parseUri(uri);
|
|
24
39
|
} catch (_err) {
|
|
25
40
|
callback(new Error(`Invalid URI: ${uri}`));
|
|
26
41
|
return;
|
|
@@ -49,29 +64,18 @@ import { parseUriOptions } from './utils.js';
|
|
|
49
64
|
try {
|
|
50
65
|
var _ref;
|
|
51
66
|
var _config_optionsMapper;
|
|
52
|
-
//
|
|
67
|
+
// Code options split between Keyv and the adapter; query parameters and the URI path mapper go to the adapter only. Code wins.
|
|
68
|
+
const { keyvOptions, adapterOptions: codeAdapterOptions } = splitOptions(options);
|
|
53
69
|
const adapterOptions = {
|
|
54
70
|
...parseUriOptions(url),
|
|
55
71
|
...(_ref = (_config_optionsMapper = config.optionsMapper) === null || _config_optionsMapper === void 0 ? void 0 : _config_optionsMapper.call(config, url)) !== null && _ref !== void 0 ? _ref : {},
|
|
56
|
-
...
|
|
72
|
+
...codeAdapterOptions
|
|
57
73
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
store: storeInstance,
|
|
64
|
-
...options
|
|
65
|
-
});
|
|
66
|
-
callback(null, keyv);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const storeInstance = new AdapterClass(cleanAdapterOptions);
|
|
70
|
-
const keyv = new Keyv({
|
|
71
|
-
store: storeInstance,
|
|
72
|
-
...options
|
|
73
|
-
});
|
|
74
|
-
callback(null, keyv);
|
|
74
|
+
const storeInstance = config.mode === 'string' ? new AdapterClass(uri, adapterOptions) : new AdapterClass(adapterOptions);
|
|
75
|
+
callback(null, new Keyv({
|
|
76
|
+
...keyvOptions,
|
|
77
|
+
store: storeInstance
|
|
78
|
+
}));
|
|
75
79
|
} catch (createErr) {
|
|
76
80
|
callback(createErr);
|
|
77
81
|
}
|
package/dist/esm/worker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/worker.ts"],"sourcesContent":["import Keyv from 'keyv';\nimport loadAdapter from './loadAdapter.ts';\nimport { getAdapterConfig } from './registry.ts';\nimport type { CreateStoreCallback, CreateStoreOptions } from './types.ts';\nimport { parseUriOptions } from './utils.ts';\n\n/**\n * Core worker function that creates a Keyv store\n */\nexport default function worker<T>(uri: string, options: CreateStoreOptions, callback: CreateStoreCallback<T>): void {\n // Passthrough: pre-instantiated adapter provided\n if (options.store) {\n try {\n const keyv = new Keyv<T>({ ...options });\n callback(null, keyv);\n } catch (err) {\n callback(err as Error);\n }\n return;\n }\n\n // Parse URI\n let url: URL;\n try {\n url =
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/open-source/keyv/keyv-registry/src/worker.ts"],"sourcesContent":["import Keyv from 'keyv';\nimport { KEYV_OPTION_KEYS } from './constants.ts';\nimport loadAdapter from './loadAdapter.ts';\nimport { getAdapterConfig } from './registry.ts';\nimport type { CreateStoreCallback, CreateStoreOptions } from './types.ts';\nimport { parseUri, parseUriOptions } from './utils.ts';\n\n/**\n * Split code options: Keyv's own keys go to `new Keyv`, the rest to the adapter constructor\n */\nexport function splitOptions(merged: Record<string, unknown>): { keyvOptions: Record<string, unknown>; adapterOptions: Record<string, unknown> } {\n const keyvOptions: Record<string, unknown> = {};\n const adapterOptions: Record<string, unknown> = {};\n for (const key of Object.keys(merged)) {\n if (key === 'store') continue;\n (KEYV_OPTION_KEYS.has(key) ? keyvOptions : adapterOptions)[key] = merged[key];\n }\n return { keyvOptions, adapterOptions };\n}\n\n/**\n * Core worker function that creates a Keyv store\n */\nexport default function worker<T>(uri: string, options: CreateStoreOptions, callback: CreateStoreCallback<T>): void {\n // Passthrough: pre-instantiated adapter provided\n if (options.store) {\n try {\n const keyv = new Keyv<T>({ ...options });\n callback(null, keyv);\n } catch (err) {\n callback(err as Error);\n }\n return;\n }\n\n // Parse URI\n let url: URL;\n try {\n url = parseUri(uri);\n } catch (_err) {\n callback(new Error(`Invalid URI: ${uri}`));\n return;\n }\n\n const config = getAdapterConfig(url.protocol);\n\n if (!config) {\n callback(new Error(`Unknown protocol: ${url.protocol}. Use registerAdapter() to add support.`));\n return;\n }\n\n // Memory store - no package needed\n if (config.package === null) {\n try {\n const keyv = new Keyv<T>({ ...parseUriOptions(url), ...options });\n callback(null, keyv);\n } catch (err) {\n callback(err as Error);\n }\n return;\n }\n\n // Load adapter (install if needed)\n loadAdapter(config.package, config.exportName, (err, AdapterClass) => {\n if (err) return callback(err);\n\n try {\n // Code options split between Keyv and the adapter; query parameters and the URI path mapper go to the adapter only. Code wins.\n const { keyvOptions, adapterOptions: codeAdapterOptions } = splitOptions(options);\n const adapterOptions = {\n ...parseUriOptions(url),\n ...(config.optionsMapper?.(url) ?? {}),\n ...codeAdapterOptions,\n };\n\n const storeInstance = config.mode === 'string' ? new (AdapterClass as new (uri: string, options: Record<string, unknown>) => unknown)(uri, adapterOptions) : new (AdapterClass as new (options: Record<string, unknown>) => unknown)(adapterOptions);\n callback(null, new Keyv<T>({ ...keyvOptions, store: storeInstance }));\n } catch (createErr) {\n callback(createErr as Error);\n }\n });\n}\n"],"names":["Keyv","KEYV_OPTION_KEYS","loadAdapter","getAdapterConfig","parseUri","parseUriOptions","splitOptions","merged","keyvOptions","adapterOptions","key","Object","keys","has","worker","uri","options","callback","store","keyv","err","url","_err","Error","config","protocol","package","exportName","AdapterClass","codeAdapterOptions","optionsMapper","storeInstance","mode","createErr"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,OAAOC,iBAAiB,mBAAmB;AAC3C,SAASC,gBAAgB,QAAQ,gBAAgB;AAEjD,SAASC,QAAQ,EAAEC,eAAe,QAAQ,aAAa;AAEvD;;CAEC,GACD,OAAO,SAASC,aAAaC,MAA+B;IAC1D,MAAMC,cAAuC,CAAC;IAC9C,MAAMC,iBAA0C,CAAC;IACjD,KAAK,MAAMC,OAAOC,OAAOC,IAAI,CAACL,QAAS;QACrC,IAAIG,QAAQ,SAAS;QACpBT,CAAAA,iBAAiBY,GAAG,CAACH,OAAOF,cAAcC,cAAa,CAAE,CAACC,IAAI,GAAGH,MAAM,CAACG,IAAI;IAC/E;IACA,OAAO;QAAEF;QAAaC;IAAe;AACvC;AAEA;;CAEC,GACD,eAAe,SAASK,OAAUC,GAAW,EAAEC,OAA2B,EAAEC,QAAgC;IAC1G,iDAAiD;IACjD,IAAID,QAAQE,KAAK,EAAE;QACjB,IAAI;YACF,MAAMC,OAAO,IAAInB,KAAQ;gBAAE,GAAGgB,OAAO;YAAC;YACtCC,SAAS,MAAME;QACjB,EAAE,OAAOC,KAAK;YACZH,SAASG;QACX;QACA;IACF;IAEA,YAAY;IACZ,IAAIC;IACJ,IAAI;QACFA,MAAMjB,SAASW;IACjB,EAAE,OAAOO,MAAM;QACbL,SAAS,IAAIM,MAAM,CAAC,aAAa,EAAER,KAAK;QACxC;IACF;IAEA,MAAMS,SAASrB,iBAAiBkB,IAAII,QAAQ;IAE5C,IAAI,CAACD,QAAQ;QACXP,SAAS,IAAIM,MAAM,CAAC,kBAAkB,EAAEF,IAAII,QAAQ,CAAC,uCAAuC,CAAC;QAC7F;IACF;IAEA,mCAAmC;IACnC,IAAID,OAAOE,OAAO,KAAK,MAAM;QAC3B,IAAI;YACF,MAAMP,OAAO,IAAInB,KAAQ;gBAAE,GAAGK,gBAAgBgB,IAAI;gBAAE,GAAGL,OAAO;YAAC;YAC/DC,SAAS,MAAME;QACjB,EAAE,OAAOC,KAAK;YACZH,SAASG;QACX;QACA;IACF;IAEA,mCAAmC;IACnClB,YAAYsB,OAAOE,OAAO,EAAEF,OAAOG,UAAU,EAAE,CAACP,KAAKQ;QACnD,IAAIR,KAAK,OAAOH,SAASG;QAEzB,IAAI;;gBAKII;YAJN,+HAA+H;YAC/H,MAAM,EAAEhB,WAAW,EAAEC,gBAAgBoB,kBAAkB,EAAE,GAAGvB,aAAaU;YACzE,MAAMP,iBAAiB;gBACrB,GAAGJ,gBAAgBgB,IAAI;4BACnBG,wBAAAA,OAAOM,aAAa,cAApBN,4CAAAA,2BAAAA,QAAuBH,2CAAQ,CAAC,CAApC;gBACA,GAAGQ,kBAAkB;YACvB;YAEA,MAAME,gBAAgBP,OAAOQ,IAAI,KAAK,WAAW,IAAKJ,aAAgFb,KAAKN,kBAAkB,IAAKmB,aAAmEnB;YACrOQ,SAAS,MAAM,IAAIjB,KAAQ;gBAAE,GAAGQ,WAAW;gBAAEU,OAAOa;YAAc;QACpE,EAAE,OAAOE,WAAW;YAClBhB,SAASgB;QACX;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keyv-registry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Protocol-based Keyv adapter registry",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"keyv",
|
|
@@ -44,19 +44,21 @@
|
|
|
44
44
|
"version": "tsds version"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"keyv": "^
|
|
47
|
+
"keyv": "^6.1.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@keyv/redis": "~
|
|
50
|
+
"@keyv/redis": "~6.1.0",
|
|
51
|
+
"@keyv/sqlite": "~6.1.0",
|
|
51
52
|
"@types/mocha": "*",
|
|
52
|
-
"@types/node": "
|
|
53
|
+
"@types/node": "^22",
|
|
53
54
|
"fs-remove-compat": "^1.0.4",
|
|
55
|
+
"keyv-duckdb": "^0.2.0",
|
|
54
56
|
"keyv-file": "*",
|
|
55
57
|
"node-version-use": "*",
|
|
56
58
|
"ts-dev-stack": "*",
|
|
57
59
|
"tsds-config": "*"
|
|
58
60
|
},
|
|
59
61
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
62
|
+
"node": ">=22.19.0"
|
|
61
63
|
}
|
|
62
64
|
}
|