graphddb 0.5.2 → 0.5.3

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.
@@ -7,7 +7,7 @@ import {
7
7
  buildMaintenanceGraph,
8
8
  buildPutInput,
9
9
  resolveModelClass
10
- } from "./chunk-W3GEJPPV.js";
10
+ } from "./chunk-CCIVET5K.js";
11
11
 
12
12
  // src/cdc/prng.ts
13
13
  var SeededRandom = class {
@@ -793,6 +793,9 @@ function createMaintenanceDrainHandler(opts = {}) {
793
793
  }
794
794
 
795
795
  export {
796
+ SeededRandom,
797
+ hashString,
798
+ shardIdFor,
796
799
  CdcEmulator,
797
800
  createCdcEmulator,
798
801
  pathField,
@@ -0,0 +1,24 @@
1
+ // src/linter/rules/query-boundary.ts
2
+ var queryBoundaryRule = {
3
+ id: "query-boundary",
4
+ severity: "error",
5
+ check(metadata) {
6
+ const results = [];
7
+ for (const gsi of metadata.gsiDefinitions) {
8
+ if (!gsi.unique) {
9
+ results.push({
10
+ ruleId: "query-boundary",
11
+ severity: "error",
12
+ message: `GSI '${gsi.indexName}' on entity '${metadata.prefix}' is not marked as unique. Using query() on a non-unique GSI may return multiple items. Use list() instead, or mark the GSI as unique if it guarantees single results.`,
13
+ entity: metadata.prefix,
14
+ field: gsi.indexName
15
+ });
16
+ }
17
+ }
18
+ return results;
19
+ }
20
+ };
21
+
22
+ export {
23
+ queryBoundaryRule
24
+ };