@bemedev/dev-utils 0.7.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 (113) 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/index.js +0 -0
  8. package/lib/build-tests/cli/test.cjs.map +1 -1
  9. package/lib/build-tests/cli/test.js.map +1 -1
  10. package/lib/build-tests/getRelativePath.cjs.map +1 -1
  11. package/lib/build-tests/getRelativePath.js.map +1 -1
  12. package/lib/build-tests/getTypescriptOutdir.cjs +10 -2
  13. package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
  14. package/lib/build-tests/getTypescriptOutdir.js +9 -2
  15. package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
  16. package/lib/build-tests/import.cjs.map +1 -1
  17. package/lib/build-tests/import.js.map +1 -1
  18. package/lib/build-tests/imports/create.cjs.map +1 -1
  19. package/lib/build-tests/imports/create.js.map +1 -1
  20. package/lib/build-tests/imports/helper.cjs.map +1 -1
  21. package/lib/build-tests/imports/helper.js.map +1 -1
  22. package/lib/build-tests/pack.cjs.map +1 -1
  23. package/lib/build-tests/pack.js.map +1 -1
  24. package/lib/rolldown-config/config.cjs +3 -3
  25. package/lib/rolldown-config/config.cjs.map +1 -1
  26. package/lib/rolldown-config/config.js +3 -3
  27. package/lib/rolldown-config/config.js.map +1 -1
  28. package/lib/rolldown-config/helpers.cjs.map +1 -1
  29. package/lib/rolldown-config/helpers.js.map +1 -1
  30. package/lib/rolldown-config/index.d.ts +1 -0
  31. package/lib/rolldown-config/input.cjs.map +1 -1
  32. package/lib/rolldown-config/input.js.map +1 -1
  33. package/lib/rolldown-config/output.cjs +2 -1
  34. package/lib/rolldown-config/output.cjs.map +1 -1
  35. package/lib/rolldown-config/output.d.ts +1 -1
  36. package/lib/rolldown-config/output.js +2 -1
  37. package/lib/rolldown-config/output.js.map +1 -1
  38. package/lib/rolldown-config/plugins/alias.cjs.map +1 -1
  39. package/lib/rolldown-config/plugins/alias.js.map +1 -1
  40. package/lib/rolldown-config/plugins/circulars.cjs.map +1 -1
  41. package/lib/rolldown-config/plugins/circulars.js.map +1 -1
  42. package/lib/rolldown-config/plugins/clean.cjs +10 -4
  43. package/lib/rolldown-config/plugins/clean.cjs.map +1 -1
  44. package/lib/rolldown-config/plugins/clean.d.ts +1 -1
  45. package/lib/rolldown-config/plugins/clean.js +8 -3
  46. package/lib/rolldown-config/plugins/clean.js.map +1 -1
  47. package/lib/rolldown-config/plugins/externals.cjs.map +1 -1
  48. package/lib/rolldown-config/plugins/externals.js.map +1 -1
  49. package/lib/rolldown-config/plugins/index.d.ts +2 -2
  50. package/lib/rolldown-config/plugins/tsPaths.cjs.map +1 -1
  51. package/lib/rolldown-config/plugins/tsPaths.js.map +1 -1
  52. package/lib/rolldown-config/plugins/typescript.cjs +4 -2
  53. package/lib/rolldown-config/plugins/typescript.cjs.map +1 -1
  54. package/lib/rolldown-config/plugins/typescript.config.cjs.map +1 -1
  55. package/lib/rolldown-config/plugins/typescript.config.js.map +1 -1
  56. package/lib/rolldown-config/plugins/typescript.d.ts +1 -1
  57. package/lib/rolldown-config/plugins/typescript.js +4 -2
  58. package/lib/rolldown-config/plugins/typescript.js.map +1 -1
  59. package/lib/rolldown-config/utils.cjs.map +1 -1
  60. package/lib/rolldown-config/utils.js.map +1 -1
  61. package/lib/utils/sleep.cjs.map +1 -1
  62. package/lib/utils/sleep.js.map +1 -1
  63. package/lib/vitest-exclude/vitest.cjs +39 -14
  64. package/lib/vitest-exclude/vitest.cjs.map +1 -1
  65. package/lib/vitest-exclude/vitest.d.ts +4 -3
  66. package/lib/vitest-exclude/vitest.js +39 -14
  67. package/lib/vitest-exclude/vitest.js.map +1 -1
  68. package/lib/vitest-exclude/vitest.utils.cjs +8 -8
  69. package/lib/vitest-exclude/vitest.utils.cjs.map +1 -1
  70. package/lib/vitest-exclude/vitest.utils.d.ts +4 -4
  71. package/lib/vitest-exclude/vitest.utils.js +8 -8
  72. package/lib/vitest-exclude/vitest.utils.js.map +1 -1
  73. package/lib/vitest-extended/acceptation.cjs.map +1 -1
  74. package/lib/vitest-extended/acceptation.js.map +1 -1
  75. package/lib/vitest-extended/createTests.cjs.map +1 -1
  76. package/lib/vitest-extended/createTests.js.map +1 -1
  77. package/lib/vitest-extended/done.cjs.map +1 -1
  78. package/lib/vitest-extended/done.js.map +1 -1
  79. package/lib/vitest-extended/each/error.cjs.map +1 -1
  80. package/lib/vitest-extended/each/error.js.map +1 -1
  81. package/lib/vitest-extended/each/pass.cjs.map +1 -1
  82. package/lib/vitest-extended/each/pass.js.map +1 -1
  83. package/lib/vitest-extended/fakeWaiter.cjs.map +1 -1
  84. package/lib/vitest-extended/fakeWaiter.js.map +1 -1
  85. package/lib/vitest-extended/fixtures/partialCall.cjs.map +1 -1
  86. package/lib/vitest-extended/fixtures/partialCall.js.map +1 -1
  87. package/lib/vitest-extended/fixtures/toUpper.cjs.map +1 -1
  88. package/lib/vitest-extended/fixtures/toUpper.js.map +1 -1
  89. package/lib/vitest-extended/fixtures/zod.cjs.map +1 -1
  90. package/lib/vitest-extended/fixtures/zod.js.map +1 -1
  91. package/lib/vitest-extended/identity.cjs.map +1 -1
  92. package/lib/vitest-extended/identity.js.map +1 -1
  93. package/lib/vitest-extended/index.d.ts +1 -0
  94. package/lib/vitest-extended/isDefined.cjs.map +1 -1
  95. package/lib/vitest-extended/isDefined.d.ts +1 -0
  96. package/lib/vitest-extended/isDefined.js.map +1 -1
  97. package/lib/vitest-extended/isFunction.cjs.map +1 -1
  98. package/lib/vitest-extended/isFunction.js.map +1 -1
  99. package/lib/vitest-extended/toArray.cjs.map +1 -1
  100. package/lib/vitest-extended/toArray.js.map +1 -1
  101. package/lib/vitest-extended/toStringFlat.cjs.map +1 -1
  102. package/lib/vitest-extended/toStringFlat.js.map +1 -1
  103. package/lib/vitest-extended/types.d.ts +1 -1
  104. package/package.json +23 -67
  105. package/README.md +0 -696
  106. package/lib/vitest-alias/index.cjs +0 -4
  107. package/lib/vitest-alias/index.d.ts +0 -1
  108. package/lib/vitest-alias/index.js +0 -2
  109. package/lib/vitest-alias/vitest.cjs +0 -77
  110. package/lib/vitest-alias/vitest.cjs.map +0 -1
  111. package/lib/vitest-alias/vitest.d.ts +0 -38
  112. package/lib/vitest-alias/vitest.js +0 -74
  113. 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,MAAM;CAE5B,QAAA,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;CAC1C,KAAK,IAAIA,8BAAAA,QAAQ,QAAQ;CACzB,KAAK,MAAM"}
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,MAAM;CAE5B,GAAG,KAAK,eAAe,MAAM,GAAG,SAAS;CAGzC,MAAM,OAAO,aAAa,aAAa;CACvC,MAAM,UAAU,SAAS,KAAK,IAAI,OAAO,CAAC;CAC1C,KAAK,IAAI,QAAQ,QAAQ;CACzB,KAAK,MAAM"}
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,SAAoB,iBAAiB;CAC3C,MAAM,SAASA,wCAAAA,qBAAqB;CACpC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,GAAG;CAGxD,8BAAA,YAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,IAAI;EAC3B,IAAI,OAAO;GACT,MAAM,cAAc,WAAW,MAAM;GACrC,KAAK,IAAI,KAAK,YAAY;;GAE5B;CAIF,MAAM,eAAe,KAAK,IAAIC,8BAAAA,WAAW;CAEzC,IAAI,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;IACnD,IAAI,OAAO,WAAW,MAAa;IACnC,OAAO;MACN,EAAE,CAAQ;GACb,IAAI,OAAO,IAAI,SAAS,eAAe,GAAG,QAAQ;GAClD,OAAO;KAET,EAAE,CACH;EAED,KAAK,IAAIA,8BAAAA,YAAY,mBAAmB;;CAK1C,MAAM,OAAO,KAAK,IAAA,MAAY;CAK9B,IAAI,MACF,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,KAAK;EAC7B,KAAK,IAAA,OAAa,KAAK;QAClB;EAML,MAAM,QAAA,GAAA,UAAA,SALO,OAAO,QAAQ,KAAK,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;GAC9D,IAAI,OAAO,WAAW,MAAM;GAC5B,OAAO;KACN,EAAE,CAEqB,CAAC;EAC3B,KAAK,IAAA,OAAa,KAAK;;CAM3B,KAAK,MAAM,QAAQ;CACnB,KAAK,MAAM,UAAU;CACrB,KAAK,MAAM,kBAAkB;CAI7B,OAAO;EAAE,aADW,KAAK,KACL;EAAE;EAAQ"}
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,iBAAiB;CAC3C,MAAM,SAAS,qBAAqB;CACpC,MAAM,MAAM,GAAG,OAAO;CACtB,MAAM,cAAc,QAAgB,IAAI,QAAQ,KAAK,GAAG;CAGxD,YAAY,SAAQ,QAAO;EACzB,MAAM,QAAQ,KAAK,IAAI,IAAI;EAC3B,IAAI,OAAO;GACT,MAAM,cAAc,WAAW,MAAM;GACrC,KAAK,IAAI,KAAK,YAAY;;GAE5B;CAIF,MAAM,eAAe,KAAK,IAAI,WAAW;CAEzC,IAAI,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;IACnD,IAAI,OAAO,WAAW,MAAa;IACnC,OAAO;MACN,EAAE,CAAQ;GACb,IAAI,OAAO,IAAI,SAAS,eAAe,GAAG,QAAQ;GAClD,OAAO;KAET,EAAE,CACH;EAED,KAAK,IAAI,YAAY,mBAAmB;;CAK1C,MAAM,OAAO,KAAK,IAAA,MAAY;CAK9B,IAAI,MACF,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,KAAK;EAC7B,KAAK,IAAA,OAAa,KAAK;QAClB;EAML,MAAM,OAAO,SALA,OAAO,QAAQ,KAAK,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;GAC9D,IAAI,OAAO,WAAW,MAAM;GAC5B,OAAO;KACN,EAAE,CAEqB,CAAC;EAC3B,KAAK,IAAA,OAAa,KAAK;;CAM3B,KAAK,MAAM,QAAQ;CACnB,KAAK,MAAM,UAAU;CACrB,KAAK,MAAM,kBAAkB;CAI7B,OAAO;EAAE,aADW,KAAK,KACL;EAAE;EAAQ"}
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,QAAQ;CACrB,QAAA,QAAG,KAAKA,8BAAAA,iBAAiB;CACzB,QAAQ,IAAI,eAAe"}
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,QAAQ;CACrB,GAAG,KAAK,iBAAiB;CACzB,QAAQ,IAAI,eAAe"}
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"}
File without changes
@@ -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,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;EACnD,IAAI,WAAW,KAAK,MAAMA,+BAAAA,YAAY;EAGtC,MAAM,EAAE,WAAWC,QAAAA,QAAG,KAAK,gBAAgB;EAC3C,IAAI,CAAC,CAAC,UAAU,OAAO,MAAM,KAAK,IAAI,QAAQ,KAAK,OAAO;EAG1D,IAAI,YAAY,MAAM,4BAAA,SAAS;;CAElC,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;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;EACnD,IAAI,WAAW,KAAK,MAAM,YAAY;EAGtC,MAAM,EAAE,WAAW,GAAG,KAAK,gBAAgB;EAC3C,IAAI,CAAC,CAAC,UAAU,OAAO,MAAM,KAAK,IAAI,QAAQ,KAAK,OAAO;EAG1D,IAAI,YAAY,MAAM,SAAS;;CAElC,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":"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;CAG/D,QAAA,GAAA,KAAA,UAFsB,QAAQ,KAAK,EAAE,KAE1B"}
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,KACT,CAAC,MAAK,QAAO,IAAI,SAAS,kBAAkB,CAAC;CAG/D,OAFa,SAAS,QAAQ,KAAK,EAAE,KAE1B"}
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,SAFoBA,8BAAAA,QAEN,CAAC,IAAIC,8BAAAA,aAAa;CAMtC,OAJgB,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB"}
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,QAEN,CAAC,IAAI,aAAa;CAMtC,OAJgB,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB"}
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,SAGrC"}
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,SAGrC"}
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 +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;EAAI,CAAC;CAErD,MAAM,WAAW;EACf,OAAA,SAAS,OAAO,KAAK,QAAQ,SAAS,EAAE,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;IAChC,OAAOC,qCAAAA,aAAa,QAAQ,GAAG,KAAK,QAAQ,OAAO;;GAGrD,KAAK,QAAQ,SAAS,IAAI,UAAU;IAClC,CAAA,GAAA,OAAA,MAAK,IAAI,OAAO,MAAM,CAAC,mCAAmC,YAAY;KACpE,OAAO,OAAO,GAAG;MACjB;KACF;IAEL;EAED,IAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG;EAE1C,CAAA,GAAA,OAAA,UAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;IAChC,OAAOA,qCAAAA,aAAa,QAAQ,GAAG,KAAK,MAAO,OAAO;;GAGpD,KAAK,MAAO,SAAS,IAAI,UAAU;IACjC,OAAA,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,gCAAgC,YAAY;KACvE,OAAO,OAAO,GAAG;MACjB;KACF;IACF;;CAGJ,OAAO,CAAC,QAAQ,GAAG"}
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;EAAI,CAAC;CAErD,MAAM,WAAW;EACf,SAAS,OAAO,KAAK,QAAQ,SAAS,EAAE,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,QAAQ,OAAO;;GAGrD,KAAK,QAAQ,SAAS,IAAI,UAAU;IAClC,KAAK,IAAI,OAAO,MAAM,CAAC,mCAAmC,YAAY;KACpE,OAAO,OAAO,GAAG;MACjB;KACF;IAEL;EAED,IAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG;EAE1C,SAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,MAAO,OAAO;;GAGpD,KAAK,MAAO,SAAS,IAAI,UAAU;IACjC,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,gCAAgC,YAAY;KACvE,OAAO,OAAO,GAAG;MACjB;KACF;IACF;;CAGJ,OAAO,CAAC,QAAQ,GAAG"}
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 +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;EAAK,CAAC;CAC3D,CAAA,GAAA,OAAA,QAAO,IAAI,CAAC,aAAa;CACzB,CAAA,GAAA,OAAA,QAAO,IAAI,CAAC,WAAW,WAAW"}
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;EAAK,CAAC;CAC3D,OAAO,IAAI,CAAC,aAAa;CACzB,OAAO,IAAI,CAAC,WAAW,WAAW"}
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,kBAAkB;CAIlD,OAAA,GAAA,YAAA,WAAgB,MAAA,GAAA,KAAA,MAFkB,QAAQC,8BAAAA,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAASC,8BAAAA;CAChC,QAAA,QAAG,GAAG,OAAO,CAAC,eAAe,CAAC;CAC9B,QAAA,QAAG,MAAM,eAAe;CAExB,QAAA,QAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAOC,QAAAA,QACV,KAAK,mCAAmCD,8BAAAA,iBAAiB,CACzD,UAAU;CAEb,QAAA,QAAG,GAAG,KAAK;CAEX,OADaE,oCAAAA,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.cjs","names":["buildPackageJson","PACKAGE_PATH","TARBALL_FOLDER","sh","getRelativePath0"],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\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,kBAAkB;CAIlD,MAAM,UAAU,KAFa,KAAK,QAAQ,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAAS;CAChC,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;CAC9B,GAAG,MAAM,eAAe;CAExB,GAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAO,GACV,KAAK,mCAAmC,iBAAiB,CACzD,UAAU;CAEb,GAAG,GAAG,KAAK;CAEX,OADa,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.js","names":[],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\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,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../_virtual/_rolldown/runtime.cjs");
3
3
  const require_rolldown_config_utils = require("./utils.cjs");
4
- const require_rolldown_config_output = require("./output.cjs");
5
4
  const require_rolldown_config_constants = require("./constants.cjs");
5
+ const require_rolldown_config_output = require("./output.cjs");
6
6
  const require_rolldown_config_input = require("./input.cjs");
7
7
  const require_rolldown_config_plugins_index = require("./plugins/index.cjs");
8
8
  let rolldown = require("rolldown");
@@ -11,7 +11,7 @@ let rolldown_plugins = require("rolldown/plugins");
11
11
  const defineConfig = (additionals) => {
12
12
  return defineConfig.default(additionals);
13
13
  };
14
- const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
14
+ const producePlugins = ({ circularDeps, ignoresJS, dir, sourcemap = false, excludesTS, declarationMap, plugins } = {}) => {
15
15
  const include = require_rolldown_config_input.buildInput(...require_rolldown_config_utils.toArray(excludesTS));
16
16
  const exclude = require_rolldown_config_constants.DEFAULT_EXCLUDE.concat(require_rolldown_config_utils.toArray(excludesTS));
17
17
  const unordered = {
@@ -49,7 +49,7 @@ const producePlugins = ({ circularDeps, ignoresJS, dir = "lib", sourcemap = fals
49
49
  return p;
50
50
  }).filter((p) => !!p) : defaultOrdered();
51
51
  };
52
- defineConfig.default = ({ dir = "lib", sourcemap = false, ...rest } = {}) => {
52
+ defineConfig.default = ({ dir, sourcemap = false, ...rest } = {}) => {
53
53
  const input = require_rolldown_config_input.buildInput();
54
54
  const external = rest.externals;
55
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,YAAY;;AAG1C,MAAM,kBAAkB,EACtB,cACA,WACA,MAAA,OACA,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;CAED,OAAO,UACH,QACG,KAAI,MAAK;EACR,IAAI,OAAO,MAAM,UAAU,OAAO,UAAU,IAAI;EAChD,OAAO;GACP,CACD,QAAO,MAAK,CAAC,CAAC,EAAE,GACnB,gBAAgB;;AAGtB,aAAa,WAAW,EACtB,MAAA,OACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQH,8BAAAA,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAASI,+BAAAA,YAAY,KAAK,UAAU;CAQ1C,QAAA,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;CAG7D,OAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.cjs","names":["buildInput","toArray","DEFAULT_EXCLUDE","PLUGIN_BUILDERS","buildOutput","DEFAULT_CIRCULAR_DEPS"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\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,YAAY;;AAG1C,MAAM,kBAAkB,EACtB,cACA,WACA,MAAA,OACA,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;CAED,OAAO,UACH,QACG,KAAI,MAAK;EACR,IAAI,OAAO,MAAM,UAAU,OAAO,UAAU,IAAI;EAChD,OAAO;GACP,CACD,QAAO,MAAK,CAAC,CAAC,EAAE,GACnB,gBAAgB;;AAGtB,aAAa,WAAW,EACtB,MAAA,OACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQ,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAAS,YAAY,KAAK,UAAU;CAQ1C,OAAOA,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;CAG7D,OAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.js","names":["_defineConfig"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\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":"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,SAAiB,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;CACH,KAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,OAAA,GAAA,KAAA,UAAe,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,WAAA,GAAA,KAAA,SAAkB,QAAQ,KAAK,EAAE,KAAK,IAAI;EAGhD,QAAQ,KAAK,eAAe,UAAU;EAEtC,CAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;EACxC,CAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;EACzC,IAAI,WAAW;GACb,CAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;GAC5C,CAAA,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;EAEpD,QAAQ,KAAK,cAAc;EAC3B,QAAQ,IAAI,cAAc;EAC1B,QAAQ,KAAK,WAAW;EACxB,QAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,OAAA,GAAA,KAAA,UAAe,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,WAAA,GAAA,KAAA,SAAkB,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;CAChD,OAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;CACH,KAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,MAAM,SAAS,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,UAAU,QAAQ,QAAQ,KAAK,EAAE,KAAK,IAAI;EAGhD,QAAQ,KAAK,eAAe,UAAU;EAEtC,OAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;EACxC,OAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;EACzC,IAAI,WAAW;GACb,OAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;GAC5C,OAAO,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;EAEpD,QAAQ,KAAK,cAAc;EAC3B,QAAQ,IAAI,cAAc;EAC1B,QAAQ,KAAK,WAAW;EACxB,QAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,MAAM,SAAS,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,UAAU,QAAQ,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,SAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,SAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,UAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,UAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
@@ -1,2 +1,3 @@
1
1
  export * from './config';
2
2
  export * from './plugins';
3
+ export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,aAAA,GAAA,KAAA,UACI,eAAe,EACtB,QAAQA,kCAAAA,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;CAOb,OAAO,EAAA,GAAA,KAAA,UALL,OACA,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,aAAA,GAAA,KAAA,UACI,eAAe,EACtB,QAAQA,kCAAAA,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,EAAA,GAAA,KAAA,UALL,OACA,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,YACL,SAAS,eAAe,EACtB,QAAQ,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;CAOb,OAAO,CANK,SACV,OACA,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,YACL,SAAS,eAAe,EACtB,QAAQ,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,CANK,SACV,OACA,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("./constants.cjs");
2
3
  //#region src/rolldown-config/output.ts
3
- const buildOutput = (dir, sourcemap) => {
4
+ const buildOutput = (dir = "lib", sourcemap) => {
4
5
  return [{
5
6
  format: "es",
6
7
  sourcemap,
@@ -1 +1 @@
1
- {"version":3,"file":"output.cjs","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\nexport const buildOutput = (dir: string, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;AAEA,MAAa,eAAe,KAAa,cAAuB;CAC9D,OAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.cjs","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;;AAGA,MAAa,eAAe,MAAA,OAAmB,cAAuB;AACpE,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
@@ -1,4 +1,4 @@
1
- export declare const buildOutput: (dir: string, sourcemap: boolean) => [{
1
+ export declare const buildOutput: (dir: string | undefined, sourcemap: boolean) => [{
2
2
  readonly format: "es";
3
3
  readonly sourcemap: boolean;
4
4
  readonly preserveModulesRoot: "src";
@@ -1,5 +1,6 @@
1
+ import "./constants.js";
1
2
  //#region src/rolldown-config/output.ts
2
- const buildOutput = (dir, sourcemap) => {
3
+ const buildOutput = (dir = "lib", sourcemap) => {
3
4
  return [{
4
5
  format: "es",
5
6
  sourcemap,
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\nexport const buildOutput = (dir: string, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";AAEA,MAAa,eAAe,KAAa,cAAuB;CAC9D,OAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.js","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\nimport { DEFAULT_DIR } from './constants';\n\nexport const buildOutput = (dir = DEFAULT_DIR, sourcemap: boolean) => {\n return [\n {\n format: 'es',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].js',\n },\n {\n format: 'cjs',\n sourcemap,\n preserveModulesRoot: 'src',\n dir,\n preserveModules: true,\n entryFileNames: '[name].cjs',\n },\n ] as const satisfies OutputOptions[];\n};\n"],"mappings":";;AAGA,MAAa,eAAe,MAAA,OAAmB,cAAuB;AACpE,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"alias.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/alias.ts"],"sourcesContent":["import type { Plugin } from 'rolldown';\n//@ts-expect-error for bundling\nimport tscAlias from 'rollup-plugin-tsc-alias';\n\nexport type AliasOptions = {\n /** path to tsconfig.json (relative to CWD) */\n configFile?: string;\n /** Observe file changes */\n watch?: boolean;\n /** Override outDir (relative path to tsconfig location) */\n outDir?: string;\n /** Override declarationDir (relative path to tsconfig location) */\n declarationDir?: string;\n /** Replace incomplete import paths with fully resolved paths (ESM compat) */\n resolveFullPaths?: boolean;\n /** Deprecated option; kept for compatibility */\n silent?: boolean;\n /** Extra replacer files to load */\n replacers?: string[];\n /** Custom output sink for tsc-alias logs */\n output?: unknown;\n};\n\n/**\n * Creates a configured tsc-alias plugin instance\n * @param options - Configuration options for tsc-alias\n * @returns Rolldown plugin\n */\nexport function alias(options: AliasOptions = {}): Plugin {\n return tscAlias(options);\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,MAAM,UAAwB,EAAE,EAAU;CACxD,QAAA,GAAA,wBAAA,SAAgB,QAAQ"}
1
+ {"version":3,"file":"alias.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/alias.ts"],"sourcesContent":["import type { Plugin } from 'rolldown';\n//@ts-expect-error for bundling\nimport tscAlias from 'rollup-plugin-tsc-alias';\n\nexport type AliasOptions = {\n /** path to tsconfig.json (relative to CWD) */\n configFile?: string;\n /** Observe file changes */\n watch?: boolean;\n /** Override outDir (relative path to tsconfig location) */\n outDir?: string;\n /** Override declarationDir (relative path to tsconfig location) */\n declarationDir?: string;\n /** Replace incomplete import paths with fully resolved paths (ESM compat) */\n resolveFullPaths?: boolean;\n /** Deprecated option; kept for compatibility */\n silent?: boolean;\n /** Extra replacer files to load */\n replacers?: string[];\n /** Custom output sink for tsc-alias logs */\n output?: unknown;\n};\n\n/**\n * Creates a configured tsc-alias plugin instance\n * @param options - Configuration options for tsc-alias\n * @returns Rolldown plugin\n */\nexport function alias(options: AliasOptions = {}): Plugin {\n return tscAlias(options);\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,MAAM,UAAwB,EAAE,EAAU;AACxD,SAAA,GAAA,wBAAA,SAAgB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"alias.js","names":[],"sources":["../../../src/rolldown-config/plugins/alias.ts"],"sourcesContent":["import type { Plugin } from 'rolldown';\n//@ts-expect-error for bundling\nimport tscAlias from 'rollup-plugin-tsc-alias';\n\nexport type AliasOptions = {\n /** path to tsconfig.json (relative to CWD) */\n configFile?: string;\n /** Observe file changes */\n watch?: boolean;\n /** Override outDir (relative path to tsconfig location) */\n outDir?: string;\n /** Override declarationDir (relative path to tsconfig location) */\n declarationDir?: string;\n /** Replace incomplete import paths with fully resolved paths (ESM compat) */\n resolveFullPaths?: boolean;\n /** Deprecated option; kept for compatibility */\n silent?: boolean;\n /** Extra replacer files to load */\n replacers?: string[];\n /** Custom output sink for tsc-alias logs */\n output?: unknown;\n};\n\n/**\n * Creates a configured tsc-alias plugin instance\n * @param options - Configuration options for tsc-alias\n * @returns Rolldown plugin\n */\nexport function alias(options: AliasOptions = {}): Plugin {\n return tscAlias(options);\n}\n"],"mappings":";;;;;;;AA4BA,SAAgB,MAAM,UAAwB,EAAE,EAAU;CACxD,OAAO,SAAS,QAAQ"}
1
+ {"version":3,"file":"alias.js","names":[],"sources":["../../../src/rolldown-config/plugins/alias.ts"],"sourcesContent":["import type { Plugin } from 'rolldown';\n//@ts-expect-error for bundling\nimport tscAlias from 'rollup-plugin-tsc-alias';\n\nexport type AliasOptions = {\n /** path to tsconfig.json (relative to CWD) */\n configFile?: string;\n /** Observe file changes */\n watch?: boolean;\n /** Override outDir (relative path to tsconfig location) */\n outDir?: string;\n /** Override declarationDir (relative path to tsconfig location) */\n declarationDir?: string;\n /** Replace incomplete import paths with fully resolved paths (ESM compat) */\n resolveFullPaths?: boolean;\n /** Deprecated option; kept for compatibility */\n silent?: boolean;\n /** Extra replacer files to load */\n replacers?: string[];\n /** Custom output sink for tsc-alias logs */\n output?: unknown;\n};\n\n/**\n * Creates a configured tsc-alias plugin instance\n * @param options - Configuration options for tsc-alias\n * @returns Rolldown plugin\n */\nexport function alias(options: AliasOptions = {}): Plugin {\n return tscAlias(options);\n}\n"],"mappings":";;;;;;;AA4BA,SAAgB,MAAM,UAAwB,EAAE,EAAU;AACxD,QAAO,SAAS,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"circulars.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,OAAA,GAAA,oCAAA,sBAA2B,QAAQ;CAGzC,MAAM,kBAFUA,8BAAAA,QAAQ,QAAQ,QAED,CAC5B,KAAI,OAAA,GAAA,KAAA,UAAc,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAIC,gCAAAA,iBAAiB,CACrB,KAAI,UAAA,GAAA,KAAA,UAAiB,OAAO,KAAK,CAAC;CAErC,OAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,IACE,SAASC,kCAAAA,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;IAC5B,QAAQ,IAAI,MAAM;IAClB,QAAQ,IACN,uDACD;IACD,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;IACtD,QAAQ,IAAI,MAAM;IAClB,QAAQ,KAAK;IACb,OAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,OAAA,GAAA,oCAAA,sBAA2B,QAAQ;CAGzC,MAAM,kBAFUA,8BAAAA,QAAQ,QAAQ,QAED,CAC5B,KAAI,OAAA,GAAA,KAAA,UAAc,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAIC,gCAAAA,iBAAiB,CACrB,KAAI,UAAA,GAAA,KAAA,UAAiB,OAAO,KAAK,CAAC;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAASC,kCAAAA,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,MAAM,qBAAqB,QAAQ;CAGzC,MAAM,kBAFU,QAAQ,QAAQ,QAED,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;CAErC,OAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,IACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;IAC5B,QAAQ,IAAI,MAAM;IAClB,QAAQ,IACN,uDACD;IACD,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;IACtD,QAAQ,IAAI,MAAM;IAClB,QAAQ,KAAK;IACb,OAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,MAAM,qBAAqB,QAAQ;CAGzC,MAAM,kBAFU,QAAQ,QAAQ,QAED,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
@@ -1,13 +1,17 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
3
3
  const require_rolldown_config_utils = require("../utils.cjs");
4
4
  const require_rolldown_config_constants = require("../constants.cjs");
5
5
  const require_rolldown_config_helpers = require("../helpers.cjs");
6
+ const require_rolldown_config_plugins_typescript_config = require("./typescript.config.cjs");
7
+ let fs = require("fs");
6
8
  let glob = require("glob");
7
9
  let path = require("path");
10
+ let typescript = require("typescript");
11
+ typescript = require_runtime.__toESM(typescript, 1);
8
12
  //#region src/rolldown-config/plugins/clean.ts
9
- const clean = (options = {}) => {
10
- const { ignoresJS, sourcemap = false, dir = "" } = options;
13
+ const clean = (options) => {
14
+ const { ignoresJS, sourcemap = false, dir } = options;
11
15
  const _ignoresJS = require_rolldown_config_utils.toArray(ignoresJS);
12
16
  return {
13
17
  name: "end-bemedev",
@@ -25,12 +29,14 @@ const clean = (options = {}) => {
25
29
  closeBundle: {
26
30
  order: "post",
27
31
  handler: () => {
32
+ const cwd = process.cwd();
33
+ const outDir = require_rolldown_config_plugins_typescript_config.readTsConfig(typescript.default.findConfigFile(cwd, fs.existsSync, "tsconfig.json")).options.outDir ?? dir ?? "lib";
28
34
  if (_ignoresJS.length > 0) try {
29
35
  const files = /* @__PURE__ */ new Set();
30
36
  _ignoresJS.forEach((pat) => {
31
37
  (0, glob.globSync)(pat, { nodir: true }).forEach((file) => files.add(file));
32
38
  });
33
- require_rolldown_config_helpers.cleanupJS(files, dir, sourcemap);
39
+ require_rolldown_config_helpers.cleanupJS(files, outDir, sourcemap);
34
40
  console.log("Build finished");
35
41
  } catch (err) {
36
42
  console.error("[end-bemedev] cleanup failed:", err);