@withgateway/sdk 0.2.1 → 0.2.2

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/index.mjs CHANGED
@@ -2638,14 +2638,19 @@ async function importLocalWorldData(dir, rows, opts, creds) {
2638
2638
  files: readWorldFiles(dir),
2639
2639
  rows,
2640
2640
  mode: opts.mode ?? "append",
2641
+ ...opts.merge && opts.merge !== "upsert" ? { merge: opts.merge } : {},
2641
2642
  ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {}
2642
2643
  });
2643
2644
  if (res.files?.length) writeWorldFiles(dir, res.files);
2644
- if (res.changed) dropBuildOutputs(dir);
2645
+ const dropped = res.changed ? dropBuildOutputs(dir) : [];
2645
2646
  return {
2646
2647
  kind: res.kind ?? "unknown",
2647
2648
  entity_counts: res.entity_counts ?? {},
2648
- changed: Boolean(res.changed)
2649
+ changed: Boolean(res.changed),
2650
+ ...dropped.length ? {
2651
+ dropped_build_outputs: dropped,
2652
+ next: `gateway worlds schema compile ${dir} # rebuilds the snapshots from the imported data`
2653
+ } : {}
2649
2654
  };
2650
2655
  }
2651
2656
  function dropBuildOutputs(dir) {
@@ -3817,7 +3822,7 @@ var require_package = __commonJS({
3817
3822
  "package.json"(exports, module) {
3818
3823
  module.exports = {
3819
3824
  name: "@withgateway/sdk",
3820
- version: "0.2.1",
3825
+ version: "0.2.2",
3821
3826
  description: "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
3822
3827
  main: "./dist/index.js",
3823
3828
  module: "./dist/index.mjs",