@f0rbit/corpus 0.3.1 → 0.3.4
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 +2 -2
- package/dist/backend/base.d.ts +1 -1
- package/dist/backend/base.d.ts.map +1 -1
- package/dist/backend/base.js +3 -3
- package/dist/backend/cloudflare.d.ts +5 -3
- package/dist/backend/cloudflare.d.ts.map +1 -1
- package/dist/backend/cloudflare.js +9 -7
- package/dist/backend/file.d.ts +1 -1
- package/dist/backend/file.d.ts.map +1 -1
- package/dist/backend/file.js +3 -3
- package/dist/backend/layered.d.ts +1 -1
- package/dist/backend/layered.d.ts.map +1 -1
- package/dist/backend/layered.js +3 -3
- package/dist/backend/memory.d.ts +2 -2
- package/dist/backend/memory.d.ts.map +1 -1
- package/dist/backend/memory.js +3 -3
- package/dist/backends.d.ts +5 -5
- package/dist/backends.d.ts.map +1 -1
- package/dist/backends.js +4 -4
- package/dist/cloudflare.d.ts +8 -8
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +7 -7
- package/dist/corpus.d.ts +1 -1
- package/dist/corpus.d.ts.map +1 -1
- package/dist/corpus.js +3 -3
- package/dist/file.d.ts +1 -1
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -11
- package/dist/observations/client.d.ts +2 -2
- package/dist/observations/client.d.ts.map +1 -1
- package/dist/observations/client.js +3 -3
- package/dist/observations/index.d.ts +7 -7
- package/dist/observations/index.d.ts.map +1 -1
- package/dist/observations/index.js +5 -5
- package/dist/observations/storage.d.ts +3 -3
- package/dist/observations/storage.d.ts.map +1 -1
- package/dist/observations/storage.js +2 -2
- package/dist/observations/utils.d.ts +2 -2
- package/dist/observations/utils.d.ts.map +1 -1
- package/dist/observations/utils.js +2 -2
- package/dist/result.d.ts +1 -1
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +1 -1
- package/dist/sst.d.ts +0 -18
- package/dist/sst.d.ts.map +1 -1
- package/dist/sst.js +0 -56
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +5 -12
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@ a functional snapshotting library for typescript. store versioned data with line
|
|
|
5
5
|
## install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bun add corpus
|
|
8
|
+
bun add @f0rbit/corpus
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## usage
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { z } from 'zod'
|
|
15
|
-
import { create_corpus, create_memory_backend, define_store, json_codec } from 'corpus'
|
|
15
|
+
import { create_corpus, create_memory_backend, define_store, json_codec } from '@f0rbit/corpus'
|
|
16
16
|
|
|
17
17
|
const TimelineSchema = z.object({
|
|
18
18
|
items: z.array(z.object({ id: z.string(), text: z.string() })),
|
package/dist/backend/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Backend Base
|
|
3
3
|
* @description Base abstraction layer for backend implementations.
|
|
4
4
|
*/
|
|
5
|
-
import type { MetadataClient, DataClient, SnapshotMeta, CorpusEvent } from
|
|
5
|
+
import type { MetadataClient, DataClient, SnapshotMeta, CorpusEvent } from '../types.js';
|
|
6
6
|
export type MetadataStorage = {
|
|
7
7
|
get: (store_id: string, version: string) => Promise<SnapshotMeta | null>;
|
|
8
8
|
put: (meta: SnapshotMeta) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../backend/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,YAAY,EAGZ,WAAW,EAGZ,MAAM,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../backend/base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BAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,CA0C/E"}
|
package/dist/backend/base.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module Backend Base
|
|
3
3
|
* @description Base abstraction layer for backend implementations.
|
|
4
4
|
*/
|
|
5
|
-
import { ok, err } from
|
|
6
|
-
import { to_bytes, filter_snapshots } from
|
|
7
|
-
import { first, to_fallback } from
|
|
5
|
+
import { ok, err } from '../types.js';
|
|
6
|
+
import { to_bytes, filter_snapshots } from '../utils.js';
|
|
7
|
+
import { first, to_fallback } from '../result.js';
|
|
8
8
|
export function create_metadata_client(storage, emit) {
|
|
9
9
|
return {
|
|
10
10
|
async get(store_id, version) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description Cloudflare Workers storage backend using D1 and R2.
|
|
4
4
|
*/
|
|
5
|
-
import type { Backend, EventHandler } from
|
|
5
|
+
import type { Backend, EventHandler } from '../types.js';
|
|
6
6
|
type D1Database = {
|
|
7
7
|
prepare: (sql: string) => unknown;
|
|
8
8
|
};
|
|
@@ -28,7 +28,8 @@ export type CloudflareBackendConfig = {
|
|
|
28
28
|
* @group Storage Backends
|
|
29
29
|
*
|
|
30
30
|
* Uses D1 (SQLite) for metadata storage and R2 (object storage) for binary data.
|
|
31
|
-
*
|
|
31
|
+
* Database migrations should be managed via Drizzle Kit using the exported
|
|
32
|
+
* `corpus_snapshots` and `corpus_observations` schemas.
|
|
32
33
|
*
|
|
33
34
|
* This backend is designed for production use in Cloudflare Workers environments,
|
|
34
35
|
* providing durable, globally distributed storage.
|
|
@@ -56,7 +57,8 @@ export type CloudflareBackendConfig = {
|
|
|
56
57
|
* }
|
|
57
58
|
* ```
|
|
58
59
|
*
|
|
59
|
-
* @see
|
|
60
|
+
* @see corpus_snapshots - Drizzle schema for snapshot metadata
|
|
61
|
+
* @see corpus_observations - Drizzle schema for observations
|
|
60
62
|
*/
|
|
61
63
|
export declare function create_cloudflare_backend(config: CloudflareBackendConfig): Backend;
|
|
62
64
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../backend/cloudflare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAiE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../backend/cloudflare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAiE,YAAY,EAAE,MAAM,aAAa,CAAC;AAOxH,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,CAAC;AACxD,KAAK,QAAQ,GAAG;IACf,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;QAAC,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACpH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC,EAAE,EAAE,UAAU,CAAC;IACf,EAAE,EAAE,QAAQ,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AA6IF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAmOlF"}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { eq, and, desc, lt, gt, like, sql, inArray } from "drizzle-orm";
|
|
6
6
|
import { drizzle } from "drizzle-orm/d1";
|
|
7
|
-
import { create_emitter, parse_snapshot_meta } from
|
|
8
|
-
import { ok, err } from
|
|
9
|
-
import { first, to_nullable, to_fallback } from
|
|
10
|
-
import { corpus_snapshots } from
|
|
11
|
-
import { corpus_observations, create_observations_client } from
|
|
7
|
+
import { create_emitter, parse_snapshot_meta } from '../utils.js';
|
|
8
|
+
import { ok, err } from '../types.js';
|
|
9
|
+
import { first, to_nullable, to_fallback } from '../result.js';
|
|
10
|
+
import { corpus_snapshots } from '../schema.js';
|
|
11
|
+
import { corpus_observations, create_observations_client } from '../observations/index.js';
|
|
12
12
|
function create_cloudflare_storage(db) {
|
|
13
13
|
return {
|
|
14
14
|
async put_row(row) {
|
|
@@ -141,7 +141,8 @@ function create_cloudflare_storage(db) {
|
|
|
141
141
|
* @group Storage Backends
|
|
142
142
|
*
|
|
143
143
|
* Uses D1 (SQLite) for metadata storage and R2 (object storage) for binary data.
|
|
144
|
-
*
|
|
144
|
+
* Database migrations should be managed via Drizzle Kit using the exported
|
|
145
|
+
* `corpus_snapshots` and `corpus_observations` schemas.
|
|
145
146
|
*
|
|
146
147
|
* This backend is designed for production use in Cloudflare Workers environments,
|
|
147
148
|
* providing durable, globally distributed storage.
|
|
@@ -169,7 +170,8 @@ function create_cloudflare_storage(db) {
|
|
|
169
170
|
* }
|
|
170
171
|
* ```
|
|
171
172
|
*
|
|
172
|
-
* @see
|
|
173
|
+
* @see corpus_snapshots - Drizzle schema for snapshot metadata
|
|
174
|
+
* @see corpus_observations - Drizzle schema for observations
|
|
173
175
|
*/
|
|
174
176
|
export function create_cloudflare_backend(config) {
|
|
175
177
|
const db = drizzle(config.d1);
|
package/dist/backend/file.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description File-system storage backend for local persistence.
|
|
4
4
|
*/
|
|
5
|
-
import type { Backend, EventHandler } from
|
|
5
|
+
import type { Backend, EventHandler } from '../types.js';
|
|
6
6
|
export type FileBackendConfig = {
|
|
7
7
|
base_path: string;
|
|
8
8
|
on_event?: EventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../backend/file.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAgB,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../backend/file.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAgB,YAAY,EAAE,MAAM,aAAa,CAAC;AASvE,MAAM,MAAM,iBAAiB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAiKtE"}
|
package/dist/backend/file.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description File-system storage backend for local persistence.
|
|
4
4
|
*/
|
|
5
|
-
import { create_observations_client, create_observations_storage } from
|
|
6
|
-
import { create_emitter, parse_snapshot_meta } from
|
|
5
|
+
import { create_observations_client, create_observations_storage } from '../observations/index.js';
|
|
6
|
+
import { create_emitter, parse_snapshot_meta } from '../utils.js';
|
|
7
7
|
import { mkdir, readdir } from "node:fs/promises";
|
|
8
8
|
import { join, dirname } from "node:path";
|
|
9
|
-
import { create_metadata_client, create_data_client } from
|
|
9
|
+
import { create_metadata_client, create_data_client } from './base.js';
|
|
10
10
|
/**
|
|
11
11
|
* Creates a file-system storage backend for local persistence.
|
|
12
12
|
* @category Backends
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layered.d.ts","sourceRoot":"","sources":["../../backend/layered.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiG,MAAM,
|
|
1
|
+
{"version":3,"file":"layered.d.ts","sourceRoot":"","sources":["../../backend/layered.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiG,MAAM,aAAa,CAAC;AAK1I,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAClC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAoJ9E"}
|
package/dist/backend/layered.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description Layered backend for caching and replication strategies.
|
|
4
4
|
*/
|
|
5
|
-
import { ok, err } from '../types';
|
|
6
|
-
import { to_bytes } from '../utils';
|
|
7
|
-
import { first, to_nullable } from '../result';
|
|
5
|
+
import { ok, err } from '../types.js';
|
|
6
|
+
import { to_bytes } from '../utils.js';
|
|
7
|
+
import { first, to_nullable } from '../result.js';
|
|
8
8
|
/**
|
|
9
9
|
* Creates a layered backend that combines multiple backends with read/write separation.
|
|
10
10
|
* @category Backends
|
package/dist/backend/memory.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description In-memory storage backend for testing and development.
|
|
4
4
|
*/
|
|
5
|
-
import type { Backend } from
|
|
6
|
-
import type { EventHandler } from
|
|
5
|
+
import type { Backend } from '../types.js';
|
|
6
|
+
import type { EventHandler } from '../types.js';
|
|
7
7
|
export type MemoryBackendOptions = {
|
|
8
8
|
on_event?: EventHandler;
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../backend/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../backend/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAC;AAIzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,MAAM,MAAM,oBAAoB,GAAG;IAClC,QAAQ,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAoF7E"}
|
package/dist/backend/memory.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module Backends
|
|
3
3
|
* @description In-memory storage backend for testing and development.
|
|
4
4
|
*/
|
|
5
|
-
import { create_observations_client, create_observations_storage } from
|
|
6
|
-
import { create_emitter } from
|
|
7
|
-
import { create_metadata_client, create_data_client } from
|
|
5
|
+
import { create_observations_client, create_observations_storage } from '../observations/index.js';
|
|
6
|
+
import { create_emitter } from '../utils.js';
|
|
7
|
+
import { create_metadata_client, create_data_client } from './base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Creates an in-memory storage backend.
|
|
10
10
|
* @category Backends
|
package/dist/backends.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @module Backends
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
export { create_memory_backend, type MemoryBackendOptions } from './backend/memory';
|
|
7
|
-
export { create_cloudflare_backend, type CloudflareBackendConfig } from './backend/cloudflare';
|
|
8
|
-
export { create_layered_backend, type LayeredBackendOptions } from './backend/layered';
|
|
9
|
-
export { create_metadata_client, create_data_client, type MetadataStorage, type DataStorage } from './backend/base';
|
|
10
|
-
export type { Backend, MetadataClient, DataClient, DataHandle, EventHandler, CorpusEvent } from './types';
|
|
6
|
+
export { create_memory_backend, type MemoryBackendOptions } from './backend/memory.js';
|
|
7
|
+
export { create_cloudflare_backend, type CloudflareBackendConfig } from './backend/cloudflare.js';
|
|
8
|
+
export { create_layered_backend, type LayeredBackendOptions } from './backend/layered.js';
|
|
9
|
+
export { create_metadata_client, create_data_client, type MetadataStorage, type DataStorage } from './backend/base.js';
|
|
10
|
+
export type { Backend, MetadataClient, DataClient, DataHandle, EventHandler, CorpusEvent } from './types.js';
|
|
11
11
|
//# sourceMappingURL=backends.d.ts.map
|
package/dist/backends.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backends.d.ts","sourceRoot":"","sources":["../backends.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"backends.d.ts","sourceRoot":"","sources":["../backends.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACvH,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/backends.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module Backends
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
export { create_memory_backend } from './backend/memory';
|
|
7
|
-
export { create_cloudflare_backend } from './backend/cloudflare';
|
|
8
|
-
export { create_layered_backend } from './backend/layered';
|
|
9
|
-
export { create_metadata_client, create_data_client } from './backend/base';
|
|
6
|
+
export { create_memory_backend } from './backend/memory.js';
|
|
7
|
+
export { create_cloudflare_backend } from './backend/cloudflare.js';
|
|
8
|
+
export { create_layered_backend } from './backend/layered.js';
|
|
9
|
+
export { create_metadata_client, create_data_client } from './backend/base.js';
|
package/dist/cloudflare.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Cloudflare Workers compatible exports
|
|
3
3
|
* This entry point excludes the file backend which uses Node.js APIs
|
|
4
4
|
*/
|
|
5
|
-
export { create_corpus, create_store } from
|
|
6
|
-
export { create_memory_backend, type MemoryBackendOptions } from
|
|
7
|
-
export { create_cloudflare_backend, type CloudflareBackendConfig } from
|
|
8
|
-
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from
|
|
9
|
-
export { corpus_snapshots, type CorpusSnapshotRow, type CorpusSnapshotInsert } from
|
|
10
|
-
export type { ContentType, ParentRef, SnapshotMeta, Snapshot, DataHandle, MetadataClient, DataClient, ListOpts, Backend, Codec, Store, StoreDefinition, PutOpts, CorpusBuilder, Corpus, CorpusError, Result, CorpusEvent, EventHandler, } from
|
|
11
|
-
export { ok, err, define_store } from
|
|
12
|
-
export * from
|
|
5
|
+
export { create_corpus, create_store } from "./corpus.js";
|
|
6
|
+
export { create_memory_backend, type MemoryBackendOptions } from "./backend/memory.js";
|
|
7
|
+
export { create_cloudflare_backend, type CloudflareBackendConfig } from "./backend/cloudflare.js";
|
|
8
|
+
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from "./utils.js";
|
|
9
|
+
export { corpus_snapshots, type CorpusSnapshotRow, type CorpusSnapshotInsert } from "./schema.js";
|
|
10
|
+
export type { ContentType, ParentRef, SnapshotMeta, Snapshot, DataHandle, MetadataClient, DataClient, ListOpts, Backend, Codec, Store, StoreDefinition, PutOpts, CorpusBuilder, Corpus, CorpusError, Result, CorpusEvent, EventHandler, } from "./types.js";
|
|
11
|
+
export { ok, err, define_store } from "./types.js";
|
|
12
|
+
export * from "./observations/index.js";
|
|
13
13
|
//# sourceMappingURL=cloudflare.d.ts.map
|
package/dist/cloudflare.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../cloudflare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../cloudflare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAElG,YAAY,EACX,WAAW,EACX,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,eAAe,EACf,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,MAAM,EACN,WAAW,EACX,YAAY,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnD,cAAc,yBAAyB,CAAC"}
|
package/dist/cloudflare.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Cloudflare Workers compatible exports
|
|
3
3
|
* This entry point excludes the file backend which uses Node.js APIs
|
|
4
4
|
*/
|
|
5
|
-
export { create_corpus, create_store } from
|
|
6
|
-
export { create_memory_backend } from
|
|
7
|
-
export { create_cloudflare_backend } from
|
|
8
|
-
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from
|
|
9
|
-
export { corpus_snapshots } from
|
|
10
|
-
export { ok, err, define_store } from
|
|
11
|
-
export * from
|
|
5
|
+
export { create_corpus, create_store } from "./corpus.js";
|
|
6
|
+
export { create_memory_backend } from "./backend/memory.js";
|
|
7
|
+
export { create_cloudflare_backend } from "./backend/cloudflare.js";
|
|
8
|
+
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from "./utils.js";
|
|
9
|
+
export { corpus_snapshots } from "./schema.js";
|
|
10
|
+
export { ok, err, define_store } from "./types.js";
|
|
11
|
+
export * from "./observations/index.js";
|
package/dist/corpus.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Core
|
|
3
3
|
* @description Core corpus and store creation functions.
|
|
4
4
|
*/
|
|
5
|
-
import type { Backend, CorpusBuilder, StoreDefinition, Store } from './types';
|
|
5
|
+
import type { Backend, CorpusBuilder, StoreDefinition, Store } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Creates a typed Store instance bound to a Backend.
|
|
8
8
|
* @category Core
|
package/dist/corpus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../corpus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAU,aAAa,EAAE,eAAe,EAAE,KAAK,EAAyE,MAAM,
|
|
1
|
+
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../corpus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAU,aAAa,EAAE,eAAe,EAAE,KAAK,EAAyE,MAAM,YAAY,CAAC;AAMhK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAmJlG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAAC,EAAE,CAAC,CAiFjD"}
|
package/dist/corpus.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module Core
|
|
3
3
|
* @description Core corpus and store creation functions.
|
|
4
4
|
*/
|
|
5
|
-
import { ok, err } from './types';
|
|
6
|
-
import { compute_hash, generate_version } from './utils';
|
|
7
|
-
import { create_pointer, resolve_path, apply_span } from './observations/utils';
|
|
5
|
+
import { ok, err } from './types.js';
|
|
6
|
+
import { compute_hash, generate_version } from './utils.js';
|
|
7
|
+
import { create_pointer, resolve_path, apply_span } from './observations/utils.js';
|
|
8
8
|
/**
|
|
9
9
|
* Creates a typed Store instance bound to a Backend.
|
|
10
10
|
* @category Core
|
package/dist/file.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* This module uses Node.js filesystem APIs and Bun file APIs.
|
|
5
5
|
* Import from '@f0rbit/corpus/file' to use this backend.
|
|
6
6
|
*/
|
|
7
|
-
export { create_file_backend, type FileBackendConfig } from './backend/file';
|
|
7
|
+
export { create_file_backend, type FileBackendConfig } from './backend/file.js';
|
|
8
8
|
//# sourceMappingURL=file.d.ts.map
|
package/dist/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/file.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { create_corpus, create_store } from
|
|
2
|
-
export { create_memory_backend, type MemoryBackendOptions } from
|
|
3
|
-
export { create_cloudflare_backend, type CloudflareBackendConfig } from
|
|
4
|
-
export { create_layered_backend, type LayeredBackendOptions } from
|
|
5
|
-
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from
|
|
6
|
-
export { corpus_snapshots, type CorpusSnapshotRow, type CorpusSnapshotInsert } from
|
|
7
|
-
export type { ContentType, ParentRef, SnapshotMeta, Snapshot, DataHandle, MetadataClient, DataClient, ListOpts, Backend, Codec, Parser, Store, StoreDefinition, DefineStoreOpts, DataKeyContext, PutOpts, CorpusBuilder, Corpus, CorpusError, Result, CorpusEvent, EventHandler, ObservationsClient, } from
|
|
8
|
-
export { ok, err, define_store } from
|
|
9
|
-
export { match, unwrap_or, unwrap, unwrap_err, try_catch, try_catch_async, fetch_result, pipe, to_nullable, to_fallback, null_on, fallback_on, format_error, at, first, last, merge_deep, type DeepPartial, type FetchError, type Pipe, } from
|
|
10
|
-
export { Semaphore, parallel_map } from
|
|
11
|
-
export * from
|
|
12
|
-
export { createCorpusInfra,
|
|
1
|
+
export { create_corpus, create_store } from './corpus.js';
|
|
2
|
+
export { create_memory_backend, type MemoryBackendOptions } from './backend/memory.js';
|
|
3
|
+
export { create_cloudflare_backend, type CloudflareBackendConfig } from './backend/cloudflare.js';
|
|
4
|
+
export { create_layered_backend, type LayeredBackendOptions } from './backend/layered.js';
|
|
5
|
+
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from './utils.js';
|
|
6
|
+
export { corpus_snapshots, type CorpusSnapshotRow, type CorpusSnapshotInsert } from './schema.js';
|
|
7
|
+
export type { ContentType, ParentRef, SnapshotMeta, Snapshot, DataHandle, MetadataClient, DataClient, ListOpts, Backend, Codec, Parser, Store, StoreDefinition, DefineStoreOpts, DataKeyContext, PutOpts, CorpusBuilder, Corpus, CorpusError, Result, CorpusEvent, EventHandler, ObservationsClient, } from './types.js';
|
|
8
|
+
export { ok, err, define_store } from './types.js';
|
|
9
|
+
export { match, unwrap_or, unwrap, unwrap_err, try_catch, try_catch_async, fetch_result, pipe, to_nullable, to_fallback, null_on, fallback_on, format_error, at, first, last, merge_deep, type DeepPartial, type FetchError, type Pipe, } from './result.js';
|
|
10
|
+
export { Semaphore, parallel_map } from './concurrency.js';
|
|
11
|
+
export * from './observations/index.js';
|
|
12
|
+
export { createCorpusInfra, type CorpusInfra, type CorpusInfraConfig } from './sst.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAElG,YAAY,EACX,WAAW,EACX,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,MAAM,EACN,WAAW,EACX,YAAY,EACZ,kBAAkB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EACN,KAAK,EACL,SAAS,EACT,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,IAAI,GACT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE3D,cAAc,yBAAyB,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { create_corpus, create_store } from
|
|
2
|
-
export { create_memory_backend } from
|
|
3
|
-
export { create_cloudflare_backend } from
|
|
4
|
-
export { create_layered_backend } from
|
|
5
|
-
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from
|
|
6
|
-
export { corpus_snapshots } from
|
|
7
|
-
export { ok, err, define_store } from
|
|
8
|
-
export { match, unwrap_or, unwrap, unwrap_err, try_catch, try_catch_async, fetch_result, pipe, to_nullable, to_fallback, null_on, fallback_on, format_error, at, first, last, merge_deep, } from
|
|
9
|
-
export { Semaphore, parallel_map } from
|
|
10
|
-
export * from
|
|
11
|
-
export { createCorpusInfra
|
|
1
|
+
export { create_corpus, create_store } from './corpus.js';
|
|
2
|
+
export { create_memory_backend } from './backend/memory.js';
|
|
3
|
+
export { create_cloudflare_backend } from './backend/cloudflare.js';
|
|
4
|
+
export { create_layered_backend } from './backend/layered.js';
|
|
5
|
+
export { json_codec, text_codec, binary_codec, compute_hash, generate_version } from './utils.js';
|
|
6
|
+
export { corpus_snapshots } from './schema.js';
|
|
7
|
+
export { ok, err, define_store } from './types.js';
|
|
8
|
+
export { match, unwrap_or, unwrap, unwrap_err, try_catch, try_catch_async, fetch_result, pipe, to_nullable, to_fallback, null_on, fallback_on, format_error, at, first, last, merge_deep, } from './result.js';
|
|
9
|
+
export { Semaphore, parallel_map } from './concurrency.js';
|
|
10
|
+
export * from './observations/index.js';
|
|
11
|
+
export { createCorpusInfra } from './sst.js';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module ObservationsClient
|
|
3
3
|
* @description Centralized business logic for observations, built on storage adapters.
|
|
4
4
|
*/
|
|
5
|
-
import type { MetadataClient, ObservationsClient } from
|
|
6
|
-
import type { ObservationsStorage } from
|
|
5
|
+
import type { MetadataClient, ObservationsClient } from '../types.js';
|
|
6
|
+
import type { ObservationsStorage } from './storage.js';
|
|
7
7
|
/**
|
|
8
8
|
* Creates an ObservationsClient from a storage adapter.
|
|
9
9
|
* All business logic (validation, staleness, etc.) is centralized here.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../observations/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAuB,cAAc,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../observations/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAuB,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE3F,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,cAAc,CAAC;AA6B1E;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,cAAc,GAAG,kBAAkB,CAiGrH"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module ObservationsClient
|
|
3
3
|
* @description Centralized business logic for observations, built on storage adapters.
|
|
4
4
|
*/
|
|
5
|
-
import { row_to_observation, row_to_meta, create_observation_row } from
|
|
6
|
-
import { generate_observation_id } from
|
|
7
|
-
import { ok, err } from
|
|
5
|
+
import { row_to_observation, row_to_meta, create_observation_row } from './storage.js';
|
|
6
|
+
import { generate_observation_id } from './utils.js';
|
|
7
|
+
import { ok, err } from '../types.js';
|
|
8
8
|
async function apply_version_filter(filter, store_id, version) {
|
|
9
9
|
if (typeof filter === "function")
|
|
10
10
|
return filter(store_id, version);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module Observations
|
|
3
3
|
* @description Re-exports for the observations feature.
|
|
4
4
|
*/
|
|
5
|
-
export * from './types';
|
|
6
|
-
export type { ObservationRow, ObservationInsert } from './schema';
|
|
7
|
-
export { corpus_observations } from './schema';
|
|
8
|
-
export type { ObservationsStorage, StorageQueryOpts, ObservationsCRUD, ObservationsAdapter, ObservationsCRUDBase, ObservationsCRUDOptimized } from './storage';
|
|
9
|
-
export { row_to_observation, row_to_meta, create_observation_row, filter_observation_rows, create_observations_storage } from './storage';
|
|
10
|
-
export { create_observations_client } from './client';
|
|
11
|
-
export * from './utils';
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export type { ObservationRow, ObservationInsert } from './schema.js';
|
|
7
|
+
export { corpus_observations } from './schema.js';
|
|
8
|
+
export type { ObservationsStorage, StorageQueryOpts, ObservationsCRUD, ObservationsAdapter, ObservationsCRUDBase, ObservationsCRUDOptimized } from './storage.js';
|
|
9
|
+
export { row_to_observation, row_to_meta, create_observation_row, filter_observation_rows, create_observations_storage } from './storage.js';
|
|
10
|
+
export { create_observations_client } from './client.js';
|
|
11
|
+
export * from './utils.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../observations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../observations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAGlK,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,cAAc,YAAY,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @description Re-exports for the observations feature.
|
|
4
4
|
*/
|
|
5
5
|
// Types
|
|
6
|
-
export * from './types';
|
|
7
|
-
export { corpus_observations } from './schema';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export { corpus_observations } from './schema.js';
|
|
8
8
|
// Functions
|
|
9
|
-
export { row_to_observation, row_to_meta, create_observation_row, filter_observation_rows, create_observations_storage } from './storage';
|
|
10
|
-
export { create_observations_client } from './client';
|
|
11
|
-
export * from './utils';
|
|
9
|
+
export { row_to_observation, row_to_meta, create_observation_row, filter_observation_rows, create_observations_storage } from './storage.js';
|
|
10
|
+
export { create_observations_client } from './client.js';
|
|
11
|
+
export * from './utils.js';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module ObservationsStorage
|
|
3
3
|
* @description Raw storage interface and row conversion utilities for observations.
|
|
4
4
|
*/
|
|
5
|
-
import type { Result, CorpusError } from '../types';
|
|
6
|
-
import type { ObservationRow } from './schema';
|
|
7
|
-
import type { Observation, ObservationMeta, SnapshotPointer } from './types';
|
|
5
|
+
import type { Result, CorpusError } from '../types.js';
|
|
6
|
+
import type { ObservationRow } from './schema.js';
|
|
7
|
+
import type { Observation, ObservationMeta, SnapshotPointer } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Query options for raw storage operations.
|
|
10
10
|
* Dates are ISO strings at the storage layer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../observations/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../observations/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB,eAAe,CAA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AC,CAAA;AAE3F;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;IACxC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACvD,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC7C,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB,GAAG,mBAAmB,CA0DhH"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module ObservationsStorage
|
|
3
3
|
* @description Raw storage interface and row conversion utilities for observations.
|
|
4
4
|
*/
|
|
5
|
-
import { ok } from '../types';
|
|
6
|
-
import { create_filter_pipeline } from '../utils';
|
|
5
|
+
import { ok } from '../types.js';
|
|
6
|
+
import { create_filter_pipeline } from '../utils.js';
|
|
7
7
|
/**
|
|
8
8
|
* Extract common fields from an observation row (everything except content).
|
|
9
9
|
* Used internally by row_to_observation and row_to_meta.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module ObservationUtils
|
|
3
3
|
* @description Utility functions for working with SnapshotPointers and observations.
|
|
4
4
|
*/
|
|
5
|
-
import type { SnapshotPointer } from './types';
|
|
6
|
-
import type { Result, CorpusError } from '../types';
|
|
5
|
+
import type { SnapshotPointer } from './types.js';
|
|
6
|
+
import type { Result, CorpusError } from '../types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Creates a SnapshotPointer to a location in a snapshot.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../observations/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../observations/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpC,eAAe,CAKjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAK/D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAyBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAsC9F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAS3G;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAIhD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,OAAO,CAO9E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAE7E"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module ObservationUtils
|
|
3
3
|
* @description Utility functions for working with SnapshotPointers and observations.
|
|
4
4
|
*/
|
|
5
|
-
import { ok, err } from '../types';
|
|
6
|
-
import { last, to_nullable } from '../result';
|
|
5
|
+
import { ok, err } from '../types.js';
|
|
6
|
+
import { last, to_nullable } from '../result.js';
|
|
7
7
|
/**
|
|
8
8
|
* Creates a SnapshotPointer to a location in a snapshot.
|
|
9
9
|
*
|
package/dist/result.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Fetch wrapper with `fetch_result`
|
|
10
10
|
* - Composable pipelines with `pipe`
|
|
11
11
|
*/
|
|
12
|
-
import { type Result } from
|
|
12
|
+
import { type Result } from './types.js';
|
|
13
13
|
/**
|
|
14
14
|
* Pattern match on a Result, extracting the value with appropriate handler.
|
|
15
15
|
*
|
package/dist/result.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,MAA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O,MAAM,KAAG,MAAM,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CASlI,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,OAAO,SAAS,CAAC,EAAE,KAAG,MAAM,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAK/E,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,OAAO,SAAS,CAAC,EAAE,KAAG,MAAM,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAK9E,CAAC"}
|
package/dist/result.js
CHANGED
package/dist/sst.d.ts
CHANGED
|
@@ -35,22 +35,4 @@ export type CorpusInfra = {
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
export declare function createCorpusInfra(name: string, config?: Partial<CorpusInfraConfig>): CorpusInfra;
|
|
38
|
-
/**
|
|
39
|
-
* SQL migration script to create required D1 tables for the Cloudflare backend.
|
|
40
|
-
*
|
|
41
|
-
* Must be executed on the D1 database before using `create_cloudflare_backend()`.
|
|
42
|
-
* Creates the `corpus_snapshots` table and required indexes.
|
|
43
|
-
*
|
|
44
|
-
* Safe to run multiple times (uses IF NOT EXISTS).
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* // Run migration via wrangler
|
|
49
|
-
* // wrangler d1 execute <database-name> --command "$(cat migration.sql)"
|
|
50
|
-
*
|
|
51
|
-
* // Or programmatically in a Worker
|
|
52
|
-
* await env.CORPUS_DB.exec(CORPUS_MIGRATION_SQL)
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export declare const CORPUS_MIGRATION_SQL = "\nCREATE TABLE IF NOT EXISTS corpus_snapshots (\n store_id TEXT NOT NULL,\n version TEXT NOT NULL,\n parents TEXT NOT NULL,\n created_at TEXT NOT NULL,\n invoked_at TEXT,\n content_hash TEXT NOT NULL,\n content_type TEXT NOT NULL,\n size_bytes INTEGER NOT NULL,\n data_key TEXT NOT NULL,\n tags TEXT,\n PRIMARY KEY (store_id, version)\n);\n\nCREATE INDEX IF NOT EXISTS idx_store_created ON corpus_snapshots(store_id, created_at);\nCREATE INDEX IF NOT EXISTS idx_content_hash ON corpus_snapshots(store_id, content_hash);\nCREATE INDEX IF NOT EXISTS idx_data_key ON corpus_snapshots(data_key);\n\nCREATE TABLE IF NOT EXISTS corpus_observations (\n id TEXT PRIMARY KEY,\n type TEXT NOT NULL,\n source_store_id TEXT NOT NULL,\n source_version TEXT NOT NULL,\n source_path TEXT,\n source_span_start TEXT,\n source_span_end TEXT,\n content TEXT NOT NULL,\n confidence REAL,\n observed_at TEXT,\n created_at TEXT NOT NULL,\n derived_from TEXT\n);\n\nCREATE INDEX IF NOT EXISTS idx_obs_type ON corpus_observations(type);\nCREATE INDEX IF NOT EXISTS idx_obs_source ON corpus_observations(source_store_id, source_version);\nCREATE INDEX IF NOT EXISTS idx_obs_type_observed ON corpus_observations(type, observed_at);\nCREATE INDEX IF NOT EXISTS idx_obs_type_source ON corpus_observations(type, source_store_id);\n";
|
|
56
38
|
//# sourceMappingURL=sst.d.ts.map
|
package/dist/sst.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sst.d.ts","sourceRoot":"","sources":["../sst.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,WAAW,CAUb
|
|
1
|
+
{"version":3,"file":"sst.d.ts","sourceRoot":"","sources":["../sst.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,WAAW,CAUb"}
|
package/dist/sst.js
CHANGED
|
@@ -29,59 +29,3 @@ export function createCorpusInfra(name, config) {
|
|
|
29
29
|
bucket_name,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
33
|
-
* SQL migration script to create required D1 tables for the Cloudflare backend.
|
|
34
|
-
*
|
|
35
|
-
* Must be executed on the D1 database before using `create_cloudflare_backend()`.
|
|
36
|
-
* Creates the `corpus_snapshots` table and required indexes.
|
|
37
|
-
*
|
|
38
|
-
* Safe to run multiple times (uses IF NOT EXISTS).
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* // Run migration via wrangler
|
|
43
|
-
* // wrangler d1 execute <database-name> --command "$(cat migration.sql)"
|
|
44
|
-
*
|
|
45
|
-
* // Or programmatically in a Worker
|
|
46
|
-
* await env.CORPUS_DB.exec(CORPUS_MIGRATION_SQL)
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
export const CORPUS_MIGRATION_SQL = `
|
|
50
|
-
CREATE TABLE IF NOT EXISTS corpus_snapshots (
|
|
51
|
-
store_id TEXT NOT NULL,
|
|
52
|
-
version TEXT NOT NULL,
|
|
53
|
-
parents TEXT NOT NULL,
|
|
54
|
-
created_at TEXT NOT NULL,
|
|
55
|
-
invoked_at TEXT,
|
|
56
|
-
content_hash TEXT NOT NULL,
|
|
57
|
-
content_type TEXT NOT NULL,
|
|
58
|
-
size_bytes INTEGER NOT NULL,
|
|
59
|
-
data_key TEXT NOT NULL,
|
|
60
|
-
tags TEXT,
|
|
61
|
-
PRIMARY KEY (store_id, version)
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
CREATE INDEX IF NOT EXISTS idx_store_created ON corpus_snapshots(store_id, created_at);
|
|
65
|
-
CREATE INDEX IF NOT EXISTS idx_content_hash ON corpus_snapshots(store_id, content_hash);
|
|
66
|
-
CREATE INDEX IF NOT EXISTS idx_data_key ON corpus_snapshots(data_key);
|
|
67
|
-
|
|
68
|
-
CREATE TABLE IF NOT EXISTS corpus_observations (
|
|
69
|
-
id TEXT PRIMARY KEY,
|
|
70
|
-
type TEXT NOT NULL,
|
|
71
|
-
source_store_id TEXT NOT NULL,
|
|
72
|
-
source_version TEXT NOT NULL,
|
|
73
|
-
source_path TEXT,
|
|
74
|
-
source_span_start TEXT,
|
|
75
|
-
source_span_end TEXT,
|
|
76
|
-
content TEXT NOT NULL,
|
|
77
|
-
confidence REAL,
|
|
78
|
-
observed_at TEXT,
|
|
79
|
-
created_at TEXT NOT NULL,
|
|
80
|
-
derived_from TEXT
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
CREATE INDEX IF NOT EXISTS idx_obs_type ON corpus_observations(type);
|
|
84
|
-
CREATE INDEX IF NOT EXISTS idx_obs_source ON corpus_observations(source_store_id, source_version);
|
|
85
|
-
CREATE INDEX IF NOT EXISTS idx_obs_type_observed ON corpus_observations(type, observed_at);
|
|
86
|
-
CREATE INDEX IF NOT EXISTS idx_obs_type_source ON corpus_observations(type, source_store_id);
|
|
87
|
-
`;
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Types
|
|
3
3
|
* @description Type definitions for the corpus library.
|
|
4
4
|
*/
|
|
5
|
-
import type { SnapshotPointer, Observation, ObservationMeta, ObservationTypeDef, ObservationPutOpts, ObservationQueryOpts } from './observations/types';
|
|
5
|
+
import type { SnapshotPointer, Observation, ObservationMeta, ObservationTypeDef, ObservationPutOpts, ObservationQueryOpts } from './observations/types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Error types that can occur during Corpus operations.
|
|
8
8
|
* @category Types
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;C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CAAA"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Utilities
|
|
3
3
|
* @description Utility functions for hashing, versioning, and codecs.
|
|
4
4
|
*/
|
|
5
|
-
import type { Codec, CorpusEvent, EventHandler, SnapshotMeta, ListOpts, ParentRef, Parser } from
|
|
5
|
+
import type { Codec, CorpusEvent, EventHandler, SnapshotMeta, ListOpts, ParentRef, Parser } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Computes the SHA-256 hash of binary data.
|
|
8
8
|
* @category Utilities
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAe,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAe,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3H;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAIpE;AAKD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CA0BzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAMzD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,IAAI,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B,CAC/B,KAAK,EAAE,YAAY,EAAE,EACrB,IAAI,GAAE,QAAa,GACjB,YAAY,EAAE,CAEhB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,IAAI,CAAA;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,GAAG,YAAY,CAmBf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f0rbit/corpus",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "A functional snapshotting library for TypeScript with versioned data storage, lineage tracking, and multiple backend support",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,29 +33,22 @@
|
|
|
33
33
|
"require": "./dist/schema.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"files": [
|
|
37
|
-
"dist"
|
|
38
|
-
],
|
|
36
|
+
"files": ["dist"],
|
|
39
37
|
"scripts": {
|
|
40
38
|
"build": "tsc -p tsconfig.build.json",
|
|
39
|
+
"build:llm": "node scripts/generate-llm-docs.js",
|
|
41
40
|
"test": "bun test",
|
|
42
41
|
"typecheck": "tsc --noEmit",
|
|
43
42
|
"prepublishOnly": "npm run build",
|
|
44
43
|
"docs:dev": "cd docs && bun run dev",
|
|
45
|
-
"docs:build": "cd docs && bun run build",
|
|
44
|
+
"docs:build": "npm run build:llm && cd docs && bun run build",
|
|
46
45
|
"docs:preview": "cd docs && bun run preview"
|
|
47
46
|
},
|
|
48
47
|
"repository": {
|
|
49
48
|
"type": "git",
|
|
50
49
|
"url": "git+https://github.com/f0rbit/corpus.git"
|
|
51
50
|
},
|
|
52
|
-
"keywords": [
|
|
53
|
-
"snapshot",
|
|
54
|
-
"versioning",
|
|
55
|
-
"data-store",
|
|
56
|
-
"lineage",
|
|
57
|
-
"typescript"
|
|
58
|
-
],
|
|
51
|
+
"keywords": ["snapshot", "versioning", "data-store", "lineage", "typescript"],
|
|
59
52
|
"author": "f0rbit",
|
|
60
53
|
"license": "MIT",
|
|
61
54
|
"bugs": {
|