@secondlayer/subgraphs 3.14.4 → 3.15.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.
package/dist/src/index.js CHANGED
@@ -381,7 +381,8 @@ class SubgraphContext {
381
381
  const clean = stripControlKeys(op.data);
382
382
  const idx = upsertKeys ? result.findIndex((r) => upsertKeys.every((k) => valEq(r[k], clean[k]))) : -1;
383
383
  if (idx >= 0) {
384
- result[idx] = this.applyOpToRow(op, result[idx], where) ?? result[idx];
384
+ const existing = result[idx];
385
+ result[idx] = this.applyOpToRow(op, existing, where) ?? existing;
385
386
  } else {
386
387
  const created = this.applyOpToRow(op, null, where);
387
388
  if (created)
@@ -3820,7 +3821,7 @@ function renderDeployPlan(def, schemaName) {
3820
3821
  "-- Run once on YOUR database as an owner/superuser, replacing <role>",
3821
3822
  "-- with the role whose credentials you give Secondlayer.",
3822
3823
  "-- Secondlayer then creates and owns only this one schema:",
3823
- `GRANT CREATE ON DATABASE current_database() TO <role>;`,
3824
+ "GRANT CREATE ON DATABASE current_database() TO <role>;",
3824
3825
  `-- (after first deploy <role> owns "${schema}"; no further grants needed)`
3825
3826
  ].join(`
3826
3827
  `);
@@ -4028,5 +4029,5 @@ export {
4028
4029
  ByoBreakingChangeError
4029
4030
  };
4030
4031
 
4031
- //# debugId=43A9769D4DEED50064756E2164756E21
4032
+ //# debugId=A05B04227E2702A264756E2164756E21
4032
4033
  //# sourceMappingURL=index.js.map