@typicalday/firegraph 0.9.0 → 0.10.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.
Files changed (45) hide show
  1. package/dist/backend-73p5Blx7.d.cts +97 -0
  2. package/dist/backend-BrqFkbid.d.ts +97 -0
  3. package/dist/backend.cjs.map +1 -1
  4. package/dist/backend.d.cts +7 -6
  5. package/dist/backend.d.ts +7 -6
  6. package/dist/backend.js +1 -1
  7. package/dist/backend.js.map +1 -1
  8. package/dist/{chunk-EVUM6ORB.js → chunk-LZOIQHYN.js} +57 -2
  9. package/dist/chunk-LZOIQHYN.js.map +1 -0
  10. package/dist/{chunk-GLOVWKQH.js → chunk-R7CRGYY4.js} +1 -1
  11. package/dist/{chunk-GLOVWKQH.js.map → chunk-R7CRGYY4.js.map} +1 -1
  12. package/dist/{do-sqlite.cjs → cloudflare/index.cjs} +1533 -1420
  13. package/dist/cloudflare/index.cjs.map +1 -0
  14. package/dist/cloudflare/index.d.cts +454 -0
  15. package/dist/cloudflare/index.d.ts +454 -0
  16. package/dist/cloudflare/index.js +822 -0
  17. package/dist/cloudflare/index.js.map +1 -0
  18. package/dist/codegen/index.d.cts +1 -1
  19. package/dist/codegen/index.d.ts +1 -1
  20. package/dist/editor/server/index.mjs +55 -0
  21. package/dist/index.cjs +55 -0
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +13 -9
  24. package/dist/index.d.ts +13 -9
  25. package/dist/index.js +8 -8
  26. package/dist/index.js.map +1 -1
  27. package/dist/{scope-path-BtajqNK5.d.ts → scope-path-B1G3YiA7.d.cts} +5 -100
  28. package/dist/{scope-path-D2mNENJ-.d.cts → scope-path-B1G3YiA7.d.ts} +5 -100
  29. package/dist/{types-DfWVTsMn.d.cts → types-DOemdlVA.d.cts} +18 -1
  30. package/dist/{types-DfWVTsMn.d.ts → types-DOemdlVA.d.ts} +18 -1
  31. package/package.json +33 -45
  32. package/dist/chunk-EVUM6ORB.js.map +0 -1
  33. package/dist/chunk-SZ6W4VAS.js +0 -701
  34. package/dist/chunk-SZ6W4VAS.js.map +0 -1
  35. package/dist/d1.cjs +0 -2421
  36. package/dist/d1.cjs.map +0 -1
  37. package/dist/d1.d.cts +0 -54
  38. package/dist/d1.d.ts +0 -54
  39. package/dist/d1.js +0 -76
  40. package/dist/d1.js.map +0 -1
  41. package/dist/do-sqlite.cjs.map +0 -1
  42. package/dist/do-sqlite.d.cts +0 -41
  43. package/dist/do-sqlite.d.ts +0 -41
  44. package/dist/do-sqlite.js +0 -79
  45. package/dist/do-sqlite.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,8 +1,9 @@
1
- import { S as StorageBackend, F as FiregraphError } from './scope-path-D2mNENJ-.cjs';
2
- export { C as CrossBackendTransactionError, D as DynamicRegistryError, E as EdgeNotFoundError, I as InvalidQueryError, M as MigrationError, N as NodeNotFoundError, Q as QuerySafetyError, R as RegistryScopeError, c as RegistryViolationError, a as StorageScopeSegment, d as TraversalError, V as ValidationError, b as appendStorageScope, i as isAncestorScopeUid, p as parseStorageScope, r as resolveAncestorScope } from './scope-path-D2mNENJ-.cjs';
3
- import { G as GraphClientOptions, b as GraphClient, a as DynamicGraphClient, c as DiscoveryResult, R as RegistryEntry, d as GraphRegistry, e as GraphReader, M as MigrationExecutor, D as DynamicRegistryConfig, S as StoredGraphRecord, f as MigrationWriteBack, g as MigrationStep, F as FindEdgesParams, Q as QueryPlan, h as FindNodesParams, i as QueryFilter, j as GraphRecord, k as MigrationFn, l as StoredMigrationStep, T as TraversalBuilder } from './types-DfWVTsMn.cjs';
4
- export { B as BulkBatchError, m as BulkOptions, n as BulkProgress, o as BulkResult, C as CascadeResult, p as DefineTypeOptions, q as DiscoveredEntity, E as EdgeTopology, r as EdgeTypeData, s as FiregraphConfig, t as GraphBatch, u as GraphTransaction, v as GraphWriter, H as HopDefinition, w as HopResult, N as NodeTypeData, x as QueryMode, y as QueryOptions, z as ScanProtection, A as TraversalOptions, I as TraversalResult, V as ViewContext, J as ViewDefaultsConfig, K as ViewResolverConfig, W as WhereClause, L as defineConfig, O as resolveView } from './types-DfWVTsMn.cjs';
1
+ import { S as StorageBackend } from './backend-73p5Blx7.cjs';
2
+ import { G as GraphClientOptions, a as GraphClient, D as DynamicGraphClient, b as DiscoveryResult, R as RegistryEntry, c as GraphRegistry, d as GraphReader, M as MigrationExecutor, e as DynamicRegistryConfig, S as StoredGraphRecord, f as MigrationWriteBack, g as MigrationStep, F as FindEdgesParams, Q as QueryPlan, h as FindNodesParams, i as QueryFilter, j as GraphRecord, k as MigrationFn, l as StoredMigrationStep, T as TraversalBuilder } from './types-DOemdlVA.cjs';
3
+ export { B as BulkBatchError, m as BulkOptions, n as BulkProgress, o as BulkResult, C as CascadeResult, p as DefineTypeOptions, q as DiscoveredEntity, E as EdgeTopology, r as EdgeTypeData, s as FiregraphConfig, t as GraphBatch, u as GraphTransaction, v as GraphWriter, H as HopDefinition, w as HopResult, N as NodeTypeData, x as QueryMode, y as QueryOptions, z as ScanProtection, A as TraversalOptions, I as TraversalResult, V as ViewContext, J as ViewDefaultsConfig, K as ViewResolverConfig, W as WhereClause, L as defineConfig, O as resolveView } from './types-DOemdlVA.cjs';
5
4
  export { CodegenOptions, generateTypes } from './codegen/index.cjs';
5
+ import { F as FiregraphError } from './scope-path-B1G3YiA7.cjs';
6
+ export { C as CrossBackendTransactionError, D as DynamicRegistryError, E as EdgeNotFoundError, I as InvalidQueryError, M as MigrationError, N as NodeNotFoundError, Q as QuerySafetyError, R as RegistryScopeError, b as RegistryViolationError, S as StorageScopeSegment, T as TraversalError, V as ValidationError, a as appendStorageScope, i as isAncestorScopeUid, p as parseStorageScope, r as resolveAncestorScope } from './scope-path-B1G3YiA7.cjs';
6
7
  import { Firestore } from '@google-cloud/firestore';
7
8
  export { Q as QueryClient, a as QueryClientError, b as QueryClientErrorCode, c as QueryClientOptions } from './client-Bk2Cm6xv.cjs';
8
9
  export { E as EntityViewConfig, a as EntityViewMeta, V as ViewComponentClass, b as ViewMeta, c as ViewRegistry, d as ViewRegistryInput, e as defineViews } from './views-DL60k0cf.cjs';
@@ -10,9 +11,10 @@ export { E as EntityViewConfig, a as EntityViewMeta, V as ViewComponentClass, b
10
11
  /**
11
12
  * Create a `GraphClient` backed by an arbitrary `StorageBackend`.
12
13
  *
13
- * Used by backend-specific factories (D1, DO-SQLite, etc.) most callers
14
- * should use the higher-level `createGraphClient(firestore, ...)` overload
15
- * below or import the equivalent from `firegraph/d1` / `firegraph/do-sqlite`.
14
+ * Used by backend-specific factories (e.g. `createDOClient` in
15
+ * `firegraph/cloudflare`) — most callers should use the higher-level
16
+ * `createGraphClient(firestore, ...)` overload below for Firestore, or the
17
+ * Cloudflare factory for DO-backed graphs.
16
18
  */
17
19
  declare function createGraphClientFromBackend(backend: StorageBackend, options?: GraphClientOptions, metaBackend?: StorageBackend): GraphClient | DynamicGraphClient;
18
20
 
@@ -153,8 +155,10 @@ declare function createRegistryFromGraph(reader: GraphReader, executor?: Migrati
153
155
  * Firestore-specific client factory.
154
156
  *
155
157
  * Kept in its own module so that bundlers don't pull
156
- * `@google-cloud/firestore` into SQLite-only entry points
157
- * (`firegraph/d1`, `firegraph/do-sqlite`).
158
+ * `@google-cloud/firestore` into non-Firestore entry points — most
159
+ * importantly the Cloudflare DO backend (`firegraph/cloudflare`) and the
160
+ * routing primitive (`firegraph/backend`), both of which must load cleanly
161
+ * in a Workers environment where the Node Firestore SDK is unavailable.
158
162
  */
159
163
 
160
164
  declare function createGraphClient(db: Firestore, collectionPath: string, options: GraphClientOptions & {
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { S as StorageBackend, F as FiregraphError } from './scope-path-BtajqNK5.js';
2
- export { C as CrossBackendTransactionError, D as DynamicRegistryError, E as EdgeNotFoundError, I as InvalidQueryError, M as MigrationError, N as NodeNotFoundError, Q as QuerySafetyError, R as RegistryScopeError, c as RegistryViolationError, a as StorageScopeSegment, d as TraversalError, V as ValidationError, b as appendStorageScope, i as isAncestorScopeUid, p as parseStorageScope, r as resolveAncestorScope } from './scope-path-BtajqNK5.js';
3
- import { G as GraphClientOptions, b as GraphClient, a as DynamicGraphClient, c as DiscoveryResult, R as RegistryEntry, d as GraphRegistry, e as GraphReader, M as MigrationExecutor, D as DynamicRegistryConfig, S as StoredGraphRecord, f as MigrationWriteBack, g as MigrationStep, F as FindEdgesParams, Q as QueryPlan, h as FindNodesParams, i as QueryFilter, j as GraphRecord, k as MigrationFn, l as StoredMigrationStep, T as TraversalBuilder } from './types-DfWVTsMn.js';
4
- export { B as BulkBatchError, m as BulkOptions, n as BulkProgress, o as BulkResult, C as CascadeResult, p as DefineTypeOptions, q as DiscoveredEntity, E as EdgeTopology, r as EdgeTypeData, s as FiregraphConfig, t as GraphBatch, u as GraphTransaction, v as GraphWriter, H as HopDefinition, w as HopResult, N as NodeTypeData, x as QueryMode, y as QueryOptions, z as ScanProtection, A as TraversalOptions, I as TraversalResult, V as ViewContext, J as ViewDefaultsConfig, K as ViewResolverConfig, W as WhereClause, L as defineConfig, O as resolveView } from './types-DfWVTsMn.js';
1
+ import { S as StorageBackend } from './backend-BrqFkbid.js';
2
+ import { G as GraphClientOptions, a as GraphClient, D as DynamicGraphClient, b as DiscoveryResult, R as RegistryEntry, c as GraphRegistry, d as GraphReader, M as MigrationExecutor, e as DynamicRegistryConfig, S as StoredGraphRecord, f as MigrationWriteBack, g as MigrationStep, F as FindEdgesParams, Q as QueryPlan, h as FindNodesParams, i as QueryFilter, j as GraphRecord, k as MigrationFn, l as StoredMigrationStep, T as TraversalBuilder } from './types-DOemdlVA.js';
3
+ export { B as BulkBatchError, m as BulkOptions, n as BulkProgress, o as BulkResult, C as CascadeResult, p as DefineTypeOptions, q as DiscoveredEntity, E as EdgeTopology, r as EdgeTypeData, s as FiregraphConfig, t as GraphBatch, u as GraphTransaction, v as GraphWriter, H as HopDefinition, w as HopResult, N as NodeTypeData, x as QueryMode, y as QueryOptions, z as ScanProtection, A as TraversalOptions, I as TraversalResult, V as ViewContext, J as ViewDefaultsConfig, K as ViewResolverConfig, W as WhereClause, L as defineConfig, O as resolveView } from './types-DOemdlVA.js';
5
4
  export { CodegenOptions, generateTypes } from './codegen/index.js';
5
+ import { F as FiregraphError } from './scope-path-B1G3YiA7.js';
6
+ export { C as CrossBackendTransactionError, D as DynamicRegistryError, E as EdgeNotFoundError, I as InvalidQueryError, M as MigrationError, N as NodeNotFoundError, Q as QuerySafetyError, R as RegistryScopeError, b as RegistryViolationError, S as StorageScopeSegment, T as TraversalError, V as ValidationError, a as appendStorageScope, i as isAncestorScopeUid, p as parseStorageScope, r as resolveAncestorScope } from './scope-path-B1G3YiA7.js';
6
7
  import { Firestore } from '@google-cloud/firestore';
7
8
  export { Q as QueryClient, a as QueryClientError, b as QueryClientErrorCode, c as QueryClientOptions } from './client-Bk2Cm6xv.js';
8
9
  export { E as EntityViewConfig, a as EntityViewMeta, V as ViewComponentClass, b as ViewMeta, c as ViewRegistry, d as ViewRegistryInput, e as defineViews } from './views-DL60k0cf.js';
@@ -10,9 +11,10 @@ export { E as EntityViewConfig, a as EntityViewMeta, V as ViewComponentClass, b
10
11
  /**
11
12
  * Create a `GraphClient` backed by an arbitrary `StorageBackend`.
12
13
  *
13
- * Used by backend-specific factories (D1, DO-SQLite, etc.) most callers
14
- * should use the higher-level `createGraphClient(firestore, ...)` overload
15
- * below or import the equivalent from `firegraph/d1` / `firegraph/do-sqlite`.
14
+ * Used by backend-specific factories (e.g. `createDOClient` in
15
+ * `firegraph/cloudflare`) — most callers should use the higher-level
16
+ * `createGraphClient(firestore, ...)` overload below for Firestore, or the
17
+ * Cloudflare factory for DO-backed graphs.
16
18
  */
17
19
  declare function createGraphClientFromBackend(backend: StorageBackend, options?: GraphClientOptions, metaBackend?: StorageBackend): GraphClient | DynamicGraphClient;
18
20
 
@@ -153,8 +155,10 @@ declare function createRegistryFromGraph(reader: GraphReader, executor?: Migrati
153
155
  * Firestore-specific client factory.
154
156
  *
155
157
  * Kept in its own module so that bundlers don't pull
156
- * `@google-cloud/firestore` into SQLite-only entry points
157
- * (`firegraph/d1`, `firegraph/do-sqlite`).
158
+ * `@google-cloud/firestore` into non-Firestore entry points — most
159
+ * importantly the Cloudflare DO backend (`firegraph/cloudflare`) and the
160
+ * routing primitive (`firegraph/backend`), both of which must load cleanly
161
+ * in a Workers environment where the Node Firestore SDK is unavailable.
158
162
  */
159
163
 
160
164
  declare function createGraphClient(db: Firestore, collectionPath: string, options: GraphClientOptions & {
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- import {
2
- SERIALIZATION_TAG,
3
- deserializeFirestoreTypes,
4
- isTaggedValue,
5
- serializeFirestoreTypes
6
- } from "./chunk-5753Y42M.js";
7
1
  import {
8
2
  appendStorageScope,
9
3
  isAncestorScopeUid,
@@ -43,7 +37,7 @@ import {
43
37
  migrateRecords,
44
38
  precompileSource,
45
39
  validateMigrationChain
46
- } from "./chunk-EVUM6ORB.js";
40
+ } from "./chunk-LZOIQHYN.js";
47
41
  import {
48
42
  CrossBackendTransactionError,
49
43
  DynamicRegistryError,
@@ -57,7 +51,7 @@ import {
57
51
  RegistryViolationError,
58
52
  TraversalError,
59
53
  ValidationError
60
- } from "./chunk-GLOVWKQH.js";
54
+ } from "./chunk-R7CRGYY4.js";
61
55
  import {
62
56
  generateTypes
63
57
  } from "./chunk-YLGXLEUE.js";
@@ -65,6 +59,12 @@ import {
65
59
  QueryClient,
66
60
  QueryClientError
67
61
  } from "./chunk-SU4FNLC3.js";
62
+ import {
63
+ SERIALIZATION_TAG,
64
+ deserializeFirestoreTypes,
65
+ isTaggedValue,
66
+ serializeFirestoreTypes
67
+ } from "./chunk-5753Y42M.js";
68
68
 
69
69
  // src/config.ts
70
70
  function defineConfig(config) {