@bemedev/dev-utils 0.8.0 → 0.8.1

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 (142) hide show
  1. package/lib/build-tests/addTarball.cjs.map +1 -1
  2. package/lib/build-tests/addTarball.js.map +1 -1
  3. package/lib/build-tests/buildPackageJson.cjs.map +1 -1
  4. package/lib/build-tests/buildPackageJson.js.map +1 -1
  5. package/lib/build-tests/cleanup.cjs.map +1 -1
  6. package/lib/build-tests/cleanup.js.map +1 -1
  7. package/lib/build-tests/cli/cli.cjs +1 -0
  8. package/lib/build-tests/cli/cli.cjs.map +1 -1
  9. package/lib/build-tests/cli/cli.js.map +1 -1
  10. package/lib/build-tests/cli/index.cjs +1 -0
  11. package/lib/build-tests/cli/index.cjs.map +1 -1
  12. package/lib/build-tests/cli/index.js.map +1 -1
  13. package/lib/build-tests/cli/post.cjs +1 -0
  14. package/lib/build-tests/cli/post.cjs.map +1 -1
  15. package/lib/build-tests/cli/post.js.map +1 -1
  16. package/lib/build-tests/cli/pre.cjs +1 -0
  17. package/lib/build-tests/cli/pre.cjs.map +1 -1
  18. package/lib/build-tests/cli/pre.js.map +1 -1
  19. package/lib/build-tests/cli/test.cjs.map +1 -1
  20. package/lib/build-tests/cli/test.js.map +1 -1
  21. package/lib/build-tests/constants.cjs.map +1 -1
  22. package/lib/build-tests/constants.js.map +1 -1
  23. package/lib/build-tests/getRelativePath.cjs +1 -0
  24. package/lib/build-tests/getRelativePath.cjs.map +1 -1
  25. package/lib/build-tests/getRelativePath.js.map +1 -1
  26. package/lib/build-tests/getTypescriptOutdir.cjs +10 -2
  27. package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
  28. package/lib/build-tests/getTypescriptOutdir.js +9 -2
  29. package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
  30. package/lib/build-tests/import.cjs.map +1 -1
  31. package/lib/build-tests/import.js.map +1 -1
  32. package/lib/build-tests/imports/create.cjs +1 -0
  33. package/lib/build-tests/imports/create.cjs.map +1 -1
  34. package/lib/build-tests/imports/create.js.map +1 -1
  35. package/lib/build-tests/imports/helper.cjs +1 -0
  36. package/lib/build-tests/imports/helper.cjs.map +1 -1
  37. package/lib/build-tests/imports/helper.js.map +1 -1
  38. package/lib/build-tests/pack.cjs.map +1 -1
  39. package/lib/build-tests/pack.js.map +1 -1
  40. package/lib/rolldown-config/config.cjs +4 -3
  41. package/lib/rolldown-config/config.cjs.map +1 -1
  42. package/lib/rolldown-config/config.js +3 -3
  43. package/lib/rolldown-config/config.js.map +1 -1
  44. package/lib/rolldown-config/constants.cjs.map +1 -1
  45. package/lib/rolldown-config/constants.js.map +1 -1
  46. package/lib/rolldown-config/helpers.cjs +1 -0
  47. package/lib/rolldown-config/helpers.cjs.map +1 -1
  48. package/lib/rolldown-config/helpers.js.map +1 -1
  49. package/lib/rolldown-config/index.d.ts +1 -0
  50. package/lib/rolldown-config/input.cjs +1 -0
  51. package/lib/rolldown-config/input.cjs.map +1 -1
  52. package/lib/rolldown-config/input.js.map +1 -1
  53. package/lib/rolldown-config/output.cjs +2 -1
  54. package/lib/rolldown-config/output.cjs.map +1 -1
  55. package/lib/rolldown-config/output.d.ts +1 -1
  56. package/lib/rolldown-config/output.js +2 -1
  57. package/lib/rolldown-config/output.js.map +1 -1
  58. package/lib/rolldown-config/plugins/alias.cjs.map +1 -1
  59. package/lib/rolldown-config/plugins/alias.js.map +1 -1
  60. package/lib/rolldown-config/plugins/circulars.cjs +1 -0
  61. package/lib/rolldown-config/plugins/circulars.cjs.map +1 -1
  62. package/lib/rolldown-config/plugins/circulars.js.map +1 -1
  63. package/lib/rolldown-config/plugins/clean.cjs +10 -3
  64. package/lib/rolldown-config/plugins/clean.cjs.map +1 -1
  65. package/lib/rolldown-config/plugins/clean.d.ts +1 -1
  66. package/lib/rolldown-config/plugins/clean.js +8 -3
  67. package/lib/rolldown-config/plugins/clean.js.map +1 -1
  68. package/lib/rolldown-config/plugins/externals.cjs +1 -0
  69. package/lib/rolldown-config/plugins/externals.cjs.map +1 -1
  70. package/lib/rolldown-config/plugins/externals.js.map +1 -1
  71. package/lib/rolldown-config/plugins/index.cjs.map +1 -1
  72. package/lib/rolldown-config/plugins/index.d.ts +2 -2
  73. package/lib/rolldown-config/plugins/index.js.map +1 -1
  74. package/lib/rolldown-config/plugins/tsPaths.cjs.map +1 -1
  75. package/lib/rolldown-config/plugins/tsPaths.js.map +1 -1
  76. package/lib/rolldown-config/plugins/typescript.cjs +3 -1
  77. package/lib/rolldown-config/plugins/typescript.cjs.map +1 -1
  78. package/lib/rolldown-config/plugins/typescript.config.cjs.map +1 -1
  79. package/lib/rolldown-config/plugins/typescript.config.js.map +1 -1
  80. package/lib/rolldown-config/plugins/typescript.d.ts +1 -1
  81. package/lib/rolldown-config/plugins/typescript.js +3 -1
  82. package/lib/rolldown-config/plugins/typescript.js.map +1 -1
  83. package/lib/rolldown-config/utils.cjs.map +1 -1
  84. package/lib/rolldown-config/utils.js.map +1 -1
  85. package/lib/utils/sleep.cjs.map +1 -1
  86. package/lib/utils/sleep.js.map +1 -1
  87. package/lib/vitest-exclude/vitest.cjs +39 -14
  88. package/lib/vitest-exclude/vitest.cjs.map +1 -1
  89. package/lib/vitest-exclude/vitest.d.ts +4 -3
  90. package/lib/vitest-exclude/vitest.js +39 -14
  91. package/lib/vitest-exclude/vitest.js.map +1 -1
  92. package/lib/vitest-exclude/vitest.utils.cjs +9 -8
  93. package/lib/vitest-exclude/vitest.utils.cjs.map +1 -1
  94. package/lib/vitest-exclude/vitest.utils.d.ts +4 -4
  95. package/lib/vitest-exclude/vitest.utils.js +8 -8
  96. package/lib/vitest-exclude/vitest.utils.js.map +1 -1
  97. package/lib/vitest-extended/acceptation.cjs +1 -0
  98. package/lib/vitest-extended/acceptation.cjs.map +1 -1
  99. package/lib/vitest-extended/acceptation.js.map +1 -1
  100. package/lib/vitest-extended/createTests.cjs +1 -0
  101. package/lib/vitest-extended/createTests.cjs.map +1 -1
  102. package/lib/vitest-extended/createTests.js.map +1 -1
  103. package/lib/vitest-extended/done.cjs +1 -0
  104. package/lib/vitest-extended/done.cjs.map +1 -1
  105. package/lib/vitest-extended/done.js.map +1 -1
  106. package/lib/vitest-extended/each/error.cjs +1 -0
  107. package/lib/vitest-extended/each/error.cjs.map +1 -1
  108. package/lib/vitest-extended/each/error.js.map +1 -1
  109. package/lib/vitest-extended/each/pass.cjs +1 -0
  110. package/lib/vitest-extended/each/pass.cjs.map +1 -1
  111. package/lib/vitest-extended/each/pass.js.map +1 -1
  112. package/lib/vitest-extended/fakeWaiter.cjs.map +1 -1
  113. package/lib/vitest-extended/fakeWaiter.js.map +1 -1
  114. package/lib/vitest-extended/fixtures/coverage.cjs.map +1 -1
  115. package/lib/vitest-extended/fixtures/coverage.js.map +1 -1
  116. package/lib/vitest-extended/fixtures/partialCall.cjs.map +1 -1
  117. package/lib/vitest-extended/fixtures/partialCall.js.map +1 -1
  118. package/lib/vitest-extended/fixtures/toUpper.cjs.map +1 -1
  119. package/lib/vitest-extended/fixtures/toUpper.js.map +1 -1
  120. package/lib/vitest-extended/fixtures/zod.cjs.map +1 -1
  121. package/lib/vitest-extended/fixtures/zod.js.map +1 -1
  122. package/lib/vitest-extended/identity.cjs +1 -0
  123. package/lib/vitest-extended/identity.cjs.map +1 -1
  124. package/lib/vitest-extended/identity.js.map +1 -1
  125. package/lib/vitest-extended/isDefined.cjs.map +1 -1
  126. package/lib/vitest-extended/isDefined.js.map +1 -1
  127. package/lib/vitest-extended/isFunction.cjs.map +1 -1
  128. package/lib/vitest-extended/isFunction.js.map +1 -1
  129. package/lib/vitest-extended/toArray.cjs.map +1 -1
  130. package/lib/vitest-extended/toArray.js.map +1 -1
  131. package/lib/vitest-extended/toStringFlat.cjs.map +1 -1
  132. package/lib/vitest-extended/toStringFlat.js.map +1 -1
  133. package/package.json +17 -59
  134. package/README.md +0 -700
  135. package/lib/vitest-alias/index.cjs +0 -4
  136. package/lib/vitest-alias/index.d.ts +0 -1
  137. package/lib/vitest-alias/index.js +0 -2
  138. package/lib/vitest-alias/vitest.cjs +0 -86
  139. package/lib/vitest-alias/vitest.cjs.map +0 -1
  140. package/lib/vitest-alias/vitest.d.ts +0 -33
  141. package/lib/vitest-alias/vitest.js +0 -82
  142. package/lib/vitest-alias/vitest.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"addTarball.cjs","names":["FILE_ORIGIN","pack","THIS1","PACKAGE_PATH","devKey"],"sources":["../../src/build-tests/addTarball.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport sh from 'shelljs';\nimport sortKeys from 'sort-keys';\nimport { devKey, FILE_ORIGIN, PACKAGE_PATH, THIS1 } from './constants';\nimport { pack } from './pack';\n\nexport const addTarball = async () => {\n // #region Install the tarball\n const _packed = await pack();\n const packed = `${FILE_ORIGIN}:${_packed}`;\n sh.exec(`pnpm add -D ${THIS1}@${packed}`);\n // #endregion\n\n const file = editJsonFile(PACKAGE_PATH);\n const devDeps = sortKeys(file.get(devKey));\n file.set(devKey, devDeps);\n file.save();\n};\n"],"mappings":";;;;;;;;;;;AAMA,MAAa,aAAa,YAAY;CAGpC,MAAM,SAAS,GAAGA,8BAAAA,YAAY,GAAG,MADXC,yBAAAA,KAAK;CAE3B,QAAA,QAAG,KAAK,eAAeC,8BAAAA,MAAM,GAAG,QAAQ;CAGxC,MAAM,QAAA,GAAA,eAAA,QAAA,CAAoBC,8BAAAA,YAAY;CACtC,MAAM,WAAA,GAAA,UAAA,QAAA,CAAmB,KAAK,IAAIC,8BAAAA,MAAM,CAAC;CACzC,KAAK,IAAIA,8BAAAA,QAAQ,OAAO;CACxB,KAAK,KAAK;AACZ"}
1
+ {"version":3,"file":"addTarball.cjs","names":["FILE_ORIGIN","pack","THIS1","PACKAGE_PATH","devKey"],"sources":["../../src/build-tests/addTarball.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport sh from 'shelljs';\nimport sortKeys from 'sort-keys';\nimport { devKey, FILE_ORIGIN, PACKAGE_PATH, THIS1 } from './constants';\nimport { pack } from './pack';\n\nexport const addTarball = async () => {\n // #region Install the tarball\n const _packed = await pack();\n const packed = `${FILE_ORIGIN}:${_packed}`;\n sh.exec(`pnpm add -D ${THIS1}@${packed}`);\n // #endregion\n\n const file = editJsonFile(PACKAGE_PATH);\n const devDeps = sortKeys(file.get(devKey));\n file.set(devKey, devDeps);\n file.save();\n};\n"],"mappings":";;;;;;;;;;;AAMA,MAAa,aAAa,YAAY;CAGpC,MAAM,SAAS,GAAGA,8BAAAA,YAAY,GAAG,MADXC,yBAAAA,MAAM;AAE5B,SAAA,QAAG,KAAK,eAAeC,8BAAAA,MAAM,GAAG,SAAS;CAGzC,MAAM,QAAA,GAAA,eAAA,SAAoBC,8BAAAA,aAAa;CACvC,MAAM,WAAA,GAAA,UAAA,SAAmB,KAAK,IAAIC,8BAAAA,OAAO,CAAC;AAC1C,MAAK,IAAIA,8BAAAA,QAAQ,QAAQ;AACzB,MAAK,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"addTarball.js","names":[],"sources":["../../src/build-tests/addTarball.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport sh from 'shelljs';\nimport sortKeys from 'sort-keys';\nimport { devKey, FILE_ORIGIN, PACKAGE_PATH, THIS1 } from './constants';\nimport { pack } from './pack';\n\nexport const addTarball = async () => {\n // #region Install the tarball\n const _packed = await pack();\n const packed = `${FILE_ORIGIN}:${_packed}`;\n sh.exec(`pnpm add -D ${THIS1}@${packed}`);\n // #endregion\n\n const file = editJsonFile(PACKAGE_PATH);\n const devDeps = sortKeys(file.get(devKey));\n file.set(devKey, devDeps);\n file.save();\n};\n"],"mappings":";;;;;;AAMA,MAAa,aAAa,YAAY;CAGpC,MAAM,SAAS,GAAG,YAAY,GAAG,MADX,KAAK;CAE3B,GAAG,KAAK,eAAe,MAAM,GAAG,QAAQ;CAGxC,MAAM,OAAO,aAAa,YAAY;CACtC,MAAM,UAAU,SAAS,KAAK,IAAI,MAAM,CAAC;CACzC,KAAK,IAAI,QAAQ,OAAO;CACxB,KAAK,KAAK;AACZ"}
1
+ {"version":3,"file":"addTarball.js","names":[],"sources":["../../src/build-tests/addTarball.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport sh from 'shelljs';\nimport sortKeys from 'sort-keys';\nimport { devKey, FILE_ORIGIN, PACKAGE_PATH, THIS1 } from './constants';\nimport { pack } from './pack';\n\nexport const addTarball = async () => {\n // #region Install the tarball\n const _packed = await pack();\n const packed = `${FILE_ORIGIN}:${_packed}`;\n sh.exec(`pnpm add -D ${THIS1}@${packed}`);\n // #endregion\n\n const file = editJsonFile(PACKAGE_PATH);\n const devDeps = sortKeys(file.get(devKey));\n file.set(devKey, devDeps);\n file.save();\n};\n"],"mappings":";;;;;;AAMA,MAAa,aAAa,YAAY;CAGpC,MAAM,SAAS,GAAG,YAAY,GAAG,MADX,MAAM;AAE5B,IAAG,KAAK,eAAe,MAAM,GAAG,SAAS;CAGzC,MAAM,OAAO,aAAa,aAAa;CACvC,MAAM,UAAU,SAAS,KAAK,IAAI,OAAO,CAAC;AAC1C,MAAK,IAAI,QAAQ,QAAQ;AACzB,MAAK,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildPackageJson.cjs","names":["getTypescriptOutdir","EXPORT_KEY"],"sources":["../../src/build-tests/buildPackageJson.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile from 'edit-json-file';\nimport sortKeys from 'sort-keys';\nimport { BIN_KEY, EXPORT_KEY, EXPORT_KEYS } from './constants';\nimport { getTypescriptOutdir } from './getTypescriptOutdir';\n\ntype BuldPackageJson_F = Fn<[], { packageJson: object; outDir: string }>;\n\nexport const buildPackageJson: BuldPackageJson_F = () => {\n const file = editJsonFile('./package.json');\n const outDir = getTypescriptOutdir();\n const lib = `${outDir}/`;\n const replaceLib = (str: string) => str.replace(lib, '');\n\n // #region Set export values\n EXPORT_KEYS.forEach(key => {\n const value = file.get(key);\n if (value) {\n const transformed = replaceLib(value);\n file.set(key, transformed);\n }\n });\n // #endregion\n\n // #region Set Export key\n const valueExports = file.get(EXPORT_KEY);\n\n if (valueExports) {\n const transformedExports = Object.entries(valueExports).reduce(\n (acc, [key, value]) => {\n const entries = Object.entries(value as any);\n const _value = entries.reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value as any);\n return acc;\n }, {} as any);\n acc[key] = key.includes('package.json') ? value : _value;\n return acc;\n },\n {} as any,\n );\n\n file.set(EXPORT_KEY, transformedExports);\n }\n // #endregion\n\n // #region Set bin\n const bin1 = file.get(BIN_KEY) as\n | Record<string, string>\n | undefined\n | string;\n\n if (bin1) {\n if (typeof bin1 === 'string') {\n const bin2 = replaceLib(bin1);\n file.set(BIN_KEY, bin2);\n } else {\n const bin2 = Object.entries(bin1).reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value);\n return acc;\n }, {} as any);\n\n const bin3 = sortKeys(bin2);\n file.set(BIN_KEY, bin3);\n }\n }\n // #endregion\n\n // #region Unset some props\n file.unset('files');\n file.unset('scripts');\n file.unset('devDependencies');\n // #endregion\n\n const packageJson = file.get();\n return { packageJson, outDir };\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,yBAA4C;CACvD,MAAM,QAAA,GAAA,eAAA,QAAA,CAAoB,gBAAgB;CAC1C,MAAM,SAASA,wCAAAA,oBAAoB;CACnC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,EAAE;CAGvD,8BAAA,YAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,GAAG;EAC1B,IAAI,OAAO;GACT,MAAM,cAAc,WAAW,KAAK;GACpC,KAAK,IAAI,KAAK,WAAW;EAC3B;CACF,CAAC;CAID,MAAM,eAAe,KAAK,IAAIC,8BAAAA,UAAU;CAExC,IAAI,cAAc;EAChB,MAAM,qBAAqB,OAAO,QAAQ,YAAY,CAAC,CAAC,QACrD,KAAK,CAAC,KAAK,WAAW;GAErB,MAAM,SADU,OAAO,QAAQ,KACV,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;IACnD,IAAI,OAAO,WAAW,KAAY;IAClC,OAAO;GACT,GAAG,CAAC,CAAQ;GACZ,IAAI,OAAO,IAAI,SAAS,cAAc,IAAI,QAAQ;GAClD,OAAO;EACT,GACA,CAAC,CACH;EAEA,KAAK,IAAIA,8BAAAA,YAAY,kBAAkB;CACzC;CAIA,MAAM,OAAO,KAAK,IAAA,KAAW;CAK7B,IAAI,MACF,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,IAAI;EAC5B,KAAK,IAAA,OAAa,IAAI;CACxB,OAAO;EAML,MAAM,QAAA,GAAA,UAAA,QAAA,CALO,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;GAC9D,IAAI,OAAO,WAAW,KAAK;GAC3B,OAAO;EACT,GAAG,CAAC,CAEqB,CAAC;EAC1B,KAAK,IAAA,OAAa,IAAI;CACxB;CAKF,KAAK,MAAM,OAAO;CAClB,KAAK,MAAM,SAAS;CACpB,KAAK,MAAM,iBAAiB;CAI5B,OAAO;EAAE,aADW,KAAK,IACN;EAAG;CAAO;AAC/B"}
1
+ {"version":3,"file":"buildPackageJson.cjs","names":["getTypescriptOutdir","EXPORT_KEY"],"sources":["../../src/build-tests/buildPackageJson.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile from 'edit-json-file';\nimport sortKeys from 'sort-keys';\nimport { BIN_KEY, EXPORT_KEY, EXPORT_KEYS } from './constants';\nimport { getTypescriptOutdir } from './getTypescriptOutdir';\n\ntype BuldPackageJson_F = Fn<[], { packageJson: object; outDir: string }>;\n\nexport const buildPackageJson: BuldPackageJson_F = () => {\n const file = editJsonFile('./package.json');\n const outDir = getTypescriptOutdir();\n const lib = `${outDir}/`;\n const replaceLib = (str: string) => str.replace(lib, '');\n\n // #region Set export values\n EXPORT_KEYS.forEach(key => {\n const value = file.get(key);\n if (value) {\n const transformed = replaceLib(value);\n file.set(key, transformed);\n }\n });\n // #endregion\n\n // #region Set Export key\n const valueExports = file.get(EXPORT_KEY);\n\n if (valueExports) {\n const transformedExports = Object.entries(valueExports).reduce(\n (acc, [key, value]) => {\n const entries = Object.entries(value as any);\n const _value = entries.reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value as any);\n return acc;\n }, {} as any);\n acc[key] = key.includes('package.json') ? value : _value;\n return acc;\n },\n {} as any,\n );\n\n file.set(EXPORT_KEY, transformedExports);\n }\n // #endregion\n\n // #region Set bin\n const bin1 = file.get(BIN_KEY) as\n | Record<string, string>\n | undefined\n | string;\n\n if (bin1) {\n if (typeof bin1 === 'string') {\n const bin2 = replaceLib(bin1);\n file.set(BIN_KEY, bin2);\n } else {\n const bin2 = Object.entries(bin1).reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value);\n return acc;\n }, {} as any);\n\n const bin3 = sortKeys(bin2);\n file.set(BIN_KEY, bin3);\n }\n }\n // #endregion\n\n // #region Unset some props\n file.unset('files');\n file.unset('scripts');\n file.unset('devDependencies');\n // #endregion\n\n const packageJson = file.get();\n return { packageJson, outDir };\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,yBAA4C;CACvD,MAAM,QAAA,GAAA,eAAA,SAAoB,iBAAiB;CAC3C,MAAM,SAASA,wCAAAA,qBAAqB;CACpC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,GAAG;AAGxD,+BAAA,YAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,IAAI;AAC3B,MAAI,OAAO;GACT,MAAM,cAAc,WAAW,MAAM;AACrC,QAAK,IAAI,KAAK,YAAY;;GAE5B;CAIF,MAAM,eAAe,KAAK,IAAIC,8BAAAA,WAAW;AAEzC,KAAI,cAAc;EAChB,MAAM,qBAAqB,OAAO,QAAQ,aAAa,CAAC,QACrD,KAAK,CAAC,KAAK,WAAW;GAErB,MAAM,SADU,OAAO,QAAQ,MACT,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AACnD,QAAI,OAAO,WAAW,MAAa;AACnC,WAAO;MACN,EAAE,CAAQ;AACb,OAAI,OAAO,IAAI,SAAS,eAAe,GAAG,QAAQ;AAClD,UAAO;KAET,EAAE,CACH;AAED,OAAK,IAAIA,8BAAAA,YAAY,mBAAmB;;CAK1C,MAAM,OAAO,KAAK,IAAA,MAAY;AAK9B,KAAI,KACF,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,KAAK;AAC7B,OAAK,IAAA,OAAa,KAAK;QAClB;EAML,MAAM,QAAA,GAAA,UAAA,SALO,OAAO,QAAQ,KAAK,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AAC9D,OAAI,OAAO,WAAW,MAAM;AAC5B,UAAO;KACN,EAAE,CAEqB,CAAC;AAC3B,OAAK,IAAA,OAAa,KAAK;;AAM3B,MAAK,MAAM,QAAQ;AACnB,MAAK,MAAM,UAAU;AACrB,MAAK,MAAM,kBAAkB;AAI7B,QAAO;EAAE,aADW,KAAK,KACL;EAAE;EAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildPackageJson.js","names":[],"sources":["../../src/build-tests/buildPackageJson.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile from 'edit-json-file';\nimport sortKeys from 'sort-keys';\nimport { BIN_KEY, EXPORT_KEY, EXPORT_KEYS } from './constants';\nimport { getTypescriptOutdir } from './getTypescriptOutdir';\n\ntype BuldPackageJson_F = Fn<[], { packageJson: object; outDir: string }>;\n\nexport const buildPackageJson: BuldPackageJson_F = () => {\n const file = editJsonFile('./package.json');\n const outDir = getTypescriptOutdir();\n const lib = `${outDir}/`;\n const replaceLib = (str: string) => str.replace(lib, '');\n\n // #region Set export values\n EXPORT_KEYS.forEach(key => {\n const value = file.get(key);\n if (value) {\n const transformed = replaceLib(value);\n file.set(key, transformed);\n }\n });\n // #endregion\n\n // #region Set Export key\n const valueExports = file.get(EXPORT_KEY);\n\n if (valueExports) {\n const transformedExports = Object.entries(valueExports).reduce(\n (acc, [key, value]) => {\n const entries = Object.entries(value as any);\n const _value = entries.reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value as any);\n return acc;\n }, {} as any);\n acc[key] = key.includes('package.json') ? value : _value;\n return acc;\n },\n {} as any,\n );\n\n file.set(EXPORT_KEY, transformedExports);\n }\n // #endregion\n\n // #region Set bin\n const bin1 = file.get(BIN_KEY) as\n | Record<string, string>\n | undefined\n | string;\n\n if (bin1) {\n if (typeof bin1 === 'string') {\n const bin2 = replaceLib(bin1);\n file.set(BIN_KEY, bin2);\n } else {\n const bin2 = Object.entries(bin1).reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value);\n return acc;\n }, {} as any);\n\n const bin3 = sortKeys(bin2);\n file.set(BIN_KEY, bin3);\n }\n }\n // #endregion\n\n // #region Unset some props\n file.unset('files');\n file.unset('scripts');\n file.unset('devDependencies');\n // #endregion\n\n const packageJson = file.get();\n return { packageJson, outDir };\n};\n"],"mappings":";;;;;AAQA,MAAa,yBAA4C;CACvD,MAAM,OAAO,aAAa,gBAAgB;CAC1C,MAAM,SAAS,oBAAoB;CACnC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,EAAE;CAGvD,YAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,GAAG;EAC1B,IAAI,OAAO;GACT,MAAM,cAAc,WAAW,KAAK;GACpC,KAAK,IAAI,KAAK,WAAW;EAC3B;CACF,CAAC;CAID,MAAM,eAAe,KAAK,IAAI,UAAU;CAExC,IAAI,cAAc;EAChB,MAAM,qBAAqB,OAAO,QAAQ,YAAY,CAAC,CAAC,QACrD,KAAK,CAAC,KAAK,WAAW;GAErB,MAAM,SADU,OAAO,QAAQ,KACV,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;IACnD,IAAI,OAAO,WAAW,KAAY;IAClC,OAAO;GACT,GAAG,CAAC,CAAQ;GACZ,IAAI,OAAO,IAAI,SAAS,cAAc,IAAI,QAAQ;GAClD,OAAO;EACT,GACA,CAAC,CACH;EAEA,KAAK,IAAI,YAAY,kBAAkB;CACzC;CAIA,MAAM,OAAO,KAAK,IAAA,KAAW;CAK7B,IAAI,MACF,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,IAAI;EAC5B,KAAK,IAAA,OAAa,IAAI;CACxB,OAAO;EAML,MAAM,OAAO,SALA,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;GAC9D,IAAI,OAAO,WAAW,KAAK;GAC3B,OAAO;EACT,GAAG,CAAC,CAEqB,CAAC;EAC1B,KAAK,IAAA,OAAa,IAAI;CACxB;CAKF,KAAK,MAAM,OAAO;CAClB,KAAK,MAAM,SAAS;CACpB,KAAK,MAAM,iBAAiB;CAI5B,OAAO;EAAE,aADW,KAAK,IACN;EAAG;CAAO;AAC/B"}
1
+ {"version":3,"file":"buildPackageJson.js","names":[],"sources":["../../src/build-tests/buildPackageJson.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile from 'edit-json-file';\nimport sortKeys from 'sort-keys';\nimport { BIN_KEY, EXPORT_KEY, EXPORT_KEYS } from './constants';\nimport { getTypescriptOutdir } from './getTypescriptOutdir';\n\ntype BuldPackageJson_F = Fn<[], { packageJson: object; outDir: string }>;\n\nexport const buildPackageJson: BuldPackageJson_F = () => {\n const file = editJsonFile('./package.json');\n const outDir = getTypescriptOutdir();\n const lib = `${outDir}/`;\n const replaceLib = (str: string) => str.replace(lib, '');\n\n // #region Set export values\n EXPORT_KEYS.forEach(key => {\n const value = file.get(key);\n if (value) {\n const transformed = replaceLib(value);\n file.set(key, transformed);\n }\n });\n // #endregion\n\n // #region Set Export key\n const valueExports = file.get(EXPORT_KEY);\n\n if (valueExports) {\n const transformedExports = Object.entries(valueExports).reduce(\n (acc, [key, value]) => {\n const entries = Object.entries(value as any);\n const _value = entries.reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value as any);\n return acc;\n }, {} as any);\n acc[key] = key.includes('package.json') ? value : _value;\n return acc;\n },\n {} as any,\n );\n\n file.set(EXPORT_KEY, transformedExports);\n }\n // #endregion\n\n // #region Set bin\n const bin1 = file.get(BIN_KEY) as\n | Record<string, string>\n | undefined\n | string;\n\n if (bin1) {\n if (typeof bin1 === 'string') {\n const bin2 = replaceLib(bin1);\n file.set(BIN_KEY, bin2);\n } else {\n const bin2 = Object.entries(bin1).reduce((acc, [key, value]) => {\n acc[key] = replaceLib(value);\n return acc;\n }, {} as any);\n\n const bin3 = sortKeys(bin2);\n file.set(BIN_KEY, bin3);\n }\n }\n // #endregion\n\n // #region Unset some props\n file.unset('files');\n file.unset('scripts');\n file.unset('devDependencies');\n // #endregion\n\n const packageJson = file.get();\n return { packageJson, outDir };\n};\n"],"mappings":";;;;;AAQA,MAAa,yBAA4C;CACvD,MAAM,OAAO,aAAa,iBAAiB;CAC3C,MAAM,SAAS,qBAAqB;CACpC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,GAAG;AAGxD,aAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,IAAI;AAC3B,MAAI,OAAO;GACT,MAAM,cAAc,WAAW,MAAM;AACrC,QAAK,IAAI,KAAK,YAAY;;GAE5B;CAIF,MAAM,eAAe,KAAK,IAAI,WAAW;AAEzC,KAAI,cAAc;EAChB,MAAM,qBAAqB,OAAO,QAAQ,aAAa,CAAC,QACrD,KAAK,CAAC,KAAK,WAAW;GAErB,MAAM,SADU,OAAO,QAAQ,MACT,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AACnD,QAAI,OAAO,WAAW,MAAa;AACnC,WAAO;MACN,EAAE,CAAQ;AACb,OAAI,OAAO,IAAI,SAAS,eAAe,GAAG,QAAQ;AAClD,UAAO;KAET,EAAE,CACH;AAED,OAAK,IAAI,YAAY,mBAAmB;;CAK1C,MAAM,OAAO,KAAK,IAAA,MAAY;AAK9B,KAAI,KACF,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,KAAK;AAC7B,OAAK,IAAA,OAAa,KAAK;QAClB;EAML,MAAM,OAAO,SALA,OAAO,QAAQ,KAAK,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AAC9D,OAAI,OAAO,WAAW,MAAM;AAC5B,UAAO;KACN,EAAE,CAEqB,CAAC;AAC3B,OAAK,IAAA,OAAa,KAAK;;AAM3B,MAAK,MAAM,QAAQ;AACnB,MAAK,MAAM,UAAU;AACrB,MAAK,MAAM,kBAAkB;AAI7B,QAAO;EAAE,aADW,KAAK,KACL;EAAE;EAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup.cjs","names":["TEARDOWN_COMMAND"],"sources":["../../src/build-tests/cleanup.ts"],"sourcesContent":["import sh from 'shelljs';\nimport { TEARDOWN_COMMAND } from './constants';\n\nexport const cleanup = () => {\n sh.rm('-Rf', '.pack');\n sh.exec(TEARDOWN_COMMAND);\n console.log('Cleanup done');\n};\n"],"mappings":";;;;;;AAGA,MAAa,gBAAgB;CAC3B,QAAA,QAAG,GAAG,OAAO,OAAO;CACpB,QAAA,QAAG,KAAKA,8BAAAA,gBAAgB;CACxB,QAAQ,IAAI,cAAc;AAC5B"}
1
+ {"version":3,"file":"cleanup.cjs","names":["TEARDOWN_COMMAND"],"sources":["../../src/build-tests/cleanup.ts"],"sourcesContent":["import sh from 'shelljs';\nimport { TEARDOWN_COMMAND } from './constants';\n\nexport const cleanup = () => {\n sh.rm('-Rf', '.pack');\n sh.exec(TEARDOWN_COMMAND);\n console.log('Cleanup done');\n};\n"],"mappings":";;;;;;AAGA,MAAa,gBAAgB;AAC3B,SAAA,QAAG,GAAG,OAAO,QAAQ;AACrB,SAAA,QAAG,KAAKA,8BAAAA,iBAAiB;AACzB,SAAQ,IAAI,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup.js","names":[],"sources":["../../src/build-tests/cleanup.ts"],"sourcesContent":["import sh from 'shelljs';\nimport { TEARDOWN_COMMAND } from './constants';\n\nexport const cleanup = () => {\n sh.rm('-Rf', '.pack');\n sh.exec(TEARDOWN_COMMAND);\n console.log('Cleanup done');\n};\n"],"mappings":";;;AAGA,MAAa,gBAAgB;CAC3B,GAAG,GAAG,OAAO,OAAO;CACpB,GAAG,KAAK,gBAAgB;CACxB,QAAQ,IAAI,cAAc;AAC5B"}
1
+ {"version":3,"file":"cleanup.js","names":[],"sources":["../../src/build-tests/cleanup.ts"],"sourcesContent":["import sh from 'shelljs';\nimport { TEARDOWN_COMMAND } from './constants';\n\nexport const cleanup = () => {\n sh.rm('-Rf', '.pack');\n sh.exec(TEARDOWN_COMMAND);\n console.log('Cleanup done');\n};\n"],"mappings":";;;AAGA,MAAa,gBAAgB;AAC3B,IAAG,GAAG,OAAO,QAAQ;AACrB,IAAG,KAAK,iBAAiB;AACzB,SAAQ,IAAI,eAAe"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_cli_test = require("./test.cjs");
3
4
  const require_build_tests_cli_pre = require("./pre.cjs");
4
5
  const require_build_tests_cli_post = require("./post.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"cli.cjs","names":[],"sources":["../../../src/build-tests/cli/cli.ts"],"sourcesContent":["import { subcommands } from 'cmd-ts';\nimport { posttest } from './post';\nimport { pretest } from './pre';\nimport { test } from './test';\n\nexport const BIN = 'build-tests';\n\nexport const cli = subcommands({\n name: BIN,\n cmds: { posttest, pretest, test },\n description: 'Use it to build your package and testing the results',\n version: '0.1.0',\n});\n"],"mappings":";;;;;;AAKA,MAAa,MAAM;AAEnB,MAAa,OAAA,GAAA,OAAA,YAAA,CAAkB;CAC7B,MAAM;CACN,MAAM;EAAE,UAAA,6BAAA;EAAU,SAAA,4BAAA;EAAS,MAAA,6BAAA;CAAK;CAChC,aAAa;CACb,SAAS;AACX,CAAC"}
1
+ {"version":3,"file":"cli.cjs","names":[],"sources":["../../../src/build-tests/cli/cli.ts"],"sourcesContent":["import { subcommands } from 'cmd-ts';\nimport { posttest } from './post';\nimport { pretest } from './pre';\nimport { test } from './test';\n\nexport const BIN = 'build-tests';\n\nexport const cli = subcommands({\n name: BIN,\n cmds: { posttest, pretest, test },\n description: 'Use it to build your package and testing the results',\n version: '0.1.0',\n});\n"],"mappings":";;;;;;;AAKA,MAAa,MAAM;AAEnB,MAAa,OAAA,GAAA,OAAA,aAAkB;CAC7B,MAAM;CACN,MAAM;EAAE,UAAA,6BAAA;EAAU,SAAA,4BAAA;EAAS,MAAA,6BAAA;EAAM;CACjC,aAAa;CACb,SAAS;CACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../../../src/build-tests/cli/cli.ts"],"sourcesContent":["import { subcommands } from 'cmd-ts';\nimport { posttest } from './post';\nimport { pretest } from './pre';\nimport { test } from './test';\n\nexport const BIN = 'build-tests';\n\nexport const cli = subcommands({\n name: BIN,\n cmds: { posttest, pretest, test },\n description: 'Use it to build your package and testing the results',\n version: '0.1.0',\n});\n"],"mappings":";;;;;AAKA,MAAa,MAAM;AAEnB,MAAa,MAAM,YAAY;CAC7B,MAAM;CACN,MAAM;EAAE;EAAU;EAAS;CAAK;CAChC,aAAa;CACb,SAAS;AACX,CAAC"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../../../src/build-tests/cli/cli.ts"],"sourcesContent":["import { subcommands } from 'cmd-ts';\nimport { posttest } from './post';\nimport { pretest } from './pre';\nimport { test } from './test';\n\nexport const BIN = 'build-tests';\n\nexport const cli = subcommands({\n name: BIN,\n cmds: { posttest, pretest, test },\n description: 'Use it to build your package and testing the results',\n version: '0.1.0',\n});\n"],"mappings":";;;;;AAKA,MAAa,MAAM;AAEnB,MAAa,MAAM,YAAY;CAC7B,MAAM;CACN,MAAM;EAAE;EAAU;EAAS;EAAM;CACjC,aAAa;CACb,SAAS;CACV,CAAC"}
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_cli_cli = require("./cli.cjs");
3
4
  //#region src/build-tests/cli/index.ts
4
5
  (0, require("cmd-ts").run)(require_build_tests_cli_cli.cli, process.argv.slice(2));
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cli"],"sources":["../../../src/build-tests/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { run } from 'cmd-ts';\nimport { cli } from './cli';\n\nrun(cli, process.argv.slice(2));\n"],"mappings":";;;2BAKIA,4BAAAA,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"index.cjs","names":["cli"],"sources":["../../../src/build-tests/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { run } from 'cmd-ts';\nimport { cli } from './cli';\n\nrun(cli, process.argv.slice(2));\n"],"mappings":";;;;2BAKIA,4BAAAA,KAAK,QAAQ,KAAK,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/build-tests/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { run } from 'cmd-ts';\nimport { cli } from './cli';\n\nrun(cli, process.argv.slice(2));\n"],"mappings":";;;;AAKA,IAAI,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/build-tests/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { run } from 'cmd-ts';\nimport { cli } from './cli';\n\nrun(cli, process.argv.slice(2));\n"],"mappings":";;;;AAKA,IAAI,KAAK,QAAQ,KAAK,MAAM,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_cleanup = require("../cleanup.cjs");
3
4
  //#region src/build-tests/cli/post.ts
4
5
  const posttest = (0, require("cmd-ts").command)({
@@ -1 +1 @@
1
- {"version":3,"file":"post.cjs","names":["cleanup"],"sources":["../../../src/build-tests/cli/post.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { cleanup } from '../cleanup';\n\nexport const posttest = command({\n name: 'posttest',\n aliases: ['post:test', 'post', 'post-test'],\n args: {},\n handler: cleanup,\n});\n"],"mappings":";;;AAGA,MAAa,YAAA,mBAAA,CAAA,CAAA,QAAA,CAAmB;CAC9B,MAAM;CACN,SAAS;EAAC;EAAa;EAAQ;CAAW;CAC1C,MAAM,CAAC;CACP,SAASA,4BAAAA;AACX,CAAC"}
1
+ {"version":3,"file":"post.cjs","names":["cleanup"],"sources":["../../../src/build-tests/cli/post.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { cleanup } from '../cleanup';\n\nexport const posttest = command({\n name: 'posttest',\n aliases: ['post:test', 'post', 'post-test'],\n args: {},\n handler: cleanup,\n});\n"],"mappings":";;;;AAGA,MAAa,YAAA,oBAAA,CAAA,SAAmB;CAC9B,MAAM;CACN,SAAS;EAAC;EAAa;EAAQ;EAAY;CAC3C,MAAM,EAAE;CACR,SAASA,4BAAAA;CACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"post.js","names":[],"sources":["../../../src/build-tests/cli/post.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { cleanup } from '../cleanup';\n\nexport const posttest = command({\n name: 'posttest',\n aliases: ['post:test', 'post', 'post-test'],\n args: {},\n handler: cleanup,\n});\n"],"mappings":";;;AAGA,MAAa,WAAW,QAAQ;CAC9B,MAAM;CACN,SAAS;EAAC;EAAa;EAAQ;CAAW;CAC1C,MAAM,CAAC;CACP,SAAS;AACX,CAAC"}
1
+ {"version":3,"file":"post.js","names":[],"sources":["../../../src/build-tests/cli/post.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { cleanup } from '../cleanup';\n\nexport const posttest = command({\n name: 'posttest',\n aliases: ['post:test', 'post', 'post-test'],\n args: {},\n handler: cleanup,\n});\n"],"mappings":";;;AAGA,MAAa,WAAW,QAAQ;CAC9B,MAAM;CACN,SAAS;EAAC;EAAa;EAAQ;EAAY;CAC3C,MAAM,EAAE;CACR,SAAS;CACV,CAAC"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_addTarball = require("../addTarball.cjs");
3
4
  //#region src/build-tests/cli/pre.ts
4
5
  const pretest = (0, require("cmd-ts").command)({
@@ -1 +1 @@
1
- {"version":3,"file":"pre.cjs","names":["addTarball"],"sources":["../../../src/build-tests/cli/pre.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { addTarball } from '../addTarball';\n\nexport const pretest = command({\n name: 'pretest',\n aliases: ['pre:test', 'pre', 'pre-test'],\n args: {},\n handler: addTarball,\n});\n"],"mappings":";;;AAGA,MAAa,WAAA,mBAAA,CAAA,CAAA,QAAA,CAAkB;CAC7B,MAAM;CACN,SAAS;EAAC;EAAY;EAAO;CAAU;CACvC,MAAM,CAAC;CACP,SAASA,+BAAAA;AACX,CAAC"}
1
+ {"version":3,"file":"pre.cjs","names":["addTarball"],"sources":["../../../src/build-tests/cli/pre.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { addTarball } from '../addTarball';\n\nexport const pretest = command({\n name: 'pretest',\n aliases: ['pre:test', 'pre', 'pre-test'],\n args: {},\n handler: addTarball,\n});\n"],"mappings":";;;;AAGA,MAAa,WAAA,oBAAA,CAAA,SAAkB;CAC7B,MAAM;CACN,SAAS;EAAC;EAAY;EAAO;EAAW;CACxC,MAAM,EAAE;CACR,SAASA,+BAAAA;CACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pre.js","names":[],"sources":["../../../src/build-tests/cli/pre.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { addTarball } from '../addTarball';\n\nexport const pretest = command({\n name: 'pretest',\n aliases: ['pre:test', 'pre', 'pre-test'],\n args: {},\n handler: addTarball,\n});\n"],"mappings":";;;AAGA,MAAa,UAAU,QAAQ;CAC7B,MAAM;CACN,SAAS;EAAC;EAAY;EAAO;CAAU;CACvC,MAAM,CAAC;CACP,SAAS;AACX,CAAC"}
1
+ {"version":3,"file":"pre.js","names":[],"sources":["../../../src/build-tests/cli/pre.ts"],"sourcesContent":["import { command } from 'cmd-ts';\nimport { addTarball } from '../addTarball';\n\nexport const pretest = command({\n name: 'pretest',\n aliases: ['pre:test', 'pre', 'pre-test'],\n args: {},\n handler: addTarball,\n});\n"],"mappings":";;;AAGA,MAAa,UAAU,QAAQ;CAC7B,MAAM;CACN,SAAS;EAAC;EAAY;EAAO;EAAW;CACxC,MAAM,EAAE;CACR,SAAS;CACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"test.cjs","names":["addTarball","sh"],"sources":["../../../src/build-tests/cli/test.ts"],"sourcesContent":["import { command, flag } from 'cmd-ts';\nimport sh from 'shelljs';\nimport { addTarball } from '../addTarball';\nimport { cleanup } from '../cleanup';\n\nexport const test = command({\n name: 'test',\n\n args: {\n pretest: flag({\n description: 'The hook pretest',\n short: 'b',\n long: 'pretest',\n }),\n\n posttest: flag({\n description: 'The hook posttest',\n short: 'a',\n long: 'posttest',\n }),\n\n pre: flag({\n description: 'The hook pretest',\n long: 'pre',\n }),\n\n post: flag({\n description: 'The hook posttest',\n long: 'post',\n }),\n },\n\n // Ignores coverage because of recursivity\n /* v8 ignore next 11 */\n handler: async ({ pretest, posttest, pre, post }) => {\n if (pretest || pre) await addTarball();\n\n // #region Test\n const { stderr } = sh.exec('pnpm run test');\n if (!!stderr && stderr.trim() !== '') console.warn(stderr);\n // #endregion\n\n if (posttest || post) cleanup();\n },\n});\n"],"mappings":";;;;;;;;AAKA,MAAa,QAAA,GAAA,OAAA,QAAA,CAAe;CAC1B,MAAM;CAEN,MAAM;EACJ,UAAA,GAAA,OAAA,KAAA,CAAc;GACZ,aAAa;GACb,OAAO;GACP,MAAM;EACR,CAAC;EAED,WAAA,GAAA,OAAA,KAAA,CAAe;GACb,aAAa;GACb,OAAO;GACP,MAAM;EACR,CAAC;EAED,MAAA,GAAA,OAAA,KAAA,CAAU;GACR,aAAa;GACb,MAAM;EACR,CAAC;EAED,OAAA,GAAA,OAAA,KAAA,CAAW;GACT,aAAa;GACb,MAAM;EACR,CAAC;CACH;;CAIA,SAAS,OAAO,EAAE,SAAS,UAAU,KAAK,WAAW;EACnD,IAAI,WAAW,KAAK,MAAMA,+BAAAA,WAAW;EAGrC,MAAM,EAAE,WAAWC,QAAAA,QAAG,KAAK,eAAe;EAC1C,IAAI,CAAC,CAAC,UAAU,OAAO,KAAK,MAAM,IAAI,QAAQ,KAAK,MAAM;EAGzD,IAAI,YAAY,MAAM,4BAAA,QAAQ;CAChC;AACF,CAAC"}
1
+ {"version":3,"file":"test.cjs","names":["addTarball","sh"],"sources":["../../../src/build-tests/cli/test.ts"],"sourcesContent":["import { command, flag } from 'cmd-ts';\nimport sh from 'shelljs';\nimport { addTarball } from '../addTarball';\nimport { cleanup } from '../cleanup';\n\nexport const test = command({\n name: 'test',\n\n args: {\n pretest: flag({\n description: 'The hook pretest',\n short: 'b',\n long: 'pretest',\n }),\n\n posttest: flag({\n description: 'The hook posttest',\n short: 'a',\n long: 'posttest',\n }),\n\n pre: flag({\n description: 'The hook pretest',\n long: 'pre',\n }),\n\n post: flag({\n description: 'The hook posttest',\n long: 'post',\n }),\n },\n\n // Ignores coverage because of recursivity\n /* v8 ignore next 11 */\n handler: async ({ pretest, posttest, pre, post }) => {\n if (pretest || pre) await addTarball();\n\n // #region Test\n const { stderr } = sh.exec('pnpm run test');\n if (!!stderr && stderr.trim() !== '') console.warn(stderr);\n // #endregion\n\n if (posttest || post) cleanup();\n },\n});\n"],"mappings":";;;;;;;;AAKA,MAAa,QAAA,GAAA,OAAA,SAAe;CAC1B,MAAM;CAEN,MAAM;EACJ,UAAA,GAAA,OAAA,MAAc;GACZ,aAAa;GACb,OAAO;GACP,MAAM;GACP,CAAC;EAEF,WAAA,GAAA,OAAA,MAAe;GACb,aAAa;GACb,OAAO;GACP,MAAM;GACP,CAAC;EAEF,MAAA,GAAA,OAAA,MAAU;GACR,aAAa;GACb,MAAM;GACP,CAAC;EAEF,OAAA,GAAA,OAAA,MAAW;GACT,aAAa;GACb,MAAM;GACP,CAAC;EACH;;CAID,SAAS,OAAO,EAAE,SAAS,UAAU,KAAK,WAAW;AACnD,MAAI,WAAW,IAAK,OAAMA,+BAAAA,YAAY;EAGtC,MAAM,EAAE,WAAWC,QAAAA,QAAG,KAAK,gBAAgB;AAC3C,MAAI,CAAC,CAAC,UAAU,OAAO,MAAM,KAAK,GAAI,SAAQ,KAAK,OAAO;AAG1D,MAAI,YAAY,KAAM,6BAAA,SAAS;;CAElC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"test.js","names":[],"sources":["../../../src/build-tests/cli/test.ts"],"sourcesContent":["import { command, flag } from 'cmd-ts';\nimport sh from 'shelljs';\nimport { addTarball } from '../addTarball';\nimport { cleanup } from '../cleanup';\n\nexport const test = command({\n name: 'test',\n\n args: {\n pretest: flag({\n description: 'The hook pretest',\n short: 'b',\n long: 'pretest',\n }),\n\n posttest: flag({\n description: 'The hook posttest',\n short: 'a',\n long: 'posttest',\n }),\n\n pre: flag({\n description: 'The hook pretest',\n long: 'pre',\n }),\n\n post: flag({\n description: 'The hook posttest',\n long: 'post',\n }),\n },\n\n // Ignores coverage because of recursivity\n /* v8 ignore next 11 */\n handler: async ({ pretest, posttest, pre, post }) => {\n if (pretest || pre) await addTarball();\n\n // #region Test\n const { stderr } = sh.exec('pnpm run test');\n if (!!stderr && stderr.trim() !== '') console.warn(stderr);\n // #endregion\n\n if (posttest || post) cleanup();\n },\n});\n"],"mappings":";;;;;AAKA,MAAa,OAAO,QAAQ;CAC1B,MAAM;CAEN,MAAM;EACJ,SAAS,KAAK;GACZ,aAAa;GACb,OAAO;GACP,MAAM;EACR,CAAC;EAED,UAAU,KAAK;GACb,aAAa;GACb,OAAO;GACP,MAAM;EACR,CAAC;EAED,KAAK,KAAK;GACR,aAAa;GACb,MAAM;EACR,CAAC;EAED,MAAM,KAAK;GACT,aAAa;GACb,MAAM;EACR,CAAC;CACH;;CAIA,SAAS,OAAO,EAAE,SAAS,UAAU,KAAK,WAAW;EACnD,IAAI,WAAW,KAAK,MAAM,WAAW;EAGrC,MAAM,EAAE,WAAW,GAAG,KAAK,eAAe;EAC1C,IAAI,CAAC,CAAC,UAAU,OAAO,KAAK,MAAM,IAAI,QAAQ,KAAK,MAAM;EAGzD,IAAI,YAAY,MAAM,QAAQ;CAChC;AACF,CAAC"}
1
+ {"version":3,"file":"test.js","names":[],"sources":["../../../src/build-tests/cli/test.ts"],"sourcesContent":["import { command, flag } from 'cmd-ts';\nimport sh from 'shelljs';\nimport { addTarball } from '../addTarball';\nimport { cleanup } from '../cleanup';\n\nexport const test = command({\n name: 'test',\n\n args: {\n pretest: flag({\n description: 'The hook pretest',\n short: 'b',\n long: 'pretest',\n }),\n\n posttest: flag({\n description: 'The hook posttest',\n short: 'a',\n long: 'posttest',\n }),\n\n pre: flag({\n description: 'The hook pretest',\n long: 'pre',\n }),\n\n post: flag({\n description: 'The hook posttest',\n long: 'post',\n }),\n },\n\n // Ignores coverage because of recursivity\n /* v8 ignore next 11 */\n handler: async ({ pretest, posttest, pre, post }) => {\n if (pretest || pre) await addTarball();\n\n // #region Test\n const { stderr } = sh.exec('pnpm run test');\n if (!!stderr && stderr.trim() !== '') console.warn(stderr);\n // #endregion\n\n if (posttest || post) cleanup();\n },\n});\n"],"mappings":";;;;;AAKA,MAAa,OAAO,QAAQ;CAC1B,MAAM;CAEN,MAAM;EACJ,SAAS,KAAK;GACZ,aAAa;GACb,OAAO;GACP,MAAM;GACP,CAAC;EAEF,UAAU,KAAK;GACb,aAAa;GACb,OAAO;GACP,MAAM;GACP,CAAC;EAEF,KAAK,KAAK;GACR,aAAa;GACb,MAAM;GACP,CAAC;EAEF,MAAM,KAAK;GACT,aAAa;GACb,MAAM;GACP,CAAC;EACH;;CAID,SAAS,OAAO,EAAE,SAAS,UAAU,KAAK,WAAW;AACnD,MAAI,WAAW,IAAK,OAAM,YAAY;EAGtC,MAAM,EAAE,WAAW,GAAG,KAAK,gBAAgB;AAC3C,MAAI,CAAC,CAAC,UAAU,OAAO,MAAM,KAAK,GAAI,SAAQ,KAAK,OAAO;AAG1D,MAAI,YAAY,KAAM,UAAS;;CAElC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;AAAQ;AACvD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
1
+ {"version":3,"file":"constants.cjs","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;AAAQ;AACvD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_constants = require("./constants.cjs");
3
4
  let path = require("path");
4
5
  //#region src/build-tests/getRelativePath.ts
@@ -1 +1 @@
1
- {"version":3,"file":"getRelativePath.cjs","names":["TARBALL_EXTENSION"],"sources":["../../src/build-tests/getRelativePath.ts"],"sourcesContent":["import { relative } from 'node:path';\nimport { TARBALL_EXTENSION } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype GetRelativePath_F = Fn<[string], string>;\n\nexport const getRelativePath0: GetRelativePath_F = result => {\n const split = result.split('\\n');\n const out1 = split.find(val => val.endsWith(TARBALL_EXTENSION));\n const out2 = relative(process.cwd(), out1!);\n\n return out2;\n};\n"],"mappings":";;;;AAMA,MAAa,oBAAsC,WAAU;CAE3D,MAAM,OADQ,OAAO,MAAM,IACV,CAAC,CAAC,MAAK,QAAO,IAAI,SAASA,8BAAAA,iBAAiB,CAAC;CAG9D,QAAA,GAAA,KAAA,SAAA,CAFsB,QAAQ,IAAI,GAAG,IAE3B;AACZ"}
1
+ {"version":3,"file":"getRelativePath.cjs","names":["TARBALL_EXTENSION"],"sources":["../../src/build-tests/getRelativePath.ts"],"sourcesContent":["import { relative } from 'node:path';\nimport { TARBALL_EXTENSION } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype GetRelativePath_F = Fn<[string], string>;\n\nexport const getRelativePath0: GetRelativePath_F = result => {\n const split = result.split('\\n');\n const out1 = split.find(val => val.endsWith(TARBALL_EXTENSION));\n const out2 = relative(process.cwd(), out1!);\n\n return out2;\n};\n"],"mappings":";;;;;AAMA,MAAa,oBAAsC,WAAU;CAE3D,MAAM,OADQ,OAAO,MAAM,KACT,CAAC,MAAK,QAAO,IAAI,SAASA,8BAAAA,kBAAkB,CAAC;AAG/D,SAAA,GAAA,KAAA,UAFsB,QAAQ,KAAK,EAAE,KAE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRelativePath.js","names":[],"sources":["../../src/build-tests/getRelativePath.ts"],"sourcesContent":["import { relative } from 'node:path';\nimport { TARBALL_EXTENSION } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype GetRelativePath_F = Fn<[string], string>;\n\nexport const getRelativePath0: GetRelativePath_F = result => {\n const split = result.split('\\n');\n const out1 = split.find(val => val.endsWith(TARBALL_EXTENSION));\n const out2 = relative(process.cwd(), out1!);\n\n return out2;\n};\n"],"mappings":";;;AAMA,MAAa,oBAAsC,WAAU;CAE3D,MAAM,OADQ,OAAO,MAAM,IACV,CAAC,CAAC,MAAK,QAAO,IAAI,SAAS,iBAAiB,CAAC;CAG9D,OAFa,SAAS,QAAQ,IAAI,GAAG,IAE3B;AACZ"}
1
+ {"version":3,"file":"getRelativePath.js","names":[],"sources":["../../src/build-tests/getRelativePath.ts"],"sourcesContent":["import { relative } from 'node:path';\nimport { TARBALL_EXTENSION } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype GetRelativePath_F = Fn<[string], string>;\n\nexport const getRelativePath0: GetRelativePath_F = result => {\n const split = result.split('\\n');\n const out1 = split.find(val => val.endsWith(TARBALL_EXTENSION));\n const out2 = relative(process.cwd(), out1!);\n\n return out2;\n};\n"],"mappings":";;;AAMA,MAAa,oBAAsC,WAAU;CAE3D,MAAM,OADQ,OAAO,MAAM,KACT,CAAC,MAAK,QAAO,IAAI,SAAS,kBAAkB,CAAC;AAG/D,QAFa,SAAS,QAAQ,KAAK,EAAE,KAE1B"}
@@ -1,12 +1,20 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  const require_build_tests_constants = require("./constants.cjs");
4
+ let path = require("path");
5
+ path = require_runtime.__toESM(path, 1);
4
6
  let edit_json_file = require("edit-json-file");
5
7
  edit_json_file = require_runtime.__toESM(edit_json_file, 1);
8
+ let url = require("url");
6
9
  //#region src/build-tests/getTypescriptOutdir.ts
7
10
  const getTypescriptOutdir = () => {
8
- const outDir1 = (0, edit_json_file.default)(require_build_tests_constants.TS_PATH).get(require_build_tests_constants.PATH_OUT_DIR);
9
- return outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
11
+ const __dirname = path.default.dirname((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
12
+ let file = (0, edit_json_file.default)(path.default.resolve(__dirname, "../../", require_build_tests_constants.TS_PATH));
13
+ const outDir1 = file.get(require_build_tests_constants.PATH_OUT_DIR);
14
+ /* v8 ignore next 3 */
15
+ const outDir2 = outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
16
+ file = void 0;
17
+ return outDir2;
10
18
  };
11
19
  //#endregion
12
20
  exports.getTypescriptOutdir = getTypescriptOutdir;
@@ -1 +1 @@
1
- {"version":3,"file":"getTypescriptOutdir.cjs","names":["TS_PATH","PATH_OUT_DIR"],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport { DOT, PATH_OUT_DIR, TS_PATH } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n const file = editJsonFile(TS_PATH);\n\n const outDir1 = file.get(PATH_OUT_DIR) as string;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n return outDir2;\n};\n"],"mappings":";;;;;;AAMA,MAAa,4BAAiC;CAG5C,MAAM,WAAA,GAAA,eAAA,QAAA,CAFoBA,8BAAAA,OAEP,CAAC,CAAC,IAAIC,8BAAAA,YAAY;CAMrC,OAJgB,QAAQ,WAAA,IAAc,IAClC,QAAQ,QAAA,MAAa,EAAE,IACvB;AAGN"}
1
+ {"version":3,"file":"getTypescriptOutdir.cjs","names":["TS_PATH","PATH_OUT_DIR"],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile, { type JsonEditor } from 'edit-json-file';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\nimport { DOT, PATH_OUT_DIR, TS_PATH } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n let file: JsonEditor | undefined = editJsonFile(\n path.resolve(__dirname, '../../', TS_PATH),\n );\n\n const outDir1 = file.get(PATH_OUT_DIR) as string;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n file = undefined;\n\n return outDir2;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,4BAAiC;CAC5C,MAAM,YAAY,KAAA,QAAK,SAAA,GAAA,IAAA,eAAA,QAAA,MAAA,CAAA,cAAA,WAAA,CAAA,KAAsC,CAAC;CAC9D,IAAI,QAAA,GAAA,eAAA,SACF,KAAA,QAAK,QAAQ,WAAW,UAAUA,8BAAAA,QAAQ,CAC3C;CAED,MAAM,UAAU,KAAK,IAAIC,8BAAAA,aAAa;;CAEtC,MAAM,UAAU,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB;AAEJ,QAAO,KAAA;AAEP,QAAO"}
@@ -1,9 +1,16 @@
1
1
  import { PATH_OUT_DIR, TS_PATH } from "./constants.js";
2
+ import path from "path";
2
3
  import editJsonFile from "edit-json-file";
4
+ import { fileURLToPath } from "url";
3
5
  //#region src/build-tests/getTypescriptOutdir.ts
4
6
  const getTypescriptOutdir = () => {
5
- const outDir1 = editJsonFile(TS_PATH).get(PATH_OUT_DIR);
6
- return outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
7
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
+ let file = editJsonFile(path.resolve(__dirname, "../../", TS_PATH));
9
+ const outDir1 = file.get(PATH_OUT_DIR);
10
+ /* v8 ignore next 3 */
11
+ const outDir2 = outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
12
+ file = void 0;
13
+ return outDir2;
7
14
  };
8
15
  //#endregion
9
16
  export { getTypescriptOutdir };
@@ -1 +1 @@
1
- {"version":3,"file":"getTypescriptOutdir.js","names":[],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport { DOT, PATH_OUT_DIR, TS_PATH } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n const file = editJsonFile(TS_PATH);\n\n const outDir1 = file.get(PATH_OUT_DIR) as string;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n return outDir2;\n};\n"],"mappings":";;;AAMA,MAAa,4BAAiC;CAG5C,MAAM,UAFO,aAAa,OAEP,CAAC,CAAC,IAAI,YAAY;CAMrC,OAJgB,QAAQ,WAAA,IAAc,IAClC,QAAQ,QAAA,MAAa,EAAE,IACvB;AAGN"}
1
+ {"version":3,"file":"getTypescriptOutdir.js","names":[],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile, { type JsonEditor } from 'edit-json-file';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\nimport { DOT, PATH_OUT_DIR, TS_PATH } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n let file: JsonEditor | undefined = editJsonFile(\n path.resolve(__dirname, '../../', TS_PATH),\n );\n\n const outDir1 = file.get(PATH_OUT_DIR) as string;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n file = undefined;\n\n return outDir2;\n};\n"],"mappings":";;;;;AAQA,MAAa,4BAAiC;CAC5C,MAAM,YAAY,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;CAC9D,IAAI,OAA+B,aACjC,KAAK,QAAQ,WAAW,UAAU,QAAQ,CAC3C;CAED,MAAM,UAAU,KAAK,IAAI,aAAa;;CAEtC,MAAM,UAAU,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB;AAEJ,QAAO,KAAA;AAEP,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"import.cjs","names":["identity","THIS1"],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAKA,uBAAAA,eACK;CAIV,OADa,GAAG,OAFF,SAAS,KAAA,OAAKC,8BAAAA,SAAAA,OAAQ,GAAGA,8BAAAA,MAAM,GAAG,QAGtC;AACZ"}
1
+ {"version":3,"file":"import.cjs","names":["identity","THIS1"],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAKA,uBAAAA,eACK;AAIV,QADa,GAAG,OAFF,SAAS,KAAA,OAAKC,8BAAAA,SAAAA,OAAQ,GAAGA,8BAAAA,MAAM,GAAG,SAGrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"import.js","names":[],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAK,eACK;CAIV,OADa,GAAG,OAFF,SAAS,KAAA,OAAK,SAAA,OAAQ,GAAG,MAAM,GAAG,QAGtC;AACZ"}
1
+ {"version":3,"file":"import.js","names":[],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAK,eACK;AAIV,QADa,GAAG,OAFF,SAAS,KAAA,OAAK,SAAA,OAAQ,GAAG,MAAM,GAAG,SAGrC"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_vitest_extended_toStringFlat = require("../../vitest-extended/toStringFlat.cjs");
3
4
  const require_build_tests_imports_helper = require("./helper.cjs");
4
5
  let vitest = require("vitest");
@@ -1 +1 @@
1
- {"version":3,"file":"create.cjs","names":["helperFn","toStringFlat"],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS?: string[];\n SUCCESS: string[];\n};\n\nexport type CreateImportTest_F = (\n args: ImportArgs,\n) => readonly [string, () => void];\n\nexport const createImportFnTests: CreateImportTest_F = args => {\n const path = args.path;\n const invite = `Importing from ${path ?? 'index'}`;\n const testFn = (fn: string) => helperFn({ path, fn });\n\n const fn = () => {\n describe.skipIf(args.SUCCESS.length < 1)(\n '#01 => Functions are inside the module',\n () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.SUCCESS.length);\n };\n\n args.SUCCESS.forEach((fn, index) => {\n test(`#${_index(index)} => should succeed with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n },\n );\n\n if (!args.FAILS || args.FAILS.length < 1) return;\n\n describe('#02 => Functions are not inside the module', () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.FAILS!.length);\n };\n\n args.FAILS!.forEach((fn, index) => {\n test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n });\n };\n\n return [invite, fn] as const;\n};\n"],"mappings":";;;;;AAcA,MAAa,uBAA0C,SAAQ;CAC7D,MAAM,OAAO,KAAK;CAClB,MAAM,SAAS,kBAAkB,QAAQ;CACzC,MAAM,UAAU,OAAeA,mCAAAA,SAAS;EAAE;EAAM;CAAG,CAAC;CAEpD,MAAM,WAAW;EACf,OAAA,SAAS,OAAO,KAAK,QAAQ,SAAS,CAAC,CAAC,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;IAChC,OAAOC,qCAAAA,aAAa,QAAQ,GAAG,KAAK,QAAQ,MAAM;GACpD;GAEA,KAAK,QAAQ,SAAS,IAAI,UAAU;IAClC,CAAA,GAAA,OAAA,KAAA,CAAK,IAAI,OAAO,KAAK,EAAE,mCAAmC,YAAY;KACpE,OAAO,OAAO,EAAE;IAClB,CAAC;GACH,CAAC;EACH,CACF;EAEA,IAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG;EAE1C,CAAA,GAAA,OAAA,SAAA,CAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;IAChC,OAAOA,qCAAAA,aAAa,QAAQ,GAAG,KAAK,MAAO,MAAM;GACnD;GAEA,KAAK,MAAO,SAAS,IAAI,UAAU;IACjC,OAAA,KAAK,MAAM,IAAI,OAAO,KAAK,EAAE,gCAAgC,YAAY;KACvE,OAAO,OAAO,EAAE;IAClB,CAAC;GACH,CAAC;EACH,CAAC;CACH;CAEA,OAAO,CAAC,QAAQ,EAAE;AACpB"}
1
+ {"version":3,"file":"create.cjs","names":["helperFn","toStringFlat"],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS?: string[];\n SUCCESS: string[];\n};\n\nexport type CreateImportTest_F = (\n args: ImportArgs,\n) => readonly [string, () => void];\n\nexport const createImportFnTests: CreateImportTest_F = args => {\n const path = args.path;\n const invite = `Importing from ${path ?? 'index'}`;\n const testFn = (fn: string) => helperFn({ path, fn });\n\n const fn = () => {\n describe.skipIf(args.SUCCESS.length < 1)(\n '#01 => Functions are inside the module',\n () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.SUCCESS.length);\n };\n\n args.SUCCESS.forEach((fn, index) => {\n test(`#${_index(index)} => should succeed with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n },\n );\n\n if (!args.FAILS || args.FAILS.length < 1) return;\n\n describe('#02 => Functions are not inside the module', () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.FAILS!.length);\n };\n\n args.FAILS!.forEach((fn, index) => {\n test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n });\n };\n\n return [invite, fn] as const;\n};\n"],"mappings":";;;;;;AAcA,MAAa,uBAA0C,SAAQ;CAC7D,MAAM,OAAO,KAAK;CAClB,MAAM,SAAS,kBAAkB,QAAQ;CACzC,MAAM,UAAU,OAAeA,mCAAAA,SAAS;EAAE;EAAM;EAAI,CAAC;CAErD,MAAM,WAAW;AACf,SAAA,SAAS,OAAO,KAAK,QAAQ,SAAS,EAAE,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;AAChC,WAAOC,qCAAAA,aAAa,QAAQ,GAAG,KAAK,QAAQ,OAAO;;AAGrD,QAAK,QAAQ,SAAS,IAAI,UAAU;AAClC,KAAA,GAAA,OAAA,MAAK,IAAI,OAAO,MAAM,CAAC,mCAAmC,YAAY;AACpE,YAAO,OAAO,GAAG;MACjB;KACF;IAEL;AAED,MAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,EAAG;AAE1C,GAAA,GAAA,OAAA,UAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;AAChC,WAAOA,qCAAAA,aAAa,QAAQ,GAAG,KAAK,MAAO,OAAO;;AAGpD,QAAK,MAAO,SAAS,IAAI,UAAU;AACjC,WAAA,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,gCAAgC,YAAY;AACvE,YAAO,OAAO,GAAG;MACjB;KACF;IACF;;AAGJ,QAAO,CAAC,QAAQ,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","names":[],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS?: string[];\n SUCCESS: string[];\n};\n\nexport type CreateImportTest_F = (\n args: ImportArgs,\n) => readonly [string, () => void];\n\nexport const createImportFnTests: CreateImportTest_F = args => {\n const path = args.path;\n const invite = `Importing from ${path ?? 'index'}`;\n const testFn = (fn: string) => helperFn({ path, fn });\n\n const fn = () => {\n describe.skipIf(args.SUCCESS.length < 1)(\n '#01 => Functions are inside the module',\n () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.SUCCESS.length);\n };\n\n args.SUCCESS.forEach((fn, index) => {\n test(`#${_index(index)} => should succeed with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n },\n );\n\n if (!args.FAILS || args.FAILS.length < 1) return;\n\n describe('#02 => Functions are not inside the module', () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.FAILS!.length);\n };\n\n args.FAILS!.forEach((fn, index) => {\n test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n });\n };\n\n return [invite, fn] as const;\n};\n"],"mappings":";;;;AAcA,MAAa,uBAA0C,SAAQ;CAC7D,MAAM,OAAO,KAAK;CAClB,MAAM,SAAS,kBAAkB,QAAQ;CACzC,MAAM,UAAU,OAAe,SAAS;EAAE;EAAM;CAAG,CAAC;CAEpD,MAAM,WAAW;EACf,SAAS,OAAO,KAAK,QAAQ,SAAS,CAAC,CAAC,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,QAAQ,MAAM;GACpD;GAEA,KAAK,QAAQ,SAAS,IAAI,UAAU;IAClC,KAAK,IAAI,OAAO,KAAK,EAAE,mCAAmC,YAAY;KACpE,OAAO,OAAO,EAAE;IAClB,CAAC;GACH,CAAC;EACH,CACF;EAEA,IAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG;EAE1C,SAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,MAAO,MAAM;GACnD;GAEA,KAAK,MAAO,SAAS,IAAI,UAAU;IACjC,KAAK,MAAM,IAAI,OAAO,KAAK,EAAE,gCAAgC,YAAY;KACvE,OAAO,OAAO,EAAE;IAClB,CAAC;GACH,CAAC;EACH,CAAC;CACH;CAEA,OAAO,CAAC,QAAQ,EAAE;AACpB"}
1
+ {"version":3,"file":"create.js","names":[],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS?: string[];\n SUCCESS: string[];\n};\n\nexport type CreateImportTest_F = (\n args: ImportArgs,\n) => readonly [string, () => void];\n\nexport const createImportFnTests: CreateImportTest_F = args => {\n const path = args.path;\n const invite = `Importing from ${path ?? 'index'}`;\n const testFn = (fn: string) => helperFn({ path, fn });\n\n const fn = () => {\n describe.skipIf(args.SUCCESS.length < 1)(\n '#01 => Functions are inside the module',\n () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.SUCCESS.length);\n };\n\n args.SUCCESS.forEach((fn, index) => {\n test(`#${_index(index)} => should succeed with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n },\n );\n\n if (!args.FAILS || args.FAILS.length < 1) return;\n\n describe('#02 => Functions are not inside the module', () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.FAILS!.length);\n };\n\n args.FAILS!.forEach((fn, index) => {\n test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n });\n };\n\n return [invite, fn] as const;\n};\n"],"mappings":";;;;AAcA,MAAa,uBAA0C,SAAQ;CAC7D,MAAM,OAAO,KAAK;CAClB,MAAM,SAAS,kBAAkB,QAAQ;CACzC,MAAM,UAAU,OAAe,SAAS;EAAE;EAAM;EAAI,CAAC;CAErD,MAAM,WAAW;AACf,WAAS,OAAO,KAAK,QAAQ,SAAS,EAAE,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;AAChC,WAAO,aAAa,QAAQ,GAAG,KAAK,QAAQ,OAAO;;AAGrD,QAAK,QAAQ,SAAS,IAAI,UAAU;AAClC,SAAK,IAAI,OAAO,MAAM,CAAC,mCAAmC,YAAY;AACpE,YAAO,OAAO,GAAG;MACjB;KACF;IAEL;AAED,MAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,EAAG;AAE1C,WAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;AAChC,WAAO,aAAa,QAAQ,GAAG,KAAK,MAAO,OAAO;;AAGpD,QAAK,MAAO,SAAS,IAAI,UAAU;AACjC,SAAK,MAAM,IAAI,OAAO,MAAM,CAAC,gCAAgC,YAAY;AACvE,YAAO,OAAO,GAAG;MACjB;KACF;IACF;;AAGJ,QAAO,CAAC,QAAQ,GAAG"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_build_tests_import = require("../import.cjs");
3
4
  let vitest = require("vitest");
4
5
  //#region src/build-tests/imports/helper.ts
@@ -1 +1 @@
1
- {"version":3,"file":"helper.cjs","names":["customImport"],"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,MAAMA,2BAAAA,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;CAAI,CAAC;CAC1D,CAAA,GAAA,OAAA,OAAA,CAAO,GAAG,CAAC,CAAC,YAAY;CACxB,CAAA,GAAA,OAAA,OAAA,CAAO,GAAG,CAAC,CAAC,WAAW,UAAU;AACnC"}
1
+ {"version":3,"file":"helper.cjs","names":["customImport"],"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,MAAMA,2BAAAA,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;EAAK,CAAC;AAC3D,EAAA,GAAA,OAAA,QAAO,IAAI,CAAC,aAAa;AACzB,EAAA,GAAA,OAAA,QAAO,IAAI,CAAC,WAAW,WAAW"}
@@ -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;CAAI,CAAC;CAC1D,OAAO,GAAG,CAAC,CAAC,YAAY;CACxB,OAAO,GAAG,CAAC,CAAC,WAAW,UAAU;AACnC"}
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 +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,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
+ {"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 +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,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
+ {"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,7 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../_virtual/_rolldown/runtime.cjs");
2
3
  const require_rolldown_config_utils = require("./utils.cjs");
3
- const require_rolldown_config_output = require("./output.cjs");
4
4
  const require_rolldown_config_constants = require("./constants.cjs");
5
+ const require_rolldown_config_output = require("./output.cjs");
5
6
  const require_rolldown_config_input = require("./input.cjs");
6
7
  const require_rolldown_config_plugins_index = require("./plugins/index.cjs");
7
8
  let rolldown = require("rolldown");
@@ -10,7 +11,7 @@ let rolldown_plugins = require("rolldown/plugins");
10
11
  const defineConfig = (additionals) => {
11
12
  return defineConfig.default(additionals);
12
13
  };
13
- const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
14
+ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
14
15
  const include = require_rolldown_config_input.buildInput(...require_rolldown_config_utils.toArray(excludesTS));
15
16
  const exclude = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_rolldown_config_utils.toArray(excludesTS));
16
17
  const unordered = {
@@ -48,7 +49,7 @@ const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = fals
48
49
  return p;
49
50
  }).filter((p) => !!p) : defaultOrdered();
50
51
  };
51
- defineConfig.default = ({ dir = "lib", sourcemap = false, ...rest } = {}) => {
52
+ defineConfig.default = ({ dir, sourcemap = false, ...rest } = {}) => {
52
53
  const input = require_rolldown_config_input.buildInput();
53
54
  const external = rest.externals;
54
55
  const output = require_rolldown_config_output.buildOutput(dir, sourcemap);
@@ -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 {\n DEFAULT_CIRCULAR_DEPS,\n DEFAULT_DIR,\n DEFAULT_EXCLUDE,\n} 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 ignoresJS,\n dir = DEFAULT_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 = DEFAULT_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":";;;;;;;;;AAaA,MAAa,gBAAyB,gBAAe;CACnD,OAAO,aAAa,QAAQ,WAAW;AACzC;AAEA,MAAM,kBAAkB,EACtB,cACA,WACA,MAAA,OACA,YAAY,OACZ,YACA,gBACA,YACU,CAAC,MAAM;CACjB,MAAM,UAAUA,8BAAAA,WAAW,GAAGC,8BAAAA,QAAQ,UAAU,CAAC;CACjD,MAAM,UAAUC,kCAAAA,gBAAgB,OAAOD,8BAAAA,QAAQ,UAAU,CAAC;CAC1D,MAAM,YAAY;EAChB,aAAaE,sCAAAA,gBAAgB,MAAM;EACnC,kBACEA,sCAAAA,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;EACF,CAAC;EACH,iBACEA,sCAAAA,gBAAgB,UAAU,EACxB,SAAS,aACX,CAAC;EACH,iBACEA,sCAAAA,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;EACX,CAAC;EACH,eAAeA,sCAAAA,gBAAgB,QAAQ,EAAE,QAAQ,KAAK,CAAC;EACvD,aACEA,sCAAAA,gBAAgB,MAAM;GACpB;GACA;GACA;EACF,CAAC;CACL;CAEA,MAAM,uBAAuB;EAC3B,UAAU,MAAM;EAChB,UAAU,QAAQ;EAClB,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,MAAA,OACA,YAAY,OACZ,GAAG,SACO,CAAC,MAAM;CACjB,MAAM,QAAQH,8BAAAA,WAAW;CACzB,MAAM,WAAW,KAAK;CACtB,MAAM,SAASI,+BAAAA,YAAY,KAAK,SAAS;CAQzC,QAAA,GAAA,SAAA,aAAA,CAAqB;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;EACL,CAIQ;EACN;EACA;EACA,UAAU;CACZ,CAAC;AACH;AAEA,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAeC,kCAAAA,sBAAsB,OACzCJ,8BAAAA,QAAQ,aAAa,YAAY,CACnC;CACA,MAAM,YAAYA,8BAAAA,QAAQ,aAAa,SAAS,CAAC,CAAC,OAChDI,kCAAAA,qBACF;CAEA,MAAM,aAAaH,kCAAAA,gBAAgB,OACjCD,8BAAAA,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
+ {"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,6 +1,6 @@
1
1
  import { toArray } from "./utils.js";
2
- import { buildOutput } from "./output.js";
3
2
  import { DEFAULT_CIRCULAR_DEPS, DEFAULT_EXCLUDE } from "./constants.js";
3
+ import { buildOutput } from "./output.js";
4
4
  import { buildInput } from "./input.js";
5
5
  import { PLUGIN_BUILDERS } from "./plugins/index.js";
6
6
  import { defineConfig as defineConfig$1 } from "rolldown";
@@ -9,7 +9,7 @@ import { esmExternalRequirePlugin } from "rolldown/plugins";
9
9
  const defineConfig = (additionals) => {
10
10
  return defineConfig.default(additionals);
11
11
  };
12
- const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
12
+ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
13
13
  const include = buildInput(...toArray(excludesTS));
14
14
  const exclude = DEFAULT_EXCLUDE.concat(toArray(excludesTS));
15
15
  const unordered = {
@@ -47,7 +47,7 @@ const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = fals
47
47
  return p;
48
48
  }).filter((p) => !!p) : defaultOrdered();
49
49
  };
50
- defineConfig.default = ({ dir = "lib", sourcemap = false, ...rest } = {}) => {
50
+ defineConfig.default = ({ dir, sourcemap = false, ...rest } = {}) => {
51
51
  const input = buildInput();
52
52
  const external = rest.externals;
53
53
  const output = buildOutput(dir, sourcemap);
@@ -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 {\n DEFAULT_CIRCULAR_DEPS,\n DEFAULT_DIR,\n DEFAULT_EXCLUDE,\n} 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 ignoresJS,\n dir = DEFAULT_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 = DEFAULT_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":";;;;;;;;AAaA,MAAa,gBAAyB,gBAAe;CACnD,OAAO,aAAa,QAAQ,WAAW;AACzC;AAEA,MAAM,kBAAkB,EACtB,cACA,WACA,MAAA,OACA,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,aAAa,gBAAgB,MAAM;EACnC,kBACE,gBAAgB,WAAW;GACzB;GACA;GACA;GACA;EACF,CAAC;EACH,iBACE,gBAAgB,UAAU,EACxB,SAAS,aACX,CAAC;EACH,iBACE,gBAAgB,UAAU;GAExB,SAAS;GACT,gBAAgB;GAChB,SAAS;EACX,CAAC;EACH,eAAe,gBAAgB,QAAQ,EAAE,QAAQ,KAAK,CAAC;EACvD,aACE,gBAAgB,MAAM;GACpB;GACA;GACA;EACF,CAAC;CACL;CAEA,MAAM,uBAAuB;EAC3B,UAAU,MAAM;EAChB,UAAU,QAAQ;EAClB,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,MAAA,OACA,YAAY,OACZ,GAAG,SACO,CAAC,MAAM;CACjB,MAAM,QAAQ,WAAW;CACzB,MAAM,WAAW,KAAK;CACtB,MAAM,SAAS,YAAY,KAAK,SAAS;CAQzC,OAAOA,eAAc;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;EACL,CAIQ;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
+ {"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 +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;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
+ {"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 +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;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
+ {"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,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../_virtual/_rolldown/runtime.cjs");
2
3
  let fs = require("fs");
3
4
  let path = require("path");
4
5
  //#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;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
+ {"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"}