@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.js CHANGED
@@ -2650,14 +2650,19 @@ async function importLocalWorldData(dir, rows, opts, creds) {
2650
2650
  files: readWorldFiles(dir),
2651
2651
  rows,
2652
2652
  mode: opts.mode ?? "append",
2653
+ ...opts.merge && opts.merge !== "upsert" ? { merge: opts.merge } : {},
2653
2654
  ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {}
2654
2655
  });
2655
2656
  if (res.files?.length) writeWorldFiles(dir, res.files);
2656
- if (res.changed) dropBuildOutputs(dir);
2657
+ const dropped = res.changed ? dropBuildOutputs(dir) : [];
2657
2658
  return {
2658
2659
  kind: res.kind ?? "unknown",
2659
2660
  entity_counts: res.entity_counts ?? {},
2660
- changed: Boolean(res.changed)
2661
+ changed: Boolean(res.changed),
2662
+ ...dropped.length ? {
2663
+ dropped_build_outputs: dropped,
2664
+ next: `gateway worlds schema compile ${dir} # rebuilds the snapshots from the imported data`
2665
+ } : {}
2661
2666
  };
2662
2667
  }
2663
2668
  function dropBuildOutputs(dir) {
@@ -3832,7 +3837,7 @@ var require_package = __commonJS({
3832
3837
  "package.json"(exports2, module2) {
3833
3838
  module2.exports = {
3834
3839
  name: "@withgateway/sdk",
3835
- version: "0.2.1",
3840
+ version: "0.2.2",
3836
3841
  description: "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
3837
3842
  main: "./dist/index.js",
3838
3843
  module: "./dist/index.mjs",