@openhi/constructs 0.0.90 → 0.0.91

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.
@@ -4,13 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
7
+ var __commonJS = (cb, mod) => function __require() {
14
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
9
  };
16
10
  var __copyProps = (to, from, except, desc) => {
@@ -31,8 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
25
  ));
32
26
 
33
27
  export {
34
- __require,
35
28
  __commonJS,
36
29
  __toESM
37
30
  };
38
- //# sourceMappingURL=chunk-LZOMFHX3.mjs.map
31
+ //# sourceMappingURL=chunk-3QS3WKRC.mjs.map
@@ -1,4 +1,4 @@
1
- import "./chunk-LZOMFHX3.mjs";
1
+ import "./chunk-3QS3WKRC.mjs";
2
2
 
3
3
  // src/data/lambda/cors-options-lambda.handler.ts
4
4
  var handler = async (_event) => {
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  dynamodbImageToPlain
7
7
  } from "./chunk-CEOAGPYY.mjs";
8
- import "./chunk-LZOMFHX3.mjs";
8
+ import "./chunk-3QS3WKRC.mjs";
9
9
 
10
10
  // src/components/postgres/data-store-postgres-replication.handler.ts
11
11
  import {
@@ -4,7 +4,7 @@ import {
4
4
  shouldDropAsGlobalTableReplicationRecord
5
5
  } from "./chunk-X5MHU7DA.mjs";
6
6
  import "./chunk-CEOAGPYY.mjs";
7
- import "./chunk-LZOMFHX3.mjs";
7
+ import "./chunk-3QS3WKRC.mjs";
8
8
  export {
9
9
  handler,
10
10
  parseCurrentResourceKeys,
package/lib/index.js CHANGED
@@ -1026,13 +1026,20 @@ var DynamoDbDataStore = class extends import_aws_dynamodb.Table {
1026
1026
  },
1027
1027
  projectionType: import_aws_dynamodb.ProjectionType.INCLUDE,
1028
1028
  nonKeyAttributes: [
1029
+ "id",
1029
1030
  "summary",
1030
1031
  "vid",
1031
1032
  "lastUpdated",
1032
1033
  "createdDate",
1033
1034
  "modifiedDate",
1034
1035
  "createdById",
1035
- "modifiedById"
1036
+ "modifiedById",
1037
+ // ElectroDB filters every query result through `ownsItem`, which
1038
+ // verifies `__edb_e__` (entity name) and `__edb_v__` (version) match
1039
+ // the entity. Without these projected, every GSI1 query returns 0
1040
+ // results — list endpoints silently return empty bundles.
1041
+ "__edb_e__",
1042
+ "__edb_v__"
1036
1043
  ]
1037
1044
  });
1038
1045
  this.addGlobalSecondaryIndex({
@@ -1050,7 +1057,12 @@ var DynamoDbDataStore = class extends import_aws_dynamodb.Table {
1050
1057
  "id",
1051
1058
  "currentTenant",
1052
1059
  "currentWorkspace",
1053
- "displayName"
1060
+ "displayName",
1061
+ // See GSI1 above: ElectroDB's `ownsItem` filter rejects items
1062
+ // without these, so any query against GSI2 returns 0 results
1063
+ // unless they're projected.
1064
+ "__edb_e__",
1065
+ "__edb_v__"
1054
1066
  ]
1055
1067
  });
1056
1068
  }