@powerlines/plugin-env 0.15.161 → 0.15.162

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 (346) hide show
  1. package/dist/{chunk-CNVrAnJR.cjs → _virtual/rolldown_runtime.cjs} +3 -18
  2. package/dist/{chunk-CsF2CmBJ.mjs → _virtual/rolldown_runtime.mjs} +1 -1
  3. package/dist/babel/index.cjs +2 -5
  4. package/dist/babel/index.d.cts +1 -14
  5. package/dist/babel/index.d.mts +1 -14
  6. package/dist/babel/index.mjs +1 -4
  7. package/dist/babel/plugin.cjs +140 -4
  8. package/dist/babel/plugin.d.cts +9 -15
  9. package/dist/babel/plugin.d.cts.map +1 -0
  10. package/dist/babel/plugin.d.mts +9 -15
  11. package/dist/babel/plugin.d.mts.map +1 -0
  12. package/dist/babel/plugin.mjs +140 -4
  13. package/dist/babel/plugin.mjs.map +1 -0
  14. package/dist/components/docs.cjs +66 -6
  15. package/dist/components/docs.d.cts +25 -2
  16. package/dist/components/docs.d.cts.map +1 -0
  17. package/dist/components/docs.d.mts +25 -2
  18. package/dist/components/docs.d.mts.map +1 -0
  19. package/dist/components/docs.mjs +66 -6
  20. package/dist/components/docs.mjs.map +1 -0
  21. package/dist/components/env.cjs +582 -11
  22. package/dist/components/env.d.cts +23 -2
  23. package/dist/components/env.d.cts.map +1 -0
  24. package/dist/components/env.d.mts +23 -2
  25. package/dist/components/env.d.mts.map +1 -0
  26. package/dist/components/env.mjs +581 -10
  27. package/dist/components/env.mjs.map +1 -0
  28. package/dist/components/index.cjs +5 -15
  29. package/dist/components/index.d.cts +2 -3
  30. package/dist/components/index.d.mts +2 -3
  31. package/dist/components/index.mjs +2 -12
  32. package/dist/helpers/automd-generator.cjs +31 -3
  33. package/dist/helpers/automd-generator.mjs +31 -3
  34. package/dist/helpers/automd-generator.mjs.map +1 -0
  35. package/dist/helpers/create-reflection-resource.cjs +21 -4
  36. package/dist/helpers/create-reflection-resource.d.cts +14 -4
  37. package/dist/helpers/create-reflection-resource.d.cts.map +1 -0
  38. package/dist/helpers/create-reflection-resource.d.mts +14 -4
  39. package/dist/helpers/create-reflection-resource.d.mts.map +1 -0
  40. package/dist/helpers/create-reflection-resource.mjs +22 -4
  41. package/dist/helpers/create-reflection-resource.mjs.map +1 -0
  42. package/dist/helpers/docs-helper.cjs +22 -5
  43. package/dist/helpers/docs-helper.d.cts +1 -2
  44. package/dist/helpers/docs-helper.d.cts.map +1 -1
  45. package/dist/helpers/docs-helper.d.mts +1 -2
  46. package/dist/helpers/docs-helper.d.mts.map +1 -1
  47. package/dist/helpers/docs-helper.mjs +23 -5
  48. package/dist/helpers/docs-helper.mjs.map +1 -0
  49. package/dist/helpers/index.cjs +32 -38
  50. package/dist/helpers/index.d.cts +6 -9
  51. package/dist/helpers/index.d.mts +6 -9
  52. package/dist/helpers/index.mjs +6 -12
  53. package/dist/helpers/load.cjs +133 -10
  54. package/dist/helpers/load.d.cts +36 -4
  55. package/dist/helpers/load.d.cts.map +1 -0
  56. package/dist/helpers/load.d.mts +36 -4
  57. package/dist/helpers/load.d.mts.map +1 -0
  58. package/dist/helpers/load.mjs +132 -9
  59. package/dist/helpers/load.mjs.map +1 -0
  60. package/dist/helpers/persistence.cjs +321 -15
  61. package/dist/helpers/persistence.d.cts +85 -4
  62. package/dist/helpers/persistence.d.cts.map +1 -0
  63. package/dist/helpers/persistence.d.mts +85 -4
  64. package/dist/helpers/persistence.d.mts.map +1 -0
  65. package/dist/helpers/persistence.mjs +310 -5
  66. package/dist/helpers/persistence.mjs.map +1 -0
  67. package/dist/helpers/reflect.cjs +262 -13
  68. package/dist/helpers/reflect.d.cts +47 -4
  69. package/dist/helpers/reflect.d.cts.map +1 -0
  70. package/dist/helpers/reflect.d.mts +47 -4
  71. package/dist/helpers/reflect.d.mts.map +1 -0
  72. package/dist/helpers/reflect.mjs +254 -5
  73. package/dist/helpers/reflect.mjs.map +1 -0
  74. package/dist/helpers/source-file-env.cjs +57 -3
  75. package/dist/helpers/source-file-env.d.cts +9 -2
  76. package/dist/helpers/source-file-env.d.cts.map +1 -0
  77. package/dist/helpers/source-file-env.d.mts +9 -2
  78. package/dist/helpers/source-file-env.d.mts.map +1 -0
  79. package/dist/helpers/source-file-env.mjs +56 -2
  80. package/dist/helpers/source-file-env.mjs.map +1 -0
  81. package/dist/helpers/template-helpers.cjs +69 -6
  82. package/dist/helpers/template-helpers.d.cts +16 -4
  83. package/dist/helpers/template-helpers.d.cts.map +1 -0
  84. package/dist/helpers/template-helpers.d.mts +16 -4
  85. package/dist/helpers/template-helpers.d.mts.map +1 -0
  86. package/dist/helpers/template-helpers.mjs +69 -6
  87. package/dist/helpers/template-helpers.mjs.map +1 -0
  88. package/dist/index.cjs +98 -258
  89. package/dist/index.d.cts +25 -15
  90. package/dist/index.d.cts.map +1 -0
  91. package/dist/index.d.mts +25 -15
  92. package/dist/index.d.mts.map +1 -0
  93. package/dist/index.mjs +22 -182
  94. package/dist/index.mjs.map +1 -1
  95. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.cjs +37 -0
  96. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs +38 -0
  97. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +1 -0
  98. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.cjs +15 -0
  99. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs +15 -0
  100. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs.map +1 -0
  101. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +15 -0
  102. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +15 -0
  103. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +1 -0
  104. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +3 -0
  105. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +5 -0
  106. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
  107. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +7 -0
  108. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +1 -0
  109. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +1 -0
  110. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +3 -0
  111. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +19 -0
  112. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +20 -0
  113. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +1 -0
  114. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +63 -0
  115. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +64 -0
  116. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +1 -0
  117. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
  118. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +12 -0
  119. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +1 -0
  120. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +15 -0
  121. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +17 -0
  122. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +1 -0
  123. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.cjs +32 -0
  124. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs +33 -0
  125. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs.map +1 -0
  126. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.cjs +28 -0
  127. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs +29 -0
  128. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs.map +1 -0
  129. package/dist/{join-paths-B0RBTuuw.cjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.cjs} +13 -65
  130. package/dist/{join-paths-Dd9KxuyL.mjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs} +5 -45
  131. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -0
  132. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.cjs +12 -0
  133. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs +9 -0
  134. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs.map +1 -0
  135. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.cjs +15 -0
  136. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs +15 -0
  137. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs.map +1 -0
  138. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +346 -0
  139. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +347 -0
  140. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs.map +1 -0
  141. package/dist/{json5-DEV_07Nb.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs} +1 -1
  142. package/dist/{json5-jq90mF9X.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs} +2 -2
  143. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs.map +1 -0
  144. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +3 -0
  145. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +3 -0
  146. package/dist/{confbox.DA7CpUDY-DShUZ_rW.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs} +2 -2
  147. package/dist/{confbox.DA7CpUDY-r6FXRsI6.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs} +2 -7
  148. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs.map +1 -0
  149. package/dist/{confbox.DnMsyigM-C13n3X-S.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs} +3 -13
  150. package/dist/{confbox.DnMsyigM-V6Wj0LPC.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs} +3 -3
  151. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs.map +1 -0
  152. package/dist/{toml-DvrxV201.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs} +1 -1
  153. package/dist/{toml-uuOYvEAO.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs} +2 -2
  154. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs.map +1 -0
  155. package/dist/{yaml-CQSFMRMS.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs} +1 -1
  156. package/dist/{yaml-CIn2Gddw.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs} +2 -2
  157. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs.map +1 -0
  158. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  159. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +43 -0
  160. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +1 -0
  161. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
  162. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +46 -0
  163. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +1 -0
  164. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +288 -0
  165. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +286 -0
  166. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs.map +1 -0
  167. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +71 -0
  168. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +69 -0
  169. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs.map +1 -0
  170. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
  171. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1008 -0
  172. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -0
  173. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +23 -0
  174. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +14 -0
  175. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +1 -0
  176. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +2698 -0
  177. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +2686 -0
  178. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -0
  179. package/dist/{load-CC_Pu2Om.cjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs} +195 -2332
  180. package/dist/{load-EM4edkA2.mjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs} +195 -2319
  181. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -0
  182. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +29 -0
  183. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +30 -0
  184. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +1 -0
  185. package/dist/{multipart-parser-aEF5a4Xf.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs} +8 -5
  186. package/dist/{multipart-parser-D65rtMfY.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs} +4 -3
  187. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -0
  188. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +22 -0
  189. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +18 -0
  190. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +1 -0
  191. package/dist/{node-Co8KdzkZ.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs} +796 -814
  192. package/dist/{node-D9MigVDD.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs} +795 -807
  193. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -0
  194. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +11768 -0
  195. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +11764 -0
  196. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -0
  197. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +25 -0
  198. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +21 -0
  199. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs.map +1 -0
  200. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +20 -0
  201. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +18 -0
  202. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +1 -0
  203. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.cjs +194 -0
  204. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs +192 -0
  205. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs.map +1 -0
  206. package/dist/{dist-BQc8ZRwl.cjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs} +1 -1
  207. package/dist/{dist-mV5Swt78.mjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs} +1 -1
  208. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +1 -0
  209. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +3 -0
  210. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +3 -0
  211. package/dist/{defu-DV5Grr85.mjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs} +8 -43
  212. package/dist/{defu-CrqNIh1A.cjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs} +2 -90
  213. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +1 -0
  214. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +127 -0
  215. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +126 -0
  216. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -0
  217. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +138 -0
  218. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +137 -0
  219. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -0
  220. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +629 -0
  221. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +628 -0
  222. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -0
  223. package/dist/types/index.cjs +9 -10
  224. package/dist/types/index.d.cts +2 -3
  225. package/dist/types/index.d.mts +2 -3
  226. package/dist/types/index.mjs +2 -3
  227. package/dist/types/plugin.cjs +133 -7
  228. package/dist/types/plugin.d.cts +155 -3
  229. package/dist/types/plugin.d.cts.map +1 -0
  230. package/dist/types/plugin.d.mts +155 -3
  231. package/dist/types/plugin.d.mts.map +1 -0
  232. package/dist/types/plugin.mjs +129 -3
  233. package/dist/types/plugin.mjs.map +1 -0
  234. package/dist/types/runtime.cjs +242 -3
  235. package/dist/types/runtime.d.cts +792 -2
  236. package/dist/{runtime-BDzzR4wH.d.cts.map → types/runtime.d.cts.map} +1 -1
  237. package/dist/types/runtime.d.mts +792 -2
  238. package/dist/{runtime-lYSIZdMn.d.mts.map → types/runtime.d.mts.map} +1 -1
  239. package/dist/types/runtime.mjs +241 -2
  240. package/dist/types/runtime.mjs.map +1 -0
  241. package/package.json +9 -9
  242. package/dist/automd-generator-BpvZRK0k.mjs +0 -32
  243. package/dist/automd-generator-BpvZRK0k.mjs.map +0 -1
  244. package/dist/automd-generator-CxG1owAE.cjs +0 -37
  245. package/dist/babel-BZqmdVF4.cjs +0 -0
  246. package/dist/babel-DgietUY3.mjs +0 -1
  247. package/dist/components-BUo6Koax.cjs +0 -0
  248. package/dist/components-DDFmImcI.mjs +0 -1
  249. package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs.map +0 -1
  250. package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs.map +0 -1
  251. package/dist/create-reflection-resource-3svZm2rY.d.cts +0 -14
  252. package/dist/create-reflection-resource-3svZm2rY.d.cts.map +0 -1
  253. package/dist/create-reflection-resource-CCpA76Yq.d.mts +0 -14
  254. package/dist/create-reflection-resource-CCpA76Yq.d.mts.map +0 -1
  255. package/dist/create-reflection-resource-D0QrD1Td.mjs +0 -23
  256. package/dist/create-reflection-resource-D0QrD1Td.mjs.map +0 -1
  257. package/dist/create-reflection-resource-d2zdTyOE.cjs +0 -27
  258. package/dist/defu-DV5Grr85.mjs.map +0 -1
  259. package/dist/dist-C_a6goTt.cjs +0 -15282
  260. package/dist/dist-CjWvISyq.mjs +0 -15271
  261. package/dist/dist-CjWvISyq.mjs.map +0 -1
  262. package/dist/dist-mV5Swt78.mjs.map +0 -1
  263. package/dist/docs-BAKwE4PJ.d.cts +0 -25
  264. package/dist/docs-BAKwE4PJ.d.cts.map +0 -1
  265. package/dist/docs-CVf-w8oz.d.mts +0 -25
  266. package/dist/docs-CVf-w8oz.d.mts.map +0 -1
  267. package/dist/docs-E0aCTO7H.cjs +0 -72
  268. package/dist/docs-WdCIcQmw.mjs +0 -67
  269. package/dist/docs-WdCIcQmw.mjs.map +0 -1
  270. package/dist/docs-helper-BSYSI2cH.mjs +0 -24
  271. package/dist/docs-helper-BSYSI2cH.mjs.map +0 -1
  272. package/dist/docs-helper-BWe1dt1m.cjs +0 -28
  273. package/dist/env-BSCEigpj.cjs +0 -593
  274. package/dist/env-D0KBPuAd.d.mts +0 -23
  275. package/dist/env-D0KBPuAd.d.mts.map +0 -1
  276. package/dist/env-DqI7dwC-.mjs +0 -582
  277. package/dist/env-DqI7dwC-.mjs.map +0 -1
  278. package/dist/env-DwM7pJm7.d.cts +0 -23
  279. package/dist/env-DwM7pJm7.d.cts.map +0 -1
  280. package/dist/helpers-45e1bvAO.mjs +0 -1
  281. package/dist/helpers-DgYP3uej.cjs +0 -0
  282. package/dist/index-BNRXMhlr.d.mts +0 -1
  283. package/dist/index-Bdi8CvaN.d.cts +0 -16
  284. package/dist/index-Bdi8CvaN.d.cts.map +0 -1
  285. package/dist/index-CEDY7cmG.d.cts +0 -1
  286. package/dist/index-CREkvfw9.d.mts +0 -1
  287. package/dist/index-DSiHnMH2.d.cts +0 -1
  288. package/dist/index-Drhzdkqe.d.mts +0 -16
  289. package/dist/index-Drhzdkqe.d.mts.map +0 -1
  290. package/dist/index-dhjtMp5F.d.mts +0 -1
  291. package/dist/index-uTS5iDq_.d.cts +0 -1
  292. package/dist/join-paths-Dd9KxuyL.mjs.map +0 -1
  293. package/dist/json5-jq90mF9X.mjs.map +0 -1
  294. package/dist/jsonc-CBh70baJ.cjs +0 -4
  295. package/dist/jsonc-CDLU6bgi.mjs +0 -4
  296. package/dist/load-EM4edkA2.mjs.map +0 -1
  297. package/dist/load-GpP6cojj.d.mts +0 -36
  298. package/dist/load-GpP6cojj.d.mts.map +0 -1
  299. package/dist/load-PHGmxX_X.d.cts +0 -36
  300. package/dist/load-PHGmxX_X.d.cts.map +0 -1
  301. package/dist/multipart-parser-D65rtMfY.mjs.map +0 -1
  302. package/dist/node-D9MigVDD.mjs.map +0 -1
  303. package/dist/persistence-5S3EirDm.mjs +0 -586
  304. package/dist/persistence-5S3EirDm.mjs.map +0 -1
  305. package/dist/persistence-BR4cUaN6.d.cts +0 -85
  306. package/dist/persistence-BR4cUaN6.d.cts.map +0 -1
  307. package/dist/persistence-DrKQZNCv.d.mts +0 -85
  308. package/dist/persistence-DrKQZNCv.d.mts.map +0 -1
  309. package/dist/persistence-DzS7SzMj.cjs +0 -712
  310. package/dist/plugin-CM1TSv1B.cjs +0 -159
  311. package/dist/plugin-CSVnrdpE.cjs +0 -146
  312. package/dist/plugin-CSe5f2cD.d.cts +0 -155
  313. package/dist/plugin-CSe5f2cD.d.cts.map +0 -1
  314. package/dist/plugin-DMbVjdcQ.d.mts +0 -155
  315. package/dist/plugin-DMbVjdcQ.d.mts.map +0 -1
  316. package/dist/plugin-Vyvy9w9Z.mjs +0 -141
  317. package/dist/plugin-Vyvy9w9Z.mjs.map +0 -1
  318. package/dist/plugin-eBjQJP6x.mjs +0 -130
  319. package/dist/plugin-eBjQJP6x.mjs.map +0 -1
  320. package/dist/reflect-Dm8a3c29.d.cts +0 -47
  321. package/dist/reflect-Dm8a3c29.d.cts.map +0 -1
  322. package/dist/reflect-Dpz8ifa0.d.mts +0 -47
  323. package/dist/reflect-Dpz8ifa0.d.mts.map +0 -1
  324. package/dist/runtime-BDzzR4wH.d.cts +0 -792
  325. package/dist/runtime-C5ukCv3P.mjs +0 -242
  326. package/dist/runtime-C5ukCv3P.mjs.map +0 -1
  327. package/dist/runtime-g0TEIoZK.cjs +0 -253
  328. package/dist/runtime-lYSIZdMn.d.mts +0 -792
  329. package/dist/source-file-env-4Vdtzc5-.cjs +0 -68
  330. package/dist/source-file-env-Brfopjyr.d.cts +0 -9
  331. package/dist/source-file-env-Brfopjyr.d.cts.map +0 -1
  332. package/dist/source-file-env-DWejSP2U.d.mts +0 -9
  333. package/dist/source-file-env-DWejSP2U.d.mts.map +0 -1
  334. package/dist/source-file-env-Tj-6qobx.mjs +0 -57
  335. package/dist/source-file-env-Tj-6qobx.mjs.map +0 -1
  336. package/dist/template-helpers-1SKodHKt.d.mts +0 -16
  337. package/dist/template-helpers-1SKodHKt.d.mts.map +0 -1
  338. package/dist/template-helpers-Cw8aba1r.mjs +0 -70
  339. package/dist/template-helpers-Cw8aba1r.mjs.map +0 -1
  340. package/dist/template-helpers-DoFoTIAC.cjs +0 -75
  341. package/dist/template-helpers-zyitPfMz.d.cts +0 -16
  342. package/dist/template-helpers-zyitPfMz.d.cts.map +0 -1
  343. package/dist/toml-uuOYvEAO.mjs.map +0 -1
  344. package/dist/types-DyPQho_C.mjs +0 -1
  345. package/dist/types-o3zWarRp.cjs +0 -0
  346. package/dist/yaml-CIn2Gddw.mjs.map +0 -1
@@ -1,4 +1,3 @@
1
-
2
1
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
3
2
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
4
3
  function normalizeWindowsPath(input = "") {
@@ -136,92 +135,5 @@ const basename = function(p, extension) {
136
135
  };
137
136
 
138
137
  //#endregion
139
- //#region ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
140
- function isPlainObject(value) {
141
- if (value === null || typeof value !== "object") return false;
142
- const prototype = Object.getPrototypeOf(value);
143
- if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
144
- if (Symbol.iterator in value) return false;
145
- if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
146
- return true;
147
- }
148
- function _defu(baseObject, defaults, namespace = ".", merger) {
149
- if (!isPlainObject(defaults)) return _defu(baseObject, {}, namespace, merger);
150
- const object = Object.assign({}, defaults);
151
- for (const key in baseObject) {
152
- if (key === "__proto__" || key === "constructor") continue;
153
- const value = baseObject[key];
154
- if (value === null || value === void 0) continue;
155
- if (merger && merger(object, key, value, namespace)) continue;
156
- if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
157
- else if (isPlainObject(value) && isPlainObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
158
- else object[key] = value;
159
- }
160
- return object;
161
- }
162
- function createDefu(merger) {
163
- return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
164
- }
165
- const defu = createDefu();
166
- const defuFn = createDefu((object, key, currentValue) => {
167
- if (object[key] !== void 0 && typeof currentValue === "function") {
168
- object[key] = currentValue(object[key]);
169
- return true;
170
- }
171
- });
172
- const defuArrayFn = createDefu((object, key, currentValue) => {
173
- if (Array.isArray(object[key]) && typeof currentValue === "function") {
174
- object[key] = currentValue(object[key]);
175
- return true;
176
- }
177
- });
178
-
179
- //#endregion
180
- Object.defineProperty(exports, 'basename', {
181
- enumerable: true,
182
- get: function () {
183
- return basename;
184
- }
185
- });
186
- Object.defineProperty(exports, 'defu', {
187
- enumerable: true,
188
- get: function () {
189
- return defu;
190
- }
191
- });
192
- Object.defineProperty(exports, 'dirname', {
193
- enumerable: true,
194
- get: function () {
195
- return dirname;
196
- }
197
- });
198
- Object.defineProperty(exports, 'extname', {
199
- enumerable: true,
200
- get: function () {
201
- return extname;
202
- }
203
- });
204
- Object.defineProperty(exports, 'isAbsolute', {
205
- enumerable: true,
206
- get: function () {
207
- return isAbsolute;
208
- }
209
- });
210
- Object.defineProperty(exports, 'join', {
211
- enumerable: true,
212
- get: function () {
213
- return join;
214
- }
215
- });
216
- Object.defineProperty(exports, 'normalize', {
217
- enumerable: true,
218
- get: function () {
219
- return normalize;
220
- }
221
- });
222
- Object.defineProperty(exports, 'resolve', {
223
- enumerable: true,
224
- get: function () {
225
- return resolve;
226
- }
227
- });
138
+ export { basename, dirname, extname, isAbsolute, join, normalize, resolve };
139
+ //# sourceMappingURL=pathe.M-eThtNZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathe.M-eThtNZ.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs"],"sourcesContent":["let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: \"${a}\"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,\"y\"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,\"0\")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,a)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${a.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),Or=i(\"}\",\")\"),Rr=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),zr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>R(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,t?\"/\":\"\");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n if (!_match) {\n _match = _lazyMatch();\n _lazyMatch = null;\n }\n return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return normalize(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\nconst matchesGlob = (path, pattern) => {\n return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n __proto__: null,\n basename: basename,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n matchesGlob: matchesGlob,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n"],"x_google_ignoreList":[0],"mappings":"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"}
@@ -0,0 +1,127 @@
1
+ const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_pathe_M_eThtNZ = require('../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs');
3
+ const require_index = require('../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.cjs');
4
+ const require_confbox_DnMsyigM = require('../../../../confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs');
5
+ let node_fs = require("node:fs");
6
+ let node_fs_promises = require("node:fs/promises");
7
+ let node_url = require("node:url");
8
+
9
+ //#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
10
+ const defaultFindOptions = {
11
+ startingFrom: ".",
12
+ rootPattern: /^node_modules$/,
13
+ reverse: false,
14
+ test: (filePath) => {
15
+ try {
16
+ if ((0, node_fs.statSync)(filePath).isFile()) return true;
17
+ } catch {}
18
+ }
19
+ };
20
+ async function findFile(filename, _options = {}) {
21
+ const filenames = Array.isArray(filename) ? filename : [filename];
22
+ const options = {
23
+ ...defaultFindOptions,
24
+ ..._options
25
+ };
26
+ const basePath = require_pathe_M_eThtNZ.resolve(options.startingFrom);
27
+ const leadingSlash = basePath[0] === "/";
28
+ const segments = basePath.split("/").filter(Boolean);
29
+ if (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;
30
+ if (leadingSlash) segments[0] = "/" + segments[0];
31
+ let root = segments.findIndex((r) => r.match(options.rootPattern));
32
+ if (root === -1) root = 0;
33
+ if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
34
+ const filePath = require_pathe_M_eThtNZ.join(...segments.slice(0, index), filename2);
35
+ if (await options.test(filePath)) return filePath;
36
+ }
37
+ else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
38
+ const filePath = require_pathe_M_eThtNZ.join(...segments.slice(0, index), filename2);
39
+ if (await options.test(filePath)) return filePath;
40
+ }
41
+ throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
42
+ }
43
+ function findNearestFile(filename, options = {}) {
44
+ return findFile(filename, options);
45
+ }
46
+ function _resolvePath(id, opts = {}) {
47
+ if (id instanceof URL || id.startsWith("file://")) return require_pathe_M_eThtNZ.normalize((0, node_url.fileURLToPath)(id));
48
+ if (require_pathe_M_eThtNZ.isAbsolute(id)) return require_pathe_M_eThtNZ.normalize(id);
49
+ return require_index.resolveModulePath(id, {
50
+ ...opts,
51
+ from: opts.from || opts.parent || opts.url
52
+ });
53
+ }
54
+ const lockFiles = [
55
+ "yarn.lock",
56
+ "package-lock.json",
57
+ "pnpm-lock.yaml",
58
+ "npm-shrinkwrap.json",
59
+ "bun.lockb",
60
+ "bun.lock",
61
+ "deno.lock"
62
+ ];
63
+ const packageFiles = [
64
+ "package.json",
65
+ "package.json5",
66
+ "package.yaml"
67
+ ];
68
+ const workspaceFiles = [
69
+ "pnpm-workspace.yaml",
70
+ "lerna.json",
71
+ "turbo.json",
72
+ "rush.json",
73
+ "deno.json",
74
+ "deno.jsonc"
75
+ ];
76
+ const FileCache = /* @__PURE__ */ new Map();
77
+ async function readPackageJSON(id, options = {}) {
78
+ const resolvedPath = await resolvePackageJSON(id, options);
79
+ const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache;
80
+ if (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);
81
+ const blob = await node_fs.promises.readFile(resolvedPath, "utf8");
82
+ let parsed;
83
+ try {
84
+ parsed = require_confbox_DnMsyigM.x(blob);
85
+ } catch {
86
+ parsed = require_confbox_DnMsyigM.h(blob);
87
+ }
88
+ cache.set(resolvedPath, parsed);
89
+ return parsed;
90
+ }
91
+ async function resolvePackageJSON(id = process.cwd(), options = {}) {
92
+ return findNearestFile("package.json", {
93
+ ...options,
94
+ startingFrom: _resolvePath(id, options)
95
+ });
96
+ }
97
+ const workspaceTests = {
98
+ workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => require_pathe_M_eThtNZ.dirname(r)),
99
+ gitConfig: (opts) => findFile(".git/config", opts).then((r) => require_pathe_M_eThtNZ.resolve(r, "../..")),
100
+ lockFile: (opts) => findFile(lockFiles, opts).then((r) => require_pathe_M_eThtNZ.dirname(r)),
101
+ packageJson: (opts) => findFile(packageFiles, opts).then((r) => require_pathe_M_eThtNZ.dirname(r))
102
+ };
103
+ async function findWorkspaceDir(id = process.cwd(), options = {}) {
104
+ const startingFrom = _resolvePath(id, options);
105
+ const tests = options.tests || [
106
+ "workspaceFile",
107
+ "gitConfig",
108
+ "lockFile",
109
+ "packageJson"
110
+ ];
111
+ for (const testName of tests) {
112
+ const test = workspaceTests[testName];
113
+ if (options[testName] === false || !test) continue;
114
+ const direction = options[testName] || (testName === "gitConfig" ? "closest" : "furthest");
115
+ const detected = await test({
116
+ ...options,
117
+ startingFrom,
118
+ reverse: direction === "furthest"
119
+ }).catch(() => {});
120
+ if (detected) return detected;
121
+ }
122
+ throw new Error(`Cannot detect workspace root from ${id}`);
123
+ }
124
+
125
+ //#endregion
126
+ exports.findWorkspaceDir = findWorkspaceDir;
127
+ exports.readPackageJSON = readPackageJSON;
@@ -0,0 +1,126 @@
1
+ import { dirname, isAbsolute, join, normalize, resolve } from "../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
2
+ import { resolveModulePath } from "../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.mjs";
3
+ import { h, x } from "../../../../confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs";
4
+ import { promises, statSync } from "node:fs";
5
+ import { readFile, writeFile } from "node:fs/promises";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ //#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
9
+ const defaultFindOptions = {
10
+ startingFrom: ".",
11
+ rootPattern: /^node_modules$/,
12
+ reverse: false,
13
+ test: (filePath) => {
14
+ try {
15
+ if (statSync(filePath).isFile()) return true;
16
+ } catch {}
17
+ }
18
+ };
19
+ async function findFile(filename, _options = {}) {
20
+ const filenames = Array.isArray(filename) ? filename : [filename];
21
+ const options = {
22
+ ...defaultFindOptions,
23
+ ..._options
24
+ };
25
+ const basePath = resolve(options.startingFrom);
26
+ const leadingSlash = basePath[0] === "/";
27
+ const segments = basePath.split("/").filter(Boolean);
28
+ if (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;
29
+ if (leadingSlash) segments[0] = "/" + segments[0];
30
+ let root = segments.findIndex((r) => r.match(options.rootPattern));
31
+ if (root === -1) root = 0;
32
+ if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
33
+ const filePath = join(...segments.slice(0, index), filename2);
34
+ if (await options.test(filePath)) return filePath;
35
+ }
36
+ else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
37
+ const filePath = join(...segments.slice(0, index), filename2);
38
+ if (await options.test(filePath)) return filePath;
39
+ }
40
+ throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
41
+ }
42
+ function findNearestFile(filename, options = {}) {
43
+ return findFile(filename, options);
44
+ }
45
+ function _resolvePath(id, opts = {}) {
46
+ if (id instanceof URL || id.startsWith("file://")) return normalize(fileURLToPath(id));
47
+ if (isAbsolute(id)) return normalize(id);
48
+ return resolveModulePath(id, {
49
+ ...opts,
50
+ from: opts.from || opts.parent || opts.url
51
+ });
52
+ }
53
+ const lockFiles = [
54
+ "yarn.lock",
55
+ "package-lock.json",
56
+ "pnpm-lock.yaml",
57
+ "npm-shrinkwrap.json",
58
+ "bun.lockb",
59
+ "bun.lock",
60
+ "deno.lock"
61
+ ];
62
+ const packageFiles = [
63
+ "package.json",
64
+ "package.json5",
65
+ "package.yaml"
66
+ ];
67
+ const workspaceFiles = [
68
+ "pnpm-workspace.yaml",
69
+ "lerna.json",
70
+ "turbo.json",
71
+ "rush.json",
72
+ "deno.json",
73
+ "deno.jsonc"
74
+ ];
75
+ const FileCache = /* @__PURE__ */ new Map();
76
+ async function readPackageJSON(id, options = {}) {
77
+ const resolvedPath = await resolvePackageJSON(id, options);
78
+ const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache;
79
+ if (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);
80
+ const blob = await promises.readFile(resolvedPath, "utf8");
81
+ let parsed;
82
+ try {
83
+ parsed = x(blob);
84
+ } catch {
85
+ parsed = h(blob);
86
+ }
87
+ cache.set(resolvedPath, parsed);
88
+ return parsed;
89
+ }
90
+ async function resolvePackageJSON(id = process.cwd(), options = {}) {
91
+ return findNearestFile("package.json", {
92
+ ...options,
93
+ startingFrom: _resolvePath(id, options)
94
+ });
95
+ }
96
+ const workspaceTests = {
97
+ workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => dirname(r)),
98
+ gitConfig: (opts) => findFile(".git/config", opts).then((r) => resolve(r, "../..")),
99
+ lockFile: (opts) => findFile(lockFiles, opts).then((r) => dirname(r)),
100
+ packageJson: (opts) => findFile(packageFiles, opts).then((r) => dirname(r))
101
+ };
102
+ async function findWorkspaceDir(id = process.cwd(), options = {}) {
103
+ const startingFrom = _resolvePath(id, options);
104
+ const tests = options.tests || [
105
+ "workspaceFile",
106
+ "gitConfig",
107
+ "lockFile",
108
+ "packageJson"
109
+ ];
110
+ for (const testName of tests) {
111
+ const test = workspaceTests[testName];
112
+ if (options[testName] === false || !test) continue;
113
+ const direction = options[testName] || (testName === "gitConfig" ? "closest" : "furthest");
114
+ const detected = await test({
115
+ ...options,
116
+ startingFrom,
117
+ reverse: direction === "furthest"
118
+ }).catch(() => {});
119
+ if (detected) return detected;
120
+ }
121
+ throw new Error(`Cannot detect workspace root from ${id}`);
122
+ }
123
+
124
+ //#endregion
125
+ export { findWorkspaceDir, readPackageJSON };
126
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["parseJSON","parseJSONC"],"sources":["../../../../../../../../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs"],"sourcesContent":["import { statSync, promises } from 'node:fs';\nimport { resolve, join, normalize, isAbsolute, dirname } from 'pathe';\nimport { parseJSONC, stringifyJSONC, parseJSON, stringifyJSON, parseJSON5, parseYAML, stringifyJSON5, stringifyYAML } from 'confbox';\nimport { resolveModulePath } from 'exsolve';\nimport { fileURLToPath } from 'node:url';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { parseINI, stringifyINI } from 'confbox/ini';\n\nconst defaultFindOptions = {\n startingFrom: \".\",\n rootPattern: /^node_modules$/,\n reverse: false,\n test: (filePath) => {\n try {\n if (statSync(filePath).isFile()) {\n return true;\n }\n } catch {\n }\n }\n};\nasync function findFile(filename, _options = {}) {\n const filenames = Array.isArray(filename) ? filename : [filename];\n const options = { ...defaultFindOptions, ..._options };\n const basePath = resolve(options.startingFrom);\n const leadingSlash = basePath[0] === \"/\";\n const segments = basePath.split(\"/\").filter(Boolean);\n if (filenames.includes(segments.at(-1)) && await options.test(basePath)) {\n return basePath;\n }\n if (leadingSlash) {\n segments[0] = \"/\" + segments[0];\n }\n let root = segments.findIndex((r) => r.match(options.rootPattern));\n if (root === -1) {\n root = 0;\n }\n if (options.reverse) {\n for (let index = root + 1; index <= segments.length; index++) {\n for (const filename2 of filenames) {\n const filePath = join(...segments.slice(0, index), filename2);\n if (await options.test(filePath)) {\n return filePath;\n }\n }\n }\n } else {\n for (let index = segments.length; index > root; index--) {\n for (const filename2 of filenames) {\n const filePath = join(...segments.slice(0, index), filename2);\n if (await options.test(filePath)) {\n return filePath;\n }\n }\n }\n }\n throw new Error(\n `Cannot find matching ${filename} in ${options.startingFrom} or parent directories`\n );\n}\nfunction findNearestFile(filename, options = {}) {\n return findFile(filename, options);\n}\nfunction findFarthestFile(filename, options = {}) {\n return findFile(filename, { ...options, reverse: true });\n}\n\nfunction _resolvePath(id, opts = {}) {\n if (id instanceof URL || id.startsWith(\"file://\")) {\n return normalize(fileURLToPath(id));\n }\n if (isAbsolute(id)) {\n return normalize(id);\n }\n return resolveModulePath(id, {\n ...opts,\n from: opts.from || opts.parent || opts.url\n });\n}\n\nconst FileCache$1 = /* @__PURE__ */ new Map();\nfunction defineTSConfig(tsconfig) {\n return tsconfig;\n}\nasync function readTSConfig(id, options = {}) {\n const resolvedPath = await resolveTSConfig(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache$1;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const text = await promises.readFile(resolvedPath, \"utf8\");\n const parsed = parseJSONC(text);\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writeTSConfig(path, tsconfig) {\n await promises.writeFile(path, stringifyJSONC(tsconfig));\n}\nasync function resolveTSConfig(id = process.cwd(), options = {}) {\n return findNearestFile(\"tsconfig.json\", {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\n\nconst lockFiles = [\n \"yarn.lock\",\n \"package-lock.json\",\n \"pnpm-lock.yaml\",\n \"npm-shrinkwrap.json\",\n \"bun.lockb\",\n \"bun.lock\",\n \"deno.lock\"\n];\nconst packageFiles = [\"package.json\", \"package.json5\", \"package.yaml\"];\nconst workspaceFiles = [\n \"pnpm-workspace.yaml\",\n \"lerna.json\",\n \"turbo.json\",\n \"rush.json\",\n \"deno.json\",\n \"deno.jsonc\"\n];\nconst FileCache = /* @__PURE__ */ new Map();\nfunction definePackageJSON(pkg) {\n return pkg;\n}\nasync function findPackage(id = process.cwd(), options = {}) {\n return findNearestFile(packageFiles, {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nasync function readPackage(id, options = {}) {\n const resolvedPath = await findPackage(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const blob = await promises.readFile(resolvedPath, \"utf8\");\n let parsed;\n if (resolvedPath.endsWith(\".json5\")) {\n parsed = parseJSON5(blob);\n } else if (resolvedPath.endsWith(\".yaml\")) {\n parsed = parseYAML(blob);\n } else {\n try {\n parsed = parseJSON(blob);\n } catch {\n parsed = parseJSONC(blob);\n }\n }\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writePackage(path, pkg) {\n let content;\n if (path.endsWith(\".json5\")) {\n content = stringifyJSON5(pkg);\n } else if (path.endsWith(\".yaml\")) {\n content = stringifyYAML(pkg);\n } else {\n content = stringifyJSON(pkg);\n }\n await promises.writeFile(path, content);\n}\nasync function readPackageJSON(id, options = {}) {\n const resolvedPath = await resolvePackageJSON(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const blob = await promises.readFile(resolvedPath, \"utf8\");\n let parsed;\n try {\n parsed = parseJSON(blob);\n } catch {\n parsed = parseJSONC(blob);\n }\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writePackageJSON(path, pkg) {\n await promises.writeFile(path, stringifyJSON(pkg));\n}\nasync function resolvePackageJSON(id = process.cwd(), options = {}) {\n return findNearestFile(\"package.json\", {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nasync function resolveLockfile(id = process.cwd(), options = {}) {\n return findNearestFile(lockFiles, {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nconst workspaceTests = {\n workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => dirname(r)),\n gitConfig: (opts) => findFile(\".git/config\", opts).then((r) => resolve(r, \"../..\")),\n lockFile: (opts) => findFile(lockFiles, opts).then((r) => dirname(r)),\n packageJson: (opts) => findFile(packageFiles, opts).then((r) => dirname(r))\n};\nasync function findWorkspaceDir(id = process.cwd(), options = {}) {\n const startingFrom = _resolvePath(id, options);\n const tests = options.tests || [\"workspaceFile\", \"gitConfig\", \"lockFile\", \"packageJson\"];\n for (const testName of tests) {\n const test = workspaceTests[testName];\n if (options[testName] === false || !test) {\n continue;\n }\n const direction = options[testName] || (testName === \"gitConfig\" ? \"closest\" : \"furthest\");\n const detected = await test({\n ...options,\n startingFrom,\n reverse: direction === \"furthest\"\n }).catch(() => {\n });\n if (detected) {\n return detected;\n }\n }\n throw new Error(`Cannot detect workspace root from ${id}`);\n}\nasync function updatePackage(id, callback, options = {}) {\n const resolvedPath = await findPackage(id, options);\n const pkg = await readPackage(id, options);\n const proxy = new Proxy(pkg, {\n get(target, prop) {\n if (typeof prop === \"string\" && objectKeys.has(prop) && !Object.hasOwn(target, prop)) {\n target[prop] = {};\n }\n return Reflect.get(target, prop);\n }\n });\n const updated = await callback(proxy) || pkg;\n await writePackage(resolvedPath, updated);\n}\nfunction sortPackage(pkg) {\n const sorted = {};\n const originalKeys = Object.keys(pkg);\n const knownKeysPresent = defaultFieldOrder.filter(\n (key) => Object.hasOwn(pkg, key)\n );\n for (const key of originalKeys) {\n const currentIndex = knownKeysPresent.indexOf(key);\n if (currentIndex === -1) {\n sorted[key] = pkg[key];\n continue;\n }\n for (let i = 0; i <= currentIndex; i++) {\n const knownKey = knownKeysPresent[i];\n if (!Object.hasOwn(sorted, knownKey)) {\n sorted[knownKey] = pkg[knownKey];\n }\n }\n }\n for (const key of [...dependencyKeys, \"scripts\"]) {\n const value = sorted[key];\n if (isObject(value)) {\n sorted[key] = sortObject(value);\n }\n }\n return sorted;\n}\nfunction normalizePackage(pkg) {\n const normalized = sortPackage(pkg);\n for (const key of dependencyKeys) {\n if (!Object.hasOwn(normalized, key)) {\n continue;\n }\n const value = normalized[key];\n if (!isObject(value)) {\n delete normalized[key];\n }\n }\n return normalized;\n}\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortObject(obj) {\n return Object.fromEntries(\n Object.entries(obj).sort(([a], [b]) => a.localeCompare(b))\n );\n}\nconst dependencyKeys = [\n \"dependencies\",\n \"devDependencies\",\n \"optionalDependencies\",\n \"peerDependencies\"\n];\nconst objectKeys = /* @__PURE__ */ new Set([\n \"typesVersions\",\n \"scripts\",\n \"resolutions\",\n \"overrides\",\n \"dependencies\",\n \"devDependencies\",\n \"dependenciesMeta\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"optionalDependencies\",\n \"engines\",\n \"publishConfig\"\n]);\nconst defaultFieldOrder = [\n \"$schema\",\n \"name\",\n \"version\",\n \"private\",\n \"description\",\n \"keywords\",\n \"homepage\",\n \"bugs\",\n \"repository\",\n \"funding\",\n \"license\",\n \"author\",\n \"sideEffects\",\n \"type\",\n \"imports\",\n \"exports\",\n \"main\",\n \"module\",\n \"browser\",\n \"types\",\n \"typesVersions\",\n \"typings\",\n \"bin\",\n \"man\",\n \"files\",\n \"workspaces\",\n \"scripts\",\n \"resolutions\",\n \"overrides\",\n \"dependencies\",\n \"devDependencies\",\n \"dependenciesMeta\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"optionalDependencies\",\n \"bundledDependencies\",\n \"bundleDependencies\",\n \"packageManager\",\n \"engines\",\n \"publishConfig\"\n];\n\nfunction defineGitConfig(config) {\n return config;\n}\nasync function resolveGitConfig(dir, opts) {\n return findNearestFile(\".git/config\", { ...opts, startingFrom: dir });\n}\nasync function readGitConfig(dir, opts) {\n const path = await resolveGitConfig(dir, opts);\n const ini = await readFile(path, \"utf8\");\n return parseGitConfig(ini);\n}\nasync function writeGitConfig(path, config) {\n await writeFile(path, stringifyGitConfig(config));\n}\nfunction parseGitConfig(ini) {\n return parseINI(ini.replaceAll(/^\\[(\\w+) \"(.+)\"\\]$/gm, \"[$1.$2]\"));\n}\nfunction stringifyGitConfig(config) {\n return stringifyINI(config).replaceAll(/^\\[(\\w+)\\.(\\w+)\\]$/gm, '[$1 \"$2\"]');\n}\n\nexport { defineGitConfig, definePackageJSON, defineTSConfig, findFarthestFile, findFile, findNearestFile, findPackage, findWorkspaceDir, normalizePackage, parseGitConfig, readGitConfig, readPackage, readPackageJSON, readTSConfig, resolveGitConfig, resolveLockfile, resolvePackageJSON, resolveTSConfig, sortPackage, stringifyGitConfig, updatePackage, writeGitConfig, writePackage, writePackageJSON, writeTSConfig };\n"],"x_google_ignoreList":[0],"mappings":"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"}
@@ -0,0 +1,138 @@
1
+ const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_index = require('../../../../destr@2.0.5/node_modules/destr/dist/index.cjs');
3
+ require('../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
4
+ let node_fs = require("node:fs");
5
+ let node_path = require("node:path");
6
+ let node_os = require("node:os");
7
+
8
+ //#region ../../node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs
9
+ function isBuffer(obj) {
10
+ return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
11
+ }
12
+ function keyIdentity(key) {
13
+ return key;
14
+ }
15
+ function flatten(target, opts) {
16
+ opts = opts || {};
17
+ const delimiter = opts.delimiter || ".";
18
+ const maxDepth = opts.maxDepth;
19
+ const transformKey = opts.transformKey || keyIdentity;
20
+ const output = {};
21
+ function step(object, prev, currentDepth) {
22
+ currentDepth = currentDepth || 1;
23
+ Object.keys(object).forEach(function(key) {
24
+ const value = object[key];
25
+ const isarray = opts.safe && Array.isArray(value);
26
+ const type = Object.prototype.toString.call(value);
27
+ const isbuffer = isBuffer(value);
28
+ const isobject = type === "[object Object]" || type === "[object Array]";
29
+ const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
30
+ if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
31
+ output[newKey] = value;
32
+ });
33
+ }
34
+ step(target);
35
+ return output;
36
+ }
37
+ function unflatten(target, opts) {
38
+ opts = opts || {};
39
+ const delimiter = opts.delimiter || ".";
40
+ const overwrite = opts.overwrite || false;
41
+ const transformKey = opts.transformKey || keyIdentity;
42
+ const result = {};
43
+ if (isBuffer(target) || Object.prototype.toString.call(target) !== "[object Object]") return target;
44
+ function getkey(key) {
45
+ const parsedKey = Number(key);
46
+ return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
47
+ }
48
+ function addKeys(keyPrefix, recipient, target$1) {
49
+ return Object.keys(target$1).reduce(function(result$1, key) {
50
+ result$1[keyPrefix + delimiter + key] = target$1[key];
51
+ return result$1;
52
+ }, recipient);
53
+ }
54
+ function isEmpty(val) {
55
+ const type = Object.prototype.toString.call(val);
56
+ const isArray = type === "[object Array]";
57
+ const isObject = type === "[object Object]";
58
+ if (!val) return true;
59
+ else if (isArray) return !val.length;
60
+ else if (isObject) return !Object.keys(val).length;
61
+ }
62
+ target = Object.keys(target).reduce(function(result$1, key) {
63
+ const type = Object.prototype.toString.call(target[key]);
64
+ if (!(type === "[object Object]" || type === "[object Array]") || isEmpty(target[key])) {
65
+ result$1[key] = target[key];
66
+ return result$1;
67
+ } else return addKeys(key, result$1, flatten(target[key], opts));
68
+ }, {});
69
+ Object.keys(target).forEach(function(key) {
70
+ const split = key.split(delimiter).map(transformKey);
71
+ let key1 = getkey(split.shift());
72
+ let key2 = getkey(split[0]);
73
+ let recipient = result;
74
+ while (key2 !== void 0) {
75
+ if (key1 === "__proto__") return;
76
+ const type = Object.prototype.toString.call(recipient[key1]);
77
+ const isobject = type === "[object Object]" || type === "[object Array]";
78
+ if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
79
+ if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
80
+ recipient = recipient[key1];
81
+ if (split.length > 0) {
82
+ key1 = getkey(split.shift());
83
+ key2 = getkey(split[0]);
84
+ }
85
+ }
86
+ recipient[key1] = unflatten(target[key], opts);
87
+ });
88
+ return result;
89
+ }
90
+ const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
91
+ const RE_LINES = /\n|\r|\r\n/;
92
+ const defaults = {
93
+ name: ".conf",
94
+ dir: process.cwd(),
95
+ flat: false
96
+ };
97
+ function withDefaults(options) {
98
+ if (typeof options === "string") options = { name: options };
99
+ return {
100
+ ...defaults,
101
+ ...options
102
+ };
103
+ }
104
+ function parse(contents, options = {}) {
105
+ const config = {};
106
+ const lines = contents.split(RE_LINES);
107
+ for (const line of lines) {
108
+ const match = line.match(RE_KEY_VAL);
109
+ if (!match) continue;
110
+ const key = match[1];
111
+ if (!key || key === "__proto__" || key === "constructor") continue;
112
+ const value = require_index.destr((match[2] || "").trim());
113
+ if (key.endsWith("[]")) {
114
+ const nkey = key.slice(0, Math.max(0, key.length - 2));
115
+ config[nkey] = (config[nkey] || []).concat(value);
116
+ continue;
117
+ }
118
+ config[key] = value;
119
+ }
120
+ return options.flat ? config : unflatten(config, { overwrite: true });
121
+ }
122
+ function parseFile(path, options) {
123
+ if (!(0, node_fs.existsSync)(path)) return {};
124
+ return parse((0, node_fs.readFileSync)(path, "utf8"), options);
125
+ }
126
+ function read(options) {
127
+ options = withDefaults(options);
128
+ return parseFile((0, node_path.resolve)(options.dir, options.name), options);
129
+ }
130
+ function readUser(options) {
131
+ options = withDefaults(options);
132
+ options.dir = process.env.XDG_CONFIG_HOME || (0, node_os.homedir)();
133
+ return read(options);
134
+ }
135
+
136
+ //#endregion
137
+ exports.read = read;
138
+ exports.readUser = readUser;