@xyo-network/schema-cache 6.1.0 → 6.1.1
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/dist/neutral/Debounce.d.ts.map +1 -1
- package/dist/neutral/SchemaCache.d.ts +14 -1
- package/dist/neutral/SchemaCache.d.ts.map +1 -1
- package/dist/neutral/SchemaNameToValidatorMap.d.ts.map +1 -1
- package/dist/neutral/index.mjs +29 -4
- package/dist/neutral/index.mjs.map +2 -2
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Debounce.d.ts","sourceRoot":"","sources":["../../src/Debounce.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ,CAAC,IAAI,GAAG,MAAM;IACjC,OAAO,CAAC,GAAG,CAA0B;IAE/B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS;
|
|
1
|
+
{"version":3,"file":"Debounce.d.ts","sourceRoot":"","sources":["../../src/Debounce.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ,CAAC,IAAI,GAAG,MAAM;IACjC,OAAO,CAAC,GAAG,CAA0B;IAE/B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS;CAiBpE"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { SchemaResolution, SchemaResolutionSource } from '@xyo-network/domain-payload-plugin';
|
|
1
2
|
import type { FetchedPayload } from '@xyo-network/huri';
|
|
2
3
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin';
|
|
3
4
|
import type { SchemaNameToValidatorMap } from './SchemaNameToValidatorMap.ts';
|
|
4
|
-
export
|
|
5
|
+
export interface SchemaCacheEntry extends FetchedPayload<SchemaPayload> {
|
|
6
|
+
/** Provenance of the schema definition when resolved via the domain schema authority */
|
|
7
|
+
source?: SchemaResolutionSource;
|
|
8
|
+
}
|
|
5
9
|
export declare class SchemaCache<T extends SchemaNameToValidatorMap = SchemaNameToValidatorMap> {
|
|
6
10
|
/**
|
|
7
11
|
* Object representing `null` since LRU Cache types
|
|
@@ -12,6 +16,7 @@ export declare class SchemaCache<T extends SchemaNameToValidatorMap = SchemaName
|
|
|
12
16
|
onSchemaCached?: (name: string, entry: SchemaCacheEntry) => void;
|
|
13
17
|
proxy?: string;
|
|
14
18
|
private _cache;
|
|
19
|
+
private _resolutions;
|
|
15
20
|
private _validators;
|
|
16
21
|
private getDebounce;
|
|
17
22
|
private constructor();
|
|
@@ -23,6 +28,14 @@ export declare class SchemaCache<T extends SchemaNameToValidatorMap = SchemaName
|
|
|
23
28
|
*/
|
|
24
29
|
get validators(): T;
|
|
25
30
|
get(schema?: string): Promise<SchemaCacheEntry | undefined | null>;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve a schema name to its domain-published authoritative definition (SPEC.md in
|
|
33
|
+
* @xyo-network/domain-payload-plugin), with provenance and a richer status than get():
|
|
34
|
+
* 'resolved' | 'not-published' | 'unreachable'. Resolved definitions are cached and
|
|
35
|
+
* their validators compiled, exactly as with get(). 'unreachable' results are
|
|
36
|
+
* retryable: they are not cached as permanent negatives.
|
|
37
|
+
*/
|
|
38
|
+
resolve(schema?: string): Promise<SchemaResolution | undefined>;
|
|
26
39
|
private cacheSchemaIfValid;
|
|
27
40
|
private cacheSchemas;
|
|
28
41
|
private fetchSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaCache.d.ts","sourceRoot":"","sources":["../../src/SchemaCache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaCache.d.ts","sourceRoot":"","sources":["../../src/SchemaCache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAElG,OAAO,KAA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
+
{"version":3,"file":"SchemaNameToValidatorMap.d.ts","sourceRoot":"","sources":["../../src/SchemaNameToValidatorMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,4BAA4B,CAAA;AAGxE;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAA;AAE7F;;GAEG;AACH,MAAM,WAAW,wBAAwB;CAKxC"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var Debounce = class {
|
|
|
14
14
|
this.map.set(key, 1);
|
|
15
15
|
return await closure();
|
|
16
16
|
} finally {
|
|
17
|
-
this.map.
|
|
17
|
+
this.map.delete(key);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
isDefined as isDefined2,
|
|
27
27
|
isString
|
|
28
28
|
} from "@xylabs/sdk-js";
|
|
29
|
-
import { DomainPayloadWrapper } from "@xyo-network/domain-payload-plugin";
|
|
29
|
+
import { DomainPayloadWrapper, DomainSchemaResolver } from "@xyo-network/domain-payload-plugin";
|
|
30
30
|
import { SchemaSchema } from "@xyo-network/schema-payload-plugin";
|
|
31
31
|
import { Ajv } from "ajv";
|
|
32
32
|
|
|
@@ -76,6 +76,7 @@ var SchemaCache = class _SchemaCache {
|
|
|
76
76
|
onSchemaCached;
|
|
77
77
|
proxy;
|
|
78
78
|
_cache = new TtlLruCache({ max: 500, ttl: 1e3 * 60 * 5 });
|
|
79
|
+
_resolutions = new TtlLruCache({ max: 500, ttl: 1e3 * 60 * 5 });
|
|
79
80
|
_validators = {};
|
|
80
81
|
// prevents double discovery
|
|
81
82
|
getDebounce = new Debounce();
|
|
@@ -106,6 +107,27 @@ var SchemaCache = class _SchemaCache {
|
|
|
106
107
|
}
|
|
107
108
|
return void 0;
|
|
108
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Resolve a schema name to its domain-published authoritative definition (SPEC.md in
|
|
112
|
+
* @xyo-network/domain-payload-plugin), with provenance and a richer status than get():
|
|
113
|
+
* 'resolved' | 'not-published' | 'unreachable'. Resolved definitions are cached and
|
|
114
|
+
* their validators compiled, exactly as with get(). 'unreachable' results are
|
|
115
|
+
* retryable: they are not cached as permanent negatives.
|
|
116
|
+
*/
|
|
117
|
+
async resolve(schema) {
|
|
118
|
+
if (!isString(schema)) return void 0;
|
|
119
|
+
await this.getDebounce.one(`resolve:${schema}`, async () => {
|
|
120
|
+
const existing = this._resolutions.get(schema);
|
|
121
|
+
if (existing === void 0 || existing.status === "unreachable") {
|
|
122
|
+
const resolution = await new DomainSchemaResolver().resolve(schema, { proxy: this.proxy });
|
|
123
|
+
this._resolutions.set(schema, resolution);
|
|
124
|
+
if (resolution.status === "resolved" && isDefined2(resolution.payload)) {
|
|
125
|
+
this.cacheSchemaIfValid({ payload: resolution.payload, source: resolution.source });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return this._resolutions.get(schema);
|
|
130
|
+
}
|
|
109
131
|
cacheSchemaIfValid(entry) {
|
|
110
132
|
if (isDefined2(entry?.payload?.definition)) {
|
|
111
133
|
const ajv = new Ajv({ strict: false });
|
|
@@ -126,14 +148,17 @@ var SchemaCache = class _SchemaCache {
|
|
|
126
148
|
}
|
|
127
149
|
async fetchSchema(schema) {
|
|
128
150
|
try {
|
|
151
|
+
const resolution = await this.resolve(schema);
|
|
152
|
+
if (resolution?.status === "resolved") {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
129
155
|
const domain = await DomainPayloadWrapper.discover(schema, this.proxy);
|
|
130
156
|
await domain?.fetch();
|
|
131
157
|
this.cacheSchemas(domain?.aliases);
|
|
132
|
-
if (this._cache.get(schema) === void 0) {
|
|
158
|
+
if (this._cache.get(schema) === void 0 && resolution?.status !== "unreachable") {
|
|
133
159
|
this._cache.set(schema, _SchemaCache.NULL);
|
|
134
160
|
}
|
|
135
161
|
} catch (error) {
|
|
136
|
-
this._cache.set(schema, _SchemaCache.NULL);
|
|
137
162
|
if (error instanceof FetchClientError) {
|
|
138
163
|
console.log(`Fetch Url: ${error.config.url}`);
|
|
139
164
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Debounce.ts", "../../src/SchemaCache.ts", "../../src/TtlLruCache.ts"],
|
|
4
|
-
"sourcesContent": ["import { delay, isDefined } from '@xylabs/sdk-js'\n\nexport class Debounce<TKey = string> {\n private map = new Map<TKey, number>()\n\n async one<T>(key: TKey, closure: () => Promise<T>, timeout = 10_000) {\n const startTime = Date.now()\n while (isDefined(this.map.get(key))) {\n await delay(100)\n if (Date.now() - startTime > timeout) {\n throw new Error(`Debounce timed out [${String(key)}]`)\n }\n }\n try {\n this.map.set(key, 1)\n return await closure()\n } finally {\n this.map.
|
|
5
|
-
"mappings": ";AAAA,SAAS,OAAO,iBAAiB;AAE1B,IAAM,WAAN,MAA8B;AAAA,EAC3B,MAAM,oBAAI,IAAkB;AAAA,EAEpC,MAAM,IAAO,KAAW,SAA2B,UAAU,KAAQ;AACnE,UAAM,YAAY,KAAK,IAAI;AAC3B,WAAO,UAAU,KAAK,IAAI,IAAI,GAAG,CAAC,GAAG;AACnC,YAAM,MAAM,GAAG;AACf,UAAI,KAAK,IAAI,IAAI,YAAY,SAAS;AACpC,cAAM,IAAI,MAAM,uBAAuB,OAAO,GAAG,CAAC,GAAG;AAAA,MACvD;AAAA,IACF;AACA,QAAI;AACF,WAAK,IAAI,IAAI,KAAK,CAAC;AACnB,aAAO,MAAM,QAAQ;AAAA,IACvB,UAAE;
|
|
4
|
+
"sourcesContent": ["import { delay, isDefined } from '@xylabs/sdk-js'\n\nexport class Debounce<TKey = string> {\n private map = new Map<TKey, number>()\n\n async one<T>(key: TKey, closure: () => Promise<T>, timeout = 10_000) {\n const startTime = Date.now()\n while (isDefined(this.map.get(key))) {\n await delay(100)\n if (Date.now() - startTime > timeout) {\n throw new Error(`Debounce timed out [${String(key)}]`)\n }\n }\n try {\n this.map.set(key, 1)\n return await closure()\n } finally {\n // delete (not set 0): isDefined(0) is true, so a leftover 0 would make every\n // subsequent call with this key spin until timeout\n this.map.delete(key)\n }\n }\n}\n", "import {\n FetchClientError,\n handleError, isDefined, isString,\n} from '@xylabs/sdk-js'\nimport type { SchemaResolution, SchemaResolutionSource } from '@xyo-network/domain-payload-plugin'\nimport { DomainPayloadWrapper, DomainSchemaResolver } from '@xyo-network/domain-payload-plugin'\nimport type { FetchedPayload } from '@xyo-network/huri'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { SchemaObject } from 'ajv'\nimport { Ajv } from 'ajv'\n\nimport { Debounce } from './Debounce.ts'\nimport type { SchemaNameToValidatorMap } from './SchemaNameToValidatorMap.ts'\nimport { TtlLruCache } from './TtlLruCache.ts'\n\nconst getSchemaNameFromSchema = (schema: SchemaObject) => {\n if (isString(schema.$id)) {\n return schema.$id\n }\n}\n\nexport interface SchemaCacheEntry extends FetchedPayload<SchemaPayload> {\n /** Provenance of the schema definition when resolved via the domain schema authority */\n source?: SchemaResolutionSource\n}\n\nexport class SchemaCache<T extends SchemaNameToValidatorMap = SchemaNameToValidatorMap> {\n /**\n * Object representing `null` since LRU Cache types\n * only allow for types that derive from object\n */\n protected static readonly NULL: SchemaCacheEntry = { payload: { definition: {}, schema: SchemaSchema } }\n\n private static _instance?: SchemaCache\n\n onSchemaCached?: (name: string, entry: SchemaCacheEntry) => void\n proxy?: string\n\n private _cache = new TtlLruCache<string, SchemaCacheEntry>({ max: 500, ttl: 1000 * 60 * 5 })\n private _resolutions = new TtlLruCache<string, SchemaResolution>({ max: 500, ttl: 1000 * 60 * 5 })\n private _validators: T = {} as T\n\n // prevents double discovery\n private getDebounce = new Debounce()\n\n private constructor(proxy?: string) {\n this.proxy = proxy\n }\n\n static get instance() {\n this._instance ??= new SchemaCache()\n return this._instance\n }\n\n /**\n * A map of cached schema (by name) to payload validators for the schema. A schema\n * must be cached via `get('schema.name')` before it's validator can be used as\n * they are compiled dynamically at runtime upon retrieval.\n */\n get validators(): T {\n return this._validators\n }\n\n async get(schema?: string): Promise<SchemaCacheEntry | undefined | null> {\n if (isString(schema)) {\n await this.getDebounce.one(schema, async () => {\n // If we've never looked for it before, it will be undefined\n if (this._cache.get(schema) === undefined) {\n await this.fetchSchema(schema)\n }\n })\n const value = this._cache.get(schema)\n return value === SchemaCache.NULL ? null : value\n }\n return undefined\n }\n\n /**\n * Resolve a schema name to its domain-published authoritative definition (SPEC.md in\n * @xyo-network/domain-payload-plugin), with provenance and a richer status than get():\n * 'resolved' | 'not-published' | 'unreachable'. Resolved definitions are cached and\n * their validators compiled, exactly as with get(). 'unreachable' results are\n * retryable: they are not cached as permanent negatives.\n */\n async resolve(schema?: string): Promise<SchemaResolution | undefined> {\n if (!isString(schema)) return undefined\n await this.getDebounce.one(`resolve:${schema}`, async () => {\n const existing = this._resolutions.get(schema)\n if (existing === undefined || existing.status === 'unreachable') {\n const resolution = await new DomainSchemaResolver().resolve(schema, { proxy: this.proxy })\n this._resolutions.set(schema, resolution)\n if (resolution.status === 'resolved' && isDefined(resolution.payload)) {\n this.cacheSchemaIfValid({ payload: resolution.payload, source: resolution.source })\n }\n }\n })\n return this._resolutions.get(schema)\n }\n\n private cacheSchemaIfValid(entry: SchemaCacheEntry) {\n // only store them if they match the schema root\n if (isDefined(entry?.payload?.definition)) {\n const ajv = new Ajv({ strict: false })\n // check if it is a valid schema def\n const validator = ajv.compile(entry.payload.definition)\n const schemaName = getSchemaNameFromSchema(entry.payload.definition)\n if (isString(schemaName)) {\n this._cache.set(schemaName, entry)\n const key = schemaName as keyof T\n this._validators[key] = validator as unknown as T[keyof T]\n this.onSchemaCached?.(schemaName, entry)\n }\n }\n }\n\n private cacheSchemas(aliasEntries?: FetchedPayload[] | null) {\n for (const entry of aliasEntries?.filter(entry => entry.payload.schema === SchemaSchema) ?? []) {\n this.cacheSchemaIfValid(entry as SchemaCacheEntry)\n }\n }\n\n private async fetchSchema(schema: string) {\n try {\n // domain schema authority resolution first (DNS records, xyo.json, xyo. subdomain)\n const resolution = await this.resolve(schema)\n if (resolution?.status === 'resolved') {\n return\n }\n\n // legacy discovery fallback; also opportunistically warms sibling schemas\n const domain = await DomainPayloadWrapper.discover(schema, this.proxy)\n await domain?.fetch()\n this.cacheSchemas(domain?.aliases)\n\n // if it is still undefined, mark it as null (not found) \u2014 but never cache transport\n // failures as permanent negatives; 'unreachable' stays undefined so it is retried\n if (this._cache.get(schema) === undefined && resolution?.status !== 'unreachable') {\n this._cache.set(schema, SchemaCache.NULL)\n }\n } catch (error) {\n // transport failure: leave the entry undefined so a future get() retries\n if (error instanceof FetchClientError) {\n console.log(`Fetch Url: ${error.config.url}`)\n }\n handleError(error, (error) => {\n console.error(`fetchSchema threw: ${error.message}`)\n })\n }\n }\n}\n", "export interface TtlLruCacheOpts {\n max: number\n ttl: number\n}\n\nexport class TtlLruCache<K, V> {\n private readonly map = new Map<K, { expires: number; value: V }>()\n private readonly max: number\n private readonly ttl: number\n\n constructor(opts: TtlLruCacheOpts) {\n this.max = opts.max\n this.ttl = opts.ttl\n }\n\n get(key: K): V | undefined {\n const entry = this.map.get(key)\n if (entry === undefined) return undefined\n if (entry.expires <= Date.now()) {\n this.map.delete(key)\n return undefined\n }\n this.map.delete(key)\n this.map.set(key, entry)\n return entry.value\n }\n\n set(key: K, value: V): void {\n if (this.map.has(key)) this.map.delete(key)\n this.map.set(key, { value, expires: Date.now() + this.ttl })\n if (this.map.size > this.max) {\n const oldest = this.map.keys().next().value\n if (oldest !== undefined) this.map.delete(oldest)\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,OAAO,iBAAiB;AAE1B,IAAM,WAAN,MAA8B;AA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;AAEF,YAAM,aAAa,MAAM,KAAK,QAAQ,MAAM;AAC5C,UAAI,YAAY,WAAW,YAAY;AACrC;AAAA,MACF;AAGA,YAAM,SAAS,MAAM,qBAAqB,SAAS,QAAQ,KAAK,KAAK;AACrE,YAAM,QAAQ,MAAM;AACpB,WAAK,aAAa,QAAQ,OAAO;AAIjC,UAAI,KAAK,OAAO,IAAI,MAAM,MAAM,UAAa,YAAY,WAAW,eAAe;AACjF,aAAK,OAAO,IAAI,QAAQ,aAAY,IAAI;AAAA,MAC1C;AAAA,IACF,SAAS,OAAO;AAEd,UAAI,iBAAiB,kBAAkB;AACrC,gBAAQ,IAAI,cAAc,MAAM,OAAO,GAAG,EAAE;AAAA,MAC9C;AACA,kBAAY,OAAO,CAACC,WAAU;AAC5B,gBAAQ,MAAM,sBAAsBA,OAAM,OAAO,EAAE;AAAA,MACrD,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["isDefined", "isDefined", "entry", "error"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/schema-cache",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/domain-payload-plugin": "~6.1.
|
|
38
|
-
"@xyo-network/huri": "~6.1.
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/payload-
|
|
37
|
+
"@xyo-network/domain-payload-plugin": "~6.1.1",
|
|
38
|
+
"@xyo-network/huri": "~6.1.1",
|
|
39
|
+
"@xyo-network/payload-model": "~6.1.1",
|
|
40
|
+
"@xyo-network/schema-payload-plugin": "~6.1.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@bitauth/libauth": "~3.0.0",
|
|
44
44
|
"@opentelemetry/api": "^1.9.1",
|
|
45
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
45
|
+
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
46
46
|
"@scure/base": "~2.2.0",
|
|
47
|
-
"@xylabs/sdk-js": "^6.1.
|
|
48
|
-
"@xylabs/threads": "^6.1.
|
|
47
|
+
"@xylabs/sdk-js": "^6.1.1",
|
|
48
|
+
"@xylabs/threads": "^6.1.1",
|
|
49
49
|
"@xylabs/toolchain": "~8.1.20",
|
|
50
50
|
"@xylabs/tsconfig": "~8.1.20",
|
|
51
51
|
"@xylabs/tsconfig-dom": "~8.1.20",
|
|
52
|
-
"@xylabs/vitest-extended": "^6.1.
|
|
52
|
+
"@xylabs/vitest-extended": "^6.1.1",
|
|
53
53
|
"ajv": "^8.20.0",
|
|
54
54
|
"async-mutex": "^0.5.0",
|
|
55
55
|
"debug": "^4.4.3",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"vite": "^8.0.16",
|
|
62
62
|
"vitest": "~4.1.8",
|
|
63
63
|
"zod": "^4.4.3",
|
|
64
|
-
"@xyo-network/
|
|
65
|
-
"@xyo-network/
|
|
64
|
+
"@xyo-network/payload-builder": "~6.1.1",
|
|
65
|
+
"@xyo-network/network": "~6.1.1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@bitauth/libauth": "~3.0",
|