@ai-matrx/records 0.81.1 → 0.81.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.
@@ -2017,6 +2017,13 @@ function compileInstallPlan(written) {
2017
2017
  save: { [`forms.${f.token}`]: [] },
2018
2018
  made: [{ kind: "form", ref: `forms.${f.token}`, title: f.name, table: `tables.${f.table}` }]
2019
2019
  });
2020
+ if (spec.publishForms !== false) {
2021
+ steps.push({
2022
+ label: `forms.${f.token}.publish`,
2023
+ door: "anon_publish",
2024
+ args: { p_organization_id: "${org}", p_form_id: ref(`forms.${f.token}`), p_published: true }
2025
+ });
2026
+ }
2020
2027
  }
2021
2028
  const actionsByTable = /* @__PURE__ */ new Map();
2022
2029
  const formRefs = Object.fromEntries(spec.forms.map((f) => [f.token, ref(`forms.${f.token}`)]));
@@ -2465,6 +2472,12 @@ function templateWorld(spec, options = {}) {
2465
2472
  });
2466
2473
  break;
2467
2474
  }
2475
+ case "anon_publish": {
2476
+ const id = String(args["p_form_id"] ?? "");
2477
+ const form = world.forms.find((f) => f.form_id === id);
2478
+ if (form) form.published = args["p_published"] !== false;
2479
+ break;
2480
+ }
2468
2481
  case "dashboard_declare": {
2469
2482
  if (!tableId) break;
2470
2483
  const save = step.save ? Object.keys(step.save)[0] : step.label;