@powerlines/plugin-env 0.16.50 → 0.16.52

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 (209) hide show
  1. package/dist/babel/plugin.mjs +1 -2
  2. package/dist/components/docs.cjs +1 -1
  3. package/dist/components/docs.mjs +2 -3
  4. package/dist/components/env-builtin.mjs +1 -2
  5. package/dist/helpers/automd-generator.cjs +1 -1
  6. package/dist/helpers/automd-generator.mjs +2 -3
  7. package/dist/helpers/create-reflection-resource.mjs +1 -2
  8. package/dist/helpers/docs-helper.cjs +1 -1
  9. package/dist/helpers/docs-helper.mjs +2 -3
  10. package/dist/helpers/load.cjs +1 -1
  11. package/dist/helpers/load.mjs +2 -3
  12. package/dist/helpers/persistence.cjs +1 -1
  13. package/dist/helpers/persistence.mjs +2 -3
  14. package/dist/helpers/reflect.cjs +2 -2
  15. package/dist/helpers/reflect.mjs +3 -4
  16. package/dist/helpers/source-file-env.mjs +1 -2
  17. package/dist/helpers/template-helpers.mjs +1 -2
  18. package/dist/index.cjs +3 -3
  19. package/dist/index.mjs +4 -5
  20. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/parse-type-definition.cjs +1 -1
  21. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/parse-type-definition.mjs +2 -3
  22. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/to-array.cjs +1 -1
  23. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/to-array.mjs +2 -3
  24. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +1 -1
  25. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +2 -3
  26. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +1 -1
  27. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +2 -3
  28. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +1 -1
  29. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +2 -3
  30. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +1 -1
  31. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +2 -3
  32. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +1 -1
  33. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +2 -3
  34. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +1 -1
  35. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +2 -3
  36. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-parent-path.cjs +1 -1
  37. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-parent-path.mjs +2 -3
  38. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-type.cjs +1 -1
  39. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-type.mjs +2 -3
  40. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/join-paths.cjs +1 -1
  41. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/join-paths.mjs +2 -3
  42. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/regex.cjs +1 -1
  43. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/regex.mjs +2 -3
  44. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/slash.cjs +1 -1
  45. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/slash.mjs +2 -3
  46. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +1 -2
  47. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +1 -2
  48. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +1 -2
  49. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +1 -2
  50. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +1 -2
  51. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +1 -2
  52. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +1 -2
  53. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +1 -2
  54. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +1 -2
  55. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +1 -2
  56. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs +1 -2
  57. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +1 -2
  58. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +1 -2
  59. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +1 -2
  60. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +1 -2
  61. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -2
  62. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1 -2
  63. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -2
  64. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1 -2
  65. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +1 -2
  66. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +1 -2
  67. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +1 -2
  68. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -2
  69. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +1 -2
  70. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +1 -2
  71. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -2
  72. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -2
  73. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +1 -2
  74. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +1 -2
  75. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +1 -2
  76. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +1 -2
  77. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +1 -2
  78. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +1 -2
  79. package/dist/types/plugin.mjs +1 -2
  80. package/dist/types/runtime.mjs +1 -2
  81. package/package.json +18 -18
  82. package/dist/babel/index.d.cts +0 -2
  83. package/dist/babel/index.d.mts +0 -2
  84. package/dist/babel/plugin.d.cts +0 -9
  85. package/dist/babel/plugin.d.cts.map +0 -1
  86. package/dist/babel/plugin.d.mts +0 -9
  87. package/dist/babel/plugin.d.mts.map +0 -1
  88. package/dist/babel/plugin.mjs.map +0 -1
  89. package/dist/components/docs.d.cts +0 -25
  90. package/dist/components/docs.d.cts.map +0 -1
  91. package/dist/components/docs.d.mts +0 -25
  92. package/dist/components/docs.d.mts.map +0 -1
  93. package/dist/components/docs.mjs.map +0 -1
  94. package/dist/components/env-builtin.d.cts +0 -23
  95. package/dist/components/env-builtin.d.cts.map +0 -1
  96. package/dist/components/env-builtin.d.mts +0 -23
  97. package/dist/components/env-builtin.d.mts.map +0 -1
  98. package/dist/components/env-builtin.mjs.map +0 -1
  99. package/dist/components/index.d.cts +0 -3
  100. package/dist/components/index.d.mts +0 -3
  101. package/dist/helpers/automd-generator.d.cts +0 -15
  102. package/dist/helpers/automd-generator.d.cts.map +0 -1
  103. package/dist/helpers/automd-generator.d.mts +0 -15
  104. package/dist/helpers/automd-generator.d.mts.map +0 -1
  105. package/dist/helpers/automd-generator.mjs.map +0 -1
  106. package/dist/helpers/create-reflection-resource.d.cts +0 -14
  107. package/dist/helpers/create-reflection-resource.d.cts.map +0 -1
  108. package/dist/helpers/create-reflection-resource.d.mts +0 -14
  109. package/dist/helpers/create-reflection-resource.d.mts.map +0 -1
  110. package/dist/helpers/create-reflection-resource.mjs.map +0 -1
  111. package/dist/helpers/docs-helper.d.cts +0 -14
  112. package/dist/helpers/docs-helper.d.cts.map +0 -1
  113. package/dist/helpers/docs-helper.d.mts +0 -14
  114. package/dist/helpers/docs-helper.d.mts.map +0 -1
  115. package/dist/helpers/docs-helper.mjs.map +0 -1
  116. package/dist/helpers/index.d.cts +0 -7
  117. package/dist/helpers/index.d.mts +0 -7
  118. package/dist/helpers/load.d.cts +0 -36
  119. package/dist/helpers/load.d.cts.map +0 -1
  120. package/dist/helpers/load.d.mts +0 -36
  121. package/dist/helpers/load.d.mts.map +0 -1
  122. package/dist/helpers/load.mjs.map +0 -1
  123. package/dist/helpers/persistence.d.cts +0 -85
  124. package/dist/helpers/persistence.d.cts.map +0 -1
  125. package/dist/helpers/persistence.d.mts +0 -85
  126. package/dist/helpers/persistence.d.mts.map +0 -1
  127. package/dist/helpers/persistence.mjs.map +0 -1
  128. package/dist/helpers/reflect.d.cts +0 -69
  129. package/dist/helpers/reflect.d.cts.map +0 -1
  130. package/dist/helpers/reflect.d.mts +0 -69
  131. package/dist/helpers/reflect.d.mts.map +0 -1
  132. package/dist/helpers/reflect.mjs.map +0 -1
  133. package/dist/helpers/source-file-env.d.cts +0 -9
  134. package/dist/helpers/source-file-env.d.cts.map +0 -1
  135. package/dist/helpers/source-file-env.d.mts +0 -9
  136. package/dist/helpers/source-file-env.d.mts.map +0 -1
  137. package/dist/helpers/source-file-env.mjs.map +0 -1
  138. package/dist/helpers/template-helpers.d.cts +0 -16
  139. package/dist/helpers/template-helpers.d.cts.map +0 -1
  140. package/dist/helpers/template-helpers.d.mts +0 -16
  141. package/dist/helpers/template-helpers.d.mts.map +0 -1
  142. package/dist/helpers/template-helpers.mjs.map +0 -1
  143. package/dist/index.d.cts +0 -18
  144. package/dist/index.d.cts.map +0 -1
  145. package/dist/index.d.mts +0 -18
  146. package/dist/index.d.mts.map +0 -1
  147. package/dist/index.mjs.map +0 -1
  148. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
  150. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
  152. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
  154. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
  156. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
  158. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
  160. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +0 -1
  162. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
  164. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +0 -1
  166. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +0 -1
  168. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +0 -1
  170. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs.map +0 -1
  172. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
  174. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +0 -1
  176. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
  178. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +0 -1
  180. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +0 -1
  182. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
  184. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +0 -1
  186. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +0 -1
  188. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +0 -1
  190. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
  192. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +0 -1
  194. package/dist/types/index.d.cts +0 -3
  195. package/dist/types/index.d.mts +0 -3
  196. package/dist/types/plugin.d.cts +0 -168
  197. package/dist/types/plugin.d.cts.map +0 -1
  198. package/dist/types/plugin.d.mts +0 -168
  199. package/dist/types/plugin.d.mts.map +0 -1
  200. package/dist/types/plugin.mjs.map +0 -1
  201. package/dist/types/runtime.d.cts +0 -792
  202. package/dist/types/runtime.d.cts.map +0 -1
  203. package/dist/types/runtime.d.mts +0 -792
  204. package/dist/types/runtime.d.mts.map +0 -1
  205. package/dist/types/runtime.mjs.map +0 -1
  206. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
  207. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
  208. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
  209. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport { EnvInterface, SecretsInterface } from \"../types/runtime\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\n/**\n * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the environment configuration type definition from\n * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n */\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeEnvReflections(\n context,\n [\n await readEnvTypeReflection(context, \"env\"),\n config,\n resolveClassType(\n await reflectType(context, await getEnvDefaultTypeDefinition(context))\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n\n/**\n * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the secrets configuration type definition from\n * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n */\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeSecretsReflections(\n context,\n [\n await readSecretsReflection(context),\n config,\n resolveClassType(\n await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n )\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n"],"mappings":";;;;;;;;;;AAUA,SAAS,aAAa,IAAI,MAAM;AAC5B,IAAG,SAAS;AACZ,QAAO;;AAyBX,SAAgB,oBAAM,SAAA,aAAA;AAIlB,uCAFI,MAAM,MAAM,YAAY,IAAG,cAAA,eAAA,WAAA,MAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA,CAAA,EAC9B,CAAC;;AAGN,oBAAoB,SAAS;OAAO;CAAc;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;AAClD,SAAgB,wBAAwB,SAAS,aAAa;AAI9D,QAHI,wBAAA,SAAA;;;;OAEC,CAAC;;AAGN,wBAAwB,SAAS;OAAM;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;AACvC,MAAM,gCAAqB;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAE3B,IAAa,UAAb,MAAqB;CASjB,WAAW;CACX,OAAO;;CAGP,OAAO;CACP,UAAU;;CAEV,cAAc;;CAEd,aAAa;;;CAMb,OAAO,SAAS;EAAC;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA,WAAA;AAAA,UAAA;;EAAA;EAAA;EAAA;EAAA;EAAA,WAAA;AAAA,UAAA;;EAAA;EAAA;EAAA,WAAA;AAAA,UAAA;;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AAE,OAAO;AACV,QAAO,OAAO;AACd,QAAO;;AAEX,wBAAM,SAAA;OAAA;CAAA;OAAA;CAAA;QAAA,EAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;AAYN,eAAS,WAAA,SAAA,MAAA,MAAA;CACL,IAAI;AACJ,KAAC,gCACI,MAAA,YAAA,SAAA;EACN,MAAA,CAAA,aAAA,MAAA,QAAA,gBAAA,cAAA,GACe,UAAG,QAAA,gBAAA,eAAA,KAAA;EAET;EACZ,CAAA;AAGI,QAAO,oBAAgB,SAAA;EACnB,MAAM,sBAAsB,SAAK,MAAA;EACjC;EACA,iBAAO,MAAA,YAAA,SAAA,MAAA,4BAAA,QAAA,CAAA,CAAA;EACV,CAAC,OAAO,QAAQ,CAAC;;AAEtB,WAAW,SAAS;OAAO;CAAK;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;AAYhC,eAAsB,eAAA,SAAA,MAAA,MAAA;CAClB,IAAI;AACJ,KAAI,KAOA,UAAS,iBANX,MAAA,YAAA,SAAA;EACA,MAAA,CAAA,aAAA,MAAA,QAAA,gBAAA,cAAA,GACY,UAAO,QAAA,gBAAA,eAAA,KAAA;EAEb;EACH,CAAC,CAC8B;AAEpC,QAAO,wBAAwB,SAAS;EACpC,MAAM,sBAAY,QAAA;EAClB;EACA,iBAAgB,MAAA,YAAA,SAAA,MAAA,gCAAA,QAAA,CAAA,CAAA;EACnB,CAAC,OAAG,QAAA,CAAA;;AAET,eAAK,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
@@ -1,9 +0,0 @@
1
- import { DotenvParseOutput } from "@stryke/env/types";
2
-
3
- //#region src/helpers/source-file-env.d.ts
4
- type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
5
- declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
6
- declare function formatEnvField(key: string): string;
7
- //#endregion
8
- export { formatEnvField, removeEnvPrefix };
9
- //# sourceMappingURL=source-file-env.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file-env.d.cts","names":[],"sources":["../../src/helpers/source-file-env.ts"],"sourcesContent":[],"mappings":";;;KAuBK,kBAAkB,+BAA+B;iBAEtC,6BAA6B,iCACtC,OACJ,UAAU;AAJR,iBA+BW,cAAA,CA/BsC,GAAA,EAAA,MAAA,CAAA,EAAA,MAAiB"}
@@ -1,9 +0,0 @@
1
- import { DotenvParseOutput } from "@stryke/env/types";
2
-
3
- //#region src/helpers/source-file-env.d.ts
4
- type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
5
- declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
6
- declare function formatEnvField(key: string): string;
7
- //#endregion
8
- export { formatEnvField, removeEnvPrefix };
9
- //# sourceMappingURL=source-file-env.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file-env.d.mts","names":[],"sources":["../../src/helpers/source-file-env.ts"],"sourcesContent":[],"mappings":";;;KAuBK,kBAAkB,+BAA+B;iBAEtC,6BAA6B,iCACtC,OACJ,UAAU;AAJR,iBA+BW,cAAA,CA/BsC,GAAA,EAAA,MAAA,CAAA,EAAA,MAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file-env.mjs","names":[],"sources":["../../src/helpers/source-file-env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\n\ntype TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;\n\nexport function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(\n env: TEnv\n): TReturned<TEnv> {\n if (isString(env)) {\n let name: string = ENV_PREFIXES.reduce((ret, prefix) => {\n if (ret.startsWith(prefix)) {\n ret = ret.slice(prefix.length);\n }\n\n return ret;\n }, env.toUpperCase());\n\n while (name.startsWith(\"_\")) {\n name = name.slice(1);\n }\n\n return name as TReturned<TEnv>;\n }\n\n return Object.keys(env).reduce((ret, key) => {\n const name = removeEnvPrefix(key);\n if (name) {\n (ret as DotenvParseOutput)[name] = env[key];\n }\n\n return ret;\n }, {} as TReturned<TEnv>);\n}\n\nexport function formatEnvField(key: string): string {\n return camelCase(removeEnvPrefix(key));\n}\n"],"mappings":";;;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;AAKX,MAAM,eAAe;CAAC;CAAQ;CAAa;CAAiC;;AAExE,KAAI,SAAS,IAAI,EAAE;EACf,IAAI,OAAO,aAAa,OAAO,cAAc,KAAK,WAAW;AACzD,OAAI,IAAI,WAAW,OAAO,CACtB,OAAM,IAAI,MAAM,OAAO,OAAO;AAElC,UAAO;;;;;;;AAEX,SAAO,KAAK,WAAW,IAAI;AAG3B,SAAO;;AAEX,QAAO,OAAO,KAAK,IAAI,CAAC,OAAO,cAAc,KAAK,QAAE;;AAEhD,MAAI;AAGJ,SAAE;IACH;EAAC;EAAO;EAAI;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA;;AAEnB,gBAAgB,SAAS;CAAC;OAAa;CAAc;CAAO;CAAA;AAC5D,SAAgB,eAAe,KAAG;AAC9B,QAAO,UAAU,gBAAgB,IAAC,CAAA"}
@@ -1,16 +0,0 @@
1
- import { EnvPluginContext, EnvType } from "../types/plugin.cjs";
2
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/helpers/template-helpers.d.ts
5
-
6
- /**
7
- * Creates the reflection data used when generating runtime template files.
8
- *
9
- * @param context - The context for the configuration plugin.
10
- * @param name - The name of the configuration template.
11
- * @returns The reflection for the specified configuration template.
12
- */
13
- declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
14
- //#endregion
15
- export { createTemplateReflection };
16
- //# sourceMappingURL=template-helpers.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-helpers.d.cts","names":[],"sources":["../../src/helpers/template-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;AAGU,iBAHY,wBAAA,CAGZ,OAAA,EAFC,gBAED,EAAA,IAAA,CAAA,EADD,OACC,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA,GAAA,CAAA,CAAA"}
@@ -1,16 +0,0 @@
1
- import { EnvPluginContext, EnvType } from "../types/plugin.mjs";
2
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/helpers/template-helpers.d.ts
5
-
6
- /**
7
- * Creates the reflection data used when generating runtime template files.
8
- *
9
- * @param context - The context for the configuration plugin.
10
- * @param name - The name of the configuration template.
11
- * @returns The reflection for the specified configuration template.
12
- */
13
- declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
14
- //#endregion
15
- export { createTemplateReflection };
16
- //# sourceMappingURL=template-helpers.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-helpers.d.mts","names":[],"sources":["../../src/helpers/template-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;AAGU,iBAHY,wBAAA,CAGZ,OAAA,EAFC,gBAED,EAAA,IAAA,CAAA,EADD,OACC,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA,GAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-helpers.mjs","names":[],"sources":["../../src/helpers/template-helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext, EnvType } from \"../types/plugin\";\nimport { readEnvTypeReflection } from \"./persistence\";\n\n/**\n * Creates the reflection data used when generating runtime template files.\n *\n * @param context - The context for the configuration plugin.\n * @param name - The name of the configuration template.\n * @returns The reflection for the specified configuration template.\n */\nexport async function createTemplateReflection(\n context: EnvPluginContext,\n name?: EnvType\n): Promise<ReflectionClass<any>> {\n const reflection = await readEnvTypeReflection(context, name);\n\n reflection.getProperties().forEach(prop => {\n const aliases = prop.getAlias();\n aliases.filter(Boolean).forEach(alias => {\n reflection.addProperty({\n name: alias,\n optional: prop.isOptional() ? true : undefined,\n readonly: prop.isReadonly() ? true : undefined,\n description: prop.getDescription(),\n visibility: prop.getVisibility(),\n type: prop.getType(),\n default: prop.getDefaultValue(),\n tags: {\n hidden: prop.isHidden(),\n ignore: prop.isIgnored(),\n internal: prop.isInternal(),\n alias: prop\n .getAlias()\n .filter(a => a !== alias)\n .concat(prop.name),\n title: prop.getTitle() || titleCase(prop.name),\n readonly: prop.isReadonly(),\n permission: prop.getPermission(),\n domain: prop.getDomain()\n }\n });\n });\n });\n\n return reflection;\n}\n"],"mappings":";;;;;;AAIA,SAAS,aAAa,IAAI,MAAM;AAC5B,IAAG,SAAS;AACZ,QAAO;;;;;;;;;;CA8BP,MAAM,aAAa,MAAM,sBAAgB,SAAA,KAAA;AACzC,YAAW,eAAe,CAAC,QAAI,cAAA,SAAA;AAE3B,EADgB,KAAK,UAAU,CACvB,OAAO,QAAM,CAAA,QAAA,cAAA,UAAA;AACjB,cAAO,YAAA;IACH,MAAM;IACN,UAAU,KAAK,YAAY,GAAG,OAAO;IACrC,UAAU,KAAK,YAAW,GAAA,OAAA;IAC1B,aAAa,KAAK,gBAAM;IACxB,YAAY,KAAA,eAAA;IACZ,MAAM,KAAK,SAAS;IACtB,SAAA,KAAA,iBAAA;IACE,MAAM;KACF,QAAQ,KAAK,UAAC;KACd,QAAQ,KAAK,WAAI;KACjB,UAAA,KAAA,YAAA;KACA,OAAE,KACG,UAAU,CACV,OAAK,cAAA,MAAA,MAAA,OAAA;MAAA;MAAA;MAAA;MAAA,CAAA,CAAA,CACL,OAAO,KAAK,KAAK;KACtB,OAAO,KAAK,UAAK,IAAA,UAAA,KAAA,KAAA;KACjB,UAAU,KAAK,YAAO;KACtB,YAAY,KAAC,eAAA;KACzB,QAAA,KAAA,WAAA;KACA;IACF,CAAA;KACF;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;;;;;;AAEA,QAAO"}
package/dist/index.d.cts DELETED
@@ -1,18 +0,0 @@
1
- import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.cjs";
2
- import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.cjs";
3
- import "./types/index.cjs";
4
- import { Plugin } from "powerlines";
5
-
6
- //#region src/index.d.ts
7
- declare module "powerlines" {
8
- interface Config {
9
- env?: EnvPluginOptions;
10
- }
11
- }
12
- /**
13
- * A Powerlines plugin to inject environment variables into the source code.
14
- */
15
- declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
16
- //#endregion
17
- export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, plugin as default, plugin };
18
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAgEU;EAJmB;;;;;AAWhB,cAAA,MA6VZ,EAAA,CAAA,iBA7VuC,gBA6VvC,GA7V0D,gBA6V1D,CAAA,CAAA,OAAA,CAAA,EA5VU,gBA4VV,EAAA,GADM,MACN,CADa,QACb,CAAA,EAAA"}
package/dist/index.d.mts DELETED
@@ -1,18 +0,0 @@
1
- import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.mjs";
2
- import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.mjs";
3
- import "./types/index.mjs";
4
- import { Plugin } from "powerlines";
5
-
6
- //#region src/index.d.ts
7
- declare module "powerlines" {
8
- interface Config {
9
- env?: EnvPluginOptions;
10
- }
11
- }
12
- /**
13
- * A Powerlines plugin to inject environment variables into the source code.
14
- */
15
- declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
16
- //#endregion
17
- export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, plugin as default, plugin };
18
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAgEU;EAJmB;;;;;AAWhB,cAAA,MA6VZ,EAAA,CAAA,iBA7VuC,gBA6VvC,GA7V0D,gBA6V1D,CAAA,CAAA,OAAA,CAAA,EA5VU,gBA4VV,EAAA,GADM,MACN,CADa,QACb,CAAA,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["ReflectionClass","ReflectionKind","alloy","render","automd","babel","parseTypeDefinition","toArray","ENV_PREFIXES","existsSync","joinPaths","constantCase","isSetString","defu","envBabelPlugin","EnvDocsFile","EnvBuiltin","env","getDocsOutputPath","loadEnv","getEnvDefaultTypeDefinition","getEnvReflectionsPath","getEnvTypeReflectionsPath","getSecretsDefaultTypeDefinition","readEnvReflection","readEnvTypeReflection","readSecretsReflection","writeEnvReflection","writeEnvTypeReflection","reflectEnv","reflectSecrets","plugin","options","name","config","debug","types","validate","inject","prefix","transform","plugins","file","fs","resolve","warn","envDefaultTypeDefinition","secrets","secretsDefaultTypeDefinition","reduce","ret","formattedPrefix","includes","push","framework","filter","Boolean","replace","configResolved","parsed","used","injected","command","skipCache","persistedMeta","checksum","meta","Error","getProperties","length","envWithAlias","prop","getAlias","Object","entries","forEach","key","value","unprefixedKey","startsWith","slice","aliasKey","find","reverse","hasProperty","getProperty","setDefaultValue","kind","objectLiteral","typeName","description","prepare","_self$","result","_$createComponent","defaultConfig","reflection","order","handler","trace","docs","levelOffset","buildEnd","reflectionPath","generators","vite","envPrefix"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ReflectionClass,\n ReflectionKind\n} from \"@powerlines/deepkit/vendor/type\";\nimport alloy from \"@powerlines/plugin-alloy\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport automd from \"@powerlines/plugin-automd\";\nimport babel from \"@powerlines/plugin-babel\";\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport type { UserConfig as ViteUserConfig } from \"vite\";\nimport { envBabelPlugin } from \"./babel/plugin\";\nimport { EnvDocsFile } from \"./components/docs\";\nimport { EnvBuiltin } from \"./components/env-builtin\";\nimport { env } from \"./helpers/automd-generator\";\nimport { getDocsOutputPath } from \"./helpers/docs-helper\";\nimport { loadEnv } from \"./helpers/load\";\nimport {\n getEnvDefaultTypeDefinition,\n getEnvReflectionsPath,\n getEnvTypeReflectionsPath,\n getSecretsDefaultTypeDefinition,\n readEnvReflection,\n readEnvTypeReflection,\n readSecretsReflection,\n writeEnvReflection,\n writeEnvTypeReflection\n} from \"./helpers/persistence\";\nimport { reflectEnv, reflectSecrets } from \"./helpers/reflect\";\nimport { EnvPluginContext, EnvPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n env?: EnvPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = <TContext extends EnvPluginContext = EnvPluginContext>(\n options: EnvPluginOptions = {}\n) => {\n return [\n alloy(options.alloy),\n babel(options.babel),\n {\n name: \"env\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `env` build plugin.\"\n );\n\n const config = {\n env: defu(options, {\n types: {} as TypeDefinitionParameter,\n validate: false,\n inject: false,\n prefix: []\n }),\n transform: {\n babel: {\n plugins: [envBabelPlugin]\n }\n }\n };\n\n if (\n isSetString(config.env.types) ||\n (config.env.types && isSetString(config.env.types.file))\n ) {\n config.env.types = parseTypeDefinition(\n config.env.types\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.types.file);\n if (file) {\n config.env.types.file = file;\n }\n } else {\n this.warn(\n \"The `env.types` configuration parameter was not provided. Please ensure this is expected.\"\n );\n\n const envDefaultTypeDefinition =\n await getEnvDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(envDefaultTypeDefinition.file);\n if (file) {\n config.env.types = parseTypeDefinition(\n `${file}#${envDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n if (\n isSetString(config.env.secrets) ||\n (config.env.secrets && isSetString(config.env.secrets.file))\n ) {\n config.env.secrets = parseTypeDefinition(\n config.env.secrets\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.secrets.file);\n if (file) {\n config.env.secrets.file = file;\n }\n } else {\n const secretsDefaultTypeDefinition =\n await getSecretsDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(secretsDefaultTypeDefinition.file);\n if (file) {\n config.env.secrets = parseTypeDefinition(\n `${file}#${secretsDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n config.env.prefix = toArray(\n (config.env.prefix ?? []) as string[]\n ).reduce(\n (ret: string[], prefix: string) => {\n const formattedPrefix = constantCase(prefix);\n if (!ret.includes(formattedPrefix)) {\n ret.push(formattedPrefix);\n }\n\n return ret;\n },\n [\n ...ENV_PREFIXES,\n \"POWERLINES_\",\n this.config.framework &&\n this.config.framework !== \"powerlines\" &&\n `${constantCase(this.config.framework)}_`\n ].filter(Boolean) as string[]\n );\n\n config.env.prefix = toArray(config.env.prefix).reduce((ret, prefix) => {\n if (!ret.includes(prefix.replace(/_$/g, \"\"))) {\n ret.push(prefix.replace(/_$/g, \"\"));\n }\n return ret;\n }, [] as string[]);\n\n return config;\n },\n async configResolved() {\n this.debug(\n `Environment plugin configuration has been resolved for the Powerlines project.`\n );\n\n this.env = defu(\n {\n parsed: await loadEnv(this, this.config.env)\n },\n this.env ?? {},\n {\n types: {\n env: {}\n },\n used: {\n env: {},\n secrets: {}\n },\n parsed: {},\n injected: {}\n }\n ) as EnvPluginContext[\"env\"];\n\n if (\n this.config.command !== \"prepare\" &&\n !this.config.skipCache &&\n this.persistedMeta?.checksum === this.meta.checksum &&\n existsSync(getEnvTypeReflectionsPath(this, \"env\"))\n ) {\n this.debug(\n `Skipping reflection initialization as the meta checksum has not changed.`\n );\n\n this.env.types.env = await readEnvTypeReflection(this, \"env\");\n\n if (existsSync(getEnvReflectionsPath(this, \"env\"))) {\n this.env.used.env = await readEnvReflection(this);\n }\n\n if (existsSync(getEnvTypeReflectionsPath(this, \"secrets\"))) {\n this.env.types.secrets = await readEnvTypeReflection(\n this,\n \"secrets\"\n );\n }\n\n if (existsSync(getEnvReflectionsPath(this, \"secrets\"))) {\n this.env.used.secrets = await readSecretsReflection(this);\n }\n } else {\n this.debug(\n `Starting environment configuration reflection initialization.`\n );\n\n this.env.types.env = await reflectEnv(\n this,\n this.config.env.types?.file,\n this.config.env.types?.name\n );\n if (!this.env.types.env) {\n throw new Error(\n \"Failed to find the environment configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.env, \"env\");\n\n this.env.types.secrets = await reflectSecrets(\n this,\n this.config.env.secrets?.file,\n this.config.env.secrets?.name\n );\n if (!this.env.types.secrets) {\n throw new Error(\n \"Failed to find the secrets configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.secrets, \"secrets\");\n\n this.debug(\n `Resolved ${\n this.env.types.env.getProperties().length ?? 0\n } environment configuration parameters and ${\n this.env.types.secrets?.getProperties().length ?? 0\n } secret configuration parameters`\n );\n\n const envWithAlias = this.env.types.env\n .getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n Object.entries(await loadEnv(this, this.config.env)).forEach(\n ([key, value]) => {\n const unprefixedKey = this.config.env.prefix.reduce(\n (ret, prefix) => {\n if (key.replace(/_$/g, \"\").startsWith(prefix)) {\n return key.replace(/_$/g, \"\").slice(prefix.length);\n }\n return ret;\n },\n key\n );\n\n const aliasKey = envWithAlias.find(prop =>\n prop?.getAlias().reverse().includes(unprefixedKey)\n );\n if (this.env.types.env?.hasProperty(unprefixedKey) || aliasKey) {\n this.env.types.env\n .getProperty(unprefixedKey)\n .setDefaultValue(value);\n }\n }\n );\n\n this.env.used.env = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.env\n );\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n\n if (this.env.types.secrets) {\n await writeEnvTypeReflection(\n this,\n this.env.types.secrets,\n \"secrets\"\n );\n\n this.env.used.secrets = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.secrets\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async prepare() {\n this.debug(\n `Preparing the Environment runtime artifacts for the Powerlines project.`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvBuiltin\n defaultConfig={this.config.env.defaultConfig}\n reflection={result}\n />\n );\n },\n transform: {\n order: \"post\",\n async handler() {\n if (this.env.used.env.getProperties().length > 0) {\n this.trace(\n `Persisting used environment configuration reflections to ${getEnvReflectionsPath(\n this,\n \"env\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n\n if (this.env.used.secrets.getProperties().length > 0) {\n this.trace(\n `Persisting used secret configuration reflections to ${getEnvReflectionsPath(\n this,\n \"secrets\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async docs() {\n this.debug(\n `Documenting environment variables configuration values in \"${joinPaths(\n getDocsOutputPath(this),\n \"env.md\"\n )}\"`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvDocsFile levelOffset={0} reflection={result} />\n );\n },\n async buildEnd() {\n const reflectionPath = getEnvReflectionsPath(this, \"env\");\n\n this.debug(`Writing env reflection types to ${reflectionPath}.`);\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n },\n {\n name: \"env:automd-generator\",\n config() {\n return {\n automd: defu(options.automd ?? {}, {\n generators: {\n env: env(this)\n }\n })\n };\n }\n },\n {\n name: \"env:vite\",\n vite: {\n configResolved(this: TContext) {\n return {\n envPrefix: this.config?.env?.prefix\n } as ViteUserConfig;\n }\n }\n },\n automd(options.automd)\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAa+B,UACXC,UAA4B,EAAE,KAC3B;AACH,QAAO;EACL9B,MAAM8B,QAAQ9B,MAAM;EACpBG,MAAM2B,QAAQ3B,MAAM;EACpB;GACE4B,MAAM;GACN,MAAMC,SAAS;AACb,SAAKC,MACH,yEACD;IAED,MAAMD,SAAS;KACbjB,KAAKJ,KAAKmB,SAAS;MACjBI,OAAO,EAA6B;MACpCC,UAAU;MACVC,QAAQ;MACRC,QAAQ,EAAA;MACT,CAAC;KACFC,WAAW,EACTnC,OAAO,EACLoC,SAAS,CAAC3B,eAAc,EAC1B,EACF;KACD;AAED,QACEF,YAAYsB,OAAOjB,IAAImB,M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AAI2C,KAAK3C,IAAImD,eAAe,CAACC,SAAS,GAAG;AAChD,WAAK8B,MACH,4DAA4D9E,sBAC1D,MACA,MACD,CAAA,GACF;AACD,YAAMM,mBAAmB,MAAM,KAAKV,IAAI2C,KAAK3C,KAAK,MAAM;;AAG1D,SAAI,KAAKA,IAAI2C,KAAKb,QAAQqB,eAAe,CAACC,SAAS,GAAG;AACpD,WAAK8B,MACH,uDAAuD9E,sBACrD,MACA,UACD,CAAA,GACF;AACD,YAAMM,mBAAmB,MAAM,KAAKV,IAAI2C,KAAKb,SAAS,UAAU;;;IAGrE;GACD,MAAMqD,OAAO;AACX,SAAKjE,MACH,8DAA8DzB,UAC5DQ,kBAAkB,KAAK,EACvB,SACD,CAAA,GACF;IAED,MAAM2E,SAAS,MAAMpE,sBAAsB,MAAM,MAAM;AAEvD,WAAOtB,OACL,MAAI2F,gBACH/E,aAAW;KAACsF,aAAa;KAAGL,YAAYH;KAAM,CACjD,CAAC;;GAEH,MAAMS,WAAW;IACf,MAAMC,iBAAiBlF,sBAAsB,MAAM,MAAM;AAEzD,SAAKc,MAAM,mCAAmCoE,eAAc,GAAI;AAEhE,UAAM5E,mBAAmB,MAAM,KAAKV,IAAI2C,KAAK3C,KAAK,MAAM;;GAE3D;EACD;GACEgB,MAAM;GACNC,SAAS;AACP,WAAO,EACL9B,QAAQS,KAAKmB,QAAQ5B,UAAU,EAAE,EAAE,EACjCoG,YAAY,EACVvF,KAAKA,IAAI,KAAI,EACf,EACD,CAAA,EACF;;GAEJ;EACD;GACEgB,MAAM;GACNwE,MAAM,EACJ/C,iBAA+B;AAC7B,WAAO,EACLgD,WAAW,KAAKxE,QAAQjB,KAAKsB,QAC9B;MAEL;GACD;EACDnC,OAAO4B,QAAQ5B,OAAO;EACvB;;AAGH,kBAAe2B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-type-definition.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/parse-type-definition.mjs"],"sourcesContent":["import { isObject } from \"./type-checks/src/is-object.mjs\";\nimport { isString } from \"./type-checks/src/is-string.mjs\";\nimport \"./type-checks/src/index.mjs\";\n\n//#region src/parse-type-definition.ts\n/**\n* Parse a type definition parameter into a {@link TypeDefinition} object\n*\n* @param param - The parameter to parse\n* @returns The parsed type definition\n*/\nconst parseTypeDefinition = (param) => {\n\tif (isString(param)) {\n\t\tif (param.includes(\":\")) {\n\t\t\tconst params = param.split(\":\");\n\t\t\tif (params.length > 1 && params[0]) return {\n\t\t\t\tfile: params[0],\n\t\t\t\tname: params[1]\n\t\t\t};\n\t\t}\n\t\tif (param.includes(\"#\")) {\n\t\t\tconst params = param.split(\"#\");\n\t\t\tif (params.length > 1 && params[0]) return {\n\t\t\t\tfile: params[0],\n\t\t\t\tname: params[1]\n\t\t\t};\n\t\t}\n\t\treturn { file: param };\n\t}\n\tif (isObject(param)) return {\n\t\tfile: param.file,\n\t\tname: param.name\n\t};\n};\n\n//#endregion\nexport { parseTypeDefinition };\n//# sourceMappingURL=parse-type-definition.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAWA,MAAM,uBAAuB,UAAU;AACtC,KAAI,SAAS,MAAM,EAAE;AACpB,MAAI,MAAM,SAAS,IAAI,EAAE;GACxB,MAAM,SAAS,MAAM,MAAM,IAAI;AAC/B,OAAI,OAAO,SAAS,KAAK,OAAO,GAAI,QAAO;IAC1C,MAAM,OAAO;IACb,MAAM,OAAO;IACb;;AAEF,MAAI,MAAM,SAAS,IAAI,EAAE;GACxB,MAAM,SAAS,MAAM,MAAM,IAAI;AAC/B,OAAI,OAAO,SAAS,KAAK,OAAO,GAAI,QAAO;IAC1C,MAAM,OAAO;IACb,MAAM,OAAO;IACb;;AAEF,SAAO,EAAE,MAAM,OAAO;;AAEvB,KAAI,SAAS,MAAM,CAAE,QAAO;EAC3B,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-array.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/to-array.mjs"],"sourcesContent":["//#region src/to-array.ts\n/**\n* Convert `Arrayable<T>` to `Array<T>`\n*\n* @param array - The `Arrayable<T>` to convert\n* @returns An `Array<T>` containing the elements of the input\n*/\nfunction toArray(array) {\n\tarray = array ?? [];\n\treturn Array.isArray(array) ? array : [array];\n}\n\n//#endregion\nexport { toArray };\n//# sourceMappingURL=to-array.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAOA,SAAS,QAAQ,OAAO;AACvB,SAAQ,SAAS,EAAE;AACnB,QAAO,MAAM,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs"],"sourcesContent":["//#region ../type-checks/src/get-object-tag.ts\n/**\n* Gets the `toStringTag` of `obj`.\n*\n* @param value - The obj to query.\n* @returns Returns the `toStringTag`.\n*/\nconst getObjectTag = (value) => {\n\tif (value == null) return value === void 0 ? \"[object Undefined]\" : \"[object Null]\";\n\treturn Object.prototype.toString.call(value);\n};\n\n//#endregion\nexport { getObjectTag };\n//# sourceMappingURL=get-object-tag.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAOA,MAAM,gBAAgB,UAAU;AAC/B,KAAI,SAAS,KAAM,QAAO,UAAU,KAAK,IAAI,uBAAuB;AACpE,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-buffer.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs"],"sourcesContent":["//#region ../type-checks/src/is-buffer.ts\nconst isBufferExists = typeof Buffer !== \"undefined\";\n/**\n* Check if the provided value's type is `Buffer`\n*/\nconst isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : function isBuffer$1(value) {\n\treturn false;\n};\n\n//#endregion\nexport { isBufferExists };\n//# sourceMappingURL=is-buffer.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,iBAAiB,OAAO,WAAW;AAIxB,kBAAiB,OAAO,SAAS,KAAK,OAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs"],"sourcesContent":["import { isPlainObject } from \"./is-plain-object.mjs\";\n\n//#region ../type-checks/src/is-object.ts\n/**\n* Check if the provided value's type is `Object`\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `Object`\n*/\nconst isObject = (value) => {\n\ttry {\n\t\treturn typeof value === \"object\" || Boolean(value) && value?.constructor === Object || isPlainObject(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU,YAAY,QAAQ,MAAM,IAAI,OAAO,gBAAgB,UAAU,cAAc,MAAM;SACpG;AACP,SAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-plain-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs"],"sourcesContent":["import { getObjectTag } from \"./get-object-tag.mjs\";\n\n//#region ../type-checks/src/is-plain-object.ts\n/**\n* Checks if `value` is object-like. A value is object-like if it's not `null`\n* and has a `typeof` result of \"object\".\n*\n* @example\n* ```typescript\n* isObjectLike({})\n* // => true\n*\n* isObjectLike([1, 2, 3])\n* // => true\n*\n* isObjectLike(Function)\n* // => false\n*\n* isObjectLike(null)\n* // => false\n* ```\n*\n* @param value - The value to check.\n* @returns Returns `true` if `value` is object-like, else `false`.\n*/\nconst isObjectLike = (obj) => {\n\treturn typeof obj === \"object\" && obj !== null;\n};\n/**\n* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.\n*\n* @example\n* ```typescript\n* function Foo() {\n* this.a = 1\n* }\n*\n* isPlainObject(new Foo)\n* // => false\n*\n* isPlainObject([1, 2, 3])\n* // => false\n*\n* isPlainObject({ 'x': 0, 'y': 0 })\n* // => true\n*\n* isPlainObject(Object.create(null))\n* // => true\n* ```\n*\n* @param obj - The value to check.\n* @returns Returns `true` if `obj` is a plain object, else `false`.\n*/\nconst isPlainObject = (obj) => {\n\tif (!isObjectLike(obj) || getObjectTag(obj) !== \"[object Object]\") return false;\n\tif (Object.getPrototypeOf(obj) === null) return true;\n\tlet proto = obj;\n\twhile (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);\n\treturn Object.getPrototypeOf(obj) === proto;\n};\n\n//#endregion\nexport { isObjectLike, isPlainObject };\n//# sourceMappingURL=is-plain-object.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,gBAAgB,QAAQ;AAC7B,QAAO,OAAO,QAAQ,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B3C,MAAM,iBAAiB,QAAQ;AAC9B,KAAI,CAAC,aAAa,IAAI,IAAI,aAAa,IAAI,KAAK,kBAAmB,QAAO;AAC1E,KAAI,OAAO,eAAe,IAAI,KAAK,KAAM,QAAO;CAChD,IAAI,QAAQ;AACZ,QAAO,OAAO,eAAe,MAAM,KAAK,KAAM,SAAQ,OAAO,eAAe,MAAM;AAClF,QAAO,OAAO,eAAe,IAAI,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs"],"sourcesContent":["//#region ../type-checks/src/is-string.ts\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU;SACjB;AACP,SAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-detect.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs"],"sourcesContent":["import \"./is-buffer.mjs\";\n\n//#region ../type-checks/src/type-detect.ts\nconst globalObject = ((Obj) => {\n\tif (typeof globalThis === \"object\") return globalThis;\n\tObject.defineProperty(Obj, \"typeDetectGlobalObject\", {\n\t\tget() {\n\t\t\treturn this;\n\t\t},\n\t\tconfigurable: true\n\t});\n\treturn globalThis;\n})(Object.prototype);\n\n//#endregion\nexport { };\n//# sourceMappingURL=type-detect.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;EAGuB,QAAQ;AAC9B,KAAI,OAAO,eAAe,SAAU,QAAO;AAC3C,QAAO,eAAe,KAAK,0BAA0B;EACpD,MAAM;AACL,UAAO;;EAER,cAAc;EACd,CAAC;AACF,QAAO;GACL,OAAO,UAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-parent-path.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.17/node_modules/@stryke/path/dist/is-parent-path.mjs"],"sourcesContent":["import { slash } from \"./slash.mjs\";\n\n//#region src/is-parent-path.ts\n/**\n* Check if a given path is a parent of another path.\n*\n* @example\n* ```ts\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src\");\n* // returns true\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n* // returns true\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/other\");\n* // returns false\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/other\");\n* // returns false\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/index.ts\");\n* // returns false\n* ```\n*\n* @param childPath - The path to check if it is a child of the parent path.\n* @param parentPath - The path to check if it is a parent of the child path.\n* @returns `true` if `childPath` is a child of `parentPath`, otherwise `false`.\n*/\nfunction isParentPath(childPath, parentPath) {\n\tconst normalizedChild = slash(childPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\"))?.toLowerCase();\n\tconst normalizedParent = slash(parentPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\"))?.toLowerCase();\n\treturn childPath !== parentPath && normalizedChild !== normalizedParent && normalizedChild.startsWith(`${normalizedParent}/`);\n}\n\n//#endregion\nexport { isParentPath };\n//# sourceMappingURL=is-parent-path.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,aAAa,WAAW,YAAY;CAC5C,MAAM,kBAAkB,MAAM,UAAU,WAAW,OAAO,IAAI,CAAC,QAAQ,QAAQ,GAAG,CAAC,EAAE,aAAa;CAClG,MAAM,mBAAmB,MAAM,WAAW,WAAW,OAAO,IAAI,CAAC,QAAQ,QAAQ,GAAG,CAAC,EAAE,aAAa;AACpG,QAAO,cAAc,cAAc,oBAAoB,oBAAoB,gBAAgB,WAAW,GAAG,iBAAiB,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-type.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.17/node_modules/@stryke/path/dist/is-type.mjs"],"sourcesContent":["import { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/is-type.ts\n/**\n* Check if the path is an absolute path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolutePath(path) {\n\treturn ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n/**\n* Check if the path is an absolute path.\n*\n* @remarks\n* This is an alias for {@link isAbsolutePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolute(path) {\n\treturn isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelativePath(path) {\n\treturn !isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @remarks\n* This is an alias for {@link isRelativePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelative(path) {\n\treturn isRelativePath(path);\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n*\n* @example\n* ```ts\n* isNpmScopedPackage(\"@stryke/path\"); // returns true\n* isNpmScopedPackage(\"lodash\"); // returns false\n* isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackagePath(path) {\n\treturn NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n*\n* @example\n* ```ts\n* isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n* isNpmScopedPackagePath(\"lodash\"); // returns false\n* isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackage(path) {\n\treturn isNpmScopedPackagePath(path);\n}\n\n//#endregion\nexport { isAbsolute, isAbsolutePath, isNpmScopedPackage, isNpmScopedPackagePath, isRelative, isRelativePath };\n//# sourceMappingURL=is-type.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAS,eAAe,MAAM;AAC7B,QAAO,oBAAoB,KAAK,MAAM,KAAK,CAAC;;;;;;;;;;;AAW7C,SAAS,WAAW,MAAM;AACzB,QAAO,eAAe,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"join-paths.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.17/node_modules/@stryke/path/dist/join-paths.mjs"],"sourcesContent":["import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from \"./regex.mjs\";\nimport { isAbsolute } from \"./is-type.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/join-paths.ts\nfunction normalizeWindowsPath(input = \"\") {\n\tif (!input) return input;\n\treturn input.replace(/\\\\/g, \"/\").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());\n}\nfunction correctPaths(path) {\n\tif (!path || path.length === 0) return \".\";\n\tpath = normalizeWindowsPath(path);\n\tconst isUNCPath = path.match(UNC_REGEX);\n\tconst isPathAbsolute = isAbsolute(path);\n\tconst trailingSeparator = path[path.length - 1] === \"/\";\n\tpath = normalizeString(path, !isPathAbsolute);\n\tif (path.length === 0) {\n\t\tif (isPathAbsolute) return \"/\";\n\t\treturn trailingSeparator ? \"./\" : \".\";\n\t}\n\tif (trailingSeparator) path += \"/\";\n\tif (DRIVE_LETTER_REGEX.test(path)) path += \"/\";\n\tif (isUNCPath) {\n\t\tif (!isPathAbsolute) return `//./${path}`;\n\t\treturn `//${path}`;\n\t}\n\treturn isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n/**\n* Joins all given path segments together using the platform-specific separator as a delimiter.\n*\n* @remarks\n* Multiple segments can be provided as separate arguments. The resulting path is normalized to remove any redundant or unnecessary segments.\n*\n* @example\n* ```ts\n* import { joinPaths } from 'stryke/path';\n*\n* const fullPath = joinPaths('folder1', 'folder2', '..', 'folder3', 'file.txt');\n* console.log(fullPath); // Output: 'folder1/folder3/file.txt'\n*\n* const absolutePath = joinPaths('/root', 'folder', '.', 'subfolder', 'file.txt');\n* console.log(absolutePath); // Output: '/root/folder/subfolder/file.txt'\n*\n* const windowsPath = joinPaths('C:\\\\', 'Users', 'Public', '..', 'Documents', 'file.txt');\n* console.log(windowsPath); // Output: 'C:/Users/Documents/file.txt'\n*\n* const uncPath = joinPaths('\\\\\\\\Server\\\\Share', 'Folder', 'File.txt');\n* console.log(uncPath); // Output: '//Server/Share/Folder/File.txt'\n* ```\n*\n* @param segments - The path segments to join.\n* @returns The joined and normalized path string.\n*/\nfunction joinPaths(...segments) {\n\tlet result = \"\";\n\tfor (const segment of segments) if (segment && slash(segment).replaceAll(/\\//g, \"\") !== \".\") {\n\t\tif (result) if (slash(segment).replaceAll(/\\//g, \"\") === \"..\") result = slash(result).replace(/\\/+$/, \"\").replace(/\\/*[^/]+$/, \"\");\n\t\telse result = `${slash(result).replace(/\\/+$/, \"\")}/${slash(segment).replace(/^\\/+/, \"\")}`;\n\t\telse if (slash(segment).replaceAll(/\\//g, \"\") !== \"..\") result = segment;\n\t}\n\treturn correctPaths(result);\n}\nconst join = joinPaths;\n/**\n* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n*\n* @param path - The path to normalize.\n* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n* @returns the normalized path string.\n*/\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\";\n\tlet lastSegmentLength = 0;\n\tlet lastSlash = -1;\n\tlet dots = 0;\n\tlet char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tconst lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tif (lastSlashIndex === -1) {\n\t\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres = res.slice(0, lastSlashIndex);\n\t\t\t\t\t\t\tlastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allowAboveRoot) {\n\t\t\t\t\tres += res.length > 0 ? \"/..\" : \"..\";\n\t\t\t\t\tlastSegmentLength = 2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;\n\t\t\t\telse res = path.slice(lastSlash + 1, index);\n\t\t\t\tlastSegmentLength = index - lastSlash - 1;\n\t\t\t}\n\t\t\tlastSlash = index;\n\t\t\tdots = 0;\n\t\t} else if (char === \".\" && dots !== -1) ++dots;\n\t\telse dots = -1;\n\t}\n\treturn res;\n}\n\n//#endregion\nexport { join, joinPaths };\n//# sourceMappingURL=join-paths.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAS,qBAAqB,QAAQ,IAAI;AACzC,KAAI,CAAC,MAAO,QAAO;AACnB,QAAO,MAAM,QAAQ,OAAO,IAAI,CAAC,QAAQ,2BAA2B,MAAM,EAAE,aAAa,CAAC;;AA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,QAAQ,EAAE,OAAO;AAClD,MAAI,QAAQ,KAAK,OAAQ,QAAO,KAAK;WAC5B,SAAS,IAAK;MAClB,QAAO;AACZ,MAAI,SAAS,KAAK;AACjB,OAAI,cAAc,QAAQ,KAAK,SAAS,GAAG,YAAY,SAAS,GAAG;AAClE,QAAI,IAAI,SAAS,KAAK,sBAAsB,KAAK,IAAI,IAAI,SAAS,OAAO,OAAO,IAAI,IAAI,SAAS,OAAO,KACvG;SAAI,IAAI,SAAS,GAAG;MACnB,MAAM,iBAAiB,IAAI,YAAY,IAAI;AAC3C,UAAI,mBAAmB,IAAI;AAC1B,aAAM;AACN,2BAAoB;aACd;AACN,aAAM,IAAI,MAAM,GAAG,eAAe;AAClC,2BAAoB,IAAI,SAAS,IAAI,IAAI,YAAY,IAAI;;AAE1D,kBAAY;AACZ,aAAO;AACP;gBACU,IAAI,SAAS,GAAG;AAC1B,YAAM;AACN,0BAAoB;AACpB,kBAAY;AACZ,aAAO;AACP;;;AAGF,QAAI,gBAAgB;AACnB,YAAO,IAAI,SAAS,IAAI,QAAQ;AAChC,yBAAoB;;UAEf;AACN,QAAI,IAAI,SAAS,EAAG,QAAO,IAAI,KAAK,MAAM,YAAY,GAAG,MAAM;QAC1D,OAAM,KAAK,MAAM,YAAY,GAAG,MAAM;AAC3C,wBAAoB,QAAQ,YAAY;;AAEzC,eAAY;AACZ,UAAO;aACG,SAAS,OAAO,SAAS,GAAI,GAAE;MACrC,QAAO;;AAEb,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"regex.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.17/node_modules/@stryke/path/dist/regex.mjs"],"sourcesContent":["//#region src/regex.ts\nconst DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nconst DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\nconst UNC_REGEX = /^[/\\\\]{2}/;\nconst ABSOLUTE_PATH_REGEX = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\nconst ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\nconst FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\nconst FULL_FILE_EXTENSION_REGEX = /(\\.d)?\\.[0-9a-z]+(\\.map)?$/i;\nconst PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nconst NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n\n//#endregion\nexport { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX };\n//# sourceMappingURL=regex.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,2BAA2B;AACjC,MAAM,qBAAqB;AAC3B,MAAM,YAAY;AAClB,MAAM,sBAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slash.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.17/node_modules/@stryke/path/dist/slash.mjs"],"sourcesContent":["import { isAbsolutePath } from \"./is-type.mjs\";\n\n//#region src/slash.ts\n/**\n* Replace backslash to slash\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction slash(path) {\n\tif (path.startsWith(\"\\\\\\\\?\\\\\")) return path;\n\treturn path.replace(/\\\\/g, \"/\");\n}\n/**\n* Replace backslash to slash and remove unneeded leading and trailing slashes\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction formatSlash(path) {\n\tconst formatted = slash(path);\n\treturn isAbsolutePath(formatted) ? formatted.replace(/\\/+$/g, \"\") : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n\n//#endregion\nexport { formatSlash, slash };\n//# sourceMappingURL=slash.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AASA,SAAS,MAAM,MAAM;AACpB,KAAI,KAAK,WAAW,UAAU,CAAE,QAAO;AACvC,QAAO,KAAK,QAAQ,OAAO,IAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["dotenv","rc9.read","rc9.readUser"],"sources":["../../../../../../../../../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs"],"sourcesContent":["import { existsSync, promises, statSync } from \"node:fs\";\nimport { basename, dirname, extname, join, normalize, resolve } from \"pathe\";\nimport * as dotenv from \"dotenv\";\nimport { readFile, rm } from \"node:fs/promises\";\nimport { pathToFileURL } from \"node:url\";\nimport { homedir } from \"node:os\";\nimport { resolveModulePath } from \"exsolve\";\nimport { createJiti } from \"jiti\";\nimport * as rc9 from \"rc9\";\nimport { defu } from \"defu\";\nimport { findWorkspaceDir, readPackageJSON } from \"pkg-types\";\nimport { debounce } from \"perfect-debounce\";\n\n//#region src/dotenv.ts\n/**\n* Load and interpolate environment variables into `process.env`.\n* If you need more control (or access to the values), consider using `loadDotenv` instead\n*\n*/\nasync function setupDotenv(options) {\n\tconst targetEnvironment = options.env ?? process.env;\n\tconst environment = await loadDotenv({\n\t\tcwd: options.cwd,\n\t\tfileName: options.fileName ?? \".env\",\n\t\tenv: targetEnvironment,\n\t\tinterpolate: options.interpolate ?? true\n\t});\n\tconst dotenvVars = getDotEnvVars(targetEnvironment);\n\tfor (const key in environment) {\n\t\tif (key.startsWith(\"_\")) continue;\n\t\tif (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];\n\t}\n\treturn environment;\n}\n/** Load environment variables into an object. */\nasync function loadDotenv(options) {\n\tconst environment = Object.create(null);\n\tconst cwd = resolve(options.cwd || \".\");\n\tconst _fileName = options.fileName || \".env\";\n\tconst dotenvFiles = typeof _fileName === \"string\" ? [_fileName] : _fileName;\n\tconst dotenvVars = getDotEnvVars(options.env || {});\n\tObject.assign(environment, options.env);\n\tfor (const file of dotenvFiles) {\n\t\tconst dotenvFile = resolve(cwd, file);\n\t\tif (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;\n\t\tconst parsed = dotenv.parse(await promises.readFile(dotenvFile, \"utf8\"));\n\t\tfor (const key in parsed) {\n\t\t\tif (key in environment && !dotenvVars.has(key)) continue;\n\t\t\tenvironment[key] = parsed[key];\n\t\t\tdotenvVars.add(key);\n\t\t}\n\t}\n\tif (options.interpolate) interpolate(environment);\n\treturn environment;\n}\nfunction interpolate(target, source = {}, parse = (v) => v) {\n\tfunction getValue(key) {\n\t\treturn source[key] === void 0 ? target[key] : source[key];\n\t}\n\tfunction interpolate$1(value, parents = []) {\n\t\tif (typeof value !== \"string\") return value;\n\t\treturn parse((value.match(/(.?\\${?(?:[\\w:]+)?}?)/g) || []).reduce((newValue, match) => {\n\t\t\tconst parts = /(.?)\\${?([\\w:]+)?}?/g.exec(match) || [];\n\t\t\tconst prefix = parts[1];\n\t\t\tlet value$1, replacePart;\n\t\t\tif (prefix === \"\\\\\") {\n\t\t\t\treplacePart = parts[0] || \"\";\n\t\t\t\tvalue$1 = replacePart.replace(String.raw`\\$`, \"$\");\n\t\t\t} else {\n\t\t\t\tconst key = parts[2];\n\t\t\t\treplacePart = (parts[0] || \"\").slice(prefix.length);\n\t\t\t\tif (parents.includes(key)) {\n\t\t\t\t\tconsole.warn(`Please avoid recursive environment variables ( loop: ${parents.join(\" > \")} > ${key} )`);\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tvalue$1 = getValue(key);\n\t\t\t\tvalue$1 = interpolate$1(value$1, [...parents, key]);\n\t\t\t}\n\t\t\treturn value$1 === void 0 ? newValue : newValue.replace(replacePart, value$1);\n\t\t}, value));\n\t}\n\tfor (const key in target) target[key] = interpolate$1(getValue(key));\n}\nfunction getDotEnvVars(targetEnvironment) {\n\tconst globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();\n\tif (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());\n\treturn globalRegistry.get(targetEnvironment);\n}\n\n//#endregion\n//#region src/loader.ts\nconst _normalize = (p) => p?.replace(/\\\\/g, \"/\");\nconst ASYNC_LOADERS = {\n\t\".yaml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".yml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".jsonc\": () => import(\"confbox/jsonc\").then((r) => r.parseJSONC),\n\t\".json5\": () => import(\"confbox/json5\").then((r) => r.parseJSON5),\n\t\".toml\": () => import(\"confbox/toml\").then((r) => r.parseTOML)\n};\nconst SUPPORTED_EXTENSIONS = Object.freeze([\n\t\".js\",\n\t\".ts\",\n\t\".mjs\",\n\t\".cjs\",\n\t\".mts\",\n\t\".cts\",\n\t\".json\",\n\t\".jsonc\",\n\t\".json5\",\n\t\".yaml\",\n\t\".yml\",\n\t\".toml\"\n]);\nasync function loadConfig(options) {\n\toptions.cwd = resolve(process.cwd(), options.cwd || \".\");\n\toptions.name = options.name || \"config\";\n\toptions.envName = options.envName ?? process.env.NODE_ENV;\n\toptions.configFile = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\toptions.rcFile = options.rcFile ?? `.${options.name}rc`;\n\tif (options.extend !== false) options.extend = {\n\t\textendKey: \"extends\",\n\t\t...options.extend\n\t};\n\tconst _merger = options.merger || defu;\n\toptions.jiti = options.jiti || createJiti(join(options.cwd, options.configFile), {\n\t\tinteropDefault: true,\n\t\tmoduleCache: false,\n\t\textensions: [...SUPPORTED_EXTENSIONS],\n\t\t...options.jitiOptions\n\t});\n\tconst r = {\n\t\tconfig: {},\n\t\tcwd: options.cwd,\n\t\tconfigFile: resolve(options.cwd, options.configFile),\n\t\tlayers: [],\n\t\t_configFile: void 0\n\t};\n\tconst rawConfigs = {\n\t\toverrides: options.overrides,\n\t\tmain: void 0,\n\t\trc: void 0,\n\t\tpackageJson: void 0,\n\t\tdefaultConfig: options.defaultConfig\n\t};\n\tif (options.dotenv) await setupDotenv({\n\t\tcwd: options.cwd,\n\t\t...options.dotenv === true ? {} : options.dotenv\n\t});\n\tconst _mainConfig = await resolveConfig(\".\", options);\n\tif (_mainConfig.configFile) {\n\t\trawConfigs.main = _mainConfig.config;\n\t\tr.configFile = _mainConfig.configFile;\n\t\tr._configFile = _mainConfig._configFile;\n\t}\n\tif (_mainConfig.meta) r.meta = _mainConfig.meta;\n\tif (options.rcFile) {\n\t\tconst rcSources = [];\n\t\trcSources.push(rc9.read({\n\t\t\tname: options.rcFile,\n\t\t\tdir: options.cwd\n\t\t}));\n\t\tif (options.globalRc) {\n\t\t\tconst workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});\n\t\t\tif (workspaceDir) rcSources.push(rc9.read({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: workspaceDir\n\t\t\t}));\n\t\t\trcSources.push(rc9.readUser({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: options.cwd\n\t\t\t}));\n\t\t}\n\t\trawConfigs.rc = _merger({}, ...rcSources);\n\t}\n\tif (options.packageJson) {\n\t\tconst keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === \"string\" ? options.packageJson : options.name]).filter((t) => t && typeof t === \"string\");\n\t\tconst pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});\n\t\trawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));\n\t}\n\tconst configs = {};\n\tfor (const key in rawConfigs) {\n\t\tconst value = rawConfigs[key];\n\t\tconfigs[key] = await (typeof value === \"function\" ? value({\n\t\t\tconfigs,\n\t\t\trawConfigs\n\t\t}) : value);\n\t}\n\tif (Array.isArray(configs.main)) r.config = configs.main;\n\telse {\n\t\tr.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);\n\t\tif (options.extend) {\n\t\t\tawait extendConfig(r.config, options);\n\t\t\tr.layers = r.config._layers;\n\t\t\tdelete r.config._layers;\n\t\t\tr.config = _merger(r.config, ...r.layers.map((e) => e.config));\n\t\t}\n\t}\n\tr.layers = [...[\n\t\tconfigs.overrides && {\n\t\t\tconfig: configs.overrides,\n\t\t\tconfigFile: void 0,\n\t\t\tcwd: void 0\n\t\t},\n\t\t{\n\t\t\tconfig: configs.main,\n\t\t\tconfigFile: options.configFile,\n\t\t\tcwd: options.cwd\n\t\t},\n\t\tconfigs.rc && {\n\t\t\tconfig: configs.rc,\n\t\t\tconfigFile: options.rcFile\n\t\t},\n\t\tconfigs.packageJson && {\n\t\t\tconfig: configs.packageJson,\n\t\t\tconfigFile: \"package.json\"\n\t\t}\n\t].filter((l) => l && l.config), ...r.layers];\n\tif (options.defaults) r.config = _merger(r.config, options.defaults);\n\tif (options.omit$Keys) {\n\t\tfor (const key in r.config) if (key.startsWith(\"$\")) delete r.config[key];\n\t}\n\tif (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);\n\treturn r;\n}\nasync function extendConfig(config, options) {\n\tconfig._layers = config._layers || [];\n\tif (!options.extend) return;\n\tlet keys = options.extend.extendKey;\n\tif (typeof keys === \"string\") keys = [keys];\n\tconst extendSources = [];\n\tfor (const key of keys) {\n\t\textendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));\n\t\tdelete config[key];\n\t}\n\tfor (let extendSource of extendSources) {\n\t\tconst originalExtendSource = extendSource;\n\t\tlet sourceOptions = {};\n\t\tif (extendSource.source) {\n\t\t\tsourceOptions = extendSource.options || {};\n\t\t\textendSource = extendSource.source;\n\t\t}\n\t\tif (Array.isArray(extendSource)) {\n\t\t\tsourceOptions = extendSource[1] || {};\n\t\t\textendSource = extendSource[0];\n\t\t}\n\t\tif (typeof extendSource !== \"string\") {\n\t\t\tconsole.warn(`Cannot extend config from \\`${JSON.stringify(originalExtendSource)}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst _config = await resolveConfig(extendSource, options, sourceOptions);\n\t\tif (!_config.config) {\n\t\t\tconsole.warn(`Cannot extend config from \\`${extendSource}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tawait extendConfig(_config.config, {\n\t\t\t...options,\n\t\t\tcwd: _config.cwd\n\t\t});\n\t\tconfig._layers.push(_config);\n\t\tif (_config.config._layers) {\n\t\t\tconfig._layers.push(..._config.config._layers);\n\t\t\tdelete _config.config._layers;\n\t\t}\n\t}\n}\nconst GIGET_PREFIXES = [\n\t\"gh:\",\n\t\"github:\",\n\t\"gitlab:\",\n\t\"bitbucket:\",\n\t\"https://\",\n\t\"http://\"\n];\nconst NPM_PACKAGE_RE = /^(@[\\da-z~-][\\d._a-z~-]*\\/)?[\\da-z~-][\\d._a-z~-]*($|\\/.*)/;\nasync function resolveConfig(source, options, sourceOptions = {}) {\n\tif (options.resolve) {\n\t\tconst res$1 = await options.resolve(source, options);\n\t\tif (res$1) return res$1;\n\t}\n\tconst _merger = options.merger || defu;\n\tconst customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);\n\tconst gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;\n\tif (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {\n\t\tconst { downloadTemplate } = await import(\"giget\");\n\t\tconst { digest } = await import(\"ohash\");\n\t\tconst cloneName = source.replace(/\\W+/g, \"_\").split(\"_\").splice(0, 3).join(\"_\") + \"_\" + digest(source).slice(0, 10).replace(/[-_]/g, \"\");\n\t\tlet cloneDir;\n\t\tconst localNodeModules = resolve(options.cwd, \"node_modules\");\n\t\tconst parentDir = dirname(options.cwd);\n\t\tif (basename(parentDir) === \".c12\") cloneDir = join(parentDir, cloneName);\n\t\telse if (existsSync(localNodeModules)) cloneDir = join(localNodeModules, \".c12\", cloneName);\n\t\telse cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, \"c12\", cloneName) : resolve(homedir(), \".cache/c12\", cloneName);\n\t\tif (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });\n\t\tsource = (await downloadTemplate(source, {\n\t\t\tdir: cloneDir,\n\t\t\tinstall: sourceOptions.install,\n\t\t\tforce: sourceOptions.install,\n\t\t\tauth: sourceOptions.auth,\n\t\t\t...options.giget,\n\t\t\t...sourceOptions.giget\n\t\t})).dir;\n\t}\n\tif (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;\n\tconst ext = extname(source);\n\tconst isDir = !ext || ext === basename(source);\n\tconst cwd = resolve(options.cwd, isDir ? source : dirname(source));\n\tif (isDir) source = options.configFile;\n\tconst res = {\n\t\tconfig: void 0,\n\t\tconfigFile: void 0,\n\t\tcwd,\n\t\tsource,\n\t\tsourceOptions\n\t};\n\tres.configFile = tryResolve(resolve(cwd, source), options) || tryResolve(resolve(cwd, \".config\", source.replace(/\\.config$/, \"\")), options) || tryResolve(resolve(cwd, \".config\", source), options) || source;\n\tif (!existsSync(res.configFile)) return res;\n\tres._configFile = res.configFile;\n\tconst configFileExt = extname(res.configFile) || \"\";\n\tif (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, \"utf8\"));\n\telse res.config = await options.jiti.import(res.configFile, { default: true });\n\tif (typeof res.config === \"function\") res.config = await res.config(options.context);\n\tif (options.envName) {\n\t\tconst envConfig = {\n\t\t\t...res.config[\"$\" + options.envName],\n\t\t\t...res.config.$env?.[options.envName]\n\t\t};\n\t\tif (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);\n\t}\n\tres.meta = defu(res.sourceOptions.meta, res.config.$meta);\n\tdelete res.config.$meta;\n\tif (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);\n\tres.configFile = _normalize(res.configFile);\n\tres.source = _normalize(res.source);\n\treturn res;\n}\nfunction tryResolve(id, options) {\n\tconst res = resolveModulePath(id, {\n\t\ttry: true,\n\t\tfrom: pathToFileURL(join(options.cwd || \".\", options.configFile || \"/\")),\n\t\tsuffixes: [\"\", \"/index\"],\n\t\textensions: SUPPORTED_EXTENSIONS,\n\t\tcache: false\n\t});\n\treturn res ? normalize(res) : void 0;\n}\n\n//#endregion\n//#region src/types.ts\nfunction createDefineConfig() {\n\treturn (input) => input;\n}\n\n//#endregion\n//#region src/watch.ts\nconst eventMap = {\n\tadd: \"created\",\n\tchange: \"updated\",\n\tunlink: \"removed\"\n};\nasync function watchConfig(options) {\n\tlet config = await loadConfig(options);\n\tconst configName = options.name || \"config\";\n\tconst configFileName = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\tconst watchingFiles = [...new Set((config.layers || []).filter((l) => l.cwd).flatMap((l) => [\n\t\t...SUPPORTED_EXTENSIONS.flatMap((ext) => [\n\t\t\tresolve(l.cwd, configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName.replace(/\\.config$/, \"\") + ext)\n\t\t]),\n\t\tl.source && resolve(l.cwd, l.source),\n\t\toptions.rcFile && resolve(l.cwd, typeof options.rcFile === \"string\" ? options.rcFile : `.${configName}rc`),\n\t\toptions.packageJson && resolve(l.cwd, \"package.json\")\n\t]).filter(Boolean))];\n\tconst watch = await import(\"chokidar\").then((r) => r.watch || r.default || r);\n\tconst { diff } = await import(\"ohash/utils\");\n\tconst _fswatcher = watch(watchingFiles, {\n\t\tignoreInitial: true,\n\t\t...options.chokidarOptions\n\t});\n\tconst onChange = async (event, path) => {\n\t\tconst type = eventMap[event];\n\t\tif (!type) return;\n\t\tif (options.onWatch) await options.onWatch({\n\t\t\ttype,\n\t\t\tpath\n\t\t});\n\t\tconst oldConfig = config;\n\t\ttry {\n\t\t\tconfig = await loadConfig(options);\n\t\t} catch (error) {\n\t\t\tconsole.warn(`Failed to load config ${path}\\n${error}`);\n\t\t\treturn;\n\t\t}\n\t\tconst changeCtx = {\n\t\t\tnewConfig: config,\n\t\t\toldConfig,\n\t\t\tgetDiff: () => diff(oldConfig.config, config.config)\n\t\t};\n\t\tif (options.acceptHMR) {\n\t\t\tif (await options.acceptHMR(changeCtx)) return;\n\t\t}\n\t\tif (options.onUpdate) await options.onUpdate(changeCtx);\n\t};\n\tif (options.debounce === false) _fswatcher.on(\"all\", onChange);\n\telse _fswatcher.on(\"all\", debounce(onChange, options.debounce ?? 100));\n\tconst utils = {\n\t\twatchingFiles,\n\t\tunwatch: async () => {\n\t\t\tawait _fswatcher.close();\n\t\t}\n\t};\n\treturn new Proxy(utils, { get(_, prop) {\n\t\tif (prop in utils) return utils[prop];\n\t\treturn config[prop];\n\t} });\n}\n\n//#endregion\nexport { SUPPORTED_EXTENSIONS, createDefineConfig, loadConfig, loadDotenv, setupDotenv, watchConfig };"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,eAAe,YAAY,SAAS;CACnC,MAAM,oBAAoB,QAAQ,OAAO,QAAQ;CACjD,MAAM,cAAc,MAAM,WAAW;EACpC,KAAK,QAAQ;EACb,UAAU,QAAQ,YAAY;EAC9B,KAAK;EACL,aAAa,QAAQ,eAAe;EACpC,CAAC;CACF,MAAM,aAAa,cAAc,kBAAkB;AACnD,MAAK,MAAM,OAAO,aAAa;AAC9B,MAAI,IAAI,WAAW,IAAI,CAAE;AACzB,MAAI,kBAAkB,SAAS,KAAK,KAAK,WAAW,IAAI,IAAI,CAAE,mBAAkB,OAAO,YAAY;;AAEpG,QAAO;;;AAGR,eAAe,WAAW,SAAS;CAClC,MAAM,cAAc,OAAO,OAAO,KAAK;CACvC,MAAM,MAAM,QAAQ,QAAQ,OAAO,IAAI;CACvC,MAAM,YAAY,QAAQ,YAAY;CACtC,MAAM,cAAc,OAAO,cAAc,WAAW,CAAC,UAAU,GAAG;CAClE,MAAM,aAAa,cAAc,QAAQ,OAAO,EAAE,CAAC;AACnD,QAAO,OAAO,aAAa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I,SAAS,QAAQ,WAAW,IAAI,OAAO;;AAEnF,KAAI,OAAO,KAAK,IAAI,cAAc,MAAM,IAAI,OAAO,MAAM;AACzD,QAAO,IAAI,OAAO;AAClB,KAAI,IAAI,cAAc,UAAW,KAAI,SAAS,QAAQ,IAAI,cAAc,WAAW,IAAI,OAAO;AAC9F,KAAI,aAAa,WAAW,IAAI,WAAW;AAC3C,KAAI,SAAS,WAAW,IAAI,OAAO;AACnC,QAAO;;AAER,SAAS,WAAW,IAAI,SAAS;CAChC,MAAM,MAAM,kBAAkB,IAAI;EACjC,KAAK;EACL,MAAM,cAAc,KAAK,QAAQ,OAAO,KAAK,QAAQ,cAAc,IAAI,CAAC;EACxE,UAAU,CAAC,IAAI,SAAS;EACxB,YAAY;EACZ,OAAO;EACP,CAAC;AACF,QAAO,MAAM,UAAU,IAAI,GAAG,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_format.mjs","names":["t","n","r"],"sources":["../../../../../../../../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs"],"sourcesContent":["import{t as e}from\"./libs/detect-indent.mjs\";const t=Symbol.for(`__confbox_fmt__`),n=/^(\\s+)/,r=/(\\s+)$/;function i(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&e.slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:n.exec(e)?.[0]||``,end:r.exec(e)?.[0]||``}}}function a(e,n,r){!n||typeof n!=`object`||Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i(e,r)})}function o(n,r){if(!n||typeof n!=`object`||!(t in n))return{indent:r?.indent??2,whitespace:{start:``,end:``}};let i=n[t];return{indent:r?.indent||e(i.sample||``).indent,whitespace:i.whiteSpace||{start:``,end:``}}}export{a as n,o as t};"],"x_google_ignoreList":[0],"mappings":";AAA6C,MAAM,IAAE,OAAO,IAAI,kBAAkB,EAAC,IAAE,UAAS,IAAE;AAAS,SAAS,EAAE,GAAE,MAAE,EAAE,EAAC;AAAC,QAAM;EAAC,QAAOA,IAAE,WAAS,KAAK,KAAGA,IAAE,wBAAsB,CAAC,KAAG,EAAE,MAAM,GAAEA,KAAG,cAAY,KAAK;EAAC,YAAWA,IAAE,uBAAqB,CAAC,IAAE,KAAK,IAAE;GAAC,OAAM,EAAE,KAAK,EAAE,GAAG,MAAI;GAAG,KAAI,EAAE,KAAK,EAAE,GAAG,MAAI;GAAG;EAAC;;AAAC,SAAS,EAAE,GAAE,KAAE,KAAE;AAAC,EAACC,OAAG,OAAOA,OAAG,YAAU,OAAO,eAAeA,KAAE,GAAE;EAAC,YAAW,CAAC;EAAE,cAAa,CAAC;EAAE,UAAS,CAAC;EAAE,OAAM,EAAE,GAAEC,IAAE;EAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.mjs","names":["n","e"],"sources":["../../../../../../../../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs"],"sourcesContent":["import{n as e,t}from\"./_format.mjs\";function n(t,n){let r=JSON.parse(t,n?.reviver);return e(t,r,n),r}function r(e,n){let r=t(e,n),i=JSON.stringify(e,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{r as n,n as t};"],"x_google_ignoreList":[0],"mappings":";;;AAAoC,SAAS,EAAE,GAAE,KAAE;CAAC,IAAI,IAAE,KAAK,MAAM,GAAEA,KAAG,QAAQ;AAAC,QAAOC,EAAE,GAAE,GAAED,IAAE,EAAC"}