@powerlines/plugin-env 0.15.13 → 0.15.15

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 (268) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +4 -0
  2. package/dist/_virtual/rolldown_runtime.mjs +33 -0
  3. package/dist/babel/plugin.cjs +16 -16
  4. package/dist/babel/plugin.d.mts +2 -2
  5. package/dist/babel/plugin.mjs +7 -7
  6. package/dist/components/docs.cjs +8 -8
  7. package/dist/components/docs.mjs +5 -5
  8. package/dist/components/env.cjs +38 -39
  9. package/dist/components/env.d.mts +2 -2
  10. package/dist/components/env.mjs +11 -11
  11. package/dist/helpers/automd-generator.cjs +4 -4
  12. package/dist/helpers/automd-generator.d.mts +1 -1
  13. package/dist/helpers/automd-generator.mjs +3 -3
  14. package/dist/helpers/load.cjs +12 -13
  15. package/dist/helpers/load.d.mts +2 -2
  16. package/dist/helpers/load.mjs +10 -10
  17. package/dist/helpers/persistence.cjs +23 -23
  18. package/dist/helpers/persistence.d.mts +1 -1
  19. package/dist/helpers/persistence.mjs +7 -7
  20. package/dist/helpers/reflect.cjs +9 -9
  21. package/dist/helpers/reflect.mjs +5 -5
  22. package/dist/helpers/source-file-env.cjs +1 -1
  23. package/dist/helpers/source-file-env.mjs +1 -1
  24. package/dist/index.cjs +28 -26
  25. package/dist/index.d.mts +1 -1
  26. package/dist/index.mjs +25 -25
  27. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/parse-type-definition.cjs +31 -0
  28. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/parse-type-definition.mjs +31 -0
  29. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/to-array.cjs +8 -0
  30. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/to-array.mjs +7 -0
  31. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +6 -0
  32. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +5 -0
  33. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +3 -0
  34. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +5 -0
  35. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
  36. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +6 -0
  37. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +1 -0
  38. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +3 -0
  39. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +13 -0
  40. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +13 -0
  41. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +13 -0
  42. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +13 -0
  43. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
  44. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +11 -0
  45. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +11 -0
  46. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +12 -0
  47. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-parent-path.cjs +10 -0
  48. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-parent-path.mjs +10 -0
  49. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-type.cjs +13 -0
  50. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-type.mjs +13 -0
  51. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/join-paths.cjs +49 -0
  52. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/join-paths.mjs +49 -0
  53. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/regex.cjs +9 -0
  54. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/regex.mjs +5 -0
  55. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/slash.cjs +8 -0
  56. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/slash.mjs +7 -0
  57. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +346 -0
  58. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +346 -0
  59. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs +786 -0
  60. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs +786 -0
  61. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +3 -0
  62. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +3 -0
  63. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs +23 -0
  64. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs +22 -0
  65. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs +405 -0
  66. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs +404 -0
  67. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs +657 -0
  68. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs +657 -0
  69. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs +1054 -0
  70. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs +1054 -0
  71. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  72. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +42 -0
  73. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
  74. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +45 -0
  75. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +288 -0
  76. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +285 -0
  77. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +71 -0
  78. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +68 -0
  79. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
  80. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1007 -0
  81. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +23 -0
  82. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +13 -0
  83. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +2698 -0
  84. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +2685 -0
  85. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +4457 -0
  86. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +4454 -0
  87. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +29 -0
  88. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +29 -0
  89. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +181 -0
  90. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +176 -0
  91. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +22 -0
  92. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +17 -0
  93. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +3967 -0
  94. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +3962 -0
  95. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +11768 -0
  96. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +11763 -0
  97. 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
  98. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +20 -0
  99. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +20 -0
  100. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +17 -0
  101. package/dist/node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.cjs +174 -0
  102. package/dist/node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs +172 -0
  103. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +13 -0
  104. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +12 -0
  105. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +3 -0
  106. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +3 -0
  107. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +145 -0
  108. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +138 -0
  109. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +127 -0
  110. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +125 -0
  111. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +138 -0
  112. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +136 -0
  113. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +629 -0
  114. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +627 -0
  115. package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/components.d.mts +1 -1
  116. package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/typescript-file.d.mts +1 -1
  117. package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/typescript-interface.d.mts +1 -1
  118. package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +6 -6
  119. package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +1 -2
  120. package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +1 -1
  121. package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +1 -1
  122. package/dist/powerlines/src/types/context.d.cts +1 -1
  123. package/dist/types/plugin.cjs +19 -18
  124. package/dist/types/plugin.d.mts +6 -6
  125. package/dist/types/plugin.mjs +4 -4
  126. package/dist/types/runtime.cjs +3 -2
  127. package/dist/types/runtime.d.mts +1 -1
  128. package/dist/types/runtime.mjs +1 -1
  129. package/package.json +10 -10
  130. package/dist/deepkit/schemas/reflection.cjs +0 -5368
  131. package/dist/deepkit/schemas/reflection.mjs +0 -5365
  132. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  133. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  134. package/dist/deepkit/src/capnp.cjs +0 -1692
  135. package/dist/deepkit/src/capnp.mjs +0 -1690
  136. package/dist/deepkit/src/esbuild-plugin.cjs +0 -99
  137. package/dist/deepkit/src/esbuild-plugin.mjs +0 -98
  138. package/dist/deepkit/src/reflect-type.cjs +0 -40
  139. package/dist/deepkit/src/reflect-type.mjs +0 -38
  140. package/dist/deepkit/src/resolve-reflections.cjs +0 -23
  141. package/dist/deepkit/src/resolve-reflections.mjs +0 -22
  142. package/dist/deepkit/src/transformer.cjs +0 -92
  143. package/dist/deepkit/src/transformer.mjs +0 -89
  144. package/dist/deepkit/src/transpile.cjs +0 -39
  145. package/dist/deepkit/src/transpile.mjs +0 -37
  146. package/dist/deepkit/src/types.cjs +0 -22
  147. package/dist/deepkit/src/types.mjs +0 -21
  148. package/dist/deepkit/src/utilities.cjs +0 -182
  149. package/dist/deepkit/src/utilities.mjs +0 -181
  150. package/dist/plugin-alloy/src/core/components/output.cjs +0 -45
  151. package/dist/plugin-alloy/src/core/components/output.mjs +0 -44
  152. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  153. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  154. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  155. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  156. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -136
  157. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -128
  158. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  159. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  160. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -110
  161. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -101
  162. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -23
  163. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -22
  164. package/dist/plugin-alloy/src/index.cjs +0 -106
  165. package/dist/plugin-alloy/src/index.mjs +0 -104
  166. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  167. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  168. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  169. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  170. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -72
  171. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -71
  172. package/dist/plugin-alloy/src/types/components.cjs +0 -22
  173. package/dist/plugin-alloy/src/types/components.mjs +0 -21
  174. package/dist/plugin-alloy/src/types/plugin.cjs +0 -55
  175. package/dist/plugin-alloy/src/types/plugin.mjs +0 -52
  176. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -57
  177. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -56
  178. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -126
  179. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -124
  180. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -442
  181. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -433
  182. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -212
  183. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -209
  184. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -68
  185. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -67
  186. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  187. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  188. package/dist/plugin-automd/src/index.cjs +0 -127
  189. package/dist/plugin-automd/src/index.mjs +0 -124
  190. package/dist/plugin-automd/src/types/plugin.cjs +0 -47
  191. package/dist/plugin-automd/src/types/plugin.mjs +0 -47
  192. package/dist/plugin-automd/src/types/toc.cjs +0 -26
  193. package/dist/plugin-automd/src/types/toc.mjs +0 -25
  194. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -74
  195. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -70
  196. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -71
  197. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -69
  198. package/dist/plugin-babel/src/helpers/filters.cjs +0 -158
  199. package/dist/plugin-babel/src/helpers/filters.mjs +0 -154
  200. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  201. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  202. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -200
  203. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -192
  204. package/dist/plugin-babel/src/helpers/options.cjs +0 -74
  205. package/dist/plugin-babel/src/helpers/options.mjs +0 -71
  206. package/dist/plugin-babel/src/index.cjs +0 -131
  207. package/dist/plugin-babel/src/index.mjs +0 -129
  208. package/dist/plugin-babel/src/types/plugin.cjs +0 -42
  209. package/dist/plugin-babel/src/types/plugin.mjs +0 -39
  210. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -137
  211. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -135
  212. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -161
  213. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -159
  214. package/dist/powerlines/src/lib/entry.cjs +0 -203
  215. package/dist/powerlines/src/lib/entry.mjs +0 -201
  216. package/dist/powerlines/src/lib/logger.cjs +0 -108
  217. package/dist/powerlines/src/lib/logger.mjs +0 -106
  218. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -67
  219. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -66
  220. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -49
  221. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -48
  222. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -46
  223. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -45
  224. package/dist/powerlines/src/types/api.cjs +0 -62
  225. package/dist/powerlines/src/types/api.mjs +0 -62
  226. package/dist/powerlines/src/types/babel.cjs +0 -156
  227. package/dist/powerlines/src/types/babel.mjs +0 -147
  228. package/dist/powerlines/src/types/build.cjs +0 -127
  229. package/dist/powerlines/src/types/build.mjs +0 -121
  230. package/dist/powerlines/src/types/commands.cjs +0 -16
  231. package/dist/powerlines/src/types/commands.mjs +0 -15
  232. package/dist/powerlines/src/types/config.cjs +0 -413
  233. package/dist/powerlines/src/types/config.mjs +0 -391
  234. package/dist/powerlines/src/types/context.cjs +0 -381
  235. package/dist/powerlines/src/types/context.mjs +0 -364
  236. package/dist/powerlines/src/types/fs.cjs +0 -78
  237. package/dist/powerlines/src/types/fs.mjs +0 -75
  238. package/dist/powerlines/src/types/hooks.cjs +0 -71
  239. package/dist/powerlines/src/types/hooks.mjs +0 -68
  240. package/dist/powerlines/src/types/index.cjs +0 -11
  241. package/dist/powerlines/src/types/index.mjs +0 -13
  242. package/dist/powerlines/src/types/plugin.cjs +0 -184
  243. package/dist/powerlines/src/types/plugin.mjs +0 -178
  244. package/dist/powerlines/src/types/resolved.cjs +0 -153
  245. package/dist/powerlines/src/types/resolved.mjs +0 -148
  246. package/dist/powerlines/src/types/unplugin.cjs +0 -47
  247. package/dist/powerlines/src/types/unplugin.mjs +0 -46
  248. /package/dist/{deepkit → packages/deepkit}/schemas/reflection.d.mts +0 -0
  249. /package/dist/{deepkit → packages/deepkit}/src/types.d.mts +0 -0
  250. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/core/components/source-file.d.mts +0 -0
  251. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/index.d.mts +0 -0
  252. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/plugin.d.mts +0 -0
  253. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/builtin-file.d.mts +0 -0
  254. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/tsdoc.d.mts +0 -0
  255. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/plugin.d.mts +0 -0
  256. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/toc.d.mts +0 -0
  257. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/index.d.mts +0 -0
  258. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/plugin.d.mts +0 -0
  259. /package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  260. /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
  261. /package/dist/{powerlines → packages/powerlines}/src/types/babel.d.mts +0 -0
  262. /package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -0
  263. /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
  264. /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
  265. /package/dist/{powerlines → packages/powerlines}/src/types/index.d.mts +0 -0
  266. /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
  267. /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
  268. /package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
4
+
5
+ //#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
6
+ var require_node_fetch_native_DhEqb06g = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
7
+ var l = Object.defineProperty;
8
+ var o = (e, t) => l(e, "name", {
9
+ value: t,
10
+ configurable: !0
11
+ });
12
+ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
+ function getDefaultExportFromCjs(e) {
14
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
15
+ }
16
+ o(getDefaultExportFromCjs, "getDefaultExportFromCjs"), exports.commonjsGlobal = commonjsGlobal, exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
17
+ }));
18
+
19
+ //#endregion
20
+ Object.defineProperty(exports, 'default', {
21
+ enumerable: true,
22
+ get: function () {
23
+ return require_node_fetch_native_DhEqb06g();
24
+ }
25
+ });
@@ -0,0 +1,20 @@
1
+ import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
4
+ var require_node_fetch_native_DhEqb06g = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ var l = Object.defineProperty;
6
+ var o = (e, t) => l(e, "name", {
7
+ value: t,
8
+ configurable: !0
9
+ });
10
+ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
11
+ function getDefaultExportFromCjs(e) {
12
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
13
+ }
14
+ o(getDefaultExportFromCjs, "getDefaultExportFromCjs"), exports.commonjsGlobal = commonjsGlobal, exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
15
+ }));
16
+
17
+ //#endregion
18
+ export default require_node_fetch_native_DhEqb06g();
19
+
20
+ export { require_node_fetch_native_DhEqb06g };
@@ -0,0 +1,20 @@
1
+ const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_index = require('../dist/index.cjs');
3
+
4
+ //#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs
5
+ var require_lib = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
6
+ const nodeFetch = require_index.default;
7
+ function fetch(input, options) {
8
+ return nodeFetch.fetch(input, options);
9
+ }
10
+ for (const key in nodeFetch) fetch[key] = nodeFetch[key];
11
+ module.exports = fetch;
12
+ }));
13
+
14
+ //#endregion
15
+ Object.defineProperty(exports, 'default', {
16
+ enumerable: true,
17
+ get: function () {
18
+ return require_lib();
19
+ }
20
+ });
@@ -0,0 +1,17 @@
1
+ import { __commonJSMin } from "../../../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_dist } from "../dist/index.mjs";
3
+
4
+ //#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs
5
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6
+ const nodeFetch = require_dist();
7
+ function fetch(input, options) {
8
+ return nodeFetch.fetch(input, options);
9
+ }
10
+ for (const key in nodeFetch) fetch[key] = nodeFetch[key];
11
+ module.exports = fetch;
12
+ }));
13
+
14
+ //#endregion
15
+ export default require_lib();
16
+
17
+ export { require_lib };
@@ -0,0 +1,174 @@
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_main = require('../../../../../tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs');
4
+ let node_fs = require("node:fs");
5
+ node_fs = require_rolldown_runtime.__toESM(node_fs);
6
+ let node_fs_promises = require("node:fs/promises");
7
+ let node_module = require("node:module");
8
+
9
+ //#region ../../node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs
10
+ async function findup(cwd, match, options = {}) {
11
+ const segments = require_pathe_M_eThtNZ.normalize(cwd).split("/");
12
+ while (segments.length > 0) {
13
+ const result = await match(segments.join("/") || "/");
14
+ if (result || !options.includeParentDirs) return result;
15
+ segments.pop();
16
+ }
17
+ }
18
+ function cached(fn) {
19
+ let v;
20
+ return () => {
21
+ if (v === void 0) v = fn().then((r) => {
22
+ v = r;
23
+ return v;
24
+ });
25
+ return v;
26
+ };
27
+ }
28
+ const hasCorepack = cached(async () => {
29
+ if (globalThis.process?.versions?.webcontainer) return false;
30
+ try {
31
+ const { exitCode } = await require_main.K("corepack", ["--version"]);
32
+ return exitCode === 0;
33
+ } catch {
34
+ return false;
35
+ }
36
+ });
37
+ async function executeCommand(command, args, options = {}) {
38
+ const xArgs = command === "npm" || command === "bun" || command === "deno" || !await hasCorepack() ? [command, args] : ["corepack", [command, ...args]];
39
+ const { exitCode, stdout, stderr } = await require_main.K(xArgs[0], xArgs[1], { nodeOptions: {
40
+ cwd: require_pathe_M_eThtNZ.resolve(options.cwd || process.cwd()),
41
+ env: options.env,
42
+ stdio: options.silent ? "pipe" : "inherit"
43
+ } });
44
+ if (exitCode !== 0) throw new Error(`\`${xArgs.flat().join(" ")}\` failed.${options.silent ? [
45
+ "",
46
+ stdout,
47
+ stderr
48
+ ].join("\n") : ""}`);
49
+ }
50
+ const NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG = "No package manager auto-detected.";
51
+ async function resolveOperationOptions(options = {}) {
52
+ const cwd = options.cwd || process.cwd();
53
+ const env = {
54
+ ...process.env,
55
+ ...options.env
56
+ };
57
+ const packageManager = (typeof options.packageManager === "string" ? packageManagers.find((pm) => pm.name === options.packageManager) : options.packageManager) || await detectPackageManager(options.cwd || process.cwd());
58
+ if (!packageManager) throw new Error(NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG);
59
+ return {
60
+ cwd,
61
+ env,
62
+ silent: options.silent ?? false,
63
+ packageManager,
64
+ dev: options.dev ?? false,
65
+ workspace: options.workspace,
66
+ global: options.global ?? false,
67
+ dry: options.dry ?? false
68
+ };
69
+ }
70
+ function parsePackageManagerField(packageManager) {
71
+ const [name, _version] = (packageManager || "").split("@");
72
+ const [version, buildMeta] = _version?.split("+") || [];
73
+ if (name && name !== "-" && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(name)) return {
74
+ name,
75
+ version,
76
+ buildMeta
77
+ };
78
+ const sanitized = name.replace(/\W+/g, "");
79
+ return {
80
+ name: sanitized,
81
+ version,
82
+ buildMeta,
83
+ warnings: [`Abnormal characters found in \`packageManager\` field, sanitizing from \`${name}\` to \`${sanitized}\``]
84
+ };
85
+ }
86
+ const packageManagers = [
87
+ {
88
+ name: "npm",
89
+ command: "npm",
90
+ lockFile: "package-lock.json"
91
+ },
92
+ {
93
+ name: "pnpm",
94
+ command: "pnpm",
95
+ lockFile: "pnpm-lock.yaml",
96
+ files: ["pnpm-workspace.yaml"]
97
+ },
98
+ {
99
+ name: "bun",
100
+ command: "bun",
101
+ lockFile: ["bun.lockb", "bun.lock"]
102
+ },
103
+ {
104
+ name: "yarn",
105
+ command: "yarn",
106
+ lockFile: "yarn.lock",
107
+ files: [".yarnrc.yml"]
108
+ },
109
+ {
110
+ name: "deno",
111
+ command: "deno",
112
+ lockFile: "deno.lock",
113
+ files: ["deno.json"]
114
+ }
115
+ ];
116
+ async function detectPackageManager(cwd, options = {}) {
117
+ const detected = await findup(require_pathe_M_eThtNZ.resolve(cwd || "."), async (path) => {
118
+ if (!options.ignorePackageJSON) {
119
+ const packageJSONPath = require_pathe_M_eThtNZ.join(path, "package.json");
120
+ if ((0, node_fs.existsSync)(packageJSONPath)) {
121
+ const packageJSON = JSON.parse(await (0, node_fs_promises.readFile)(packageJSONPath, "utf8"));
122
+ if (packageJSON?.packageManager) {
123
+ const { name, version = "0.0.0", buildMeta, warnings } = parsePackageManagerField(packageJSON.packageManager);
124
+ if (name) {
125
+ const majorVersion = version.split(".")[0];
126
+ const packageManager = packageManagers.find((pm) => pm.name === name && pm.majorVersion === majorVersion) || packageManagers.find((pm) => pm.name === name);
127
+ return {
128
+ name,
129
+ command: name,
130
+ version,
131
+ majorVersion,
132
+ buildMeta,
133
+ warnings,
134
+ files: packageManager?.files,
135
+ lockFile: packageManager?.lockFile
136
+ };
137
+ }
138
+ }
139
+ }
140
+ if ((0, node_fs.existsSync)(require_pathe_M_eThtNZ.join(path, "deno.json"))) return packageManagers.find((pm) => pm.name === "deno");
141
+ }
142
+ if (!options.ignoreLockFile) {
143
+ for (const packageManager of packageManagers) if ([packageManager.lockFile, packageManager.files].flat().filter(Boolean).some((file) => (0, node_fs.existsSync)(require_pathe_M_eThtNZ.resolve(path, file)))) return { ...packageManager };
144
+ }
145
+ }, { includeParentDirs: options.includeParentDirs ?? true });
146
+ if (!detected && !options.ignoreArgv) {
147
+ const scriptArg = process.argv[1];
148
+ if (scriptArg) {
149
+ for (const packageManager of packageManagers) if ((/* @__PURE__ */ new RegExp(`[/\\\\]\\.?${packageManager.command}`)).test(scriptArg)) return packageManager;
150
+ }
151
+ }
152
+ return detected;
153
+ }
154
+ async function installDependencies(options = {}) {
155
+ const resolvedOptions = await resolveOperationOptions(options);
156
+ const commandArgs = options.frozenLockFile ? {
157
+ npm: ["ci"],
158
+ yarn: ["install", "--immutable"],
159
+ bun: ["install", "--frozen-lockfile"],
160
+ pnpm: ["install", "--frozen-lockfile"],
161
+ deno: ["install", "--frozen"]
162
+ }[resolvedOptions.packageManager.name] : ["install"];
163
+ if (!resolvedOptions.dry) await executeCommand(resolvedOptions.packageManager.command, commandArgs, {
164
+ cwd: resolvedOptions.cwd,
165
+ silent: resolvedOptions.silent
166
+ });
167
+ return { exec: {
168
+ command: resolvedOptions.packageManager.command,
169
+ args: commandArgs
170
+ } };
171
+ }
172
+
173
+ //#endregion
174
+ exports.installDependencies = installDependencies;
@@ -0,0 +1,172 @@
1
+ import { join, normalize, resolve } from "../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
2
+ import { K } from "../../../../../tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs";
3
+ import { createRequire } from "node:module";
4
+ import { existsSync } from "node:fs";
5
+ import { readFile } from "node:fs/promises";
6
+
7
+ //#region ../../node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs
8
+ async function findup(cwd, match, options = {}) {
9
+ const segments = normalize(cwd).split("/");
10
+ while (segments.length > 0) {
11
+ const result = await match(segments.join("/") || "/");
12
+ if (result || !options.includeParentDirs) return result;
13
+ segments.pop();
14
+ }
15
+ }
16
+ function cached(fn) {
17
+ let v;
18
+ return () => {
19
+ if (v === void 0) v = fn().then((r) => {
20
+ v = r;
21
+ return v;
22
+ });
23
+ return v;
24
+ };
25
+ }
26
+ const hasCorepack = cached(async () => {
27
+ if (globalThis.process?.versions?.webcontainer) return false;
28
+ try {
29
+ const { exitCode } = await K("corepack", ["--version"]);
30
+ return exitCode === 0;
31
+ } catch {
32
+ return false;
33
+ }
34
+ });
35
+ async function executeCommand(command, args, options = {}) {
36
+ const xArgs = command === "npm" || command === "bun" || command === "deno" || !await hasCorepack() ? [command, args] : ["corepack", [command, ...args]];
37
+ const { exitCode, stdout, stderr } = await K(xArgs[0], xArgs[1], { nodeOptions: {
38
+ cwd: resolve(options.cwd || process.cwd()),
39
+ env: options.env,
40
+ stdio: options.silent ? "pipe" : "inherit"
41
+ } });
42
+ if (exitCode !== 0) throw new Error(`\`${xArgs.flat().join(" ")}\` failed.${options.silent ? [
43
+ "",
44
+ stdout,
45
+ stderr
46
+ ].join("\n") : ""}`);
47
+ }
48
+ const NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG = "No package manager auto-detected.";
49
+ async function resolveOperationOptions(options = {}) {
50
+ const cwd = options.cwd || process.cwd();
51
+ const env = {
52
+ ...process.env,
53
+ ...options.env
54
+ };
55
+ const packageManager = (typeof options.packageManager === "string" ? packageManagers.find((pm) => pm.name === options.packageManager) : options.packageManager) || await detectPackageManager(options.cwd || process.cwd());
56
+ if (!packageManager) throw new Error(NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG);
57
+ return {
58
+ cwd,
59
+ env,
60
+ silent: options.silent ?? false,
61
+ packageManager,
62
+ dev: options.dev ?? false,
63
+ workspace: options.workspace,
64
+ global: options.global ?? false,
65
+ dry: options.dry ?? false
66
+ };
67
+ }
68
+ function parsePackageManagerField(packageManager) {
69
+ const [name, _version] = (packageManager || "").split("@");
70
+ const [version, buildMeta] = _version?.split("+") || [];
71
+ if (name && name !== "-" && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(name)) return {
72
+ name,
73
+ version,
74
+ buildMeta
75
+ };
76
+ const sanitized = name.replace(/\W+/g, "");
77
+ return {
78
+ name: sanitized,
79
+ version,
80
+ buildMeta,
81
+ warnings: [`Abnormal characters found in \`packageManager\` field, sanitizing from \`${name}\` to \`${sanitized}\``]
82
+ };
83
+ }
84
+ const packageManagers = [
85
+ {
86
+ name: "npm",
87
+ command: "npm",
88
+ lockFile: "package-lock.json"
89
+ },
90
+ {
91
+ name: "pnpm",
92
+ command: "pnpm",
93
+ lockFile: "pnpm-lock.yaml",
94
+ files: ["pnpm-workspace.yaml"]
95
+ },
96
+ {
97
+ name: "bun",
98
+ command: "bun",
99
+ lockFile: ["bun.lockb", "bun.lock"]
100
+ },
101
+ {
102
+ name: "yarn",
103
+ command: "yarn",
104
+ lockFile: "yarn.lock",
105
+ files: [".yarnrc.yml"]
106
+ },
107
+ {
108
+ name: "deno",
109
+ command: "deno",
110
+ lockFile: "deno.lock",
111
+ files: ["deno.json"]
112
+ }
113
+ ];
114
+ async function detectPackageManager(cwd, options = {}) {
115
+ const detected = await findup(resolve(cwd || "."), async (path) => {
116
+ if (!options.ignorePackageJSON) {
117
+ const packageJSONPath = join(path, "package.json");
118
+ if (existsSync(packageJSONPath)) {
119
+ const packageJSON = JSON.parse(await readFile(packageJSONPath, "utf8"));
120
+ if (packageJSON?.packageManager) {
121
+ const { name, version = "0.0.0", buildMeta, warnings } = parsePackageManagerField(packageJSON.packageManager);
122
+ if (name) {
123
+ const majorVersion = version.split(".")[0];
124
+ const packageManager = packageManagers.find((pm) => pm.name === name && pm.majorVersion === majorVersion) || packageManagers.find((pm) => pm.name === name);
125
+ return {
126
+ name,
127
+ command: name,
128
+ version,
129
+ majorVersion,
130
+ buildMeta,
131
+ warnings,
132
+ files: packageManager?.files,
133
+ lockFile: packageManager?.lockFile
134
+ };
135
+ }
136
+ }
137
+ }
138
+ if (existsSync(join(path, "deno.json"))) return packageManagers.find((pm) => pm.name === "deno");
139
+ }
140
+ if (!options.ignoreLockFile) {
141
+ for (const packageManager of packageManagers) if ([packageManager.lockFile, packageManager.files].flat().filter(Boolean).some((file) => existsSync(resolve(path, file)))) return { ...packageManager };
142
+ }
143
+ }, { includeParentDirs: options.includeParentDirs ?? true });
144
+ if (!detected && !options.ignoreArgv) {
145
+ const scriptArg = process.argv[1];
146
+ if (scriptArg) {
147
+ for (const packageManager of packageManagers) if ((/* @__PURE__ */ new RegExp(`[/\\\\]\\.?${packageManager.command}`)).test(scriptArg)) return packageManager;
148
+ }
149
+ }
150
+ return detected;
151
+ }
152
+ async function installDependencies(options = {}) {
153
+ const resolvedOptions = await resolveOperationOptions(options);
154
+ const commandArgs = options.frozenLockFile ? {
155
+ npm: ["ci"],
156
+ yarn: ["install", "--immutable"],
157
+ bun: ["install", "--frozen-lockfile"],
158
+ pnpm: ["install", "--frozen-lockfile"],
159
+ deno: ["install", "--frozen"]
160
+ }[resolvedOptions.packageManager.name] : ["install"];
161
+ if (!resolvedOptions.dry) await executeCommand(resolvedOptions.packageManager.command, commandArgs, {
162
+ cwd: resolvedOptions.cwd,
163
+ silent: resolvedOptions.silent
164
+ });
165
+ return { exec: {
166
+ command: resolvedOptions.packageManager.command,
167
+ args: commandArgs
168
+ } };
169
+ }
170
+
171
+ //#endregion
172
+ export { installDependencies };
@@ -0,0 +1,13 @@
1
+ const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.cjs');
2
+ let node_crypto = require("node:crypto");
3
+
4
+ //#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
5
+ const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
6
+ function digest(t) {
7
+ if (e) return e(r, t, s);
8
+ const o = (0, node_crypto.createHash)(r).update(t);
9
+ return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
10
+ }
11
+
12
+ //#endregion
13
+ exports.digest = digest;
@@ -0,0 +1,12 @@
1
+ import { createHash } from "node:crypto";
2
+
3
+ //#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
4
+ const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
5
+ function digest(t) {
6
+ if (e) return e(r, t, s);
7
+ const o = createHash(r).update(t);
8
+ return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
9
+ }
10
+
11
+ //#endregion
12
+ export { digest };
@@ -0,0 +1,3 @@
1
+ const require_index = require('./crypto/node/index.cjs');
2
+
3
+ exports.digest = require_index.digest;
@@ -0,0 +1,3 @@
1
+ import { digest } from "./crypto/node/index.mjs";
2
+
3
+ export { digest };
@@ -0,0 +1,145 @@
1
+
2
+ //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
3
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
4
+ function normalizeWindowsPath(input = "") {
5
+ if (!input) return input;
6
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
7
+ }
8
+ const _UNC_REGEX = /^[/\\]{2}/;
9
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
10
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
11
+ const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
12
+ const normalize = function(path) {
13
+ if (path.length === 0) return ".";
14
+ path = normalizeWindowsPath(path);
15
+ const isUNCPath = path.match(_UNC_REGEX);
16
+ const isPathAbsolute = isAbsolute(path);
17
+ const trailingSeparator = path[path.length - 1] === "/";
18
+ path = normalizeString(path, !isPathAbsolute);
19
+ if (path.length === 0) {
20
+ if (isPathAbsolute) return "/";
21
+ return trailingSeparator ? "./" : ".";
22
+ }
23
+ if (trailingSeparator) path += "/";
24
+ if (_DRIVE_LETTER_RE.test(path)) path += "/";
25
+ if (isUNCPath) {
26
+ if (!isPathAbsolute) return `//./${path}`;
27
+ return `//${path}`;
28
+ }
29
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
30
+ };
31
+ const join = function(...segments) {
32
+ let path = "";
33
+ for (const seg of segments) {
34
+ if (!seg) continue;
35
+ if (path.length > 0) {
36
+ const pathTrailing = path[path.length - 1] === "/";
37
+ const segLeading = seg[0] === "/";
38
+ if (pathTrailing && segLeading) path += seg.slice(1);
39
+ else path += pathTrailing || segLeading ? seg : `/${seg}`;
40
+ } else path += seg;
41
+ }
42
+ return normalize(path);
43
+ };
44
+ function cwd() {
45
+ if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
46
+ return "/";
47
+ }
48
+ const resolve = function(...arguments_) {
49
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
50
+ let resolvedPath = "";
51
+ let resolvedAbsolute = false;
52
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
53
+ const path = index >= 0 ? arguments_[index] : cwd();
54
+ if (!path || path.length === 0) continue;
55
+ resolvedPath = `${path}/${resolvedPath}`;
56
+ resolvedAbsolute = isAbsolute(path);
57
+ }
58
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
59
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
60
+ return resolvedPath.length > 0 ? resolvedPath : ".";
61
+ };
62
+ function normalizeString(path, allowAboveRoot) {
63
+ let res = "";
64
+ let lastSegmentLength = 0;
65
+ let lastSlash = -1;
66
+ let dots = 0;
67
+ let char = null;
68
+ for (let index = 0; index <= path.length; ++index) {
69
+ if (index < path.length) char = path[index];
70
+ else if (char === "/") break;
71
+ else char = "/";
72
+ if (char === "/") {
73
+ if (lastSlash === index - 1 || dots === 1);
74
+ else if (dots === 2) {
75
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
76
+ if (res.length > 2) {
77
+ const lastSlashIndex = res.lastIndexOf("/");
78
+ if (lastSlashIndex === -1) {
79
+ res = "";
80
+ lastSegmentLength = 0;
81
+ } else {
82
+ res = res.slice(0, lastSlashIndex);
83
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
84
+ }
85
+ lastSlash = index;
86
+ dots = 0;
87
+ continue;
88
+ } else if (res.length > 0) {
89
+ res = "";
90
+ lastSegmentLength = 0;
91
+ lastSlash = index;
92
+ dots = 0;
93
+ continue;
94
+ }
95
+ }
96
+ if (allowAboveRoot) {
97
+ res += res.length > 0 ? "/.." : "..";
98
+ lastSegmentLength = 2;
99
+ }
100
+ } else {
101
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
102
+ else res = path.slice(lastSlash + 1, index);
103
+ lastSegmentLength = index - lastSlash - 1;
104
+ }
105
+ lastSlash = index;
106
+ dots = 0;
107
+ } else if (char === "." && dots !== -1) ++dots;
108
+ else dots = -1;
109
+ }
110
+ return res;
111
+ }
112
+ const isAbsolute = function(p) {
113
+ return _IS_ABSOLUTE_RE.test(p);
114
+ };
115
+ const extname = function(p) {
116
+ if (p === "..") return "";
117
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
118
+ return match && match[1] || "";
119
+ };
120
+ const dirname = function(p) {
121
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
122
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
123
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
124
+ };
125
+ const basename = function(p, extension) {
126
+ const segments = normalizeWindowsPath(p).split("/");
127
+ let lastSegment = "";
128
+ for (let i = segments.length - 1; i >= 0; i--) {
129
+ const val = segments[i];
130
+ if (val) {
131
+ lastSegment = val;
132
+ break;
133
+ }
134
+ }
135
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
136
+ };
137
+
138
+ //#endregion
139
+ exports.basename = basename;
140
+ exports.dirname = dirname;
141
+ exports.extname = extname;
142
+ exports.isAbsolute = isAbsolute;
143
+ exports.join = join;
144
+ exports.normalize = normalize;
145
+ exports.resolve = resolve;