@bemedev/dev-utils 0.6.5 → 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.
- package/lib/build-tests/addTarball.cjs.map +1 -1
- package/lib/build-tests/addTarball.js.map +1 -1
- package/lib/build-tests/buildPackageJson.cjs.map +1 -1
- package/lib/build-tests/buildPackageJson.js.map +1 -1
- package/lib/build-tests/cleanup.cjs.map +1 -1
- package/lib/build-tests/cleanup.js.map +1 -1
- package/lib/build-tests/cli/test.cjs.map +1 -1
- package/lib/build-tests/cli/test.js.map +1 -1
- package/lib/build-tests/getRelativePath.cjs.map +1 -1
- package/lib/build-tests/getRelativePath.js.map +1 -1
- package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
- package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
- package/lib/build-tests/import.cjs.map +1 -1
- package/lib/build-tests/import.js.map +1 -1
- package/lib/build-tests/imports/create.cjs +2 -1
- package/lib/build-tests/imports/create.cjs.map +1 -1
- package/lib/build-tests/imports/create.d.ts +1 -1
- package/lib/build-tests/imports/create.js +2 -1
- package/lib/build-tests/imports/create.js.map +1 -1
- package/lib/build-tests/imports/helper.cjs.map +1 -1
- package/lib/build-tests/imports/helper.js.map +1 -1
- package/lib/build-tests/pack.cjs.map +1 -1
- package/lib/build-tests/pack.js.map +1 -1
- package/lib/rolldown-config/config.cjs.map +1 -1
- package/lib/rolldown-config/config.js.map +1 -1
- package/lib/rolldown-config/helpers.cjs.map +1 -1
- package/lib/rolldown-config/helpers.js.map +1 -1
- package/lib/rolldown-config/input.cjs.map +1 -1
- package/lib/rolldown-config/input.js.map +1 -1
- package/lib/rolldown-config/output.cjs.map +1 -1
- package/lib/rolldown-config/output.js.map +1 -1
- package/lib/rolldown-config/plugins/alias.cjs.map +1 -1
- package/lib/rolldown-config/plugins/alias.js.map +1 -1
- package/lib/rolldown-config/plugins/circulars.cjs.map +1 -1
- package/lib/rolldown-config/plugins/circulars.js.map +1 -1
- package/lib/rolldown-config/plugins/clean.cjs.map +1 -1
- package/lib/rolldown-config/plugins/clean.js.map +1 -1
- package/lib/rolldown-config/plugins/externals.cjs.map +1 -1
- package/lib/rolldown-config/plugins/externals.js.map +1 -1
- package/lib/rolldown-config/plugins/tsPaths.cjs.map +1 -1
- package/lib/rolldown-config/plugins/tsPaths.js.map +1 -1
- package/lib/rolldown-config/plugins/typescript.cjs.map +1 -1
- package/lib/rolldown-config/plugins/typescript.config.cjs.map +1 -1
- package/lib/rolldown-config/plugins/typescript.config.js.map +1 -1
- package/lib/rolldown-config/plugins/typescript.js.map +1 -1
- package/lib/rolldown-config/utils.cjs.map +1 -1
- package/lib/rolldown-config/utils.js.map +1 -1
- package/lib/utils/sleep.cjs.map +1 -1
- package/lib/utils/sleep.js.map +1 -1
- package/lib/vitest-alias/vitest.cjs.map +1 -1
- package/lib/vitest-alias/vitest.js.map +1 -1
- package/lib/vitest-exclude/vitest.cjs.map +1 -1
- package/lib/vitest-exclude/vitest.js.map +1 -1
- package/lib/vitest-exclude/vitest.utils.cjs.map +1 -1
- package/lib/vitest-exclude/vitest.utils.js.map +1 -1
- package/lib/vitest-extended/acceptation.cjs.map +1 -1
- package/lib/vitest-extended/acceptation.js.map +1 -1
- package/lib/vitest-extended/createTests.cjs.map +1 -1
- package/lib/vitest-extended/createTests.js.map +1 -1
- package/lib/vitest-extended/done.cjs.map +1 -1
- package/lib/vitest-extended/done.js.map +1 -1
- package/lib/vitest-extended/each/error.cjs.map +1 -1
- package/lib/vitest-extended/each/error.js.map +1 -1
- package/lib/vitest-extended/each/pass.cjs.map +1 -1
- package/lib/vitest-extended/each/pass.js.map +1 -1
- package/lib/vitest-extended/fakeWaiter.cjs.map +1 -1
- package/lib/vitest-extended/fakeWaiter.js.map +1 -1
- package/lib/vitest-extended/fixtures/partialCall.cjs.map +1 -1
- package/lib/vitest-extended/fixtures/partialCall.js.map +1 -1
- package/lib/vitest-extended/fixtures/toUpper.cjs.map +1 -1
- package/lib/vitest-extended/fixtures/toUpper.js.map +1 -1
- package/lib/vitest-extended/fixtures/zod.cjs.map +1 -1
- package/lib/vitest-extended/fixtures/zod.js.map +1 -1
- package/lib/vitest-extended/identity.cjs.map +1 -1
- package/lib/vitest-extended/identity.js.map +1 -1
- package/lib/vitest-extended/isDefined.cjs.map +1 -1
- package/lib/vitest-extended/isDefined.js.map +1 -1
- package/lib/vitest-extended/isFunction.cjs.map +1 -1
- package/lib/vitest-extended/isFunction.js.map +1 -1
- package/lib/vitest-extended/toArray.cjs.map +1 -1
- package/lib/vitest-extended/toArray.js.map +1 -1
- package/lib/vitest-extended/toStringFlat.cjs.map +1 -1
- package/lib/vitest-extended/toStringFlat.js.map +1 -1
- package/package.json +8 -8
|
@@ -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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
1
|
+
{"version":3,"file":"getTypescriptOutdir.js","names":[],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile from 'edit-json-file';\nimport { DOT, PATH_OUT_DIR, TS_PATH } from './constants';\nimport type { Fn } from '#utils/types';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n const file = editJsonFile(TS_PATH);\n\n const outDir1 = file.get(PATH_OUT_DIR) as string;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n return outDir2;\n};\n"],"mappings":";;;AAMA,MAAa,4BAAiC;CAG5C,MAAM,UAFO,aAAa,QAEN,CAAC,IAAI,aAAa;CAMtC,OAJgB,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.cjs","names":["identity","THIS1"],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAKA,uBAAAA,eACK;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","names":[],"sources":["../../src/build-tests/import.ts"],"sourcesContent":["import { identity } from '#utils';\nimport { THIS1 } from './constants';\n\ntype Args<T = any> = {\n path?: string;\n fn: (out: any) => T;\n};\n\ntype CustomImport_F = <T = any>(args: Args<T>) => Promise<T>;\n\nexport const customImport: CustomImport_F = async ({\n path = '',\n fn = identity,\n}: Args) => {\n const _path = path === '' ? THIS1 : `${THIS1}/${path}`;\n const out = await import(_path);\n const out2 = fn(out);\n return out2;\n};\n"],"mappings":";;;AAUA,MAAa,eAA+B,OAAO,EACjD,OAAO,IACP,KAAK,eACK;
|
|
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"}
|
|
@@ -12,7 +12,7 @@ const createImportFnTests = (args) => {
|
|
|
12
12
|
fn
|
|
13
13
|
});
|
|
14
14
|
const fn = () => {
|
|
15
|
-
|
|
15
|
+
vitest.describe.skipIf(args.SUCCESS.length < 1)("#01 => Functions are inside the module", () => {
|
|
16
16
|
const _index = (index) => {
|
|
17
17
|
return require_vitest_extended_toStringFlat.toStringFlat(index + 1, args.SUCCESS.length);
|
|
18
18
|
};
|
|
@@ -22,6 +22,7 @@ const createImportFnTests = (args) => {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
+
if (!args.FAILS || args.FAILS.length < 1) return;
|
|
25
26
|
(0, vitest.describe)("#02 => Functions are not inside the module", () => {
|
|
26
27
|
const _index = (index) => {
|
|
27
28
|
return require_vitest_extended_toStringFlat.toStringFlat(index + 1, args.FAILS.length);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.cjs","names":["helperFn","toStringFlat"],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS
|
|
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"}
|
|
@@ -10,7 +10,7 @@ const createImportFnTests = (args) => {
|
|
|
10
10
|
fn
|
|
11
11
|
});
|
|
12
12
|
const fn = () => {
|
|
13
|
-
describe("#01 => Functions are inside the module", () => {
|
|
13
|
+
describe.skipIf(args.SUCCESS.length < 1)("#01 => Functions are inside the module", () => {
|
|
14
14
|
const _index = (index) => {
|
|
15
15
|
return toStringFlat(index + 1, args.SUCCESS.length);
|
|
16
16
|
};
|
|
@@ -20,6 +20,7 @@ const createImportFnTests = (args) => {
|
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
|
+
if (!args.FAILS || args.FAILS.length < 1) return;
|
|
23
24
|
describe("#02 => Functions are not inside the module", () => {
|
|
24
25
|
const _index = (index) => {
|
|
25
26
|
return toStringFlat(index + 1, args.FAILS.length);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","names":[],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS
|
|
1
|
+
{"version":3,"file":"create.js","names":[],"sources":["../../../src/build-tests/imports/create.ts"],"sourcesContent":["import { describe, test } from 'vitest';\nimport { helperFn } from './helper';\nimport { toStringFlat } from '../../vitest-extended/toStringFlat';\n\nexport type ImportArgs = {\n path?: string;\n FAILS?: string[];\n SUCCESS: string[];\n};\n\nexport type CreateImportTest_F = (\n args: ImportArgs,\n) => readonly [string, () => void];\n\nexport const createImportFnTests: CreateImportTest_F = args => {\n const path = args.path;\n const invite = `Importing from ${path ?? 'index'}`;\n const testFn = (fn: string) => helperFn({ path, fn });\n\n const fn = () => {\n describe.skipIf(args.SUCCESS.length < 1)(\n '#01 => Functions are inside the module',\n () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.SUCCESS.length);\n };\n\n args.SUCCESS.forEach((fn, index) => {\n test(`#${_index(index)} => should succeed with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n },\n );\n\n if (!args.FAILS || args.FAILS.length < 1) return;\n\n describe('#02 => Functions are not inside the module', () => {\n const _index = (index: number) => {\n return toStringFlat(index + 1, args.FAILS!.length);\n };\n\n args.FAILS!.forEach((fn, index) => {\n test.fails(`#${_index(index)} => should fail with function ${fn}`, () => {\n return testFn(fn);\n });\n });\n });\n };\n\n return [invite, fn] as const;\n};\n"],"mappings":";;;;AAcA,MAAa,uBAA0C,SAAQ;CAC7D,MAAM,OAAO,KAAK;CAClB,MAAM,SAAS,kBAAkB,QAAQ;CACzC,MAAM,UAAU,OAAe,SAAS;EAAE;EAAM;EAAI,CAAC;CAErD,MAAM,WAAW;EACf,SAAS,OAAO,KAAK,QAAQ,SAAS,EAAE,CACtC,gDACM;GACJ,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,QAAQ,OAAO;;GAGrD,KAAK,QAAQ,SAAS,IAAI,UAAU;IAClC,KAAK,IAAI,OAAO,MAAM,CAAC,mCAAmC,YAAY;KACpE,OAAO,OAAO,GAAG;MACjB;KACF;IAEL;EAED,IAAI,CAAC,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG;EAE1C,SAAS,oDAAoD;GAC3D,MAAM,UAAU,UAAkB;IAChC,OAAO,aAAa,QAAQ,GAAG,KAAK,MAAO,OAAO;;GAGpD,KAAK,MAAO,SAAS,IAAI,UAAU;IACjC,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,gCAAgC,YAAY;KACvE,OAAO,OAAO,GAAG;MACjB;KACF;IACF;;CAGJ,OAAO,CAAC,QAAQ,GAAG"}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"helper.cjs","names":["customImport"],"sources":["../../../src/build-tests/imports/helper.ts"],"sourcesContent":["import { expect } from 'vitest';\nimport type { Fn } from '../../vitest-extended/bemedev/globals/types';\nimport { customImport } from '../import';\n\nexport type Helper_F = (args: {\n path?: string;\n fn: string;\n}) => Promise<void>;\n\nexport const helperFn = async <T extends Fn = Fn>({\n path,\n fn,\n}: {\n path?: string;\n fn: string;\n}) => {\n const _fn = await customImport<T>({ path, fn: m => m[fn] });\n expect(_fn).toBeDefined();\n expect(_fn).toBeTypeOf('function');\n};\n"],"mappings":";;;;;AASA,MAAa,WAAW,OAA0B,EAChD,MACA,SAII;CACJ,MAAM,MAAM,MAAMA,2BAAAA,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;EAAK,CAAC;CAC3D,CAAA,GAAA,OAAA,QAAO,IAAI,CAAC,aAAa;CACzB,CAAA,GAAA,OAAA,QAAO,IAAI,CAAC,WAAW,WAAW"}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"helper.js","names":[],"sources":["../../../src/build-tests/imports/helper.ts"],"sourcesContent":["import { expect } from 'vitest';\nimport type { Fn } from '../../vitest-extended/bemedev/globals/types';\nimport { customImport } from '../import';\n\nexport type Helper_F = (args: {\n path?: string;\n fn: string;\n}) => Promise<void>;\n\nexport const helperFn = async <T extends Fn = Fn>({\n path,\n fn,\n}: {\n path?: string;\n fn: string;\n}) => {\n const _fn = await customImport<T>({ path, fn: m => m[fn] });\n expect(_fn).toBeDefined();\n expect(_fn).toBeTypeOf('function');\n};\n"],"mappings":";;;AASA,MAAa,WAAW,OAA0B,EAChD,MACA,SAII;CACJ,MAAM,MAAM,MAAM,aAAgB;EAAE;EAAM,KAAI,MAAK,EAAE;EAAK,CAAC;CAC3D,OAAO,IAAI,CAAC,aAAa;CACzB,OAAO,IAAI,CAAC,WAAW,WAAW"}
|
|
@@ -1 +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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
1
|
+
{"version":3,"file":"circulars.js","names":[],"sources":["../../../src/rolldown-config/plugins/circulars.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { circularDependencies } from 'rollup-plugin-circular-dependencies';\nimport { WARNING_CODES } from '../constants';\nimport { withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type CircularDependenciesOptions = Parameters<\n typeof circularDependencies\n>[0] & {\n exclude?: string | string[];\n};\n\n/**\n * Creates a configured circular dependencies plugin instance\n * @param options - Configuration options for circular dependencies detection\n * @returns Rolldown plugin\n */\nexport function circulars(\n options: CircularDependenciesOptions = {},\n): RolldownPluginOption {\n const all = circularDependencies(options);\n const exclude = toArray(options.exclude);\n\n const CIRCULAR_CHUNKS = exclude\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n return {\n ...all,\n name: 'better circular-dependencies',\n onLog: {\n handler: (_, { code, names }) => {\n if (\n code === WARNING_CODES.CIRCULAR_DEPENDENCY &&\n names?.every(name => CIRCULAR_CHUNKS.includes(name))\n ) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log(\n '[bemedev] Skipping circular dependency warnings for:',\n );\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n console.log();\n return false;\n }\n\n return;\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,UACd,UAAuC,EAAE,EACnB;CACtB,MAAM,MAAM,qBAAqB,QAAQ;CAGzC,MAAM,kBAFU,QAAQ,QAAQ,QAED,CAC5B,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;CAErC,OAAO;EACL,GAAG;EACH,MAAM;EACN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,IACE,SAAS,cAAc,uBACvB,OAAO,OAAM,SAAQ,gBAAgB,SAAS,KAAK,CAAC,EACpD;IACA,MAAM,QAAQ,IAAI,OAAO,GAAG;IAC5B,QAAQ,IAAI,MAAM;IAClB,QAAQ,IACN,uDACD;IACD,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;IACtD,QAAQ,IAAI,MAAM;IAClB,QAAQ,KAAK;IACb,OAAO;;KAKZ;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions = {}) => {\n const { ignoresJS, sourcemap = false, dir = '' } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, dir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;;;AAaA,MAAa,SAAS,UAA4B,EAAE,KAAK;CACvD,MAAM,EAAE,WAAW,YAAY,OAAO,MAAM,OAAO;CAEnD,MAAM,aAAaA,8BAAAA,QAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"clean.cjs","names":["toArray","withoutExtension","WARNING_CODES"],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions = {}) => {\n const { ignoresJS, sourcemap = false, dir = '' } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, dir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;;;AAaA,MAAa,SAAS,UAA4B,EAAE,KAAK;CACvD,MAAM,EAAE,WAAW,YAAY,OAAO,MAAM,OAAO;CAEnD,MAAM,aAAaA,8BAAAA,QAAQ,UAAU;CAmDrC,OAAO;EAhDL,MAAM;EAEN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,MAAM,eAAe,WAClB,KAAI,OAAA,GAAA,KAAA,UAAc,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAIC,gCAAAA,iBAAiB,CACrB,KAAI,UAAA,GAAA,KAAA,UAAiB,OAAO,KAAK,CAAC;GAMrC,IAHE,SAASC,kCAAAA,cAAc,gBACvB,OAAO,OAAM,SAAQ,aAAa,SAAS,KAAK,CAAC,EAExC;IACT,MAAM,QAAQ,IAAI,OAAO,GAAG;IAC5B,QAAQ,IAAI,MAAM;IAClB,QAAQ,IAAI,mDAAmD;IAC/D,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;IACtD,QAAQ,IAAI,MAAM;IAClB,OAAO;;KAKZ;EAED,aAAa;GACX,OAAO;GACP,eAAe;IACb,IAAI,WAAW,SAAS,GACtB,IAAI;KACF,MAAM,wBAAQ,IAAI,KAAa;KAC/B,WAAW,SAAQ,QAAO;MAExB,CAAA,GAAA,KAAA,UADuB,KAAK,EAAE,OAAO,MAAM,CACtC,CAAC,SAAQ,SAAQ,MAAM,IAAI,KAAK,CAAC;OACtC;KACF,gCAAA,UAAU,OAAO,KAAK,UAAU;KAChC,QAAQ,IAAI,iBAAiB;aAEtB,KAAK;KACZ,QAAQ,MAAM,iCAAiC,IAAI;;;GAI1D;EAGO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.js","names":[],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions = {}) => {\n const { ignoresJS, sourcemap = false, dir = '' } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, dir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;AAaA,MAAa,SAAS,UAA4B,EAAE,KAAK;CACvD,MAAM,EAAE,WAAW,YAAY,OAAO,MAAM,OAAO;CAEnD,MAAM,aAAa,QAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"clean.js","names":[],"sources":["../../../src/rolldown-config/plugins/clean.ts"],"sourcesContent":["import { globSync } from 'glob';\nimport { relative } from 'node:path';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { WARNING_CODES } from '../constants';\nimport { cleanupJS, withoutExtension } from '../helpers';\nimport { toArray } from '../utils';\n\nexport type EndPluginOptions = {\n ignoresJS?: string | string[];\n sourcemap?: boolean;\n dir?: string;\n};\n\nexport const clean = (options: EndPluginOptions = {}) => {\n const { ignoresJS, sourcemap = false, dir = '' } = options;\n\n const _ignoresJS = toArray(ignoresJS);\n\n const out = {\n name: 'end-bemedev',\n\n onLog: {\n handler: (_, { code, names }) => {\n const EMPTY_CHUNKS = _ignoresJS\n .map(f => globSync(f, { nodir: true }))\n .flat()\n .map(withoutExtension)\n .map(file => relative('src', file));\n\n const check =\n code === WARNING_CODES.EMPTY_BUNDLE &&\n names?.every(name => EMPTY_CHUNKS.includes(name));\n\n if (check) {\n const STARS = '*'.repeat(20);\n console.log(STARS);\n console.log('[end-bemedev] Skipping empty chunk warnings for:');\n names?.forEach(name => console.log(` -> 📄 ${name}`));\n console.log(STARS);\n return false;\n }\n\n return;\n },\n },\n\n closeBundle: {\n order: 'post',\n handler: () => {\n if (_ignoresJS.length > 0) {\n try {\n const files = new Set<string>();\n _ignoresJS.forEach(pat => {\n const globs = globSync(pat, { nodir: true });\n globs.forEach(file => files.add(file));\n });\n cleanupJS(files, dir, sourcemap);\n console.log('Build finished');\n /* v8 ignore next 3 */\n } catch (err) {\n console.error('[end-bemedev] cleanup failed:', err);\n }\n }\n },\n },\n } satisfies RolldownPluginOption;\n\n return out;\n};\n"],"mappings":";;;;;;AAaA,MAAa,SAAS,UAA4B,EAAE,KAAK;CACvD,MAAM,EAAE,WAAW,YAAY,OAAO,MAAM,OAAO;CAEnD,MAAM,aAAa,QAAQ,UAAU;CAmDrC,OAAO;EAhDL,MAAM;EAEN,OAAO,EACL,UAAU,GAAG,EAAE,MAAM,YAAY;GAC/B,MAAM,eAAe,WAClB,KAAI,MAAK,SAAS,GAAG,EAAE,OAAO,MAAM,CAAC,CAAC,CACtC,MAAM,CACN,IAAI,iBAAiB,CACrB,KAAI,SAAQ,SAAS,OAAO,KAAK,CAAC;GAMrC,IAHE,SAAS,cAAc,gBACvB,OAAO,OAAM,SAAQ,aAAa,SAAS,KAAK,CAAC,EAExC;IACT,MAAM,QAAQ,IAAI,OAAO,GAAG;IAC5B,QAAQ,IAAI,MAAM;IAClB,QAAQ,IAAI,mDAAmD;IAC/D,OAAO,SAAQ,SAAQ,QAAQ,IAAI,WAAW,OAAO,CAAC;IACtD,QAAQ,IAAI,MAAM;IAClB,OAAO;;KAKZ;EAED,aAAa;GACX,OAAO;GACP,eAAe;IACb,IAAI,WAAW,SAAS,GACtB,IAAI;KACF,MAAM,wBAAQ,IAAI,KAAa;KAC/B,WAAW,SAAQ,QAAO;MAExB,SADuB,KAAK,EAAE,OAAO,MAAM,CACtC,CAAC,SAAQ,SAAQ,MAAM,IAAI,KAAK,CAAC;OACtC;KACF,UAAU,OAAO,KAAK,UAAU;KAChC,QAAQ,IAAI,iBAAiB;aAEtB,KAAK;KACZ,QAAQ,MAAM,iCAAiC,IAAI;;;GAI1D;EAGO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"externals.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/externals.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport { nodeExternals } from 'rollup-plugin-node-externals';\n\nexport type NodeExternalsOptions = Parameters<typeof nodeExternals>[0];\n\n/**\n * Creates a configured node externals plugin instance\n * @param options - Configuration options for node externals\n * @returns Rolldown plugin\n */\nexport function externals(\n options: NodeExternalsOptions = {},\n): RolldownPluginOption {\n return nodeExternals(options);\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,UACd,UAAgC,EAAE,EACZ;
|
|
1
|
+
{"version":3,"file":"externals.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/externals.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport { nodeExternals } from 'rollup-plugin-node-externals';\n\nexport type NodeExternalsOptions = Parameters<typeof nodeExternals>[0];\n\n/**\n * Creates a configured node externals plugin instance\n * @param options - Configuration options for node externals\n * @returns Rolldown plugin\n */\nexport function externals(\n options: NodeExternalsOptions = {},\n): RolldownPluginOption {\n return nodeExternals(options);\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,UACd,UAAgC,EAAE,EACZ;CACtB,QAAA,GAAA,6BAAA,eAAqB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"externals.js","names":[],"sources":["../../../src/rolldown-config/plugins/externals.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport { nodeExternals } from 'rollup-plugin-node-externals';\n\nexport type NodeExternalsOptions = Parameters<typeof nodeExternals>[0];\n\n/**\n * Creates a configured node externals plugin instance\n * @param options - Configuration options for node externals\n * @returns Rolldown plugin\n */\nexport function externals(\n options: NodeExternalsOptions = {},\n): RolldownPluginOption {\n return nodeExternals(options);\n}\n"],"mappings":";;;;;;;AAUA,SAAgB,UACd,UAAgC,EAAE,EACZ;
|
|
1
|
+
{"version":3,"file":"externals.js","names":[],"sources":["../../../src/rolldown-config/plugins/externals.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport { nodeExternals } from 'rollup-plugin-node-externals';\n\nexport type NodeExternalsOptions = Parameters<typeof nodeExternals>[0];\n\n/**\n * Creates a configured node externals plugin instance\n * @param options - Configuration options for node externals\n * @returns Rolldown plugin\n */\nexport function externals(\n options: NodeExternalsOptions = {},\n): RolldownPluginOption {\n return nodeExternals(options);\n}\n"],"mappings":";;;;;;;AAUA,SAAgB,UACd,UAAgC,EAAE,EACZ;CACtB,OAAO,cAAc,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsPaths.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/tsPaths.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport tsConfigPaths from 'rollup-plugin-tsconfig-paths';\n\nexport type TsConfigPathsOptions = Parameters<typeof tsConfigPaths>[0];\n/**\n * Creates a configured tsconfig-paths plugin instance\n * @param options - Configuration options for tsconfig-paths\n * @returns Rolldown plugin\n */\nexport function tsPaths(\n options: TsConfigPathsOptions = {},\n): RolldownPluginOption {\n return tsConfigPaths(options);\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,QACd,UAAgC,EAAE,EACZ;
|
|
1
|
+
{"version":3,"file":"tsPaths.cjs","names":[],"sources":["../../../src/rolldown-config/plugins/tsPaths.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport tsConfigPaths from 'rollup-plugin-tsconfig-paths';\n\nexport type TsConfigPathsOptions = Parameters<typeof tsConfigPaths>[0];\n/**\n * Creates a configured tsconfig-paths plugin instance\n * @param options - Configuration options for tsconfig-paths\n * @returns Rolldown plugin\n */\nexport function tsPaths(\n options: TsConfigPathsOptions = {},\n): RolldownPluginOption {\n return tsConfigPaths(options);\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,QACd,UAAgC,EAAE,EACZ;CACtB,QAAA,GAAA,6BAAA,SAAqB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsPaths.js","names":[],"sources":["../../../src/rolldown-config/plugins/tsPaths.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport tsConfigPaths from 'rollup-plugin-tsconfig-paths';\n\nexport type TsConfigPathsOptions = Parameters<typeof tsConfigPaths>[0];\n/**\n * Creates a configured tsconfig-paths plugin instance\n * @param options - Configuration options for tsconfig-paths\n * @returns Rolldown plugin\n */\nexport function tsPaths(\n options: TsConfigPathsOptions = {},\n): RolldownPluginOption {\n return tsConfigPaths(options);\n}\n"],"mappings":";;;;;;;AASA,SAAgB,QACd,UAAgC,EAAE,EACZ;
|
|
1
|
+
{"version":3,"file":"tsPaths.js","names":[],"sources":["../../../src/rolldown-config/plugins/tsPaths.ts"],"sourcesContent":["import type { RolldownPluginOption } from 'rolldown';\nimport tsConfigPaths from 'rollup-plugin-tsconfig-paths';\n\nexport type TsConfigPathsOptions = Parameters<typeof tsConfigPaths>[0];\n/**\n * Creates a configured tsconfig-paths plugin instance\n * @param options - Configuration options for tsconfig-paths\n * @returns Rolldown plugin\n */\nexport function tsPaths(\n options: TsConfigPathsOptions = {},\n): RolldownPluginOption {\n return tsConfigPaths(options);\n}\n"],"mappings":";;;;;;;AASA,SAAgB,QACd,UAAgC,EAAE,EACZ;CACtB,OAAO,cAAc,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.cjs","names":["typescript","toArray","ts","existsSync","readTsConfig"],"sources":["../../../src/rolldown-config/plugins/typescript.ts"],"sourcesContent":["import { toArray } from '../utils';\nimport { existsSync } from 'node:fs';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { replaceTscAliasPaths } from 'tsc-alias';\nimport ts from 'typescript';\nimport { readTsConfig } from './typescript.config';\n\ntype Props = {\n exclude?: string | string[];\n include?: Record<string, string>;\n declarationMap?: boolean;\n dir?: string;\n};\n\nexport const typescript = ({\n exclude,\n include,\n declarationMap,\n dir: outDir,\n}: Props = {}): RolldownPluginOption => {\n let done = false;\n\n return {\n name: 'bemedev-dts',\n options(opts) {\n const existing = toArray(opts.external).filter(\n v => typeof v === 'string' || v instanceof RegExp,\n );\n opts.external = [...existing, 'source-map-support'];\n return opts;\n },\n closeBundle: {\n order: 'pre',\n async handler() {\n if (done) return;\n const cwd = process.cwd();\n\n const tsconfigPath = ts.findConfigFile(\n cwd,\n existsSync,\n 'tsconfig.json',\n )!;\n\n const configFile = readTsConfig(tsconfigPath);\n const host = ts.createCompilerHost(configFile.options);\n\n const parsed = ts.parseJsonConfigFileContent(\n {\n ...configFile,\n include,\n exclude: [...toArray(exclude), '*.ts'],\n compilerOptions: {\n ...configFile.options,\n outDir,\n noEmit: false,\n emitDeclarationOnly: true,\n declaration: true,\n declarationMap,\n },\n },\n ts.sys,\n cwd,\n );\n\n const program = ts.createProgram(\n parsed.fileNames,\n {\n ...configFile.options,\n outDir,\n noEmit: false,\n emitDeclarationOnly: true,\n declaration: true,\n declarationMap,\n },\n host,\n );\n\n const emitResult = program.emit();\n\n const errors = ts\n .getPreEmitDiagnostics(program)\n .concat(emitResult.diagnostics)\n .filter(d => d.category === ts.DiagnosticCategory.Error);\n\n if (errors.length > 0) {\n console.error(\n ts.formatDiagnosticsWithColorAndContext(errors, host),\n );\n }\n\n await replaceTscAliasPaths({\n configFile: tsconfigPath,\n outDir,\n });\n\n done = true;\n console.log('DTS generation complete');\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;AAcA,MAAaA,gBAAc,EACzB,SACA,SACA,gBACA,KAAK,WACI,EAAE,KAA2B;CACtC,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"typescript.cjs","names":["typescript","toArray","ts","existsSync","readTsConfig"],"sources":["../../../src/rolldown-config/plugins/typescript.ts"],"sourcesContent":["import { toArray } from '../utils';\nimport { existsSync } from 'node:fs';\nimport type { RolldownPluginOption } from 'rolldown';\nimport { replaceTscAliasPaths } from 'tsc-alias';\nimport ts from 'typescript';\nimport { readTsConfig } from './typescript.config';\n\ntype Props = {\n exclude?: string | string[];\n include?: Record<string, string>;\n declarationMap?: boolean;\n dir?: string;\n};\n\nexport const typescript = ({\n exclude,\n include,\n declarationMap,\n dir: outDir,\n}: Props = {}): RolldownPluginOption => {\n let done = false;\n\n return {\n name: 'bemedev-dts',\n options(opts) {\n const existing = toArray(opts.external).filter(\n v => typeof v === 'string' || v instanceof RegExp,\n );\n opts.external = [...existing, 'source-map-support'];\n return opts;\n },\n closeBundle: {\n order: 'pre',\n async handler() {\n if (done) return;\n const cwd = process.cwd();\n\n const tsconfigPath = ts.findConfigFile(\n cwd,\n existsSync,\n 'tsconfig.json',\n )!;\n\n const configFile = readTsConfig(tsconfigPath);\n const host = ts.createCompilerHost(configFile.options);\n\n const parsed = ts.parseJsonConfigFileContent(\n {\n ...configFile,\n include,\n exclude: [...toArray(exclude), '*.ts'],\n compilerOptions: {\n ...configFile.options,\n outDir,\n noEmit: false,\n emitDeclarationOnly: true,\n declaration: true,\n declarationMap,\n },\n },\n ts.sys,\n cwd,\n );\n\n const program = ts.createProgram(\n parsed.fileNames,\n {\n ...configFile.options,\n outDir,\n noEmit: false,\n emitDeclarationOnly: true,\n declaration: true,\n declarationMap,\n },\n host,\n );\n\n const emitResult = program.emit();\n\n const errors = ts\n .getPreEmitDiagnostics(program)\n .concat(emitResult.diagnostics)\n .filter(d => d.category === ts.DiagnosticCategory.Error);\n\n if (errors.length > 0) {\n console.error(\n ts.formatDiagnosticsWithColorAndContext(errors, host),\n );\n }\n\n await replaceTscAliasPaths({\n configFile: tsconfigPath,\n outDir,\n });\n\n done = true;\n console.log('DTS generation complete');\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;AAcA,MAAaA,gBAAc,EACzB,SACA,SACA,gBACA,KAAK,WACI,EAAE,KAA2B;CACtC,IAAI,OAAO;CAEX,OAAO;EACL,MAAM;EACN,QAAQ,MAAM;GAIZ,KAAK,WAAW,CAAC,GAHAC,8BAAAA,QAAQ,KAAK,SAAS,CAAC,QACtC,MAAK,OAAO,MAAM,YAAY,aAAa,OAEjB,EAAE,qBAAqB;GACnD,OAAO;;EAET,aAAa;GACX,OAAO;GACP,MAAM,UAAU;IACd,IAAI,MAAM;IACV,MAAM,MAAM,QAAQ,KAAK;IAEzB,MAAM,eAAeC,WAAAA,QAAG,eACtB,KACAC,GAAAA,YACA,gBACD;IAED,MAAM,aAAaC,kDAAAA,aAAa,aAAa;IAC7C,MAAM,OAAOF,WAAAA,QAAG,mBAAmB,WAAW,QAAQ;IAEtD,MAAM,SAASA,WAAAA,QAAG,2BAChB;KACE,GAAG;KACH;KACA,SAAS,CAAC,GAAGD,8BAAAA,QAAQ,QAAQ,EAAE,OAAO;KACtC,iBAAiB;MACf,GAAG,WAAW;MACd;MACA,QAAQ;MACR,qBAAqB;MACrB,aAAa;MACb;MACD;KACF,EACDC,WAAAA,QAAG,KACH,IACD;IAED,MAAM,UAAUA,WAAAA,QAAG,cACjB,OAAO,WACP;KACE,GAAG,WAAW;KACd;KACA,QAAQ;KACR,qBAAqB;KACrB,aAAa;KACb;KACD,EACD,KACD;IAED,MAAM,aAAa,QAAQ,MAAM;IAEjC,MAAM,SAASA,WAAAA,QACZ,sBAAsB,QAAQ,CAC9B,OAAO,WAAW,YAAY,CAC9B,QAAO,MAAK,EAAE,aAAaA,WAAAA,QAAG,mBAAmB,MAAM;IAE1D,IAAI,OAAO,SAAS,GAClB,QAAQ,MACNA,WAAAA,QAAG,qCAAqC,QAAQ,KAAK,CACtD;IAGH,OAAA,GAAA,UAAA,sBAA2B;KACzB,YAAY;KACZ;KACD,CAAC;IAEF,OAAO;IACP,QAAQ,IAAI,0BAA0B;;GAEzC;EACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.config.cjs","names":["existsSync","ts","path"],"sources":["../../../src/rolldown-config/plugins/typescript.config.ts"],"sourcesContent":["import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport ts from 'typescript';\n\nconst _readFile = (filePath: string): string | undefined => {\n try {\n return readFileSync(filePath, 'utf-8');\n } catch {\n return undefined;\n }\n};\n\nconst _readDirectory: ts.ParseConfigHost['readDirectory'] = (\n rootDir,\n extensions,\n _,\n __,\n depth,\n): string[] => {\n const results: string[] = [];\n\n const walk = (dir: string, currentDepth: number) => {\n if (depth !== undefined && currentDepth > depth) return;\n\n let entries: string[];\n try {\n entries = readdirSync(dir);\n } catch {\n return;\n }\n\n for (const entry of entries) {\n const fullPath = join(dir, entry);\n let stat;\n try {\n stat = statSync(fullPath);\n } catch {\n continue;\n }\n\n if (stat.isDirectory()) {\n walk(fullPath, currentDepth + 1);\n } else if (\n !extensions ||\n extensions.some(ext => entry.endsWith(ext))\n ) {\n results.push(fullPath);\n }\n }\n };\n\n walk(rootDir, 0);\n return results;\n};\n\nconst _host: ts.ParseConfigHost = {\n useCaseSensitiveFileNames: true,\n readDirectory: _readDirectory,\n fileExists: existsSync,\n readFile: _readFile,\n};\n\nexport const readTsConfig = (path: string) => {\n const configFile = ts.readConfigFile(path, _readFile);\n\n if (configFile.error) {\n throw new Error(\n ts.formatDiagnostic(configFile.error, {\n getCanonicalFileName: f => f,\n getCurrentDirectory: () => process.cwd(),\n getNewLine: () => '\\n',\n }),\n );\n }\n\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n _host,\n dirname(path),\n );\n\n return parsedConfig;\n};\n"],"mappings":";;;;;;;AAIA,MAAM,aAAa,aAAyC;
|
|
1
|
+
{"version":3,"file":"typescript.config.cjs","names":["existsSync","ts","path"],"sources":["../../../src/rolldown-config/plugins/typescript.config.ts"],"sourcesContent":["import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport ts from 'typescript';\n\nconst _readFile = (filePath: string): string | undefined => {\n try {\n return readFileSync(filePath, 'utf-8');\n } catch {\n return undefined;\n }\n};\n\nconst _readDirectory: ts.ParseConfigHost['readDirectory'] = (\n rootDir,\n extensions,\n _,\n __,\n depth,\n): string[] => {\n const results: string[] = [];\n\n const walk = (dir: string, currentDepth: number) => {\n if (depth !== undefined && currentDepth > depth) return;\n\n let entries: string[];\n try {\n entries = readdirSync(dir);\n } catch {\n return;\n }\n\n for (const entry of entries) {\n const fullPath = join(dir, entry);\n let stat;\n try {\n stat = statSync(fullPath);\n } catch {\n continue;\n }\n\n if (stat.isDirectory()) {\n walk(fullPath, currentDepth + 1);\n } else if (\n !extensions ||\n extensions.some(ext => entry.endsWith(ext))\n ) {\n results.push(fullPath);\n }\n }\n };\n\n walk(rootDir, 0);\n return results;\n};\n\nconst _host: ts.ParseConfigHost = {\n useCaseSensitiveFileNames: true,\n readDirectory: _readDirectory,\n fileExists: existsSync,\n readFile: _readFile,\n};\n\nexport const readTsConfig = (path: string) => {\n const configFile = ts.readConfigFile(path, _readFile);\n\n if (configFile.error) {\n throw new Error(\n ts.formatDiagnostic(configFile.error, {\n getCanonicalFileName: f => f,\n getCurrentDirectory: () => process.cwd(),\n getNewLine: () => '\\n',\n }),\n );\n }\n\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n _host,\n dirname(path),\n );\n\n return parsedConfig;\n};\n"],"mappings":";;;;;;;AAIA,MAAM,aAAa,aAAyC;CAC1D,IAAI;EACF,QAAA,GAAA,GAAA,cAAoB,UAAU,QAAQ;SAChC;EACN;;;AAIJ,MAAM,kBACJ,SACA,YACA,GACA,IACA,UACa;CACb,MAAM,UAAoB,EAAE;CAE5B,MAAM,QAAQ,KAAa,iBAAyB;EAClD,IAAI,UAAU,KAAA,KAAa,eAAe,OAAO;EAEjD,IAAI;EACJ,IAAI;GACF,WAAA,GAAA,GAAA,aAAsB,IAAI;UACpB;GACN;;EAGF,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,YAAA,GAAA,KAAA,MAAgB,KAAK,MAAM;GACjC,IAAI;GACJ,IAAI;IACF,QAAA,GAAA,GAAA,UAAgB,SAAS;WACnB;IACN;;GAGF,IAAI,KAAK,aAAa,EACpB,KAAK,UAAU,eAAe,EAAE;QAC3B,IACL,CAAC,cACD,WAAW,MAAK,QAAO,MAAM,SAAS,IAAI,CAAC,EAE3C,QAAQ,KAAK,SAAS;;;CAK5B,KAAK,SAAS,EAAE;CAChB,OAAO;;AAGT,MAAM,QAA4B;CAChC,2BAA2B;CAC3B,eAAe;CACf,YAAYA,GAAAA;CACZ,UAAU;CACX;AAED,MAAa,gBAAgB,WAAiB;CAC5C,MAAM,aAAaC,WAAAA,QAAG,eAAeC,QAAM,UAAU;CAErD,IAAI,WAAW,OACb,MAAM,IAAI,MACRD,WAAAA,QAAG,iBAAiB,WAAW,OAAO;EACpC,uBAAsB,MAAK;EAC3B,2BAA2B,QAAQ,KAAK;EACxC,kBAAkB;EACnB,CAAC,CACH;CASH,OANqBA,WAAAA,QAAG,2BACtB,WAAW,QACX,QAAA,GAAA,KAAA,SACQC,OAAK,CAGI"}
|