@bemedev/dev-utils 0.6.4 → 0.6.6

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 (99) 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/test.cjs.map +1 -1
  8. package/lib/build-tests/cli/test.js.map +1 -1
  9. package/lib/build-tests/getRelativePath.cjs.map +1 -1
  10. package/lib/build-tests/getRelativePath.js.map +1 -1
  11. package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
  12. package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
  13. package/lib/build-tests/import.cjs +2 -2
  14. package/lib/build-tests/import.cjs.map +1 -1
  15. package/lib/build-tests/import.d.ts +5 -2
  16. package/lib/build-tests/import.js +2 -2
  17. package/lib/build-tests/import.js.map +1 -1
  18. package/lib/build-tests/imports/create.cjs +42 -0
  19. package/lib/build-tests/imports/create.cjs.map +1 -0
  20. package/lib/build-tests/imports/create.d.ts +7 -0
  21. package/lib/build-tests/imports/create.js +40 -0
  22. package/lib/build-tests/imports/create.js.map +1 -0
  23. package/lib/build-tests/imports/helper.cjs +17 -0
  24. package/lib/build-tests/imports/helper.cjs.map +1 -0
  25. package/lib/build-tests/imports/helper.d.ts +9 -0
  26. package/lib/build-tests/imports/helper.js +15 -0
  27. package/lib/build-tests/imports/helper.js.map +1 -0
  28. package/lib/build-tests/imports/index.cjs +3 -0
  29. package/lib/build-tests/imports/index.d.ts +1 -0
  30. package/lib/build-tests/imports/index.js +2 -0
  31. package/lib/build-tests/index.cjs +3 -0
  32. package/lib/build-tests/index.d.ts +1 -1
  33. package/lib/build-tests/index.js +3 -1
  34. package/lib/build-tests/pack.cjs.map +1 -1
  35. package/lib/build-tests/pack.js.map +1 -1
  36. package/lib/rolldown-config/config.cjs.map +1 -1
  37. package/lib/rolldown-config/config.js.map +1 -1
  38. package/lib/rolldown-config/helpers.cjs.map +1 -1
  39. package/lib/rolldown-config/helpers.js.map +1 -1
  40. package/lib/rolldown-config/input.cjs.map +1 -1
  41. package/lib/rolldown-config/input.js.map +1 -1
  42. package/lib/rolldown-config/output.cjs.map +1 -1
  43. package/lib/rolldown-config/output.js.map +1 -1
  44. package/lib/rolldown-config/plugins/alias.cjs.map +1 -1
  45. package/lib/rolldown-config/plugins/alias.js.map +1 -1
  46. package/lib/rolldown-config/plugins/circulars.cjs.map +1 -1
  47. package/lib/rolldown-config/plugins/circulars.js.map +1 -1
  48. package/lib/rolldown-config/plugins/clean.cjs.map +1 -1
  49. package/lib/rolldown-config/plugins/clean.js.map +1 -1
  50. package/lib/rolldown-config/plugins/externals.cjs.map +1 -1
  51. package/lib/rolldown-config/plugins/externals.js.map +1 -1
  52. package/lib/rolldown-config/plugins/tsPaths.cjs.map +1 -1
  53. package/lib/rolldown-config/plugins/tsPaths.js.map +1 -1
  54. package/lib/rolldown-config/plugins/typescript.cjs.map +1 -1
  55. package/lib/rolldown-config/plugins/typescript.config.cjs.map +1 -1
  56. package/lib/rolldown-config/plugins/typescript.config.js.map +1 -1
  57. package/lib/rolldown-config/plugins/typescript.js.map +1 -1
  58. package/lib/rolldown-config/utils.cjs.map +1 -1
  59. package/lib/rolldown-config/utils.js.map +1 -1
  60. package/lib/utils/sleep.cjs.map +1 -1
  61. package/lib/utils/sleep.js.map +1 -1
  62. package/lib/vitest-alias/vitest.cjs.map +1 -1
  63. package/lib/vitest-alias/vitest.js.map +1 -1
  64. package/lib/vitest-exclude/vitest.cjs.map +1 -1
  65. package/lib/vitest-exclude/vitest.js.map +1 -1
  66. package/lib/vitest-exclude/vitest.utils.cjs.map +1 -1
  67. package/lib/vitest-exclude/vitest.utils.js.map +1 -1
  68. package/lib/vitest-extended/acceptation.cjs +2 -2
  69. package/lib/vitest-extended/acceptation.cjs.map +1 -1
  70. package/lib/vitest-extended/acceptation.js +2 -2
  71. package/lib/vitest-extended/acceptation.js.map +1 -1
  72. package/lib/vitest-extended/createTests.cjs.map +1 -1
  73. package/lib/vitest-extended/createTests.js.map +1 -1
  74. package/lib/vitest-extended/done.cjs.map +1 -1
  75. package/lib/vitest-extended/done.js.map +1 -1
  76. package/lib/vitest-extended/each/error.cjs.map +1 -1
  77. package/lib/vitest-extended/each/error.js.map +1 -1
  78. package/lib/vitest-extended/each/pass.cjs.map +1 -1
  79. package/lib/vitest-extended/each/pass.js.map +1 -1
  80. package/lib/vitest-extended/fakeWaiter.cjs.map +1 -1
  81. package/lib/vitest-extended/fakeWaiter.js.map +1 -1
  82. package/lib/vitest-extended/fixtures/partialCall.cjs.map +1 -1
  83. package/lib/vitest-extended/fixtures/partialCall.js.map +1 -1
  84. package/lib/vitest-extended/fixtures/toUpper.cjs.map +1 -1
  85. package/lib/vitest-extended/fixtures/toUpper.js.map +1 -1
  86. package/lib/vitest-extended/fixtures/zod.cjs.map +1 -1
  87. package/lib/vitest-extended/fixtures/zod.js.map +1 -1
  88. package/lib/vitest-extended/identity.cjs.map +1 -1
  89. package/lib/vitest-extended/identity.js.map +1 -1
  90. package/lib/vitest-extended/isDefined.cjs.map +1 -1
  91. package/lib/vitest-extended/isDefined.js.map +1 -1
  92. package/lib/vitest-extended/isFunction.cjs.map +1 -1
  93. package/lib/vitest-extended/isFunction.js.map +1 -1
  94. package/lib/vitest-extended/toArray.cjs.map +1 -1
  95. package/lib/vitest-extended/toArray.js.map +1 -1
  96. package/lib/vitest-extended/toStringFlat.cjs.map +1 -1
  97. package/lib/vitest-extended/toStringFlat.js.map +1 -1
  98. package/package.json +13 -15
  99. package/lib/build-tests/types.d.ts +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;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
+ {"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 +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;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
+ {"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 +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;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
+ {"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 +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;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
+ {"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 +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;AAC3B,SAAA,QAAG,GAAG,OAAO,QAAQ;AACrB,SAAA,QAAG,KAAKA,8BAAAA,iBAAiB;AACzB,SAAQ,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;CAC3B,QAAA,QAAG,GAAG,OAAO,QAAQ;CACrB,QAAA,QAAG,KAAKA,8BAAAA,iBAAiB;CACzB,QAAQ,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;AAC3B,IAAG,GAAG,OAAO,QAAQ;AACrB,IAAG,KAAK,iBAAiB;AACzB,SAAQ,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;CAC3B,GAAG,GAAG,OAAO,QAAQ;CACrB,GAAG,KAAK,iBAAiB;CACzB,QAAQ,IAAI,eAAe"}
@@ -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;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
+ {"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 +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;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
+ {"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 +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;AAG/D,SAAA,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;CAG/D,QAAA,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;AAG/D,QAFa,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;CAG/D,OAFa,SAAS,QAAQ,KAAK,EAAE,KAE1B"}
@@ -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;AAMtC,QAJgB,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 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 +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;AAMtC,QAJgB,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 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"}
@@ -2,8 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_utils_identity = require("../utils/identity.cjs");
3
3
  const require_build_tests_constants = require("./constants.cjs");
4
4
  //#region src/build-tests/import.ts
5
- const customImport = async (fn = require_utils_identity.identity) => {
6
- return fn(await import(require_build_tests_constants.THIS1));
5
+ const customImport = async ({ path = "", fn = require_utils_identity.identity }) => {
6
+ return fn(await (path === "" ? import(require_build_tests_constants.THIS1) : import(`${require_build_tests_constants.THIS1}/${path}`)));
7
7
  };
8
8
  //#endregion
9
9
  exports.customImport = customImport;
@@ -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';\nimport type { IndexImport } from './types';\n\ntype CustomImport_F = <T = IndexImport>(\n fn?: (out: any) => T,\n) => Promise<T>;\n\nexport const customImport: CustomImport_F = async (fn = identity) => {\n const out = await import(THIS1);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;;AAQA,MAAa,eAA+B,OAAO,KAAKA,uBAAAA,aAAa;AAGnE,QADa,GAAG,MADE,OAAOC,8BAAAA,OAEd"}
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,4 +1,7 @@
1
- import type { IndexImport } from './types';
2
- type CustomImport_F = <T = IndexImport>(fn?: (out: any) => T) => Promise<T>;
1
+ type Args<T = any> = {
2
+ path?: string;
3
+ fn: (out: any) => T;
4
+ };
5
+ type CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;
3
6
  export declare const customImport: CustomImport_F;
4
7
  export {};
@@ -1,8 +1,8 @@
1
1
  import { identity } from "../utils/identity.js";
2
2
  import { THIS1 } from "./constants.js";
3
3
  //#region src/build-tests/import.ts
4
- const customImport = async (fn = identity) => {
5
- return fn(await import(THIS1));
4
+ const customImport = async ({ path = "", fn = identity }) => {
5
+ return fn(await (path === "" ? import(THIS1) : import(`${THIS1}/${path}`)));
6
6
  };
7
7
  //#endregion
8
8
  export { customImport };
@@ -1 +1 @@
1
- {"version":3,"file":"import.js","names":[],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\nimport type { IndexImport } from './types';\n\ntype CustomImport_F = <T = IndexImport>(\n fn?: (out: any) => T,\n) => Promise<T>;\n\nexport const customImport: CustomImport_F = async (fn = identity) => {\n const out = await import(THIS1);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;AAQA,MAAa,eAA+B,OAAO,KAAK,aAAa;AAGnE,QADa,GAAG,MADE,OAAO,OAEd"}
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"}
@@ -0,0 +1,42 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
3
+ const require_vitest_extended_toStringFlat = require("../../vitest-extended/toStringFlat.cjs");
4
+ const require_build_tests_imports_helper = require("./helper.cjs");
5
+ let vitest = require("vitest");
6
+ //#region src/build-tests/imports/create.ts
7
+ const createImportFnTests = (args) => {
8
+ const path = args.path;
9
+ const invite = `Importing from ${path ?? "index"}`;
10
+ const testFn = (fn) => require_build_tests_imports_helper.helperFn({
11
+ path,
12
+ fn
13
+ });
14
+ const fn = () => {
15
+ vitest.describe.skipIf(args.SUCCESS.length < 1)("#01 => Functions are inside the module", () => {
16
+ const _index = (index) => {
17
+ return require_vitest_extended_toStringFlat.toStringFlat(index + 1, args.SUCCESS.length);
18
+ };
19
+ args.SUCCESS.forEach((fn, index) => {
20
+ (0, vitest.test)(`#${_index(index)} => should succeed with function ${fn}`, () => {
21
+ return testFn(fn);
22
+ });
23
+ });
24
+ });
25
+ if (!args.FAILS || args.FAILS.length < 1) return;
26
+ (0, vitest.describe)("#02 => Functions are not inside the module", () => {
27
+ const _index = (index) => {
28
+ return require_vitest_extended_toStringFlat.toStringFlat(index + 1, args.FAILS.length);
29
+ };
30
+ args.FAILS.forEach((fn, index) => {
31
+ vitest.test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {
32
+ return testFn(fn);
33
+ });
34
+ });
35
+ });
36
+ };
37
+ return [invite, fn];
38
+ };
39
+ //#endregion
40
+ exports.createImportFnTests = createImportFnTests;
41
+
42
+ //# sourceMappingURL=create.cjs.map
@@ -0,0 +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"}
@@ -0,0 +1,7 @@
1
+ export type ImportArgs = {
2
+ path?: string;
3
+ FAILS?: string[];
4
+ SUCCESS: string[];
5
+ };
6
+ export type CreateImportTest_F = (args: ImportArgs) => readonly [string, () => void];
7
+ export declare const createImportFnTests: CreateImportTest_F;
@@ -0,0 +1,40 @@
1
+ import { toStringFlat } from "../../vitest-extended/toStringFlat.js";
2
+ import { helperFn } from "./helper.js";
3
+ import { describe, test } from "vitest";
4
+ //#region src/build-tests/imports/create.ts
5
+ const createImportFnTests = (args) => {
6
+ const path = args.path;
7
+ const invite = `Importing from ${path ?? "index"}`;
8
+ const testFn = (fn) => helperFn({
9
+ path,
10
+ fn
11
+ });
12
+ const fn = () => {
13
+ describe.skipIf(args.SUCCESS.length < 1)("#01 => Functions are inside the module", () => {
14
+ const _index = (index) => {
15
+ return toStringFlat(index + 1, args.SUCCESS.length);
16
+ };
17
+ args.SUCCESS.forEach((fn, index) => {
18
+ test(`#${_index(index)} => should succeed with function ${fn}`, () => {
19
+ return testFn(fn);
20
+ });
21
+ });
22
+ });
23
+ if (!args.FAILS || args.FAILS.length < 1) return;
24
+ describe("#02 => Functions are not inside the module", () => {
25
+ const _index = (index) => {
26
+ return toStringFlat(index + 1, args.FAILS.length);
27
+ };
28
+ args.FAILS.forEach((fn, index) => {
29
+ test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {
30
+ return testFn(fn);
31
+ });
32
+ });
33
+ });
34
+ };
35
+ return [invite, fn];
36
+ };
37
+ //#endregion
38
+ export { createImportFnTests };
39
+
40
+ //# sourceMappingURL=create.js.map
@@ -0,0 +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"}
@@ -0,0 +1,17 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../_virtual/_rolldown/runtime.cjs");
3
+ const require_build_tests_import = require("../import.cjs");
4
+ let vitest = require("vitest");
5
+ //#region src/build-tests/imports/helper.ts
6
+ const helperFn = async ({ path, fn }) => {
7
+ const _fn = await require_build_tests_import.customImport({
8
+ path,
9
+ fn: (m) => m[fn]
10
+ });
11
+ (0, vitest.expect)(_fn).toBeDefined();
12
+ (0, vitest.expect)(_fn).toBeTypeOf("function");
13
+ };
14
+ //#endregion
15
+ exports.helperFn = helperFn;
16
+
17
+ //# sourceMappingURL=helper.cjs.map
@@ -0,0 +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"}
@@ -0,0 +1,9 @@
1
+ import type { Fn } from '../../vitest-extended/bemedev/globals/types';
2
+ export type Helper_F = (args: {
3
+ path?: string;
4
+ fn: string;
5
+ }) => Promise<void>;
6
+ export declare const helperFn: <T extends Fn = Fn>({ path, fn, }: {
7
+ path?: string;
8
+ fn: string;
9
+ }) => Promise<void>;
@@ -0,0 +1,15 @@
1
+ import { customImport } from "../import.js";
2
+ import { expect } from "vitest";
3
+ //#region src/build-tests/imports/helper.ts
4
+ const helperFn = async ({ path, fn }) => {
5
+ const _fn = await customImport({
6
+ path,
7
+ fn: (m) => m[fn]
8
+ });
9
+ expect(_fn).toBeDefined();
10
+ expect(_fn).toBeTypeOf("function");
11
+ };
12
+ //#endregion
13
+ export { helperFn };
14
+
15
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +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"}
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_build_tests_imports_create = require("./create.cjs");
3
+ exports.createImportFnTests = require_build_tests_imports_create.createImportFnTests;
@@ -0,0 +1 @@
1
+ export * from './create';
@@ -0,0 +1,2 @@
1
+ import { createImportFnTests } from "./create.js";
2
+ export { createImportFnTests };
@@ -3,7 +3,10 @@ const require_build_tests_constants = require("./constants.cjs");
3
3
  const require_build_tests_addTarball = require("./addTarball.cjs");
4
4
  const require_build_tests_cleanup = require("./cleanup.cjs");
5
5
  const require_build_tests_import = require("./import.cjs");
6
+ const require_build_tests_imports_create = require("./imports/create.cjs");
7
+ require("./imports/index.cjs");
6
8
  exports.THIS1 = require_build_tests_constants.THIS1;
7
9
  exports.addTarball = require_build_tests_addTarball.addTarball;
8
10
  exports.cleanup = require_build_tests_cleanup.cleanup;
11
+ exports.createImportFnTests = require_build_tests_imports_create.createImportFnTests;
9
12
  exports.customImport = require_build_tests_import.customImport;
@@ -2,4 +2,4 @@ export * from './addTarball';
2
2
  export * from './cleanup';
3
3
  export { THIS1 } from './constants';
4
4
  export * from './import';
5
- export * from './types';
5
+ export * from './imports';
@@ -2,4 +2,6 @@ import { THIS1 } from "./constants.js";
2
2
  import { addTarball } from "./addTarball.js";
3
3
  import { cleanup } from "./cleanup.js";
4
4
  import { customImport } from "./import.js";
5
- export { THIS1, addTarball, cleanup, customImport };
5
+ import { createImportFnTests } from "./imports/create.js";
6
+ import "./imports/index.js";
7
+ export { THIS1, addTarball, cleanup, createImportFnTests, customImport };
@@ -1 +1 @@
1
- {"version":3,"file":"pack.cjs","names":["buildPackageJson","PACKAGE_PATH","TARBALL_FOLDER","sh","getRelativePath0"],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport sh from 'shelljs';\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\nimport type { Fn } from '#utils/types';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAWA,qCAAAA,kBAAkB;AAIlD,QAAA,GAAA,YAAA,WAAgB,MAAA,GAAA,KAAA,MAFkB,QAAQC,8BAAAA,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAASC,8BAAAA;AAChC,SAAA,QAAG,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9B,SAAA,QAAG,MAAM,eAAe;AAExB,SAAA,QAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAOC,QAAAA,QACV,KAAK,mCAAmCD,8BAAAA,iBAAiB,CACzD,UAAU;AAEb,SAAA,QAAG,GAAG,KAAK;AAEX,QADaE,oCAAAA,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.cjs","names":["buildPackageJson","PACKAGE_PATH","TARBALL_FOLDER","sh","getRelativePath0"],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\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 +1 @@
1
- {"version":3,"file":"pack.js","names":[],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport sh from 'shelljs';\nimport { buildPackageJson } from './buildPackageJson';\nimport { DOT, PACKAGE_PATH, TARBALL_FOLDER } from './constants';\nimport { getRelativePath0 } from './getRelativePath';\nimport type { Fn } from '#utils/types';\n\ntype Pack_F = Fn<[], Promise<string>>;\n\nexport const pack: Pack_F = async () => {\n const { packageJson, outDir } = buildPackageJson();\n\n const fileToWrite = `${DOT}${join(outDir, PACKAGE_PATH)}`;\n\n await writeFile(fileToWrite, JSON.stringify(packageJson, null, 2));\n const folderTocreate = `${DOT}${TARBALL_FOLDER}`;\n sh.rm('-Rf', [folderTocreate]);\n sh.mkdir(folderTocreate);\n\n sh.cd(`${DOT}${outDir}`);\n\n const out1 = sh\n .exec(`pnpm pack --pack-destination ../${TARBALL_FOLDER}`)\n .toString();\n\n sh.cd('..');\n const out2 = getRelativePath0(out1);\n return out2;\n};\n"],"mappings":";;;;;;;AAUA,MAAa,OAAe,YAAY;CACtC,MAAM,EAAE,aAAa,WAAW,kBAAkB;AAIlD,OAAM,UAAU,KAFa,KAAK,QAAQ,aAAa,IAE1B,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;CAClE,MAAM,iBAAiB,KAAS;AAChC,IAAG,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9B,IAAG,MAAM,eAAe;AAExB,IAAG,GAAG,KAAS,SAAS;CAExB,MAAM,OAAO,GACV,KAAK,mCAAmC,iBAAiB,CACzD,UAAU;AAEb,IAAG,GAAG,KAAK;AAEX,QADa,iBAAiB,KACnB"}
1
+ {"version":3,"file":"pack.js","names":[],"sources":["../../src/build-tests/pack.ts"],"sourcesContent":["import { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\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 +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;AACnD,QAAO,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;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,MAAA,OACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQH,8BAAAA,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAASI,+BAAAA,YAAY,KAAK,UAAU;AAQ1C,SAAA,GAAA,SAAA,cAAqB;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;GACJ,CAIQ;EACP;EACA;EACA,UAAU;EACX,CAAC;;AAGJ,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAeC,kCAAAA,sBAAsB,OACzCJ,8BAAAA,QAAQ,aAAa,aAAa,CACnC;CACD,MAAM,YAAYA,8BAAAA,QAAQ,aAAa,UAAU,CAAC,OAChDI,kCAAAA,sBACD;CAED,MAAM,aAAaH,kCAAAA,gBAAgB,OACjCD,8BAAAA,QAAQ,aAAa,WAAW,CACjC;CACD,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;AAG7D,QAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.cjs","names":["buildInput","toArray","DEFAULT_EXCLUDE","PLUGIN_BUILDERS","buildOutput","DEFAULT_CIRCULAR_DEPS"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\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 +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;AACnD,QAAO,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;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,MAAA,OACA,YAAY,OACZ,GAAG,SACO,EAAE,KAAK;CACjB,MAAM,QAAQ,YAAY;CAC1B,MAAM,WAAW,KAAK;CACtB,MAAM,SAAS,YAAY,KAAK,UAAU;AAQ1C,QAAOA,eAAc;EACnB;EACA,SARc,eAAe;GAC7B;GACA;GACA,GAAG;GACJ,CAIQ;EACP;EACA;EACA,UAAU;EACX,CAAC;;AAGJ,aAAa,WAAU,gBAAe;CAEpC,MAAM,eAAe,sBAAsB,OACzC,QAAQ,aAAa,aAAa,CACnC;CACD,MAAM,YAAY,QAAQ,aAAa,UAAU,CAAC,OAChD,sBACD;CAED,MAAM,aAAa,gBAAgB,OACjC,QAAQ,aAAa,WAAW,CACjC;CACD,MAAM,aAAa,aAAa;CAChC,MAAM,YAAY,eAAe,KAAA,KAAa,eAAe;AAG7D,QAAO,aAAa,QAAQ;EAC1B,GAAG;EACH;EACA;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"config.js","names":["_defineConfig"],"sources":["../../src/rolldown-config/config.ts"],"sourcesContent":["import { defineConfig as _defineConfig } from 'rolldown';\nimport { esmExternalRequirePlugin } from 'rolldown/plugins';\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 +1 @@
1
- {"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,OAAA,GAAA,KAAA,UAAe,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,WAAA,GAAA,KAAA,SAAkB,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,GAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,IAAA,GAAA,GAAA,QAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;;;AAGA,MAAa,oBAAoB,SAAiB;CAChD,OAAO,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,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 +1 @@
1
- {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;AAChD,QAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO;;AAG1D,MAAa,aACX,OACA,KACA,cACG;AACH,MAAK,MAAM,QAAQ,OAAO;EAExB,MAAM,MAAM,SAAS,OADF,iBAAiB,KACE,CAAC;EACvC,MAAM,UAAU,QAAQ,QAAQ,KAAK,EAAE,KAAK,IAAI;AAGhD,UAAQ,KAAK,eAAe,UAAU;AAEtC,SAAO,GAAG,QAAQ,MAAM,EAAE,OAAO,MAAM,CAAC;AACxC,SAAO,GAAG,QAAQ,OAAO,EAAE,OAAO,MAAM,CAAC;AACzC,MAAI,WAAW;AACb,UAAO,GAAG,QAAQ,UAAU,EAAE,OAAO,MAAM,CAAC;AAC5C,UAAO,GAAG,QAAQ,WAAW,EAAE,OAAO,MAAM,CAAC;;EAG/C,MAAM,WAAW;GAAC;GAAM;GAAO;GAAU;GAAU,CAAC,KAClD,QAAO,GAAG,QAAQ,GAAG,MACtB;EAED,MAAM,aAAa,KAAK,UAAU,UAAU,MAAM,EAAE;AAEpD,UAAQ,KAAK,cAAc;AAC3B,UAAQ,IAAI,cAAc;AAC1B,UAAQ,KAAK,WAAW;AACxB,UAAQ,IAAI,cAAc"}
1
+ {"version":3,"file":"helpers.js","names":[],"sources":["../../src/rolldown-config/helpers.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { extname, relative, resolve } from 'node:path';\n\nexport const withoutExtension = (file: string) => {\n return file.slice(0, file.length - extname(file).length);\n};\n\nexport const cleanupJS = (\n files: Set<string>,\n dir: string,\n sourcemap: boolean,\n) => {\n for (const file of files) {\n const withoutExt = withoutExtension(file);\n const rel = relative('src', withoutExt);\n const baseOut = resolve(process.cwd(), dir, rel);\n\n // #region JS outputs\n console.warn(`Cleaning up ${baseOut}`);\n\n rmSync(`${baseOut}.js`, { force: true });\n rmSync(`${baseOut}.cjs`, { force: true });\n if (sourcemap) {\n rmSync(`${baseOut}.js.map`, { force: true });\n rmSync(`${baseOut}.cjs.map`, { force: true });\n }\n\n const REMOVEDS = ['js', 'cjs', 'js.map', 'cjs.map'].map(\n ext => `${baseOut}.${ext}`,\n );\n\n const endMessage = JSON.stringify(REMOVEDS, null, 2);\n\n console.warn('removeds ::');\n console.log('***********');\n console.warn(endMessage);\n console.log('***********');\n // #endregion\n }\n};\n"],"mappings":";;;AAGA,MAAa,oBAAoB,SAAiB;CAChD,OAAO,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,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 +1 @@
1
- {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,aAAA,GAAA,KAAA,UACI,eAAe,EACtB,QAAQA,kCAAAA,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,EAAA,GAAA,KAAA,UALL,OACA,KAAK,MAAM,GAAG,KAAK,UAAA,GAAA,KAAA,SAAiB,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.cjs","names":["DEFAULT_EXCLUDE"],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import 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 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import type { BuildInput_F } from './types';\nimport { globSync } from 'glob';\nimport { extname, relative } from 'node:path';\nimport { DEFAULT_EXCLUDE } from './constants';\n\nexport const buildInput: BuildInput_F = (...ignores) =>\n Object.fromEntries(\n globSync('src/**/*.ts', {\n ignore: DEFAULT_EXCLUDE.concat(ignores),\n }).map(file => {\n const key = relative(\n 'src',\n file.slice(0, file.length - extname(file).length),\n );\n const value = `${process.cwd()}/${file}`;\n\n return [key, value];\n }),\n );\n"],"mappings":";;;;AAKA,MAAa,cAA4B,GAAG,YAC1C,OAAO,YACL,SAAS,eAAe,EACtB,QAAQ,gBAAgB,OAAO,QAAQ,EACxC,CAAC,CAAC,KAAI,SAAQ;AAOb,QAAO,CANK,SACV,OACA,KAAK,MAAM,GAAG,KAAK,SAAS,QAAQ,KAAK,CAAC,OAAO,CAIxC,EAAE,GAFI,QAAQ,KAAK,CAAC,GAAG,OAEf;EACnB,CACH"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/rolldown-config/input.ts"],"sourcesContent":["import 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 +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;AAC9D,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.cjs","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\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 +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;AAC9D,QAAO,CACL;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,EACD;EACE,QAAQ;EACR;EACA,qBAAqB;EACrB;EACA,iBAAiB;EACjB,gBAAgB;EACjB,CACF"}
1
+ {"version":3,"file":"output.js","names":[],"sources":["../../src/rolldown-config/output.ts"],"sourcesContent":["import type { OutputOptions } from 'rolldown';\n\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 +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;AACxD,SAAA,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;CACxD,QAAA,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;AACxD,QAAO,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;CACxD,OAAO,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;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAASC,kCAAAA,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { 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 +1 @@
1
- {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,MAAM,qBAAqB,QAAQ;CAGzC,MAAM,kBAFU,QAAQ,QAAQ,QAED,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;AAErC,QAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;AAC/B,OACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,YAAQ,IAAI,MAAM;AAClB,YAAQ,IACN,uDACD;AACD,WAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;AACtD,YAAQ,IAAI,MAAM;AAClB,YAAQ,KAAK;AACb,WAAO;;KAKZ;EACF"}
1
+ {"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { 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"}