@turbofy-ai/app-runtime 0.0.19 → 0.0.21

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/src/dsl.js CHANGED
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/short-unique-id/dist/short-unique-id.js
31
+ // ../../node_modules/short-unique-id/dist/short-unique-id.js
32
32
  var require_short_unique_id = __commonJS({
33
- "../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/short-unique-id/dist/short-unique-id.js"(exports, module) {
33
+ "../../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module) {
34
34
  "use strict";
35
35
  var ShortUniqueId2 = (() => {
36
36
  var __defProp2 = Object.defineProperty;
@@ -583,9 +583,36 @@ function pageLocalizedConfigCode() {
583
583
  });
584
584
  };
585
585
 
586
+ const resolveJsonLd = (value) => {
587
+ if (typeof value !== 'string') return value;
588
+ let parsed;
589
+ try {
590
+ parsed = JSON.parse(value);
591
+ } catch (error) {
592
+ return value;
593
+ }
594
+ const walk = (node) => {
595
+ if (typeof node === 'string') return resolvePlaceholders(node, {});
596
+ if (Array.isArray(node)) return node.map(walk);
597
+ if (node && typeof node === 'object') {
598
+ const next = {};
599
+ for (const childKey in node) next[childKey] = walk(node[childKey]);
600
+ return next;
601
+ }
602
+ return node;
603
+ };
604
+ try {
605
+ return JSON.stringify(walk(parsed));
606
+ } catch (error) {
607
+ return value;
608
+ }
609
+ };
610
+
586
611
  const meta = {};
587
612
  for (const key in rawMeta) {
588
- const value = resolvePlaceholders(rawMeta[key], {});
613
+ const value = key === 'jsonLd'
614
+ ? resolveJsonLd(rawMeta[key])
615
+ : resolvePlaceholders(rawMeta[key], {});
589
616
  if (value == null || value === '') continue;
590
617
  meta[key] = value;
591
618
  }
@@ -637,7 +664,7 @@ function blockDynamicDataCode(blockTypeTableId) {
637
664
  ].join("\n");
638
665
  }
639
666
 
640
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/external.js
667
+ // ../../node_modules/zod/v4/classic/external.js
641
668
  var external_exports = {};
642
669
  __export(external_exports, {
643
670
  $brand: () => $brand,
@@ -878,7 +905,7 @@ __export(external_exports, {
878
905
  xor: () => xor
879
906
  });
880
907
 
881
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/index.js
908
+ // ../../node_modules/zod/v4/core/index.js
882
909
  var core_exports2 = {};
883
910
  __export(core_exports2, {
884
911
  $ZodAny: () => $ZodAny,
@@ -1156,7 +1183,7 @@ __export(core_exports2, {
1156
1183
  version: () => version
1157
1184
  });
1158
1185
 
1159
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/core.js
1186
+ // ../../node_modules/zod/v4/core/core.js
1160
1187
  var NEVER = Object.freeze({
1161
1188
  status: "aborted"
1162
1189
  });
@@ -1231,7 +1258,7 @@ function config(newConfig) {
1231
1258
  return globalConfig;
1232
1259
  }
1233
1260
 
1234
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/util.js
1261
+ // ../../node_modules/zod/v4/core/util.js
1235
1262
  var util_exports = {};
1236
1263
  __export(util_exports, {
1237
1264
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -1910,7 +1937,7 @@ var Class = class {
1910
1937
  }
1911
1938
  };
1912
1939
 
1913
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/errors.js
1940
+ // ../../node_modules/zod/v4/core/errors.js
1914
1941
  var initializer = (inst, def) => {
1915
1942
  inst.name = "$ZodError";
1916
1943
  Object.defineProperty(inst, "_zod", {
@@ -2046,7 +2073,7 @@ function prettifyError(error48) {
2046
2073
  return lines.join("\n");
2047
2074
  }
2048
2075
 
2049
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/parse.js
2076
+ // ../../node_modules/zod/v4/core/parse.js
2050
2077
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
2051
2078
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
2052
2079
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -2134,7 +2161,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
2134
2161
  };
2135
2162
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
2136
2163
 
2137
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/regexes.js
2164
+ // ../../node_modules/zod/v4/core/regexes.js
2138
2165
  var regexes_exports = {};
2139
2166
  __export(regexes_exports, {
2140
2167
  base64: () => base64,
@@ -2291,7 +2318,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
2291
2318
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
2292
2319
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
2293
2320
 
2294
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/checks.js
2321
+ // ../../node_modules/zod/v4/core/checks.js
2295
2322
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2296
2323
  var _a2;
2297
2324
  inst._zod ?? (inst._zod = {});
@@ -2839,7 +2866,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
2839
2866
  };
2840
2867
  });
2841
2868
 
2842
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/doc.js
2869
+ // ../../node_modules/zod/v4/core/doc.js
2843
2870
  var Doc = class {
2844
2871
  constructor(args = []) {
2845
2872
  this.content = [];
@@ -2875,14 +2902,14 @@ var Doc = class {
2875
2902
  }
2876
2903
  };
2877
2904
 
2878
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/versions.js
2905
+ // ../../node_modules/zod/v4/core/versions.js
2879
2906
  var version = {
2880
2907
  major: 4,
2881
2908
  minor: 3,
2882
2909
  patch: 6
2883
2910
  };
2884
2911
 
2885
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/schemas.js
2912
+ // ../../node_modules/zod/v4/core/schemas.js
2886
2913
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2887
2914
  var _a2;
2888
2915
  inst ?? (inst = {});
@@ -4853,7 +4880,7 @@ function handleRefineResult(result, payload, input, inst) {
4853
4880
  }
4854
4881
  }
4855
4882
 
4856
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/index.js
4883
+ // ../../node_modules/zod/v4/locales/index.js
4857
4884
  var locales_exports = {};
4858
4885
  __export(locales_exports, {
4859
4886
  ar: () => ar_default,
@@ -4907,7 +4934,7 @@ __export(locales_exports, {
4907
4934
  zhTW: () => zh_TW_default
4908
4935
  });
4909
4936
 
4910
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ar.js
4937
+ // ../../node_modules/zod/v4/locales/ar.js
4911
4938
  var error = () => {
4912
4939
  const Sizable = {
4913
4940
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -5014,7 +5041,7 @@ function ar_default() {
5014
5041
  };
5015
5042
  }
5016
5043
 
5017
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/az.js
5044
+ // ../../node_modules/zod/v4/locales/az.js
5018
5045
  var error2 = () => {
5019
5046
  const Sizable = {
5020
5047
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -5120,7 +5147,7 @@ function az_default() {
5120
5147
  };
5121
5148
  }
5122
5149
 
5123
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/be.js
5150
+ // ../../node_modules/zod/v4/locales/be.js
5124
5151
  function getBelarusianPlural(count, one, few, many) {
5125
5152
  const absCount = Math.abs(count);
5126
5153
  const lastDigit = absCount % 10;
@@ -5277,7 +5304,7 @@ function be_default() {
5277
5304
  };
5278
5305
  }
5279
5306
 
5280
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/bg.js
5307
+ // ../../node_modules/zod/v4/locales/bg.js
5281
5308
  var error4 = () => {
5282
5309
  const Sizable = {
5283
5310
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -5398,7 +5425,7 @@ function bg_default() {
5398
5425
  };
5399
5426
  }
5400
5427
 
5401
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ca.js
5428
+ // ../../node_modules/zod/v4/locales/ca.js
5402
5429
  var error5 = () => {
5403
5430
  const Sizable = {
5404
5431
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -5507,7 +5534,7 @@ function ca_default() {
5507
5534
  };
5508
5535
  }
5509
5536
 
5510
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/cs.js
5537
+ // ../../node_modules/zod/v4/locales/cs.js
5511
5538
  var error6 = () => {
5512
5539
  const Sizable = {
5513
5540
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -5619,7 +5646,7 @@ function cs_default() {
5619
5646
  };
5620
5647
  }
5621
5648
 
5622
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/da.js
5649
+ // ../../node_modules/zod/v4/locales/da.js
5623
5650
  var error7 = () => {
5624
5651
  const Sizable = {
5625
5652
  string: { unit: "tegn", verb: "havde" },
@@ -5735,7 +5762,7 @@ function da_default() {
5735
5762
  };
5736
5763
  }
5737
5764
 
5738
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/de.js
5765
+ // ../../node_modules/zod/v4/locales/de.js
5739
5766
  var error8 = () => {
5740
5767
  const Sizable = {
5741
5768
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -5844,7 +5871,7 @@ function de_default() {
5844
5871
  };
5845
5872
  }
5846
5873
 
5847
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/en.js
5874
+ // ../../node_modules/zod/v4/locales/en.js
5848
5875
  var error9 = () => {
5849
5876
  const Sizable = {
5850
5877
  string: { unit: "characters", verb: "to have" },
@@ -5953,7 +5980,7 @@ function en_default() {
5953
5980
  };
5954
5981
  }
5955
5982
 
5956
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/eo.js
5983
+ // ../../node_modules/zod/v4/locales/eo.js
5957
5984
  var error10 = () => {
5958
5985
  const Sizable = {
5959
5986
  string: { unit: "karaktrojn", verb: "havi" },
@@ -6063,7 +6090,7 @@ function eo_default() {
6063
6090
  };
6064
6091
  }
6065
6092
 
6066
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/es.js
6093
+ // ../../node_modules/zod/v4/locales/es.js
6067
6094
  var error11 = () => {
6068
6095
  const Sizable = {
6069
6096
  string: { unit: "caracteres", verb: "tener" },
@@ -6196,7 +6223,7 @@ function es_default() {
6196
6223
  };
6197
6224
  }
6198
6225
 
6199
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/fa.js
6226
+ // ../../node_modules/zod/v4/locales/fa.js
6200
6227
  var error12 = () => {
6201
6228
  const Sizable = {
6202
6229
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -6311,7 +6338,7 @@ function fa_default() {
6311
6338
  };
6312
6339
  }
6313
6340
 
6314
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/fi.js
6341
+ // ../../node_modules/zod/v4/locales/fi.js
6315
6342
  var error13 = () => {
6316
6343
  const Sizable = {
6317
6344
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -6424,7 +6451,7 @@ function fi_default() {
6424
6451
  };
6425
6452
  }
6426
6453
 
6427
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/fr.js
6454
+ // ../../node_modules/zod/v4/locales/fr.js
6428
6455
  var error14 = () => {
6429
6456
  const Sizable = {
6430
6457
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -6533,7 +6560,7 @@ function fr_default() {
6533
6560
  };
6534
6561
  }
6535
6562
 
6536
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/fr-CA.js
6563
+ // ../../node_modules/zod/v4/locales/fr-CA.js
6537
6564
  var error15 = () => {
6538
6565
  const Sizable = {
6539
6566
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -6641,7 +6668,7 @@ function fr_CA_default() {
6641
6668
  };
6642
6669
  }
6643
6670
 
6644
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/he.js
6671
+ // ../../node_modules/zod/v4/locales/he.js
6645
6672
  var error16 = () => {
6646
6673
  const TypeNames = {
6647
6674
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -6836,7 +6863,7 @@ function he_default() {
6836
6863
  };
6837
6864
  }
6838
6865
 
6839
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/hu.js
6866
+ // ../../node_modules/zod/v4/locales/hu.js
6840
6867
  var error17 = () => {
6841
6868
  const Sizable = {
6842
6869
  string: { unit: "karakter", verb: "legyen" },
@@ -6945,7 +6972,7 @@ function hu_default() {
6945
6972
  };
6946
6973
  }
6947
6974
 
6948
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/hy.js
6975
+ // ../../node_modules/zod/v4/locales/hy.js
6949
6976
  function getArmenianPlural(count, one, many) {
6950
6977
  return Math.abs(count) === 1 ? one : many;
6951
6978
  }
@@ -7093,7 +7120,7 @@ function hy_default() {
7093
7120
  };
7094
7121
  }
7095
7122
 
7096
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/id.js
7123
+ // ../../node_modules/zod/v4/locales/id.js
7097
7124
  var error19 = () => {
7098
7125
  const Sizable = {
7099
7126
  string: { unit: "karakter", verb: "memiliki" },
@@ -7200,7 +7227,7 @@ function id_default() {
7200
7227
  };
7201
7228
  }
7202
7229
 
7203
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/is.js
7230
+ // ../../node_modules/zod/v4/locales/is.js
7204
7231
  var error20 = () => {
7205
7232
  const Sizable = {
7206
7233
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -7310,7 +7337,7 @@ function is_default() {
7310
7337
  };
7311
7338
  }
7312
7339
 
7313
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/it.js
7340
+ // ../../node_modules/zod/v4/locales/it.js
7314
7341
  var error21 = () => {
7315
7342
  const Sizable = {
7316
7343
  string: { unit: "caratteri", verb: "avere" },
@@ -7419,7 +7446,7 @@ function it_default() {
7419
7446
  };
7420
7447
  }
7421
7448
 
7422
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ja.js
7449
+ // ../../node_modules/zod/v4/locales/ja.js
7423
7450
  var error22 = () => {
7424
7451
  const Sizable = {
7425
7452
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -7527,7 +7554,7 @@ function ja_default() {
7527
7554
  };
7528
7555
  }
7529
7556
 
7530
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ka.js
7557
+ // ../../node_modules/zod/v4/locales/ka.js
7531
7558
  var error23 = () => {
7532
7559
  const Sizable = {
7533
7560
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -7640,7 +7667,7 @@ function ka_default() {
7640
7667
  };
7641
7668
  }
7642
7669
 
7643
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/km.js
7670
+ // ../../node_modules/zod/v4/locales/km.js
7644
7671
  var error24 = () => {
7645
7672
  const Sizable = {
7646
7673
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7751,12 +7778,12 @@ function km_default() {
7751
7778
  };
7752
7779
  }
7753
7780
 
7754
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/kh.js
7781
+ // ../../node_modules/zod/v4/locales/kh.js
7755
7782
  function kh_default() {
7756
7783
  return km_default();
7757
7784
  }
7758
7785
 
7759
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ko.js
7786
+ // ../../node_modules/zod/v4/locales/ko.js
7760
7787
  var error25 = () => {
7761
7788
  const Sizable = {
7762
7789
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -7868,7 +7895,7 @@ function ko_default() {
7868
7895
  };
7869
7896
  }
7870
7897
 
7871
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/lt.js
7898
+ // ../../node_modules/zod/v4/locales/lt.js
7872
7899
  var capitalizeFirstCharacter = (text) => {
7873
7900
  return text.charAt(0).toUpperCase() + text.slice(1);
7874
7901
  };
@@ -8072,7 +8099,7 @@ function lt_default() {
8072
8099
  };
8073
8100
  }
8074
8101
 
8075
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/mk.js
8102
+ // ../../node_modules/zod/v4/locales/mk.js
8076
8103
  var error27 = () => {
8077
8104
  const Sizable = {
8078
8105
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -8182,7 +8209,7 @@ function mk_default() {
8182
8209
  };
8183
8210
  }
8184
8211
 
8185
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ms.js
8212
+ // ../../node_modules/zod/v4/locales/ms.js
8186
8213
  var error28 = () => {
8187
8214
  const Sizable = {
8188
8215
  string: { unit: "aksara", verb: "mempunyai" },
@@ -8290,7 +8317,7 @@ function ms_default() {
8290
8317
  };
8291
8318
  }
8292
8319
 
8293
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/nl.js
8320
+ // ../../node_modules/zod/v4/locales/nl.js
8294
8321
  var error29 = () => {
8295
8322
  const Sizable = {
8296
8323
  string: { unit: "tekens", verb: "heeft" },
@@ -8401,7 +8428,7 @@ function nl_default() {
8401
8428
  };
8402
8429
  }
8403
8430
 
8404
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/no.js
8431
+ // ../../node_modules/zod/v4/locales/no.js
8405
8432
  var error30 = () => {
8406
8433
  const Sizable = {
8407
8434
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -8510,7 +8537,7 @@ function no_default() {
8510
8537
  };
8511
8538
  }
8512
8539
 
8513
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ota.js
8540
+ // ../../node_modules/zod/v4/locales/ota.js
8514
8541
  var error31 = () => {
8515
8542
  const Sizable = {
8516
8543
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -8620,7 +8647,7 @@ function ota_default() {
8620
8647
  };
8621
8648
  }
8622
8649
 
8623
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ps.js
8650
+ // ../../node_modules/zod/v4/locales/ps.js
8624
8651
  var error32 = () => {
8625
8652
  const Sizable = {
8626
8653
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -8735,7 +8762,7 @@ function ps_default() {
8735
8762
  };
8736
8763
  }
8737
8764
 
8738
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/pl.js
8765
+ // ../../node_modules/zod/v4/locales/pl.js
8739
8766
  var error33 = () => {
8740
8767
  const Sizable = {
8741
8768
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -8845,7 +8872,7 @@ function pl_default() {
8845
8872
  };
8846
8873
  }
8847
8874
 
8848
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/pt.js
8875
+ // ../../node_modules/zod/v4/locales/pt.js
8849
8876
  var error34 = () => {
8850
8877
  const Sizable = {
8851
8878
  string: { unit: "caracteres", verb: "ter" },
@@ -8954,7 +8981,7 @@ function pt_default() {
8954
8981
  };
8955
8982
  }
8956
8983
 
8957
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ru.js
8984
+ // ../../node_modules/zod/v4/locales/ru.js
8958
8985
  function getRussianPlural(count, one, few, many) {
8959
8986
  const absCount = Math.abs(count);
8960
8987
  const lastDigit = absCount % 10;
@@ -9111,7 +9138,7 @@ function ru_default() {
9111
9138
  };
9112
9139
  }
9113
9140
 
9114
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/sl.js
9141
+ // ../../node_modules/zod/v4/locales/sl.js
9115
9142
  var error36 = () => {
9116
9143
  const Sizable = {
9117
9144
  string: { unit: "znakov", verb: "imeti" },
@@ -9221,7 +9248,7 @@ function sl_default() {
9221
9248
  };
9222
9249
  }
9223
9250
 
9224
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/sv.js
9251
+ // ../../node_modules/zod/v4/locales/sv.js
9225
9252
  var error37 = () => {
9226
9253
  const Sizable = {
9227
9254
  string: { unit: "tecken", verb: "att ha" },
@@ -9332,7 +9359,7 @@ function sv_default() {
9332
9359
  };
9333
9360
  }
9334
9361
 
9335
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ta.js
9362
+ // ../../node_modules/zod/v4/locales/ta.js
9336
9363
  var error38 = () => {
9337
9364
  const Sizable = {
9338
9365
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -9443,7 +9470,7 @@ function ta_default() {
9443
9470
  };
9444
9471
  }
9445
9472
 
9446
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/th.js
9473
+ // ../../node_modules/zod/v4/locales/th.js
9447
9474
  var error39 = () => {
9448
9475
  const Sizable = {
9449
9476
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -9554,7 +9581,7 @@ function th_default() {
9554
9581
  };
9555
9582
  }
9556
9583
 
9557
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/tr.js
9584
+ // ../../node_modules/zod/v4/locales/tr.js
9558
9585
  var error40 = () => {
9559
9586
  const Sizable = {
9560
9587
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -9660,7 +9687,7 @@ function tr_default() {
9660
9687
  };
9661
9688
  }
9662
9689
 
9663
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/uk.js
9690
+ // ../../node_modules/zod/v4/locales/uk.js
9664
9691
  var error41 = () => {
9665
9692
  const Sizable = {
9666
9693
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9769,12 +9796,12 @@ function uk_default() {
9769
9796
  };
9770
9797
  }
9771
9798
 
9772
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ua.js
9799
+ // ../../node_modules/zod/v4/locales/ua.js
9773
9800
  function ua_default() {
9774
9801
  return uk_default();
9775
9802
  }
9776
9803
 
9777
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/ur.js
9804
+ // ../../node_modules/zod/v4/locales/ur.js
9778
9805
  var error42 = () => {
9779
9806
  const Sizable = {
9780
9807
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9885,7 +9912,7 @@ function ur_default() {
9885
9912
  };
9886
9913
  }
9887
9914
 
9888
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/uz.js
9915
+ // ../../node_modules/zod/v4/locales/uz.js
9889
9916
  var error43 = () => {
9890
9917
  const Sizable = {
9891
9918
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -9995,7 +10022,7 @@ function uz_default() {
9995
10022
  };
9996
10023
  }
9997
10024
 
9998
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/vi.js
10025
+ // ../../node_modules/zod/v4/locales/vi.js
9999
10026
  var error44 = () => {
10000
10027
  const Sizable = {
10001
10028
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -10104,7 +10131,7 @@ function vi_default() {
10104
10131
  };
10105
10132
  }
10106
10133
 
10107
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/zh-CN.js
10134
+ // ../../node_modules/zod/v4/locales/zh-CN.js
10108
10135
  var error45 = () => {
10109
10136
  const Sizable = {
10110
10137
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -10214,7 +10241,7 @@ function zh_CN_default() {
10214
10241
  };
10215
10242
  }
10216
10243
 
10217
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/zh-TW.js
10244
+ // ../../node_modules/zod/v4/locales/zh-TW.js
10218
10245
  var error46 = () => {
10219
10246
  const Sizable = {
10220
10247
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -10322,7 +10349,7 @@ function zh_TW_default() {
10322
10349
  };
10323
10350
  }
10324
10351
 
10325
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/locales/yo.js
10352
+ // ../../node_modules/zod/v4/locales/yo.js
10326
10353
  var error47 = () => {
10327
10354
  const Sizable = {
10328
10355
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -10430,7 +10457,7 @@ function yo_default() {
10430
10457
  };
10431
10458
  }
10432
10459
 
10433
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/registries.js
10460
+ // ../../node_modules/zod/v4/core/registries.js
10434
10461
  var _a;
10435
10462
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
10436
10463
  var $input = /* @__PURE__ */ Symbol("ZodInput");
@@ -10480,7 +10507,7 @@ function registry() {
10480
10507
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10481
10508
  var globalRegistry = globalThis.__zod_globalRegistry;
10482
10509
 
10483
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/api.js
10510
+ // ../../node_modules/zod/v4/core/api.js
10484
10511
  // @__NO_SIDE_EFFECTS__
10485
10512
  function _string(Class2, params) {
10486
10513
  return new Class2({
@@ -11519,7 +11546,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11519
11546
  return inst;
11520
11547
  }
11521
11548
 
11522
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/to-json-schema.js
11549
+ // ../../node_modules/zod/v4/core/to-json-schema.js
11523
11550
  function initializeContext(params) {
11524
11551
  let target = params?.target ?? "draft-2020-12";
11525
11552
  if (target === "draft-4")
@@ -11871,7 +11898,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
11871
11898
  return finalize(ctx, schema);
11872
11899
  };
11873
11900
 
11874
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/json-schema-processors.js
11901
+ // ../../node_modules/zod/v4/core/json-schema-processors.js
11875
11902
  var formatMap = {
11876
11903
  guid: "uuid",
11877
11904
  url: "uri",
@@ -12422,7 +12449,7 @@ function toJSONSchema(input, params) {
12422
12449
  return finalize(ctx, input);
12423
12450
  }
12424
12451
 
12425
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/json-schema-generator.js
12452
+ // ../../node_modules/zod/v4/core/json-schema-generator.js
12426
12453
  var JSONSchemaGenerator = class {
12427
12454
  /** @deprecated Access via ctx instead */
12428
12455
  get metadataRegistry() {
@@ -12497,10 +12524,10 @@ var JSONSchemaGenerator = class {
12497
12524
  }
12498
12525
  };
12499
12526
 
12500
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/core/json-schema.js
12527
+ // ../../node_modules/zod/v4/core/json-schema.js
12501
12528
  var json_schema_exports = {};
12502
12529
 
12503
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/schemas.js
12530
+ // ../../node_modules/zod/v4/classic/schemas.js
12504
12531
  var schemas_exports2 = {};
12505
12532
  __export(schemas_exports2, {
12506
12533
  ZodAny: () => ZodAny,
@@ -12669,7 +12696,7 @@ __export(schemas_exports2, {
12669
12696
  xor: () => xor
12670
12697
  });
12671
12698
 
12672
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/checks.js
12699
+ // ../../node_modules/zod/v4/classic/checks.js
12673
12700
  var checks_exports2 = {};
12674
12701
  __export(checks_exports2, {
12675
12702
  endsWith: () => _endsWith,
@@ -12703,7 +12730,7 @@ __export(checks_exports2, {
12703
12730
  uppercase: () => _uppercase
12704
12731
  });
12705
12732
 
12706
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/iso.js
12733
+ // ../../node_modules/zod/v4/classic/iso.js
12707
12734
  var iso_exports = {};
12708
12735
  __export(iso_exports, {
12709
12736
  ZodISODate: () => ZodISODate,
@@ -12744,7 +12771,7 @@ function duration2(params) {
12744
12771
  return _isoDuration(ZodISODuration, params);
12745
12772
  }
12746
12773
 
12747
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/errors.js
12774
+ // ../../node_modules/zod/v4/classic/errors.js
12748
12775
  var initializer2 = (inst, issues) => {
12749
12776
  $ZodError.init(inst, issues);
12750
12777
  inst.name = "ZodError";
@@ -12784,7 +12811,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
12784
12811
  Parent: Error
12785
12812
  });
12786
12813
 
12787
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/parse.js
12814
+ // ../../node_modules/zod/v4/classic/parse.js
12788
12815
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
12789
12816
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
12790
12817
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -12798,7 +12825,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
12798
12825
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12799
12826
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12800
12827
 
12801
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/schemas.js
12828
+ // ../../node_modules/zod/v4/classic/schemas.js
12802
12829
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12803
12830
  $ZodType.init(inst, def);
12804
12831
  Object.assign(inst["~standard"], {
@@ -13877,7 +13904,7 @@ function preprocess(fn, schema) {
13877
13904
  return pipe(transform(fn), schema);
13878
13905
  }
13879
13906
 
13880
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/compat.js
13907
+ // ../../node_modules/zod/v4/classic/compat.js
13881
13908
  var ZodIssueCode = {
13882
13909
  invalid_type: "invalid_type",
13883
13910
  too_big: "too_big",
@@ -13903,7 +13930,7 @@ var ZodFirstPartyTypeKind;
13903
13930
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
13904
13931
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
13905
13932
 
13906
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/from-json-schema.js
13933
+ // ../../node_modules/zod/v4/classic/from-json-schema.js
13907
13934
  var z = {
13908
13935
  ...schemas_exports2,
13909
13936
  ...checks_exports2,
@@ -14377,7 +14404,7 @@ function fromJSONSchema(schema, params) {
14377
14404
  return convertSchema(schema, ctx);
14378
14405
  }
14379
14406
 
14380
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/coerce.js
14407
+ // ../../node_modules/zod/v4/classic/coerce.js
14381
14408
  var coerce_exports = {};
14382
14409
  __export(coerce_exports, {
14383
14410
  bigint: () => bigint3,
@@ -14402,10 +14429,10 @@ function date4(params) {
14402
14429
  return _coercedDate(ZodDate, params);
14403
14430
  }
14404
14431
 
14405
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/v4/classic/external.js
14432
+ // ../../node_modules/zod/v4/classic/external.js
14406
14433
  config(en_default());
14407
14434
 
14408
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/zod/index.js
14435
+ // ../../node_modules/zod/index.js
14409
14436
  var zod_default = external_exports;
14410
14437
 
14411
14438
  // ../declarations/src/api/field-type.schema.ts
@@ -15028,6 +15055,36 @@ function build(schema) {
15028
15055
  return finalSchema;
15029
15056
  }
15030
15057
 
15058
+ // ../declarations/src/flows/schemas/branch.schema.ts
15059
+ var branchSchema = {
15060
+ params: external_exports.object({
15061
+ branches: external_exports.record(external_exports.string().min(1), external_exports.boolean())
15062
+ }),
15063
+ result: external_exports.object({
15064
+ matchedSteps: external_exports.array(external_exports.string())
15065
+ })
15066
+ };
15067
+
15068
+ // ../declarations/src/flows/schemas/for-each.schema.ts
15069
+ var MAX_FLOW_ITERATIONS = 1e3;
15070
+ var itemsSchema = external_exports.array(external_exports.unknown()).max(
15071
+ MAX_FLOW_ITERATIONS,
15072
+ `For-each supports at most ${MAX_FLOW_ITERATIONS} items`
15073
+ );
15074
+ var forEachSchema = {
15075
+ params: external_exports.object({
15076
+ items: itemsSchema,
15077
+ bodyStep: external_exports.string().min(1).nullable()
15078
+ }),
15079
+ result: external_exports.union([
15080
+ external_exports.object({
15081
+ items: itemsSchema,
15082
+ result: itemsSchema.optional()
15083
+ }),
15084
+ external_exports.object({ item: external_exports.unknown(), index: external_exports.number().int().nonnegative() })
15085
+ ])
15086
+ };
15087
+
15031
15088
  // ../declarations/src/flows/schemas/stripe-sync.schema.ts
15032
15089
  var field = external_exports.string().min(1).optional();
15033
15090
  var destination = external_exports.object({
@@ -15462,11 +15519,17 @@ var togetheraiProviderSchema = zod_default.object({
15462
15519
  var blackForestLabsProviderSchema = zod_default.object({
15463
15520
  provider: zod_default.literal("blackForestLabs")
15464
15521
  });
15522
+ var workspaceProviderSchema = zod_default.object({
15523
+ provider: zod_default.literal("workspace")
15524
+ });
15525
+ var workspaceTextModelSchema = zod_default.object({
15526
+ model: zod_default.string().describe('Chat config id, or "auto" for the workspace default')
15527
+ });
15465
15528
  var imageModelSchema = zod_default.object({
15466
15529
  model: zod_default.string()
15467
15530
  });
15468
15531
  var sharedParamsSchema = zod_default.object({
15469
- apiKey: zod_default.string(),
15532
+ apiKey: zod_default.string().optional(),
15470
15533
  temperature: zod_default.number().optional()
15471
15534
  });
15472
15535
  var generateTextParamsSchema = zod_default.object({
@@ -15490,7 +15553,8 @@ var textModelsSchema = zod_default.object({
15490
15553
  anthropicProviderSchema.merge(anthropicTextModelsSchema),
15491
15554
  mistralProviderSchema.merge(mistralTextModelsSchema),
15492
15555
  cohereProviderSchema.merge(cohereTextModelsSchema),
15493
- googleProviderSchema.merge(googleTextModelsSchema)
15556
+ googleProviderSchema.merge(googleTextModelsSchema),
15557
+ workspaceProviderSchema.merge(workspaceTextModelSchema)
15494
15558
  ])
15495
15559
  });
15496
15560
  var embedModelsSchema = zod_default.object({
@@ -15527,7 +15591,7 @@ var fullStreamTextParamsSchema = streamTextParamsSchema.extend({
15527
15591
  toolChoice: zod_default.enum(["auto", "required", "none"]).optional(),
15528
15592
  providerOptions: zod_default.record(zod_default.string(), zod_default.any()).optional()
15529
15593
  });
15530
- var paramsSchema8 = zod_default.discriminatedUnion("operation", [
15594
+ var operationParamsSchema = zod_default.discriminatedUnion("operation", [
15531
15595
  generateObjectParamsSchema.merge(sharedParamsSchema).merge(textModelsSchema).extend({
15532
15596
  prompt: zod_default.string(),
15533
15597
  schema: zod_default.any().describe("jsOnly"),
@@ -15557,6 +15621,15 @@ var paramsSchema8 = zod_default.discriminatedUnion("operation", [
15557
15621
  providerOptions: zod_default.record(zod_default.string(), zod_default.any()).optional()
15558
15622
  })
15559
15623
  ]);
15624
+ var paramsSchema8 = operationParamsSchema.superRefine((value, ctx) => {
15625
+ if (value.model.provider !== "workspace" && !value.apiKey?.trim()) {
15626
+ ctx.addIssue({
15627
+ code: "custom",
15628
+ message: "API key is required",
15629
+ path: ["apiKey"]
15630
+ });
15631
+ }
15632
+ });
15560
15633
  var paramsNestedSchemas = {
15561
15634
  messages: messageSchema,
15562
15635
  userMessageContent: userMessageContentSchema,
@@ -15911,52 +15984,14 @@ var notifyWebSocketSchema = {
15911
15984
  result: resultSchema16
15912
15985
  };
15913
15986
 
15914
- // ../declarations/src/flows/schemas/openai-image-generation.schema.ts
15915
- var dallE3ParamsSchema = external_exports.object({
15916
- model: external_exports.literal("dall-e-3"),
15917
- prompt: external_exports.string(),
15918
- quality: external_exports.enum(["standard", "hd"]).optional(),
15919
- size: external_exports.enum(["1024x1024", "1792x1024", "1024x1792"]).optional(),
15920
- style: external_exports.enum(["vivid", "natural"]).optional(),
15921
- outputFilename: external_exports.string().optional(),
15922
- apiKey: external_exports.string().optional()
15923
- });
15924
- var dallE2ParamsSchema = external_exports.object({
15925
- model: external_exports.literal("dall-e-2"),
15926
- prompt: external_exports.string(),
15927
- size: external_exports.enum(["256x256", "512x512", "1024x1024"]).optional(),
15928
- n: external_exports.literal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).optional(),
15929
- outputFilename: external_exports.string().optional(),
15930
- apiKey: external_exports.string().optional()
15931
- });
15932
- var paramsSchema17 = external_exports.discriminatedUnion("model", [
15933
- dallE3ParamsSchema,
15934
- dallE2ParamsSchema
15935
- ]);
15936
- var resultSuccessSchema = external_exports.object({
15937
- type: external_exports.literal("result"),
15938
- url: external_exports.string(),
15939
- key: external_exports.string(),
15940
- mimeType: external_exports.string()
15941
- });
15942
- var resultErrorSchema = external_exports.object({
15943
- type: external_exports.literal("error"),
15944
- value: external_exports.string()
15945
- });
15946
- var resultSchema17 = external_exports.union([resultSuccessSchema, resultErrorSchema]);
15947
- var openAIImageGenerationSchema = {
15948
- params: paramsSchema17,
15949
- result: resultSchema17
15950
- };
15951
-
15952
15987
  // ../declarations/src/flows/schemas/type.schema.ts
15953
- var paramsSchema18 = external_exports.object({
15988
+ var paramsSchema17 = external_exports.object({
15954
15989
  id: external_exports.string(),
15955
15990
  ofType: external_exports.string(),
15956
15991
  namespace: external_exports.string().optional(),
15957
15992
  dynamicArgs: external_exports.looseObject({}).optional()
15958
15993
  });
15959
- var resultSchema18 = external_exports.object({
15994
+ var resultSchema17 = external_exports.object({
15960
15995
  id: external_exports.string(),
15961
15996
  createdAt: external_exports.string(),
15962
15997
  updatedAt: external_exports.string(),
@@ -15966,12 +16001,12 @@ var resultSchema18 = external_exports.object({
15966
16001
  directives: external_exports.array(external_exports.string())
15967
16002
  });
15968
16003
  var typeSchema = {
15969
- params: paramsSchema18,
15970
- result: resultSchema18
16004
+ params: paramsSchema17,
16005
+ result: resultSchema17
15971
16006
  };
15972
16007
 
15973
16008
  // ../declarations/src/flows/schemas/update-type.schema.ts
15974
- var paramsSchema19 = external_exports.object({
16009
+ var paramsSchema18 = external_exports.object({
15975
16010
  id: external_exports.string(),
15976
16011
  ofType: external_exports.string(),
15977
16012
  fields: external_exports.looseObject({}).optional(),
@@ -15980,7 +16015,7 @@ var paramsSchema19 = external_exports.object({
15980
16015
  directives: external_exports.array(external_exports.string()).optional(),
15981
16016
  dynamicArgs: external_exports.looseObject({}).optional()
15982
16017
  });
15983
- var resultSchema19 = external_exports.object({
16018
+ var resultSchema18 = external_exports.object({
15984
16019
  id: external_exports.string(),
15985
16020
  createdAt: external_exports.string(),
15986
16021
  updatedAt: external_exports.string(),
@@ -15989,12 +16024,14 @@ var resultSchema19 = external_exports.object({
15989
16024
  namespace: external_exports.string()
15990
16025
  });
15991
16026
  var updateTypeSchema = {
15992
- params: paramsSchema19,
15993
- result: resultSchema19
16027
+ params: paramsSchema18,
16028
+ result: resultSchema18
15994
16029
  };
15995
16030
 
15996
16031
  // ../declarations/src/flows/schemas/index.ts
15997
16032
  var schemas = {
16033
+ branch: branchSchema,
16034
+ forEach: forEachSchema,
15998
16035
  batchCreateType: batchCreateTypeSchema,
15999
16036
  batchGetType: batchGetTypeSchema,
16000
16037
  createType: createTypeSchema,
@@ -16008,7 +16045,6 @@ var schemas = {
16008
16045
  listTypeByParent: listTypeByParentSchema,
16009
16046
  listType: listTypeSchema,
16010
16047
  notifyWebSocket: notifyWebSocketSchema,
16011
- openAIImageGeneration: openAIImageGenerationSchema,
16012
16048
  type: typeSchema,
16013
16049
  updateType: updateTypeSchema,
16014
16050
  extractImageMetadata: extractImageMetadataSchema,
@@ -16163,6 +16199,124 @@ var webhookConfigSchema = external_exports.object({
16163
16199
  }
16164
16200
  });
16165
16201
 
16202
+ // ../declarations/src/flows/branch.ts
16203
+ var getBranchTargets = (step2) => {
16204
+ if (step2.type !== "branch" /* branch */) return [];
16205
+ const branches = step2.params.branches;
16206
+ if (!branches || typeof branches !== "object" || Array.isArray(branches)) {
16207
+ return [];
16208
+ }
16209
+ return Object.keys(branches);
16210
+ };
16211
+ var getForEachBodyTarget = (step2) => step2.type === "forEach" /* forEach */ && typeof step2.params.bodyStep === "string" ? step2.params.bodyStep : null;
16212
+ var getFlowStepTargets = (step2) => {
16213
+ if (step2.type === "branch" /* branch */) return getBranchTargets(step2);
16214
+ if (step2.type === "forEach" /* forEach */) {
16215
+ const body = getForEachBodyTarget(step2);
16216
+ return [body, step2.nextStep].filter(
16217
+ (target) => target !== null
16218
+ );
16219
+ }
16220
+ return step2.nextStep === null ? [] : [step2.nextStep];
16221
+ };
16222
+ var getBranchOwnershipErrors = (declaration) => {
16223
+ const owners = /* @__PURE__ */ new Map();
16224
+ const errors = [];
16225
+ const visit = (name, scope) => {
16226
+ const step2 = declaration.steps[name];
16227
+ if (!Object.hasOwn(declaration.steps, name)) return;
16228
+ const owner = JSON.stringify(scope);
16229
+ const previousOwner = owners.get(name);
16230
+ if (previousOwner !== void 0) {
16231
+ if (previousOwner !== owner) {
16232
+ errors.push({
16233
+ stepName: name,
16234
+ message: `Step "${name}" is reached from different branch paths; each step must belong to a single path`
16235
+ });
16236
+ }
16237
+ return;
16238
+ }
16239
+ owners.set(name, owner);
16240
+ if (step2.type === "forEach" /* forEach */) {
16241
+ const body = getForEachBodyTarget(step2);
16242
+ if (body !== null) visit(body, [...scope, name, body]);
16243
+ if (step2.nextStep !== null) visit(step2.nextStep, scope);
16244
+ return;
16245
+ }
16246
+ for (const target of getFlowStepTargets(step2)) {
16247
+ visit(
16248
+ target,
16249
+ step2.type === "branch" /* branch */ ? [...scope, name, target] : scope
16250
+ );
16251
+ }
16252
+ };
16253
+ if (declaration.startStep) visit(declaration.startStep, []);
16254
+ const names = Object.keys(declaration.steps);
16255
+ const targets = new Set(
16256
+ Object.values(declaration.steps).flatMap(getFlowStepTargets)
16257
+ );
16258
+ for (const name of [
16259
+ ...names.filter((name2) => !targets.has(name2)),
16260
+ ...names
16261
+ ]) {
16262
+ if (!owners.has(name)) visit(name, []);
16263
+ }
16264
+ return errors;
16265
+ };
16266
+ var getFlowReferenceErrors = (declaration) => {
16267
+ const errors = [];
16268
+ if (declaration.startStep && !Object.hasOwn(declaration.steps, declaration.startStep)) {
16269
+ errors.push({
16270
+ stepName: declaration.startStep,
16271
+ message: `Unknown start step "${declaration.startStep}"`
16272
+ });
16273
+ }
16274
+ for (const [name, step2] of Object.entries(declaration.steps)) {
16275
+ if (step2.type === "branch" /* branch */ && step2.nextStep !== null) {
16276
+ errors.push({
16277
+ stepName: name,
16278
+ message: `Branch "${name}" must have nextStep: null`
16279
+ });
16280
+ }
16281
+ for (const target of getFlowStepTargets(step2)) {
16282
+ if (!Object.hasOwn(declaration.steps, target)) {
16283
+ errors.push({
16284
+ stepName: name,
16285
+ message: `Step "${name}" points to unknown step "${target}"`
16286
+ });
16287
+ }
16288
+ }
16289
+ }
16290
+ return errors;
16291
+ };
16292
+ var getFlowCycleErrors = (declaration) => {
16293
+ const visiting = /* @__PURE__ */ new Set();
16294
+ const visited = /* @__PURE__ */ new Set();
16295
+ const errors = [];
16296
+ const visit = (name) => {
16297
+ if (visiting.has(name)) {
16298
+ errors.push({
16299
+ stepName: name,
16300
+ message: `Flow contains a cycle at step "${name}"`
16301
+ });
16302
+ return;
16303
+ }
16304
+ if (visited.has(name) || !Object.hasOwn(declaration.steps, name)) return;
16305
+ visiting.add(name);
16306
+ for (const target of getFlowStepTargets(declaration.steps[name]))
16307
+ visit(target);
16308
+ visiting.delete(name);
16309
+ visited.add(name);
16310
+ };
16311
+ for (const name of Object.keys(declaration.steps)) visit(name);
16312
+ return errors;
16313
+ };
16314
+ var getFlowGraphErrors = (declaration) => [
16315
+ ...getFlowReferenceErrors(declaration),
16316
+ ...getFlowCycleErrors(declaration),
16317
+ ...getBranchOwnershipErrors(declaration)
16318
+ ];
16319
+
16166
16320
  // .tmp/declarations.ts
16167
16321
  var PAGE_VISIBILITY = ["public", "guest", "authenticated", "group", "user"];
16168
16322
 
@@ -16178,7 +16332,7 @@ __export(app_builder_exports, {
16178
16332
  page: () => page
16179
16333
  });
16180
16334
 
16181
- // ../../../../../Users/tomaszmorawski/Development/my.graphapi.io/node_modules/acorn/dist/acorn.mjs
16335
+ // ../../node_modules/acorn/dist/acorn.mjs
16182
16336
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
16183
16337
  var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
16184
16338
  var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
@@ -21954,7 +22108,6 @@ function blockType(opts) {
21954
22108
  defaultDynamicData: opts.defaultDynamicData,
21955
22109
  sourceCodeUrl: opts.sourceCodeUrl,
21956
22110
  compiledCodeUrl: opts.compiledCodeUrl,
21957
- dependencies: opts.dependencies,
21958
22111
  localizations: opts.localizations
21959
22112
  };
21960
22113
  }
@@ -21981,7 +22134,6 @@ function buildBlockTypes(blockTypes, opts) {
21981
22134
  if (bt.sourceCodeUrl !== void 0) out.sourceCodeUrl = bt.sourceCodeUrl;
21982
22135
  if (bt.compiledCodeUrl !== void 0)
21983
22136
  out.compiledCodeUrl = bt.compiledCodeUrl;
21984
- if (bt.dependencies !== void 0) out.dependencies = bt.dependencies;
21985
22137
  if (bt.localizations !== void 0) out.localizations = bt.localizations;
21986
22138
  return out;
21987
22139
  });
@@ -22033,12 +22185,26 @@ function flattenBlocks(blocks, opts) {
22033
22185
  return result;
22034
22186
  }
22035
22187
 
22188
+ // ../dsl-builders/src/apps/slug-validation.ts
22189
+ function assertNoLegacySlugField(mapping, pageName, paramName, collectionId) {
22190
+ if (!("slugField" in mapping)) return;
22191
+ const pattern = typeof mapping.slugField === "string" && mapping.slugField ? `{${mapping.slugField}}` : "{fieldName}";
22192
+ throw new Error(
22193
+ `Page "${pageName}", parameter "${paramName}": slugField is no longer supported. Remove slugField from the page parameter. Keep the existing app-level slugConfig[${JSON.stringify(collectionId)}] pattern if present; otherwise configure { pattern: ${JSON.stringify(pattern)} } there for custom slugs, or omit this entry. An app-level pattern generates the slugmapping rows used by URL resolution and link(); without a pattern, URLs use record IDs.`
22194
+ );
22195
+ }
22196
+
22036
22197
  // ../dsl-builders/src/apps/pages.ts
22037
22198
  function setPageVisibility(slugConfig, visibility) {
22038
22199
  if (visibility && visibility !== "public") {
22039
22200
  slugConfig.visibility = visibility;
22040
22201
  }
22041
22202
  }
22203
+ function setPagePregenerate(slugConfig, pregenerate) {
22204
+ if (typeof pregenerate === "boolean") {
22205
+ slugConfig.pregenerate = pregenerate;
22206
+ }
22207
+ }
22042
22208
  var STATIC_SEGMENT_RE = /^[a-z0-9-]+$/;
22043
22209
  var PARAM_SEGMENT_RE = /^\[([a-zA-Z][a-zA-Z0-9_]*)\]$/;
22044
22210
  function isParamSegment(slug) {
@@ -22074,6 +22240,7 @@ function page(opts) {
22074
22240
  ...opts.localizations ? { localizations: opts.localizations } : {},
22075
22241
  localizedConfig: opts.localizedConfig,
22076
22242
  ...opts.visibility ? { visibility: opts.visibility } : {},
22243
+ ...typeof opts.pregenerate === "boolean" ? { pregenerate: opts.pregenerate } : {},
22077
22244
  blocks: opts.blocks ?? []
22078
22245
  };
22079
22246
  }
@@ -22217,21 +22384,13 @@ function buildPages(pages, opts) {
22217
22384
  }
22218
22385
  }
22219
22386
  for (const [paramKey, paramConfig] of Object.entries(p.params)) {
22220
- const { collection, slugField } = paramConfig;
22387
+ const { collection } = paramConfig;
22221
22388
  if (!collection.id || !collection.fields) {
22222
22389
  throw new Error(
22223
22390
  `buildPages: page "${p.name}" param "${paramKey}" has an invalid collection (missing id or fields)`
22224
22391
  );
22225
22392
  }
22226
- if (slugField) {
22227
- const baseFieldName = slugField.replace(/\[.*$/, "");
22228
- const field2 = collection.fields.find((f) => f.name === baseFieldName);
22229
- if (!field2) {
22230
- throw new Error(
22231
- `buildPages: page "${p.name}" param "${paramKey}" references slugField "${slugField}" which does not exist in collection "${collection.name}"`
22232
- );
22233
- }
22234
- }
22393
+ assertNoLegacySlugField(paramConfig, p.name, paramKey, collection.id);
22235
22394
  }
22236
22395
  }
22237
22396
  const locales = opts?.locales ?? (opts?.locale ? [opts.locale] : ["en"]);
@@ -22239,17 +22398,11 @@ function buildPages(pages, opts) {
22239
22398
  const mergedParams = collectMergedParams(p);
22240
22399
  const paramsCollectionMap = {};
22241
22400
  for (const [key, config2] of Object.entries(mergedParams)) {
22242
- if (config2.slugField) {
22243
- paramsCollectionMap[key] = {
22244
- ofType: config2.collection.id,
22245
- slugField: config2.slugField
22246
- };
22247
- } else {
22248
- paramsCollectionMap[key] = config2.collection.id;
22249
- }
22401
+ paramsCollectionMap[key] = config2.collection.id;
22250
22402
  }
22251
22403
  const slugConfig = { paramsCollectionMap };
22252
22404
  setPageVisibility(slugConfig, p.visibility);
22405
+ setPagePregenerate(slugConfig, p.pregenerate);
22253
22406
  for (const loc of locales) {
22254
22407
  slugConfig[loc] = { slug: computeFullPath(p, loc) };
22255
22408
  }
@@ -22521,7 +22674,6 @@ function lowerParams(params) {
22521
22674
  var KNOWN_SECRET_PARAMS = {
22522
22675
  ["elevenLabsTTS" /* elevenLabsTTS */]: ["apiKey"],
22523
22676
  ["googleSearch" /* googleSearch */]: ["apiKey"],
22524
- ["openAIImageGeneration" /* openAIImageGeneration */]: ["apiKey"],
22525
22677
  ["genericAI" /* genericAI */]: ["apiKey"],
22526
22678
  ["stripeSync" /* stripeSync */]: ["secretId"]
22527
22679
  };
@@ -22681,6 +22833,63 @@ function validateStepParams(step2, issue2, errors, warnings) {
22681
22833
  function tableIdsMatch(a, b) {
22682
22834
  return a.toLowerCase() === b.toLowerCase();
22683
22835
  }
22836
+ function collectReachableSteps(startStep, steps) {
22837
+ const reachable = /* @__PURE__ */ new Set();
22838
+ const visit = (name) => {
22839
+ if (reachable.has(name) || !Object.hasOwn(steps, name)) return;
22840
+ reachable.add(name);
22841
+ getFlowStepTargets(steps[name]).forEach(visit);
22842
+ };
22843
+ if (startStep !== null) visit(startStep);
22844
+ return reachable;
22845
+ }
22846
+ function validateControlStep(step2, issue2, errors) {
22847
+ if (step2.type === "forEach" /* forEach */) {
22848
+ const body = step2.params.bodyStep;
22849
+ if (body !== null && typeof body !== "string" || !isStaticParamConfig(step2.paramsConfig?.bodyStep)) {
22850
+ errors.push(
22851
+ issue2(
22852
+ `steps.${step2.name}.params.bodyStep`,
22853
+ `For-each "${step2.name}" must have a fixed bodyStep pointing to an existing step, or null`
22854
+ )
22855
+ );
22856
+ }
22857
+ if (isStaticParamConfig(step2.paramsConfig?.items)) {
22858
+ const items = schemas.forEach.params.shape.items.safeParse(
22859
+ step2.params.items
22860
+ );
22861
+ if (!items.success) {
22862
+ for (const error48 of items.error.issues) {
22863
+ errors.push(issue2(`steps.${step2.name}.params.items`, error48.message));
22864
+ }
22865
+ }
22866
+ }
22867
+ return;
22868
+ }
22869
+ if (step2.type !== "branch" /* branch */) return;
22870
+ const branches = step2.params.branches;
22871
+ const config2 = step2.paramsConfig?.branches;
22872
+ if (!branches || typeof branches !== "object" || Array.isArray(branches) || config2 && config2.type !== "object" && !isStaticParamConfig(config2)) {
22873
+ errors.push(
22874
+ issue2(
22875
+ `steps.${step2.name}.params.branches`,
22876
+ "Branches must be an object with fixed target step names and a condition for each target"
22877
+ )
22878
+ );
22879
+ return;
22880
+ }
22881
+ for (const [target, condition] of Object.entries(branches)) {
22882
+ const conditionConfig = config2?.type === "object" ? config2.subParams?.[target] : void 0;
22883
+ if (isStaticParamConfig(conditionConfig) && typeof condition !== "boolean") {
22884
+ errors.push(
22885
+ issue2(
22886
+ `steps.${step2.name}.params.branches.${target}`,
22887
+ "Branch conditions must be booleans or dynamic expressions"
22888
+ )
22889
+ );
22890
+ }
22891
+ }
22892
+ }
22684
22893
  function validateFlow(declaration, ctx) {
22685
22894
  const errors = [];
22686
22895
  const warnings = [];
@@ -22713,7 +22922,7 @@ function validateFlow(declaration, ctx) {
22713
22922
  )
22714
22923
  );
22715
22924
  }
22716
- } else if (!(declaration.startStep in steps)) {
22925
+ } else if (!Object.hasOwn(steps, declaration.startStep)) {
22717
22926
  errors.push(
22718
22927
  issue2(
22719
22928
  "startStep",
@@ -22722,32 +22931,15 @@ function validateFlow(declaration, ctx) {
22722
22931
  );
22723
22932
  }
22724
22933
  for (const step2 of Object.values(steps)) {
22725
- if (step2.nextStep !== null && !(step2.nextStep in steps)) {
22726
- errors.push(
22727
- issue2(
22728
- `steps.${step2.name}.nextStep`,
22729
- `Step "${step2.name}" points to unknown step "${step2.nextStep}"`
22730
- )
22731
- );
22732
- }
22934
+ validateControlStep(step2, issue2, errors);
22733
22935
  }
22734
- const visited = /* @__PURE__ */ new Set();
22735
- let current2 = declaration.startStep;
22736
- while (current2 !== null && current2 in steps) {
22737
- if (visited.has(current2)) {
22738
- errors.push(
22739
- issue2(
22740
- `steps.${current2}.nextStep`,
22741
- `Step "${current2}" is executed twice \u2014 steps must form a linked list; nextStep must not point to itself or a previous step`
22742
- )
22743
- );
22744
- break;
22745
- }
22746
- visited.add(current2);
22747
- current2 = steps[current2].nextStep;
22936
+ for (const error48 of getFlowGraphErrors({ ...declaration, steps })) {
22937
+ if (!Object.hasOwn(steps, error48.stepName)) continue;
22938
+ errors.push(issue2(`steps.${error48.stepName}`, error48.message));
22748
22939
  }
22940
+ const reachable = collectReachableSteps(declaration.startStep, steps);
22749
22941
  for (const name of stepNames) {
22750
- if (!visited.has(name)) {
22942
+ if (!reachable.has(name)) {
22751
22943
  warnings.push(
22752
22944
  issue2(
22753
22945
  `steps.${name}`,
@@ -23004,14 +23196,110 @@ var step = {
23004
23196
  listTypeByParent: createStepFactory("listTypeByParent" /* listTypeByParent */),
23005
23197
  listType: createStepFactory("listType" /* listType */),
23006
23198
  notifyWebSocket: createStepFactory("notifyWebSocket" /* notifyWebSocket */),
23007
- openAIImageGeneration: createStepFactory("openAIImageGeneration" /* openAIImageGeneration */),
23008
23199
  type: createStepFactory("type" /* type */),
23009
23200
  updateType: createStepFactory("updateType" /* updateType */),
23010
23201
  extractImageMetadata: createStepFactory("extractImageMetadata" /* extractImageMetadata */),
23011
23202
  cloudFunction: createStepFactory("cloudFunction" /* cloudFunction */),
23012
23203
  genericAI: createStepFactory("genericAI" /* genericAI */),
23013
- stripeSync: createStepFactory("stripeSync" /* stripeSync */)
23204
+ stripeSync: createStepFactory("stripeSync" /* stripeSync */),
23205
+ forEach(name, opts) {
23206
+ return {
23207
+ ...createStepFactory("forEach" /* forEach */)(name, {
23208
+ ...opts,
23209
+ params: { items: opts.items }
23210
+ }),
23211
+ steps: opts.steps
23212
+ };
23213
+ },
23214
+ branch(name, opts) {
23215
+ return {
23216
+ ...createStepFactory("branch" /* branch */)(name, { ...opts, params: {} }),
23217
+ branches: opts.branches
23218
+ };
23219
+ }
23014
23220
  };
23221
+ function flattenLoopBody(parent, errors) {
23222
+ const { definition } = parent;
23223
+ if (!definition.steps)
23224
+ errors.push(`For-each "${definition.name}" requires nested "steps"`);
23225
+ const body = definition.steps ?? [];
23226
+ return [
23227
+ {
23228
+ ...parent,
23229
+ definition: {
23230
+ ...definition,
23231
+ params: { ...definition.params, bodyStep: body[0]?.name ?? null }
23232
+ }
23233
+ },
23234
+ ...flattenSequence(body, errors, JSON.stringify([definition.name, "body"]))
23235
+ ];
23236
+ }
23237
+ function flattenBranchPaths(parent, hasFollowingStep, errors) {
23238
+ const { definition } = parent;
23239
+ if (!definition.branches) {
23240
+ errors.push(
23241
+ `Branch "${definition.name}" requires branch-local steps in "branches"`
23242
+ );
23243
+ }
23244
+ if (parent.nextStep !== null || hasFollowingStep) {
23245
+ errors.push(
23246
+ `Branch "${definition.name}" must end its sequence; continuations belong inside its branches`
23247
+ );
23248
+ }
23249
+ const paths = definition.branches ?? [];
23250
+ const nested = paths.flatMap((path, pathIndex) => {
23251
+ if (path.steps.length === 0)
23252
+ errors.push(
23253
+ `Branch "${definition.name}" path ${pathIndex + 1} must contain at least one step`
23254
+ );
23255
+ if (typeof path.when !== "boolean" && !isFlowParamMarker(path.when)) {
23256
+ errors.push(
23257
+ `Branch "${definition.name}" path ${pathIndex + 1} requires a boolean or dynamic condition`
23258
+ );
23259
+ }
23260
+ return flattenSequence(
23261
+ path.steps,
23262
+ errors,
23263
+ JSON.stringify([definition.name, pathIndex])
23264
+ );
23265
+ });
23266
+ return [
23267
+ {
23268
+ ...parent,
23269
+ definition: {
23270
+ ...definition,
23271
+ params: {
23272
+ branches: Object.fromEntries(
23273
+ paths.filter((path) => path.steps.length).map((path) => [path.steps[0].name, path.when])
23274
+ )
23275
+ }
23276
+ },
23277
+ nextStep: null
23278
+ },
23279
+ ...nested
23280
+ ];
23281
+ }
23282
+ function flattenSequence(definitions, errors, scope = "flow", detached = false) {
23283
+ return definitions.flatMap((definition, index) => {
23284
+ const nextStep = definition.next !== void 0 ? definition.next : detached || definition.type === "branch" /* branch */ ? null : definitions[index + 1]?.name ?? null;
23285
+ const parent = { definition, nextStep, scope };
23286
+ if (definition.type === "forEach" /* forEach */)
23287
+ return flattenLoopBody(parent, errors);
23288
+ if (definition.type === "branch" /* branch */) {
23289
+ return flattenBranchPaths(
23290
+ parent,
23291
+ !detached && index < definitions.length - 1,
23292
+ errors
23293
+ );
23294
+ }
23295
+ if (detached && definition.next === void 0) {
23296
+ errors.push(
23297
+ `Detached step "${definition.name}" requires an explicit "next" (step name or null)`
23298
+ );
23299
+ }
23300
+ return [parent];
23301
+ });
23302
+ }
23015
23303
  function buildDeclarationStep(definition, nextStep, errors) {
23016
23304
  for (const paramName of KNOWN_SECRET_PARAMS[definition.type] ?? []) {
23017
23305
  const value = definition.params[paramName];
@@ -23058,31 +23346,25 @@ function buildFlow(opts) {
23058
23346
  const errors = [];
23059
23347
  const chainSteps = opts.steps;
23060
23348
  const detachedSteps = opts.detachedSteps ?? [];
23061
- const allSteps = [...chainSteps, ...detachedSteps];
23062
- const seenNames = /* @__PURE__ */ new Set();
23063
- for (const definition of allSteps) {
23064
- if (seenNames.has(definition.name)) {
23349
+ const allSteps = [
23350
+ ...flattenSequence(chainSteps, errors),
23351
+ ...flattenSequence(detachedSteps, errors, "flow", true)
23352
+ ];
23353
+ const scopes = /* @__PURE__ */ new Map();
23354
+ for (const { definition, scope } of allSteps) {
23355
+ if (scopes.has(definition.name)) {
23065
23356
  errors.push(`Duplicate step name "${definition.name}"`);
23066
23357
  }
23067
- seenNames.add(definition.name);
23358
+ scopes.set(definition.name, scope);
23068
23359
  }
23069
23360
  const steps = {};
23070
- for (let i = 0; i < chainSteps.length; i++) {
23071
- const definition = chainSteps[i];
23072
- const nextStep = definition.next !== void 0 ? definition.next : chainSteps[i + 1]?.name ?? null;
23073
- steps[definition.name] = buildDeclarationStep(definition, nextStep, errors);
23074
- }
23075
- for (const definition of detachedSteps) {
23076
- if (definition.next === void 0) {
23361
+ for (const { definition, nextStep, scope } of allSteps) {
23362
+ if (nextStep && scopes.has(nextStep) && scopes.get(nextStep) !== scope) {
23077
23363
  errors.push(
23078
- `Detached step "${definition.name}" requires an explicit "next" (step name or null)`
23364
+ `Step "${definition.name}" cannot point to "${nextStep}" outside its own branch sequence`
23079
23365
  );
23080
23366
  }
23081
- steps[definition.name] = buildDeclarationStep(
23082
- definition,
23083
- definition.next ?? null,
23084
- errors
23085
- );
23367
+ steps[definition.name] = buildDeclarationStep(definition, nextStep, errors);
23086
23368
  }
23087
23369
  const triggers = {};
23088
23370
  for (const [name, definition] of Object.entries(opts.triggers)) {