@bettercms-ai/convert 0.12.1 → 0.13.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @bettercms-ai/convert
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0b05aa6: The forms receipt names the file each wired form is in
8
+
9
+ `receipt.forms.wiredForms` lists `{ id, file }` for every form on the site after a
10
+ `--forms` run — wired now or by an earlier one. The server matches the file to the
11
+ component recorded as its owner, so the Forms tab and a component's form prop can say
12
+ which component renders each form. Additive: `wired` is still a number, and a server
13
+ that has never heard of the list accepts the receipt unchanged.
14
+
3
15
  ## 0.12.1
4
16
 
5
17
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -6511,11 +6511,11 @@ async function wireForms(briefIn, sources) {
6511
6511
  }
6512
6512
  if (attrOf(candidate.el, "data-bcms-form")) {
6513
6513
  alreadyWired++;
6514
- onSite.push(form);
6514
+ onSite.push({ form, file: candidate.file });
6515
6515
  continue;
6516
6516
  }
6517
6517
  matched.push({ form, candidate });
6518
- onSite.push(form);
6518
+ onSite.push({ form, file: candidate.file });
6519
6519
  }
6520
6520
  const contents = new Map(sources.map((s) => [s.path, s.content]));
6521
6521
  const byFile = /* @__PURE__ */ new Map();
@@ -6533,7 +6533,7 @@ ${indent}${scriptFor(last.candidate.dialect)}`);
6533
6533
  }
6534
6534
  files.push({ path, operation: "modify", content: source.toString() });
6535
6535
  }
6536
- const notes = onSite.filter((f) => f.status === "draft").map((f) => `publish form ${f.name} in the Forms tab \u2014 a draft form rejects every submission with 403.`);
6536
+ const notes = onSite.filter(({ form }) => form.status === "draft").map(({ form }) => `publish form ${form.name} in the Forms tab \u2014 a draft form rejects every submission with 403.`);
6537
6537
  return {
6538
6538
  files,
6539
6539
  receipt: {
@@ -6550,7 +6550,9 @@ ${indent}${scriptFor(last.candidate.dialect)}`);
6550
6550
  wired: matched.length,
6551
6551
  alreadyWired,
6552
6552
  pending,
6553
- ...notes.length > 0 ? { notes } : {}
6553
+ ...notes.length > 0 ? { notes } : {},
6554
+ // Always, even empty: a run where every form went pending must retire the files an earlier one named.
6555
+ wiredForms: onSite.map(({ form, file }) => ({ id: form.id, file }))
6554
6556
  })
6555
6557
  }
6556
6558
  };
@@ -9605,7 +9607,7 @@ function emitStubs2(dialects, slugs, contents, out) {
9605
9607
  // package.json
9606
9608
  var package_default = {
9607
9609
  name: "@bettercms-ai/convert",
9608
- version: "0.12.1",
9610
+ version: "0.13.0",
9609
9611
  type: "module",
9610
9612
  description: "Deterministic codemod that turns an imported site's text-matched bindings into declared ones \u2014 parser offsets in, one magic-string pass out, plus a receipt of everything it could not do.",
9611
9613
  bin: {