@powerlines/plugin-content-collections 0.1.341 → 0.1.342

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 (420) hide show
  1. package/README.md +14 -16
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
  3. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  4. package/dist/helpers/create-emitter.cjs +2 -1
  5. package/dist/helpers/create-emitter.d.cts.map +1 -1
  6. package/dist/helpers/create-emitter.d.mts.map +1 -1
  7. package/dist/helpers/create-writer.cjs +9 -8
  8. package/dist/helpers/create-writer.d.cts +0 -1
  9. package/dist/helpers/create-writer.d.cts.map +1 -1
  10. package/dist/helpers/create-writer.d.mts +0 -1
  11. package/dist/helpers/create-writer.d.mts.map +1 -1
  12. package/dist/helpers/create-writer.mjs +2 -2
  13. package/dist/helpers/index.cjs +1 -0
  14. package/dist/index.cjs +15 -16
  15. package/dist/index.d.cts +0 -2
  16. package/dist/index.d.cts.map +1 -1
  17. package/dist/index.d.mts +0 -2
  18. package/dist/index.d.mts.map +1 -1
  19. package/dist/index.mjs +4 -5
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/types/plugin.d.cts.map +1 -1
  22. package/dist/types/plugin.d.mts.map +1 -1
  23. package/package.json +30 -26
  24. package/dist/_virtual/rolldown_runtime.mjs +0 -32
  25. package/dist/node_modules/.pnpm/@content-collections_core@0.12.0_patch_hash_bceb89349da763f8c715d7b53875be4a1e5bc5161d7_3067b2e8f290866ec343d5ebc4494f7e/node_modules/@content-collections/core/dist/index.cjs +0 -1946
  26. package/dist/node_modules/.pnpm/@content-collections_core@0.12.0_patch_hash_bceb89349da763f8c715d7b53875be4a1e5bc5161d7_3067b2e8f290866ec343d5ebc4494f7e/node_modules/@content-collections/core/dist/index.mjs +0 -1939
  27. package/dist/node_modules/.pnpm/@content-collections_core@0.12.0_patch_hash_bceb89349da763f8c715d7b53875be4a1e5bc5161d7_3067b2e8f290866ec343d5ebc4494f7e/node_modules/@content-collections/core/dist/index.mjs.map +0 -1
  28. package/dist/node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.cjs +0 -9
  29. package/dist/node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.mjs +0 -10
  30. package/dist/node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.mjs.map +0 -1
  31. package/dist/node_modules/.pnpm/esbuild@0.25.12/node_modules/esbuild/lib/main.cjs +0 -2124
  32. package/dist/node_modules/.pnpm/esbuild@0.25.12/node_modules/esbuild/lib/main.mjs +0 -2120
  33. package/dist/node_modules/.pnpm/esbuild@0.25.12/node_modules/esbuild/lib/main.mjs.map +0 -1
  34. package/dist/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.cjs +0 -5342
  35. package/dist/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.mjs +0 -5340
  36. package/dist/node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.mjs.map +0 -1
  37. package/dist/node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.cjs +0 -35
  38. package/dist/node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.mjs +0 -31
  39. package/dist/node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.mjs.map +0 -1
  40. package/dist/node_modules/.pnpm/fdir@6.5.0_@types_picomatch@4.0.2_picomatch@4.0.3/node_modules/fdir/dist/index.cjs +0 -516
  41. package/dist/node_modules/.pnpm/fdir@6.5.0_@types_picomatch@4.0.2_picomatch@4.0.3/node_modules/fdir/dist/index.mjs +0 -515
  42. package/dist/node_modules/.pnpm/fdir@6.5.0_@types_picomatch@4.0.2_picomatch@4.0.3/node_modules/fdir/dist/index.mjs.map +0 -1
  43. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.cjs +0 -185
  44. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.mjs +0 -181
  45. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.mjs.map +0 -1
  46. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.cjs +0 -27
  47. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.mjs +0 -23
  48. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.cjs +0 -33
  50. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.mjs +0 -29
  51. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.mjs.map +0 -1
  52. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.cjs +0 -58
  53. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.mjs +0 -54
  54. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.cjs +0 -28
  56. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.mjs +0 -24
  57. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.mjs.map +0 -1
  58. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.cjs +0 -25
  59. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.mjs +0 -21
  60. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.cjs +0 -53
  62. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.mjs +0 -49
  63. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.mjs.map +0 -1
  64. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.cjs +0 -41
  65. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.mjs +0 -37
  66. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.cjs +0 -66
  68. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.mjs +0 -62
  69. package/dist/node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.mjs.map +0 -1
  70. package/dist/node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.cjs +0 -24
  71. package/dist/node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.mjs +0 -20
  72. package/dist/node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.cjs +0 -18
  74. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.mjs +0 -14
  75. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.mjs.map +0 -1
  76. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.cjs +0 -51
  77. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.mjs +0 -47
  78. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.cjs +0 -452
  80. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.mjs +0 -448
  81. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.mjs.map +0 -1
  82. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.cjs +0 -33
  83. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.mjs +0 -29
  84. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.cjs +0 -820
  86. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.mjs +0 -816
  87. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.mjs.map +0 -1
  88. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.cjs +0 -63
  89. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.mjs +0 -59
  90. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.cjs +0 -19
  92. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.mjs +0 -15
  93. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.mjs.map +0 -1
  94. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.cjs +0 -29
  95. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.mjs +0 -25
  96. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.mjs.map +0 -1
  97. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.cjs +0 -34
  98. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.mjs +0 -30
  99. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.mjs.map +0 -1
  100. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.cjs +0 -25
  101. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.mjs +0 -21
  102. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.mjs.map +0 -1
  103. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.cjs +0 -31
  104. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.mjs +0 -27
  105. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.mjs.map +0 -1
  106. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.cjs +0 -88
  107. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.mjs +0 -84
  108. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.mjs.map +0 -1
  109. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.cjs +0 -95
  110. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.mjs +0 -91
  111. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.mjs.map +0 -1
  112. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.cjs +0 -46
  113. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.mjs +0 -42
  114. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.mjs.map +0 -1
  115. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.cjs +0 -77
  116. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.mjs +0 -73
  117. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.mjs.map +0 -1
  118. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.cjs +0 -136
  119. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.mjs +0 -132
  120. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.mjs.map +0 -1
  121. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.cjs +0 -57
  122. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.mjs +0 -53
  123. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.mjs.map +0 -1
  124. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.cjs +0 -53
  125. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.mjs +0 -49
  126. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.mjs.map +0 -1
  127. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.cjs +0 -34
  128. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.mjs +0 -30
  129. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.mjs.map +0 -1
  130. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.cjs +0 -23
  131. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.mjs +0 -19
  132. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.mjs.map +0 -1
  133. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.cjs +0 -24
  134. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.mjs +0 -20
  135. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.mjs.map +0 -1
  136. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.cjs +0 -49
  137. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.mjs +0 -45
  138. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.mjs.map +0 -1
  139. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.cjs +0 -42
  140. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.mjs +0 -38
  141. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.mjs.map +0 -1
  142. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.cjs +0 -47
  143. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.mjs +0 -43
  144. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.mjs.map +0 -1
  145. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.cjs +0 -23
  146. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.mjs +0 -19
  147. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.mjs.map +0 -1
  148. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.cjs +0 -34
  149. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.mjs +0 -30
  150. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.cjs +0 -23
  152. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.mjs +0 -19
  153. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.mjs.map +0 -1
  154. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.cjs +0 -62
  155. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.mjs +0 -58
  156. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.cjs +0 -62
  158. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.mjs +0 -58
  159. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.mjs.map +0 -1
  160. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.cjs +0 -53
  161. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.mjs +0 -49
  162. package/dist/node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.cjs +0 -97
  164. package/dist/node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.mjs +0 -95
  165. package/dist/node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.mjs.map +0 -1
  166. package/dist/node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.cjs +0 -62
  167. package/dist/node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.mjs +0 -63
  168. package/dist/node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.cjs +0 -28
  170. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs +0 -24
  171. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs.map +0 -1
  172. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.cjs +0 -175
  173. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs +0 -171
  174. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.cjs +0 -871
  176. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs +0 -867
  177. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs.map +0 -1
  178. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.cjs +0 -307
  179. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs +0 -303
  180. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.cjs +0 -300
  182. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs +0 -296
  183. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs.map +0 -1
  184. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.cjs +0 -60
  185. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs +0 -56
  186. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/index.cjs +0 -14
  188. package/dist/node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/index.mjs +0 -12
  189. package/dist/node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/index.mjs.map +0 -1
  190. package/dist/node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.cjs +0 -117
  191. package/dist/node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.mjs +0 -113
  192. package/dist/node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/serialize-javascript@6.0.2/node_modules/serialize-javascript/index.cjs +0 -119
  194. package/dist/node_modules/.pnpm/serialize-javascript@6.0.2/node_modules/serialize-javascript/index.mjs +0 -115
  195. package/dist/node_modules/.pnpm/serialize-javascript@6.0.2/node_modules/serialize-javascript/index.mjs.map +0 -1
  196. package/dist/node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.cjs +0 -25
  197. package/dist/node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.mjs +0 -21
  198. package/dist/node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.mjs.map +0 -1
  199. package/dist/node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.cjs +0 -294
  200. package/dist/node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs +0 -293
  201. package/dist/node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs.map +0 -1
  202. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.cjs +0 -70
  203. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.mjs +0 -66
  204. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.mjs.map +0 -1
  205. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.cjs +0 -57
  206. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.mjs +0 -53
  207. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.mjs.map +0 -1
  208. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.cjs +0 -102
  209. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.mjs +0 -98
  210. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.mjs.map +0 -1
  211. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.cjs +0 -74
  212. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.mjs +0 -70
  213. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.mjs.map +0 -1
  214. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/composer.cjs +0 -215
  215. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/composer.mjs +0 -211
  216. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/composer.mjs.map +0 -1
  217. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.cjs +0 -101
  218. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.mjs +0 -97
  219. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.mjs.map +0 -1
  220. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.cjs +0 -187
  221. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.mjs +0 -183
  222. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.mjs.map +0 -1
  223. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.cjs +0 -56
  224. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.mjs +0 -52
  225. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.mjs.map +0 -1
  226. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.cjs +0 -49
  227. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.mjs +0 -45
  228. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.mjs.map +0 -1
  229. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.cjs +0 -174
  230. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.mjs +0 -170
  231. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.mjs.map +0 -1
  232. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.cjs +0 -219
  233. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.mjs +0 -215
  234. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.mjs.map +0 -1
  235. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.cjs +0 -118
  236. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.mjs +0 -114
  237. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.mjs.map +0 -1
  238. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.cjs +0 -40
  239. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.mjs +0 -36
  240. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.mjs.map +0 -1
  241. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.cjs +0 -38
  242. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.mjs +0 -34
  243. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.mjs.map +0 -1
  244. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.cjs +0 -24
  245. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.mjs +0 -20
  246. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.mjs.map +0 -1
  247. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.cjs +0 -24
  248. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.mjs +0 -20
  249. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.mjs.map +0 -1
  250. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/Document.cjs +0 -303
  251. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/Document.mjs +0 -299
  252. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/Document.mjs.map +0 -1
  253. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.cjs +0 -75
  254. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.mjs +0 -71
  255. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.mjs.map +0 -1
  256. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.cjs +0 -51
  257. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.mjs +0 -47
  258. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.mjs.map +0 -1
  259. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.cjs +0 -77
  260. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.mjs +0 -73
  261. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.mjs.map +0 -1
  262. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.cjs +0 -178
  263. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.mjs +0 -174
  264. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.mjs.map +0 -1
  265. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/errors.cjs +0 -64
  266. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/errors.mjs +0 -60
  267. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/errors.mjs.map +0 -1
  268. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/index.cjs +0 -75
  269. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/index.mjs +0 -71
  270. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/index.mjs.map +0 -1
  271. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/log.cjs +0 -25
  272. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/log.mjs +0 -21
  273. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/log.mjs.map +0 -1
  274. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.cjs +0 -109
  275. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.mjs +0 -105
  276. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.mjs.map +0 -1
  277. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.cjs +0 -135
  278. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.mjs +0 -131
  279. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.mjs.map +0 -1
  280. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.cjs +0 -48
  281. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.mjs +0 -44
  282. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.mjs.map +0 -1
  283. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.cjs +0 -48
  284. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.mjs +0 -44
  285. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.mjs.map +0 -1
  286. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.cjs +0 -41
  287. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.mjs +0 -37
  288. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.mjs.map +0 -1
  289. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.cjs +0 -126
  290. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.mjs +0 -122
  291. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.mjs.map +0 -1
  292. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.cjs +0 -123
  293. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.mjs +0 -119
  294. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.mjs.map +0 -1
  295. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.cjs +0 -67
  296. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.mjs +0 -63
  297. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.mjs.map +0 -1
  298. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.cjs +0 -61
  299. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.mjs +0 -57
  300. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.mjs.map +0 -1
  301. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.cjs +0 -49
  302. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.mjs +0 -45
  303. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.mjs.map +0 -1
  304. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.cjs +0 -282
  305. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.mjs +0 -278
  306. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.mjs.map +0 -1
  307. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.cjs +0 -62
  308. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.mjs +0 -58
  309. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.mjs.map +0 -1
  310. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.cjs +0 -102
  311. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.mjs +0 -98
  312. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.mjs.map +0 -1
  313. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst.cjs +0 -93
  314. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst.mjs +0 -89
  315. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst.mjs.map +0 -1
  316. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.cjs +0 -531
  317. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.mjs +0 -527
  318. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.mjs.map +0 -1
  319. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.cjs +0 -58
  320. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.mjs +0 -54
  321. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.mjs.map +0 -1
  322. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/parser.cjs +0 -871
  323. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/parser.mjs +0 -867
  324. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/parser.mjs.map +0 -1
  325. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/public-api.cjs +0 -105
  326. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/public-api.mjs +0 -101
  327. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/public-api.mjs.map +0 -1
  328. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.cjs +0 -45
  329. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.mjs +0 -41
  330. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.mjs.map +0 -1
  331. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.cjs +0 -31
  332. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.mjs +0 -27
  333. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.mjs.map +0 -1
  334. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.cjs +0 -27
  335. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.mjs +0 -23
  336. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.mjs.map +0 -1
  337. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.cjs +0 -31
  338. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.mjs +0 -27
  339. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.mjs.map +0 -1
  340. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.cjs +0 -28
  341. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.mjs +0 -24
  342. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.mjs.map +0 -1
  343. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.cjs +0 -31
  344. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.mjs +0 -27
  345. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.mjs.map +0 -1
  346. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.cjs +0 -55
  347. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.mjs +0 -51
  348. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.mjs.map +0 -1
  349. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.cjs +0 -53
  350. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.mjs +0 -49
  351. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.mjs.map +0 -1
  352. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.cjs +0 -43
  353. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.mjs +0 -39
  354. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.mjs.map +0 -1
  355. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.cjs +0 -77
  356. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.mjs +0 -73
  357. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.mjs.map +0 -1
  358. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/tags.cjs +0 -111
  359. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/tags.mjs +0 -107
  360. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/tags.mjs.map +0 -1
  361. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.cjs +0 -62
  362. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.mjs +0 -58
  363. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.mjs.map +0 -1
  364. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.cjs +0 -39
  365. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.mjs +0 -35
  366. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.mjs.map +0 -1
  367. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.cjs +0 -58
  368. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.mjs +0 -54
  369. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.mjs.map +0 -1
  370. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.cjs +0 -87
  371. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.mjs +0 -83
  372. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.mjs.map +0 -1
  373. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.cjs +0 -53
  374. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.mjs +0 -49
  375. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.mjs.map +0 -1
  376. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.cjs +0 -79
  377. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.mjs +0 -75
  378. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.mjs.map +0 -1
  379. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.cjs +0 -75
  380. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.mjs +0 -71
  381. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.mjs.map +0 -1
  382. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.cjs +0 -65
  383. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.mjs +0 -61
  384. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.mjs.map +0 -1
  385. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.cjs +0 -82
  386. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.mjs +0 -78
  387. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.mjs.map +0 -1
  388. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.cjs +0 -95
  389. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.mjs +0 -91
  390. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.mjs.map +0 -1
  391. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.cjs +0 -127
  392. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.mjs +0 -123
  393. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.mjs.map +0 -1
  394. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.cjs +0 -122
  395. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.mjs +0 -118
  396. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.mjs.map +0 -1
  397. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.cjs +0 -128
  398. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.mjs +0 -124
  399. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.mjs.map +0 -1
  400. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.cjs +0 -31
  401. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.mjs +0 -27
  402. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.mjs.map +0 -1
  403. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.cjs +0 -75
  404. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.mjs +0 -71
  405. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.mjs.map +0 -1
  406. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.cjs +0 -32
  407. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.mjs +0 -28
  408. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.mjs.map +0 -1
  409. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.cjs +0 -112
  410. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.mjs +0 -108
  411. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.mjs.map +0 -1
  412. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.cjs +0 -237
  413. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.mjs +0 -233
  414. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.mjs.map +0 -1
  415. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.cjs +0 -202
  416. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.mjs +0 -198
  417. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.mjs.map +0 -1
  418. package/dist/node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.cjs +0 -61
  419. package/dist/node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.mjs +0 -61
  420. package/dist/node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.mjs.map +0 -1
@@ -1,1946 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_index = require('../../../../../picomatch@4.0.3/node_modules/picomatch/index.cjs');
3
- const require_index$1 = require('../../../../../tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.cjs');
4
- const require_index$2 = require('../../../../../gray-matter@4.0.3/node_modules/gray-matter/index.cjs');
5
- const require_index$3 = require('../../../../../yaml@2.8.2/node_modules/yaml/dist/index.cjs');
6
- require('../../../../../camelcase@8.0.0/node_modules/camelcase/index.cjs');
7
- const require_index$5 = require('../../../../../p-limit@6.2.0/node_modules/p-limit/index.cjs');
8
- const require_main$1 = require('../../../../../esbuild@0.25.12/node_modules/esbuild/lib/main.cjs');
9
- const require_index$6 = require('../../../../../serialize-javascript@6.0.2/node_modules/serialize-javascript/index.cjs');
10
- let node_path = require("node:path");
11
- node_path = require_rolldown_runtime.__toESM(node_path);
12
- let node_crypto = require("node:crypto");
13
- let node_fs = require("node:fs");
14
- node_fs = require_rolldown_runtime.__toESM(node_fs);
15
- let node_fs_promises = require("node:fs/promises");
16
- node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises);
17
- let node_module = require("node:module");
18
- let pluralize = require("pluralize");
19
- pluralize = require_rolldown_runtime.__toESM(pluralize);
20
- let node_os = require("node:os");
21
- node_os = require_rolldown_runtime.__toESM(node_os);
22
- let node_events = require("node:events");
23
-
24
- //#region ../../node_modules/.pnpm/@content-collections+core@0.12.0_patch_hash=bceb89349da763f8c715d7b53875be4a1e5bc5161d7_3067b2e8f290866ec343d5ebc4494f7e/node_modules/@content-collections/core/dist/index.js
25
- var import_gray_matter = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index$2.default, 1);
26
- var import_dist = require_index$3.default;
27
- var import_picomatch = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.default, 1);
28
- var import_main = require_main$1.default;
29
- var import_serialize_javascript = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index$6.default, 1);
30
- function createKey(config$1, input, key) {
31
- return (0, node_crypto.createHash)("sha256").update(config$1).update(JSON.stringify(input)).update(key).digest("hex");
32
- }
33
- async function createCacheDirectory(directory) {
34
- const cacheDirectory = node_path.default.join(directory, ".content-collections", "cache");
35
- if (!(0, node_fs.existsSync)(cacheDirectory)) await (0, node_fs_promises.mkdir)(cacheDirectory, { recursive: true });
36
- return cacheDirectory;
37
- }
38
- function fileName(input) {
39
- return input.replace(/[^a-z0-9]/gi, "_").toLowerCase();
40
- }
41
- async function readMapping(mappingPath) {
42
- if ((0, node_fs.existsSync)(mappingPath)) try {
43
- return JSON.parse(await (0, node_fs_promises.readFile)(mappingPath, "utf-8"));
44
- } catch (e) {
45
- console.error("Failed to parse the cache mapping. We will recreate the cache.");
46
- }
47
- return {};
48
- }
49
- async function createCacheManager(baseDirectory, configChecksum) {
50
- const cacheDirectory = await createCacheDirectory(baseDirectory);
51
- const mappingPath = (0, node_path.join)(cacheDirectory, "mapping.json");
52
- const mapping = await readMapping(mappingPath);
53
- async function flush() {
54
- await (0, node_fs_promises.writeFile)(mappingPath, JSON.stringify(mapping));
55
- }
56
- function cache(collection, file) {
57
- const directory = (0, node_path.join)(cacheDirectory, fileName(collection), fileName(file));
58
- let collectionMapping = mapping[collection];
59
- if (!collectionMapping) {
60
- collectionMapping = {};
61
- mapping[collection] = collectionMapping;
62
- }
63
- let fileMapping = collectionMapping[file];
64
- if (!fileMapping) {
65
- fileMapping = [];
66
- collectionMapping[file] = fileMapping;
67
- }
68
- let newFileMapping = [];
69
- const cacheFn = async (input, fn, options) => {
70
- const key = createKey(configChecksum, input, options?.key || "");
71
- newFileMapping.push(key);
72
- const filePath = (0, node_path.join)(directory, `${key}.cache`);
73
- if (fileMapping?.includes(key) || newFileMapping.includes(key)) {
74
- if ((0, node_fs.existsSync)(filePath)) try {
75
- return JSON.parse(await (0, node_fs_promises.readFile)(filePath, "utf-8"));
76
- } catch (e) {
77
- console.error("Failed to parse the cache file. We will recompute the value.");
78
- }
79
- }
80
- const output = await fn(input);
81
- if (!(0, node_fs.existsSync)(directory)) await (0, node_fs_promises.mkdir)(directory, { recursive: true });
82
- await (0, node_fs_promises.writeFile)(filePath, JSON.stringify(output));
83
- return output;
84
- };
85
- const tidyUp = async () => {
86
- const filesToDelete = fileMapping?.filter((key) => !newFileMapping.includes(key)) || [];
87
- for (const key of filesToDelete) {
88
- const filePath = (0, node_path.join)(directory, `${key}.cache`);
89
- if ((0, node_fs.existsSync)(filePath)) await (0, node_fs_promises.unlink)(filePath);
90
- }
91
- if (collectionMapping) collectionMapping[file] = newFileMapping;
92
- };
93
- return {
94
- cacheFn,
95
- tidyUp
96
- };
97
- }
98
- return {
99
- cache,
100
- flush
101
- };
102
- }
103
- function parseYaml(content) {
104
- return (0, import_dist.parse)(content.trim());
105
- }
106
- function frontmatter(fileContent) {
107
- return (0, import_gray_matter.default)(fileContent, { engines: { yaml: {
108
- parse: parseYaml,
109
- stringify: import_dist.stringify
110
- } } });
111
- }
112
- function frontmatterParser(fileContent) {
113
- const { data, content } = frontmatter(fileContent);
114
- return {
115
- ...data,
116
- content: content.trim()
117
- };
118
- }
119
- function frontmatterOnlyParser(fileContent) {
120
- const { data } = frontmatter(fileContent);
121
- return data;
122
- }
123
- const parsers = {
124
- frontmatter: {
125
- hasContent: true,
126
- parse: frontmatterParser
127
- },
128
- ["frontmatter-only"]: {
129
- hasContent: false,
130
- parse: frontmatterOnlyParser
131
- },
132
- json: {
133
- hasContent: false,
134
- parse: JSON.parse
135
- },
136
- yaml: {
137
- hasContent: false,
138
- parse: parseYaml
139
- }
140
- };
141
- function getParser(configuredParser) {
142
- if (typeof configuredParser === "string") return parsers[configuredParser];
143
- return configuredParser;
144
- }
145
- function isDefined(value) {
146
- return value !== void 0 && value !== null;
147
- }
148
- function orderByPath(a, b) {
149
- return a.path.localeCompare(b.path);
150
- }
151
- function posixToNativePath(pathName) {
152
- if (node_path.default.sep !== node_path.default.posix.sep) return pathName.replaceAll(node_path.default.posix.sep, node_path.default.sep);
153
- return pathName;
154
- }
155
- var CollectError = class extends Error {
156
- type;
157
- constructor(type, message) {
158
- super(message);
159
- this.type = type;
160
- }
161
- };
162
- function createCollector(emitter, baseDirectory = ".") {
163
- async function read(filePath) {
164
- try {
165
- return await (0, node_fs_promises.readFile)(filePath, "utf-8");
166
- } catch (error) {
167
- emitter.emit("collector:read-error", {
168
- filePath,
169
- error: new CollectError("Read", String(error))
170
- });
171
- return null;
172
- }
173
- }
174
- async function collectFile(collection, filePath) {
175
- const file = await read(node_path.default.join(baseDirectory, collection.directory, filePath));
176
- if (!file) return null;
177
- try {
178
- return {
179
- data: await getParser(collection.parser).parse(file),
180
- path: filePath
181
- };
182
- } catch (error) {
183
- emitter.emit("collector:parse-error", {
184
- filePath: node_path.default.join(collection.directory, filePath),
185
- error: new CollectError("Parse", String(error))
186
- });
187
- return null;
188
- }
189
- }
190
- function createIgnorePattern(collection) {
191
- if (collection.exclude) if (Array.isArray(collection.exclude)) return collection.exclude;
192
- else return [collection.exclude];
193
- }
194
- async function resolveCollection(collection) {
195
- const collectionDirectory = node_path.default.join(baseDirectory, collection.directory);
196
- const promises = (await require_index$1.glob(Array.isArray(collection.include) ? collection.include : [collection.include], {
197
- cwd: collectionDirectory,
198
- onlyFiles: true,
199
- absolute: false,
200
- ignore: createIgnorePattern(collection)
201
- })).map((filePath) => collectFile(collection, posixToNativePath(filePath)));
202
- const files = await Promise.all(promises);
203
- return {
204
- ...collection,
205
- files: files.filter(isDefined).sort(orderByPath)
206
- };
207
- }
208
- async function collect(unresolvedCollections) {
209
- const promises = unresolvedCollections.map((collection) => resolveCollection(collection));
210
- return await Promise.all(promises);
211
- }
212
- return {
213
- collect,
214
- collectFile
215
- };
216
- }
217
- function createSynchronizer(readCollectionFile, collections, baseDirectory = ".") {
218
- function findCollections(filePath) {
219
- const resolvedFilePath = node_path.default.resolve(filePath);
220
- return collections.filter((collection) => {
221
- return resolvedFilePath.startsWith(node_path.default.resolve(baseDirectory, collection.directory));
222
- });
223
- }
224
- function createRelativePath(collectionPath, filePath) {
225
- const resolvedCollectionPath = node_path.default.resolve(baseDirectory, collectionPath);
226
- let relativePath = node_path.default.resolve(filePath).slice(resolvedCollectionPath.length);
227
- if (relativePath.startsWith(node_path.default.sep)) relativePath = relativePath.slice(node_path.default.sep.length);
228
- return relativePath;
229
- }
230
- function resolve$1(filePath) {
231
- return findCollections(filePath).map((collection) => {
232
- return {
233
- collection,
234
- relativePath: createRelativePath(collection.directory, filePath)
235
- };
236
- }).filter(({ collection, relativePath }) => {
237
- return import_picomatch.default.isMatch(relativePath, collection.include, {
238
- windows: process.platform === "win32",
239
- ignore: collection.exclude
240
- });
241
- });
242
- }
243
- function deleted(filePath) {
244
- const resolvedCollections = resolve$1(filePath);
245
- if (resolvedCollections.length === 0) return false;
246
- let changed$1 = false;
247
- for (const { collection, relativePath } of resolvedCollections) {
248
- const index = collection.files.findIndex((file) => file.path === relativePath);
249
- if (collection.files.splice(index, 1).length > 0) changed$1 = true;
250
- }
251
- return changed$1;
252
- }
253
- async function changed(filePath) {
254
- const resolvedCollections = resolve$1(filePath);
255
- if (resolvedCollections.length === 0) return false;
256
- let changed$1 = false;
257
- for (const { collection, relativePath } of resolvedCollections) {
258
- const index = collection.files.findIndex((file$1) => file$1.path === relativePath);
259
- const file = await readCollectionFile(collection, relativePath);
260
- if (file) {
261
- changed$1 = true;
262
- if (index === -1) {
263
- collection.files.push(file);
264
- collection.files.sort(orderByPath);
265
- } else collection.files[index] = file;
266
- }
267
- }
268
- return changed$1;
269
- }
270
- return {
271
- deleted,
272
- changed
273
- };
274
- }
275
- var singleComment = Symbol("singleComment");
276
- var multiComment = Symbol("multiComment");
277
- var stripWithoutWhitespace = () => "";
278
- var stripWithWhitespace = (string$2, start, end) => string$2.slice(start, end).replace(/\S/g, " ");
279
- var isEscaped = (jsonString, quotePosition) => {
280
- let index = quotePosition - 1;
281
- let backslashCount = 0;
282
- while (jsonString[index] === "\\") {
283
- index -= 1;
284
- backslashCount += 1;
285
- }
286
- return Boolean(backslashCount % 2);
287
- };
288
- function stripJsonComments(jsonString, { whitespace = true, trailingCommas = false } = {}) {
289
- if (typeof jsonString !== "string") throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);
290
- const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
291
- let isInsideString = false;
292
- let isInsideComment = false;
293
- let offset = 0;
294
- let buffer = "";
295
- let result = "";
296
- let commaIndex = -1;
297
- for (let index = 0; index < jsonString.length; index++) {
298
- const currentCharacter = jsonString[index];
299
- const nextCharacter = jsonString[index + 1];
300
- if (!isInsideComment && currentCharacter === "\"") {
301
- if (!isEscaped(jsonString, index)) isInsideString = !isInsideString;
302
- }
303
- if (isInsideString) continue;
304
- if (!isInsideComment && currentCharacter + nextCharacter === "//") {
305
- buffer += jsonString.slice(offset, index);
306
- offset = index;
307
- isInsideComment = singleComment;
308
- index++;
309
- } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === "\r\n") {
310
- index++;
311
- isInsideComment = false;
312
- buffer += strip(jsonString, offset, index);
313
- offset = index;
314
- continue;
315
- } else if (isInsideComment === singleComment && currentCharacter === "\n") {
316
- isInsideComment = false;
317
- buffer += strip(jsonString, offset, index);
318
- offset = index;
319
- } else if (!isInsideComment && currentCharacter + nextCharacter === "/*") {
320
- buffer += jsonString.slice(offset, index);
321
- offset = index;
322
- isInsideComment = multiComment;
323
- index++;
324
- continue;
325
- } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === "*/") {
326
- index++;
327
- isInsideComment = false;
328
- buffer += strip(jsonString, offset, index + 1);
329
- offset = index + 1;
330
- continue;
331
- } else if (trailingCommas && !isInsideComment) {
332
- if (commaIndex !== -1) {
333
- if (currentCharacter === "}" || currentCharacter === "]") {
334
- buffer += jsonString.slice(offset, index);
335
- result += strip(buffer, 0, 1) + buffer.slice(1);
336
- buffer = "";
337
- offset = index;
338
- commaIndex = -1;
339
- } else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
340
- buffer += jsonString.slice(offset, index);
341
- offset = index;
342
- commaIndex = -1;
343
- }
344
- } else if (currentCharacter === ",") {
345
- result += buffer + jsonString.slice(offset, index);
346
- buffer = "";
347
- offset = index;
348
- commaIndex = index;
349
- }
350
- }
351
- }
352
- return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
353
- }
354
- function jsoncParse(data) {
355
- try {
356
- return new Function("return " + stripJsonComments(data).trim())();
357
- } catch (_) {
358
- return {};
359
- }
360
- }
361
- var req = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
362
- var findUp = (name, startDir, stopDir = node_path.default.parse(startDir).root) => {
363
- let dir = startDir;
364
- while (dir !== stopDir) {
365
- const file = node_path.default.join(dir, name);
366
- if (node_fs.default.existsSync(file)) return file;
367
- if (!file.endsWith(".json")) {
368
- const fileWithExt = file + ".json";
369
- if (node_fs.default.existsSync(fileWithExt)) return fileWithExt;
370
- }
371
- dir = node_path.default.dirname(dir);
372
- }
373
- return null;
374
- };
375
- var resolveTsConfigFromFile = (cwd, filename) => {
376
- if (node_path.default.isAbsolute(filename)) return node_fs.default.existsSync(filename) ? filename : null;
377
- return findUp(filename, cwd);
378
- };
379
- var resolveTsConfigFromExtends = (cwd, name) => {
380
- if (node_path.default.isAbsolute(name)) return node_fs.default.existsSync(name) ? name : null;
381
- if (name.startsWith(".")) return findUp(name, cwd);
382
- return req.resolve(name, { paths: [cwd] });
383
- };
384
- var loadTsConfigInternal = (dir = process.cwd(), name = "tsconfig.json", isExtends = false) => {
385
- var _a, _b;
386
- dir = node_path.default.resolve(dir);
387
- const id = isExtends ? resolveTsConfigFromExtends(dir, name) : resolveTsConfigFromFile(dir, name);
388
- if (!id) return null;
389
- const data = jsoncParse(node_fs.default.readFileSync(id, "utf-8"));
390
- const configDir = node_path.default.dirname(id);
391
- if ((_a = data.compilerOptions) == null ? void 0 : _a.baseUrl) data.compilerOptions.baseUrl = node_path.default.join(configDir, data.compilerOptions.baseUrl);
392
- let extendsFiles = [];
393
- if (data.extends) {
394
- const extendsList = Array.isArray(data.extends) ? data.extends : [data.extends];
395
- const extendsData = {};
396
- for (const name2 of extendsList) {
397
- const parentConfig = loadTsConfigInternal(configDir, name2, true);
398
- if (parentConfig) {
399
- Object.assign(extendsData, {
400
- ...parentConfig == null ? void 0 : parentConfig.data,
401
- compilerOptions: {
402
- ...extendsData.compilerOptions,
403
- ...(_b = parentConfig == null ? void 0 : parentConfig.data) == null ? void 0 : _b.compilerOptions
404
- }
405
- });
406
- extendsFiles.push(...parentConfig.files);
407
- }
408
- }
409
- Object.assign(data, {
410
- ...extendsData,
411
- ...data,
412
- compilerOptions: {
413
- ...extendsData.compilerOptions,
414
- ...data.compilerOptions
415
- }
416
- });
417
- }
418
- delete data.extends;
419
- return {
420
- path: id,
421
- data,
422
- files: [...extendsFiles, id]
423
- };
424
- };
425
- var loadTsConfig = (dir, name) => loadTsConfigInternal(dir, name);
426
- var tsconfigPathsToRegExp = (paths) => {
427
- return Object.keys(paths || {}).map((key) => {
428
- return /* @__PURE__ */ new RegExp(`^${key.replace(/\*/, ".*")}$`);
429
- });
430
- };
431
- var match = (id, patterns) => {
432
- if (!patterns) return false;
433
- return patterns.some((p) => {
434
- if (p instanceof RegExp) return p.test(id);
435
- return id === p || id.startsWith(p + "/");
436
- });
437
- };
438
- function tsconfigResolvePaths(configPath) {
439
- let tsconfig = loadTsConfig((0, node_path.dirname)(configPath));
440
- if (!tsconfig) tsconfig = loadTsConfig();
441
- return tsconfig?.data?.compilerOptions?.paths || {};
442
- }
443
- const NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
444
- function isCoreImport(path$1, kind) {
445
- return path$1 === "@content-collections/core" && kind === "import-statement";
446
- }
447
- function createExternalsPlugin(configPath) {
448
- const resolvePatterns = tsconfigPathsToRegExp(tsconfigResolvePaths(configPath));
449
- return {
450
- name: "external-packages",
451
- setup: (build$2) => {
452
- build$2.onResolve({ filter: /.*/ }, ({ path: path$1, kind }) => {
453
- if (process.env.NODE_ENV === "test" && isCoreImport(path$1, kind)) return {
454
- path: (0, node_path.join)(__dirname, "index.ts"),
455
- external: true
456
- };
457
- if (match(path$1, resolvePatterns)) {
458
- if (kind === "dynamic-import") return {
459
- path: path$1,
460
- external: true
461
- };
462
- return;
463
- }
464
- if (!NON_NODE_MODULE_RE.test(path$1)) return {
465
- path: path$1,
466
- external: true
467
- };
468
- });
469
- }
470
- };
471
- }
472
- async function compile(configurationPath, outfile) {
473
- const result = await (0, import_main.build)({
474
- entryPoints: [configurationPath],
475
- packages: "external",
476
- bundle: true,
477
- platform: "node",
478
- format: "esm",
479
- plugins: [createExternalsPlugin(configurationPath)],
480
- outfile,
481
- metafile: true
482
- });
483
- return Object.keys(result.metafile.inputs);
484
- }
485
- var ConfigurationError = class extends Error {
486
- type;
487
- constructor(type, message) {
488
- super(message);
489
- this.type = type;
490
- }
491
- };
492
- const defaultConfigName = "content-collection-config.mjs";
493
- function resolveCacheDir(config$1, options) {
494
- if (options.cacheDir) return options.cacheDir;
495
- return node_path.default.join(node_path.default.dirname(config$1), ".content-collections", "cache");
496
- }
497
- function createConfigurationReader() {
498
- return async (configurationPath, options = { configName: defaultConfigName }) => {
499
- if (!(0, node_fs.existsSync)(configurationPath)) throw new ConfigurationError("Read", `configuration file ${configurationPath} does not exist`);
500
- const cacheDir = resolveCacheDir(configurationPath, options);
501
- await node_fs_promises.default.mkdir(cacheDir, { recursive: true });
502
- const outfile = node_path.default.join(cacheDir, options.configName);
503
- try {
504
- const configurationPaths = await compile(configurationPath, outfile);
505
- const module$1 = await import(`file://${node_path.default.resolve(outfile)}?x=${Date.now()}`);
506
- const hash = (0, node_crypto.createHash)("sha256");
507
- hash.update(await node_fs_promises.default.readFile(outfile, "utf-8"));
508
- const checksum = hash.digest("hex");
509
- return {
510
- ...module$1.default,
511
- path: configurationPath,
512
- inputPaths: configurationPaths.map((p) => node_path.default.resolve(p)),
513
- generateTypes: true,
514
- checksum
515
- };
516
- } catch (error) {
517
- throw new ConfigurationError("Compile", `configuration file ${configurationPath} is invalid: ${error}`);
518
- }
519
- };
520
- }
521
- const deprecations = { implicitContentProperty: `The implicit addition of a content property to schemas is deprecated.
522
- Please add an explicit content property to your schema.
523
- For more information, see:
524
- https://content-collections.dev/docs/deprecations/implicit-content-property` };
525
- const _suppressDeprecatedWarnings = [];
526
- function deprecated(deprecation, logger = console.warn) {
527
- if (_suppressDeprecatedWarnings.includes(deprecation)) return;
528
- logger(`[CC DEPRECATED]: ${deprecations[deprecation]}`);
529
- }
530
- const skippedSymbol = Symbol("skipped");
531
- Object.freeze({ status: "aborted" });
532
- function $constructor(name, initializer$1, params) {
533
- function init(inst, def) {
534
- var _a;
535
- Object.defineProperty(inst, "_zod", {
536
- value: inst._zod ?? {},
537
- enumerable: false
538
- });
539
- (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
540
- inst._zod.traits.add(name);
541
- initializer$1(inst, def);
542
- for (const k in _.prototype) if (!(k in inst)) Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
543
- inst._zod.constr = _;
544
- inst._zod.def = def;
545
- }
546
- const Parent = params?.Parent ?? Object;
547
- class Definition extends Parent {}
548
- Object.defineProperty(Definition, "name", { value: name });
549
- function _(def) {
550
- var _a;
551
- const inst = params?.Parent ? new Definition() : this;
552
- init(inst, def);
553
- (_a = inst._zod).deferred ?? (_a.deferred = []);
554
- for (const fn of inst._zod.deferred) fn();
555
- return inst;
556
- }
557
- Object.defineProperty(_, "init", { value: init });
558
- Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => {
559
- if (params?.Parent && inst instanceof params.Parent) return true;
560
- return inst?._zod?.traits?.has(name);
561
- } });
562
- Object.defineProperty(_, "name", { value: name });
563
- return _;
564
- }
565
- var $ZodAsyncError = class extends Error {
566
- constructor() {
567
- super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
568
- }
569
- };
570
- const globalConfig = {};
571
- function config(newConfig) {
572
- if (newConfig) Object.assign(globalConfig, newConfig);
573
- return globalConfig;
574
- }
575
- function jsonStringifyReplacer(_, value) {
576
- if (typeof value === "bigint") return value.toString();
577
- return value;
578
- }
579
- function cached(getter) {
580
- return { get value() {
581
- {
582
- const value = getter();
583
- Object.defineProperty(this, "value", { value });
584
- return value;
585
- }
586
- throw new Error("cached value already set");
587
- } };
588
- }
589
- function cleanRegex(source) {
590
- const start = source.startsWith("^") ? 1 : 0;
591
- const end = source.endsWith("$") ? source.length - 1 : source.length;
592
- return source.slice(start, end);
593
- }
594
- const EVALUATING = Symbol("evaluating");
595
- function defineLazy(object$1, key, getter) {
596
- let value = void 0;
597
- Object.defineProperty(object$1, key, {
598
- get() {
599
- if (value === EVALUATING) return;
600
- if (value === void 0) {
601
- value = EVALUATING;
602
- value = getter();
603
- }
604
- return value;
605
- },
606
- set(v) {
607
- Object.defineProperty(object$1, key, { value: v });
608
- },
609
- configurable: true
610
- });
611
- }
612
- const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
613
- function isObject(data) {
614
- return typeof data === "object" && data !== null && !Array.isArray(data);
615
- }
616
- cached(() => {
617
- if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
618
- try {
619
- new Function("");
620
- return true;
621
- } catch (_) {
622
- return false;
623
- }
624
- });
625
- function isPlainObject(o) {
626
- if (isObject(o) === false) return false;
627
- const ctor = o.constructor;
628
- if (ctor === void 0) return true;
629
- const prot = ctor.prototype;
630
- if (isObject(prot) === false) return false;
631
- if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
632
- return true;
633
- }
634
- const propertyKeyTypes = new Set([
635
- "string",
636
- "number",
637
- "symbol"
638
- ]);
639
- function escapeRegex(str) {
640
- return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
641
- }
642
- function clone(inst, def, params) {
643
- const cl = new inst._zod.constr(def ?? inst._zod.def);
644
- if (!def || params?.parent) cl._zod.parent = inst;
645
- return cl;
646
- }
647
- function normalizeParams(_params) {
648
- const params = _params;
649
- if (!params) return {};
650
- if (typeof params === "string") return { error: () => params };
651
- if (params?.message !== void 0) {
652
- if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
653
- params.error = params.message;
654
- }
655
- delete params.message;
656
- if (typeof params.error === "string") return {
657
- ...params,
658
- error: () => params.error
659
- };
660
- return params;
661
- }
662
- function optionalKeys(shape) {
663
- return Object.keys(shape).filter((k) => {
664
- return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
665
- });
666
- }
667
- Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, -Number.MAX_VALUE, Number.MAX_VALUE;
668
- function aborted(x, startIndex = 0) {
669
- if (x.aborted === true) return true;
670
- for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
671
- return false;
672
- }
673
- function prefixIssues(path$1, issues) {
674
- return issues.map((iss) => {
675
- var _a;
676
- (_a = iss).path ?? (_a.path = []);
677
- iss.path.unshift(path$1);
678
- return iss;
679
- });
680
- }
681
- function unwrapMessage(message) {
682
- return typeof message === "string" ? message : message?.message;
683
- }
684
- function finalizeIssue(iss, ctx, config$1) {
685
- const full = {
686
- ...iss,
687
- path: iss.path ?? []
688
- };
689
- if (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config$1.customError?.(iss)) ?? unwrapMessage(config$1.localeError?.(iss)) ?? "Invalid input";
690
- delete full.inst;
691
- delete full.continue;
692
- if (!ctx?.reportInput) delete full.input;
693
- return full;
694
- }
695
- const initializer = (inst, def) => {
696
- inst.name = "$ZodError";
697
- Object.defineProperty(inst, "_zod", {
698
- value: inst._zod,
699
- enumerable: false
700
- });
701
- Object.defineProperty(inst, "issues", {
702
- value: def,
703
- enumerable: false
704
- });
705
- inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
706
- Object.defineProperty(inst, "toString", {
707
- value: () => inst.message,
708
- enumerable: false
709
- });
710
- };
711
- const $ZodError = $constructor("$ZodError", initializer);
712
- const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
713
- const _parse = (_Err) => (schema$1, value, _ctx, _params) => {
714
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
715
- const result = schema$1._zod.run({
716
- value,
717
- issues: []
718
- }, ctx);
719
- if (result instanceof Promise) throw new $ZodAsyncError();
720
- if (result.issues.length) {
721
- const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
722
- captureStackTrace(e, _params?.callee);
723
- throw e;
724
- }
725
- return result.value;
726
- };
727
- const parse$1 = /* @__PURE__ */ _parse($ZodRealError);
728
- const _parseAsync = (_Err) => async (schema$1, value, _ctx, params) => {
729
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
730
- let result = schema$1._zod.run({
731
- value,
732
- issues: []
733
- }, ctx);
734
- if (result instanceof Promise) result = await result;
735
- if (result.issues.length) {
736
- const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
737
- captureStackTrace(e, params?.callee);
738
- throw e;
739
- }
740
- return result.value;
741
- };
742
- const parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
743
- const _safeParse = (_Err) => (schema$1, value, _ctx) => {
744
- const ctx = _ctx ? {
745
- ..._ctx,
746
- async: false
747
- } : { async: false };
748
- const result = schema$1._zod.run({
749
- value,
750
- issues: []
751
- }, ctx);
752
- if (result instanceof Promise) throw new $ZodAsyncError();
753
- return result.issues.length ? {
754
- success: false,
755
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
756
- } : {
757
- success: true,
758
- data: result.value
759
- };
760
- };
761
- const safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
762
- const _safeParseAsync = (_Err) => async (schema$1, value, _ctx) => {
763
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
764
- let result = schema$1._zod.run({
765
- value,
766
- issues: []
767
- }, ctx);
768
- if (result instanceof Promise) result = await result;
769
- return result.issues.length ? {
770
- success: false,
771
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
772
- } : {
773
- success: true,
774
- data: result.value
775
- };
776
- };
777
- const safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
778
- const string$1 = (params) => {
779
- const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
780
- return /* @__PURE__ */ new RegExp(`^${regex}$`);
781
- };
782
- const bigint$1 = /^-?\d+n?$/;
783
- const number$1 = /^-?\d+(?:\.\d+)?/;
784
- const boolean$1 = /^(?:true|false)$/i;
785
- const _null$2 = /^null$/i;
786
- const _undefined$2 = /^undefined$/i;
787
- const version = {
788
- major: 4,
789
- minor: 1,
790
- patch: 11
791
- };
792
- const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
793
- var _a;
794
- inst ?? (inst = {});
795
- inst._zod.def = def;
796
- inst._zod.bag = inst._zod.bag || {};
797
- inst._zod.version = version;
798
- const checks = [...inst._zod.def.checks ?? []];
799
- if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
800
- for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
801
- if (checks.length === 0) {
802
- (_a = inst._zod).deferred ?? (_a.deferred = []);
803
- inst._zod.deferred?.push(() => {
804
- inst._zod.run = inst._zod.parse;
805
- });
806
- } else {
807
- const runChecks = (payload, checks$1, ctx) => {
808
- let isAborted = aborted(payload);
809
- let asyncResult;
810
- for (const ch of checks$1) {
811
- if (ch._zod.def.when) {
812
- if (!ch._zod.def.when(payload)) continue;
813
- } else if (isAborted) continue;
814
- const currLen = payload.issues.length;
815
- const _ = ch._zod.check(payload);
816
- if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
817
- if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
818
- await _;
819
- if (payload.issues.length === currLen) return;
820
- if (!isAborted) isAborted = aborted(payload, currLen);
821
- });
822
- else {
823
- if (payload.issues.length === currLen) continue;
824
- if (!isAborted) isAborted = aborted(payload, currLen);
825
- }
826
- }
827
- if (asyncResult) return asyncResult.then(() => {
828
- return payload;
829
- });
830
- return payload;
831
- };
832
- const handleCanaryResult = (canary, payload, ctx) => {
833
- if (aborted(canary)) {
834
- canary.aborted = true;
835
- return canary;
836
- }
837
- const checkResult = runChecks(payload, checks, ctx);
838
- if (checkResult instanceof Promise) {
839
- if (ctx.async === false) throw new $ZodAsyncError();
840
- return checkResult.then((checkResult$1) => inst._zod.parse(checkResult$1, ctx));
841
- }
842
- return inst._zod.parse(checkResult, ctx);
843
- };
844
- inst._zod.run = (payload, ctx) => {
845
- if (ctx.skipChecks) return inst._zod.parse(payload, ctx);
846
- if (ctx.direction === "backward") {
847
- const canary = inst._zod.parse({
848
- value: payload.value,
849
- issues: []
850
- }, {
851
- ...ctx,
852
- skipChecks: true
853
- });
854
- if (canary instanceof Promise) return canary.then((canary$1) => {
855
- return handleCanaryResult(canary$1, payload, ctx);
856
- });
857
- return handleCanaryResult(canary, payload, ctx);
858
- }
859
- const result = inst._zod.parse(payload, ctx);
860
- if (result instanceof Promise) {
861
- if (ctx.async === false) throw new $ZodAsyncError();
862
- return result.then((result$1) => runChecks(result$1, checks, ctx));
863
- }
864
- return runChecks(result, checks, ctx);
865
- };
866
- }
867
- inst["~standard"] = {
868
- validate: (value) => {
869
- try {
870
- const r = safeParse(inst, value);
871
- return r.success ? { value: r.data } : { issues: r.error?.issues };
872
- } catch (_) {
873
- return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
874
- }
875
- },
876
- vendor: "zod",
877
- version: 1
878
- };
879
- });
880
- const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
881
- $ZodType.init(inst, def);
882
- inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
883
- inst._zod.parse = (payload, _) => {
884
- if (def.coerce) try {
885
- payload.value = String(payload.value);
886
- } catch (_$1) {}
887
- if (typeof payload.value === "string") return payload;
888
- payload.issues.push({
889
- expected: "string",
890
- code: "invalid_type",
891
- input: payload.value,
892
- inst
893
- });
894
- return payload;
895
- };
896
- });
897
- const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
898
- $ZodType.init(inst, def);
899
- inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
900
- inst._zod.parse = (payload, _ctx) => {
901
- if (def.coerce) try {
902
- payload.value = Number(payload.value);
903
- } catch (_) {}
904
- const input = payload.value;
905
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
906
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
907
- payload.issues.push({
908
- expected: "number",
909
- code: "invalid_type",
910
- input,
911
- inst,
912
- ...received ? { received } : {}
913
- });
914
- return payload;
915
- };
916
- });
917
- const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
918
- $ZodType.init(inst, def);
919
- inst._zod.pattern = boolean$1;
920
- inst._zod.parse = (payload, _ctx) => {
921
- if (def.coerce) try {
922
- payload.value = Boolean(payload.value);
923
- } catch (_) {}
924
- const input = payload.value;
925
- if (typeof input === "boolean") return payload;
926
- payload.issues.push({
927
- expected: "boolean",
928
- code: "invalid_type",
929
- input,
930
- inst
931
- });
932
- return payload;
933
- };
934
- });
935
- const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
936
- $ZodType.init(inst, def);
937
- inst._zod.pattern = bigint$1;
938
- inst._zod.parse = (payload, _ctx) => {
939
- if (def.coerce) try {
940
- payload.value = BigInt(payload.value);
941
- } catch (_) {}
942
- if (typeof payload.value === "bigint") return payload;
943
- payload.issues.push({
944
- expected: "bigint",
945
- code: "invalid_type",
946
- input: payload.value,
947
- inst
948
- });
949
- return payload;
950
- };
951
- });
952
- const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => {
953
- $ZodType.init(inst, def);
954
- inst._zod.pattern = _undefined$2;
955
- inst._zod.values = new Set([void 0]);
956
- inst._zod.optin = "optional";
957
- inst._zod.optout = "optional";
958
- inst._zod.parse = (payload, _ctx) => {
959
- const input = payload.value;
960
- if (typeof input === "undefined") return payload;
961
- payload.issues.push({
962
- expected: "undefined",
963
- code: "invalid_type",
964
- input,
965
- inst
966
- });
967
- return payload;
968
- };
969
- });
970
- const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
971
- $ZodType.init(inst, def);
972
- inst._zod.pattern = _null$2;
973
- inst._zod.values = new Set([null]);
974
- inst._zod.parse = (payload, _ctx) => {
975
- const input = payload.value;
976
- if (input === null) return payload;
977
- payload.issues.push({
978
- expected: "null",
979
- code: "invalid_type",
980
- input,
981
- inst
982
- });
983
- return payload;
984
- };
985
- });
986
- const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
987
- $ZodType.init(inst, def);
988
- inst._zod.parse = (payload) => payload;
989
- });
990
- const $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
991
- $ZodType.init(inst, def);
992
- inst._zod.parse = (payload, _ctx) => {
993
- if (def.coerce) try {
994
- payload.value = new Date(payload.value);
995
- } catch (_err) {}
996
- const input = payload.value;
997
- const isDate = input instanceof Date;
998
- if (isDate && !Number.isNaN(input.getTime())) return payload;
999
- payload.issues.push({
1000
- expected: "date",
1001
- code: "invalid_type",
1002
- input,
1003
- ...isDate ? { received: "Invalid Date" } : {},
1004
- inst
1005
- });
1006
- return payload;
1007
- };
1008
- });
1009
- function handleArrayResult(result, final, index) {
1010
- if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1011
- final.value[index] = result.value;
1012
- }
1013
- const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1014
- $ZodType.init(inst, def);
1015
- inst._zod.parse = (payload, ctx) => {
1016
- const input = payload.value;
1017
- if (!Array.isArray(input)) {
1018
- payload.issues.push({
1019
- expected: "array",
1020
- code: "invalid_type",
1021
- input,
1022
- inst
1023
- });
1024
- return payload;
1025
- }
1026
- payload.value = Array(input.length);
1027
- const proms = [];
1028
- for (let i = 0; i < input.length; i++) {
1029
- const item = input[i];
1030
- const result = def.element._zod.run({
1031
- value: item,
1032
- issues: []
1033
- }, ctx);
1034
- if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
1035
- else handleArrayResult(result, payload, i);
1036
- }
1037
- if (proms.length) return Promise.all(proms).then(() => payload);
1038
- return payload;
1039
- };
1040
- });
1041
- function handlePropertyResult(result, final, key, input) {
1042
- if (result.issues.length) final.issues.push(...prefixIssues(key, result.issues));
1043
- if (result.value === void 0) {
1044
- if (key in input) final.value[key] = void 0;
1045
- } else final.value[key] = result.value;
1046
- }
1047
- function normalizeDef(def) {
1048
- const keys = Object.keys(def.shape);
1049
- for (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
1050
- const okeys = optionalKeys(def.shape);
1051
- return {
1052
- ...def,
1053
- keys,
1054
- keySet: new Set(keys),
1055
- numKeys: keys.length,
1056
- optionalKeys: new Set(okeys)
1057
- };
1058
- }
1059
- function handleCatchall(proms, input, payload, ctx, def, inst) {
1060
- const unrecognized = [];
1061
- const keySet = def.keySet;
1062
- const _catchall = def.catchall._zod;
1063
- const t = _catchall.def.type;
1064
- for (const key of Object.keys(input)) {
1065
- if (keySet.has(key)) continue;
1066
- if (t === "never") {
1067
- unrecognized.push(key);
1068
- continue;
1069
- }
1070
- const r = _catchall.run({
1071
- value: input[key],
1072
- issues: []
1073
- }, ctx);
1074
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input)));
1075
- else handlePropertyResult(r, payload, key, input);
1076
- }
1077
- if (unrecognized.length) payload.issues.push({
1078
- code: "unrecognized_keys",
1079
- keys: unrecognized,
1080
- input,
1081
- inst
1082
- });
1083
- if (!proms.length) return payload;
1084
- return Promise.all(proms).then(() => {
1085
- return payload;
1086
- });
1087
- }
1088
- const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1089
- $ZodType.init(inst, def);
1090
- if (!Object.getOwnPropertyDescriptor(def, "shape")?.get) {
1091
- const sh = def.shape;
1092
- Object.defineProperty(def, "shape", { get: () => {
1093
- const newSh = { ...sh };
1094
- Object.defineProperty(def, "shape", { value: newSh });
1095
- return newSh;
1096
- } });
1097
- }
1098
- const _normalized = cached(() => normalizeDef(def));
1099
- defineLazy(inst._zod, "propValues", () => {
1100
- const shape = def.shape;
1101
- const propValues = {};
1102
- for (const key in shape) {
1103
- const field = shape[key]._zod;
1104
- if (field.values) {
1105
- propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
1106
- for (const v of field.values) propValues[key].add(v);
1107
- }
1108
- }
1109
- return propValues;
1110
- });
1111
- const isObject$1 = isObject;
1112
- const catchall = def.catchall;
1113
- let value;
1114
- inst._zod.parse = (payload, ctx) => {
1115
- value ?? (value = _normalized.value);
1116
- const input = payload.value;
1117
- if (!isObject$1(input)) {
1118
- payload.issues.push({
1119
- expected: "object",
1120
- code: "invalid_type",
1121
- input,
1122
- inst
1123
- });
1124
- return payload;
1125
- }
1126
- payload.value = {};
1127
- const proms = [];
1128
- const shape = value.shape;
1129
- for (const key of value.keys) {
1130
- const r = shape[key]._zod.run({
1131
- value: input[key],
1132
- issues: []
1133
- }, ctx);
1134
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input)));
1135
- else handlePropertyResult(r, payload, key, input);
1136
- }
1137
- if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
1138
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
1139
- };
1140
- });
1141
- function handleUnionResults(results, final, inst, ctx) {
1142
- for (const result of results) if (result.issues.length === 0) {
1143
- final.value = result.value;
1144
- return final;
1145
- }
1146
- const nonaborted = results.filter((r) => !aborted(r));
1147
- if (nonaborted.length === 1) {
1148
- final.value = nonaborted[0].value;
1149
- return nonaborted[0];
1150
- }
1151
- final.issues.push({
1152
- code: "invalid_union",
1153
- input: final.value,
1154
- inst,
1155
- errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
1156
- });
1157
- return final;
1158
- }
1159
- const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
1160
- $ZodType.init(inst, def);
1161
- defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
1162
- defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
1163
- defineLazy(inst._zod, "values", () => {
1164
- if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
1165
- });
1166
- defineLazy(inst._zod, "pattern", () => {
1167
- if (def.options.every((o) => o._zod.pattern)) {
1168
- const patterns = def.options.map((o) => o._zod.pattern);
1169
- return /* @__PURE__ */ new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
1170
- }
1171
- });
1172
- const single = def.options.length === 1;
1173
- const first = def.options[0]._zod.run;
1174
- inst._zod.parse = (payload, ctx) => {
1175
- if (single) return first(payload, ctx);
1176
- let async = false;
1177
- const results = [];
1178
- for (const option of def.options) {
1179
- const result = option._zod.run({
1180
- value: payload.value,
1181
- issues: []
1182
- }, ctx);
1183
- if (result instanceof Promise) {
1184
- results.push(result);
1185
- async = true;
1186
- } else {
1187
- if (result.issues.length === 0) return result;
1188
- results.push(result);
1189
- }
1190
- }
1191
- if (!async) return handleUnionResults(results, payload, inst, ctx);
1192
- return Promise.all(results).then((results$1) => {
1193
- return handleUnionResults(results$1, payload, inst, ctx);
1194
- });
1195
- };
1196
- });
1197
- const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1198
- $ZodType.init(inst, def);
1199
- inst._zod.parse = (payload, ctx) => {
1200
- const input = payload.value;
1201
- if (!isPlainObject(input)) {
1202
- payload.issues.push({
1203
- expected: "record",
1204
- code: "invalid_type",
1205
- input,
1206
- inst
1207
- });
1208
- return payload;
1209
- }
1210
- const proms = [];
1211
- if (def.keyType._zod.values) {
1212
- const values = def.keyType._zod.values;
1213
- payload.value = {};
1214
- for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1215
- const result = def.valueType._zod.run({
1216
- value: input[key],
1217
- issues: []
1218
- }, ctx);
1219
- if (result instanceof Promise) proms.push(result.then((result$1) => {
1220
- if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
1221
- payload.value[key] = result$1.value;
1222
- }));
1223
- else {
1224
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1225
- payload.value[key] = result.value;
1226
- }
1227
- }
1228
- let unrecognized;
1229
- for (const key in input) if (!values.has(key)) {
1230
- unrecognized = unrecognized ?? [];
1231
- unrecognized.push(key);
1232
- }
1233
- if (unrecognized && unrecognized.length > 0) payload.issues.push({
1234
- code: "unrecognized_keys",
1235
- input,
1236
- inst,
1237
- keys: unrecognized
1238
- });
1239
- } else {
1240
- payload.value = {};
1241
- for (const key of Reflect.ownKeys(input)) {
1242
- if (key === "__proto__") continue;
1243
- const keyResult = def.keyType._zod.run({
1244
- value: key,
1245
- issues: []
1246
- }, ctx);
1247
- if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1248
- if (keyResult.issues.length) {
1249
- payload.issues.push({
1250
- code: "invalid_key",
1251
- origin: "record",
1252
- issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
1253
- input: key,
1254
- path: [key],
1255
- inst
1256
- });
1257
- payload.value[keyResult.value] = keyResult.value;
1258
- continue;
1259
- }
1260
- const result = def.valueType._zod.run({
1261
- value: input[key],
1262
- issues: []
1263
- }, ctx);
1264
- if (result instanceof Promise) proms.push(result.then((result$1) => {
1265
- if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
1266
- payload.value[keyResult.value] = result$1.value;
1267
- }));
1268
- else {
1269
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1270
- payload.value[keyResult.value] = result.value;
1271
- }
1272
- }
1273
- }
1274
- if (proms.length) return Promise.all(proms).then(() => payload);
1275
- return payload;
1276
- };
1277
- });
1278
- const $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
1279
- $ZodType.init(inst, def);
1280
- inst._zod.parse = (payload, ctx) => {
1281
- const input = payload.value;
1282
- if (!(input instanceof Map)) {
1283
- payload.issues.push({
1284
- expected: "map",
1285
- code: "invalid_type",
1286
- input,
1287
- inst
1288
- });
1289
- return payload;
1290
- }
1291
- const proms = [];
1292
- payload.value = /* @__PURE__ */ new Map();
1293
- for (const [key, value] of input) {
1294
- const keyResult = def.keyType._zod.run({
1295
- value: key,
1296
- issues: []
1297
- }, ctx);
1298
- const valueResult = def.valueType._zod.run({
1299
- value,
1300
- issues: []
1301
- }, ctx);
1302
- if (keyResult instanceof Promise || valueResult instanceof Promise) proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
1303
- handleMapResult(keyResult$1, valueResult$1, payload, key, input, inst, ctx);
1304
- }));
1305
- else handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1306
- }
1307
- if (proms.length) return Promise.all(proms).then(() => payload);
1308
- return payload;
1309
- };
1310
- });
1311
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1312
- if (keyResult.issues.length) if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, keyResult.issues));
1313
- else final.issues.push({
1314
- code: "invalid_key",
1315
- origin: "map",
1316
- input,
1317
- inst,
1318
- issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
1319
- });
1320
- if (valueResult.issues.length) if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, valueResult.issues));
1321
- else final.issues.push({
1322
- origin: "map",
1323
- code: "invalid_element",
1324
- input,
1325
- inst,
1326
- key,
1327
- issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
1328
- });
1329
- final.value.set(keyResult.value, valueResult.value);
1330
- }
1331
- const $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
1332
- $ZodType.init(inst, def);
1333
- inst._zod.parse = (payload, ctx) => {
1334
- const input = payload.value;
1335
- if (!(input instanceof Set)) {
1336
- payload.issues.push({
1337
- input,
1338
- inst,
1339
- expected: "set",
1340
- code: "invalid_type"
1341
- });
1342
- return payload;
1343
- }
1344
- const proms = [];
1345
- payload.value = /* @__PURE__ */ new Set();
1346
- for (const item of input) {
1347
- const result = def.valueType._zod.run({
1348
- value: item,
1349
- issues: []
1350
- }, ctx);
1351
- if (result instanceof Promise) proms.push(result.then((result$1) => handleSetResult(result$1, payload)));
1352
- else handleSetResult(result, payload);
1353
- }
1354
- if (proms.length) return Promise.all(proms).then(() => payload);
1355
- return payload;
1356
- };
1357
- });
1358
- function handleSetResult(result, final) {
1359
- if (result.issues.length) final.issues.push(...result.issues);
1360
- final.value.add(result.value);
1361
- }
1362
- const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
1363
- $ZodType.init(inst, def);
1364
- if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
1365
- inst._zod.values = new Set(def.values);
1366
- inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
1367
- inst._zod.parse = (payload, _ctx) => {
1368
- const input = payload.value;
1369
- if (inst._zod.values.has(input)) return payload;
1370
- payload.issues.push({
1371
- code: "invalid_value",
1372
- values: def.values,
1373
- input,
1374
- inst
1375
- });
1376
- return payload;
1377
- };
1378
- });
1379
- function handleOptionalResult(result, input) {
1380
- if (result.issues.length && input === void 0) return {
1381
- issues: [],
1382
- value: void 0
1383
- };
1384
- return result;
1385
- }
1386
- const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
1387
- $ZodType.init(inst, def);
1388
- inst._zod.optin = "optional";
1389
- inst._zod.optout = "optional";
1390
- defineLazy(inst._zod, "values", () => {
1391
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
1392
- });
1393
- defineLazy(inst._zod, "pattern", () => {
1394
- const pattern = def.innerType._zod.pattern;
1395
- return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
1396
- });
1397
- inst._zod.parse = (payload, ctx) => {
1398
- if (def.innerType._zod.optin === "optional") {
1399
- const result = def.innerType._zod.run(payload, ctx);
1400
- if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));
1401
- return handleOptionalResult(result, payload.value);
1402
- }
1403
- if (payload.value === void 0) return payload;
1404
- return def.innerType._zod.run(payload, ctx);
1405
- };
1406
- });
1407
- const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
1408
- $ZodType.init(inst, def);
1409
- defineLazy(inst._zod, "innerType", () => def.getter());
1410
- defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
1411
- defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
1412
- defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin ?? void 0);
1413
- defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout ?? void 0);
1414
- inst._zod.parse = (payload, ctx) => {
1415
- return inst._zod.innerType._zod.run(payload, ctx);
1416
- };
1417
- });
1418
- function _string(Class, params) {
1419
- return new Class({
1420
- type: "string",
1421
- ...normalizeParams(params)
1422
- });
1423
- }
1424
- function _number(Class, params) {
1425
- return new Class({
1426
- type: "number",
1427
- checks: [],
1428
- ...normalizeParams(params)
1429
- });
1430
- }
1431
- function _boolean(Class, params) {
1432
- return new Class({
1433
- type: "boolean",
1434
- ...normalizeParams(params)
1435
- });
1436
- }
1437
- function _bigint(Class, params) {
1438
- return new Class({
1439
- type: "bigint",
1440
- ...normalizeParams(params)
1441
- });
1442
- }
1443
- function _undefined$1(Class, params) {
1444
- return new Class({
1445
- type: "undefined",
1446
- ...normalizeParams(params)
1447
- });
1448
- }
1449
- function _null$1(Class, params) {
1450
- return new Class({
1451
- type: "null",
1452
- ...normalizeParams(params)
1453
- });
1454
- }
1455
- function _unknown(Class) {
1456
- return new Class({ type: "unknown" });
1457
- }
1458
- function _date(Class, params) {
1459
- return new Class({
1460
- type: "date",
1461
- ...normalizeParams(params)
1462
- });
1463
- }
1464
- const ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
1465
- if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType.");
1466
- $ZodType.init(inst, def);
1467
- inst.def = def;
1468
- inst.type = def.type;
1469
- inst.parse = (data, params) => parse$1(inst, data, params, { callee: inst.parse });
1470
- inst.safeParse = (data, params) => safeParse(inst, data, params);
1471
- inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
1472
- inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
1473
- inst.check = (...checks) => {
1474
- return inst.clone({
1475
- ...def,
1476
- checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: {
1477
- check: ch,
1478
- def: { check: "custom" },
1479
- onattach: []
1480
- } } : ch)]
1481
- });
1482
- };
1483
- inst.clone = (_def, params) => clone(inst, _def, params);
1484
- inst.brand = () => inst;
1485
- inst.register = ((reg, meta) => {
1486
- reg.add(inst, meta);
1487
- return inst;
1488
- });
1489
- });
1490
- const ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
1491
- $ZodString.init(inst, def);
1492
- ZodMiniType.init(inst, def);
1493
- });
1494
- function string(params) {
1495
- return _string(ZodMiniString, params);
1496
- }
1497
- const ZodMiniNumber = /* @__PURE__ */ $constructor("ZodMiniNumber", (inst, def) => {
1498
- $ZodNumber.init(inst, def);
1499
- ZodMiniType.init(inst, def);
1500
- });
1501
- function number(params) {
1502
- return _number(ZodMiniNumber, params);
1503
- }
1504
- const ZodMiniBoolean = /* @__PURE__ */ $constructor("ZodMiniBoolean", (inst, def) => {
1505
- $ZodBoolean.init(inst, def);
1506
- ZodMiniType.init(inst, def);
1507
- });
1508
- function boolean(params) {
1509
- return _boolean(ZodMiniBoolean, params);
1510
- }
1511
- const ZodMiniBigInt = /* @__PURE__ */ $constructor("ZodMiniBigInt", (inst, def) => {
1512
- $ZodBigInt.init(inst, def);
1513
- ZodMiniType.init(inst, def);
1514
- });
1515
- function bigint(params) {
1516
- return _bigint(ZodMiniBigInt, params);
1517
- }
1518
- const ZodMiniUndefined = /* @__PURE__ */ $constructor("ZodMiniUndefined", (inst, def) => {
1519
- $ZodUndefined.init(inst, def);
1520
- ZodMiniType.init(inst, def);
1521
- });
1522
- function _undefined(params) {
1523
- return _undefined$1(ZodMiniUndefined, params);
1524
- }
1525
- const ZodMiniNull = /* @__PURE__ */ $constructor("ZodMiniNull", (inst, def) => {
1526
- $ZodNull.init(inst, def);
1527
- ZodMiniType.init(inst, def);
1528
- });
1529
- function _null(params) {
1530
- return _null$1(ZodMiniNull, params);
1531
- }
1532
- const ZodMiniUnknown = /* @__PURE__ */ $constructor("ZodMiniUnknown", (inst, def) => {
1533
- $ZodUnknown.init(inst, def);
1534
- ZodMiniType.init(inst, def);
1535
- });
1536
- function unknown() {
1537
- return _unknown(ZodMiniUnknown);
1538
- }
1539
- const ZodMiniDate = /* @__PURE__ */ $constructor("ZodMiniDate", (inst, def) => {
1540
- $ZodDate.init(inst, def);
1541
- ZodMiniType.init(inst, def);
1542
- });
1543
- function date(params) {
1544
- return _date(ZodMiniDate, params);
1545
- }
1546
- const ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
1547
- $ZodArray.init(inst, def);
1548
- ZodMiniType.init(inst, def);
1549
- });
1550
- function array(element, params) {
1551
- return new ZodMiniArray({
1552
- type: "array",
1553
- element,
1554
- ...normalizeParams(params)
1555
- });
1556
- }
1557
- const ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
1558
- $ZodObject.init(inst, def);
1559
- ZodMiniType.init(inst, def);
1560
- defineLazy(inst, "shape", () => def.shape);
1561
- });
1562
- function object(shape, params) {
1563
- return new ZodMiniObject({
1564
- type: "object",
1565
- shape: shape ?? {},
1566
- ...normalizeParams(params)
1567
- });
1568
- }
1569
- const ZodMiniUnion = /* @__PURE__ */ $constructor("ZodMiniUnion", (inst, def) => {
1570
- $ZodUnion.init(inst, def);
1571
- ZodMiniType.init(inst, def);
1572
- });
1573
- function union(options, params) {
1574
- return new ZodMiniUnion({
1575
- type: "union",
1576
- options,
1577
- ...normalizeParams(params)
1578
- });
1579
- }
1580
- const ZodMiniRecord = /* @__PURE__ */ $constructor("ZodMiniRecord", (inst, def) => {
1581
- $ZodRecord.init(inst, def);
1582
- ZodMiniType.init(inst, def);
1583
- });
1584
- function record(keyType, valueType, params) {
1585
- return new ZodMiniRecord({
1586
- type: "record",
1587
- keyType,
1588
- valueType,
1589
- ...normalizeParams(params)
1590
- });
1591
- }
1592
- const ZodMiniMap = /* @__PURE__ */ $constructor("ZodMiniMap", (inst, def) => {
1593
- $ZodMap.init(inst, def);
1594
- ZodMiniType.init(inst, def);
1595
- });
1596
- function map(keyType, valueType, params) {
1597
- return new ZodMiniMap({
1598
- type: "map",
1599
- keyType,
1600
- valueType,
1601
- ...normalizeParams(params)
1602
- });
1603
- }
1604
- const ZodMiniSet = /* @__PURE__ */ $constructor("ZodMiniSet", (inst, def) => {
1605
- $ZodSet.init(inst, def);
1606
- ZodMiniType.init(inst, def);
1607
- });
1608
- function set(valueType, params) {
1609
- return new ZodMiniSet({
1610
- type: "set",
1611
- valueType,
1612
- ...normalizeParams(params)
1613
- });
1614
- }
1615
- const ZodMiniLiteral = /* @__PURE__ */ $constructor("ZodMiniLiteral", (inst, def) => {
1616
- $ZodLiteral.init(inst, def);
1617
- ZodMiniType.init(inst, def);
1618
- });
1619
- function literal(value, params) {
1620
- return new ZodMiniLiteral({
1621
- type: "literal",
1622
- values: Array.isArray(value) ? value : [value],
1623
- ...normalizeParams(params)
1624
- });
1625
- }
1626
- const ZodMiniOptional = /* @__PURE__ */ $constructor("ZodMiniOptional", (inst, def) => {
1627
- $ZodOptional.init(inst, def);
1628
- ZodMiniType.init(inst, def);
1629
- });
1630
- function optional(innerType) {
1631
- return new ZodMiniOptional({
1632
- type: "optional",
1633
- innerType
1634
- });
1635
- }
1636
- const ZodMiniLazy = /* @__PURE__ */ $constructor("ZodMiniLazy", (inst, def) => {
1637
- $ZodLazy.init(inst, def);
1638
- ZodMiniType.init(inst, def);
1639
- });
1640
- function _lazy(getter) {
1641
- return new ZodMiniLazy({
1642
- type: "lazy",
1643
- getter
1644
- });
1645
- }
1646
- const importSchema = object({
1647
- __cc_import: literal(true),
1648
- path: string(),
1649
- name: optional(string())
1650
- });
1651
- function isImport(value) {
1652
- return value && value.__cc_import;
1653
- }
1654
- const literalSchema = union([
1655
- string(),
1656
- number(),
1657
- boolean(),
1658
- _null(),
1659
- _undefined(),
1660
- date(),
1661
- map(unknown(), unknown()),
1662
- set(unknown()),
1663
- bigint(),
1664
- importSchema
1665
- ]);
1666
- const schema = _lazy(() => union([
1667
- literalSchema,
1668
- array(schema),
1669
- record(string(), schema)
1670
- ]));
1671
- const extension = "js";
1672
- const serializableSchema = record(string(), schema);
1673
- function createImport(imp, variableName) {
1674
- return `import ${imp.name ? `{ ${imp.name} as ${variableName} }` : variableName} from "${imp.path}";\n`;
1675
- }
1676
- function serialize(value) {
1677
- let serializedValue = "";
1678
- let counter = 0;
1679
- function handleImports(item) {
1680
- if (item instanceof Object) Object.entries(item).forEach(([key, value$1]) => {
1681
- if (isImport(value$1)) {
1682
- counter++;
1683
- const variableName = `__v_${counter}`;
1684
- serializedValue += createImport(value$1, variableName);
1685
- item[key] = variableName;
1686
- } else if (value$1 instanceof Object) handleImports(value$1);
1687
- });
1688
- }
1689
- value.forEach(handleImports);
1690
- serializedValue += "\n";
1691
- const js = (0, import_serialize_javascript.default)(value, {
1692
- space: 2,
1693
- unsafe: true,
1694
- ignoreFunction: true
1695
- }).replace(/"__v_(\d+)"/g, (_, index) => {
1696
- return `__v_${index}`;
1697
- });
1698
- serializedValue += "export default " + js;
1699
- return serializedValue;
1700
- }
1701
- var TransformError = class extends Error {
1702
- type;
1703
- constructor(type, message) {
1704
- super(message);
1705
- this.type = type;
1706
- }
1707
- };
1708
- function isSkippedSignal(signal) {
1709
- return signal[skippedSymbol] === true;
1710
- }
1711
- function createPath(path$1, ext) {
1712
- let p = path$1.slice(0, -ext.length);
1713
- if (p.endsWith("/index")) p = p.slice(0, -6);
1714
- return p;
1715
- }
1716
- function isContentDefined(value) {
1717
- return value !== null && typeof value === "object" && "content" in value;
1718
- }
1719
- function createTransformer(emitter, cacheManager) {
1720
- const deprecatedWarnings = /* @__PURE__ */ new Set();
1721
- function warnImplicitContentProperty(collection) {
1722
- const key = `implicitContentProperty:${collection.name}`;
1723
- if (deprecatedWarnings.has(key)) return;
1724
- deprecatedWarnings.add(key);
1725
- deprecated("implicitContentProperty");
1726
- }
1727
- async function parseFile(collection, file) {
1728
- const { data, path: path$1 } = file;
1729
- const parsedData = await collection.schema["~standard"].validate(data);
1730
- if (parsedData.issues) {
1731
- emitter.emit("transformer:validation-error", {
1732
- collection,
1733
- file,
1734
- error: new TransformError("Validation", parsedData.issues.map((issue) => issue.message).join(", "))
1735
- });
1736
- return null;
1737
- }
1738
- let values = parsedData.value;
1739
- if (getParser(collection.parser).hasContent && !isContentDefined(values)) {
1740
- warnImplicitContentProperty(collection);
1741
- if (typeof data.content !== "string") {
1742
- emitter.emit("transformer:validation-error", {
1743
- collection,
1744
- file,
1745
- error: new TransformError("Validation", `The content property is not a string`)
1746
- });
1747
- return null;
1748
- }
1749
- values = {
1750
- ...values,
1751
- content: data.content
1752
- };
1753
- }
1754
- const ext = (0, node_path.extname)(path$1);
1755
- let extension$1 = ext;
1756
- if (extension$1.startsWith(".")) extension$1 = extension$1.slice(1);
1757
- return { document: {
1758
- ...values,
1759
- _meta: {
1760
- filePath: path$1,
1761
- fileName: (0, node_path.basename)(path$1),
1762
- directory: (0, node_path.dirname)(path$1),
1763
- extension: extension$1,
1764
- path: createPath(path$1, ext)
1765
- }
1766
- } };
1767
- }
1768
- async function parseCollection(collection) {
1769
- const promises = collection.files.map((file) => parseFile(collection, file));
1770
- return {
1771
- ...collection,
1772
- documents: (await Promise.all(promises)).filter(isDefined)
1773
- };
1774
- }
1775
- function createContext(collections, collection, cache) {
1776
- return {
1777
- documents: (collection$1) => {
1778
- const resolved = collections.find((c) => c.name === collection$1.name);
1779
- if (!resolved) throw new TransformError("Configuration", `Collection ${collection$1.name} not found, do you have registered it in your configuration?`);
1780
- return resolved.documents.map((doc) => doc.document);
1781
- },
1782
- collection: {
1783
- name: collection.name,
1784
- directory: collection.directory,
1785
- documents: async () => {
1786
- return collection.documents.map((doc) => doc.document);
1787
- }
1788
- },
1789
- cache: cache.cacheFn,
1790
- skip: (reason) => ({
1791
- [skippedSymbol]: true,
1792
- reason
1793
- })
1794
- };
1795
- }
1796
- async function transformDocument(collections, collection, transform, doc) {
1797
- const cache = cacheManager.cache(collection.name, doc.document._meta.path);
1798
- const context = createContext(collections, collection, cache);
1799
- try {
1800
- const document = await transform(doc.document, context);
1801
- await cache.tidyUp();
1802
- if (isSkippedSignal(document)) emitter.emit("transformer:document-skipped", {
1803
- collection,
1804
- filePath: (0, node_path.join)(collection.directory, doc.document._meta.filePath),
1805
- reason: document.reason
1806
- });
1807
- else return {
1808
- ...doc,
1809
- document
1810
- };
1811
- } catch (error) {
1812
- if (error instanceof TransformError) emitter.emit("transformer:error", {
1813
- collection,
1814
- error
1815
- });
1816
- else emitter.emit("transformer:error", {
1817
- collection,
1818
- error: new TransformError("Transform", String(error))
1819
- });
1820
- }
1821
- }
1822
- async function transformCollection(collections, collection) {
1823
- const transform = collection.transform;
1824
- if (transform) {
1825
- const limit = require_index$5.default(node_os.default.cpus().length);
1826
- const docs = collection.documents.map((doc) => limit(() => transformDocument(collections, collection, transform, doc)));
1827
- const transformed = await Promise.all(docs);
1828
- await cacheManager.flush();
1829
- return transformed.filter(isDefined);
1830
- }
1831
- return collection.documents;
1832
- }
1833
- async function validateDocuments(collection, documents) {
1834
- const docs = [];
1835
- for (const doc of documents) {
1836
- let parsedData = await serializableSchema.safeParseAsync(doc.document);
1837
- if (parsedData.success) docs.push(doc);
1838
- else emitter.emit("transformer:result-error", {
1839
- collection,
1840
- document: doc.document,
1841
- error: new TransformError("Result", parsedData.error.message)
1842
- });
1843
- }
1844
- return docs;
1845
- }
1846
- return async (untransformedCollections) => {
1847
- const promises = untransformedCollections.map((collection) => parseCollection(collection));
1848
- const collections = await Promise.all(promises);
1849
- for (const collection of collections) collection.documents = await validateDocuments(collection, await transformCollection(collections, collection));
1850
- return collections;
1851
- };
1852
- }
1853
- function createArrayConstName(name) {
1854
- return "all" + (0, pluralize.default)(name.charAt(0).toUpperCase() + name.slice(1));
1855
- }
1856
- async function createDataFile(directory, collection) {
1857
- const dataPath = node_path.default.join(directory, `${createArrayConstName(collection.name)}.${extension}`);
1858
- await node_fs_promises.default.writeFile(dataPath, serialize(collection.documents.map((doc) => doc.document)));
1859
- }
1860
- function createDataFiles(directory, collections) {
1861
- return Promise.all(collections.map((collection) => createDataFile(directory, collection)));
1862
- }
1863
- async function createJavaScriptFile(directory, configuration) {
1864
- const collections = configuration.collections.map(({ name }) => createArrayConstName(name));
1865
- let content = `// generated by content-collections at ${/* @__PURE__ */ new Date()}\n\n`;
1866
- for (const name of collections) content += `import ${name} from "./${name}.${extension}";\n`;
1867
- content += "\n";
1868
- content += "export { " + collections.join(", ") + " };\n";
1869
- await node_fs_promises.default.writeFile(node_path.default.join(directory, "index.js"), content, "utf-8");
1870
- }
1871
- function createImportPath(directory, target) {
1872
- let importPath = node_path.default.posix.join(...node_path.default.relative(directory, target).split(node_path.default.sep));
1873
- if (!importPath.startsWith(".")) importPath = "./" + importPath;
1874
- return importPath;
1875
- }
1876
- async function createTypeDefinitionFile(directory, configuration) {
1877
- if (!configuration.generateTypes) return;
1878
- let content = `import configuration from "${createImportPath(directory, configuration.path)}";
1879
- import { GetTypeByName } from "@content-collections/core";
1880
- `;
1881
- const collections = configuration.collections;
1882
- for (const collection of collections) {
1883
- content += `\n`;
1884
- content += `export type ${collection.typeName} = GetTypeByName<typeof configuration, "${collection.name}">;\n`;
1885
- content += `export declare const ${createArrayConstName(collection.name)}: Array<${collection.typeName}>;\n`;
1886
- }
1887
- content += "\n";
1888
- content += "export {};\n";
1889
- await node_fs_promises.default.writeFile(node_path.default.join(directory, "index.d.ts"), content, "utf-8");
1890
- }
1891
- async function createWriter(directory) {
1892
- await node_fs_promises.default.mkdir(directory, { recursive: true });
1893
- return {
1894
- createJavaScriptFile: (configuration) => createJavaScriptFile(directory, configuration),
1895
- createTypeDefinitionFile: (configuration) => createTypeDefinitionFile(directory, configuration),
1896
- createDataFiles: (collections) => createDataFiles(directory, collections)
1897
- };
1898
- }
1899
- async function createBuildContext({ emitter, outputDirectory, baseDirectory, configuration }) {
1900
- const collector = createCollector(emitter, baseDirectory);
1901
- const [writer, resolved, cacheManager] = await Promise.all([
1902
- createWriter(outputDirectory),
1903
- collector.collect(configuration.collections),
1904
- createCacheManager(baseDirectory, configuration.checksum)
1905
- ]);
1906
- return {
1907
- resolved,
1908
- writer,
1909
- synchronizer: createSynchronizer(collector.collectFile, resolved, baseDirectory),
1910
- transform: createTransformer(emitter, cacheManager),
1911
- emitter,
1912
- cacheManager,
1913
- configuration
1914
- };
1915
- }
1916
- async function build$1({ emitter, transform, resolved, writer, configuration }) {
1917
- const startedAt = Date.now();
1918
- emitter.emit("builder:start", { startedAt });
1919
- const collections = await transform(resolved);
1920
- await Promise.all([
1921
- writer.createDataFiles(collections),
1922
- writer.createTypeDefinitionFile(configuration),
1923
- writer.createJavaScriptFile(configuration)
1924
- ]);
1925
- const pendingOnSuccess = collections.filter((collection) => Boolean(collection.onSuccess)).map((collection) => collection.onSuccess?.(collection.documents.map((doc) => doc.document)));
1926
- await Promise.all(pendingOnSuccess.filter(isDefined));
1927
- const stats = collections.reduce((acc, collection) => {
1928
- acc.collections++;
1929
- acc.documents += collection.documents.length;
1930
- return acc;
1931
- }, {
1932
- collections: 0,
1933
- documents: 0
1934
- });
1935
- emitter.emit("builder:end", {
1936
- startedAt,
1937
- endedAt: Date.now(),
1938
- stats
1939
- });
1940
- }
1941
-
1942
- //#endregion
1943
- exports.build$1 = build$1;
1944
- exports.createBuildContext = createBuildContext;
1945
- exports.createConfigurationReader = createConfigurationReader;
1946
- exports.serialize = serialize;