@kodycodes/cli 3.46.0 → 3.46.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.
Files changed (86) hide show
  1. package/dist/{auth-6YVS765B.js → auth-Q6TDDWB2.js} +4 -4
  2. package/dist/bin.js +6 -6
  3. package/dist/capability-proxy.d.ts +2 -0
  4. package/dist/{chunk-2OMFUIFM.js → chunk-2G3YXYZ4.js} +2 -2
  5. package/dist/{chunk-SFNCTBXB.js → chunk-6BMYORZK.js} +47 -48
  6. package/dist/chunk-6BMYORZK.js.map +6 -0
  7. package/dist/{chunk-L6VBRGS6.js → chunk-6HPU7SMS.js} +22 -2
  8. package/dist/chunk-6HPU7SMS.js.map +6 -0
  9. package/dist/{chunk-YFE7AQ4A.js → chunk-BYZB4U4P.js} +4 -4
  10. package/dist/{chunk-ZADDFBAP.js → chunk-EJOF2MYU.js} +2 -2
  11. package/dist/{chunk-I75N4PUW.js → chunk-FSPL7YO4.js} +17 -8
  12. package/dist/chunk-FSPL7YO4.js.map +6 -0
  13. package/dist/{chunk-BYPUQBDP.js → chunk-MWC6FYWF.js} +3 -3
  14. package/dist/{chunk-HPFMVYSE.js → chunk-OBK4CIB2.js} +2 -2
  15. package/dist/{chunk-R4O6R2P6.js → chunk-OFI4MF3S.js} +3 -1
  16. package/dist/chunk-OFI4MF3S.js.map +6 -0
  17. package/dist/{chunk-ZOF46RPD.js → chunk-Q7XRVWKZ.js} +3 -3
  18. package/dist/{chunk-2PJZFZB4.js → chunk-RFZQC23P.js} +4 -3
  19. package/dist/{chunk-2PJZFZB4.js.map → chunk-RFZQC23P.js.map} +1 -1
  20. package/dist/{chunk-HYL2OFVE.js → chunk-VX2KDCQF.js} +3 -3
  21. package/dist/{chunk-C4GIPPQ6.js → chunk-W257N63R.js} +6 -6
  22. package/dist/{chunk-MYAA4EUX.js → chunk-XSRTFMCF.js} +2 -2
  23. package/dist/{chunk-QCIN3KQT.js → chunk-ZER4SBOV.js} +5 -5
  24. package/dist/{chunk-SRHOJETK.js → chunk-ZIL2JPJC.js} +2 -2
  25. package/dist/cli.js +6 -6
  26. package/dist/{commands-FGJMFEDS.js → commands-AMTPU2F7.js} +18 -7
  27. package/dist/commands-AMTPU2F7.js.map +6 -0
  28. package/dist/credential-call-map.d.ts +3 -0
  29. package/dist/{dev-command-TN76VH3Y.js → dev-command-754FYKV6.js} +10 -10
  30. package/dist/{execute-local-package-IY5GFYAX.js → execute-local-package-PVPTFQFM.js} +9 -9
  31. package/dist/{git-credential-5GEHTTH2.js → git-credential-BL7KCA76.js} +5 -5
  32. package/dist/{local-execute-WNLIXCWZ.js → local-execute-A4ZUH53E.js} +13 -10
  33. package/dist/local-execute-A4ZUH53E.js.map +6 -0
  34. package/dist/local-gateway-fetch-forward.d.ts +2 -0
  35. package/dist/{local-kody-IO7UOYO6.js → local-kody-BJ7OORPF.js} +6 -6
  36. package/dist/{local-package-graph-JH4L7OF3.js → local-package-graph-7A4ZQBXJ.js} +3 -3
  37. package/dist/{local-package-run-XQZPNN2V.js → local-package-run-2X72ZAV2.js} +7 -7
  38. package/dist/{local-publish-build-JHAKHWXX.js → local-publish-build-VHZGU5NI.js} +4 -2
  39. package/dist/local-publish-build.d.ts +1 -0
  40. package/dist/{local-secrets-N272AT7P.js → local-secrets-2S7KJ6EI.js} +3 -3
  41. package/dist/{mock-dep-resolve-VA4P5AOO.js → mock-dep-resolve-ACHQAI36.js} +2 -2
  42. package/dist/{mock-local-deps-4FWQ2M2T.js → mock-local-deps-43QBYHHF.js} +4 -4
  43. package/dist/{open-api-client-2WF6OBN3.js → open-api-client-Z3LIDWQ2.js} +3 -3
  44. package/dist/{package-run-6QLZSYSK.js → package-run-E34M5ERO.js} +3 -3
  45. package/dist/publish-builder.js +874 -214
  46. package/dist/{publish-offload-Z7APLXJI.js → publish-offload-XS7CHFGZ.js} +2 -2
  47. package/dist/{remote-execute-W5VKF2UH.js → remote-execute-CINWGFKJ.js} +4 -4
  48. package/dist/{run-executor-PYY7GUZC.js → run-executor-OGVMKPIB.js} +3 -3
  49. package/dist/{setup-git-Q73BJOGI.js → setup-git-P5HLZX3R.js} +4 -4
  50. package/dist/{whoami-CC7O3IEO.js → whoami-EU7HSV45.js} +3 -3
  51. package/package.json +1 -1
  52. package/dist/chunk-I75N4PUW.js.map +0 -6
  53. package/dist/chunk-L6VBRGS6.js.map +0 -6
  54. package/dist/chunk-R4O6R2P6.js.map +0 -6
  55. package/dist/chunk-SFNCTBXB.js.map +0 -6
  56. package/dist/commands-FGJMFEDS.js.map +0 -6
  57. package/dist/local-execute-WNLIXCWZ.js.map +0 -6
  58. /package/dist/{auth-6YVS765B.js.map → auth-Q6TDDWB2.js.map} +0 -0
  59. /package/dist/{chunk-2OMFUIFM.js.map → chunk-2G3YXYZ4.js.map} +0 -0
  60. /package/dist/{chunk-YFE7AQ4A.js.map → chunk-BYZB4U4P.js.map} +0 -0
  61. /package/dist/{chunk-ZADDFBAP.js.map → chunk-EJOF2MYU.js.map} +0 -0
  62. /package/dist/{chunk-BYPUQBDP.js.map → chunk-MWC6FYWF.js.map} +0 -0
  63. /package/dist/{chunk-HPFMVYSE.js.map → chunk-OBK4CIB2.js.map} +0 -0
  64. /package/dist/{chunk-ZOF46RPD.js.map → chunk-Q7XRVWKZ.js.map} +0 -0
  65. /package/dist/{chunk-HYL2OFVE.js.map → chunk-VX2KDCQF.js.map} +0 -0
  66. /package/dist/{chunk-C4GIPPQ6.js.map → chunk-W257N63R.js.map} +0 -0
  67. /package/dist/{chunk-MYAA4EUX.js.map → chunk-XSRTFMCF.js.map} +0 -0
  68. /package/dist/{chunk-QCIN3KQT.js.map → chunk-ZER4SBOV.js.map} +0 -0
  69. /package/dist/{chunk-SRHOJETK.js.map → chunk-ZIL2JPJC.js.map} +0 -0
  70. /package/dist/{dev-command-TN76VH3Y.js.map → dev-command-754FYKV6.js.map} +0 -0
  71. /package/dist/{execute-local-package-IY5GFYAX.js.map → execute-local-package-PVPTFQFM.js.map} +0 -0
  72. /package/dist/{git-credential-5GEHTTH2.js.map → git-credential-BL7KCA76.js.map} +0 -0
  73. /package/dist/{local-kody-IO7UOYO6.js.map → local-kody-BJ7OORPF.js.map} +0 -0
  74. /package/dist/{local-package-graph-JH4L7OF3.js.map → local-package-graph-7A4ZQBXJ.js.map} +0 -0
  75. /package/dist/{local-package-run-XQZPNN2V.js.map → local-package-run-2X72ZAV2.js.map} +0 -0
  76. /package/dist/{local-publish-build-JHAKHWXX.js.map → local-publish-build-VHZGU5NI.js.map} +0 -0
  77. /package/dist/{local-secrets-N272AT7P.js.map → local-secrets-2S7KJ6EI.js.map} +0 -0
  78. /package/dist/{mock-dep-resolve-VA4P5AOO.js.map → mock-dep-resolve-ACHQAI36.js.map} +0 -0
  79. /package/dist/{mock-local-deps-4FWQ2M2T.js.map → mock-local-deps-43QBYHHF.js.map} +0 -0
  80. /package/dist/{open-api-client-2WF6OBN3.js.map → open-api-client-Z3LIDWQ2.js.map} +0 -0
  81. /package/dist/{package-run-6QLZSYSK.js.map → package-run-E34M5ERO.js.map} +0 -0
  82. /package/dist/{publish-offload-Z7APLXJI.js.map → publish-offload-XS7CHFGZ.js.map} +0 -0
  83. /package/dist/{remote-execute-W5VKF2UH.js.map → remote-execute-CINWGFKJ.js.map} +0 -0
  84. /package/dist/{run-executor-PYY7GUZC.js.map → run-executor-OGVMKPIB.js.map} +0 -0
  85. /package/dist/{setup-git-Q73BJOGI.js.map → setup-git-P5HLZX3R.js.map} +0 -0
  86. /package/dist/{whoami-CC7O3IEO.js.map → whoami-EU7HSV45.js.map} +0 -0
@@ -848,11 +848,11 @@ var init_package_app_host_label = __esm({
848
848
  });
849
849
 
850
850
  // ../shared/src/package-app-host-paths.ts
851
- function isPackageAppHostProbeFirstSegment(segment) {
852
- return packageAppHostProbeFirstSegments.has(segment.trim().toLowerCase());
851
+ function isPackageAppHostProbeFirstSegment(segment2) {
852
+ return packageAppHostProbeFirstSegments.has(segment2.trim().toLowerCase());
853
853
  }
854
- function isPackageAppHostReservedFirstSegment(segment) {
855
- return packageAppHostReservedFirstSegments.has(segment.trim().toLowerCase());
854
+ function isPackageAppHostReservedFirstSegment(segment2) {
855
+ return packageAppHostReservedFirstSegments.has(segment2.trim().toLowerCase());
856
856
  }
857
857
  function isPackageAppHostReservedPackageLeaf(leaf) {
858
858
  const normalized = leaf.trim().toLowerCase();
@@ -2180,18 +2180,18 @@ var init_parse = __esm({
2180
2180
  return result.issues.length === 0;
2181
2181
  };
2182
2182
  _encode = (_Err) => {
2183
- const parse9 = _parse(_Err);
2183
+ const parse10 = _parse(_Err);
2184
2184
  const fn = (schema, value, _ctx, _params) => {
2185
2185
  const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
2186
- return parse9(schema, value, ctx, finalizeParams(fn, _params));
2186
+ return parse10(schema, value, ctx, finalizeParams(fn, _params));
2187
2187
  };
2188
2188
  return fn;
2189
2189
  };
2190
2190
  encode = /* @__PURE__ */ _encode($ZodRealError);
2191
2191
  _decode = (_Err) => {
2192
- const parse9 = _parse(_Err);
2192
+ const parse10 = _parse(_Err);
2193
2193
  const fn = (schema, value, _ctx, _params) => {
2194
- return parse9(schema, value, _ctx, finalizeParams(fn, _params));
2194
+ return parse10(schema, value, _ctx, finalizeParams(fn, _params));
2195
2195
  };
2196
2196
  return fn;
2197
2197
  };
@@ -2445,13 +2445,13 @@ var init_checks = __esm({
2445
2445
  };
2446
2446
  $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
2447
2447
  $ZodCheck.init(inst, def);
2448
- const origin = numericOriginMap[typeof def.value];
2448
+ const origin2 = numericOriginMap[typeof def.value];
2449
2449
  inst._zod.check = (payload) => {
2450
2450
  if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
2451
2451
  return;
2452
2452
  }
2453
2453
  payload.issues.push({
2454
- origin: numericOriginMap[typeof payload.value] ?? origin,
2454
+ origin: numericOriginMap[typeof payload.value] ?? origin2,
2455
2455
  code: "too_big",
2456
2456
  maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
2457
2457
  input: payload.value,
@@ -2463,13 +2463,13 @@ var init_checks = __esm({
2463
2463
  });
2464
2464
  $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
2465
2465
  $ZodCheck.init(inst, def);
2466
- const origin = numericOriginMap[typeof def.value];
2466
+ const origin2 = numericOriginMap[typeof def.value];
2467
2467
  inst._zod.check = (payload) => {
2468
2468
  if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
2469
2469
  return;
2470
2470
  }
2471
2471
  payload.issues.push({
2472
- origin: numericOriginMap[typeof payload.value] ?? origin,
2472
+ origin: numericOriginMap[typeof payload.value] ?? origin2,
2473
2473
  code: "too_small",
2474
2474
  minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
2475
2475
  input: payload.value,
@@ -2504,14 +2504,14 @@ var init_checks = __esm({
2504
2504
  $ZodCheck.init(inst, def);
2505
2505
  def.format = def.format || "float64";
2506
2506
  const isInt = def.format?.includes("int");
2507
- const origin = isInt ? "int" : "number";
2507
+ const origin2 = isInt ? "int" : "number";
2508
2508
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
2509
2509
  inst._zod.check = (payload) => {
2510
2510
  const input3 = payload.value;
2511
2511
  if (isInt) {
2512
2512
  if (!Number.isInteger(input3)) {
2513
2513
  payload.issues.push({
2514
- expected: origin,
2514
+ expected: origin2,
2515
2515
  format: def.format,
2516
2516
  code: "invalid_type",
2517
2517
  continue: false,
@@ -2528,7 +2528,7 @@ var init_checks = __esm({
2528
2528
  maximum: Number.MAX_SAFE_INTEGER,
2529
2529
  note: "Integers must be within the safe integer range.",
2530
2530
  inst,
2531
- origin,
2531
+ origin: origin2,
2532
2532
  inclusive: true,
2533
2533
  continue: !def.abort
2534
2534
  });
@@ -2539,7 +2539,7 @@ var init_checks = __esm({
2539
2539
  minimum: Number.MIN_SAFE_INTEGER,
2540
2540
  note: "Integers must be within the safe integer range.",
2541
2541
  inst,
2542
- origin,
2542
+ origin: origin2,
2543
2543
  inclusive: true,
2544
2544
  continue: !def.abort
2545
2545
  });
@@ -2671,9 +2671,9 @@ var init_checks = __esm({
2671
2671
  const length = typeof input3 === "string" && units > def.maximum ? codePointLength(input3) : units;
2672
2672
  if (length <= def.maximum)
2673
2673
  return;
2674
- const origin = getLengthableOrigin(input3);
2674
+ const origin2 = getLengthableOrigin(input3);
2675
2675
  payload.issues.push({
2676
- origin,
2676
+ origin: origin2,
2677
2677
  code: "too_big",
2678
2678
  maximum: def.maximum,
2679
2679
  inclusive: true,
@@ -2693,9 +2693,9 @@ var init_checks = __esm({
2693
2693
  const length = typeof input3 === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input3) : units;
2694
2694
  if (length >= def.minimum)
2695
2695
  return;
2696
- const origin = getLengthableOrigin(input3);
2696
+ const origin2 = getLengthableOrigin(input3);
2697
2697
  payload.issues.push({
2698
- origin,
2698
+ origin: origin2,
2699
2699
  code: "too_small",
2700
2700
  minimum: def.minimum,
2701
2701
  inclusive: true,
@@ -2715,10 +2715,10 @@ var init_checks = __esm({
2715
2715
  const length = typeof input3 === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input3) : units;
2716
2716
  if (length === def.length)
2717
2717
  return;
2718
- const origin = getLengthableOrigin(input3);
2718
+ const origin2 = getLengthableOrigin(input3);
2719
2719
  const tooBig = length > def.length;
2720
2720
  payload.issues.push({
2721
- origin,
2721
+ origin: origin2,
2722
2722
  ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
2723
2723
  inclusive: true,
2724
2724
  exact: true,
@@ -3116,7 +3116,7 @@ function capSize(inst, size) {
3116
3116
  if (!caps.length)
3117
3117
  return;
3118
3118
  const cap = Math.min(...caps.map((c2) => c2[0]));
3119
- const parse9 = inst._zod.parse;
3119
+ const parse10 = inst._zod.parse;
3120
3120
  inst._zod.parse = (payload, ctx) => {
3121
3121
  const n3 = size(payload.value);
3122
3122
  if (n3 > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
@@ -3130,7 +3130,7 @@ function capSize(inst, size) {
3130
3130
  }
3131
3131
  }
3132
3132
  }
3133
- return parse9(payload, ctx);
3133
+ return parse10(payload, ctx);
3134
3134
  };
3135
3135
  }
3136
3136
  function handleArrayResult(result, final, index) {
@@ -5709,8 +5709,8 @@ var init_en = __esm({
5709
5709
  set: { unit: "items", verb: "to have" },
5710
5710
  map: { unit: "entries", verb: "to have" }
5711
5711
  };
5712
- function getSizing(origin) {
5713
- return Sizable[origin] ?? null;
5712
+ function getSizing(origin2) {
5713
+ return Sizable[origin2] ?? null;
5714
5714
  }
5715
5715
  const FormatDictionary = {
5716
5716
  regex: "input",
@@ -6923,12 +6923,12 @@ function _stringbool(Classes, _params) {
6923
6923
  return codec2;
6924
6924
  }
6925
6925
  // @__NO_SIDE_EFFECTS__
6926
- function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
6926
+ function _stringFormat(Class2, format2, fnOrRegex, _params = {}) {
6927
6927
  const params = normalizeParams(_params);
6928
6928
  const def = {
6929
6929
  check: "string_format",
6930
6930
  type: "string",
6931
- format,
6931
+ format: format2,
6932
6932
  fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
6933
6933
  ...params
6934
6934
  };
@@ -7056,8 +7056,8 @@ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
7056
7056
  const _result = ctx.seen.get(schema);
7057
7057
  return _result.schema;
7058
7058
  }
7059
- function encodeJSONPointerSegment(segment) {
7060
- return segment.replace(/~/g, "~0").replace(/\//g, "~1");
7059
+ function encodeJSONPointerSegment(segment2) {
7060
+ return segment2.replace(/~/g, "~0").replace(/\//g, "~1");
7061
7061
  }
7062
7062
  function extractDefs(ctx, schema) {
7063
7063
  const root = ctx.seen.get(schema);
@@ -7555,7 +7555,7 @@ function stringifyKeyNames(bySchema, json2, visited) {
7555
7555
  const values = json2.enum ?? (json2.const !== void 0 ? [json2.const] : void 0);
7556
7556
  if (!numericType && !values?.some((v) => typeof v === "number"))
7557
7557
  return json2;
7558
- const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json2;
7558
+ const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format: format2, id, ...rest } = json2;
7559
7559
  if (rest.enum)
7560
7560
  rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
7561
7561
  else if (typeof rest.const === "number")
@@ -7671,9 +7671,9 @@ var init_json_schema_processors = __esm({
7671
7671
  intersectMime = (agg, mime) => {
7672
7672
  agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];
7673
7673
  };
7674
- setFormat = (agg, format) => {
7675
- agg.format = format;
7676
- if (format.includes("int"))
7674
+ setFormat = (agg, format2) => {
7675
+ agg.format = format2;
7676
+ if (format2.includes("int"))
7677
7677
  agg.isInt = true;
7678
7678
  };
7679
7679
  minContributor = (agg, def) => narrowMin(agg, "minimum", def.minimum);
@@ -7723,16 +7723,16 @@ var init_json_schema_processors = __esm({
7723
7723
  stringProcessor = (schema, ctx, _json, _params) => {
7724
7724
  const json2 = _json;
7725
7725
  json2.type = "string";
7726
- const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
7726
+ const { minimum, maximum, format: format2, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
7727
7727
  if (typeof minimum === "number")
7728
7728
  json2.minLength = minimum;
7729
7729
  if (typeof maximum === "number")
7730
7730
  json2.maxLength = maximum;
7731
- if (format) {
7732
- json2.format = formatMap[format] ?? format;
7731
+ if (format2) {
7732
+ json2.format = formatMap[format2] ?? format2;
7733
7733
  if (json2.format === "")
7734
7734
  delete json2.format;
7735
- if (format === "time" || laxFormat) {
7735
+ if (format2 === "time" || laxFormat) {
7736
7736
  delete json2.format;
7737
7737
  }
7738
7738
  }
@@ -8851,8 +8851,8 @@ function iban2(params) {
8851
8851
  function jwt(params) {
8852
8852
  return _jwt(ZodJWT, params);
8853
8853
  }
8854
- function stringFormat(format, fnOrRegex, _params = {}) {
8855
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
8854
+ function stringFormat(format2, fnOrRegex, _params = {}) {
8855
+ return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params);
8856
8856
  }
8857
8857
  function hostname2(_params) {
8858
8858
  return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
@@ -8865,11 +8865,11 @@ function currencyCode2(_params) {
8865
8865
  }
8866
8866
  function hash(alg, params) {
8867
8867
  const enc = params?.enc ?? "hex";
8868
- const format = `${alg}_${enc}`;
8869
- const regex = regexes_exports[format];
8868
+ const format2 = `${alg}_${enc}`;
8869
+ const regex = regexes_exports[format2];
8870
8870
  if (!regex)
8871
- throw new Error(`Unrecognized hash format: ${format}`);
8872
- return _stringFormat(ZodCustomStringFormat, format, regex, params);
8871
+ throw new Error(`Unrecognized hash format: ${format2}`);
8872
+ return _stringFormat(ZodCustomStringFormat, format2, regex, params);
8873
8873
  }
8874
8874
  function number2(params) {
8875
8875
  return _number(ZodNumber, params);
@@ -11442,7 +11442,8 @@ var init_types = __esm({
11442
11442
  secretName: external_exports.string().min(1).optional(),
11443
11443
  encoding: external_exports.enum(["hex", "base64"]),
11444
11444
  prefix: external_exports.string().optional(),
11445
- signedPayload: external_exports.enum(webhookSignedPayloadValues).optional()
11445
+ signedPayload: external_exports.enum(webhookSignedPayloadValues).optional(),
11446
+ profile: external_exports.literal("standard-webhooks").optional()
11446
11447
  });
11447
11448
  packageWebhookUrlSecretVerificationSchema = external_exports.object({
11448
11449
  type: external_exports.literal("url-secret")
@@ -11605,6 +11606,22 @@ var init_types = __esm({
11605
11606
  challenge: packageWebhookChallengeSchema.optional(),
11606
11607
  execution: automationExecutionSchema.optional()
11607
11608
  }).superRefine((webhook, ctx) => {
11609
+ const verification = webhook.verification;
11610
+ if (verification?.type !== "url-secret" && verification?.profile === "standard-webhooks") {
11611
+ const replay = webhook.replay;
11612
+ const headers = [
11613
+ verification.header,
11614
+ replay?.timestampHeader,
11615
+ replay?.deliveryIdHeader
11616
+ ].map((header) => header?.toLowerCase());
11617
+ if (verification.type !== "hmac-sha256" || verification.encoding !== "base64" || !verification.secretName || verification.prefix !== void 0 || verification.signedPayload !== void 0 || replay?.timestampFormat !== "unix-seconds" || (replay.toleranceSeconds ?? 300) > 300 || headers.includes(void 0) || new Set(headers).size !== 3) {
11618
+ ctx.addIssue({
11619
+ code: "custom",
11620
+ path: ["verification", "profile"],
11621
+ message: "Standard Webhooks requires a saved HMAC-SHA256 key, base64 signatures, distinct signature, delivery ID, and Unix timestamp headers, and a replay tolerance of at most 300 seconds. The profile fixes the signature prefix and payload."
11622
+ });
11623
+ }
11624
+ }
11608
11625
  if (webhook.verification?.type !== "url-secret" && webhook.verification?.signedPayload === "timestamp.body" && !webhook.replay?.timestampHeader) {
11609
11626
  ctx.addIssue({
11610
11627
  code: "custom",
@@ -12261,13 +12278,13 @@ function createRelativeImportSpecifier(fromPath, targetPath) {
12261
12278
  }
12262
12279
  function normalizeWorkspaceModulePath(path) {
12263
12280
  const parts = [];
12264
- for (const segment of path.replace(/\\/g, "/").split("/")) {
12265
- if (!segment || segment === ".") continue;
12266
- if (segment === "..") {
12281
+ for (const segment2 of path.replace(/\\/g, "/").split("/")) {
12282
+ if (!segment2 || segment2 === ".") continue;
12283
+ if (segment2 === "..") {
12267
12284
  parts.pop();
12268
12285
  continue;
12269
12286
  }
12270
- parts.push(segment);
12287
+ parts.push(segment2);
12271
12288
  }
12272
12289
  return parts.join("/");
12273
12290
  }
@@ -15995,14 +16012,14 @@ var init_lib = __esm({
15995
16012
  super.checkParams(node2, false, true);
15996
16013
  this.scope.exit();
15997
16014
  }
15998
- forwardNoArrowParamsConversionAt(node2, parse9) {
16015
+ forwardNoArrowParamsConversionAt(node2, parse10) {
15999
16016
  let result;
16000
16017
  if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node2.start))) {
16001
16018
  this.state.noArrowParamsConversionAt.push(this.state.start);
16002
- result = parse9();
16019
+ result = parse10();
16003
16020
  this.state.noArrowParamsConversionAt.pop();
16004
16021
  } else {
16005
- result = parse9();
16022
+ result = parse10();
16006
16023
  }
16007
16024
  return result;
16008
16025
  }
@@ -16678,35 +16695,35 @@ var init_lib = __esm({
16678
16695
  const endOfInit = () => this.match(8) || this.match(4);
16679
16696
  switch (this.state.type) {
16680
16697
  case 132: {
16681
- const literal3 = this.parseNumericLiteral(this.state.value);
16698
+ const literal4 = this.parseNumericLiteral(this.state.value);
16682
16699
  if (endOfInit()) {
16683
16700
  return {
16684
16701
  type: "number",
16685
- loc: literal3.start,
16686
- value: literal3
16702
+ loc: literal4.start,
16703
+ value: literal4
16687
16704
  };
16688
16705
  }
16689
16706
  break;
16690
16707
  }
16691
16708
  case 131: {
16692
- const literal3 = this.parseStringLiteral(this.state.value);
16709
+ const literal4 = this.parseStringLiteral(this.state.value);
16693
16710
  if (endOfInit()) {
16694
16711
  return {
16695
16712
  type: "string",
16696
- loc: literal3.start,
16697
- value: literal3
16713
+ loc: literal4.start,
16714
+ value: literal4
16698
16715
  };
16699
16716
  }
16700
16717
  break;
16701
16718
  }
16702
16719
  case 81:
16703
16720
  case 82: {
16704
- const literal3 = this.parseBooleanLiteral(this.match(81));
16721
+ const literal4 = this.parseBooleanLiteral(this.match(81));
16705
16722
  if (endOfInit()) {
16706
16723
  return {
16707
16724
  type: "boolean",
16708
- loc: literal3.start,
16709
- value: literal3
16725
+ loc: literal4.start,
16726
+ value: literal4
16710
16727
  };
16711
16728
  }
16712
16729
  }
@@ -19254,11 +19271,11 @@ var init_lib = __esm({
19254
19271
  stack
19255
19272
  } = this;
19256
19273
  const scope = stack[stack.length - 1];
19257
- const origin = node2.start;
19274
+ const origin2 = node2.start;
19258
19275
  if (scope.isCertainlyParameterDeclaration()) {
19259
- this.parser.raise(error2, origin);
19276
+ this.parser.raise(error2, origin2);
19260
19277
  } else if (scope.canBeArrowParameterDeclaration()) {
19261
- scope.recordDeclarationError(error2, origin);
19278
+ scope.recordDeclarationError(error2, origin2);
19262
19279
  } else {
19263
19280
  return;
19264
19281
  }
@@ -24244,10 +24261,10 @@ var init_lib = __esm({
24244
24261
  const quasis = [curElt];
24245
24262
  if (curElt.tail) {
24246
24263
  const node2 = this.startNodeAt(startLoc);
24247
- const literal3 = this.startNodeAt(startLoc);
24248
- literal3.expressions = [];
24249
- literal3.quasis = quasis;
24250
- node2.literal = this.finishNode(literal3, "TemplateLiteral");
24264
+ const literal4 = this.startNodeAt(startLoc);
24265
+ literal4.expressions = [];
24266
+ literal4.quasis = quasis;
24267
+ node2.literal = this.finishNode(literal4, "TemplateLiteral");
24251
24268
  return this.finishNode(node2, "TSLiteralType");
24252
24269
  } else {
24253
24270
  const substitutions = [];
@@ -26680,9 +26697,9 @@ function describeModuleSourceParseError(error2) {
26680
26697
  message: raw.replace(/\s*\(\d+:\d+\)\s*$/, "")
26681
26698
  };
26682
26699
  }
26683
- function createModuleSourceParser(parse9) {
26700
+ function createModuleSourceParser(parse10) {
26684
26701
  function parseModuleSource2(source, options) {
26685
- return parse9(source, {
26702
+ return parse10(source, {
26686
26703
  sourceType: "module",
26687
26704
  plugins: moduleSourceParserPlugins(options?.filePath),
26688
26705
  createImportExpressions: true
@@ -26694,7 +26711,7 @@ function createModuleSourceParser(parse9) {
26694
26711
  } catch (error2) {
26695
26712
  for (const plugins of fallbackParserPlugins) {
26696
26713
  try {
26697
- return parse9(source, {
26714
+ return parse10(source, {
26698
26715
  sourceType: "module",
26699
26716
  plugins,
26700
26717
  createImportExpressions: true
@@ -26985,16 +27002,16 @@ function collectMemberWriteStarts(parsed) {
26985
27002
  });
26986
27003
  return starts;
26987
27004
  }
26988
- function walkAst(node2, visit2, parent) {
27005
+ function walkAst(node2, visit4, parent) {
26989
27006
  if (!node2 || typeof node2 !== "object") return;
26990
27007
  const typed = node2;
26991
- if (typeof typed.type === "string") visit2(typed, parent);
27008
+ if (typeof typed.type === "string") visit4(typed, parent);
26992
27009
  for (const value of Object.values(typed)) {
26993
27010
  if (Array.isArray(value)) {
26994
- for (const entry of value) walkAst(entry, visit2, typed);
27011
+ for (const entry of value) walkAst(entry, visit4, typed);
26995
27012
  continue;
26996
27013
  }
26997
- walkAst(value, visit2, typed);
27014
+ walkAst(value, visit4, typed);
26998
27015
  }
26999
27016
  }
27000
27017
  function getBindingIdentifierName(node2) {
@@ -27475,7 +27492,8 @@ var init_package_bound_runtime_exports = __esm({
27475
27492
  creator: "__kodyCreatePackageBoundOauthClientCredentials"
27476
27493
  },
27477
27494
  { name: "credential", creator: "__kodyCreatePackageBoundCredentialRuntime" },
27478
- { name: "credentials", creator: "__kodyCreatePackageBoundCredentialRuntime" }
27495
+ { name: "credentials", creator: "__kodyCreatePackageBoundCredentialRuntime" },
27496
+ { name: "packageContext", creator: "__kodyCreatePackageBoundPackageContext" }
27479
27497
  ];
27480
27498
  packageBoundRuntimeExportNames = packageBoundRuntimeExports.map((entry) => entry.name);
27481
27499
  credentialRuntimeName = "__kodyPackageCredentialRuntime";
@@ -28265,7 +28283,10 @@ async function runD1WithRetry(operation, options) {
28265
28283
  }
28266
28284
  throw error2;
28267
28285
  }
28268
- await sleep(baseDelayMs * 2 ** (attempt - 1));
28286
+ const backoffMs = baseDelayMs * 2 ** (attempt - 1);
28287
+ await sleep(
28288
+ options?.jitter ? backoffMs / 2 + Math.random() * (backoffMs / 2) : backoffMs
28289
+ );
28269
28290
  }
28270
28291
  }
28271
28292
  throw lastError;
@@ -29512,7 +29533,7 @@ function parseKodyPackageSpecifier(specifier) {
29512
29533
  if (!trimmed) {
29513
29534
  throw unsupportedSpecifierError(specifier);
29514
29535
  }
29515
- const segments = trimmed.split("/").map((segment) => segment.trim());
29536
+ const segments = trimmed.split("/").map((segment2) => segment2.trim());
29516
29537
  if (segments.length < 2 || segments[0] === "" || segments[1] === "") {
29517
29538
  throw unsupportedSpecifierError(specifier);
29518
29539
  }
@@ -30219,32 +30240,28 @@ function __kodyOptionalRuntimeFunctionExport(exportName) {
30219
30240
  return __kodyCreateRuntimeFunctionExport(exportName);
30220
30241
  }
30221
30242
 
30222
- function __kodyCreateRuntimeRecordExport(exportName) {
30243
+ function __kodyCreateRecordProxy(exportName, read) {
30223
30244
  return new Proxy({}, {
30224
30245
  get(_target, property) {
30225
30246
  if (__kodyIsRuntimeProxyInspectionProperty(property)) {
30226
30247
  return __kodyRuntimeProxyInspectionValue(exportName, property);
30227
30248
  }
30228
- const currentRuntime = __kodyRuntimeStorage.getStore();
30229
- const value = currentRuntime?.[exportName] ?? null;
30249
+ const value = read();
30230
30250
  if (value == null) return undefined;
30231
30251
  return value[property];
30232
30252
  },
30233
30253
  has(_target, property) {
30234
30254
  if (__kodyIsRuntimeProxyInspectionProperty(property)) return false;
30235
- const currentRuntime = __kodyRuntimeStorage.getStore();
30236
- const value = currentRuntime?.[exportName] ?? null;
30255
+ const value = read();
30237
30256
  return value != null && property in value;
30238
30257
  },
30239
30258
  ownKeys() {
30240
- const currentRuntime = __kodyRuntimeStorage.getStore();
30241
- const value = currentRuntime?.[exportName] ?? null;
30259
+ const value = read();
30242
30260
  return value == null ? [] : Reflect.ownKeys(value);
30243
30261
  },
30244
30262
  getOwnPropertyDescriptor(_target, property) {
30245
30263
  if (__kodyIsRuntimeProxyInspectionProperty(property)) return undefined;
30246
- const currentRuntime = __kodyRuntimeStorage.getStore();
30247
- const value = currentRuntime?.[exportName] ?? null;
30264
+ const value = read();
30248
30265
  if (value == null) return undefined;
30249
30266
  const descriptor = Reflect.getOwnPropertyDescriptor(value, property);
30250
30267
  if (descriptor !== undefined) {
@@ -30270,6 +30287,24 @@ function __kodyCreateRuntimeRecordExport(exportName) {
30270
30287
  });
30271
30288
  }
30272
30289
 
30290
+ function __kodyCreateRuntimeRecordExport(exportName) {
30291
+ return __kodyCreateRecordProxy(
30292
+ exportName,
30293
+ () => __kodyRuntimeStorage.getStore()?.[exportName] ?? null,
30294
+ );
30295
+ }
30296
+
30297
+ // A package's own modules read its own id even when an export runs inside
30298
+ // another run (ad hoc execute, another package): the run's context when the
30299
+ // run belongs to this package, else just \`{ packageId }\`.
30300
+ export function __kodyCreatePackageBoundPackageContext(packageId) {
30301
+ const own = Object.freeze({ packageId });
30302
+ return __kodyCreateRecordProxy('packageContext', () => {
30303
+ const run = __kodyGetRuntimeStore()?.packageContext ?? null;
30304
+ return run != null && run.packageId === packageId ? run : own;
30305
+ });
30306
+ }
30307
+
30273
30308
  function __kodyResolvePackageStorage(packageId) {
30274
30309
  const currentRuntime = __kodyRuntimeStorage.getStore();
30275
30310
  const factory = currentRuntime?.__kodyPackageStorage;
@@ -31753,9 +31788,9 @@ ${helpers.bindings}`,
31753
31788
  )
31754
31789
  };
31755
31790
  }
31756
- function parseStringLiteral(literal3) {
31791
+ function parseStringLiteral(literal4) {
31757
31792
  try {
31758
- const value = JSON.parse(literal3);
31793
+ const value = JSON.parse(literal4);
31759
31794
  return typeof value === "string" ? value : null;
31760
31795
  } catch {
31761
31796
  return null;
@@ -31881,7 +31916,8 @@ var init_inlined_facade_binding_repair = __esm({
31881
31916
  boundCreatorNamePattern = /^__kodyCreatePackageBound[A-Za-z]+$/;
31882
31917
  facadeRepairCreators = {
31883
31918
  createAuthenticatedFetch: "__kodyCreatePackageBoundAuthenticatedFetch",
31884
- oauthClientCredentials: "__kodyCreatePackageBoundOauthClientCredentials"
31919
+ oauthClientCredentials: "__kodyCreatePackageBoundOauthClientCredentials",
31920
+ packageContext: "__kodyCreatePackageBoundPackageContext"
31885
31921
  };
31886
31922
  }
31887
31923
  });
@@ -32657,8 +32693,8 @@ var require_createActor_25900f76_cjs = __commonJS({
32657
32693
  return incarnation === void 0 || typeof incarnation === "string";
32658
32694
  }
32659
32695
  function getAddressId(address) {
32660
- const segment = address.slice(address.lastIndexOf("/") + 1);
32661
- return segment.includes("%") ? segment.replaceAll("%2F", "/").replaceAll("%25", "%") : segment;
32696
+ const segment2 = address.slice(address.lastIndexOf("/") + 1);
32697
+ return segment2.includes("%") ? segment2.replaceAll("%2F", "/").replaceAll("%25", "%") : segment2;
32662
32698
  }
32663
32699
  function createMissingAddressError(target) {
32664
32700
  return new Error(xstateError(50, ...target.incarnation === void 0 ? [target.$actor] : [target.$actor, target.incarnation]));
@@ -36626,24 +36662,24 @@ var require_createActor_25900f76_cjs = __commonJS({
36626
36662
  return stateId;
36627
36663
  }
36628
36664
  const result = [];
36629
- let segment = "";
36665
+ let segment2 = "";
36630
36666
  for (let i4 = 0; i4 < stateId.length; i4++) {
36631
36667
  const char = stateId.charCodeAt(i4);
36632
36668
  switch (char) {
36633
36669
  // \
36634
36670
  case 92:
36635
- segment += stateId[i4 + 1] === "." ? "\\." : stateId[i4 + 1];
36671
+ segment2 += stateId[i4 + 1] === "." ? "\\." : stateId[i4 + 1];
36636
36672
  i4++;
36637
36673
  continue;
36638
36674
  // .
36639
36675
  case 46:
36640
- result.push(segment);
36641
- segment = "";
36676
+ result.push(segment2);
36677
+ segment2 = "";
36642
36678
  continue;
36643
36679
  }
36644
- segment += stateId[i4];
36680
+ segment2 += stateId[i4];
36645
36681
  }
36646
- result.push(segment);
36682
+ result.push(segment2);
36647
36683
  return result;
36648
36684
  }
36649
36685
  function toStateValue(stateValue) {
@@ -40436,7 +40472,7 @@ var require_xstate_cjs = __commonJS({
40436
40472
  function getMachineSerializationDiagnostics2(machine) {
40437
40473
  const diagnostics = [];
40438
40474
  const ancestors = /* @__PURE__ */ new Set();
40439
- const visit2 = (value, path, runtimeSource = false) => {
40475
+ const visit4 = (value, path, runtimeSource = false) => {
40440
40476
  const report = (code2, message) => diagnostics.push({
40441
40477
  code: code2,
40442
40478
  path,
@@ -40480,11 +40516,11 @@ var require_xstate_cjs = __commonJS({
40480
40516
  for (const [key, entry] of Object.entries(value)) {
40481
40517
  const pointer = `${path}/${key.replaceAll("~", "~0").replaceAll("/", "~1")}`;
40482
40518
  const sourceEntry = /^\/(actions|guards|actors|delays)$/.test(path);
40483
- visit2(entry, pointer, sourceEntry);
40519
+ visit4(entry, pointer, sourceEntry);
40484
40520
  }
40485
40521
  ancestors.delete(value);
40486
40522
  };
40487
- visit2(machine._json ?? machine.config, "");
40523
+ visit4(machine._json ?? machine.config, "");
40488
40524
  return diagnostics;
40489
40525
  }
40490
40526
  function machineToJSON2(machine) {
@@ -42082,13 +42118,13 @@ var require_xstate_cjs = __commonJS({
42082
42118
  for (const [name, child] of Object.entries(machine.sources?.actors ?? {})) {
42083
42119
  add(`${key}/actors/${createActor2.encodeAddressSegment(name)}`, child);
42084
42120
  }
42085
- function visit2(node2) {
42121
+ function visit4(node2) {
42086
42122
  for (const invoke of node2.invoke ?? []) {
42087
42123
  if (typeof invoke.logic === "object") add(`${key}/invoke/${createActor2.encodeAddressSegment(node2.id)}/${createActor2.encodeAddressSegment(invoke.id)}`, invoke.logic);
42088
42124
  }
42089
- for (const child of Object.values(node2.states ?? {})) visit2(child);
42125
+ for (const child of Object.values(node2.states ?? {})) visit4(child);
42090
42126
  }
42091
- if (machine.root) visit2(machine.root);
42127
+ if (machine.root) visit4(machine.root);
42092
42128
  }
42093
42129
  add("root", systemLogic.root);
42094
42130
  for (const [key, logic] of Object.entries(systemLogic.actors ?? {})) add(`actors/${createActor2.encodeAddressSegment(key)}`, logic);
@@ -42918,7 +42954,7 @@ function defineStatusEnum(definition) {
42918
42954
  function is(value) {
42919
42955
  return typeof value === "string" && values.includes(value);
42920
42956
  }
42921
- function parse9(value) {
42957
+ function parse10(value) {
42922
42958
  if (!is(value))
42923
42959
  throw new Error(
42924
42960
  `${name}: expected one of ${values.join(", ")}, got ${String(value)}`
@@ -42930,8 +42966,8 @@ function defineStatusEnum(definition) {
42930
42966
  description,
42931
42967
  values,
42932
42968
  is,
42933
- parse: parse9,
42934
- sql: (selected) => sqlStateValues(name, selected.map(parse9))
42969
+ parse: parse10,
42970
+ sql: (selected) => sqlStateValues(name, selected.map(parse10))
42935
42971
  });
42936
42972
  }
42937
42973
  var IllegalStateTransitionError;
@@ -46011,7 +46047,7 @@ var require_constants = __commonJS({
46011
46047
  "use strict";
46012
46048
  var SEMVER_SPEC_VERSION = "2.0.0";
46013
46049
  var MAX_LENGTH = 256;
46014
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
46050
+ var MAX_SAFE_INTEGER2 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
46015
46051
  9007199254740991;
46016
46052
  var MAX_SAFE_COMPONENT_LENGTH = 16;
46017
46053
  var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
@@ -46028,7 +46064,7 @@ var require_constants = __commonJS({
46028
46064
  MAX_LENGTH,
46029
46065
  MAX_SAFE_COMPONENT_LENGTH,
46030
46066
  MAX_SAFE_BUILD_LENGTH,
46031
- MAX_SAFE_INTEGER,
46067
+ MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2,
46032
46068
  RELEASE_TYPES,
46033
46069
  SEMVER_SPEC_VERSION,
46034
46070
  FLAG_INCLUDE_PRERELEASE: 1,
@@ -46184,7 +46220,7 @@ var require_semver = __commonJS({
46184
46220
  "../../node_modules/semver/classes/semver.js"(exports, module) {
46185
46221
  "use strict";
46186
46222
  var debug = require_debug();
46187
- var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
46223
+ var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = require_constants();
46188
46224
  var { safeRe: re, t: t4 } = require_re();
46189
46225
  var parseOptions = require_parse_options();
46190
46226
  var { compareIdentifiers } = require_identifiers();
@@ -46229,13 +46265,13 @@ var require_semver = __commonJS({
46229
46265
  this.major = +m[1];
46230
46266
  this.minor = +m[2];
46231
46267
  this.patch = +m[3];
46232
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
46268
+ if (this.major > MAX_SAFE_INTEGER2 || this.major < 0) {
46233
46269
  throw new TypeError("Invalid major version");
46234
46270
  }
46235
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
46271
+ if (this.minor > MAX_SAFE_INTEGER2 || this.minor < 0) {
46236
46272
  throw new TypeError("Invalid minor version");
46237
46273
  }
46238
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
46274
+ if (this.patch > MAX_SAFE_INTEGER2 || this.patch < 0) {
46239
46275
  throw new TypeError("Invalid patch version");
46240
46276
  }
46241
46277
  if (!m[4]) {
@@ -46244,7 +46280,7 @@ var require_semver = __commonJS({
46244
46280
  this.prerelease = m[4].split(".").map((id) => {
46245
46281
  if (/^[0-9]+$/.test(id)) {
46246
46282
  const num = +id;
46247
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
46283
+ if (num >= 0 && num < MAX_SAFE_INTEGER2) {
46248
46284
  return num;
46249
46285
  }
46250
46286
  }
@@ -46476,7 +46512,7 @@ var require_parse = __commonJS({
46476
46512
  "../../node_modules/semver/functions/parse.js"(exports, module) {
46477
46513
  "use strict";
46478
46514
  var SemVer = require_semver();
46479
- var parse9 = (version2, options, throwErrors = false) => {
46515
+ var parse10 = (version2, options, throwErrors = false) => {
46480
46516
  if (version2 instanceof SemVer) {
46481
46517
  return version2;
46482
46518
  }
@@ -46489,7 +46525,7 @@ var require_parse = __commonJS({
46489
46525
  throw er;
46490
46526
  }
46491
46527
  };
46492
- module.exports = parse9;
46528
+ module.exports = parse10;
46493
46529
  }
46494
46530
  });
46495
46531
 
@@ -46497,9 +46533,9 @@ var require_parse = __commonJS({
46497
46533
  var require_valid = __commonJS({
46498
46534
  "../../node_modules/semver/functions/valid.js"(exports, module) {
46499
46535
  "use strict";
46500
- var parse9 = require_parse();
46536
+ var parse10 = require_parse();
46501
46537
  var valid = (version2, options) => {
46502
- const v = parse9(version2, options);
46538
+ const v = parse10(version2, options);
46503
46539
  return v ? v.version : null;
46504
46540
  };
46505
46541
  module.exports = valid;
@@ -46510,9 +46546,9 @@ var require_valid = __commonJS({
46510
46546
  var require_clean = __commonJS({
46511
46547
  "../../node_modules/semver/functions/clean.js"(exports, module) {
46512
46548
  "use strict";
46513
- var parse9 = require_parse();
46549
+ var parse10 = require_parse();
46514
46550
  var clean = (version2, options) => {
46515
- const s3 = parse9(version2.trim().replace(/^[=v]+/, ""), options);
46551
+ const s3 = parse10(version2.trim().replace(/^[=v]+/, ""), options);
46516
46552
  return s3 ? s3.version : null;
46517
46553
  };
46518
46554
  module.exports = clean;
@@ -46547,10 +46583,10 @@ var require_inc = __commonJS({
46547
46583
  var require_diff = __commonJS({
46548
46584
  "../../node_modules/semver/functions/diff.js"(exports, module) {
46549
46585
  "use strict";
46550
- var parse9 = require_parse();
46586
+ var parse10 = require_parse();
46551
46587
  var diff = (version1, version2) => {
46552
- const v1 = parse9(version1, null, true);
46553
- const v2 = parse9(version2, null, true);
46588
+ const v1 = parse10(version1, null, true);
46589
+ const v2 = parse10(version2, null, true);
46554
46590
  const comparison = v1.compare(v2);
46555
46591
  if (comparison === 0) {
46556
46592
  return null;
@@ -46621,9 +46657,9 @@ var require_patch = __commonJS({
46621
46657
  var require_prerelease = __commonJS({
46622
46658
  "../../node_modules/semver/functions/prerelease.js"(exports, module) {
46623
46659
  "use strict";
46624
- var parse9 = require_parse();
46660
+ var parse10 = require_parse();
46625
46661
  var prerelease = (version2, options) => {
46626
- const parsed = parse9(version2, options);
46662
+ const parsed = parse10(version2, options);
46627
46663
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
46628
46664
  };
46629
46665
  module.exports = prerelease;
@@ -46809,7 +46845,7 @@ var require_coerce = __commonJS({
46809
46845
  "../../node_modules/semver/functions/coerce.js"(exports, module) {
46810
46846
  "use strict";
46811
46847
  var SemVer = require_semver();
46812
- var parse9 = require_parse();
46848
+ var parse10 = require_parse();
46813
46849
  var { safeRe: re, t: t4 } = require_re();
46814
46850
  var coerce = (version2, options) => {
46815
46851
  if (version2 instanceof SemVer) {
@@ -46844,7 +46880,7 @@ var require_coerce = __commonJS({
46844
46880
  const patch = match2[4] || "0";
46845
46881
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
46846
46882
  const build2 = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
46847
- return parse9(`${major}.${minor}.${patch}${prerelease}${build2}`, options);
46883
+ return parse10(`${major}.${minor}.${patch}${prerelease}${build2}`, options);
46848
46884
  };
46849
46885
  module.exports = coerce;
46850
46886
  }
@@ -46854,7 +46890,7 @@ var require_coerce = __commonJS({
46854
46890
  var require_truncate = __commonJS({
46855
46891
  "../../node_modules/semver/functions/truncate.js"(exports, module) {
46856
46892
  "use strict";
46857
- var parse9 = require_parse();
46893
+ var parse10 = require_parse();
46858
46894
  var constants = require_constants();
46859
46895
  var SemVer = require_semver();
46860
46896
  var truncate = (version2, truncation, options) => {
@@ -46866,7 +46902,7 @@ var require_truncate = __commonJS({
46866
46902
  };
46867
46903
  var cloneInputVersion = (version2, options) => {
46868
46904
  const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
46869
- return parse9(versionStringToParse, options);
46905
+ return parse10(versionStringToParse, options);
46870
46906
  };
46871
46907
  var doTruncation = (version2, truncation) => {
46872
46908
  if (isPrerelease(truncation)) {
@@ -47910,7 +47946,7 @@ var require_semver2 = __commonJS({
47910
47946
  var constants = require_constants();
47911
47947
  var SemVer = require_semver();
47912
47948
  var identifiers = require_identifiers();
47913
- var parse9 = require_parse();
47949
+ var parse10 = require_parse();
47914
47950
  var valid = require_valid();
47915
47951
  var clean = require_clean();
47916
47952
  var inc = require_inc();
@@ -47949,7 +47985,7 @@ var require_semver2 = __commonJS({
47949
47985
  var simplifyRange = require_simplify();
47950
47986
  var subset = require_subset();
47951
47987
  module.exports = {
47952
- parse: parse9,
47988
+ parse: parse10,
47953
47989
  valid,
47954
47990
  clean,
47955
47991
  inc,
@@ -48223,7 +48259,7 @@ function selectLatestCompatibleWheel(files) {
48223
48259
  return latest;
48224
48260
  }
48225
48261
  function comparePythonVersions(a2, b3) {
48226
- const parse9 = (v) => {
48262
+ const parse10 = (v) => {
48227
48263
  const releaseMatch = v.match(/^[0-9]+(?:\.[0-9]+)*/);
48228
48264
  const release = (releaseMatch?.[0] ?? "0").split(".").map(Number);
48229
48265
  const rest = v.slice(releaseMatch?.[0].length ?? 0);
@@ -48232,8 +48268,8 @@ function comparePythonVersions(a2, b3) {
48232
48268
  isPre: /^[.\-_]?(a|b|c|rc|alpha|beta|dev|pre)/i.test(rest)
48233
48269
  };
48234
48270
  };
48235
- const av = parse9(a2);
48236
- const bv = parse9(b3);
48271
+ const av = parse10(a2);
48272
+ const bv = parse10(b3);
48237
48273
  const len = Math.max(av.release.length, bv.release.length);
48238
48274
  for (let i4 = 0; i4 < len; i4++) {
48239
48275
  const diff = (av.release[i4] ?? 0) - (bv.release[i4] ?? 0);
@@ -48548,7 +48584,7 @@ var require_browser = __commonJS({
48548
48584
  });
48549
48585
  module2.exports = __toCommonJS(browser_exports);
48550
48586
  function encodePacket(packet) {
48551
- let visit2 = (value) => {
48587
+ let visit4 = (value) => {
48552
48588
  if (value === null) {
48553
48589
  bb.write8(0);
48554
48590
  } else if (typeof value === "boolean") {
@@ -48567,7 +48603,7 @@ var require_browser = __commonJS({
48567
48603
  bb.write8(5);
48568
48604
  bb.write32(value.length);
48569
48605
  for (let item of value) {
48570
- visit2(item);
48606
+ visit4(item);
48571
48607
  }
48572
48608
  } else {
48573
48609
  let keys = Object.keys(value);
@@ -48575,19 +48611,19 @@ var require_browser = __commonJS({
48575
48611
  bb.write32(keys.length);
48576
48612
  for (let key of keys) {
48577
48613
  bb.write(encodeUTF8(key));
48578
- visit2(value[key]);
48614
+ visit4(value[key]);
48579
48615
  }
48580
48616
  }
48581
48617
  };
48582
48618
  let bb = new ByteBuffer();
48583
48619
  bb.write32(0);
48584
48620
  bb.write32(packet.id << 1 | +!packet.isRequest);
48585
- visit2(packet.value);
48621
+ visit4(packet.value);
48586
48622
  writeUInt32LE(bb.buf, bb.len - 4, 0);
48587
48623
  return bb.buf.subarray(0, bb.len);
48588
48624
  }
48589
48625
  function decodePacket(bytes) {
48590
- let visit2 = () => {
48626
+ let visit4 = () => {
48591
48627
  switch (bb.read8()) {
48592
48628
  case 0:
48593
48629
  return null;
@@ -48603,7 +48639,7 @@ var require_browser = __commonJS({
48603
48639
  let count = bb.read32();
48604
48640
  let value2 = [];
48605
48641
  for (let i4 = 0; i4 < count; i4++) {
48606
- value2.push(visit2());
48642
+ value2.push(visit4());
48607
48643
  }
48608
48644
  return value2;
48609
48645
  }
@@ -48611,7 +48647,7 @@ var require_browser = __commonJS({
48611
48647
  let count = bb.read32();
48612
48648
  let value2 = {};
48613
48649
  for (let i4 = 0; i4 < count; i4++) {
48614
- value2[decodeUTF8(bb.read())] = visit2();
48650
+ value2[decodeUTF8(bb.read())] = visit4();
48615
48651
  }
48616
48652
  return value2;
48617
48653
  }
@@ -48623,7 +48659,7 @@ var require_browser = __commonJS({
48623
48659
  let id = bb.read32();
48624
48660
  let isRequest = (id & 1) === 0;
48625
48661
  id >>>= 1;
48626
- let value = visit2();
48662
+ let value = visit4();
48627
48663
  if (bb.ptr !== bytes.length) {
48628
48664
  throw new Error("Invalid packet");
48629
48665
  }
@@ -49084,7 +49120,7 @@ is not a problem with esbuild. You need to fix your environment instead.
49084
49120
  let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString);
49085
49121
  let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean);
49086
49122
  let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings);
49087
- let format = getFlag(options, keys, "format", mustBeString);
49123
+ let format2 = getFlag(options, keys, "format", mustBeString);
49088
49124
  let globalName = getFlag(options, keys, "globalName", mustBeString);
49089
49125
  let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
49090
49126
  let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp);
@@ -49117,7 +49153,7 @@ is not a problem with esbuild. You need to fix your environment instead.
49117
49153
  if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`);
49118
49154
  if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`);
49119
49155
  if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`);
49120
- if (format) flags.push(`--format=${format}`);
49156
+ if (format2) flags.push(`--format=${format2}`);
49121
49157
  if (globalName) flags.push(`--global-name=${globalName}`);
49122
49158
  if (platform) flags.push(`--platform=${platform}`);
49123
49159
  if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
@@ -49800,10 +49836,10 @@ is not a problem with esbuild. You need to fix your environment instead.
49800
49836
  if (fallback !== void 0) request2.fallback = fallback;
49801
49837
  if (cors) {
49802
49838
  const corsKeys = {};
49803
- const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings);
49839
+ const origin2 = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings);
49804
49840
  checkForInvalidFlags(cors, corsKeys, `on "cors" object`);
49805
- if (Array.isArray(origin)) request2.corsOrigin = origin;
49806
- else if (origin !== void 0) request2.corsOrigin = [origin];
49841
+ if (Array.isArray(origin2)) request2.corsOrigin = origin2;
49842
+ else if (origin2 !== void 0) request2.corsOrigin = [origin2];
49807
49843
  }
49808
49844
  sendRequest(refs, request2, (error22, response2) => {
49809
49845
  if (error22) return reject(new Error(error22));
@@ -66407,20 +66443,20 @@ function encode3(decoded) {
66407
66443
  if (line.length === 0) continue;
66408
66444
  let genColumn = 0;
66409
66445
  for (let j = 0; j < line.length; j++) {
66410
- const segment = line[j];
66446
+ const segment2 = line[j];
66411
66447
  if (j > 0) writer.write(comma);
66412
- encodeInteger(writer, encodeSign(segment[0] - genColumn));
66413
- genColumn = segment[0];
66414
- if (segment.length === 1) continue;
66415
- encodeInteger(writer, encodeSign(segment[1] - sourcesIndex));
66416
- encodeInteger(writer, encodeSign(segment[2] - sourceLine));
66417
- encodeInteger(writer, encodeSign(segment[3] - sourceColumn));
66418
- sourcesIndex = segment[1];
66419
- sourceLine = segment[2];
66420
- sourceColumn = segment[3];
66421
- if (segment.length === 4) continue;
66422
- encodeInteger(writer, encodeSign(segment[4] - namesIndex));
66423
- namesIndex = segment[4];
66448
+ encodeInteger(writer, encodeSign(segment2[0] - genColumn));
66449
+ genColumn = segment2[0];
66450
+ if (segment2.length === 1) continue;
66451
+ encodeInteger(writer, encodeSign(segment2[1] - sourcesIndex));
66452
+ encodeInteger(writer, encodeSign(segment2[2] - sourceLine));
66453
+ encodeInteger(writer, encodeSign(segment2[3] - sourceColumn));
66454
+ sourcesIndex = segment2[1];
66455
+ sourceLine = segment2[2];
66456
+ sourceColumn = segment2[3];
66457
+ if (segment2.length === 4) continue;
66458
+ encodeInteger(writer, encodeSign(segment2[4] - namesIndex));
66459
+ namesIndex = segment2[4];
66424
66460
  }
66425
66461
  }
66426
66462
  return writer.flush();
@@ -76594,20 +76630,20 @@ function attachCustomHeaders(request, response, config2) {
76594
76630
  return response;
76595
76631
  }
76596
76632
  function decodePath(pathname) {
76597
- return pathname.split("/").map((segment) => {
76633
+ return pathname.split("/").map((segment2) => {
76598
76634
  try {
76599
- return decodeURIComponent(segment);
76635
+ return decodeURIComponent(segment2);
76600
76636
  } catch {
76601
- return segment;
76637
+ return segment2;
76602
76638
  }
76603
76639
  }).join("/").replaceAll(/\/+/g, "/");
76604
76640
  }
76605
76641
  function encodePath(pathname) {
76606
- return pathname.split("/").map((segment) => {
76642
+ return pathname.split("/").map((segment2) => {
76607
76643
  try {
76608
- return encodeURIComponent(segment);
76644
+ return encodeURIComponent(segment2);
76609
76645
  } catch {
76610
- return segment;
76646
+ return segment2;
76611
76647
  }
76612
76648
  }).join("/");
76613
76649
  }
@@ -79449,7 +79485,7 @@ var init_typescript2 = __esm({
79449
79485
  rangeOverlapsWithStartEnd: () => TP,
79450
79486
  rangeStartIsOnSameLineAsRangeEnd: () => See,
79451
79487
  rangeStartPositionsAreOnSameLine: () => q5,
79452
- readBuilderProgram: () => _9,
79488
+ readBuilderProgram: () => _92,
79453
79489
  readConfigFile: () => aA,
79454
79490
  readJson: () => KC,
79455
79491
  readJsonConfigFile: () => Xre,
@@ -119757,7 +119793,7 @@ ${It.join(`
119757
119793
  y = wa(a10, x10, r7.symbol);
119758
119794
  } else {
119759
119795
  let x10 = r7.propertyName || r7.name, A = Mh(x10);
119760
- y = Vg(r7, gf(a10, A, d, x10));
119796
+ y = Vg(r7, gf2(a10, A, d, x10));
119761
119797
  }
119762
119798
  else {
119763
119799
  let x10 = Q0(65 | (r7.dotDotDotToken ? 0 : 128), a10, Ze, f10), A = f10.elements.indexOf(r7);
@@ -120403,7 +120439,7 @@ ${It.join(`
120403
120439
  return r7.resolvedBaseTypes;
120404
120440
  }
120405
120441
  function Det(r7) {
120406
- return pu(Xn(Uc(r7.typeParameters, (l10, f10) => r7.elementFlags[f10] & 8 ? gf(l10, Ge) : l10) || qe), r7.readonly);
120442
+ return pu(Xn(Uc(r7.typeParameters, (l10, f10) => r7.elementFlags[f10] & 8 ? gf2(l10, Ge) : l10) || qe), r7.readonly);
120407
120443
  }
120408
120444
  function Pet(r7) {
120409
120445
  r7.resolvedBaseTypes = cB;
@@ -122570,7 +122606,7 @@ ${It.join(`
122570
122606
  else We(dt, jt, (y = r7.labeledElementDeclarations) == null ? void 0 : y[lt]);
122571
122607
  }
122572
122608
  for (let lt = 0; lt < U; lt++) A[lt] & 2 && (A[lt] = 1);
122573
- X >= 0 && X < ge && (x10[X] = Xn(Uc(x10.slice(X, ge + 1), (lt, dt) => A[X + dt] & 8 ? gf(lt, Ge) : lt)), x10.splice(X + 1, ge - X), A.splice(X + 1, ge - X), J.splice(X + 1, ge - X));
122609
+ X >= 0 && X < ge && (x10[X] = Xn(Uc(x10.slice(X, ge + 1), (lt, dt) => A[X + dt] & 8 ? gf2(lt, Ge) : lt)), x10.splice(X + 1, ge - X), A.splice(X + 1, ge - X), J.splice(X + 1, ge - X));
122574
122610
  let fe = ppe(A, r7.readonly, J);
122575
122611
  return fe === Ys ? yi : A.length ? Lh(fe, x10) : fe;
122576
122612
  function We(lt, dt, jt) {
@@ -123232,13 +123268,13 @@ ${It.join(`
123232
123268
  }
123233
123269
  function CNe(r7, a10, l10) {
123234
123270
  if (r7.flags & 134217728 || r7.flags & 268435456 && !Tpe(r7)) {
123235
- let f10 = dr(r7.types, (d) => Rh(gf(d, a10), l10));
123271
+ let f10 = dr(r7.types, (d) => Rh(gf2(d, a10), l10));
123236
123272
  return r7.flags & 268435456 || l10 ? ra(f10) : Xn(f10);
123237
123273
  }
123238
123274
  }
123239
123275
  function Urt(r7, a10, l10) {
123240
123276
  if (a10.flags & 134217728) {
123241
- let f10 = dr(a10.types, (d) => Rh(gf(r7, d), l10));
123277
+ let f10 = dr(a10.types, (d) => Rh(gf2(r7, d), l10));
123242
123278
  return l10 ? ra(f10) : Xn(f10);
123243
123279
  }
123244
123280
  }
@@ -123283,7 +123319,7 @@ ${It.join(`
123283
123319
  let l10 = eu(a10);
123284
123320
  return !!l10 && ct(qa(r7), (f10) => !!(f10.flags & 16777216) && Ns(iC(f10, 19456), l10));
123285
123321
  }
123286
- function gf(r7, a10, l10 = 0, f10, d, y) {
123322
+ function gf2(r7, a10, l10 = 0, f10, d, y) {
123287
123323
  return m1(r7, a10, l10, f10, d, y) || (f10 ? et2 : W);
123288
123324
  }
123289
123325
  function DNe(r7, a10) {
@@ -123322,7 +123358,7 @@ ${It.join(`
123322
123358
  let a10 = Dn(r7);
123323
123359
  if (!a10.resolvedType) {
123324
123360
  let l10 = Ci(r7.objectType), f10 = Ci(r7.indexType), d = aC(r7);
123325
- a10.resolvedType = gf(l10, f10, 0, r7, d, J6(d));
123361
+ a10.resolvedType = gf2(l10, f10, 0, r7, d, J6(d));
123326
123362
  }
123327
123363
  return a10.resolvedType;
123328
123364
  }
@@ -123335,7 +123371,7 @@ ${It.join(`
123335
123371
  return a10.resolvedType;
123336
123372
  }
123337
123373
  function jh(r7) {
123338
- return r7.flags & 16777216 ? jh(r7.baseType) : r7.flags & 33554432 && (r7.objectType.flags & 16777216 || r7.indexType.flags & 16777216) ? gf(jh(r7.objectType), jh(r7.indexType)) : r7;
123374
+ return r7.flags & 16777216 ? jh(r7.baseType) : r7.flags & 33554432 && (r7.objectType.flags & 16777216 || r7.indexType.flags & 16777216) ? gf2(jh(r7.objectType), jh(r7.indexType)) : r7;
123339
123375
  }
123340
123376
  function wNe(r7) {
123341
123377
  return $x(r7) && kr(r7.elements) > 0 && !ct(r7.elements, (a10) => LF(a10) || MF(a10) || lE(a10) && !!(a10.questionToken || a10.dotDotDotToken));
@@ -124032,7 +124068,7 @@ ${It.join(`
124032
124068
  if (d & 8388608) return sC(r7.symbol, Mi(r7.type, a10));
124033
124069
  if (d & 33554432) {
124034
124070
  let y = l10 || r7.aliasSymbol, x10 = l10 ? f10 : Bh(r7.aliasTypeArguments, a10);
124035
- return gf(Mi(r7.objectType, a10), Mi(r7.indexType, a10), r7.accessFlags, void 0, y, x10);
124071
+ return gf2(Mi(r7.objectType, a10), Mi(r7.indexType, a10), r7.accessFlags, void 0, y, x10);
124036
124072
  }
124037
124073
  if (d & 67108864) return Rpe(r7, Qv(r7.mapper, a10), false, l10, f10);
124038
124074
  if (d & 16777216) {
@@ -124329,7 +124365,7 @@ ${It.join(`
124329
124365
  function xnt(r7, a10, l10, f10, d, y) {
124330
124366
  let x10 = EM(Snt(r7), a10, l10, f10, d, y), A;
124331
124367
  if (Td(r7.parent) && cm(r7.parent.parent)) {
124332
- let U = r7.parent.parent, X = $M(jT(r7)), ge = X === void 0 ? "children" : mi(X), fe = R_(ge), We = gf(l10, fe), lt = XC(U.children);
124368
+ let U = r7.parent.parent, X = $M(jT(r7)), ge = X === void 0 ? "children" : mi(X), fe = R_(ge), We = gf2(l10, fe), lt = XC(U.children);
124333
124369
  if (!kr(lt)) return x10;
124334
124370
  let dt = kr(lt) > 1, jt, ir;
124335
124371
  if (hM(false) !== Ys) {
@@ -124340,7 +124376,7 @@ ${It.join(`
124340
124376
  if (jt !== qt) {
124341
124377
  let Yr = ng(lX(U, 0));
124342
124378
  x10 = bnt(Tnt(U, J), Yr, jt, f10, d, y) || x10;
124343
- } else if (!Am(gf(a10, fe), We, f10)) {
124379
+ } else if (!Am(gf2(a10, fe), We, f10)) {
124344
124380
  x10 = true;
124345
124381
  let Yr = ze(U.openingElement.tagName, p.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, ge, Xr(We));
124346
124382
  y && y.skipLogging && (y.errors || (y.errors = [])).push(Yr);
@@ -124350,7 +124386,7 @@ ${It.join(`
124350
124386
  ar && (x10 = EM((function* () {
124351
124387
  yield ar;
124352
124388
  })(), a10, l10, f10, d, y) || x10);
124353
- } else if (!Am(gf(a10, fe), We, f10)) {
124389
+ } else if (!Am(gf2(a10, fe), We, f10)) {
124354
124390
  x10 = true;
124355
124391
  let Yr = ze(U.openingElement.tagName, p.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, ge, Xr(We));
124356
124392
  y && y.skipLogging && (y.errors || (y.errors = [])).push(Yr);
@@ -124359,7 +124395,7 @@ ${It.join(`
124359
124395
  return x10;
124360
124396
  function J() {
124361
124397
  if (!A) {
124362
- let U = Go(r7.parent.tagName), X = $M(jT(r7)), ge = X === void 0 ? "children" : mi(X), fe = gf(l10, R_(ge)), We = p._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
124398
+ let U = Go(r7.parent.tagName), X = $M(jT(r7)), ge = X === void 0 ? "children" : mi(X), fe = gf2(l10, R_(ge)), We = p._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
124363
124399
  A = {
124364
124400
  ...We,
124365
124401
  key: "!!ALREADY FORMATTED!!",
@@ -125056,7 +125092,7 @@ ${It.join(`
125056
125092
  if (fAe(Te) && !Te.target.readonly && (Mt = Zr(Eo(Te)[0], Le, 1)) || fAe(Le) && (Le.target.readonly || AM(eu(Te) || Te)) && (Mt = Zr(Te, Eo(Le)[0], 2))) return Mt;
125057
125093
  if (yn & 524288) {
125058
125094
  if (gn(Te) & 32 && !Te.declaration.nameType && Zr(Nm(Le), Wf(Te), 3) && !(tg(Te) & 4)) {
125059
- if (Mt = Zr(Xg(Te), gf(Le, Rd(Te)), 3, rt)) return Mt;
125095
+ if (Mt = Zr(Xg(Te), gf2(Le, Rd(Te)), 3, rt)) return Mt;
125060
125096
  }
125061
125097
  if (l10 === Uo && en & 524288) {
125062
125098
  let Wr = qu(Te);
@@ -125110,7 +125146,7 @@ ${It.join(`
125110
125146
  if (Mt = Zr(Te, Ba.objectType, 2, rt)) return Mt;
125111
125147
  } else {
125112
125148
  let ns = Wr ? us || Ta : us ? ra([us, ca]) : ca;
125113
- if (Mt = Zr(gf(Te, ns), $i, 3, rt)) return Mt;
125149
+ if (Mt = Zr(gf2(Te, ns), $i, 3, rt)) return Mt;
125114
125150
  }
125115
125151
  }
125116
125152
  Yt = J, Wn($t);
@@ -125137,7 +125173,7 @@ ${It.join(`
125137
125173
  if (Mt = Zr(mf(Wr, Te), Le, 1, rt && Wr !== W && !(yn & en & 524288), void 0, wt)) return Mt;
125138
125174
  if (Hfe(Te)) {
125139
125175
  let si = bT(Te.indexType);
125140
- if (si && (Mt = Zr(gf(Te.objectType, si), Le, 1, rt))) return Mt;
125176
+ if (si && (Mt = Zr(gf2(Te.objectType, si), Le, 1, rt))) return Mt;
125141
125177
  }
125142
125178
  }
125143
125179
  } else if (en & 2097152) {
@@ -125881,7 +125917,7 @@ ${It.join(`
125881
125917
  let x10 = Eo(r7), A = [];
125882
125918
  for (let J = a10; J < y; J++) {
125883
125919
  let U = x10[J];
125884
- A.push(r7.target.elementFlags[J] & 8 ? gf(U, Ge) : U);
125920
+ A.push(r7.target.elementFlags[J] & 8 ? gf2(U, Ge) : U);
125885
125921
  }
125886
125922
  return f10 ? ra(A) : Xn(A, d ? 0 : 1);
125887
125923
  }
@@ -126276,7 +126312,7 @@ ${It.join(`
126276
126312
  return a10.type || (a10.type = V$(r7.links.propertyType, r7.links.mappedType, r7.links.constraintType) || W), a10.type;
126277
126313
  }
126278
126314
  function Sit(r7, a10, l10) {
126279
- let f10 = gf(l10.type, Rd(a10)), d = Xg(a10), y = sde(f10);
126315
+ let f10 = gf2(l10.type, Rd(a10)), d = Xg(a10), y = sde(f10);
126280
126316
  return eh([y], r7, d), j_(xAe(y) || W);
126281
126317
  }
126282
126318
  function V$(r7, a10, l10) {
@@ -128371,7 +128407,7 @@ ${It.join(`
128371
128407
  let x10 = N8(y);
128372
128408
  if (x10 && x10.parameters.length === 1 && xu(x10)) {
128373
128409
  let A = pw(Mi(Gr(x10.parameters[0]), (l10 = M2(y)) == null ? void 0 : l10.nonFixingMapper));
128374
- if (A.flags & 134217728 && B_(A, ga) && !ct(y.parameters, Cde)) return gf(Vh(y, A, A, void 0, a10.flowNode), Bd(y.parameters.indexOf(d) - (Cb(y) ? 1 : 0)));
128410
+ if (A.flags & 134217728 && B_(A, ga) && !ct(y.parameters, Cde)) return gf2(Vh(y, A, A, void 0, a10.flowNode), Bd(y.parameters.indexOf(d) - (Cb(y) ? 1 : 0)));
128375
128411
  }
128376
128412
  }
128377
128413
  }
@@ -128799,7 +128835,7 @@ ${It.join(`
128799
128835
  let l10 = Dn(r7).resolvedSignature === ka ? ka : $6(r7);
128800
128836
  if (vu(r7) && a10 === 0) return aX(l10, r7);
128801
128837
  let f10 = l10.parameters.length - 1;
128802
- return xu(l10) && a10 >= f10 ? gf(Gr(l10.parameters[f10]), Bd(a10 - f10), 256) : Wd(l10, a10);
128838
+ return xu(l10) && a10 >= f10 ? gf2(Gr(l10.parameters[f10]), Bd(a10 - f10), 256) : Wd(l10, a10);
128803
128839
  }
128804
128840
  function Rst(r7) {
128805
128841
  let a10 = yme(r7);
@@ -129025,7 +129061,7 @@ ${It.join(`
129025
129061
  let f10 = rb(r7.openingElement.attributes, l10), d = $M(jT(r7));
129026
129062
  if (!(f10 && !xn(f10) && d && d !== "")) return;
129027
129063
  let y = XC(r7.children), x10 = y.indexOf(a10), A = tb(f10, d);
129028
- return A && (y.length === 1 ? A : Vo(A, (J) => $0(J) ? gf(J, Bd(x10)) : J, true));
129064
+ return A && (y.length === 1 ? A : Vo(A, (J) => $0(J) ? gf2(J, Bd(x10)) : J, true));
129029
129065
  }
129030
129066
  function Hst(r7, a10) {
129031
129067
  let l10 = r7.parent;
@@ -129362,7 +129398,7 @@ ${It.join(`
129362
129398
  return Q0(33, qi(r7.expression, a10), Ze, r7.expression);
129363
129399
  }
129364
129400
  function mat(r7) {
129365
- return r7.isSpread ? gf(r7.type, Ge) : r7.type;
129401
+ return r7.isSpread ? gf2(r7.type, Ge) : r7.type;
129366
129402
  }
129367
129403
  function fC(r7) {
129368
129404
  return r7.kind === 209 && !!r7.initializer || r7.kind === 304 && fC(r7.initializer) || r7.kind === 305 && !!r7.objectAssignmentInitializer || r7.kind === 227 && r7.operatorToken.kind === 64;
@@ -130422,7 +130458,7 @@ ${It.join(`
130422
130458
  let fe = ge.kind === 238 ? ge.type : qi(ge.expression);
130423
130459
  $0(fe) ? (A.push(fe), J.push(8)) : (A.push(Q0(33, fe, Ze, ge.kind === 231 ? ge.expression : ge)), J.push(4));
130424
130460
  } else {
130425
- let fe = ga(f10) ? Bde(f10, X - a10, l10 - a10) || W : gf(f10, Bd(X - a10), 256), We = X6(ge, fe, d, y), lt = x10 || yc(fe, 14811132);
130461
+ let fe = ga(f10) ? Bde(f10, X - a10, l10 - a10) || W : gf2(f10, Bd(X - a10), 256), We = X6(ge, fe, d, y), lt = x10 || yc(fe, 14811132);
130426
130462
  A.push(lt ? tu(We) : Kv(We)), J.push(1);
130427
130463
  }
130428
130464
  ge.kind === 238 && ge.tupleNameSource ? U.push(ge.tupleNameSource) : U.push(void 0);
@@ -131513,12 +131549,12 @@ ${It.join(`
131513
131549
  if (a10 < l10) return nR(r7.parameters[a10]);
131514
131550
  if (xu(r7)) {
131515
131551
  let f10 = Gr(r7.parameters[l10]), d = a10 - l10;
131516
- if (!ga(f10) || f10.target.combinedFlags & 12 || d < f10.target.fixedLength) return gf(f10, Bd(d));
131552
+ if (!ga(f10) || f10.target.combinedFlags & 12 || d < f10.target.fixedLength) return gf2(f10, Bd(d));
131517
131553
  }
131518
131554
  }
131519
131555
  function iR(r7, a10, l10) {
131520
131556
  let f10 = J_(r7), d = Ud(r7), y = M8(r7);
131521
- if (y && a10 >= f10 - 1) return a10 === f10 - 1 ? y : pu(gf(y, Ge));
131557
+ if (y && a10 >= f10 - 1) return a10 === f10 - 1 ? y : pu(gf2(y, Ge));
131522
131558
  let x10 = [], A = [], J = [];
131523
131559
  for (let U = a10; U < f10; U++) !y || U < f10 - 1 ? (x10.push(Wd(r7, U)), A.push(U < d ? 1 : 2)) : (x10.push(y), A.push(8)), J.push(qot(r7, U));
131524
131560
  return ng(x10, A, l10, J);
@@ -132220,7 +132256,7 @@ ${It.join(`
132220
132256
  let fe = $s(a10, ap(J));
132221
132257
  fe && (KM(fe, x10, d), qde(x10, false, true, a10, fe));
132222
132258
  }
132223
- let X = Vg(x10, gf(a10, J, 32 | (fC(x10) ? 16 : 0), A));
132259
+ let X = Vg(x10, gf2(a10, J, 32 | (fC(x10) ? 16 : 0), A));
132224
132260
  return zT(x10.kind === 305 ? x10 : x10.initializer, X);
132225
132261
  } else if (x10.kind === 306) if (l10 < y.length - 1) ze(x10, p.A_rest_element_must_be_last_in_a_destructuring_pattern);
132226
132262
  else {
@@ -156289,7 +156325,7 @@ ${It.join(`
156289
156325
  let t7 = e4.system || cl, n8 = e4.host || (e4.host = f9(e4.options, t7)), i8 = dse(e4), s8 = ZU(i8, e4.reportDiagnostic || pk(t7), (o8) => n8.trace && n8.trace(o8), e4.reportErrorSummary || e4.options.pretty ? (o8, c2) => t7.write(qU(o8, c2, t7.newLine, n8)) : void 0);
156290
156326
  return e4.afterProgramEmitAndDiagnostics && e4.afterProgramEmitAndDiagnostics(i8), s8;
156291
156327
  }
156292
- function _9(e4, t7) {
156328
+ function _92(e4, t7) {
156293
156329
  let n8 = _v(e4);
156294
156330
  if (!n8) return;
156295
156331
  let i8;
@@ -156307,7 +156343,7 @@ ${It.join(`
156307
156343
  }
156308
156344
  function dse({ rootNames: e4, options: t7, configFileParsingDiagnostics: n8, projectReferences: i8, host: s8, createProgram: o8 }) {
156309
156345
  s8 = s8 || f9(t7), o8 = o8 || BU;
156310
- let c2 = _9(t7, s8);
156346
+ let c2 = _92(t7, s8);
156311
156347
  return o8(e4, t7, s8, c2, n8, i8);
156312
156348
  }
156313
156349
  function lbe(e4, t7, n8, i8, s8, o8, c2, _) {
@@ -156345,7 +156381,7 @@ ${It.join(`
156345
156381
  let Ke = WU(Ce, I ? qn(Xi(I, w)) : w, false);
156346
156382
  Ce.resolveModuleNameLiterals = Ps(e4, e4.resolveModuleNameLiterals), Ce.resolveModuleNames = Ps(e4, e4.resolveModuleNames), !Ce.resolveModuleNameLiterals && !Ce.resolveModuleNames && (Ce.resolveModuleNameLiterals = Ke.resolveModuleNameLiterals.bind(Ke)), Ce.resolveTypeReferenceDirectiveReferences = Ps(e4, e4.resolveTypeReferenceDirectiveReferences), Ce.resolveTypeReferenceDirectives = Ps(e4, e4.resolveTypeReferenceDirectives), !Ce.resolveTypeReferenceDirectiveReferences && !Ce.resolveTypeReferenceDirectives && (Ce.resolveTypeReferenceDirectiveReferences = Ke.resolveTypeReferenceDirectiveReferences.bind(Ke)), Ce.resolveLibrary = e4.resolveLibrary ? e4.resolveLibrary.bind(e4) : Ke.resolveLibrary.bind(Ke), Ce.getModuleResolutionCache = e4.resolveModuleNameLiterals || e4.resolveModuleNames ? Ps(e4, e4.getModuleResolutionCache) : (() => Ke.getModuleResolutionCache());
156347
156383
  let Be = !!e4.resolveModuleNameLiterals || !!e4.resolveTypeReferenceDirectiveReferences || !!e4.resolveModuleNames || !!e4.resolveTypeReferenceDirectives ? Ps(e4, e4.hasInvalidatedResolutions) || lb : sh, K = e4.resolveLibrary ? Ps(e4, e4.hasInvalidatedLibResolutions) || lb : sh;
156348
- return t7 = _9(G, Ce), mt(), I ? {
156384
+ return t7 = _92(G, Ce), mt(), I ? {
156349
156385
  getCurrentProgram: be,
156350
156386
  getProgram: Gn,
156351
156387
  close: De,
@@ -156984,7 +157020,7 @@ ${It.join(`
156984
157020
  }
156985
157021
  function jBe({ options: e4, builderPrograms: t7, compilerHost: n8 }, i8, s8) {
156986
157022
  if (e4.force) return;
156987
- return t7.get(i8) || _9(s8.options, n8);
157023
+ return t7.get(i8) || _92(s8.options, n8);
156988
157024
  }
156989
157025
  function BBe(e4, t7) {
156990
157026
  t7 && (e4.host.afterProgramEmitAndDiagnostics && e4.host.afterProgramEmitAndDiagnostics(t7), t7.releaseProgram()), e4.projectCompilerOptions = e4.baseCompilerOptions;
@@ -188042,7 +188078,7 @@ ${i8.prefix}` : `
188042
188078
  rangeOverlapsWithStartEnd: () => TP,
188043
188079
  rangeStartIsOnSameLineAsRangeEnd: () => See,
188044
188080
  rangeStartPositionsAreOnSameLine: () => q5,
188045
- readBuilderProgram: () => _9,
188081
+ readBuilderProgram: () => _92,
188046
188082
  readConfigFile: () => aA,
188047
188083
  readJson: () => KC,
188048
188084
  readJsonConfigFile: () => Xre,
@@ -195356,10 +195392,10 @@ function moduleImportNodesCacheKey(source, options) {
195356
195392
  async function collectModuleImportNodes(source, options) {
195357
195393
  const literalImports = [];
195358
195394
  const dynamicImportExpressions = [];
195359
- function visit2(node2) {
195395
+ function visit4(node2) {
195360
195396
  if (node2 == null || typeof node2 !== "object") return;
195361
195397
  if (Array.isArray(node2)) {
195362
- for (const item of node2) visit2(item);
195398
+ for (const item of node2) visit4(item);
195363
195399
  return;
195364
195400
  }
195365
195401
  if (!("type" in node2)) return;
@@ -195410,13 +195446,13 @@ async function collectModuleImportNodes(source, options) {
195410
195446
  )) {
195411
195447
  if (value == null) continue;
195412
195448
  if (typeof value === "object") {
195413
- visit2(value);
195449
+ visit4(value);
195414
195450
  }
195415
195451
  }
195416
195452
  }
195417
195453
  await loadModuleSourceParser();
195418
195454
  try {
195419
- visit2(await parseModuleSource(source, { filePath: options?.filePath }));
195455
+ visit4(await parseModuleSource(source, { filePath: options?.filePath }));
195420
195456
  } catch {
195421
195457
  return { literalImports: [], dynamicImportExpressions: [] };
195422
195458
  }
@@ -195452,8 +195488,8 @@ function unwrapTypeOnlyExpression(node2) {
195452
195488
  }
195453
195489
  function readStaticSpecifierNode(wrapped) {
195454
195490
  const node2 = unwrapTypeOnlyExpression(wrapped);
195455
- const literal3 = readLiteralStringNode(node2);
195456
- if (literal3) return literal3.specifier;
195491
+ const literal4 = readLiteralStringNode(node2);
195492
+ if (literal4) return literal4.specifier;
195457
195493
  if (node2 == null || typeof node2 !== "object") return null;
195458
195494
  const template = node2;
195459
195495
  if (template.type === "TemplateLiteral" && template.expressions?.length === 0 && template.quasis?.length === 1) {
@@ -195479,10 +195515,10 @@ async function parseBundlerResolvedSpecifiers(source, options) {
195479
195515
  const specifier = readStaticSpecifierNode(node2);
195480
195516
  if (specifier != null) specifiers.push(specifier);
195481
195517
  };
195482
- function visit2(node2) {
195518
+ function visit4(node2) {
195483
195519
  if (node2 == null || typeof node2 !== "object") return;
195484
195520
  if (Array.isArray(node2)) {
195485
- for (const item of node2) visit2(item);
195521
+ for (const item of node2) visit4(item);
195486
195522
  return;
195487
195523
  }
195488
195524
  if (!("type" in node2)) return;
@@ -195515,10 +195551,10 @@ async function parseBundlerResolvedSpecifiers(source, options) {
195515
195551
  for (const value of Object.values(
195516
195552
  typedNode
195517
195553
  )) {
195518
- if (value != null && typeof value === "object") visit2(value);
195554
+ if (value != null && typeof value === "object") visit4(value);
195519
195555
  }
195520
195556
  }
195521
- visit2(program);
195557
+ visit4(program);
195522
195558
  return { ok: true, specifiers };
195523
195559
  }
195524
195560
  async function collectLiteralImportSpecifiers(source, options) {
@@ -201987,6 +202023,21 @@ var init_sealed_token = __esm({
201987
202023
  }
201988
202024
  });
201989
202025
 
202026
+ // ../worker/src/mcp/secrets/vault-item-config.ts
202027
+ var vaultItemConfigSchema;
202028
+ var init_vault_item_config = __esm({
202029
+ "../worker/src/mcp/secrets/vault-item-config.ts"() {
202030
+ "use strict";
202031
+ init_zod();
202032
+ vaultItemConfigSchema = external_exports.strictObject({
202033
+ kind: external_exports.literal("vault-item"),
202034
+ bindingId: external_exports.string().min(1),
202035
+ providerId: external_exports.string().min(1),
202036
+ encryptedRef: external_exports.string().min(1)
202037
+ });
202038
+ }
202039
+ });
202040
+
201990
202041
  // ../worker/src/mcp/secrets/update-secret-placement.ts
201991
202042
  var init_update_secret_placement = __esm({
201992
202043
  "../worker/src/mcp/secrets/update-secret-placement.ts"() {
@@ -202018,6 +202069,7 @@ var init_service6 = __esm({
202018
202069
  init_resolve_package_secret_placement();
202019
202070
  init_sealed_token();
202020
202071
  init_disconnected();
202072
+ init_vault_item_config();
202021
202073
  init_update_secret_placement();
202022
202074
  init_credential_audit();
202023
202075
  init_audit_log();
@@ -203359,14 +203411,14 @@ function normalizeJoin(directory, relativePath2) {
203359
203411
  const absolute = directory.startsWith("/");
203360
203412
  const segments = directory.split("/").filter(Boolean);
203361
203413
  const floor = segments.length;
203362
- for (const segment of relativePath2.split("/")) {
203363
- if (segment === "" || segment === ".") continue;
203364
- if (segment === "..") {
203414
+ for (const segment2 of relativePath2.split("/")) {
203415
+ if (segment2 === "" || segment2 === ".") continue;
203416
+ if (segment2 === "..") {
203365
203417
  if (segments.length <= floor) return null;
203366
203418
  segments.pop();
203367
203419
  continue;
203368
203420
  }
203369
- segments.push(segment);
203421
+ segments.push(segment2);
203370
203422
  }
203371
203423
  const joined = segments.join("/");
203372
203424
  return absolute ? `/${joined}` : joined;
@@ -205170,6 +205222,608 @@ var init_secret_placeholder_request_placement = __esm({
205170
205222
  }
205171
205223
  });
205172
205224
 
205225
+ // ../../node_modules/jsonc-parser/lib/esm/impl/scanner.js
205226
+ var CharacterCodes;
205227
+ var init_scanner = __esm({
205228
+ "../../node_modules/jsonc-parser/lib/esm/impl/scanner.js"() {
205229
+ "use strict";
205230
+ (function(CharacterCodes2) {
205231
+ CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed";
205232
+ CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn";
205233
+ CharacterCodes2[CharacterCodes2["space"] = 32] = "space";
205234
+ CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0";
205235
+ CharacterCodes2[CharacterCodes2["_1"] = 49] = "_1";
205236
+ CharacterCodes2[CharacterCodes2["_2"] = 50] = "_2";
205237
+ CharacterCodes2[CharacterCodes2["_3"] = 51] = "_3";
205238
+ CharacterCodes2[CharacterCodes2["_4"] = 52] = "_4";
205239
+ CharacterCodes2[CharacterCodes2["_5"] = 53] = "_5";
205240
+ CharacterCodes2[CharacterCodes2["_6"] = 54] = "_6";
205241
+ CharacterCodes2[CharacterCodes2["_7"] = 55] = "_7";
205242
+ CharacterCodes2[CharacterCodes2["_8"] = 56] = "_8";
205243
+ CharacterCodes2[CharacterCodes2["_9"] = 57] = "_9";
205244
+ CharacterCodes2[CharacterCodes2["a"] = 97] = "a";
205245
+ CharacterCodes2[CharacterCodes2["b"] = 98] = "b";
205246
+ CharacterCodes2[CharacterCodes2["c"] = 99] = "c";
205247
+ CharacterCodes2[CharacterCodes2["d"] = 100] = "d";
205248
+ CharacterCodes2[CharacterCodes2["e"] = 101] = "e";
205249
+ CharacterCodes2[CharacterCodes2["f"] = 102] = "f";
205250
+ CharacterCodes2[CharacterCodes2["g"] = 103] = "g";
205251
+ CharacterCodes2[CharacterCodes2["h"] = 104] = "h";
205252
+ CharacterCodes2[CharacterCodes2["i"] = 105] = "i";
205253
+ CharacterCodes2[CharacterCodes2["j"] = 106] = "j";
205254
+ CharacterCodes2[CharacterCodes2["k"] = 107] = "k";
205255
+ CharacterCodes2[CharacterCodes2["l"] = 108] = "l";
205256
+ CharacterCodes2[CharacterCodes2["m"] = 109] = "m";
205257
+ CharacterCodes2[CharacterCodes2["n"] = 110] = "n";
205258
+ CharacterCodes2[CharacterCodes2["o"] = 111] = "o";
205259
+ CharacterCodes2[CharacterCodes2["p"] = 112] = "p";
205260
+ CharacterCodes2[CharacterCodes2["q"] = 113] = "q";
205261
+ CharacterCodes2[CharacterCodes2["r"] = 114] = "r";
205262
+ CharacterCodes2[CharacterCodes2["s"] = 115] = "s";
205263
+ CharacterCodes2[CharacterCodes2["t"] = 116] = "t";
205264
+ CharacterCodes2[CharacterCodes2["u"] = 117] = "u";
205265
+ CharacterCodes2[CharacterCodes2["v"] = 118] = "v";
205266
+ CharacterCodes2[CharacterCodes2["w"] = 119] = "w";
205267
+ CharacterCodes2[CharacterCodes2["x"] = 120] = "x";
205268
+ CharacterCodes2[CharacterCodes2["y"] = 121] = "y";
205269
+ CharacterCodes2[CharacterCodes2["z"] = 122] = "z";
205270
+ CharacterCodes2[CharacterCodes2["A"] = 65] = "A";
205271
+ CharacterCodes2[CharacterCodes2["B"] = 66] = "B";
205272
+ CharacterCodes2[CharacterCodes2["C"] = 67] = "C";
205273
+ CharacterCodes2[CharacterCodes2["D"] = 68] = "D";
205274
+ CharacterCodes2[CharacterCodes2["E"] = 69] = "E";
205275
+ CharacterCodes2[CharacterCodes2["F"] = 70] = "F";
205276
+ CharacterCodes2[CharacterCodes2["G"] = 71] = "G";
205277
+ CharacterCodes2[CharacterCodes2["H"] = 72] = "H";
205278
+ CharacterCodes2[CharacterCodes2["I"] = 73] = "I";
205279
+ CharacterCodes2[CharacterCodes2["J"] = 74] = "J";
205280
+ CharacterCodes2[CharacterCodes2["K"] = 75] = "K";
205281
+ CharacterCodes2[CharacterCodes2["L"] = 76] = "L";
205282
+ CharacterCodes2[CharacterCodes2["M"] = 77] = "M";
205283
+ CharacterCodes2[CharacterCodes2["N"] = 78] = "N";
205284
+ CharacterCodes2[CharacterCodes2["O"] = 79] = "O";
205285
+ CharacterCodes2[CharacterCodes2["P"] = 80] = "P";
205286
+ CharacterCodes2[CharacterCodes2["Q"] = 81] = "Q";
205287
+ CharacterCodes2[CharacterCodes2["R"] = 82] = "R";
205288
+ CharacterCodes2[CharacterCodes2["S"] = 83] = "S";
205289
+ CharacterCodes2[CharacterCodes2["T"] = 84] = "T";
205290
+ CharacterCodes2[CharacterCodes2["U"] = 85] = "U";
205291
+ CharacterCodes2[CharacterCodes2["V"] = 86] = "V";
205292
+ CharacterCodes2[CharacterCodes2["W"] = 87] = "W";
205293
+ CharacterCodes2[CharacterCodes2["X"] = 88] = "X";
205294
+ CharacterCodes2[CharacterCodes2["Y"] = 89] = "Y";
205295
+ CharacterCodes2[CharacterCodes2["Z"] = 90] = "Z";
205296
+ CharacterCodes2[CharacterCodes2["asterisk"] = 42] = "asterisk";
205297
+ CharacterCodes2[CharacterCodes2["backslash"] = 92] = "backslash";
205298
+ CharacterCodes2[CharacterCodes2["closeBrace"] = 125] = "closeBrace";
205299
+ CharacterCodes2[CharacterCodes2["closeBracket"] = 93] = "closeBracket";
205300
+ CharacterCodes2[CharacterCodes2["colon"] = 58] = "colon";
205301
+ CharacterCodes2[CharacterCodes2["comma"] = 44] = "comma";
205302
+ CharacterCodes2[CharacterCodes2["dot"] = 46] = "dot";
205303
+ CharacterCodes2[CharacterCodes2["doubleQuote"] = 34] = "doubleQuote";
205304
+ CharacterCodes2[CharacterCodes2["minus"] = 45] = "minus";
205305
+ CharacterCodes2[CharacterCodes2["openBrace"] = 123] = "openBrace";
205306
+ CharacterCodes2[CharacterCodes2["openBracket"] = 91] = "openBracket";
205307
+ CharacterCodes2[CharacterCodes2["plus"] = 43] = "plus";
205308
+ CharacterCodes2[CharacterCodes2["slash"] = 47] = "slash";
205309
+ CharacterCodes2[CharacterCodes2["formFeed"] = 12] = "formFeed";
205310
+ CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
205311
+ })(CharacterCodes || (CharacterCodes = {}));
205312
+ }
205313
+ });
205314
+
205315
+ // ../../node_modules/jsonc-parser/lib/esm/impl/string-intern.js
205316
+ var cachedSpaces, maxCachedValues, cachedBreakLinesWithSpaces;
205317
+ var init_string_intern = __esm({
205318
+ "../../node_modules/jsonc-parser/lib/esm/impl/string-intern.js"() {
205319
+ cachedSpaces = new Array(20).fill(0).map((_, index) => {
205320
+ return " ".repeat(index);
205321
+ });
205322
+ maxCachedValues = 200;
205323
+ cachedBreakLinesWithSpaces = {
205324
+ " ": {
205325
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
205326
+ return "\n" + " ".repeat(index);
205327
+ }),
205328
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
205329
+ return "\r" + " ".repeat(index);
205330
+ }),
205331
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
205332
+ return "\r\n" + " ".repeat(index);
205333
+ })
205334
+ },
205335
+ " ": {
205336
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
205337
+ return "\n" + " ".repeat(index);
205338
+ }),
205339
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
205340
+ return "\r" + " ".repeat(index);
205341
+ }),
205342
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
205343
+ return "\r\n" + " ".repeat(index);
205344
+ })
205345
+ }
205346
+ };
205347
+ }
205348
+ });
205349
+
205350
+ // ../../node_modules/jsonc-parser/lib/esm/impl/format.js
205351
+ var init_format = __esm({
205352
+ "../../node_modules/jsonc-parser/lib/esm/impl/format.js"() {
205353
+ "use strict";
205354
+ init_scanner();
205355
+ init_string_intern();
205356
+ }
205357
+ });
205358
+
205359
+ // ../../node_modules/jsonc-parser/lib/esm/impl/parser.js
205360
+ var ParseOptions;
205361
+ var init_parser2 = __esm({
205362
+ "../../node_modules/jsonc-parser/lib/esm/impl/parser.js"() {
205363
+ "use strict";
205364
+ init_scanner();
205365
+ (function(ParseOptions2) {
205366
+ ParseOptions2.DEFAULT = {
205367
+ allowTrailingComma: false
205368
+ };
205369
+ })(ParseOptions || (ParseOptions = {}));
205370
+ }
205371
+ });
205372
+
205373
+ // ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
205374
+ var init_edit = __esm({
205375
+ "../../node_modules/jsonc-parser/lib/esm/impl/edit.js"() {
205376
+ "use strict";
205377
+ init_format();
205378
+ init_parser2();
205379
+ }
205380
+ });
205381
+
205382
+ // ../../node_modules/jsonc-parser/lib/esm/main.js
205383
+ var ScanError, SyntaxKind, ParseErrorCode;
205384
+ var init_main = __esm({
205385
+ "../../node_modules/jsonc-parser/lib/esm/main.js"() {
205386
+ "use strict";
205387
+ init_format();
205388
+ init_edit();
205389
+ init_scanner();
205390
+ init_parser2();
205391
+ (function(ScanError2) {
205392
+ ScanError2[ScanError2["None"] = 0] = "None";
205393
+ ScanError2[ScanError2["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment";
205394
+ ScanError2[ScanError2["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString";
205395
+ ScanError2[ScanError2["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber";
205396
+ ScanError2[ScanError2["InvalidUnicode"] = 4] = "InvalidUnicode";
205397
+ ScanError2[ScanError2["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter";
205398
+ ScanError2[ScanError2["InvalidCharacter"] = 6] = "InvalidCharacter";
205399
+ })(ScanError || (ScanError = {}));
205400
+ (function(SyntaxKind2) {
205401
+ SyntaxKind2[SyntaxKind2["OpenBraceToken"] = 1] = "OpenBraceToken";
205402
+ SyntaxKind2[SyntaxKind2["CloseBraceToken"] = 2] = "CloseBraceToken";
205403
+ SyntaxKind2[SyntaxKind2["OpenBracketToken"] = 3] = "OpenBracketToken";
205404
+ SyntaxKind2[SyntaxKind2["CloseBracketToken"] = 4] = "CloseBracketToken";
205405
+ SyntaxKind2[SyntaxKind2["CommaToken"] = 5] = "CommaToken";
205406
+ SyntaxKind2[SyntaxKind2["ColonToken"] = 6] = "ColonToken";
205407
+ SyntaxKind2[SyntaxKind2["NullKeyword"] = 7] = "NullKeyword";
205408
+ SyntaxKind2[SyntaxKind2["TrueKeyword"] = 8] = "TrueKeyword";
205409
+ SyntaxKind2[SyntaxKind2["FalseKeyword"] = 9] = "FalseKeyword";
205410
+ SyntaxKind2[SyntaxKind2["StringLiteral"] = 10] = "StringLiteral";
205411
+ SyntaxKind2[SyntaxKind2["NumericLiteral"] = 11] = "NumericLiteral";
205412
+ SyntaxKind2[SyntaxKind2["LineCommentTrivia"] = 12] = "LineCommentTrivia";
205413
+ SyntaxKind2[SyntaxKind2["BlockCommentTrivia"] = 13] = "BlockCommentTrivia";
205414
+ SyntaxKind2[SyntaxKind2["LineBreakTrivia"] = 14] = "LineBreakTrivia";
205415
+ SyntaxKind2[SyntaxKind2["Trivia"] = 15] = "Trivia";
205416
+ SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
205417
+ SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
205418
+ })(SyntaxKind || (SyntaxKind = {}));
205419
+ (function(ParseErrorCode2) {
205420
+ ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
205421
+ ParseErrorCode2[ParseErrorCode2["InvalidNumberFormat"] = 2] = "InvalidNumberFormat";
205422
+ ParseErrorCode2[ParseErrorCode2["PropertyNameExpected"] = 3] = "PropertyNameExpected";
205423
+ ParseErrorCode2[ParseErrorCode2["ValueExpected"] = 4] = "ValueExpected";
205424
+ ParseErrorCode2[ParseErrorCode2["ColonExpected"] = 5] = "ColonExpected";
205425
+ ParseErrorCode2[ParseErrorCode2["CommaExpected"] = 6] = "CommaExpected";
205426
+ ParseErrorCode2[ParseErrorCode2["CloseBraceExpected"] = 7] = "CloseBraceExpected";
205427
+ ParseErrorCode2[ParseErrorCode2["CloseBracketExpected"] = 8] = "CloseBracketExpected";
205428
+ ParseErrorCode2[ParseErrorCode2["EndOfFileExpected"] = 9] = "EndOfFileExpected";
205429
+ ParseErrorCode2[ParseErrorCode2["InvalidCommentToken"] = 10] = "InvalidCommentToken";
205430
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment";
205431
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString";
205432
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber";
205433
+ ParseErrorCode2[ParseErrorCode2["InvalidUnicode"] = 14] = "InvalidUnicode";
205434
+ ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
205435
+ ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
205436
+ })(ParseErrorCode || (ParseErrorCode = {}));
205437
+ }
205438
+ });
205439
+
205440
+ // ../../node_modules/@stablelib/random/lib/source/system.js
205441
+ var QUOTA, SystemRandomSource;
205442
+ var init_system = __esm({
205443
+ "../../node_modules/@stablelib/random/lib/source/system.js"() {
205444
+ QUOTA = 65536;
205445
+ SystemRandomSource = class {
205446
+ isAvailable = false;
205447
+ isInstantiated = false;
205448
+ constructor() {
205449
+ if (typeof crypto !== "undefined" && "getRandomValues" in crypto) {
205450
+ this.isAvailable = true;
205451
+ this.isInstantiated = true;
205452
+ }
205453
+ }
205454
+ randomBytes(length) {
205455
+ if (!this.isAvailable) {
205456
+ throw new Error("System random byte generator is not available.");
205457
+ }
205458
+ const out = new Uint8Array(length);
205459
+ for (let i4 = 0; i4 < out.length; i4 += QUOTA) {
205460
+ crypto.getRandomValues(out.subarray(i4, i4 + Math.min(out.length - i4, QUOTA)));
205461
+ }
205462
+ return out;
205463
+ }
205464
+ };
205465
+ }
205466
+ });
205467
+
205468
+ // ../../node_modules/@stablelib/int/lib/int.js
205469
+ var isInteger, MAX_SAFE_INTEGER, isSafeInteger;
205470
+ var init_int = __esm({
205471
+ "../../node_modules/@stablelib/int/lib/int.js"() {
205472
+ isInteger = Number.isInteger;
205473
+ MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
205474
+ isSafeInteger = Number.isSafeInteger;
205475
+ }
205476
+ });
205477
+
205478
+ // ../../node_modules/@stablelib/binary/lib/binary.js
205479
+ var init_binary = __esm({
205480
+ "../../node_modules/@stablelib/binary/lib/binary.js"() {
205481
+ init_int();
205482
+ }
205483
+ });
205484
+
205485
+ // ../../node_modules/@stablelib/wipe/lib/wipe.js
205486
+ var init_wipe = __esm({
205487
+ "../../node_modules/@stablelib/wipe/lib/wipe.js"() {
205488
+ }
205489
+ });
205490
+
205491
+ // ../../node_modules/@stablelib/random/lib/random.js
205492
+ var defaultRandomSource;
205493
+ var init_random = __esm({
205494
+ "../../node_modules/@stablelib/random/lib/random.js"() {
205495
+ init_system();
205496
+ init_binary();
205497
+ init_wipe();
205498
+ defaultRandomSource = new SystemRandomSource();
205499
+ }
205500
+ });
205501
+
205502
+ // ../../node_modules/@stablelib/x25519/lib/x25519.js
205503
+ function gf(init) {
205504
+ const r3 = new Float64Array(16);
205505
+ if (init) {
205506
+ for (let i4 = 0; i4 < init.length; i4++) {
205507
+ r3[i4] = init[i4];
205508
+ }
205509
+ }
205510
+ return r3;
205511
+ }
205512
+ var _9, _121665;
205513
+ var init_x25519 = __esm({
205514
+ "../../node_modules/@stablelib/x25519/lib/x25519.js"() {
205515
+ init_random();
205516
+ init_wipe();
205517
+ _9 = new Uint8Array(32);
205518
+ _9[0] = 9;
205519
+ _121665 = gf([56129, 1]);
205520
+ }
205521
+ });
205522
+
205523
+ // ../../node_modules/@stablelib/salsa20/lib/salsa20.js
205524
+ var init_salsa20 = __esm({
205525
+ "../../node_modules/@stablelib/salsa20/lib/salsa20.js"() {
205526
+ init_binary();
205527
+ init_wipe();
205528
+ }
205529
+ });
205530
+
205531
+ // ../../node_modules/@stablelib/xsalsa20/lib/xsalsa20.js
205532
+ var init_xsalsa20 = __esm({
205533
+ "../../node_modules/@stablelib/xsalsa20/lib/xsalsa20.js"() {
205534
+ init_binary();
205535
+ init_salsa20();
205536
+ init_wipe();
205537
+ }
205538
+ });
205539
+
205540
+ // ../../node_modules/@stablelib/constant-time/lib/constant-time.js
205541
+ var init_constant_time = __esm({
205542
+ "../../node_modules/@stablelib/constant-time/lib/constant-time.js"() {
205543
+ }
205544
+ });
205545
+
205546
+ // ../../node_modules/@stablelib/poly1305/lib/poly1305.js
205547
+ var init_poly1305 = __esm({
205548
+ "../../node_modules/@stablelib/poly1305/lib/poly1305.js"() {
205549
+ init_constant_time();
205550
+ init_wipe();
205551
+ }
205552
+ });
205553
+
205554
+ // ../../node_modules/@stablelib/nacl/lib/secretbox.js
205555
+ var init_secretbox = __esm({
205556
+ "../../node_modules/@stablelib/nacl/lib/secretbox.js"() {
205557
+ init_xsalsa20();
205558
+ init_poly1305();
205559
+ init_wipe();
205560
+ init_random();
205561
+ }
205562
+ });
205563
+
205564
+ // ../../node_modules/@stablelib/nacl/lib/box.js
205565
+ var zeros16;
205566
+ var init_box = __esm({
205567
+ "../../node_modules/@stablelib/nacl/lib/box.js"() {
205568
+ init_x25519();
205569
+ init_xsalsa20();
205570
+ init_secretbox();
205571
+ init_wipe();
205572
+ init_x25519();
205573
+ zeros16 = new Uint8Array(16);
205574
+ }
205575
+ });
205576
+
205577
+ // ../../node_modules/@stablelib/nacl/lib/nacl.js
205578
+ var init_nacl = __esm({
205579
+ "../../node_modules/@stablelib/nacl/lib/nacl.js"() {
205580
+ init_box();
205581
+ init_secretbox();
205582
+ }
205583
+ });
205584
+
205585
+ // ../worker/src/credentials/sealed-box.ts
205586
+ var init_sealed_box = __esm({
205587
+ "../worker/src/credentials/sealed-box.ts"() {
205588
+ "use strict";
205589
+ init_base64();
205590
+ init_nacl();
205591
+ init_x25519();
205592
+ }
205593
+ });
205594
+
205595
+ // ../worker/src/credentials/body-placement.ts
205596
+ function isCanonicalEndpoint(endpoint) {
205597
+ try {
205598
+ const url3 = new URL(endpoint);
205599
+ return url3.protocol === "https:" && !url3.username && !url3.password && !url3.search && !url3.hash && `${url3.origin}${url3.pathname}` === endpoint && !/%|\/\//.test(url3.pathname);
205600
+ } catch {
205601
+ return false;
205602
+ }
205603
+ }
205604
+ function overlaps(left, right) {
205605
+ return left.length <= right.length ? left.every((key, index) => key === right[index]) : overlaps(right, left);
205606
+ }
205607
+ var maxBodyBytes, forbiddenKeys, fieldName, fieldPath, bodyPlacementSchema;
205608
+ var init_body_placement = __esm({
205609
+ "../worker/src/credentials/body-placement.ts"() {
205610
+ "use strict";
205611
+ init_main();
205612
+ init_zod();
205613
+ init_credential_request();
205614
+ init_sealed_box();
205615
+ maxBodyBytes = 256 * 1024;
205616
+ forbiddenKeys = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
205617
+ fieldName = external_exports.string().min(1).max(100).refine((key) => !forbiddenKeys.has(key), "This field name is reserved.");
205618
+ fieldPath = external_exports.array(external_exports.union([fieldName, external_exports.int().min(0).max(999)])).min(1).max(12);
205619
+ bodyPlacementSchema = external_exports.strictObject({
205620
+ kind: external_exports.literal("body"),
205621
+ packageId: external_exports.string().min(1).max(100),
205622
+ endpoint: external_exports.string().max(2e3).refine(
205623
+ isCanonicalEndpoint,
205624
+ "Use a canonical HTTPS endpoint without user info, query, fragment, or encoded path segments."
205625
+ ),
205626
+ method: external_exports.enum(["POST", "PUT", "PATCH", "DELETE"]),
205627
+ mediaType: external_exports.literal("application/json"),
205628
+ fields: external_exports.array(fieldPath).min(1).max(16),
205629
+ selectors: external_exports.array(
205630
+ external_exports.strictObject({
205631
+ path: fieldPath,
205632
+ value: external_exports.union([external_exports.string().max(1e3), external_exports.boolean(), external_exports.int()])
205633
+ })
205634
+ ).max(16).default([]),
205635
+ graphql: external_exports.strictObject({
205636
+ document: external_exports.string().min(1).max(2e4),
205637
+ operationName: external_exports.string().regex(/^[_A-Za-z][_0-9A-Za-z]*$/).max(100)
205638
+ }).optional(),
205639
+ output: external_exports.discriminatedUnion("format", [
205640
+ external_exports.strictObject({ format: external_exports.literal("plaintext") }),
205641
+ external_exports.strictObject({
205642
+ format: external_exports.literal("sealed-box-base64"),
205643
+ recipientPublicKey: external_exports.string().regex(/^[A-Za-z0-9+/]{43}=$/),
205644
+ recipientKeyId: external_exports.string().min(1).max(256),
205645
+ keyIdField: fieldPath
205646
+ })
205647
+ ]).default({ format: "plaintext" })
205648
+ }).superRefine((placement, ctx) => {
205649
+ const writes = [...placement.fields];
205650
+ if (placement.output.format === "sealed-box-base64") {
205651
+ writes.push(placement.output.keyIdField);
205652
+ }
205653
+ const paths = [...writes, ...placement.selectors.map(({ path }) => path)];
205654
+ for (const [index, path] of paths.entries()) {
205655
+ if (paths.slice(0, index).some((prior) => overlaps(prior, path)) || typeof path[0] !== "string" || placement.graphql && (path[0] !== "variables" || path.length < 2 || typeof path[1] !== "string")) {
205656
+ ctx.addIssue({
205657
+ code: "custom",
205658
+ message: "Placement paths must be distinct, non-overlapping object fields (inside variables for GraphQL)."
205659
+ });
205660
+ return;
205661
+ }
205662
+ }
205663
+ if (writes.some((path) => typeof path.at(-1) !== "string")) {
205664
+ ctx.addIssue({
205665
+ code: "custom",
205666
+ message: "A placed value must end at an object field."
205667
+ });
205668
+ }
205669
+ if (placement.graphql && placement.selectors.length === 0) {
205670
+ ctx.addIssue({
205671
+ code: "custom",
205672
+ message: "Pin at least one GraphQL resource selector."
205673
+ });
205674
+ }
205675
+ });
205676
+ }
205677
+ });
205678
+
205679
+ // ../worker/src/credentials/path-placement.ts
205680
+ var segmentPattern, segment, origin, pathPlacementSchema;
205681
+ var init_path_placement = __esm({
205682
+ "../worker/src/credentials/path-placement.ts"() {
205683
+ "use strict";
205684
+ init_zod();
205685
+ init_credential_request();
205686
+ segmentPattern = /^[a-zA-Z0-9_~-][a-zA-Z0-9._~-]{0,127}$/;
205687
+ segment = external_exports.string().regex(segmentPattern);
205688
+ origin = external_exports.string().max(500).refine((value) => {
205689
+ try {
205690
+ const parsed = new URL(value);
205691
+ return parsed.protocol === "https:" && parsed.origin === value;
205692
+ } catch {
205693
+ return false;
205694
+ }
205695
+ }, "Use a canonical HTTPS origin.");
205696
+ pathPlacementSchema = external_exports.strictObject({
205697
+ kind: external_exports.literal("path"),
205698
+ packageId: external_exports.string().min(1).max(100),
205699
+ origin,
205700
+ method: external_exports.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]),
205701
+ segments: external_exports.array(
205702
+ external_exports.union([
205703
+ segment,
205704
+ external_exports.strictObject({ parameter: external_exports.enum(["slug", "integer", "uuid"]) }),
205705
+ external_exports.strictObject({ credential: external_exports.literal(true) })
205706
+ ])
205707
+ ).min(2).max(24).refine(
205708
+ (segments) => segments.filter(
205709
+ (part) => typeof part === "object" && "credential" in part
205710
+ ).length === 1,
205711
+ "Include exactly one credential segment."
205712
+ )
205713
+ });
205714
+ }
205715
+ });
205716
+
205717
+ // ../worker/src/credentials/credential-composition.ts
205718
+ function siteCredentialIds(site) {
205719
+ switch (site.kind) {
205720
+ case "header":
205721
+ return site.parts.flatMap(
205722
+ (part) => typeof part === "string" ? [] : [part.credentialId]
205723
+ );
205724
+ case "basic":
205725
+ return [site.usernameId, site.passwordId];
205726
+ case "query":
205727
+ case "body":
205728
+ case "connection":
205729
+ return [site.credentialId];
205730
+ }
205731
+ }
205732
+ function compositionCredentialIds(profile) {
205733
+ return new Set(profile.sites.flatMap(siteCredentialIds));
205734
+ }
205735
+ var credentialId, headerName, literal3, headerPart, compositionSite, credentialCompositionSchema;
205736
+ var init_credential_composition = __esm({
205737
+ "../worker/src/credentials/credential-composition.ts"() {
205738
+ "use strict";
205739
+ init_base64();
205740
+ init_zod();
205741
+ init_body_placement();
205742
+ init_credential_request();
205743
+ credentialId = external_exports.string().min(1).max(100);
205744
+ headerName = external_exports.string().regex(/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/);
205745
+ literal3 = external_exports.string().max(200).regex(/^[\x20-\x7e]*$/);
205746
+ headerPart = external_exports.union([literal3, external_exports.strictObject({ credentialId })]);
205747
+ compositionSite = external_exports.union([
205748
+ external_exports.strictObject({
205749
+ kind: external_exports.literal("header"),
205750
+ name: headerName,
205751
+ parts: external_exports.array(headerPart).min(1).max(24).refine((parts) => parts.some((part) => typeof part !== "string"))
205752
+ }),
205753
+ external_exports.strictObject({
205754
+ kind: external_exports.literal("basic"),
205755
+ usernameId: credentialId,
205756
+ passwordId: credentialId
205757
+ }),
205758
+ external_exports.strictObject({
205759
+ kind: external_exports.literal("query"),
205760
+ param: external_exports.string().min(1).max(100),
205761
+ credentialId
205762
+ }),
205763
+ external_exports.strictObject({
205764
+ kind: external_exports.literal("body"),
205765
+ credentialId,
205766
+ placement: bodyPlacementSchema
205767
+ }),
205768
+ external_exports.strictObject({
205769
+ kind: external_exports.literal("connection"),
205770
+ connection: external_exports.enum(["login", "oauth"]),
205771
+ credentialId,
205772
+ inject: external_exports.union([
205773
+ external_exports.strictObject({
205774
+ kind: external_exports.literal("header"),
205775
+ name: headerName,
205776
+ format: literal3
205777
+ }),
205778
+ external_exports.strictObject({
205779
+ kind: external_exports.literal("query"),
205780
+ param: external_exports.string().min(1).max(100)
205781
+ })
205782
+ ])
205783
+ })
205784
+ ]);
205785
+ credentialCompositionSchema = external_exports.strictObject({
205786
+ kind: external_exports.literal("composition"),
205787
+ packageId: external_exports.string().min(1).max(100),
205788
+ endpoint: external_exports.string().max(2e3).refine(isCanonicalEndpoint),
205789
+ method: external_exports.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]),
205790
+ entryCredentialId: credentialId,
205791
+ publicBody: external_exports.literal("application/json").optional(),
205792
+ sites: external_exports.array(compositionSite).min(1).max(16)
205793
+ }).superRefine((profile, ctx) => {
205794
+ if (profile.publicBody && (profile.method === "GET" || profile.method === "HEAD" || profile.sites.some((site) => site.kind === "body"))) {
205795
+ ctx.addIssue({
205796
+ code: "custom",
205797
+ message: "Approve a public JSON body only on a body-capable method without credential body fields."
205798
+ });
205799
+ }
205800
+ const ids = compositionCredentialIds(profile);
205801
+ if (ids.size < 2 || ids.size > 8 || !ids.has(profile.entryCredentialId)) {
205802
+ ctx.addIssue({
205803
+ code: "custom",
205804
+ message: "Approve two to eight credentials, including the entry credential."
205805
+ });
205806
+ }
205807
+ for (const site of profile.sites) {
205808
+ if (site.kind === "connection" && (profile.entryCredentialId === site.credentialId || profile.sites.filter(
205809
+ (entry) => siteCredentialIds(entry).includes(site.credentialId)
205810
+ ).length !== 1 || site.connection === "oauth" && (site.inject.kind !== "header" || site.inject.name !== "Authorization" || site.inject.format !== "Bearer {value}"))) {
205811
+ ctx.addIssue({
205812
+ code: "custom",
205813
+ message: "A connection must occupy its own approved location. OAuth uses Authorization: Bearer."
205814
+ });
205815
+ }
205816
+ if (site.kind === "body" && (site.placement.endpoint !== profile.endpoint || site.placement.method !== profile.method || site.placement.packageId !== profile.packageId)) {
205817
+ ctx.addIssue({
205818
+ code: "custom",
205819
+ message: "Every body placement must use the composition package, method, and endpoint."
205820
+ });
205821
+ }
205822
+ }
205823
+ });
205824
+ }
205825
+ });
205826
+
205173
205827
  // ../worker/src/credentials/credential-resolver.ts
205174
205828
  var init_credential_resolver = __esm({
205175
205829
  "../worker/src/credentials/credential-resolver.ts"() {
@@ -205269,6 +205923,9 @@ var init_credential_fields = __esm({
205269
205923
  init_caller_error();
205270
205924
  init_org_audit();
205271
205925
  init_credential_ids();
205926
+ init_body_placement();
205927
+ init_path_placement();
205928
+ init_credential_composition();
205272
205929
  init_credential_request();
205273
205930
  init_fill_placement();
205274
205931
  init_fill_placement_opt_ins();
@@ -205284,7 +205941,7 @@ var init_credential_fields = __esm({
205284
205941
  external_exports.strictObject({
205285
205942
  kind: external_exports.literal("header"),
205286
205943
  name: external_exports.string().regex(httpFieldNamePattern4),
205287
- format: external_exports.string().max(200).refine((format) => format.split("{value}").length === 2, {
205944
+ format: external_exports.string().max(200).refine((format2) => format2.split("{value}").length === 2, {
205288
205945
  message: 'An inject format holds "{value}" exactly once.'
205289
205946
  })
205290
205947
  }),
@@ -205296,7 +205953,10 @@ var init_credential_fields = __esm({
205296
205953
  external_exports.strictObject({
205297
205954
  kind: external_exports.literal("query"),
205298
205955
  param: external_exports.string().min(1).max(100)
205299
- })
205956
+ }),
205957
+ bodyPlacementSchema,
205958
+ pathPlacementSchema,
205959
+ credentialCompositionSchema
205300
205960
  ]);
205301
205961
  hostLabel = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
205302
205962
  bareHostPattern = new RegExp(