@bemedev/dev-utils 0.8.2 → 1.0.0

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 (215) hide show
  1. package/README.md +2 -8
  2. package/lib/build-tests/addTarball.cjs.map +1 -1
  3. package/lib/build-tests/addTarball.d.ts +1 -1
  4. package/lib/build-tests/addTarball.js.map +1 -1
  5. package/lib/build-tests/buildPackageJson.cjs.map +1 -1
  6. package/lib/build-tests/buildPackageJson.d.ts +3 -3
  7. package/lib/build-tests/buildPackageJson.js.map +1 -1
  8. package/lib/build-tests/cleanup.cjs.map +1 -1
  9. package/lib/build-tests/cleanup.d.ts +1 -1
  10. package/lib/build-tests/cleanup.js.map +1 -1
  11. package/lib/build-tests/cli/cli.cjs +0 -1
  12. package/lib/build-tests/cli/cli.cjs.map +1 -1
  13. package/lib/build-tests/cli/cli.d.ts +1 -51
  14. package/lib/build-tests/cli/cli.js.map +1 -1
  15. package/lib/build-tests/cli/index.cjs +0 -1
  16. package/lib/build-tests/cli/index.cjs.map +1 -1
  17. package/lib/build-tests/cli/index.d.ts +0 -1
  18. package/lib/build-tests/cli/index.js.map +1 -1
  19. package/lib/build-tests/cli/post.cjs +0 -1
  20. package/lib/build-tests/cli/post.cjs.map +1 -1
  21. package/lib/build-tests/cli/post.d.ts +1 -5
  22. package/lib/build-tests/cli/post.js.map +1 -1
  23. package/lib/build-tests/cli/pre.cjs +0 -1
  24. package/lib/build-tests/cli/pre.cjs.map +1 -1
  25. package/lib/build-tests/cli/pre.d.ts +1 -5
  26. package/lib/build-tests/cli/pre.js.map +1 -1
  27. package/lib/build-tests/cli/test.cjs.map +1 -1
  28. package/lib/build-tests/cli/test.d.ts +1 -15
  29. package/lib/build-tests/cli/test.js.map +1 -1
  30. package/lib/build-tests/constants.cjs +2 -0
  31. package/lib/build-tests/constants.cjs.map +1 -1
  32. package/lib/build-tests/constants.d.ts +2 -1
  33. package/lib/build-tests/constants.js +2 -1
  34. package/lib/build-tests/constants.js.map +1 -1
  35. package/lib/build-tests/getRelativePath.cjs +0 -1
  36. package/lib/build-tests/getRelativePath.cjs.map +1 -1
  37. package/lib/build-tests/getRelativePath.d.ts +1 -1
  38. package/lib/build-tests/getRelativePath.js.map +1 -1
  39. package/lib/build-tests/getTypescriptOutdir.cjs +2 -5
  40. package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
  41. package/lib/build-tests/getTypescriptOutdir.d.ts +1 -1
  42. package/lib/build-tests/getTypescriptOutdir.js +4 -6
  43. package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
  44. package/lib/build-tests/import.cjs.map +1 -1
  45. package/lib/build-tests/import.d.ts +2 -2
  46. package/lib/build-tests/import.js.map +1 -1
  47. package/lib/build-tests/imports/create.cjs +0 -1
  48. package/lib/build-tests/imports/create.cjs.map +1 -1
  49. package/lib/build-tests/imports/create.d.ts +3 -3
  50. package/lib/build-tests/imports/create.js.map +1 -1
  51. package/lib/build-tests/imports/helper.cjs +0 -1
  52. package/lib/build-tests/imports/helper.cjs.map +1 -1
  53. package/lib/build-tests/imports/helper.d.ts +3 -7
  54. package/lib/build-tests/imports/helper.js.map +1 -1
  55. package/lib/build-tests/imports/index.d.ts +1 -1
  56. package/lib/build-tests/index.d.ts +5 -5
  57. package/lib/build-tests/pack.cjs.map +1 -1
  58. package/lib/build-tests/pack.d.ts +1 -1
  59. package/lib/build-tests/pack.js.map +1 -1
  60. package/lib/rolldown-config/config.cjs +6 -11
  61. package/lib/rolldown-config/config.cjs.map +1 -1
  62. package/lib/rolldown-config/config.d.ts +1 -1
  63. package/lib/rolldown-config/config.js +1 -5
  64. package/lib/rolldown-config/config.js.map +1 -1
  65. package/lib/rolldown-config/constants.cjs.map +1 -1
  66. package/lib/rolldown-config/constants.d.ts +5 -5
  67. package/lib/rolldown-config/constants.js.map +1 -1
  68. package/lib/rolldown-config/helpers.cjs +0 -1
  69. package/lib/rolldown-config/helpers.cjs.map +1 -1
  70. package/lib/rolldown-config/helpers.d.ts +2 -2
  71. package/lib/rolldown-config/helpers.js.map +1 -1
  72. package/lib/rolldown-config/index.d.ts +3 -3
  73. package/lib/rolldown-config/input.cjs +1 -2
  74. package/lib/rolldown-config/input.cjs.map +1 -1
  75. package/lib/rolldown-config/input.d.ts +1 -1
  76. package/lib/rolldown-config/input.js +1 -1
  77. package/lib/rolldown-config/input.js.map +1 -1
  78. package/lib/rolldown-config/output.cjs.map +1 -1
  79. package/lib/rolldown-config/output.d.ts +1 -15
  80. package/lib/rolldown-config/output.js.map +1 -1
  81. package/lib/rolldown-config/plugins/circulars.cjs +6 -5
  82. package/lib/rolldown-config/plugins/circulars.cjs.map +1 -1
  83. package/lib/rolldown-config/plugins/circulars.d.ts +9 -7
  84. package/lib/rolldown-config/plugins/circulars.js +5 -3
  85. package/lib/rolldown-config/plugins/circulars.js.map +1 -1
  86. package/lib/rolldown-config/plugins/clean.cjs +4 -9
  87. package/lib/rolldown-config/plugins/clean.cjs.map +1 -1
  88. package/lib/rolldown-config/plugins/clean.d.ts +4 -13
  89. package/lib/rolldown-config/plugins/clean.js +4 -7
  90. package/lib/rolldown-config/plugins/clean.js.map +1 -1
  91. package/lib/rolldown-config/plugins/externals.cjs +1 -1
  92. package/lib/rolldown-config/plugins/externals.cjs.map +1 -1
  93. package/lib/rolldown-config/plugins/externals.d.ts +7 -6
  94. package/lib/rolldown-config/plugins/externals.js +1 -0
  95. package/lib/rolldown-config/plugins/externals.js.map +1 -1
  96. package/lib/rolldown-config/plugins/index.cjs +1 -8
  97. package/lib/rolldown-config/plugins/index.cjs.map +1 -1
  98. package/lib/rolldown-config/plugins/index.d.ts +2 -27
  99. package/lib/rolldown-config/plugins/index.js +0 -6
  100. package/lib/rolldown-config/plugins/index.js.map +1 -1
  101. package/lib/rolldown-config/plugins/typescript.cjs +45 -33
  102. package/lib/rolldown-config/plugins/typescript.cjs.map +1 -1
  103. package/lib/rolldown-config/plugins/typescript.config.cjs +39 -46
  104. package/lib/rolldown-config/plugins/typescript.config.cjs.map +1 -1
  105. package/lib/rolldown-config/plugins/typescript.config.d.ts +4 -2
  106. package/lib/rolldown-config/plugins/typescript.config.js +41 -47
  107. package/lib/rolldown-config/plugins/typescript.config.js.map +1 -1
  108. package/lib/rolldown-config/plugins/typescript.d.ts +6 -6
  109. package/lib/rolldown-config/plugins/typescript.js +44 -30
  110. package/lib/rolldown-config/plugins/typescript.js.map +1 -1
  111. package/lib/rolldown-config/types.d.ts +13 -13
  112. package/lib/{rolldown-config/utils.cjs → utils/array.cjs} +2 -2
  113. package/lib/utils/array.cjs.map +1 -0
  114. package/lib/utils/array.d.ts +2 -0
  115. package/lib/{rolldown-config/utils.js → utils/array.js} +2 -2
  116. package/lib/utils/array.js.map +1 -0
  117. package/lib/utils/identity.d.ts +1 -1
  118. package/lib/utils/index.cjs +2 -0
  119. package/lib/utils/index.d.ts +4 -3
  120. package/lib/utils/index.js +2 -1
  121. package/lib/utils/sleep.cjs.map +1 -1
  122. package/lib/utils/sleep.d.ts +1 -1
  123. package/lib/utils/sleep.js.map +1 -1
  124. package/lib/utils/types.d.ts +5 -1
  125. package/lib/vitest-exclude/index.d.ts +1 -1
  126. package/lib/vitest-exclude/types.d.ts +8 -11
  127. package/lib/vitest-exclude/vitest.cjs +6 -9
  128. package/lib/vitest-exclude/vitest.cjs.map +1 -1
  129. package/lib/vitest-exclude/vitest.d.ts +15 -30
  130. package/lib/vitest-exclude/vitest.js +6 -9
  131. package/lib/vitest-exclude/vitest.js.map +1 -1
  132. package/lib/vitest-exclude/vitest.utils.cjs +1 -2
  133. package/lib/vitest-exclude/vitest.utils.cjs.map +1 -1
  134. package/lib/vitest-exclude/vitest.utils.d.ts +2 -2
  135. package/lib/vitest-exclude/vitest.utils.js +1 -1
  136. package/lib/vitest-exclude/vitest.utils.js.map +1 -1
  137. package/lib/vitest-extended/acceptation.cjs +1 -5
  138. package/lib/vitest-extended/acceptation.cjs.map +1 -1
  139. package/lib/vitest-extended/acceptation.d.ts +3 -7
  140. package/lib/vitest-extended/acceptation.js +1 -4
  141. package/lib/vitest-extended/acceptation.js.map +1 -1
  142. package/lib/vitest-extended/bemedev/globals/types.d.ts +4 -1
  143. package/lib/vitest-extended/bemedev/globals/utils/_unknown.cjs +4 -3
  144. package/lib/vitest-extended/bemedev/globals/utils/_unknown.cjs.map +1 -1
  145. package/lib/vitest-extended/bemedev/globals/utils/_unknown.d.ts +10 -9
  146. package/lib/vitest-extended/bemedev/globals/utils/_unknown.js +4 -3
  147. package/lib/vitest-extended/bemedev/globals/utils/_unknown.js.map +1 -1
  148. package/lib/vitest-extended/createTests.cjs +22 -24
  149. package/lib/vitest-extended/createTests.cjs.map +1 -1
  150. package/lib/vitest-extended/createTests.d.ts +34 -56
  151. package/lib/vitest-extended/createTests.js +22 -23
  152. package/lib/vitest-extended/createTests.js.map +1 -1
  153. package/lib/vitest-extended/createTests.types.d.ts +10 -6
  154. package/lib/vitest-extended/done.cjs +6 -4
  155. package/lib/vitest-extended/done.cjs.map +1 -1
  156. package/lib/vitest-extended/done.d.ts +8 -13
  157. package/lib/vitest-extended/done.js +6 -3
  158. package/lib/vitest-extended/done.js.map +1 -1
  159. package/lib/vitest-extended/each/error.cjs +0 -1
  160. package/lib/vitest-extended/each/error.cjs.map +1 -1
  161. package/lib/vitest-extended/each/error.d.ts +1 -1
  162. package/lib/vitest-extended/each/error.js.map +1 -1
  163. package/lib/vitest-extended/each/error.types.d.ts +10 -4
  164. package/lib/vitest-extended/each/index.d.ts +2 -2
  165. package/lib/vitest-extended/each/pass.cjs +13 -16
  166. package/lib/vitest-extended/each/pass.cjs.map +1 -1
  167. package/lib/vitest-extended/each/pass.d.ts +26 -28
  168. package/lib/vitest-extended/each/pass.js +13 -15
  169. package/lib/vitest-extended/each/pass.js.map +1 -1
  170. package/lib/vitest-extended/each/pass.types.d.ts +18 -6
  171. package/lib/vitest-extended/fakeWaiter.cjs.map +1 -1
  172. package/lib/vitest-extended/fakeWaiter.d.ts +3 -3
  173. package/lib/vitest-extended/fakeWaiter.js.map +1 -1
  174. package/lib/vitest-extended/fixtures/coverage.cjs.map +1 -1
  175. package/lib/vitest-extended/fixtures/coverage.js.map +1 -1
  176. package/lib/vitest-extended/fixtures/partialCall.cjs +2 -2
  177. package/lib/vitest-extended/fixtures/partialCall.cjs.map +1 -1
  178. package/lib/vitest-extended/fixtures/partialCall.js +2 -2
  179. package/lib/vitest-extended/fixtures/partialCall.js.map +1 -1
  180. package/lib/vitest-extended/fixtures/toUpper.cjs.map +1 -1
  181. package/lib/vitest-extended/fixtures/toUpper.js.map +1 -1
  182. package/lib/vitest-extended/fixtures/zod.cjs.map +1 -1
  183. package/lib/vitest-extended/fixtures/zod.js.map +1 -1
  184. package/lib/vitest-extended/identity.cjs +0 -1
  185. package/lib/vitest-extended/identity.cjs.map +1 -1
  186. package/lib/vitest-extended/identity.d.ts +2 -2
  187. package/lib/vitest-extended/identity.js.map +1 -1
  188. package/lib/vitest-extended/index.d.ts +6 -6
  189. package/lib/vitest-extended/isDefined.cjs.map +1 -1
  190. package/lib/vitest-extended/isDefined.d.ts +1 -1
  191. package/lib/vitest-extended/isDefined.js.map +1 -1
  192. package/lib/vitest-extended/isFunction.cjs.map +1 -1
  193. package/lib/vitest-extended/isFunction.d.ts +1 -1
  194. package/lib/vitest-extended/isFunction.js.map +1 -1
  195. package/lib/vitest-extended/toArray.cjs.map +1 -1
  196. package/lib/vitest-extended/toArray.d.ts +1 -1
  197. package/lib/vitest-extended/toArray.js.map +1 -1
  198. package/lib/vitest-extended/toStringFlat.cjs.map +1 -1
  199. package/lib/vitest-extended/toStringFlat.d.ts +1 -1
  200. package/lib/vitest-extended/toStringFlat.js.map +1 -1
  201. package/lib/vitest-extended/types.d.ts +40 -42
  202. package/package.json +14 -10
  203. package/lib/rolldown-config/plugins/alias.cjs +0 -17
  204. package/lib/rolldown-config/plugins/alias.cjs.map +0 -1
  205. package/lib/rolldown-config/plugins/alias.d.ts +0 -25
  206. package/lib/rolldown-config/plugins/alias.js +0 -14
  207. package/lib/rolldown-config/plugins/alias.js.map +0 -1
  208. package/lib/rolldown-config/plugins/tsPaths.cjs +0 -17
  209. package/lib/rolldown-config/plugins/tsPaths.cjs.map +0 -1
  210. package/lib/rolldown-config/plugins/tsPaths.d.ts +0 -9
  211. package/lib/rolldown-config/plugins/tsPaths.js +0 -14
  212. package/lib/rolldown-config/plugins/tsPaths.js.map +0 -1
  213. package/lib/rolldown-config/utils.cjs.map +0 -1
  214. package/lib/rolldown-config/utils.d.ts +0 -2
  215. package/lib/rolldown-config/utils.js.map +0 -1
@@ -1,9 +1,5 @@
1
- import type { Fn } from '../../vitest-extended/bemedev/globals/types';
2
1
  export type Helper_F = (args: {
3
- path?: string;
4
- fn: string;
5
- }) => Promise<void>;
6
- export declare const helperFn: <T extends Fn = Fn>({ path, fn, }: {
7
- path?: string;
8
- fn: string;
2
+ path?: string;
3
+ fn: string;
9
4
  }) => Promise<void>;
5
+ export declare const helperFn: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","names":[],"sources":["../../../src/build-tests/imports/helper.ts"],"sourcesContent":["import { expect } from 'vitest';\nimport type { Fn } from '../../vitest-extended/bemedev/globals/types';\nimport { customImport } from '../import';\n\nexport type Helper_F = (args: {\n path?: string;\n fn: string;\n}) => Promise<void>;\n\nexport const helperFn = async <T extends Fn = Fn>({\n path,\n fn,\n}: {\n path?: string;\n fn: string;\n}) => {\n const _fn = await customImport<T>({ path, fn: m => m[fn] });\n expect(_fn).toBeDefined();\n expect(_fn).toBeTypeOf('function');\n};\n"],"mappings":";;;AASA,MAAa,WAAW,OAA0B,EAChD,MACA,SAII;CACJ,MAAM,MAAM,MAAM,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;EAAK,CAAC;AAC3D,QAAO,IAAI,CAAC,aAAa;AACzB,QAAO,IAAI,CAAC,WAAW,WAAW"}
1
+ {"version":3,"file":"helper.js","names":[],"sources":["../../../src/build-tests/imports/helper.ts"],"sourcesContent":["import { expect } from 'vitest';\n\nimport type { Fn } from '../../vitest-extended/bemedev/globals/types';\nimport { customImport } from '../import';\n\nexport type Helper_F = (args: {\n path?: string;\n fn: string;\n}) => Promise<void>;\n\nexport const helperFn = async <T extends Fn = Fn>({\n path,\n fn,\n}: {\n path?: string;\n fn: string;\n}) => {\n const _fn = await customImport<T>({ path, fn: m => m[fn] });\n expect(_fn).toBeDefined();\n expect(_fn).toBeTypeOf('function');\n};\n"],"mappings":";;;AAUA,MAAa,WAAW,OAA0B,EAChD,MACA,SAII;CACJ,MAAM,MAAM,MAAM,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;CAAI,CAAC;CAC1D,OAAO,GAAG,CAAC,CAAC,YAAY;CACxB,OAAO,GAAG,CAAC,CAAC,WAAW,UAAU;AACnC"}
@@ -1 +1 @@
1
- export * from './create';
1
+ export * from "./create";
@@ -1,5 +1,5 @@
1
- export * from './addTarball';
2
- export * from './cleanup';
3
- export { THIS1 } from './constants';
4
- export * from './import';
5
- export * from './imports';
1
+ export * from "./addTarball";
2
+ export * from "./cleanup";
3
+ export { THIS1 } from "./constants";
4
+ export * from "./import";
5
+ export * from "./imports";
@@ -1 +1 @@
1
- {"version":3,"file":"pack.cjs","names":["buildPackageJson","PACKAGE_PATH","TARBALL_FOLDER","sh","getRelativePath0"],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport sh from 'shelljs';\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\nimport type { Fn } from '#utils/types';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAWA,qCAAAA,kBAAkB;AAIlD,QAAA,GAAA,YAAA,WAAgB,MAAA,GAAA,KAAA,MAFkB,QAAQC,8BAAAA,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAASC,8BAAAA;AAChC,SAAA,QAAG,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9B,SAAA,QAAG,MAAM,eAAe;AAExB,SAAA,QAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAOC,QAAAA,QACV,KAAK,mCAAmCD,8BAAAA,iBAAiB,CACzD,UAAU;AAEb,SAAA,QAAG,GAAG,KAAK;AAEX,QADaE,oCAAAA,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.cjs","names":["buildPackageJson","PACKAGE_PATH","TARBALL_FOLDER","sh","getRelativePath0"],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport sh from 'shelljs';\n\nimport type { Fn } from '#utils/types';\n\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAWA,qCAAAA,iBAAiB;CAIjD,OAAA,GAAA,YAAA,UAAA,CAAgB,MAAA,GAAA,KAAA,KAAA,CAFkB,QAAQC,8BAAAA,YAAY,KAEzB,KAAK,UAAU,aAAa,MAAM,CAAC,CAAC;CACjE,MAAM,iBAAiB,KAASC,8BAAAA;CAChC,QAAA,QAAG,GAAG,OAAO,CAAC,cAAc,CAAC;CAC7B,QAAA,QAAG,MAAM,cAAc;CAEvB,QAAA,QAAG,GAAG,KAAS,QAAQ;CAEvB,MAAM,OAAOC,QAAAA,QACV,KAAK,mCAAmCD,8BAAAA,gBAAgB,CAAC,CACzD,SAAS;CAEZ,QAAA,QAAG,GAAG,IAAI;CAEV,OADaE,oCAAAA,iBAAiB,IACpB;AACZ"}
@@ -1,4 +1,4 @@
1
- import type { Fn } from '../utils/types';
1
+ import type { Fn } from "../utils/types";
2
2
  type Pack_F = Fn<[], Promise<string>>;
3
3
  export declare const pack: Pack_F;
4
4
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"pack.js","names":[],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport sh from 'shelljs';\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\nimport type { Fn } from '#utils/types';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;AAUA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAW,kBAAkB;AAIlD,OAAM,UAAU,KAFa,KAAK,QAAQ,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAAS;AAChC,IAAG,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9B,IAAG,MAAM,eAAe;AAExB,IAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAO,GACV,KAAK,mCAAmC,iBAAiB,CACzD,UAAU;AAEb,IAAG,GAAG,KAAK;AAEX,QADa,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.js","names":[],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport sh from 'shelljs';\n\nimport type { Fn } from '#utils/types';\n\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;AAaA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAW,iBAAiB;CAIjD,MAAM,UAAU,KAFa,KAAK,QAAQ,YAAY,KAEzB,KAAK,UAAU,aAAa,MAAM,CAAC,CAAC;CACjE,MAAM,iBAAiB,KAAS;CAChC,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC;CAC7B,GAAG,MAAM,cAAc;CAEvB,GAAG,GAAG,KAAS,QAAQ;CAEvB,MAAM,OAAO,GACV,KAAK,mCAAmC,gBAAgB,CAAC,CACzD,SAAS;CAEZ,GAAG,GAAG,IAAI;CAEV,OADa,iBAAiB,IACpB;AACZ"}
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../_virtual/_rolldown/runtime.cjs");
3
- const require_rolldown_config_utils = require("./utils.cjs");
2
+ const require_utils_array = require("../utils/array.cjs");
4
3
  const require_rolldown_config_constants = require("./constants.cjs");
5
4
  const require_rolldown_config_output = require("./output.cjs");
6
5
  const require_rolldown_config_input = require("./input.cjs");
@@ -12,10 +11,9 @@ const defineConfig = (additionals) => {
12
11
  return defineConfig.default(additionals);
13
12
  };
14
13
  const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
15
- const include = require_rolldown_config_input.buildInput(...require_rolldown_config_utils.toArray(excludesTS));
16
- const exclude = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_rolldown_config_utils.toArray(excludesTS));
14
+ const include = require_rolldown_config_input.buildInput(...require_utils_array.toArray(excludesTS));
15
+ const exclude = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_utils_array.toArray(excludesTS));
17
16
  const unordered = {
18
- alias: () => require_rolldown_config_plugins_index.PLUGIN_BUILDERS.alias(),
19
17
  typescript: () => require_rolldown_config_plugins_index.PLUGIN_BUILDERS.typescript({
20
18
  include,
21
19
  exclude,
@@ -28,7 +26,6 @@ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, exclu
28
26
  builtinsPrefix: "strip",
29
27
  include: excludesTS
30
28
  }),
31
- tsPaths: () => require_rolldown_config_plugins_index.PLUGIN_BUILDERS.tsPaths({ colors: true }),
32
29
  clean: () => require_rolldown_config_plugins_index.PLUGIN_BUILDERS.clean({
33
30
  ignoresJS,
34
31
  sourcemap,
@@ -36,8 +33,6 @@ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, exclu
36
33
  })
37
34
  };
38
35
  const defaultOrdered = () => [
39
- unordered.alias(),
40
- unordered.tsPaths(),
41
36
  unordered.circulars(),
42
37
  unordered.externals(),
43
38
  (0, rolldown_plugins.esmExternalRequirePlugin)(),
@@ -66,9 +61,9 @@ defineConfig.default = ({ dir, sourcemap = false, ...rest } = {}) => {
66
61
  });
67
62
  };
68
63
  defineConfig.bemedev = (additionals) => {
69
- const circularDeps = require_rolldown_config_constants.DEFAULT_CIRCULAR_DEPS.concat(require_rolldown_config_utils.toArray(additionals?.circularDeps));
70
- const ignoresJS = require_rolldown_config_utils.toArray(additionals?.ignoresJS).concat(require_rolldown_config_constants.DEFAULT_CIRCULAR_DEPS);
71
- const excludesTS = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_rolldown_config_utils.toArray(additionals?.excludesTS));
64
+ const circularDeps = require_rolldown_config_constants.DEFAULT_CIRCULAR_DEPS.concat(require_utils_array.toArray(additionals?.circularDeps));
65
+ const ignoresJS = require_utils_array.toArray(additionals?.ignoresJS).concat(require_rolldown_config_constants.DEFAULT_CIRCULAR_DEPS);
66
+ const excludesTS = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_utils_array.toArray(additionals?.excludesTS));
72
67
  const _sourcemap = additionals?.sourcemap;
73
68
  const sourcemap = _sourcemap === void 0 || _sourcemap === true;
74
69
  return defineConfig.default({
@@ -1 +1 @@
1
- {"version":3,"file":"config.cjs","names":["buildInput","toArray","DEFAULT_EXCLUDE","PLUGIN_BUILDERS","buildOutput","DEFAULT_CIRCULAR_DEPS"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\nimport { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from './constants';\nimport { buildInput } from './input';\nimport { buildOutput } from './output';\nimport { PLUGIN_BUILDERS } from './plugins';\nimport type { Config_F, Params } from './types';\nimport { toArray } from './utils';\n\nexport const defineConfig: Config_F = additionals => {\n return defineConfig.default(additionals);\n};\n\nconst producePlugins = ({\n circularDeps,\n\n ignoresJS,\n dir,\n sourcemap = false,\n excludesTS,\n declarationMap,\n plugins,\n}: Params = {}) => {\n const include = buildInput(...toArray(excludesTS));\n const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));\n const unordered = {\n alias: () => PLUGIN_BUILDERS.alias(),\n typescript: () =>\n PLUGIN_BUILDERS.typescript({\n include,\n exclude,\n declarationMap,\n dir,\n }),\n circulars: () =>\n PLUGIN_BUILDERS.circulars({\n exclude: circularDeps,\n }),\n externals: () =>\n PLUGIN_BUILDERS.externals({\n // exclude peerDependencies and dependencies\n optDeps: false,\n builtinsPrefix: 'strip',\n include: excludesTS,\n }),\n tsPaths: () => PLUGIN_BUILDERS.tsPaths({ colors: true }),\n clean: () =>\n PLUGIN_BUILDERS.clean({\n ignoresJS,\n sourcemap,\n dir,\n }),\n };\n\n const defaultOrdered = () => [\n unordered.alias(),\n unordered.tsPaths(),\n unordered.circulars(),\n unordered.externals(),\n esmExternalRequirePlugin(),\n unordered.typescript(),\n unordered.clean(),\n ];\n\n return plugins\n ? plugins\n .map(p => {\n if (typeof p === 'string') return unordered[p]();\n return p;\n })\n .filter(p => !!p)\n : defaultOrdered();\n};\n\ndefineConfig.default = ({\n dir,\n sourcemap = false,\n ...rest\n}: Params = {}) => {\n const input = buildInput();\n const external = rest.externals;\n const output = buildOutput(dir, sourcemap);\n\n const plugins = producePlugins({\n dir,\n sourcemap,\n ...rest,\n });\n\n return _defineConfig({\n input,\n plugins,\n external,\n output,\n platform: 'node',\n });\n};\n\ndefineConfig.bemedev = additionals => {\n // #region constants\n const circularDeps = DEFAULT_CIRCULAR_DEPS.concat(\n toArray(additionals?.circularDeps),\n );\n const ignoresJS = toArray(additionals?.ignoresJS).concat(\n DEFAULT_CIRCULAR_DEPS,\n );\n\n const excludesTS = DEFAULT_EXCLUDE.concat(\n toArray(additionals?.excludesTS),\n );\n const _sourcemap = additionals?.sourcemap;\n const sourcemap = _sourcemap === undefined || _sourcemap === true;\n // #endregion\n\n return defineConfig.default({\n ...additionals,\n circularDeps,\n excludesTS,\n ignoresJS,\n sourcemap,\n });\n};\n"],"mappings":";;;;;;;;;;AASA,MAAa,gBAAyB,gBAAe;AACnD,QAAO,aAAa,QAAQ,YAAY;;AAG1C,MAAM,kBAAkB,EACtB,cAEA,WACA,KACA,YAAY,OACZ,YACA,gBACA,YACU,EAAE,KAAK;CACjB,MAAM,UAAUA,8BAAAA,WAAW,GAAGC,8BAAAA,QAAQ,WAAW,CAAC;CAClD,MAAM,UAAUC,kCAAAA,gBAAgB,OAAOD,8BAAAA,QAAQ,WAAW,CAAC;CAC3D,MAAM,YAAY;EAChB,aAAaE,sCAAAA,gBAAgB,OAAO;EACpC,kBACEA,sCAAAA,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;GACD,CAAC;EACJ,iBACEA,sCAAAA,gBAAgB,UAAU,EACxB,SAAS,cACV,CAAC;EACJ,iBACEA,sCAAAA,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;GACV,CAAC;EACJ,eAAeA,sCAAAA,gBAAgB,QAAQ,EAAE,QAAQ,MAAM,CAAC;EACxD,aACEA,sCAAAA,gBAAgB,MAAM;GACpB;GACA;GACA;GACD,CAAC;EACL;CAED,MAAM,uBAAuB;EAC3B,UAAU,OAAO;EACjB,UAAU,SAAS;EACnB,UAAU,WAAW;EACrB,UAAU,WAAW;kDACK;EAC1B,UAAU,YAAY;EACtB,UAAU,OAAO;EAClB;AAED,QAAO,UACH,QACG,KAAI,MAAK;AACR,MAAI,OAAO,MAAM,SAAU,QAAO,UAAU,IAAI;AAChD,SAAO;GACP,CACD,QAAO,MAAK,CAAC,CAAC,EAAE,GACnB,gBAAgB;;AAGtB,aAAa,WAAW,EACtB,KACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQH,8BAAAA,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAASI,+BAAAA,YAAY,KAAK,UAAU;AAQ1C,SAAA,GAAA,SAAA,cAAqB;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;GACJ,CAIQ;EACP;EACA;EACA,UAAU;EACX,CAAC;;AAGJ,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAeC,kCAAAA,sBAAsB,OACzCJ,8BAAAA,QAAQ,aAAa,aAAa,CACnC;CACD,MAAM,YAAYA,8BAAAA,QAAQ,aAAa,UAAU,CAAC,OAChDI,kCAAAA,sBACD;CAED,MAAM,aAAaH,kCAAAA,gBAAgB,OACjCD,8BAAAA,QAAQ,aAAa,WAAW,CACjC;CACD,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;AAG7D,QAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.cjs","names":["buildInput","toArray","DEFAULT_EXCLUDE","PLUGIN_BUILDERS","buildOutput","DEFAULT_CIRCULAR_DEPS"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\n\nimport { toArray } from '#utils';\n\nimport { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from './constants';\nimport { buildInput } from './input';\nimport { buildOutput } from './output';\nimport { PLUGIN_BUILDERS } from './plugins';\nimport type { Config_F, Params } from './types';\n\nexport const defineConfig: Config_F = additionals => {\n return defineConfig.default(additionals);\n};\n\nconst producePlugins = ({\n circularDeps,\n ignoresJS,\n dir,\n sourcemap = false,\n excludesTS,\n declarationMap,\n plugins,\n}: Params = {}) => {\n const include = buildInput(...toArray(excludesTS));\n const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));\n const unordered = {\n typescript: () =>\n PLUGIN_BUILDERS.typescript({\n include,\n exclude,\n declarationMap,\n dir,\n }),\n circulars: () => PLUGIN_BUILDERS.circulars({ exclude: circularDeps }),\n externals: () =>\n PLUGIN_BUILDERS.externals({\n // exclude peerDependencies and dependencies\n optDeps: false,\n builtinsPrefix: 'strip',\n include: excludesTS,\n }),\n clean: () => PLUGIN_BUILDERS.clean({ ignoresJS, sourcemap, dir }),\n };\n\n const defaultOrdered = () => [\n unordered.circulars(),\n unordered.externals(),\n esmExternalRequirePlugin(),\n unordered.typescript(),\n unordered.clean(),\n ];\n\n return plugins\n ? plugins\n .map(p => {\n if (typeof p === 'string') return unordered[p]();\n return p;\n })\n .filter(p => !!p)\n : defaultOrdered();\n};\n\ndefineConfig.default = ({\n dir,\n sourcemap = false,\n ...rest\n}: Params = {}) => {\n const input = buildInput();\n const external = rest.externals;\n const output = buildOutput(dir, sourcemap);\n\n const plugins = producePlugins({ dir, sourcemap, ...rest });\n\n return _defineConfig({\n input,\n plugins,\n external,\n output,\n platform: 'node',\n });\n};\n\ndefineConfig.bemedev = additionals => {\n // #region constants\n const circularDeps = DEFAULT_CIRCULAR_DEPS.concat(\n toArray(additionals?.circularDeps),\n );\n const ignoresJS = toArray(additionals?.ignoresJS).concat(\n DEFAULT_CIRCULAR_DEPS,\n );\n\n const excludesTS = DEFAULT_EXCLUDE.concat(\n toArray(additionals?.excludesTS),\n );\n const _sourcemap = additionals?.sourcemap;\n const sourcemap = _sourcemap === undefined || _sourcemap === true;\n // #endregion\n\n return defineConfig.default({\n ...additionals,\n circularDeps,\n excludesTS,\n ignoresJS,\n sourcemap,\n });\n};\n"],"mappings":";;;;;;;;;AAWA,MAAa,gBAAyB,gBAAe;CACnD,OAAO,aAAa,QAAQ,WAAW;AACzC;AAEA,MAAM,kBAAkB,EACtB,cACA,WACA,KACA,YAAY,OACZ,YACA,gBACA,YACU,CAAC,MAAM;CACjB,MAAM,UAAUA,8BAAAA,WAAW,GAAGC,oBAAAA,QAAQ,UAAU,CAAC;CACjD,MAAM,UAAUC,kCAAAA,gBAAgB,OAAOD,oBAAAA,QAAQ,UAAU,CAAC;CAC1D,MAAM,YAAY;EAChB,kBACEE,sCAAAA,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;EACF,CAAC;EACH,iBAAiBA,sCAAAA,gBAAgB,UAAU,EAAE,SAAS,aAAa,CAAC;EACpE,iBACEA,sCAAAA,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;EACX,CAAC;EACH,aAAaA,sCAAAA,gBAAgB,MAAM;GAAE;GAAW;GAAW;EAAI,CAAC;CAClE;CAEA,MAAM,uBAAuB;EAC3B,UAAU,UAAU;EACpB,UAAU,UAAU;iDACK;EACzB,UAAU,WAAW;EACrB,UAAU,MAAM;CAClB;CAEA,OAAO,UACH,QACG,KAAI,MAAK;EACR,IAAI,OAAO,MAAM,UAAU,OAAO,UAAU,EAAE,CAAC;EAC/C,OAAO;CACT,CAAC,CAAC,CACD,QAAO,MAAK,CAAC,CAAC,CAAC,IAClB,eAAe;AACrB;AAEA,aAAa,WAAW,EACtB,KACA,YAAY,OACZ,GAAG,SACO,CAAC,MAAM;CACjB,MAAM,QAAQH,8BAAAA,WAAW;CACzB,MAAM,WAAW,KAAK;CACtB,MAAM,SAASI,+BAAAA,YAAY,KAAK,SAAS;CAIzC,QAAA,GAAA,SAAA,aAAA,CAAqB;EACnB;EACA,SAJc,eAAe;GAAE;GAAK;GAAW,GAAG;EAAK,CAIjD;EACN;EACA;EACA,UAAU;CACZ,CAAC;AACH;AAEA,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAeC,kCAAAA,sBAAsB,OACzCJ,oBAAAA,QAAQ,aAAa,YAAY,CACnC;CACA,MAAM,YAAYA,oBAAAA,QAAQ,aAAa,SAAS,CAAC,CAAC,OAChDI,kCAAAA,qBACF;CAEA,MAAM,aAAaH,kCAAAA,gBAAgB,OACjCD,oBAAAA,QAAQ,aAAa,UAAU,CACjC;CACA,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;CAG7D,OAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;CACF,CAAC;AACH"}
@@ -1,2 +1,2 @@
1
- import type { Config_F } from './types';
1
+ import type { Config_F } from "./types";
2
2
  export declare const defineConfig: Config_F;
@@ -1,4 +1,4 @@
1
- import { toArray } from "./utils.js";
1
+ import { toArray } from "../utils/array.js";
2
2
  import { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from "./constants.js";
3
3
  import { buildOutput } from "./output.js";
4
4
  import { buildInput } from "./input.js";
@@ -13,7 +13,6 @@ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, exclu
13
13
  const include = buildInput(...toArray(excludesTS));
14
14
  const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));
15
15
  const unordered = {
16
- alias: () => PLUGIN_BUILDERS.alias(),
17
16
  typescript: () => PLUGIN_BUILDERS.typescript({
18
17
  include,
19
18
  exclude,
@@ -26,7 +25,6 @@ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, exclu
26
25
  builtinsPrefix: "strip",
27
26
  include: excludesTS
28
27
  }),
29
- tsPaths: () => PLUGIN_BUILDERS.tsPaths({ colors: true }),
30
28
  clean: () => PLUGIN_BUILDERS.clean({
31
29
  ignoresJS,
32
30
  sourcemap,
@@ -34,8 +32,6 @@ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, exclu
34
32
  })
35
33
  };
36
34
  const defaultOrdered = () => [
37
- unordered.alias(),
38
- unordered.tsPaths(),
39
35
  unordered.circulars(),
40
36
  unordered.externals(),
41
37
  esmExternalRequirePlugin(),
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["_defineConfig"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\nimport { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from './constants';\nimport { buildInput } from './input';\nimport { buildOutput } from './output';\nimport { PLUGIN_BUILDERS } from './plugins';\nimport type { Config_F, Params } from './types';\nimport { toArray } from './utils';\n\nexport const defineConfig: Config_F = additionals => {\n return defineConfig.default(additionals);\n};\n\nconst producePlugins = ({\n circularDeps,\n\n ignoresJS,\n dir,\n sourcemap = false,\n excludesTS,\n declarationMap,\n plugins,\n}: Params = {}) => {\n const include = buildInput(...toArray(excludesTS));\n const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));\n const unordered = {\n alias: () => PLUGIN_BUILDERS.alias(),\n typescript: () =>\n PLUGIN_BUILDERS.typescript({\n include,\n exclude,\n declarationMap,\n dir,\n }),\n circulars: () =>\n PLUGIN_BUILDERS.circulars({\n exclude: circularDeps,\n }),\n externals: () =>\n PLUGIN_BUILDERS.externals({\n // exclude peerDependencies and dependencies\n optDeps: false,\n builtinsPrefix: 'strip',\n include: excludesTS,\n }),\n tsPaths: () => PLUGIN_BUILDERS.tsPaths({ colors: true }),\n clean: () =>\n PLUGIN_BUILDERS.clean({\n ignoresJS,\n sourcemap,\n dir,\n }),\n };\n\n const defaultOrdered = () => [\n unordered.alias(),\n unordered.tsPaths(),\n unordered.circulars(),\n unordered.externals(),\n esmExternalRequirePlugin(),\n unordered.typescript(),\n unordered.clean(),\n ];\n\n return plugins\n ? plugins\n .map(p => {\n if (typeof p === 'string') return unordered[p]();\n return p;\n })\n .filter(p => !!p)\n : defaultOrdered();\n};\n\ndefineConfig.default = ({\n dir,\n sourcemap = false,\n ...rest\n}: Params = {}) => {\n const input = buildInput();\n const external = rest.externals;\n const output = buildOutput(dir, sourcemap);\n\n const plugins = producePlugins({\n dir,\n sourcemap,\n ...rest,\n });\n\n return _defineConfig({\n input,\n plugins,\n external,\n output,\n platform: 'node',\n });\n};\n\ndefineConfig.bemedev = additionals => {\n // #region constants\n const circularDeps = DEFAULT_CIRCULAR_DEPS.concat(\n toArray(additionals?.circularDeps),\n );\n const ignoresJS = toArray(additionals?.ignoresJS).concat(\n DEFAULT_CIRCULAR_DEPS,\n );\n\n const excludesTS = DEFAULT_EXCLUDE.concat(\n toArray(additionals?.excludesTS),\n );\n const _sourcemap = additionals?.sourcemap;\n const sourcemap = _sourcemap === undefined || _sourcemap === true;\n // #endregion\n\n return defineConfig.default({\n ...additionals,\n circularDeps,\n excludesTS,\n ignoresJS,\n sourcemap,\n });\n};\n"],"mappings":";;;;;;;;AASA,MAAa,gBAAyB,gBAAe;AACnD,QAAO,aAAa,QAAQ,YAAY;;AAG1C,MAAM,kBAAkB,EACtB,cAEA,WACA,KACA,YAAY,OACZ,YACA,gBACA,YACU,EAAE,KAAK;CACjB,MAAM,UAAU,WAAW,GAAG,QAAQ,WAAW,CAAC;CAClD,MAAM,UAAU,gBAAgB,OAAO,QAAQ,WAAW,CAAC;CAC3D,MAAM,YAAY;EAChB,aAAa,gBAAgB,OAAO;EACpC,kBACE,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;GACD,CAAC;EACJ,iBACE,gBAAgB,UAAU,EACxB,SAAS,cACV,CAAC;EACJ,iBACE,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;GACV,CAAC;EACJ,eAAe,gBAAgB,QAAQ,EAAE,QAAQ,MAAM,CAAC;EACxD,aACE,gBAAgB,MAAM;GACpB;GACA;GACA;GACD,CAAC;EACL;CAED,MAAM,uBAAuB;EAC3B,UAAU,OAAO;EACjB,UAAU,SAAS;EACnB,UAAU,WAAW;EACrB,UAAU,WAAW;EACrB,0BAA0B;EAC1B,UAAU,YAAY;EACtB,UAAU,OAAO;EAClB;AAED,QAAO,UACH,QACG,KAAI,MAAK;AACR,MAAI,OAAO,MAAM,SAAU,QAAO,UAAU,IAAI;AAChD,SAAO;GACP,CACD,QAAO,MAAK,CAAC,CAAC,EAAE,GACnB,gBAAgB;;AAGtB,aAAa,WAAW,EACtB,KACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQ,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAAS,YAAY,KAAK,UAAU;AAQ1C,QAAOA,eAAc;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;GACJ,CAIQ;EACP;EACA;EACA,UAAU;EACX,CAAC;;AAGJ,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAe,sBAAsB,OACzC,QAAQ,aAAa,aAAa,CACnC;CACD,MAAM,YAAY,QAAQ,aAAa,UAAU,CAAC,OAChD,sBACD;CAED,MAAM,aAAa,gBAAgB,OACjC,QAAQ,aAAa,WAAW,CACjC;CACD,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;AAG7D,QAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.js","names":["_defineConfig"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\n\nimport { toArray } from '#utils';\n\nimport { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from './constants';\nimport { buildInput } from './input';\nimport { buildOutput } from './output';\nimport { PLUGIN_BUILDERS } from './plugins';\nimport type { Config_F, Params } from './types';\n\nexport const defineConfig: Config_F = additionals => {\n return defineConfig.default(additionals);\n};\n\nconst producePlugins = ({\n circularDeps,\n ignoresJS,\n dir,\n sourcemap = false,\n excludesTS,\n declarationMap,\n plugins,\n}: Params = {}) => {\n const include = buildInput(...toArray(excludesTS));\n const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));\n const unordered = {\n typescript: () =>\n PLUGIN_BUILDERS.typescript({\n include,\n exclude,\n declarationMap,\n dir,\n }),\n circulars: () => PLUGIN_BUILDERS.circulars({ exclude: circularDeps }),\n externals: () =>\n PLUGIN_BUILDERS.externals({\n // exclude peerDependencies and dependencies\n optDeps: false,\n builtinsPrefix: 'strip',\n include: excludesTS,\n }),\n clean: () => PLUGIN_BUILDERS.clean({ ignoresJS, sourcemap, dir }),\n };\n\n const defaultOrdered = () => [\n unordered.circulars(),\n unordered.externals(),\n esmExternalRequirePlugin(),\n unordered.typescript(),\n unordered.clean(),\n ];\n\n return plugins\n ? plugins\n .map(p => {\n if (typeof p === 'string') return unordered[p]();\n return p;\n })\n .filter(p => !!p)\n : defaultOrdered();\n};\n\ndefineConfig.default = ({\n dir,\n sourcemap = false,\n ...rest\n}: Params = {}) => {\n const input = buildInput();\n const external = rest.externals;\n const output = buildOutput(dir, sourcemap);\n\n const plugins = producePlugins({ dir, sourcemap, ...rest });\n\n return _defineConfig({\n input,\n plugins,\n external,\n output,\n platform: 'node',\n });\n};\n\ndefineConfig.bemedev = additionals => {\n // #region constants\n const circularDeps = DEFAULT_CIRCULAR_DEPS.concat(\n toArray(additionals?.circularDeps),\n );\n const ignoresJS = toArray(additionals?.ignoresJS).concat(\n DEFAULT_CIRCULAR_DEPS,\n );\n\n const excludesTS = DEFAULT_EXCLUDE.concat(\n toArray(additionals?.excludesTS),\n );\n const _sourcemap = additionals?.sourcemap;\n const sourcemap = _sourcemap === undefined || _sourcemap === true;\n // #endregion\n\n return defineConfig.default({\n ...additionals,\n circularDeps,\n excludesTS,\n ignoresJS,\n sourcemap,\n });\n};\n"],"mappings":";;;;;;;;AAWA,MAAa,gBAAyB,gBAAe;CACnD,OAAO,aAAa,QAAQ,WAAW;AACzC;AAEA,MAAM,kBAAkB,EACtB,cACA,WACA,KACA,YAAY,OACZ,YACA,gBACA,YACU,CAAC,MAAM;CACjB,MAAM,UAAU,WAAW,GAAG,QAAQ,UAAU,CAAC;CACjD,MAAM,UAAU,gBAAgB,OAAO,QAAQ,UAAU,CAAC;CAC1D,MAAM,YAAY;EAChB,kBACE,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;EACF,CAAC;EACH,iBAAiB,gBAAgB,UAAU,EAAE,SAAS,aAAa,CAAC;EACpE,iBACE,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;EACX,CAAC;EACH,aAAa,gBAAgB,MAAM;GAAE;GAAW;GAAW;EAAI,CAAC;CAClE;CAEA,MAAM,uBAAuB;EAC3B,UAAU,UAAU;EACpB,UAAU,UAAU;EACpB,yBAAyB;EACzB,UAAU,WAAW;EACrB,UAAU,MAAM;CAClB;CAEA,OAAO,UACH,QACG,KAAI,MAAK;EACR,IAAI,OAAO,MAAM,UAAU,OAAO,UAAU,EAAE,CAAC;EAC/C,OAAO;CACT,CAAC,CAAC,CACD,QAAO,MAAK,CAAC,CAAC,CAAC,IAClB,eAAe;AACrB;AAEA,aAAa,WAAW,EACtB,KACA,YAAY,OACZ,GAAG,SACO,CAAC,MAAM;CACjB,MAAM,QAAQ,WAAW;CACzB,MAAM,WAAW,KAAK;CACtB,MAAM,SAAS,YAAY,KAAK,SAAS;CAIzC,OAAOA,eAAc;EACnB;EACA,SAJc,eAAe;GAAE;GAAK;GAAW,GAAG;EAAK,CAIjD;EACN;EACA;EACA,UAAU;CACZ,CAAC;AACH;AAEA,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAe,sBAAsB,OACzC,QAAQ,aAAa,YAAY,CACnC;CACA,MAAM,YAAY,QAAQ,aAAa,SAAS,CAAC,CAAC,OAChD,qBACF;CAEA,MAAM,aAAa,gBAAgB,OACjC,QAAQ,aAAa,UAAU,CACjC;CACA,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;CAG7D,OAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","names":[],"sources":["../../src/rolldown-config/constants.ts"],"sourcesContent":["export const DEFAULT_EXCLUDE = [\n '**/node_modules/**/*',\n '**/__tests__/**/*',\n '**/*.test.ts',\n '**/*.test-d.ts',\n '**/*.fixtures.ts',\n '**/fixtures.ts',\n 'src/fixtures/**/*.ts',\n];\n\nexport const DEFAULT_CIRCULAR_DEPS = [\n '**/types.ts',\n '**/type.ts',\n '**/*.types.ts',\n '**/*.type.ts',\n];\n\nexport const IGNORE = DEFAULT_EXCLUDE.concat(DEFAULT_CIRCULAR_DEPS);\n\nexport const DEFAULT_DIR = 'lib';\n\nexport const WARNING_CODES = {\n EMPTY_BUNDLE: 'EMPTY_BUNDLE',\n CIRCULAR_DEPENDENCY: 'CIRCULAR_DEPENDENCY',\n};\n"],"mappings":";;AAAA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACD;AAED,MAAa,SAAS,gBAAgB,OAAO,sBAAsB;AAEnE,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,cAAc;CACd,qBAAqB;CACtB"}
1
+ {"version":3,"file":"constants.cjs","names":[],"sources":["../../src/rolldown-config/constants.ts"],"sourcesContent":["export const DEFAULT_EXCLUDE = [\n '**/node_modules/**/*',\n '**/__tests__/**/*',\n '**/*.test.ts',\n '**/*.test-d.ts',\n '**/*.fixtures.ts',\n '**/fixtures.ts',\n 'src/fixtures/**/*.ts',\n];\n\nexport const DEFAULT_CIRCULAR_DEPS = [\n '**/types.ts',\n '**/type.ts',\n '**/*.types.ts',\n '**/*.type.ts',\n];\n\nexport const IGNORE = DEFAULT_EXCLUDE.concat(DEFAULT_CIRCULAR_DEPS);\n\nexport const DEFAULT_DIR = 'lib';\n\nexport const WARNING_CODES = {\n EMPTY_BUNDLE: 'EMPTY_BUNDLE',\n CIRCULAR_DEPENDENCY: 'CIRCULAR_DEPENDENCY',\n};\n"],"mappings":";;AAAA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;AACF;AAEA,MAAa,SAAS,gBAAgB,OAAO,qBAAqB;AAElE,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,cAAc;CACd,qBAAqB;AACvB"}
@@ -1,8 +1,8 @@
1
- export declare const DEFAULT_EXCLUDE: string[];
2
- export declare const DEFAULT_CIRCULAR_DEPS: string[];
3
- export declare const IGNORE: string[];
1
+ export declare const DEFAULT_EXCLUDE: unknown;
2
+ export declare const DEFAULT_CIRCULAR_DEPS: unknown;
3
+ export declare const IGNORE: unknown;
4
4
  export declare const DEFAULT_DIR = "lib";
5
5
  export declare const WARNING_CODES: {
6
- EMPTY_BUNDLE: string;
7
- CIRCULAR_DEPENDENCY: string;
6
+ EMPTY_BUNDLE: string;
7
+ CIRCULAR_DEPENDENCY: string;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../src/rolldown-config/constants.ts"],"sourcesContent":["export const DEFAULT_EXCLUDE = [\n '**/node_modules/**/*',\n '**/__tests__/**/*',\n '**/*.test.ts',\n '**/*.test-d.ts',\n '**/*.fixtures.ts',\n '**/fixtures.ts',\n 'src/fixtures/**/*.ts',\n];\n\nexport const DEFAULT_CIRCULAR_DEPS = [\n '**/types.ts',\n '**/type.ts',\n '**/*.types.ts',\n '**/*.type.ts',\n];\n\nexport const IGNORE = DEFAULT_EXCLUDE.concat(DEFAULT_CIRCULAR_DEPS);\n\nexport const DEFAULT_DIR = 'lib';\n\nexport const WARNING_CODES = {\n EMPTY_BUNDLE: 'EMPTY_BUNDLE',\n CIRCULAR_DEPENDENCY: 'CIRCULAR_DEPENDENCY',\n};\n"],"mappings":";AAAA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACD;AAED,MAAa,SAAS,gBAAgB,OAAO,sBAAsB;AAEnE,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,cAAc;CACd,qBAAqB;CACtB"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../src/rolldown-config/constants.ts"],"sourcesContent":["export const DEFAULT_EXCLUDE = [\n '**/node_modules/**/*',\n '**/__tests__/**/*',\n '**/*.test.ts',\n '**/*.test-d.ts',\n '**/*.fixtures.ts',\n '**/fixtures.ts',\n 'src/fixtures/**/*.ts',\n];\n\nexport const DEFAULT_CIRCULAR_DEPS = [\n '**/types.ts',\n '**/type.ts',\n '**/*.types.ts',\n '**/*.type.ts',\n];\n\nexport const IGNORE = DEFAULT_EXCLUDE.concat(DEFAULT_CIRCULAR_DEPS);\n\nexport const DEFAULT_DIR = 'lib';\n\nexport const WARNING_CODES = {\n EMPTY_BUNDLE: 'EMPTY_BUNDLE',\n CIRCULAR_DEPENDENCY: 'CIRCULAR_DEPENDENCY',\n};\n"],"mappings":";AAAA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;AACF;AAEA,MAAa,SAAS,gBAAgB,OAAO,qBAAqB;AAElE,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,cAAc;CACd,qBAAqB;AACvB"}
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../_virtual/_rolldown/runtime.cjs");
3
2
  let fs = require("fs");
4
3
  let path = require("path");
5
4
  //#region src/rolldown-config/helpers.ts
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,OAAA,GAAA,KAAA,UAAe,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,WAAA,GAAA,KAAA,SAAkB,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;;AAGA,MAAa,oBAAoB,SAAiB;CAChD,OAAO,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,QAAA,CAAiB,IAAI,CAAC,CAAC,MAAM;AACzD;AAEA,MAAa,aACX,OACA,KACA,cACG;CACH,KAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,OAAA,GAAA,KAAA,SAAA,CAAe,OADF,iBAAiB,IACC,CAAC;EACtC,MAAM,WAAA,GAAA,KAAA,QAAA,CAAkB,QAAQ,IAAI,GAAG,KAAK,GAAG;EAG/C,QAAQ,KAAK,eAAe,SAAS;EAErC,CAAA,GAAA,GAAA,OAAA,CAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,KAAK,CAAC;EACvC,CAAA,GAAA,GAAA,OAAA,CAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,KAAK,CAAC;EACxC,IAAI,WAAW;GACb,CAAA,GAAA,GAAA,OAAA,CAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,KAAK,CAAC;GAC3C,CAAA,GAAA,GAAA,OAAA,CAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,KAAK,CAAC;EAC9C;EAEA,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;EAAS,CAAC,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,KACvB;EAEA,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,CAAC;EAEnD,QAAQ,KAAK,aAAa;EAC1B,QAAQ,IAAI,aAAa;EACzB,QAAQ,KAAK,UAAU;EACvB,QAAQ,IAAI,aAAa;CAE3B;AACF"}
@@ -1,2 +1,2 @@
1
- export declare const withoutExtension: (file: string) => string;
2
- export declare const cleanupJS: (files: Set<string>, dir: string, sourcemap: boolean) => void;
1
+ export declare const withoutExtension: unknown;
2
+ export declare const cleanupJS: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,MAAM,SAAS,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,UAAU,QAAQ,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,SAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,SAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,UAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,UAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;CAChD,OAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,IAAI,CAAC,CAAC,MAAM;AACzD;AAEA,MAAa,aACX,OACA,KACA,cACG;CACH,KAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,MAAM,SAAS,OADF,iBAAiB,IACC,CAAC;EACtC,MAAM,UAAU,QAAQ,QAAQ,IAAI,GAAG,KAAK,GAAG;EAG/C,QAAQ,KAAK,eAAe,SAAS;EAErC,OAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,KAAK,CAAC;EACvC,OAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,KAAK,CAAC;EACxC,IAAI,WAAW;GACb,OAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,KAAK,CAAC;GAC3C,OAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,KAAK,CAAC;EAC9C;EAEA,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;EAAS,CAAC,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,KACvB;EAEA,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,CAAC;EAEnD,QAAQ,KAAK,aAAa;EAC1B,QAAQ,IAAI,aAAa;EACzB,QAAQ,KAAK,UAAU;EACvB,QAAQ,IAAI,aAAa;CAE3B;AACF"}
@@ -1,3 +1,3 @@
1
- export * from './config';
2
- export * from './plugins';
3
- export * from './types';
1
+ export * from "./config";
2
+ export * from "./plugins";
3
+ export * from "./types";
@@ -1,8 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../_virtual/_rolldown/runtime.cjs");
3
2
  const require_rolldown_config_constants = require("./constants.cjs");
4
- let glob = require("glob");
5
3
  let path = require("path");
4
+ let glob = require("glob");
6
5
  //#region src/rolldown-config/input.ts
7
6
  const buildInput = (...ignores) => Object.fromEntries((0, glob.globSync)("src/**/*.ts", { ignore: require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(ignores) }).map((file) => {
8
7
  return [(0, path.relative)("src", file.slice(0, file.length - (0, path.extname)(file).length)), `${process.cwd()}/${file}`];
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,aAAA,GAAA,KAAA,UACI,eAAe,EACtB,QAAQA,kCAAAA,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,EAAA,GAAA,KAAA,UALL,OACA,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import { extname, relative } from 'node:path';\n\nimport { globSync } from 'glob';\n\nimport { DEFAULT_EXCLUDE } from './constants';\nimport type { BuildInput_F } from './types';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;;AAOA,MAAa,cAA4B,GAAG,YAC1C,OAAO,aAAA,GAAA,KAAA,SAAA,CACI,eAAe,EACtB,QAAQA,kCAAAA,gBAAgB,OAAO,OAAO,EACxC,CAAC,CAAC,CAAC,KAAI,SAAQ;CAOb,OAAO,EAAA,GAAA,KAAA,SAAA,CALL,OACA,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,QAAA,CAAiB,IAAI,CAAC,CAAC,MAAM,CAIxC,GAAG,GAFI,QAAQ,IAAI,EAAE,GAAG,MAEhB;AACpB,CAAC,CACH"}
@@ -1,2 +1,2 @@
1
- import type { BuildInput_F } from './types';
1
+ import type { BuildInput_F } from "./types";
2
2
  export declare const buildInput: BuildInput_F;
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_EXCLUDE } from "./constants.js";
2
- import { globSync } from "glob";
3
2
  import { extname, relative } from "path";
3
+ import { globSync } from "glob";
4
4
  //#region src/rolldown-config/input.ts
5
5
  const buildInput = (...ignores) => Object.fromEntries(globSync("src/**/*.ts", { ignore: DEFAULT_EXCLUDE.concat(ignores) }).map((file) => {
6
6
  return [relative("src", file.slice(0, file.length - extname(file).length)), `${process.cwd()}/${file}`];
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,YACL,SAAS,eAAe,EACtB,QAAQ,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,CANK,SACV,OACA,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import { extname, relative } from 'node:path';\n\nimport { globSync } from 'glob';\n\nimport { DEFAULT_EXCLUDE } from './constants';\nimport type { BuildInput_F } from './types';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;AAOA,MAAa,cAA4B,GAAG,YAC1C,OAAO,YACL,SAAS,eAAe,EACtB,QAAQ,gBAAgB,OAAO,OAAO,EACxC,CAAC,CAAC,CAAC,KAAI,SAAQ;CAOb,OAAO,CANK,SACV,OACA,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,IAAI,CAAC,CAAC,MAAM,CAIxC,GAAG,GAFI,QAAQ,IAAI,EAAE,GAAG,MAEhB;AACpB,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"output.cjs","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;;AAGA,MAAa,eAAe,MAAA,OAAmB,cAAuB;AACpE,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.cjs","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;;AAIA,MAAa,eAAe,MAAA,OAAmB,cAAuB;CACpE,OAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;CAClB,GACA;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;CAClB,CACF;AACF"}
@@ -1,15 +1 @@
1
- export declare const buildOutput: (dir: string | undefined, sourcemap: boolean) => [{
2
- readonly format: "es";
3
- readonly sourcemap: boolean;
4
- readonly preserveModulesRoot: "src";
5
- readonly dir: string;
6
- readonly preserveModules: true;
7
- readonly entryFileNames: "[name].js";
8
- }, {
9
- readonly format: "cjs";
10
- readonly sourcemap: boolean;
11
- readonly preserveModulesRoot: "src";
12
- readonly dir: string;
13
- readonly preserveModules: true;
14
- readonly entryFileNames: "[name].cjs";
15
- }];
1
+ export declare const buildOutput: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;AAGA,MAAa,eAAe,MAAA,OAAmB,cAAuB;AACpE,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.js","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;AAIA,MAAa,eAAe,MAAA,OAAmB,cAAuB;CACpE,OAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;CAClB,GACA;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;CAClB,CACF;AACF"}
@@ -1,20 +1,21 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../_virtual/_rolldown/runtime.cjs");
3
- const require_rolldown_config_utils = require("../utils.cjs");
2
+ const require_utils_array = require("../../utils/array.cjs");
4
3
  const require_rolldown_config_constants = require("../constants.cjs");
5
4
  const require_rolldown_config_helpers = require("../helpers.cjs");
6
- let glob = require("glob");
7
5
  let path = require("path");
6
+ let glob = require("glob");
8
7
  let rollup_plugin_circular_dependencies = require("rollup-plugin-circular-dependencies");
9
8
  //#region src/rolldown-config/plugins/circulars.ts
10
9
  /**
11
10
  * Creates a configured circular dependencies plugin instance
12
- * @param options - Configuration options for circular dependencies detection
11
+ *
12
+ * @param options - Configuration options for circular dependencies
13
+ * detection
13
14
  * @returns Rolldown plugin
14
15
  */
15
16
  function circulars(options = {}) {
16
17
  const all = (0, rollup_plugin_circular_dependencies.circularDependencies)(options);
17
- const CIRCULAR_CHUNKS = require_rolldown_config_utils.toArray(options.exclude).map((f) => (0, glob.globSync)(f, { nodir: true })).flat().map(require_rolldown_config_helpers.withoutExtension).map((file) => (0, path.relative)("src", file));
18
+ const CIRCULAR_CHUNKS = require_utils_array.toArray(options.exclude).map((f) => (0, glob.globSync)(f, { nodir: true })).flat().map(require_rolldown_config_helpers.withoutExtension).map((file) => (0, path.relative)("src", file));
18
19
  return {
19
20
  ...all,
20
21
  name: "better circular-dependencies",
@@ -1 +1 @@
1
- {"version":3,"file":"circulars.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,OAAA,GAAA,oCAAA,sBAA2B,QAAQ;CAGzC,MAAM,kBAFUA,8BAAAA,QAAQ,QAAQ,QAED,CAC5B,KAAI,OAAA,GAAA,KAAA,UAAc,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAIC,gCAAAA,iBAAiB,CACrB,KAAI,UAAA,GAAA,KAAA,UAAiB,OAAO,KAAK,CAAC;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAASC,kCAAAA,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { relative } from 'node:path';\n\nimport { globSync } from 'glob';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\n\nimport { toArray } from '#utils';\n\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & { exclude?: string | string[] };\n\n/**\n * Creates a configured circular dependencies plugin instance\n *\n * @param options - Configuration options for circular dependencies\n * detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgB,UACd,UAAuC,CAAC,GAClB;CACtB,MAAM,OAAA,GAAA,oCAAA,qBAAA,CAA2B,OAAO;CAGxC,MAAM,kBAFUA,oBAAAA,QAAQ,QAAQ,OAEF,CAAC,CAC5B,KAAI,OAAA,GAAA,KAAA,SAAA,CAAc,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CACtC,KAAK,CAAC,CACN,IAAIC,gCAAAA,gBAAgB,CAAC,CACrB,KAAI,UAAA,GAAA,KAAA,SAAA,CAAiB,OAAO,IAAI,CAAC;CAEpC,OAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,IACE,SAASC,kCAAAA,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,IAAI,CAAC,GACnD;IACA,MAAM,QAAQ,IAAI,OAAO,EAAE;IAC3B,QAAQ,IAAI,KAAK;IACjB,QAAQ,IACN,sDACF;IACA,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,MAAM,CAAC;IACrD,QAAQ,IAAI,KAAK;IACjB,QAAQ,IAAI;IACZ,OAAO;GACT;EAGF,EACF;CACF;AACF"}
@@ -1,11 +1,13 @@
1
- import type { RolldownPluginOption } from 'rolldown';
2
- import { circularDependencies } from 'rollup-plugin-circular-dependencies';
1
+ import type { RolldownPluginOption } from "rolldown";
2
+ import { circularDependencies } from "rollup-plugin-circular-dependencies";
3
3
  export type CircularDependenciesOptions = Parameters<typeof circularDependencies>[0] & {
4
- exclude?: string | string[];
4
+ exclude?: string | string[];
5
5
  };
6
6
  /**
7
- * Creates a configured circular dependencies plugin instance
8
- * @param options - Configuration options for circular dependencies detection
9
- * @returns Rolldown plugin
10
- */
7
+ * Creates a configured circular dependencies plugin instance
8
+ *
9
+ * @param options - Configuration options for circular dependencies
10
+ * detection
11
+ * @returns Rolldown plugin
12
+ */
11
13
  export declare function circulars(options?: CircularDependenciesOptions): RolldownPluginOption;
@@ -1,13 +1,15 @@
1
- import { toArray } from "../utils.js";
1
+ import { toArray } from "../../utils/array.js";
2
2
  import { WARNING_CODES } from "../constants.js";
3
3
  import { withoutExtension } from "../helpers.js";
4
- import { globSync } from "glob";
5
4
  import { relative } from "path";
5
+ import { globSync } from "glob";
6
6
  import { circularDependencies } from "rollup-plugin-circular-dependencies";
7
7
  //#region src/rolldown-config/plugins/circulars.ts
8
8
  /**
9
9
  * Creates a configured circular dependencies plugin instance
10
- * @param options - Configuration options for circular dependencies detection
10
+ *
11
+ * @param options - Configuration options for circular dependencies
12
+ * detection
11
13
  * @returns Rolldown plugin
12
14
  */
13
15
  function circulars(options = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,MAAM,qBAAqB,QAAQ;CAGzC,MAAM,kBAFU,QAAQ,QAAQ,QAED,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { relative } from 'node:path';\n\nimport { globSync } from 'glob';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\n\nimport { toArray } from '#utils';\n\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & { exclude?: string | string[] };\n\n/**\n * Creates a configured circular dependencies plugin instance\n *\n * @param options - Configuration options for circular dependencies\n * detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAgB,UACd,UAAuC,CAAC,GAClB;CACtB,MAAM,MAAM,qBAAqB,OAAO;CAGxC,MAAM,kBAFU,QAAQ,QAAQ,OAEF,CAAC,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CACtC,KAAK,CAAC,CACN,IAAI,gBAAgB,CAAC,CACrB,KAAI,SAAQ,SAAS,OAAO,IAAI,CAAC;CAEpC,OAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,IACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,IAAI,CAAC,GACnD;IACA,MAAM,QAAQ,IAAI,OAAO,EAAE;IAC3B,QAAQ,IAAI,KAAK;IACjB,QAAQ,IACN,sDACF;IACA,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,MAAM,CAAC;IACrD,QAAQ,IAAI,KAAK;IACjB,QAAQ,IAAI;IACZ,OAAO;GACT;EAGF,EACF;CACF;AACF"}
@@ -1,18 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
3
- const require_rolldown_config_utils = require("../utils.cjs");
2
+ const require_utils_array = require("../../utils/array.cjs");
4
3
  const require_rolldown_config_constants = require("../constants.cjs");
5
4
  const require_rolldown_config_helpers = require("../helpers.cjs");
6
5
  const require_rolldown_config_plugins_typescript_config = require("./typescript.config.cjs");
7
- let fs = require("fs");
8
- let glob = require("glob");
9
6
  let path = require("path");
10
- let typescript = require("typescript");
11
- typescript = require_runtime.__toESM(typescript, 1);
7
+ let glob = require("glob");
12
8
  //#region src/rolldown-config/plugins/clean.ts
13
9
  const clean = (options) => {
14
10
  const { ignoresJS, sourcemap = false, dir } = options;
15
- const _ignoresJS = require_rolldown_config_utils.toArray(ignoresJS);
11
+ const _ignoresJS = require_utils_array.toArray(ignoresJS);
16
12
  return {
17
13
  name: "end-bemedev",
18
14
  onLog: { handler: (_, { code, names }) => {
@@ -29,8 +25,7 @@ const clean = (options) => {
29
25
  closeBundle: {
30
26
  order: "post",
31
27
  handler: () => {
32
- const cwd = process.cwd();
33
- const outDir = require_rolldown_config_plugins_typescript_config.readTsConfig(typescript.default.findConfigFile(cwd, fs.existsSync, "tsconfig.json")).options.outDir ?? dir ?? "lib";
28
+ const outDir = require_rolldown_config_plugins_typescript_config.readTsConfig(require_rolldown_config_plugins_typescript_config.findConfigFile(process.cwd(), "tsconfig.json")).compilerOptions.outDir ?? dir ?? "lib";
34
29
  if (_ignoresJS.length > 0) try {
35
30
  const files = /* @__PURE__ */ new Set();
36
31
  _ignoresJS.forEach((pat) => {
@@ -1 +1 @@
1
- {"version":3,"file":"clean.cjs","names":["toArray","withoutExtension","WARNING_CODES","readTsConfig","ts","existsSync"],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { existsSync } from 'fs';\nimport { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport ts from 'typescript';\nimport { DEFAULT_DIR, WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\nimport { readTsConfig } from './typescript.config';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions) => {\n const { ignoresJS, sourcemap = false, dir } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n const cwd = process.cwd();\n\n const tsconfigPath = ts.findConfigFile(\n cwd,\n existsSync,\n 'tsconfig.json',\n )!;\n const _outDir = readTsConfig(tsconfigPath).options.outDir;\n const outDir = _outDir ?? dir ?? DEFAULT_DIR;\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, outDir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;;;;;;;AAgBA,MAAa,SAAS,YAA8B;CAClD,MAAM,EAAE,WAAW,YAAY,OAAO,QAAQ;CAE9C,MAAM,aAAaA,8BAAAA,QAAQ,UAAU;AA4DrC,QAAO;EAzDL,MAAM;EAEN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,MAAM,eAAe,WAClB,KAAI,OAAA,GAAA,KAAA,UAAc,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAIC,gCAAAA,iBAAiB,CACrB,KAAI,UAAA,GAAA,KAAA,UAAiB,OAAO,KAAK,CAAC;AAMrC,OAHE,SAASC,kCAAAA,cAAc,gBACvB,OAAO,OAAM,SAAQ,aAAa,SAAS,KAAK,CAAC,EAExC;IACT,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IAAI,mDAAmD;AAC/D,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,WAAO;;KAKZ;EAED,aAAa;GACX,OAAO;GACP,eAAe;IACb,MAAM,MAAM,QAAQ,KAAK;IAQzB,MAAM,SADUC,kDAAAA,aALKC,WAAAA,QAAG,eACtB,KACAC,GAAAA,YACA,gBAEuC,CAAC,CAAC,QAAQ,UACzB,OAAA;AAC1B,QAAI,WAAW,SAAS,EACtB,KAAI;KACF,MAAM,wBAAQ,IAAI,KAAa;AAC/B,gBAAW,SAAQ,QAAO;AAExB,OAAA,GAAA,KAAA,UADuB,KAAK,EAAE,OAAO,MAAM,CACtC,CAAC,SAAQ,SAAQ,MAAM,IAAI,KAAK,CAAC;OACtC;AACF,qCAAA,UAAU,OAAO,QAAQ,UAAU;AACnC,aAAQ,IAAI,iBAAiB;aAEtB,KAAK;AACZ,aAAQ,MAAM,iCAAiC,IAAI;;;GAI1D;EAGO"}
1
+ {"version":3,"file":"clean.cjs","names":["toArray","withoutExtension","WARNING_CODES","readTsConfig","findConfigFile"],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { relative } from 'node:path';\n\nimport { globSync } from 'glob';\nimport type { RolldownPluginOption } from 'rolldown';\n\nimport { toArray } from '#utils';\n\nimport { DEFAULT_DIR, WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { findConfigFile, readTsConfig } from './typescript.config';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions) => {\n const { ignoresJS, sourcemap = false, dir } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n const cwd = process.cwd();\n\n const tsconfigPath = findConfigFile(cwd, 'tsconfig.json')!;\n const _outDir = readTsConfig(tsconfigPath).compilerOptions.outDir;\n const outDir = _outDir ?? dir ?? DEFAULT_DIR;\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, outDir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;;;AAiBA,MAAa,SAAS,YAA8B;CAClD,MAAM,EAAE,WAAW,YAAY,OAAO,QAAQ;CAE9C,MAAM,aAAaA,oBAAAA,QAAQ,SAAS;CAwDpC,OAAO;EArDL,MAAM;EAEN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,MAAM,eAAe,WAClB,KAAI,OAAA,GAAA,KAAA,SAAA,CAAc,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CACtC,KAAK,CAAC,CACN,IAAIC,gCAAAA,gBAAgB,CAAC,CACrB,KAAI,UAAA,GAAA,KAAA,SAAA,CAAiB,OAAO,IAAI,CAAC;GAMpC,IAHE,SAASC,kCAAAA,cAAc,gBACvB,OAAO,OAAM,SAAQ,aAAa,SAAS,IAAI,CAAC,GAEvC;IACT,MAAM,QAAQ,IAAI,OAAO,EAAE;IAC3B,QAAQ,IAAI,KAAK;IACjB,QAAQ,IAAI,kDAAkD;IAC9D,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,MAAM,CAAC;IACrD,QAAQ,IAAI,KAAK;IACjB,OAAO;GACT;EAGF,EACF;EAEA,aAAa;GACX,OAAO;GACP,eAAe;IAKb,MAAM,SADUC,kDAAAA,aADKC,kDAAAA,eAFT,QAAQ,IAEkB,GAAG,eACD,CAAC,CAAC,CAAC,gBAAgB,UACjC,OAAA;IAC1B,IAAI,WAAW,SAAS,GACtB,IAAI;KACF,MAAM,wBAAQ,IAAI,IAAY;KAC9B,WAAW,SAAQ,QAAO;MAExB,CAAA,GAAA,KAAA,SAAA,CADuB,KAAK,EAAE,OAAO,KAAK,CACtC,CAAC,CAAC,SAAQ,SAAQ,MAAM,IAAI,IAAI,CAAC;KACvC,CAAC;KACD,gCAAA,UAAU,OAAO,QAAQ,SAAS;KAClC,QAAQ,IAAI,gBAAgB;IAE9B,SAAS,KAAK;KACZ,QAAQ,MAAM,iCAAiC,GAAG;IACpD;GAEJ;EACF;CAGO;AACX"}
@@ -1,15 +1,6 @@
1
1
  export type EndPluginOptions = {
2
- ignoresJS?: string | string[];
3
- sourcemap?: boolean;
4
- dir?: string;
5
- };
6
- export declare const clean: (options: EndPluginOptions) => {
7
- name: string;
8
- onLog: {
9
- handler: (this: import("rolldown").MinimalPluginContext, _: import("rolldown").LogLevel, { code, names }: import("rolldown").RolldownLog) => false | undefined;
10
- };
11
- closeBundle: {
12
- order: "post";
13
- handler: () => void;
14
- };
2
+ ignoresJS?: string | string[];
3
+ sourcemap?: boolean;
4
+ dir?: string;
15
5
  };
6
+ export declare const clean: unknown;
@@ -1,11 +1,9 @@
1
- import { toArray } from "../utils.js";
1
+ import { toArray } from "../../utils/array.js";
2
2
  import { WARNING_CODES } from "../constants.js";
3
3
  import { cleanupJS, withoutExtension } from "../helpers.js";
4
- import { readTsConfig } from "./typescript.config.js";
5
- import { existsSync } from "fs";
6
- import { globSync } from "glob";
4
+ import { findConfigFile, readTsConfig } from "./typescript.config.js";
7
5
  import { relative } from "path";
8
- import ts from "typescript";
6
+ import { globSync } from "glob";
9
7
  //#region src/rolldown-config/plugins/clean.ts
10
8
  const clean = (options) => {
11
9
  const { ignoresJS, sourcemap = false, dir } = options;
@@ -26,8 +24,7 @@ const clean = (options) => {
26
24
  closeBundle: {
27
25
  order: "post",
28
26
  handler: () => {
29
- const cwd = process.cwd();
30
- const outDir = readTsConfig(ts.findConfigFile(cwd, existsSync, "tsconfig.json")).options.outDir ?? dir ?? "lib";
27
+ const outDir = readTsConfig(findConfigFile(process.cwd(), "tsconfig.json")).compilerOptions.outDir ?? dir ?? "lib";
31
28
  if (_ignoresJS.length > 0) try {
32
29
  const files = /* @__PURE__ */ new Set();
33
30
  _ignoresJS.forEach((pat) => {