@seedprotocol/query 0.7.1 → 0.7.2
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 +14 -5
- package/dist/{FileCache-BZ2cHsU3.js → FileCache-CQuj0MeF.js} +21 -16
- package/dist/FileCache-CQuj0MeF.js.map +1 -0
- package/dist/api.d.ts +5 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/assembleSeeds.d.ts +21 -0
- package/dist/assembleSeeds.d.ts.map +1 -1
- package/dist/cache/CacheManager.d.ts +12 -14
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/FileCache.d.ts +4 -2
- package/dist/cache/FileCache.d.ts.map +1 -1
- package/dist/cache/MemoryCache.d.ts +12 -6
- package/dist/cache/MemoryCache.d.ts.map +1 -1
- package/dist/cache/changes.d.ts +28 -0
- package/dist/cache/changes.d.ts.map +1 -0
- package/dist/cache/config.d.ts +9 -0
- package/dist/cache/config.d.ts.map +1 -1
- package/dist/cache/etag.d.ts +7 -4
- package/dist/cache/etag.d.ts.map +1 -1
- package/dist/cache/freeze.d.ts +7 -0
- package/dist/cache/freeze.d.ts.map +1 -0
- package/dist/cache/types.d.ts +34 -7
- package/dist/cache/types.d.ts.map +1 -1
- package/dist/hydrateArweaveRichText.d.ts +3 -0
- package/dist/hydrateArweaveRichText.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.node.js +4 -4
- package/dist/index.node.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/source/remote.d.ts.map +1 -1
- package/dist/source/types.d.ts +19 -1
- package/dist/source/types.d.ts.map +1 -1
- package/dist/src-CBgjwvGT.js +1207 -0
- package/dist/src-CBgjwvGT.js.map +1 -0
- package/dist/types-DHRoT30t.js.map +1 -1
- package/dist/types.d.ts +30 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -3
- package/dist/FileCache-BZ2cHsU3.js.map +0 -1
- package/dist/src-BV0eFNvW.js +0 -993
- package/dist/src-BV0eFNvW.js.map +0 -1
package/dist/index.node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as e, i as t, o as n, r as ee, t as r } from "./types-DHRoT30t.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as $ } from "./FileCache-
|
|
2
|
+
import { $ as i, A as a, B as o, C as s, D as c, E as l, F as u, G as d, H as f, I as p, J as m, K as h, L as g, M as _, N as v, O as y, P as b, Q as x, R as S, S as C, T as w, U as T, V as E, W as D, X as O, Y as k, Z as te, _ as A, a as j, b as M, c as N, d as P, f as F, g as I, h as L, i as R, j as z, k as B, l as V, m as H, n as U, o as W, p as G, q as K, r as q, s as J, t as Y, u as X, v as Z, w as Q, x as ne, y as re, z as ie } from "./src-CBgjwvGT.js";
|
|
3
|
+
import { t as $ } from "./FileCache-CQuj0MeF.js";
|
|
4
4
|
//#region src/index.node.ts
|
|
5
|
-
|
|
5
|
+
L((e) => new $(e));
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { H as CacheManager, ee as DEFAULT_ARWEAVE_HOST, b as FEED_RICH_BODY_STORAGE_SCHEMAS, $ as FileCache, u as RICH_BODY_STORAGE_SCHEMAS, Z as applyChangelogFilters, A as assembleSeedChangelog, Q as assembleSeeds, r as buildAssembleOptionsKey, re as buildFlatSnapshotFromProperties, M as changelogValuesEqual, J as clearLocalQuerySource, P as createQueryCacheManager, w as createRemoteQueryDataSource, ne as decodePropertyAttestation, C as diffPropertyAttestations, s as diffVersionSnapshots, m as enrichImageSeedClone, k as enrichImageSeedCloneForFeed, p as feedRichBodyModelPriority, i as getArweaveUrlForTransaction, g as getFeedFieldStorageModels, S as getFeedListElementStorageModels, ie as getFieldStorageModels, o as getListElementStorageModels, F as getQueryCacheManager, N as getRegisteredLocalQuerySource, l as getRemoteQueryDataSource, Y as getSeed, V as hasLocalQuerySource, a as hydrateArweaveRichTextInFeedItems, z as hydrateArweaveRichTextInItems, t as initializeQueryPlatform, _ as isArweaveTransactionGatewayUrl, E as isFeedRichBodyStorageSchema, e as isQueryPlatformInitialized, f as isRichBodyStorageSchema, I as loadQueryCacheConfig, j as normalizeSourceMode, U as normalizeUidPrefix, y as parseEasPropertyMetadata, B as parseEasPropertyMetadataForFeed, c as parseEasRelationPropertyName, O as publicListRelationPropertyKey, q as queryBySchema, R as queryBySchemaForMonth, X as registerLocalQuerySource, v as resetArweaveBodyCache, G as resetQueryCacheManager, W as resolveQuerySource, T as richBodyModelPriority, D as setFeedFieldStorageModel, d as setFeedListElementStorageModels, h as setFieldStorageModel, K as setListElementStorageModels, te as stripListRelationStorageAliasesForPublicKey, n as teardownQueryPlatform, x as tryCoerceJsonStringArray };
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=index.node.js.map
|
package/dist/index.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.js","names":["isQueryPlatformInitialized","initializeQueryPlatform","teardownQueryPlatform","DEFAULT_ARWEAVE_HOST","buildAssembleOptionsKey","
|
|
1
|
+
{"version":3,"file":"index.node.js","names":["isQueryPlatformInitialized","initializeQueryPlatform","teardownQueryPlatform","DEFAULT_ARWEAVE_HOST","buildAssembleOptionsKey","getArweaveUrlForTransaction","hydrateArweaveRichTextInFeedItems","getListElementStorageModels","diffVersionSnapshots","parseEasRelationPropertyName","getRemoteQueryDataSource","RICH_BODY_STORAGE_SCHEMAS","setFeedListElementStorageModels","isRichBodyStorageSchema","feedRichBodyModelPriority","enrichImageSeedClone","setFieldStorageModel","getFeedFieldStorageModels","isArweaveTransactionGatewayUrl","resetArweaveBodyCache","parseEasPropertyMetadata","FEED_RICH_BODY_STORAGE_SCHEMAS","tryCoerceJsonStringArray","getFeedListElementStorageModels","diffPropertyAttestations","createRemoteQueryDataSource","richBodyModelPriority","isFeedRichBodyStorageSchema","setFeedFieldStorageModel","publicListRelationPropertyKey","enrichImageSeedCloneForFeed","stripListRelationStorageAliasesForPublicKey","assembleSeedChangelog","normalizeSourceMode","changelogValuesEqual","getRegisteredLocalQuerySource","createQueryCacheManager","getQueryCacheManager","loadQueryCacheConfig","configurePersistentCacheFactory","queryBySchemaForMonth","hydrateArweaveRichTextInItems","parseEasPropertyMetadataForFeed","hasLocalQuerySource","CacheManager","normalizeUidPrefix","resolveQuerySource","resetQueryCacheManager","setListElementStorageModels","queryBySchema","clearLocalQuerySource","getSeed","registerLocalQuerySource","applyChangelogFilters","assembleSeeds","decodePropertyAttestation","buildFlatSnapshotFromProperties","getFieldStorageModels","FileCache","config"],"sources":["../src/index.node.ts"],"sourcesContent":["import { FileCache } from './cache/FileCache.js'\nimport { configurePersistentCacheFactory } from './cache/CacheManager.js'\n\nconfigurePersistentCacheFactory((config) => new FileCache(config))\n\nexport * from './index.js'\nexport { FileCache } from './cache/FileCache.js'\n"],"mappings":";;;;AAGAuC,GAAiC,MAAW,IAAImB,EAAUC,CAAM,CAAC"}
|
package/dist/node.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as e, i as t, o as n } from "./types-DHRoT30t.js";
|
|
2
|
-
import { t as r } from "./FileCache-
|
|
2
|
+
import { t as r } from "./FileCache-CQuj0MeF.js";
|
|
3
3
|
export { r as FileCache, t as initializeQueryPlatform, e as isQueryPlatformInitialized, n as teardownQueryPlatform };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/source/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/source/remote.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAUjD;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,eAAe,CAwG7D;AAID,wBAAgB,wBAAwB,IAAI,eAAe,CAK1D;AAED,kBAAkB;AAClB,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
|
package/dist/source/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AttestationLike } from '../types.js';
|
|
1
|
+
import type { AttestationChange, AttestationLike } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Pluggable backend for Seed / Version / property attestation reads.
|
|
4
4
|
* Remote uses EAS GraphQL; local (SDK) maps SQLite rows into the same shape.
|
|
@@ -10,6 +10,14 @@ export type QueryDataSource = {
|
|
|
10
10
|
limit: number;
|
|
11
11
|
skip: number;
|
|
12
12
|
}): Promise<AttestationLike[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Like listSeedsBySchemaName, limited to seeds whose UID starts with `uidPrefix`
|
|
15
|
+
* (normalized: `0x` + lowercase hex).
|
|
16
|
+
*/
|
|
17
|
+
listSeedsByUidPrefix(schemaName: string, uidPrefix: string, opts: {
|
|
18
|
+
limit: number;
|
|
19
|
+
skip: number;
|
|
20
|
+
}): Promise<AttestationLike[]>;
|
|
13
21
|
listSeedsBySchemaNameForMonth(schemaName: string, year: number, month: number): Promise<AttestationLike[]>;
|
|
14
22
|
getVersionsForSeed(seedUid: string): Promise<AttestationLike[]>;
|
|
15
23
|
/**
|
|
@@ -23,6 +31,16 @@ export type QueryDataSource = {
|
|
|
23
31
|
}): Promise<AttestationLike[]>;
|
|
24
32
|
getPropertiesForVersionUids(versionUids: string[]): Promise<AttestationLike[]>;
|
|
25
33
|
getSeedsByUids(uids: string[]): Promise<AttestationLike[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Optional: attestations created or revoked after `since` (unix seconds) that reference one of
|
|
36
|
+
* `refUIDs` or are one of `ids`. The query cache uses it to tell which cached seeds changed;
|
|
37
|
+
* without it, a cache hit re-assembles everything.
|
|
38
|
+
*/
|
|
39
|
+
listChangesSince?(opts: {
|
|
40
|
+
refUIDs: string[];
|
|
41
|
+
ids: string[];
|
|
42
|
+
since: number;
|
|
43
|
+
}): Promise<AttestationChange[]>;
|
|
26
44
|
/**
|
|
27
45
|
* Optional: read html/image bodies from local files instead of Arweave gateway.
|
|
28
46
|
* Return null to fall back to remote hydrate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/source/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/source/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAErE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;IAEjC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IAE9D,qBAAqB,CACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;OAGG;IACH,oBAAoB,CAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B,6BAA6B,CAC3B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE/D;;;;;OAKG;IACH,mBAAmB,CACjB,QAAQ,EAAE,MAAM,EAAE,EAClB,IAAI,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAClC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE9E,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE1D;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,IAAI,EAAE;QACtB,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,GAAG,EAAE,MAAM,EAAE,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KACd,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAEhC;;;OAGG;IACH,eAAe,CAAC,CAAC,GAAG,EAAE;QACpB,YAAY,EAAE,MAAM,CAAA;QACpB,KAAK,EAAE,OAAO,CAAA;QACd,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC3B,CAAA"}
|