@crvouga/mockingbird-runtime 0.0.2 → 0.2.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.
@@ -49,7 +49,7 @@ import {
49
49
  toHex,
50
50
  upstreamRequest,
51
51
  upstreamState
52
- } from "./chunk-XNS34BPF.js";
52
+ } from "./chunk-LL6NKAJO.js";
53
53
  import {
54
54
  Timeline,
55
55
  forwardMountContext,
@@ -5768,8 +5768,8 @@ var stateAdminRoutes = (routes) => {
5768
5768
  };
5769
5769
 
5770
5770
  // ../service/core/dist/version.js
5771
- var UNRELEASED_VERSION = "0.0.2";
5772
- var PACKAGE_VERSION = true ? "0.0.2" : UNRELEASED_VERSION;
5771
+ var UNRELEASED_VERSION = "0.2.0";
5772
+ var PACKAGE_VERSION = true ? "0.2.0" : UNRELEASED_VERSION;
5773
5773
 
5774
5774
  // ../service/core/dist/webhooks.js
5775
5775
  var signers = {
@@ -6463,6 +6463,7 @@ var createRuntime = (options) => {
6463
6463
  const timelines = /* @__PURE__ */ new Map();
6464
6464
  const branchStorage = /* @__PURE__ */ new Map();
6465
6465
  const captured = /* @__PURE__ */ new Map();
6466
+ const checkpointMutations = (options.checkpointMutations ?? boot.checkpointMutations) !== false;
6466
6467
  const credentials = createCredentialRegistry();
6467
6468
  for (const [credential, target] of Object.entries(boot.credentials))
6468
6469
  credentials.set(credential, target);
@@ -7327,7 +7328,7 @@ var createRuntime = (options) => {
7327
7328
  effects.set(request, fired.map((hit) => hit.effect));
7328
7329
  let active = true;
7329
7330
  acceptance.set(request, (notes) => {
7330
- if (!active || accepted || !MUTATING_METHODS.has(request.method))
7331
+ if (!checkpointMutations || !active || accepted || !MUTATING_METHODS.has(request.method))
7331
7332
  return;
7332
7333
  accepted = timeline(namespace).commit(capture(storage), { branch: selectedBranch });
7333
7334
  acceptedNotes = notes;
@@ -7343,7 +7344,7 @@ var createRuntime = (options) => {
7343
7344
  acceptance.delete(request);
7344
7345
  }
7345
7346
  const wireStatus = responseNotes(response)?.wireStatus ?? response.status;
7346
- if (MUTATING_METHODS.has(request.method) && wireStatus >= 200 && wireStatus < 400) {
7347
+ if (checkpointMutations && MUTATING_METHODS.has(request.method) && wireStatus >= 200 && wireStatus < 400) {
7347
7348
  const current = capture(storage);
7348
7349
  const unchanged = accepted && timeline(namespace).head(selectedBranch)?.id === accepted.id && current.snapshot.records === accepted.value.snapshot.records && current.snapshot.sequences === accepted.value.snapshot.sequences && current.rngState === accepted.value.rngState;
7349
7350
  const point = unchanged && accepted ? accepted : timeline(namespace).commit(current, { branch: selectedBranch });
@@ -7661,4 +7662,4 @@ export {
7661
7662
  signV4,
7662
7663
  putObject
7663
7664
  };
7664
- //# sourceMappingURL=chunk-G62YDIIJ.js.map
7665
+ //# sourceMappingURL=chunk-OISPHKE2.js.map