powerlines 0.41.6 → 0.41.7

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 (234) hide show
  1. package/README.md +14 -16
  2. package/dist/{api-CY668wMZ.mjs → api-6f2oVwGy.mjs} +142 -333
  3. package/dist/api-6f2oVwGy.mjs.map +1 -0
  4. package/dist/{api-GPlMYw0d.cjs → api-CFXLaAxU.cjs} +505 -722
  5. package/dist/astro.cjs +8 -18
  6. package/dist/astro.d.cts +1 -2
  7. package/dist/astro.d.cts.map +1 -1
  8. package/dist/astro.d.mts +1 -6
  9. package/dist/astro.d.mts.map +1 -1
  10. package/dist/astro.mjs +6 -16
  11. package/dist/astro.mjs.map +1 -1
  12. package/dist/{chunk-CbDLau6x.cjs → chunk-AIJqnxB6.cjs} +27 -1
  13. package/dist/chunk-CtajNgzt.mjs +36 -0
  14. package/dist/config.cjs +20 -4
  15. package/dist/config.d.cts +1 -2
  16. package/dist/config.d.mts +1 -3
  17. package/dist/config.mjs +11 -2
  18. package/dist/config.mjs.map +1 -0
  19. package/dist/constants.cjs +20 -20
  20. package/dist/constants.d.cts +1 -24
  21. package/dist/constants.d.mts +1 -24
  22. package/dist/constants.mjs +11 -3
  23. package/dist/constants.mjs.map +1 -0
  24. package/dist/context/index.cjs +4 -9
  25. package/dist/context/index.d.cts +56 -132
  26. package/dist/context/index.d.cts.map +1 -1
  27. package/dist/context/index.d.mts +55 -135
  28. package/dist/context/index.d.mts.map +1 -1
  29. package/dist/context/index.mjs +3 -9
  30. package/dist/esbuild.cjs +60 -17
  31. package/dist/esbuild.d.cts +5 -29
  32. package/dist/esbuild.d.cts.map +1 -1
  33. package/dist/esbuild.d.mts +5 -33
  34. package/dist/esbuild.d.mts.map +1 -1
  35. package/dist/esbuild.mjs +44 -12
  36. package/dist/esbuild.mjs.map +1 -0
  37. package/dist/farm.cjs +6 -13
  38. package/dist/farm.d.cts +2 -3
  39. package/dist/farm.d.cts.map +1 -1
  40. package/dist/farm.d.mts +2 -6
  41. package/dist/farm.d.mts.map +1 -1
  42. package/dist/farm.mjs +4 -11
  43. package/dist/farm.mjs.map +1 -1
  44. package/dist/index.cjs +7 -13
  45. package/dist/index.d.cts +263 -6
  46. package/dist/index.d.cts.map +1 -0
  47. package/dist/index.d.mts +263 -7
  48. package/dist/index.d.mts.map +1 -0
  49. package/dist/index.mjs +3 -9
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/next.cjs +7 -14
  52. package/dist/next.d.cts +0 -1
  53. package/dist/next.d.cts.map +1 -1
  54. package/dist/next.d.mts +0 -1
  55. package/dist/next.d.mts.map +1 -1
  56. package/dist/next.mjs +6 -13
  57. package/dist/next.mjs.map +1 -1
  58. package/dist/nuxt.cjs +12 -22
  59. package/dist/nuxt.d.cts +2 -3
  60. package/dist/nuxt.d.cts.map +1 -1
  61. package/dist/nuxt.d.mts +2 -7
  62. package/dist/nuxt.d.mts.map +1 -1
  63. package/dist/nuxt.mjs +8 -18
  64. package/dist/nuxt.mjs.map +1 -1
  65. package/dist/plugin-utils.cjs +20 -28
  66. package/dist/plugin-utils.d.cts +1 -267
  67. package/dist/plugin-utils.d.mts +1 -272
  68. package/dist/plugin-utils.mjs +11 -4
  69. package/dist/plugin-utils.mjs.map +1 -0
  70. package/dist/rolldown.cjs +52 -18
  71. package/dist/rolldown.d.cts +5 -29
  72. package/dist/rolldown.d.cts.map +1 -1
  73. package/dist/rolldown.d.mts +5 -32
  74. package/dist/rolldown.d.mts.map +1 -1
  75. package/dist/rolldown.mjs +36 -13
  76. package/dist/rolldown.mjs.map +1 -0
  77. package/dist/rollup.cjs +20 -48
  78. package/dist/rollup.d.cts +5 -29
  79. package/dist/rollup.d.cts.map +1 -1
  80. package/dist/rollup.d.mts +5 -32
  81. package/dist/rollup.d.mts.map +1 -1
  82. package/dist/rollup.mjs +6 -44
  83. package/dist/rollup.mjs.map +1 -1
  84. package/dist/rspack.cjs +20 -82
  85. package/dist/rspack.d.cts +4 -24
  86. package/dist/rspack.d.cts.map +1 -1
  87. package/dist/rspack.d.mts +4 -27
  88. package/dist/rspack.d.mts.map +1 -1
  89. package/dist/rspack.mjs +5 -77
  90. package/dist/rspack.mjs.map +1 -1
  91. package/dist/storage/index.cjs +2 -3
  92. package/dist/storage/index.d.cts +7 -7
  93. package/dist/storage/index.d.cts.map +1 -1
  94. package/dist/storage/index.d.mts +7 -11
  95. package/dist/storage/index.d.mts.map +1 -1
  96. package/dist/storage/index.mjs +1 -3
  97. package/dist/{tsconfig-C8M8X6U0.cjs → tsconfig-BJrUrPC_.cjs} +13 -13
  98. package/dist/{tsconfig-B92heKit.mjs → tsconfig-D9GCB2I9.mjs} +5 -5
  99. package/dist/tsconfig-D9GCB2I9.mjs.map +1 -0
  100. package/dist/tsdown.cjs +38 -187
  101. package/dist/tsdown.d.cts +2 -24
  102. package/dist/tsdown.d.cts.map +1 -1
  103. package/dist/tsdown.d.mts +4 -30
  104. package/dist/tsdown.d.mts.map +1 -1
  105. package/dist/tsdown.mjs +8 -167
  106. package/dist/tsdown.mjs.map +1 -1
  107. package/dist/tsup.cjs +29 -134
  108. package/dist/tsup.d.cts +2 -24
  109. package/dist/tsup.d.cts.map +1 -1
  110. package/dist/tsup.d.mts +2 -28
  111. package/dist/tsup.d.mts.map +1 -1
  112. package/dist/tsup.mjs +7 -122
  113. package/dist/tsup.mjs.map +1 -1
  114. package/dist/types-DerAvFjs.d.cts +4 -0
  115. package/dist/types-DerAvFjs.d.cts.map +1 -0
  116. package/dist/types-ro7jWCtL.d.mts +4 -0
  117. package/dist/types-ro7jWCtL.d.mts.map +1 -0
  118. package/dist/typescript/index.cjs +2 -1
  119. package/dist/typescript/index.d.cts +2 -2
  120. package/dist/typescript/index.d.cts.map +1 -1
  121. package/dist/typescript/index.d.mts +1 -4
  122. package/dist/typescript/index.d.mts.map +1 -1
  123. package/dist/typescript/index.mjs +1 -1
  124. package/dist/unloader.cjs +6 -13
  125. package/dist/unloader.d.cts +2 -4
  126. package/dist/unloader.d.cts.map +1 -1
  127. package/dist/unloader.d.mts +2 -7
  128. package/dist/unloader.d.mts.map +1 -1
  129. package/dist/unloader.mjs +4 -11
  130. package/dist/unloader.mjs.map +1 -1
  131. package/dist/unplugin.cjs +11 -14
  132. package/dist/unplugin.d.cts +5 -6
  133. package/dist/unplugin.d.cts.map +1 -1
  134. package/dist/unplugin.d.mts +3 -6
  135. package/dist/unplugin.d.mts.map +1 -1
  136. package/dist/unplugin.mjs +6 -10
  137. package/dist/utils.cjs +38 -22
  138. package/dist/utils.d.cts +3 -2
  139. package/dist/utils.d.mts +3 -3
  140. package/dist/utils.mjs +19 -3
  141. package/dist/utils.mjs.map +1 -0
  142. package/dist/{virtual-B1MLgqnQ.cjs → virtual-Cbvj12lU.cjs} +33 -33
  143. package/dist/{virtual-B9imjOqe.mjs → virtual-DvkJm7gK.mjs} +7 -7
  144. package/dist/virtual-DvkJm7gK.mjs.map +1 -0
  145. package/dist/vite.cjs +84 -19
  146. package/dist/vite.d.cts +5 -16
  147. package/dist/vite.d.cts.map +1 -1
  148. package/dist/vite.d.mts +5 -19
  149. package/dist/vite.d.mts.map +1 -1
  150. package/dist/vite.mjs +67 -14
  151. package/dist/vite.mjs.map +1 -0
  152. package/dist/webpack.cjs +42 -16
  153. package/dist/webpack.d.cts +5 -29
  154. package/dist/webpack.d.cts.map +1 -1
  155. package/dist/webpack.d.mts +5 -32
  156. package/dist/webpack.d.mts.map +1 -1
  157. package/dist/webpack.mjs +26 -11
  158. package/dist/webpack.mjs.map +1 -0
  159. package/package.json +15 -15
  160. package/dist/api-CY668wMZ.mjs.map +0 -1
  161. package/dist/commands-7TWNqTU1.d.cts +0 -12
  162. package/dist/commands-7TWNqTU1.d.cts.map +0 -1
  163. package/dist/commands-yacLkOi0.d.mts +0 -12
  164. package/dist/commands-yacLkOi0.d.mts.map +0 -1
  165. package/dist/config-CK756s0L.d.mts +0 -2232
  166. package/dist/config-CK756s0L.d.mts.map +0 -1
  167. package/dist/config-CiPXgwzt.d.mts +0 -39
  168. package/dist/config-CiPXgwzt.d.mts.map +0 -1
  169. package/dist/config-D4Fh2gQL.mjs +0 -87
  170. package/dist/config-D4Fh2gQL.mjs.map +0 -1
  171. package/dist/config-D86Vw7SC.cjs +0 -105
  172. package/dist/config-J74ORCFY.d.cts +0 -39
  173. package/dist/config-J74ORCFY.d.cts.map +0 -1
  174. package/dist/config-vnrrSxEB.d.cts +0 -2232
  175. package/dist/config-vnrrSxEB.d.cts.map +0 -1
  176. package/dist/constants-CZh5rsgh.cjs +0 -103
  177. package/dist/constants-cXxSHhNp.mjs +0 -32
  178. package/dist/constants-cXxSHhNp.mjs.map +0 -1
  179. package/dist/constants.d.cts.map +0 -1
  180. package/dist/constants.d.mts.map +0 -1
  181. package/dist/esbuild-B3NuCco0.cjs +0 -100
  182. package/dist/esbuild-DWiE0pYc.mjs +0 -82
  183. package/dist/esbuild-DWiE0pYc.mjs.map +0 -1
  184. package/dist/index-2JXW-b2-.d.mts +0 -82
  185. package/dist/index-2JXW-b2-.d.mts.map +0 -1
  186. package/dist/index-6BLROVtJ.d.mts +0 -261
  187. package/dist/index-6BLROVtJ.d.mts.map +0 -1
  188. package/dist/index-C7W0kmm7.d.mts +0 -171
  189. package/dist/index-C7W0kmm7.d.mts.map +0 -1
  190. package/dist/index-DJ-k0GOX.d.cts +0 -261
  191. package/dist/index-DJ-k0GOX.d.cts.map +0 -1
  192. package/dist/paths-CS8ecCnW.mjs +0 -81
  193. package/dist/paths-CS8ecCnW.mjs.map +0 -1
  194. package/dist/paths-YmyIGEVo.cjs +0 -98
  195. package/dist/plugin-B9TQt-p0.d.cts +0 -82
  196. package/dist/plugin-B9TQt-p0.d.cts.map +0 -1
  197. package/dist/plugin-BE3wmhoU.d.cts +0 -26
  198. package/dist/plugin-BE3wmhoU.d.cts.map +0 -1
  199. package/dist/plugin-CZ_PJPpQ.cjs +0 -96
  200. package/dist/plugin-C_8RhG5V.d.mts +0 -26
  201. package/dist/plugin-C_8RhG5V.d.mts.map +0 -1
  202. package/dist/plugin-E5foRD0k.mjs +0 -61
  203. package/dist/plugin-E5foRD0k.mjs.map +0 -1
  204. package/dist/plugin-utils-C3HnZJl1.mjs +0 -387
  205. package/dist/plugin-utils-C3HnZJl1.mjs.map +0 -1
  206. package/dist/plugin-utils-Ck3cx3w6.cjs +0 -531
  207. package/dist/plugin-utils.d.cts.map +0 -1
  208. package/dist/plugin-utils.d.mts.map +0 -1
  209. package/dist/resolve-options-6sXFqzEA.mjs +0 -116
  210. package/dist/resolve-options-6sXFqzEA.mjs.map +0 -1
  211. package/dist/resolve-options-BQnTgg3V.cjs +0 -105
  212. package/dist/resolve-options-D-RGs8j8.mjs +0 -117
  213. package/dist/resolve-options-D-RGs8j8.mjs.map +0 -1
  214. package/dist/resolve-options-DHL3RM8F.mjs +0 -87
  215. package/dist/resolve-options-DHL3RM8F.mjs.map +0 -1
  216. package/dist/resolve-options-lxQ2pm0W.cjs +0 -127
  217. package/dist/resolve-options-vyFhhkLp.cjs +0 -133
  218. package/dist/rolldown-CQI8ps6f.cjs +0 -83
  219. package/dist/rolldown-DsXEFXyP.mjs +0 -65
  220. package/dist/rolldown-DsXEFXyP.mjs.map +0 -1
  221. package/dist/tsconfig-B92heKit.mjs.map +0 -1
  222. package/dist/types-Bh_vLuQ0.d.mts +0 -1
  223. package/dist/utils-BbDma_5Y.cjs +0 -449
  224. package/dist/utils-DoQcX7Sk.mjs +0 -339
  225. package/dist/utils-DoQcX7Sk.mjs.map +0 -1
  226. package/dist/virtual-B9imjOqe.mjs.map +0 -1
  227. package/dist/vite-Bx1gbbj3.mjs +0 -171
  228. package/dist/vite-Bx1gbbj3.mjs.map +0 -1
  229. package/dist/vite-XV170zx6.cjs +0 -189
  230. package/dist/webpack-9G4xJBfz.cjs +0 -107
  231. package/dist/webpack-BkTkELre.mjs +0 -88
  232. package/dist/webpack-BkTkELre.mjs.map +0 -1
  233. package/dist/write-file-CpNWY8SV.d.cts +0 -171
  234. package/dist/write-file-CpNWY8SV.d.cts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Br as StorageAdapter, Hr as StoragePreset, _t as Context } from "../config-vnrrSxEB.cjs";
1
+ import { t as types_d_exports } from "../types-DerAvFjs.cjs";
2
2
  import { MaybePromise } from "@stryke/types/base";
3
3
  import { writeFile, writeFileSync } from "@stryke/fs/write-file";
4
4
 
@@ -11,9 +11,9 @@ interface StorageAdapterOptions {
11
11
  /**
12
12
  * Abstract base class for storage adapters, providing a template for storage operations.
13
13
  */
14
- declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions = StorageAdapterOptions> implements StorageAdapter {
14
+ declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions = StorageAdapterOptions> implements types_d_exports.StorageAdapter {
15
15
  #private;
16
- protected context: Context;
16
+ protected context: types_d_exports.Context;
17
17
  /**
18
18
  * A name identifying the storage adapter type.
19
19
  */
@@ -28,14 +28,14 @@ declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions
28
28
  * @remarks
29
29
  * This can be used as an alternate way to identify the type of storage being used.
30
30
  */
31
- readonly preset?: StoragePreset | null;
31
+ readonly preset?: types_d_exports.StoragePreset | null;
32
32
  /**
33
33
  * Constructor for the BaseStorageAdapter.
34
34
  *
35
35
  * @param context - The Powerlines context.
36
36
  * @param options - Configuration options for the storage adapter.
37
37
  */
38
- constructor(context: Context, options?: TOptions);
38
+ constructor(context: types_d_exports.Context, options?: TOptions);
39
39
  /**
40
40
  * Synchronously checks if a key exists in the storage.
41
41
  *
@@ -221,7 +221,7 @@ declare class FileSystemStorageAdapter extends BaseStorageAdapter {
221
221
  * @param context - The Powerlines context.
222
222
  * @param options - Configuration options for the storage adapter.
223
223
  */
224
- constructor(context: Context, options?: StorageAdapterOptions);
224
+ constructor(context: types_d_exports.Context, options?: StorageAdapterOptions);
225
225
  /**
226
226
  * Synchronously checks if a key exists in the storage.
227
227
  *
@@ -369,7 +369,7 @@ declare class VirtualStorageAdapter extends BaseStorageAdapter {
369
369
  * @param context - The Powerlines context.
370
370
  * @param options - Configuration options for the storage adapter.
371
371
  */
372
- constructor(context: Context, options?: StorageAdapterOptions);
372
+ constructor(context: types_d_exports.Context, options?: StorageAdapterOptions);
373
373
  /**
374
374
  * Synchronously checks if a key exists in the storage.
375
375
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/storage/base.ts","../../src/storage/file-system.ts","../../src/storage/helpers.ts","../../src/storage/virtual.ts"],"sourcesContent":[],"mappings":";;;;;UAyBiB,qBAAA;;;EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,MAAqB,EAAA;AAStC;;;;AAgBkB,uBAhBI,kBAgBJ,CAAA,iBAfC,qBAeD,GAfyB,qBAezB,CAAA,YAdL,cAcK,CAAA;EAQS,CAAA,OAAA;EASJ,UAAA,OAAA,EAAA,OAAA;EACV;;;EAyDmC,SAAA,IAAA,EAAA,MAAA;EAkBT;;;EA+EH,OAAA,EA5KlB,QA4KkB;EAoBE;;;;;;EA9MzB,SAAA,MAAA,CAAA,EAsBc,aAtBd,GAAA,IAAA;EAAc;;;;;ACJ3B;EACY,WAAA,CAAA,OAAU,EDkCC,OClCoB,EAAA,OAAR,CAAV,EDmCZ,QCnCsB;EAKtB;;;;;;EAgJgC,SAAA,UAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAoBG;;;;;;uBDjHZ;;;AE/DpC;AAUA;AAaA;;;;ACxBA;;;;;EAA2C,GAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EHkFV,OGlFU,CAAA,MAAA,GAAA,IAAA,CAAA;EAAkB;;;;;;;;;;;;;mCHoGb;;;;;;;;;;;;0BAkBT;;;;;;;;;;;;uBAgBH;;;;;;;;;;;;;wBAgCC;;;;;;;;;;;;;;uBA+BD;;;;;;;;;;;;;;4BAoBE;;;;;;;;;;;;;;uBAoBL;;;;;;aASb;;;;;;GASJ,MAAA,CAAO,YAAA,KAAa;;;;;;;;;;;;;;;;;;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qBHdpC;EAAc;;;;;ACJ3B;EACY,UAAA,CAAA,GAAU,EAAA,MAAA,CAAA,EAAA,OAAqB;EAK9B;;;;;;EAgJgC,OAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAoBG;;;;;;;;;AChLhD;AAUA;AAaA;;;;ACxBA;;;;EA2FmC,QAAA,CAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA;EA3FQ;;;;;aA2FR"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/storage/base.ts","../../src/storage/file-system.ts","../../src/storage/helpers.ts","../../src/storage/virtual.ts"],"mappings":";;;;;UAyBiB,qBAAA;EACf,IAAA;EACA,UAAA;EACA,MAAA;AAAA;;;;uBAMoB,kBAAA,kBACH,qBAAA,GAAwB,qBAAA,aAC9B,eAAA,CAAA,cAAA;EAAA;YA+BC,OAAA,EAAS,eAAA,CAAA,OAAA;EAvCf;AAMR;;EANQ,SAiBU,IAAA;EAVC;;;EAeV,OAAA,EAAS,QAAA;EAQS;;;;;;EAAA,SAAT,MAAA,GAAS,eAAA,CAAA,aAAA;EAqGS;;;;;;cA5FtB,OAAA,EAAS,eAAA,CAAA,OAAA,EACnB,OAAA,GAAS,QAAA;EAoNG;;;;;;EAAA,SAvME,UAAA,CAAW,GAAA;EA9Cc;;;;;;EAsD5B,MAAA,CAAO,GAAA,WAAc,OAAA;EAvClB;;;;;;EAAA,SAiDA,OAAA,CAAQ,GAAA;EA/BtB;;;;;;EAuCW,GAAA,CAAI,GAAA,WAAc,OAAA;EARP;;;;;;EAAA,SAkBR,OAAA,CAAQ,GAAA,UAAa,KAAA;EAQxB;;;;;;EAAA,GAAA,CAAI,GAAA,UAAa,KAAA,WAAgB,OAAA;EAkB3B;;;;;EAPZ,SAAA,CAAU,CAAA;EAuBiB;;;;;EAhBrB,KAAA,CAAM,OAAA,WAAkB,OAAA;EAuErB;;;;;EAAA,SA9DA,UAAA,CAAW,GAAA;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CM,GAAA,CAAI,GAAA,UAAa,KAAA,WAAgB,OAAA;EDrBlB;;;;;ECkD9B,UAAA,CAAW,GAAA;ED/BD;;;;;EC8CK,MAAA,CAAO,GAAA,WAAc,OAAA;EDvB9B;;;;;ECkCG,SAAA,CAAU,OAAA;EDFP;;;;;ECWG,KAAA,CAAM,OAAA,WAAkB,OAAA;EDoBZ;;;;;;ECV3B,QAAA,CAAS,IAAA;EDwCE;;;;;;ECxBI,IAAA,CAAK,IAAA,YAAgB,OAAA;EDoDtB;;;;;;ECtCL,eAAA,CAAgB,GAAA;EDqFJ;;;;;;EC3EZ,UAAA,CAAW,GAAA;AAAA;AAAA;;;;;;;;;ADnO7B;iBECgB,WAAA,CAAY,GAAA;;;;;;;iBAUZ,cAAA,CAAe,GAAA;AFF/B;;;;;;AAAA,iBEegB,YAAA,CAAa,GAAA;;;;;;cCxBhB,qBAAA,SAA8B,kBAAA;EHAL;;;EGI7B,IAAA;EHFP;;;;AAOF;;EAPE,SGUyB,MAAA;EHFR;;;EAAA,UGOP,IAAA,EAAI,GAAA;EHgBW;;;;;;cGRN,OAAA,EAAS,eAAA,CAAA,OAAA,EAAS,OAAA,GAAU,qBAAA;EH6Gb;;;;;;EGnG3B,UAAA,CAAW,GAAA;EH4NJ;;;;;;EGlNP,OAAA,CAAQ,GAAA;EHnC0B;;;;;;EG6ClC,OAAA,CAAQ,GAAA,UAAa,KAAA;EH9BZ;;;;;EGyCT,UAAA,CAAW,GAAA;EHvBP;;;;;;EGmCJ,QAAA,CAAS,IAAA;EHJA;;;;;EGiBM,OAAA,CAAA,GAAW,OAAA;EHCT;;;;;EAAA,cGQD,SAAA,CAAA;AAAA"}
@@ -1,8 +1,4 @@
1
- import { Br as StorageAdapter, Hr as StoragePreset, _t as Context } from "../config-CK756s0L.mjs";
2
- import "../config-CiPXgwzt.mjs";
3
- import "../index-C7W0kmm7.mjs";
4
- import "../index-2JXW-b2-.mjs";
5
- import "../types-Bh_vLuQ0.mjs";
1
+ import { t as types_d_exports } from "../types-ro7jWCtL.mjs";
6
2
  import { writeFile, writeFileSync } from "@stryke/fs/write-file";
7
3
  import { MaybePromise } from "@stryke/types/base";
8
4
 
@@ -15,9 +11,9 @@ interface StorageAdapterOptions {
15
11
  /**
16
12
  * Abstract base class for storage adapters, providing a template for storage operations.
17
13
  */
18
- declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions = StorageAdapterOptions> implements StorageAdapter {
14
+ declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions = StorageAdapterOptions> implements types_d_exports.StorageAdapter {
19
15
  #private;
20
- protected context: Context;
16
+ protected context: types_d_exports.Context;
21
17
  /**
22
18
  * A name identifying the storage adapter type.
23
19
  */
@@ -32,14 +28,14 @@ declare abstract class BaseStorageAdapter<TOptions extends StorageAdapterOptions
32
28
  * @remarks
33
29
  * This can be used as an alternate way to identify the type of storage being used.
34
30
  */
35
- readonly preset?: StoragePreset | null;
31
+ readonly preset?: types_d_exports.StoragePreset | null;
36
32
  /**
37
33
  * Constructor for the BaseStorageAdapter.
38
34
  *
39
35
  * @param context - The Powerlines context.
40
36
  * @param options - Configuration options for the storage adapter.
41
37
  */
42
- constructor(context: Context, options?: TOptions);
38
+ constructor(context: types_d_exports.Context, options?: TOptions);
43
39
  /**
44
40
  * Synchronously checks if a key exists in the storage.
45
41
  *
@@ -225,7 +221,7 @@ declare class FileSystemStorageAdapter extends BaseStorageAdapter {
225
221
  * @param context - The Powerlines context.
226
222
  * @param options - Configuration options for the storage adapter.
227
223
  */
228
- constructor(context: Context, options?: StorageAdapterOptions);
224
+ constructor(context: types_d_exports.Context, options?: StorageAdapterOptions);
229
225
  /**
230
226
  * Synchronously checks if a key exists in the storage.
231
227
  *
@@ -373,7 +369,7 @@ declare class VirtualStorageAdapter extends BaseStorageAdapter {
373
369
  * @param context - The Powerlines context.
374
370
  * @param options - Configuration options for the storage adapter.
375
371
  */
376
- constructor(context: Context, options?: StorageAdapterOptions);
372
+ constructor(context: types_d_exports.Context, options?: StorageAdapterOptions);
377
373
  /**
378
374
  * Synchronously checks if a key exists in the storage.
379
375
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/storage/base.ts","../../src/storage/file-system.ts","../../src/storage/helpers.ts","../../src/storage/virtual.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAyBiB,qBAAA;;;;;;;AAAjB;AASsB,uBAAA,kBAAkB,CAAA,iBACrB,qBADqB,GACG,qBADH,CAAA,YAE3B,cAF2B,CAAA;EACrB,CAAA,OAAA;EAAwB,UAAA,OAAA,EAgCpB,OAhCoB;EAgCpB;;;EAAA,SAAA,IAAA,EAAA,MAAA;EACV;;;EAyDmC,OAAA,EA3E9B,QA2E8B;EAkBT;;;;;;EAgInB,SAAA,MAAA,CAAA,EArNO,aAqNP,GAAA,IAAA;EASgB;;;;;;uBArNb,mBACV;;;ACpCb;AACA;AAKA;;EAoBiD,SAAA,UAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAoBJ;;;;;;EAxCC,MAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EDmDV,OCnDU,CAAA,OAAA,CAAA;EAAkB;;;;;;ECZhD,SAAA,OAAW,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAUX;AAahB;;;;ACxBA;EAiBgB,GAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EHiEiB,OGjEjB,CAAA,MAAA,GAAA,IAAA,CAAA;EAQc;;;;;;;;;;;;;mCH2EkB;;;;;;;;;;;;0BAkBT;;;;;;;;;;;;uBAgBH;;;;;;;;;;;;;wBAgCC;;;;;;;;;;;;;;uBA+BD;;;;;;;;;;;;;;4BAoBE;;;;;;;;;;;;;;uBAoBL;;;;;;aASb;;;;;;GASJ,MAAA,CAAO,YAAA,KAAa;;;;;;;;;;;;;;;;;;;;;;;;;wBA+CN;;;;;KCvSlB,cAAA,GAAiB,kBAAkB;KACnC,UAAA,GAAa,kBAAk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AAA,GAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAkB;;;;;;ECZhD;AAUhB;AAaA;;;;ECxBa,QAAA,CAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAAsB,MAAA,EAAA;EAiBnB;;;;;EAjB6C,OAAA,CAAA,CAAA,EA2F1B,OA3F0B,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/storage/base.ts","../../src/storage/file-system.ts","../../src/storage/helpers.ts","../../src/storage/virtual.ts"],"mappings":";;;;;UAyBiB,qBAAA;EACf,IAAA;EACA,UAAA;EACA,MAAA;AAAA;;;;uBAMoB,kBAAA,kBACH,qBAAA,GAAwB,qBAAA,aAC9B,eAAA,CAAA,cAAA;EAAA;YA+BC,OAAA,EAAS,eAAA,CAAA,OAAA;EAvCf;AAMR;;EANQ,SAiBU,IAAA;EAVC;;;EAeV,OAAA,EAAS,QAAA;EAQS;;;;;;EAAA,SAAT,MAAA,GAAS,eAAA,CAAA,aAAA;EAqGS;;;;;;cA5FtB,OAAA,EAAS,eAAA,CAAA,OAAA,EACnB,OAAA,GAAS,QAAA;EAoNG;;;;;;EAAA,SAvME,UAAA,CAAW,GAAA;EA9Cc;;;;;;EAsD5B,MAAA,CAAO,GAAA,WAAc,OAAA;EAvClB;;;;;;EAAA,SAiDA,OAAA,CAAQ,GAAA;EA/BtB;;;;;;EAuCW,GAAA,CAAI,GAAA,WAAc,OAAA;EARP;;;;;;EAAA,SAkBR,OAAA,CAAQ,GAAA,UAAa,KAAA;EAQxB;;;;;;EAAA,GAAA,CAAI,GAAA,UAAa,KAAA,WAAgB,OAAA;EAkB3B;;;;;EAPZ,SAAA,CAAU,CAAA;EAuBiB;;;;;EAhBrB,KAAA,CAAM,OAAA,WAAkB,OAAA;EAuErB;;;;;EAAA,SA9DA,UAAA,CAAW,GAAA;EAgFJ;;;;;EAzEV,MAAA,CAAO,GAAA,WAAc,OAAA;EAuGrB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;;ECkD9B,UAAA,CAAW,GAAA;ED/BD;;;;;EC8CK,MAAA,CAAO,GAAA,WAAc,OAAA;EDvB9B;;;;;ECkCG,SAAA,CAAU,OAAA;EDFP;;;;;ECWG,KAAA,CAAM,OAAA,WAAkB,OAAA;EDoBZ;;;;;;ECV3B,QAAA,CAAS,IAAA;EDwCE;;;;;;ECxBI,IAAA,CAAK,IAAA,YAAgB,OAAA;EDoDtB;;;;;;ECtCL,eAAA,CAAgB,GAAA;EDqFJ;;;;;;EC3EZ,UAAA,CAAW,GAAA;AAAA;AAAA;;;;;;;;;ADnO7B;iBECgB,WAAA,CAAY,GAAA;;;;;;;iBAUZ,cAAA,CAAe,GAAA;AFF/B;;;;;;AAAA,iBEegB,YAAA,CAAa,GAAA;;;;;;cCxBhB,qBAAA,SAA8B,kBAAA;EHAL;;;EGI7B,IAAA;EHFP;;;;AAOF;;EAPE,SGUyB,MAAA;EHFR;;;EAAA,UGOP,IAAA,EAAI,GAAA;EHgBW;;;;;;cGRN,OAAA,EAAS,eAAA,CAAA,OAAA,EAAS,OAAA,GAAU,qBAAA;EH6Gb;;;;;;EGnG3B,UAAA,CAAW,GAAA;EH4NJ;;;;;;EGlNP,OAAA,CAAQ,GAAA;EHnC0B;;;;;;EG6ClC,OAAA,CAAQ,GAAA,UAAa,KAAA;EH9BZ;;;;;EGyCT,UAAA,CAAW,GAAA;EHvBP;;;;;;EGmCJ,QAAA,CAAS,IAAA;EHJA;;;;;EGiBM,OAAA,CAAA,GAAW,OAAA;EHCT;;;;;EAAA,cGQD,SAAA,CAAA;AAAA"}
@@ -1,5 +1,3 @@
1
- import "../paths-CS8ecCnW.mjs";
2
- import "../utils-DoQcX7Sk.mjs";
3
- import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-B9imjOqe.mjs";
1
+ import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-DvkJm7gK.mjs";
4
2
 
5
3
  export { BaseStorageAdapter, FileSystemStorageAdapter, VirtualStorageAdapter, ignoreExists, ignoreNotfound, isFileError };
@@ -1,11 +1,11 @@
1
- const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- let __stryke_path_append = require("@stryke/path/append");
3
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
1
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ let _stryke_path_append = require("@stryke/path/append");
3
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
4
4
  let ts_morph = require("ts-morph");
5
5
  let defu = require("defu");
6
6
  defu = require_chunk.__toESM(defu);
7
- let __stryke_fs_exists = require("@stryke/fs/exists");
8
- let __stryke_fs_json = require("@stryke/fs/json");
7
+ let _stryke_fs_exists = require("@stryke/fs/exists");
8
+ let _stryke_fs_json = require("@stryke/fs/json");
9
9
  let typescript = require("typescript");
10
10
  typescript = require_chunk.__toESM(typescript);
11
11
 
@@ -140,11 +140,11 @@ function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
140
140
  */
141
141
  function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
142
142
  let tsconfigFilePath = tsconfig;
143
- if (!(0, __stryke_fs_exists.existsSync)(tsconfigFilePath)) {
144
- tsconfigFilePath = (0, __stryke_path_append.appendPath)(tsconfig, projectRoot);
145
- if (!(0, __stryke_fs_exists.existsSync)(tsconfigFilePath)) {
146
- tsconfigFilePath = (0, __stryke_path_append.appendPath)(tsconfig, (0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot));
147
- if (!(0, __stryke_fs_exists.existsSync)(tsconfigFilePath)) return;
143
+ if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) {
144
+ tsconfigFilePath = (0, _stryke_path_append.appendPath)(tsconfig, projectRoot);
145
+ if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) {
146
+ tsconfigFilePath = (0, _stryke_path_append.appendPath)(tsconfig, (0, _stryke_path_append.appendPath)(projectRoot, workspaceRoot));
147
+ if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) return;
148
148
  }
149
149
  }
150
150
  return tsconfigFilePath;
@@ -234,9 +234,9 @@ function isIncludeMatchFound(tsconfigType, types) {
234
234
  */
235
235
  function getParsedTypeScriptConfig(workspaceRoot, projectRoot, tsconfig, tsconfigRaw = {}, originalTsconfigJson, host = typescript.default.sys) {
236
236
  const tsconfigFilePath = getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
237
- const tsconfigJson = (0, __stryke_fs_json.readJsonFileSync)(tsconfigFilePath);
238
- if (!tsconfigJson) throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${(0, __stryke_path_join_paths.joinPaths)(projectRoot, tsconfig ?? "tsconfig.json")}`);
239
- const parsedCommandLine = typescript.default.parseJsonConfigFileContent((0, defu.default)(tsconfigRaw ?? {}, tsconfigJson), host, (0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot));
237
+ const tsconfigJson = (0, _stryke_fs_json.readJsonFileSync)(tsconfigFilePath);
238
+ if (!tsconfigJson) throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${(0, _stryke_path_join_paths.joinPaths)(projectRoot, tsconfig ?? "tsconfig.json")}`);
239
+ const parsedCommandLine = typescript.default.parseJsonConfigFileContent((0, defu.default)(tsconfigRaw ?? {}, tsconfigJson), host, (0, _stryke_path_append.appendPath)(projectRoot, workspaceRoot));
240
240
  if (parsedCommandLine.errors.length > 0) {
241
241
  const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:
242
242
  ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && error.code ? `[${error.category}-${error.code}]: ` : "") + error.messageText.toString()}`).join("\n")}
@@ -1,7 +1,7 @@
1
1
  import { appendPath } from "@stryke/path/append";
2
2
  import { joinPaths } from "@stryke/path/join-paths";
3
3
  import { InMemoryFileSystemHost, Project } from "ts-morph";
4
- import defu from "defu";
4
+ import defu$1 from "defu";
5
5
  import { existsSync } from "@stryke/fs/exists";
6
6
  import { readJsonFileSync } from "@stryke/fs/json";
7
7
  import ts from "typescript";
@@ -94,11 +94,11 @@ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
94
94
  */
95
95
  function createProgram(context, override) {
96
96
  context.debug(`Creating ts-morph Project instance with configuration from: ${context.tsconfig.tsconfigFilePath}.`);
97
- return new Project(defu(override ?? {}, {
97
+ return new Project(defu$1(override ?? {}, {
98
98
  skipAddingFilesFromTsConfig: false,
99
99
  tsConfigFilePath: context.tsconfig.tsconfigFilePath,
100
100
  fileSystem: new VirtualFileSystemHost(context),
101
- compilerOptions: defu(context.tsconfig.options ?? {}, { lib: ["lib.esnext.full.d.ts"] })
101
+ compilerOptions: defu$1(context.tsconfig.options ?? {}, { lib: ["lib.esnext.full.d.ts"] })
102
102
  }));
103
103
  }
104
104
 
@@ -233,7 +233,7 @@ function getParsedTypeScriptConfig(workspaceRoot, projectRoot, tsconfig, tsconfi
233
233
  const tsconfigFilePath = getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
234
234
  const tsconfigJson = readJsonFileSync(tsconfigFilePath);
235
235
  if (!tsconfigJson) throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${joinPaths(projectRoot, tsconfig ?? "tsconfig.json")}`);
236
- const parsedCommandLine = ts.parseJsonConfigFileContent(defu(tsconfigRaw ?? {}, tsconfigJson), host, appendPath(projectRoot, workspaceRoot));
236
+ const parsedCommandLine = ts.parseJsonConfigFileContent(defu$1(tsconfigRaw ?? {}, tsconfigJson), host, appendPath(projectRoot, workspaceRoot));
237
237
  if (parsedCommandLine.errors.length > 0) {
238
238
  const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:
239
239
  ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && error.code ? `[${error.category}-${error.code}]: ` : "") + error.messageText.toString()}`).join("\n")}
@@ -250,4 +250,4 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
250
250
 
251
251
  //#endregion
252
252
  export { isIncludeMatchFound as a, VirtualFileSystemHost as c, getTsconfigFilePath as i, createProgram as l, findMatch as n, isMatchFound as o, getParsedTypeScriptConfig as r, tryTsconfigFilePath as s, findIncludeMatch as t };
253
- //# sourceMappingURL=tsconfig-B92heKit.mjs.map
253
+ //# sourceMappingURL=tsconfig-D9GCB2I9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-D9GCB2I9.mjs","names":["#context","defu","defu"],"sources":["../src/typescript/ts-morph.ts","../src/typescript/tsconfig.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 { Context } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport {\n CompilerOptions,\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n ProjectOptions,\n RuntimeDirEntry\n} from \"ts-morph\";\n\nexport class VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #context: Context;\n\n public constructor(context: Context) {\n super();\n\n this.#context = context;\n }\n\n public override deleteSync(path: string) {\n this.#context.fs.removeSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n if (!this.#context.fs.isDirectorySync(dirPath)) {\n return [];\n }\n\n return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#context.fs.resolveSync(entry);\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#context.fs.isDirectorySync(fullPath),\n isFile: this.#context.fs.isFileSync(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return (await this.#context.fs.read(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return this.#context.fs.readSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#context.fs.write(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#context.fs.writeSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#context.fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#context.fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#context.fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#context.fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#context.fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#context.fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#context.fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#context.fs.isFileSync(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#context.fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#context.fs.isDirectorySync(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#context.fs.resolveSync(path) || path;\n }\n\n public override getCurrentDirectory() {\n return this.#context.workspaceConfig.workspaceRoot;\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#context.fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#context.fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @param context - The Powerlines context\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(\n context: Context,\n override: Partial<ProjectOptions>\n): Project {\n context.debug(\n `Creating ts-morph Project instance with configuration from: ${\n context.tsconfig.tsconfigFilePath\n }.`\n );\n\n const project = new Project(\n defu(override ?? {}, {\n skipAddingFilesFromTsConfig: false,\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context),\n compilerOptions: defu(context.tsconfig.options ?? {}, {\n lib: [\"lib.esnext.full.d.ts\"]\n }) as CompilerOptions\n })\n );\n\n return project;\n}\n","/* -------------------------------------------------------------------\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 { ParsedTypeScriptConfig, TSConfig } from \"@powerlines/core\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;AA6BA,IAAa,wBAAb,cACU,uBAEV;CACE;CAEA,AAAO,YAAY,SAAkB;AACnC,SAAO;AAEP,QAAKA,UAAW;;CAGlB,AAAgB,WAAW,MAAc;AACvC,QAAKA,QAAS,GAAG,WAAW,KAAK;;CAGnC,AAAgB,YAAY,SAAoC;AAC9D,MAAI,CAAC,MAAKA,QAAS,GAAG,gBAAgB,QAAQ,CAC5C,QAAO,EAAE;AAGX,SAAO,MAAKA,QAAS,GAAG,SAAS,QAAQ,CAAC,QAAQ,KAAK,UAAU;GAC/D,MAAM,WAAW,MAAKA,QAAS,GAAG,YAAY,MAAM;AACpD,OAAI,SACF,KAAI,KAAK;IACP,MAAM;IACN,aAAa,MAAKA,QAAS,GAAG,gBAAgB,SAAS;IACvD,QAAQ,MAAKA,QAAS,GAAG,WAAW,SAAS;IAC7C,WAAW;IACZ,CAAC;AAGJ,UAAO;KACN,EAAE,CAAsB;;CAG7B,MAAsB,SAAS,UAAkB;AAC/C,MAAI,CAAC,MAAKA,QAAS,GAAG,WAAW,SAAS,CACxC,QAAO;AAGT,SAAQ,MAAM,MAAKA,QAAS,GAAG,KAAK,SAAS;;CAG/C,AAAgB,aAAa,UAAkB;AAC7C,MAAI,CAAC,MAAKA,QAAS,GAAG,WAAW,SAAS,CACxC,QAAO;AAGT,SAAO,MAAKA,QAAS,GAAG,SAAS,SAAS;;CAG5C,MAAsB,UAAU,UAAkB,UAAkB;AAClE,SAAO,MAAKA,QAAS,GAAG,MAAM,UAAU,SAAS;;CAGnD,AAAgB,cAAc,UAAkB,UAAkB;AAChE,QAAKA,QAAS,GAAG,UAAU,UAAU,SAAS;;CAGhD,MAAsB,MAAM,SAAiB;AAC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;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;EACD"}
package/dist/tsdown.cjs CHANGED
@@ -1,174 +1,16 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_chunk = require('./chunk-CbDLau6x.cjs');
3
- const require_api = require('./api-GPlMYw0d.cjs');
4
- require('./tsconfig-C8M8X6U0.cjs');
5
- const require_plugin_utils = require('./plugin-utils-Ck3cx3w6.cjs');
6
- require('./plugin-CZ_PJPpQ.cjs');
7
- require('./paths-YmyIGEVo.cjs');
8
- require('./constants-CZh5rsgh.cjs');
9
- require('./config-D86Vw7SC.cjs');
10
- require('./utils-BbDma_5Y.cjs');
11
- require('./virtual-B1MLgqnQ.cjs');
12
- require('./resolve-options-vyFhhkLp.cjs');
13
- require('./resolve-options-lxQ2pm0W.cjs');
14
- const require_rolldown = require('./rolldown-CQI8ps6f.cjs');
15
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
16
- let __stryke_path_append = require("@stryke/path/append");
17
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
18
- let __stryke_path_replace = require("@stryke/path/replace");
19
- let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
20
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
21
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
22
- let defu = require("defu");
23
- defu = require_chunk.__toESM(defu);
24
- let unplugin = require("unplugin");
25
- let tsdown = require("tsdown");
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
+ require('./api-CFXLaAxU.cjs');
4
+ require('./tsconfig-BJrUrPC_.cjs');
5
+ require('./virtual-Cbvj12lU.cjs');
6
+ const require_rolldown = require('./rolldown.cjs');
7
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
8
+ let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
9
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
10
+ let _powerlines_plugin_tsdown_helpers_resolve_options = require("@powerlines/plugin-tsdown/helpers/resolve-options");
11
+ let _powerlines_plugin_tsdown = require("@powerlines/plugin-tsdown");
12
+ _powerlines_plugin_tsdown = require_chunk.__toESM(_powerlines_plugin_tsdown);
26
13
 
27
- //#region ../plugin-tsdown/src/helpers/resolve-options.ts
28
- const DEFAULT_TSDOWN_CONFIG = {
29
- platform: "neutral",
30
- target: "esnext",
31
- fixedExtension: true,
32
- nodeProtocol: true,
33
- clean: false
34
- };
35
- /**
36
- * Resolves the entry options for [tsdown](https://github.com/rolldown/tsdown).
37
- *
38
- * @param formats - The formats to resolve.
39
- * @returns The resolved entry options.
40
- */
41
- function resolveFormat(formats) {
42
- return (0, __stryke_convert_to_array.toArray)(formats).map((format) => {
43
- switch (format) {
44
- case "cjs": return "cjs";
45
- case "iife": return "iife";
46
- case "esm":
47
- default: return "esm";
48
- }
49
- });
50
- }
51
- /**
52
- * Resolves the entry options for [tsdown](https://github.com/rolldown/tsdown).
53
- *
54
- * @param formats - The formats to resolve.
55
- * @returns The resolved entry options.
56
- */
57
- function resolveFromFormat(formats) {
58
- return (0, __stryke_convert_to_array.toArray)(formats).map((format) => {
59
- switch (format) {
60
- case "cjs":
61
- case "commonjs": return "cjs";
62
- case "iife": return "iife";
63
- case "esm":
64
- case "es":
65
- case "module":
66
- case "umd":
67
- default: return "esm";
68
- }
69
- });
70
- }
71
- const formatMessage = (context, ...msgs) => msgs.filter(Boolean).join(" ").replace(new RegExp(`\\[${context.config.name}\\]`, "g"), "").replaceAll(/^\s+/g, "").replaceAll(/\s+$/g, "").trim();
72
- /**
73
- * Resolves the options for [tsdown](https://github.com/rolldown/tsdown).
74
- *
75
- * @param context - The build context.
76
- * @returns The resolved options.
77
- */
78
- function resolveOptions(context) {
79
- const { external, noExternal } = require_plugin_utils.getDependencyConfig(context);
80
- return (0, defu.default)({
81
- entry: context.entry.filter((entry) => entry?.file).length > 0 ? Object.fromEntries(context.entry.filter((entry) => entry?.file).map((entry) => [entry.output || (0, __stryke_path_replace.replaceExtension)((0, __stryke_path_replace.replacePath)((0, __stryke_path_replace.replacePath)(entry.file, (0, __stryke_path_join_paths.joinPaths)(context.config.root, "src")), context.entryPath)), entry.file])) : [(0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, "src", "**/*.ts"), (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, "src", "**/*.tsx")],
82
- external,
83
- noExternal,
84
- alias: context.alias,
85
- resolve: { alias: context.alias },
86
- exports: context.config?.tsdown && context.config.tsdown?.exports ? (0, defu.default)((0, __stryke_type_checks_is_set_object.isSetObject)(context.config.tsdown?.exports) ? context.config.tsdown?.exports : {}, { customExports: (exports$1) => {
87
- const result = Object.fromEntries(Object.entries(exports$1).map(([key, value]) => {
88
- if ((0, __stryke_type_checks_is_set_string.isSetString)(value)) return [key, value];
89
- const currentExport = {};
90
- if ((0, __stryke_type_checks_is_set_string.isSetString)(value.require)) currentExport.require = {
91
- types: (0, __stryke_path_replace.replaceExtension)(value.require, ".d.cts", { fullExtension: true }),
92
- default: value.require
93
- };
94
- if ((0, __stryke_type_checks_is_set_string.isSetString)(value.import)) currentExport.import = {
95
- types: (0, __stryke_path_replace.replaceExtension)(value.import, ".d.mts", { fullExtension: true }),
96
- default: value.import
97
- };
98
- if (!(0, __stryke_type_checks_is_set_object.isSetObject)(value.default)) {
99
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(currentExport.import)) currentExport.default = currentExport.import;
100
- else if ((0, __stryke_type_checks_is_set_object.isSetObject)(currentExport.require)) currentExport.default = currentExport.require;
101
- }
102
- return [key, currentExport];
103
- }));
104
- return Object.keys(result).sort().reduce((ret, key) => {
105
- ret[key] = result[key];
106
- return ret;
107
- }, {});
108
- } }) : void 0
109
- }, context.config?.tsdown ? context.config?.tsdown : {}, context.config?.rolldown ? { inputOptions: context.config?.rolldown } : {}, {
110
- name: context.config.name,
111
- cwd: (0, __stryke_path_append.appendPath)(context.config.root, context.workspaceConfig.workspaceRoot),
112
- define: context.config.define,
113
- inputOptions: { transform: { inject: context.config.inject } },
114
- platform: context.config.platform,
115
- dts: context.config.output.dts,
116
- outDir: (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot),
117
- tsconfig: (0, __stryke_path_append.appendPath)(context.tsconfig.tsconfigFilePath, context.workspaceConfig.workspaceRoot),
118
- format: resolveFormat(context.config.output.format).filter(Boolean),
119
- mode: context.config.mode,
120
- treeshake: context.config?.tsdown ? context.config?.tsdown?.treeshake : void 0,
121
- minify: context.config.mode === "production",
122
- metafile: context.config.mode === "development",
123
- sourcemap: context.config.mode === "development",
124
- debug: context.config.mode === "development",
125
- silent: context.config.logLevel === null || context.config.mode === "production",
126
- logLevel: context.config.logLevel === "trace" ? "debug" : context.config.logLevel,
127
- customLogger: {
128
- level: context.config.logLevel === "trace" ? "debug" : context.config.logLevel,
129
- info: (...msgs) => (0, __stryke_type_checks_is_set_string.isSetString)(formatMessage(context, ...msgs).replace(/\s+/g, "")) && context.debug(formatMessage(context, ...msgs)),
130
- warn: (...msgs) => (0, __stryke_type_checks_is_set_string.isSetString)(formatMessage(context, ...msgs).replace(/\s+/g, "")) && context.warn(formatMessage(context, ...msgs)),
131
- warnOnce: (...msgs) => (0, __stryke_type_checks_is_set_string.isSetString)(formatMessage(context, ...msgs).replace(/\s+/g, "")) && context.warn(formatMessage(context, ...msgs)),
132
- error: (...msgs) => (0, __stryke_type_checks_is_set_string.isSetString)(formatMessage(context, ...msgs).replace(/\s+/g, "")) && context.error(formatMessage(context, ...msgs)),
133
- success: (...msgs) => (0, __stryke_type_checks_is_set_string.isSetString)(formatMessage(context, ...msgs).replace(/\s+/g, "")) && context.debug(formatMessage(context, ...msgs))
134
- }
135
- }, DEFAULT_TSDOWN_CONFIG);
136
- }
137
-
138
- //#endregion
139
- //#region ../plugin-tsdown/src/helpers/unplugin.ts
140
- function createTsdownPlugin(context) {
141
- return (0, unplugin.createRolldownPlugin)(require_api.createUnplugin(context))({});
142
- }
143
-
144
- //#endregion
145
- //#region ../plugin-tsdown/src/index.ts
146
- /**
147
- * A Powerlines plugin to use Tsdown to build the project.
148
- */
149
- const plugin = (options = {}) => {
150
- return {
151
- name: "tsdown",
152
- config() {
153
- this.trace("Providing default configuration for the Powerlines `tsdown` build plugin.");
154
- return {
155
- output: { format: ["cjs", "esm"] },
156
- tsdown: { ...options }
157
- };
158
- },
159
- async build() {
160
- this.trace("Starting Tsdown build process...");
161
- await (0, tsdown.build)((0, defu.default)({
162
- config: false,
163
- plugins: [createTsdownPlugin(this)]
164
- }, resolveOptions(this)));
165
- await require_plugin_utils.formatPackageJson(this);
166
- }
167
- };
168
- };
169
- var src_default = plugin;
170
-
171
- //#endregion
172
14
  //#region src/tsdown.ts
173
15
  /**
174
16
  * A Tsdown configuration function that integrates Powerlines into the build process.
@@ -193,20 +35,20 @@ var src_default = plugin;
193
35
  * @param options - The Tsdown options to merge with the Powerlines configuration.
194
36
  * @returns The merged Tsdown configuration options.
195
37
  */
196
- function unplugin$1(options = {}) {
38
+ function unplugin(options = {}) {
197
39
  return {
198
40
  ...options,
199
41
  entry: options.entry,
200
- plugins: [require_rolldown.rolldown_default({
42
+ plugins: [require_rolldown.default({
201
43
  name: options.name,
202
44
  root: options.cwd ?? process.cwd(),
203
45
  output: {
204
46
  outputPath: options.outDir,
205
- format: resolveFromFormat(options.format),
206
- assets: (0, __stryke_convert_to_array.toArray)(options.copy).map((copy) => {
47
+ format: (0, _powerlines_plugin_tsdown_helpers_resolve_options.resolveFromFormat)(options.format),
48
+ assets: (0, _stryke_convert_to_array.toArray)(options.copy).map((copy) => {
207
49
  if (!copy) return;
208
- if ((0, __stryke_type_checks_is_set_string.isSetString)(copy)) return copy;
209
- if ((0, __stryke_type_checks_is_function.isFunction)(copy)) {
50
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(copy)) return copy;
51
+ if ((0, _stryke_type_checks_is_function.isFunction)(copy)) {
210
52
  console.warn("Function-based copy options are not supported in Powerlines.");
211
53
  return;
212
54
  }
@@ -217,15 +59,15 @@ function unplugin$1(options = {}) {
217
59
  }).filter(Boolean)
218
60
  },
219
61
  resolve: {
220
- external: options.external ? (0, __stryke_convert_to_array.toArray)(options.external).map((external) => {
221
- if ((0, __stryke_type_checks_is_function.isFunction)(external)) {
62
+ external: options.external ? (0, _stryke_convert_to_array.toArray)(options.external).map((external) => {
63
+ if ((0, _stryke_type_checks_is_function.isFunction)(external)) {
222
64
  console.warn("Function-based external options are not supported in Powerlines.");
223
65
  return;
224
66
  }
225
67
  return external;
226
68
  }).filter(Boolean) : void 0,
227
- noExternal: options.noExternal ? (0, __stryke_convert_to_array.toArray)(options.noExternal).map((noExternal) => {
228
- if ((0, __stryke_type_checks_is_function.isFunction)(noExternal)) {
69
+ noExternal: options.noExternal ? (0, _stryke_convert_to_array.toArray)(options.noExternal).map((noExternal) => {
70
+ if ((0, _stryke_type_checks_is_function.isFunction)(noExternal)) {
229
71
  console.warn("Function-based noExternal options are not supported in Powerlines.");
230
72
  return;
231
73
  }
@@ -233,15 +75,24 @@ function unplugin$1(options = {}) {
233
75
  }).filter(Boolean) : void 0
234
76
  },
235
77
  rolldown: options.inputOptions,
236
- tsconfig: (0, __stryke_type_checks_is_set_string.isSetString)(options.tsconfig) ? options.tsconfig : void 0
78
+ tsconfig: (0, _stryke_type_checks_is_set_string.isSetString)(options.tsconfig) ? options.tsconfig : void 0
237
79
  })]
238
80
  };
239
81
  }
240
- var tsdown_default = unplugin$1;
241
82
 
242
83
  //#endregion
243
- exports.default = tsdown_default;
244
- exports["module.exports"] = unplugin$1;
245
- exports.unplugin = unplugin$1;
246
- exports.plugin = src_default;
247
- exports.tsdown = src_default;
84
+ exports.default = unplugin;
85
+ exports["module.exports"] = unplugin;
86
+ exports.unplugin = unplugin;
87
+ Object.defineProperty(exports, 'plugin', {
88
+ enumerable: true,
89
+ get: function () {
90
+ return _powerlines_plugin_tsdown.default;
91
+ }
92
+ });
93
+ Object.defineProperty(exports, 'tsdown', {
94
+ enumerable: true,
95
+ get: function () {
96
+ return _powerlines_plugin_tsdown.default;
97
+ }
98
+ });
package/dist/tsdown.d.cts CHANGED
@@ -1,28 +1,6 @@
1
- import { Et as PluginContext, er as Plugin, j as ResolvedConfig } from "./config-vnrrSxEB.cjs";
2
1
  import { UserConfig } from "tsdown/config";
3
- import { UserConfig as UserConfig$1 } from "tsdown";
2
+ import plugin, { default as tsdown } from "@powerlines/plugin-tsdown";
4
3
 
5
- //#region ../plugin-tsdown/src/types/build.d.ts
6
- type TsdownOptions = Partial<Omit<UserConfig$1, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">>;
7
- //#endregion
8
- //#region ../plugin-tsdown/src/types/plugin.d.ts
9
- type TsdownPluginOptions = Partial<TsdownOptions>;
10
- interface TsdownPluginResolvedConfig extends ResolvedConfig {
11
- tsdown: TsdownOptions;
12
- }
13
- type TsdownPluginContext<TResolvedConfig extends TsdownPluginResolvedConfig = TsdownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
14
- //#endregion
15
- //#region ../plugin-tsdown/src/index.d.ts
16
- declare module "@powerlines/core" {
17
- interface Config {
18
- tsdown?: TsdownPluginOptions;
19
- }
20
- }
21
- /**
22
- * A Powerlines plugin to use Tsdown to build the project.
23
- */
24
- declare const plugin: <TContext extends TsdownPluginContext = TsdownPluginContext>(options?: TsdownPluginOptions) => Plugin<TContext>;
25
- //#endregion
26
4
  //#region src/tsdown.d.ts
27
5
  /**
28
6
  * A Tsdown configuration function that integrates Powerlines into the build process.
@@ -49,5 +27,5 @@ declare const plugin: <TContext extends TsdownPluginContext = TsdownPluginContex
49
27
  */
50
28
  declare function unplugin(options?: UserConfig): UserConfig;
51
29
  //#endregion
52
- export { unplugin as default, unplugin as "module.exports", unplugin, plugin, plugin as tsdown };
30
+ export { unplugin as default, unplugin as "module.exports", unplugin, plugin, tsdown };
53
31
  //# sourceMappingURL=tsdown.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.d.cts","names":[],"sources":["../../plugin-tsdown/src/types/build.ts","../../plugin-tsdown/src/types/plugin.ts","../../plugin-tsdown/src/index.ts","../src/tsdown.ts"],"sourcesContent":[],"mappings":";;;;;KAoBY,aAAA,GAAgB,QAC1B,KACE;;;KCDQ,mBAAA,GAAsB,QAAQ;ADCtC,UCKa,0BAAA,SAAmC,cDLhD,CAAA;EADF,MAAA,ECOQ,aDPR;;AADiC,KCWvB,mBDXuB,CAAA,wBCYT,0BDZS,GCa/B,0BDb+B,CAAA,GCc/B,aDd+B,CCcjB,eDdiB,CAAA;;;;EAAvB,UAAA,MAAa,CAAA;IAErB,MAAA,CAAA,EEaS,mBFbT;EADF;;;;;cEqBW,0BACM,sBAAsB,+BAE9B,wBACR,OAAO;;;;;;AF1BV;;;;;;;;ACCA;AAMA;AAIA;;;;;;;;;ACA6B;AAAA,iBCyBb,QAAA,CDzBa,OAAA,CAAA,ECyBK,UDzBL,CAAA,ECyBuB,UDzBvB"}
1
+ {"version":3,"file":"tsdown.d.cts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAwDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}