create-yoya-ui 0.2.2 → 0.2.3
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/package.json +1 -1
- package/templates/admin/dist/assets/index-C9C1xRte.js +0 -35
- package/templates/admin/dist/assets/index-Dh32qJDx.css +0 -1
- package/templates/admin/dist/index.html +0 -13
- package/templates/admin/node_modules/.bin/nanoid +0 -16
- package/templates/admin/node_modules/.bin/nanoid.cmd +0 -17
- package/templates/admin/node_modules/.bin/nanoid.ps1 +0 -28
- package/templates/admin/node_modules/.bin/rolldown +0 -16
- package/templates/admin/node_modules/.bin/rolldown.cmd +0 -17
- package/templates/admin/node_modules/.bin/rolldown.ps1 +0 -28
- package/templates/admin/node_modules/.bin/tsc +0 -16
- package/templates/admin/node_modules/.bin/tsc.cmd +0 -17
- package/templates/admin/node_modules/.bin/tsc.ps1 +0 -28
- package/templates/admin/node_modules/.bin/vite +0 -16
- package/templates/admin/node_modules/.bin/vite.cmd +0 -17
- package/templates/admin/node_modules/.bin/vite.ps1 +0 -28
- package/templates/admin/node_modules/.package-lock.json +0 -389
- package/templates/admin/node_modules/.vite/deps/@yoyaflow_yoya-ui.js +0 -13116
- package/templates/admin/node_modules/.vite/deps/@yoyaflow_yoya-ui.js.map +0 -1
- package/templates/admin/node_modules/.vite/deps/_metadata.json +0 -15
- package/templates/admin/node_modules/.vite/deps/package.json +0 -3
- package/templates/admin/node_modules/@oxc-project/types/LICENSE +0 -22
- package/templates/admin/node_modules/@oxc-project/types/README.md +0 -3
- package/templates/admin/node_modules/@oxc-project/types/package.json +0 -26
- package/templates/admin/node_modules/@oxc-project/types/types.d.ts +0 -1912
- package/templates/admin/node_modules/@rolldown/binding-win32-x64-msvc/README.md +0 -3
- package/templates/admin/node_modules/@rolldown/binding-win32-x64-msvc/package.json +0 -37
- package/templates/admin/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node +0 -0
- package/templates/admin/node_modules/@rolldown/pluginutils/LICENSE +0 -21
- package/templates/admin/node_modules/@rolldown/pluginutils/README.md +0 -145
- package/templates/admin/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts +0 -194
- package/templates/admin/node_modules/@rolldown/pluginutils/dist/filter/index.mjs +0 -2
- package/templates/admin/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs +0 -323
- package/templates/admin/node_modules/@rolldown/pluginutils/dist/index.d.mts +0 -2
- package/templates/admin/node_modules/@rolldown/pluginutils/dist/index.mjs +0 -2
- package/templates/admin/node_modules/@rolldown/pluginutils/package.json +0 -40
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/LICENSE +0 -55
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/NOTICE.txt +0 -436
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/README.md +0 -3
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.d.ts +0 -20
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.decorators.d.ts +0 -382
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.decorators.legacy.d.ts +0 -20
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.dom.asynciterable.d.ts +0 -18
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.dom.d.ts +0 -45125
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.dom.iterable.d.ts +0 -18
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.collection.d.ts +0 -159
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.core.d.ts +0 -595
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.d.ts +0 -26
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.generator.d.ts +0 -75
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.iterable.d.ts +0 -603
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.promise.d.ts +0 -79
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.proxy.d.ts +0 -126
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.reflect.d.ts +0 -142
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.symbol.d.ts +0 -44
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2015.symbol.wellknown.d.ts +0 -324
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2016.array.include.d.ts +0 -114
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2016.d.ts +0 -19
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2016.full.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2016.intl.d.ts +0 -29
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.arraybuffer.d.ts +0 -19
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.d.ts +0 -24
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.date.d.ts +0 -29
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.full.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.intl.d.ts +0 -42
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.object.d.ts +0 -47
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.sharedmemory.d.ts +0 -133
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.string.d.ts +0 -47
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2017.typedarrays.d.ts +0 -51
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.asyncgenerator.d.ts +0 -75
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.asynciterable.d.ts +0 -51
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.intl.d.ts +0 -81
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.promise.d.ts +0 -28
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2018.regexp.d.ts +0 -35
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.array.d.ts +0 -77
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.intl.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.object.d.ts +0 -31
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.string.d.ts +0 -35
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2019.symbol.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.bigint.d.ts +0 -763
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.d.ts +0 -25
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.date.d.ts +0 -40
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.intl.d.ts +0 -472
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.number.d.ts +0 -26
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.promise.d.ts +0 -45
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.sharedmemory.d.ts +0 -97
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.string.d.ts +0 -42
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2020.symbol.wellknown.d.ts +0 -39
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.intl.d.ts +0 -164
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.promise.d.ts +0 -46
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.string.d.ts +0 -31
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2021.weakref.d.ts +0 -76
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.array.d.ts +0 -119
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.d.ts +0 -23
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.error.d.ts +0 -73
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.intl.d.ts +0 -143
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.object.d.ts +0 -24
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.regexp.d.ts +0 -37
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2022.string.d.ts +0 -23
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2023.array.d.ts +0 -922
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2023.collection.d.ts +0 -19
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2023.d.ts +0 -20
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2023.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2023.intl.d.ts +0 -62
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.arraybuffer.d.ts +0 -63
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.collection.d.ts +0 -27
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.d.ts +0 -24
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.object.d.ts +0 -27
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.promise.d.ts +0 -33
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.regexp.d.ts +0 -23
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.sharedmemory.d.ts +0 -66
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2024.string.d.ts +0 -27
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.collection.d.ts +0 -94
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.d.ts +0 -23
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.float16.d.ts +0 -443
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.intl.d.ts +0 -200
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.iterator.d.ts +0 -146
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.promise.d.ts +0 -32
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es2025.regexp.d.ts +0 -30
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es5.d.ts +0 -4599
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.es6.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.array.d.ts +0 -33
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.collection.d.ts +0 -47
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.d.ts +0 -27
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.date.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.decorators.d.ts +0 -26
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.disposable.d.ts +0 -191
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.error.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.full.d.ts +0 -22
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.intl.d.ts +0 -107
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.sharedmemory.d.ts +0 -23
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.temporal.d.ts +0 -485
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.esnext.typedarrays.d.ts +0 -90
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.scripthost.d.ts +0 -320
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.webworker.asynciterable.d.ts +0 -18
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.webworker.d.ts +0 -15606
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.webworker.importscripts.d.ts +0 -21
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/lib.webworker.iterable.d.ts +0 -18
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/lib/tsc.exe +0 -0
- package/templates/admin/node_modules/@typescript/typescript-win32-x64/package.json +0 -45
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/LICENSE +0 -21
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/README.md +0 -271
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/README.zh-CN.md +0 -272
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/echarts.min.js +0 -45
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya-ui.umd.js +0 -35
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya.core.js +0 -1779
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya.echart.js +0 -643
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya.ssr.js +0 -2856
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya.ui.css +0 -2289
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/dist/yoya.ui.js +0 -13174
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/package.json +0 -94
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/actions.d.ts +0 -166
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/async.d.ts +0 -108
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/chart.d.ts +0 -40
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/core.d.ts +0 -582
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/css.d.ts +0 -5
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/data-display.d.ts +0 -620
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/effects.d.ts +0 -64
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/feedback.d.ts +0 -119
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/form.d.ts +0 -507
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/html.d.ts +0 -288
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/i18n.d.ts +0 -56
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/index.d.ts +0 -4
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/layout.d.ts +0 -444
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/navigation.d.ts +0 -275
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/router.d.ts +0 -123
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/ssr.d.ts +0 -124
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/svg.d.ts +0 -159
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/theme.d.ts +0 -40
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/yoya.core.d.ts +0 -7
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/yoya.echart.d.ts +0 -4
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/yoya.ssr.d.ts +0 -9
- package/templates/admin/node_modules/@yoyaflow/yoya-ui/types/yoya.ui.d.ts +0 -19
- package/templates/admin/node_modules/detect-libc/LICENSE +0 -201
- package/templates/admin/node_modules/detect-libc/README.md +0 -163
- package/templates/admin/node_modules/detect-libc/index.d.ts +0 -14
- package/templates/admin/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/templates/admin/node_modules/detect-libc/lib/elf.js +0 -39
- package/templates/admin/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/templates/admin/node_modules/detect-libc/lib/process.js +0 -24
- package/templates/admin/node_modules/detect-libc/package.json +0 -44
- package/templates/admin/node_modules/fdir/LICENSE +0 -7
- package/templates/admin/node_modules/fdir/README.md +0 -91
- package/templates/admin/node_modules/fdir/dist/index.cjs +0 -588
- package/templates/admin/node_modules/fdir/dist/index.d.cts +0 -155
- package/templates/admin/node_modules/fdir/dist/index.d.mts +0 -155
- package/templates/admin/node_modules/fdir/dist/index.mjs +0 -570
- package/templates/admin/node_modules/fdir/package.json +0 -103
- package/templates/admin/node_modules/lightningcss/LICENSE +0 -373
- package/templates/admin/node_modules/lightningcss/README.md +0 -105
- package/templates/admin/node_modules/lightningcss/node/ast.d.ts +0 -9965
- package/templates/admin/node_modules/lightningcss/node/ast.js.flow +0 -10615
- package/templates/admin/node_modules/lightningcss/node/browserslistToTargets.js +0 -48
- package/templates/admin/node_modules/lightningcss/node/composeVisitors.js +0 -450
- package/templates/admin/node_modules/lightningcss/node/flags.js +0 -28
- package/templates/admin/node_modules/lightningcss/node/index.d.ts +0 -501
- package/templates/admin/node_modules/lightningcss/node/index.js +0 -59
- package/templates/admin/node_modules/lightningcss/node/index.js.flow +0 -854
- package/templates/admin/node_modules/lightningcss/node/index.mjs +0 -4
- package/templates/admin/node_modules/lightningcss/node/targets.d.ts +0 -40
- package/templates/admin/node_modules/lightningcss/node/targets.js.flow +0 -39
- package/templates/admin/node_modules/lightningcss/package.json +0 -110
- package/templates/admin/node_modules/lightningcss-win32-x64-msvc/LICENSE +0 -373
- package/templates/admin/node_modules/lightningcss-win32-x64-msvc/README.md +0 -1
- package/templates/admin/node_modules/lightningcss-win32-x64-msvc/lightningcss.win32-x64-msvc.node +0 -0
- package/templates/admin/node_modules/lightningcss-win32-x64-msvc/package.json +0 -34
- package/templates/admin/node_modules/nanoid/LICENSE +0 -20
- package/templates/admin/node_modules/nanoid/README.md +0 -39
- package/templates/admin/node_modules/nanoid/async/index.browser.cjs +0 -43
- package/templates/admin/node_modules/nanoid/async/index.browser.js +0 -43
- package/templates/admin/node_modules/nanoid/async/index.cjs +0 -47
- package/templates/admin/node_modules/nanoid/async/index.d.ts +0 -56
- package/templates/admin/node_modules/nanoid/async/index.js +0 -47
- package/templates/admin/node_modules/nanoid/async/index.native.js +0 -38
- package/templates/admin/node_modules/nanoid/async/package.json +0 -12
- package/templates/admin/node_modules/nanoid/bin/nanoid.cjs +0 -55
- package/templates/admin/node_modules/nanoid/index.browser.cjs +0 -45
- package/templates/admin/node_modules/nanoid/index.browser.js +0 -45
- package/templates/admin/node_modules/nanoid/index.cjs +0 -58
- package/templates/admin/node_modules/nanoid/index.d.cts +0 -91
- package/templates/admin/node_modules/nanoid/index.d.ts +0 -91
- package/templates/admin/node_modules/nanoid/index.js +0 -63
- package/templates/admin/node_modules/nanoid/nanoid.js +0 -1
- package/templates/admin/node_modules/nanoid/non-secure/index.cjs +0 -24
- package/templates/admin/node_modules/nanoid/non-secure/index.d.ts +0 -33
- package/templates/admin/node_modules/nanoid/non-secure/index.js +0 -24
- package/templates/admin/node_modules/nanoid/non-secure/package.json +0 -6
- package/templates/admin/node_modules/nanoid/package.json +0 -89
- package/templates/admin/node_modules/nanoid/url-alphabet/index.cjs +0 -4
- package/templates/admin/node_modules/nanoid/url-alphabet/index.js +0 -4
- package/templates/admin/node_modules/nanoid/url-alphabet/package.json +0 -6
- package/templates/admin/node_modules/picocolors/LICENSE +0 -15
- package/templates/admin/node_modules/picocolors/README.md +0 -21
- package/templates/admin/node_modules/picocolors/package.json +0 -25
- package/templates/admin/node_modules/picocolors/picocolors.browser.js +0 -4
- package/templates/admin/node_modules/picocolors/picocolors.d.ts +0 -5
- package/templates/admin/node_modules/picocolors/picocolors.js +0 -75
- package/templates/admin/node_modules/picocolors/types.d.ts +0 -51
- package/templates/admin/node_modules/picomatch/LICENSE +0 -21
- package/templates/admin/node_modules/picomatch/README.md +0 -743
- package/templates/admin/node_modules/picomatch/index.js +0 -17
- package/templates/admin/node_modules/picomatch/lib/constants.js +0 -184
- package/templates/admin/node_modules/picomatch/lib/parse.js +0 -1425
- package/templates/admin/node_modules/picomatch/lib/picomatch.js +0 -361
- package/templates/admin/node_modules/picomatch/lib/scan.js +0 -403
- package/templates/admin/node_modules/picomatch/lib/utils.js +0 -72
- package/templates/admin/node_modules/picomatch/package.json +0 -83
- package/templates/admin/node_modules/picomatch/posix.js +0 -3
- package/templates/admin/node_modules/postcss/LICENSE +0 -20
- package/templates/admin/node_modules/postcss/README.md +0 -27
- package/templates/admin/node_modules/postcss/lib/at-rule.d.ts +0 -139
- package/templates/admin/node_modules/postcss/lib/at-rule.js +0 -25
- package/templates/admin/node_modules/postcss/lib/comment.d.ts +0 -67
- package/templates/admin/node_modules/postcss/lib/comment.js +0 -13
- package/templates/admin/node_modules/postcss/lib/container.d.ts +0 -478
- package/templates/admin/node_modules/postcss/lib/container.js +0 -494
- package/templates/admin/node_modules/postcss/lib/css-syntax-error.d.ts +0 -247
- package/templates/admin/node_modules/postcss/lib/css-syntax-error.js +0 -133
- package/templates/admin/node_modules/postcss/lib/declaration.d.ts +0 -150
- package/templates/admin/node_modules/postcss/lib/declaration.js +0 -24
- package/templates/admin/node_modules/postcss/lib/document.d.ts +0 -68
- package/templates/admin/node_modules/postcss/lib/document.js +0 -33
- package/templates/admin/node_modules/postcss/lib/fromJSON.d.ts +0 -9
- package/templates/admin/node_modules/postcss/lib/fromJSON.js +0 -107
- package/templates/admin/node_modules/postcss/lib/input.d.ts +0 -226
- package/templates/admin/node_modules/postcss/lib/input.js +0 -282
- package/templates/admin/node_modules/postcss/lib/lazy-result.d.ts +0 -189
- package/templates/admin/node_modules/postcss/lib/lazy-result.js +0 -626
- package/templates/admin/node_modules/postcss/lib/list.d.ts +0 -60
- package/templates/admin/node_modules/postcss/lib/list.js +0 -59
- package/templates/admin/node_modules/postcss/lib/map-generator.js +0 -376
- package/templates/admin/node_modules/postcss/lib/no-work-result.d.ts +0 -45
- package/templates/admin/node_modules/postcss/lib/no-work-result.js +0 -137
- package/templates/admin/node_modules/postcss/lib/node.d.ts +0 -555
- package/templates/admin/node_modules/postcss/lib/node.js +0 -494
- package/templates/admin/node_modules/postcss/lib/parse.d.ts +0 -9
- package/templates/admin/node_modules/postcss/lib/parse.js +0 -42
- package/templates/admin/node_modules/postcss/lib/parser.js +0 -618
- package/templates/admin/node_modules/postcss/lib/postcss.d.mts +0 -66
- package/templates/admin/node_modules/postcss/lib/postcss.d.ts +0 -464
- package/templates/admin/node_modules/postcss/lib/postcss.js +0 -101
- package/templates/admin/node_modules/postcss/lib/postcss.mjs +0 -30
- package/templates/admin/node_modules/postcss/lib/previous-map.d.ts +0 -80
- package/templates/admin/node_modules/postcss/lib/previous-map.js +0 -176
- package/templates/admin/node_modules/postcss/lib/processor.d.ts +0 -114
- package/templates/admin/node_modules/postcss/lib/processor.js +0 -67
- package/templates/admin/node_modules/postcss/lib/result.d.ts +0 -204
- package/templates/admin/node_modules/postcss/lib/result.js +0 -42
- package/templates/admin/node_modules/postcss/lib/root.d.ts +0 -86
- package/templates/admin/node_modules/postcss/lib/root.js +0 -76
- package/templates/admin/node_modules/postcss/lib/rule.d.ts +0 -126
- package/templates/admin/node_modules/postcss/lib/rule.js +0 -27
- package/templates/admin/node_modules/postcss/lib/stringifier.d.ts +0 -45
- package/templates/admin/node_modules/postcss/lib/stringifier.js +0 -461
- package/templates/admin/node_modules/postcss/lib/stringify.d.ts +0 -9
- package/templates/admin/node_modules/postcss/lib/stringify.js +0 -11
- package/templates/admin/node_modules/postcss/lib/symbols.js +0 -5
- package/templates/admin/node_modules/postcss/lib/terminal-highlight.js +0 -70
- package/templates/admin/node_modules/postcss/lib/tokenize.js +0 -270
- package/templates/admin/node_modules/postcss/lib/warn-once.js +0 -13
- package/templates/admin/node_modules/postcss/lib/warning.d.ts +0 -146
- package/templates/admin/node_modules/postcss/lib/warning.js +0 -47
- package/templates/admin/node_modules/postcss/package.json +0 -88
- package/templates/admin/node_modules/rolldown/LICENSE +0 -25
- package/templates/admin/node_modules/rolldown/README.md +0 -11
- package/templates/admin/node_modules/rolldown/THIRD-PARTY-LICENSE +0 -33
- package/templates/admin/node_modules/rolldown/bin/cli.mjs +0 -11
- package/templates/admin/node_modules/rolldown/dist/cli.d.mts +0 -1
- package/templates/admin/node_modules/rolldown/dist/cli.mjs +0 -1208
- package/templates/admin/node_modules/rolldown/dist/config.d.mts +0 -26
- package/templates/admin/node_modules/rolldown/dist/config.mjs +0 -4
- package/templates/admin/node_modules/rolldown/dist/experimental-default-runtime.mjs +0 -116
- package/templates/admin/node_modules/rolldown/dist/experimental-index.d.mts +0 -324
- package/templates/admin/node_modules/rolldown/dist/experimental-index.mjs +0 -383
- package/templates/admin/node_modules/rolldown/dist/experimental-runtime-base.mjs +0 -95
- package/templates/admin/node_modules/rolldown/dist/experimental-runtime-types.d.ts +0 -177
- package/templates/admin/node_modules/rolldown/dist/experimental-runtime.d.ts +0 -177
- package/templates/admin/node_modules/rolldown/dist/experimental-runtime.mjs +0 -257
- package/templates/admin/node_modules/rolldown/dist/filter-index.d.mts +0 -196
- package/templates/admin/node_modules/rolldown/dist/filter-index.mjs +0 -376
- package/templates/admin/node_modules/rolldown/dist/get-log-filter.d.mts +0 -3
- package/templates/admin/node_modules/rolldown/dist/get-log-filter.mjs +0 -68
- package/templates/admin/node_modules/rolldown/dist/index.d.mts +0 -4
- package/templates/admin/node_modules/rolldown/dist/index.mjs +0 -56
- package/templates/admin/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +0 -1
- package/templates/admin/node_modules/rolldown/dist/parallel-plugin-worker.mjs +0 -29
- package/templates/admin/node_modules/rolldown/dist/parallel-plugin.d.mts +0 -12
- package/templates/admin/node_modules/rolldown/dist/parallel-plugin.mjs +0 -6
- package/templates/admin/node_modules/rolldown/dist/parse-ast-index.d.mts +0 -30
- package/templates/admin/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
- package/templates/admin/node_modules/rolldown/dist/plugins-index.d.mts +0 -32
- package/templates/admin/node_modules/rolldown/dist/plugins-index.mjs +0 -40
- package/templates/admin/node_modules/rolldown/dist/shared/binding-CtPG-2KR.mjs +0 -675
- package/templates/admin/node_modules/rolldown/dist/shared/binding-Og__jmUi.d.mts +0 -2065
- package/templates/admin/node_modules/rolldown/dist/shared/bindingify-input-options-4JJxbZl2.mjs +0 -2416
- package/templates/admin/node_modules/rolldown/dist/shared/constructors-Qrp2Xr6w.d.mts +0 -35
- package/templates/admin/node_modules/rolldown/dist/shared/constructors-ltBDfHX1.mjs +0 -69
- package/templates/admin/node_modules/rolldown/dist/shared/create-bundler-option-DSPiA5F7.mjs +0 -3220
- package/templates/admin/node_modules/rolldown/dist/shared/define-config-Demdg3_4.mjs +0 -6
- package/templates/admin/node_modules/rolldown/dist/shared/define-config-Nbz-lniw.d.mts +0 -4101
- package/templates/admin/node_modules/rolldown/dist/shared/dist-DKbukT1H.mjs +0 -154
- package/templates/admin/node_modules/rolldown/dist/shared/error-HDibX49O.mjs +0 -85
- package/templates/admin/node_modules/rolldown/dist/shared/get-log-filter-AjBknEEO.d.mts +0 -34
- package/templates/admin/node_modules/rolldown/dist/shared/load-config-BMUrE9HH.mjs +0 -137
- package/templates/admin/node_modules/rolldown/dist/shared/logging-xuHO4mAy.d.mts +0 -50
- package/templates/admin/node_modules/rolldown/dist/shared/logs-DmYCAKcW.mjs +0 -192
- package/templates/admin/node_modules/rolldown/dist/shared/misc-DOSKtd97.mjs +0 -29
- package/templates/admin/node_modules/rolldown/dist/shared/normalize-string-or-regex-DWz4it3p.mjs +0 -68
- package/templates/admin/node_modules/rolldown/dist/shared/parse-D0g29RgN.mjs +0 -74
- package/templates/admin/node_modules/rolldown/dist/shared/prompt-CH6TK0bC.mjs +0 -885
- package/templates/admin/node_modules/rolldown/dist/shared/resolve-tsconfig-CLYpUIZC.mjs +0 -128
- package/templates/admin/node_modules/rolldown/dist/shared/rolldown-C9Hfg50O.mjs +0 -179
- package/templates/admin/node_modules/rolldown/dist/shared/transform-DR4CXeQm.d.mts +0 -152
- package/templates/admin/node_modules/rolldown/dist/shared/watch-UbzgabQn.mjs +0 -377
- package/templates/admin/node_modules/rolldown/dist/utils-index.d.mts +0 -375
- package/templates/admin/node_modules/rolldown/dist/utils-index.mjs +0 -2416
- package/templates/admin/node_modules/rolldown/package.json +0 -164
- package/templates/admin/node_modules/source-map-js/LICENSE +0 -28
- package/templates/admin/node_modules/source-map-js/README.md +0 -765
- package/templates/admin/node_modules/source-map-js/lib/array-set.js +0 -121
- package/templates/admin/node_modules/source-map-js/lib/base64-vlq.js +0 -140
- package/templates/admin/node_modules/source-map-js/lib/base64.js +0 -67
- package/templates/admin/node_modules/source-map-js/lib/binary-search.js +0 -111
- package/templates/admin/node_modules/source-map-js/lib/mapping-list.js +0 -79
- package/templates/admin/node_modules/source-map-js/lib/quick-sort.js +0 -132
- package/templates/admin/node_modules/source-map-js/lib/source-map-consumer.d.ts +0 -1
- package/templates/admin/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
- package/templates/admin/node_modules/source-map-js/lib/source-map-generator.d.ts +0 -1
- package/templates/admin/node_modules/source-map-js/lib/source-map-generator.js +0 -444
- package/templates/admin/node_modules/source-map-js/lib/source-node.d.ts +0 -1
- package/templates/admin/node_modules/source-map-js/lib/source-node.js +0 -413
- package/templates/admin/node_modules/source-map-js/lib/util.js +0 -594
- package/templates/admin/node_modules/source-map-js/package.json +0 -71
- package/templates/admin/node_modules/source-map-js/source-map.d.ts +0 -104
- package/templates/admin/node_modules/source-map-js/source-map.js +0 -8
- package/templates/admin/node_modules/tinyglobby/LICENSE +0 -21
- package/templates/admin/node_modules/tinyglobby/README.md +0 -25
- package/templates/admin/node_modules/tinyglobby/dist/index.cjs +0 -335
- package/templates/admin/node_modules/tinyglobby/dist/index.d.cts +0 -148
- package/templates/admin/node_modules/tinyglobby/dist/index.d.mts +0 -148
- package/templates/admin/node_modules/tinyglobby/dist/index.mjs +0 -307
- package/templates/admin/node_modules/tinyglobby/package.json +0 -70
- package/templates/admin/node_modules/typescript/LICENSE +0 -55
- package/templates/admin/node_modules/typescript/NOTICE.txt +0 -436
- package/templates/admin/node_modules/typescript/README.md +0 -49
- package/templates/admin/node_modules/typescript/bin/tsc +0 -2
- package/templates/admin/node_modules/typescript/dist/api/async/api.d.ts +0 -529
- package/templates/admin/node_modules/typescript/dist/api/async/api.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/async/api.js +0 -1657
- package/templates/admin/node_modules/typescript/dist/api/async/api.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/async/client.d.ts +0 -39
- package/templates/admin/node_modules/typescript/dist/api/async/client.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/async/client.js +0 -211
- package/templates/admin/node_modules/typescript/dist/api/async/client.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/async/types.d.ts +0 -310
- package/templates/admin/node_modules/typescript/dist/api/async/types.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/async/types.js +0 -2
- package/templates/admin/node_modules/typescript/dist/api/async/types.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/compilerOptions.d.ts +0 -109
- package/templates/admin/node_modules/typescript/dist/api/compilerOptions.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/compilerOptions.js +0 -2
- package/templates/admin/node_modules/typescript/dist/api/compilerOptions.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/fs.d.ts +0 -23
- package/templates/admin/node_modules/typescript/dist/api/fs.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/fs.js +0 -109
- package/templates/admin/node_modules/typescript/dist/api/fs.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.d.ts +0 -15
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.generated.d.ts +0 -5
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.generated.js +0 -74
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.js +0 -287
- package/templates/admin/node_modules/typescript/dist/api/node/encoder.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/msgpack.d.ts +0 -32
- package/templates/admin/node_modules/typescript/dist/api/node/msgpack.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/msgpack.js +0 -213
- package/templates/admin/node_modules/typescript/dist/api/node/msgpack.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.d.ts +0 -76
- package/templates/admin/node_modules/typescript/dist/api/node/node.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.generated.d.ts +0 -182
- package/templates/admin/node_modules/typescript/dist/api/node/node.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.generated.js +0 -835
- package/templates/admin/node_modules/typescript/dist/api/node/node.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +0 -62
- package/templates/admin/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.infrastructure.js +0 -122
- package/templates/admin/node_modules/typescript/dist/api/node/node.infrastructure.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/node.js +0 -298
- package/templates/admin/node_modules/typescript/dist/api/node/node.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.d.ts +0 -29
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.generated.d.ts +0 -4
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.generated.js +0 -241
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.js +0 -30
- package/templates/admin/node_modules/typescript/dist/api/node/protocol.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/wtf8.d.ts +0 -6
- package/templates/admin/node_modules/typescript/dist/api/node/wtf8.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/node/wtf8.js +0 -61
- package/templates/admin/node_modules/typescript/dist/api/node/wtf8.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/options.d.ts +0 -32
- package/templates/admin/node_modules/typescript/dist/api/options.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/options.js +0 -11
- package/templates/admin/node_modules/typescript/dist/api/options.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/path.d.ts +0 -110
- package/templates/admin/node_modules/typescript/dist/api/path.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/path.js +0 -508
- package/templates/admin/node_modules/typescript/dist/api/path.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/proto.d.ts +0 -239
- package/templates/admin/node_modules/typescript/dist/api/proto.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/proto.js +0 -37
- package/templates/admin/node_modules/typescript/dist/api/proto.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sourceFileCache.d.ts +0 -79
- package/templates/admin/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sourceFileCache.js +0 -169
- package/templates/admin/node_modules/typescript/dist/api/sourceFileCache.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/api.d.ts +0 -529
- package/templates/admin/node_modules/typescript/dist/api/sync/api.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/api.js +0 -1665
- package/templates/admin/node_modules/typescript/dist/api/sync/api.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/client.d.ts +0 -30
- package/templates/admin/node_modules/typescript/dist/api/sync/client.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/client.js +0 -124
- package/templates/admin/node_modules/typescript/dist/api/sync/client.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/types.d.ts +0 -310
- package/templates/admin/node_modules/typescript/dist/api/sync/types.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/sync/types.js +0 -2
- package/templates/admin/node_modules/typescript/dist/api/sync/types.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/syncChannel.d.ts +0 -114
- package/templates/admin/node_modules/typescript/dist/api/syncChannel.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/syncChannel.js +0 -508
- package/templates/admin/node_modules/typescript/dist/api/syncChannel.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/timing.d.ts +0 -175
- package/templates/admin/node_modules/typescript/dist/api/timing.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/api/timing.js +0 -149
- package/templates/admin/node_modules/typescript/dist/api/timing.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/ast.d.ts +0 -100
- package/templates/admin/node_modules/typescript/dist/ast/ast.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/ast.generated.d.ts +0 -1161
- package/templates/admin/node_modules/typescript/dist/ast/ast.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/ast.generated.js +0 -4
- package/templates/admin/node_modules/typescript/dist/ast/ast.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/ast.js +0 -7
- package/templates/admin/node_modules/typescript/dist/ast/ast.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/astnav.d.ts +0 -19
- package/templates/admin/node_modules/typescript/dist/ast/astnav.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/astnav.js +0 -596
- package/templates/admin/node_modules/typescript/dist/ast/astnav.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/clone.d.ts +0 -16
- package/templates/admin/node_modules/typescript/dist/ast/clone.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/clone.js +0 -104
- package/templates/admin/node_modules/typescript/dist/ast/clone.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/factory.generated.d.ts +0 -520
- package/templates/admin/node_modules/typescript/dist/ast/factory.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/factory.generated.js +0 -3057
- package/templates/admin/node_modules/typescript/dist/ast/factory.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/index.d.ts +0 -20
- package/templates/admin/node_modules/typescript/dist/ast/index.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/index.js +0 -20
- package/templates/admin/node_modules/typescript/dist/ast/index.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/is.d.ts +0 -35
- package/templates/admin/node_modules/typescript/dist/ast/is.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/is.generated.d.ts +0 -329
- package/templates/admin/node_modules/typescript/dist/ast/is.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/is.generated.js +0 -1103
- package/templates/admin/node_modules/typescript/dist/ast/is.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/is.js +0 -233
- package/templates/admin/node_modules/typescript/dist/ast/is.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/jsdoc.d.ts +0 -11
- package/templates/admin/node_modules/typescript/dist/ast/jsdoc.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/jsdoc.js +0 -202
- package/templates/admin/node_modules/typescript/dist/ast/jsdoc.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/scanner.d.ts +0 -97
- package/templates/admin/node_modules/typescript/dist/ast/scanner.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/scanner.js +0 -2230
- package/templates/admin/node_modules/typescript/dist/ast/scanner.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/utils.d.ts +0 -17
- package/templates/admin/node_modules/typescript/dist/ast/utils.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/utils.js +0 -67
- package/templates/admin/node_modules/typescript/dist/ast/utils.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/visitor.d.ts +0 -14
- package/templates/admin/node_modules/typescript/dist/ast/visitor.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/visitor.generated.d.ts +0 -50
- package/templates/admin/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/visitor.generated.js +0 -978
- package/templates/admin/node_modules/typescript/dist/ast/visitor.generated.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/ast/visitor.js +0 -47
- package/templates/admin/node_modules/typescript/dist/ast/visitor.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +0 -129
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.enum.js +0 -132
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.js +0 -130
- package/templates/admin/node_modules/typescript/dist/enums/characterCodes.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +0 -5
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +0 -6
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.js +0 -6
- package/templates/admin/node_modules/typescript/dist/enums/commentDirectiveType.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +0 -28
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.enum.js +0 -30
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.js +0 -30
- package/templates/admin/node_modules/typescript/dist/enums/completionItemKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +0 -7
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/diagnosticCategory.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +0 -12
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.enum.js +0 -14
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.js +0 -14
- package/templates/admin/node_modules/typescript/dist/enums/elementFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +0 -23
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.enum.js +0 -25
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.js +0 -25
- package/templates/admin/node_modules/typescript/dist/enums/internalSymbolName.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.enum.js +0 -11
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.js +0 -11
- package/templates/admin/node_modules/typescript/dist/enums/jsxEmit.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +0 -5
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.enum.js +0 -6
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.js +0 -6
- package/templates/admin/node_modules/typescript/dist/enums/languageVariant.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +0 -42
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.enum.js +0 -44
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.js +0 -44
- package/templates/admin/node_modules/typescript/dist/enums/modifierFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +0 -7
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +0 -17
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.enum.js +0 -19
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.js +0 -19
- package/templates/admin/node_modules/typescript/dist/enums/moduleKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +0 -11
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.js +0 -11
- package/templates/admin/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +0 -6
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.enum.js +0 -8
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.js +0 -8
- package/templates/admin/node_modules/typescript/dist/enums/newLineKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +0 -36
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +0 -38
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.js +0 -38
- package/templates/admin/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +0 -44
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.enum.js +0 -46
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.js +0 -46
- package/templates/admin/node_modules/typescript/dist/enums/nodeFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +0 -50
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.enum.js +0 -52
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.js +0 -52
- package/templates/admin/node_modules/typescript/dist/enums/objectFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +0 -16
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +0 -18
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.js +0 -18
- package/templates/admin/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +0 -13
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +0 -14
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.js +0 -14
- package/templates/admin/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +0 -11
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.enum.js +0 -12
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.js +0 -12
- package/templates/admin/node_modules/typescript/dist/enums/scriptKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +0 -17
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.enum.js +0 -18
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.js +0 -18
- package/templates/admin/node_modules/typescript/dist/enums/scriptTarget.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +0 -15
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.enum.js +0 -17
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.js +0 -17
- package/templates/admin/node_modules/typescript/dist/enums/signatureFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +0 -5
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.enum.js +0 -7
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.js +0 -7
- package/templates/admin/node_modules/typescript/dist/enums/signatureKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +0 -71
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.enum.js +0 -73
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.js +0 -73
- package/templates/admin/node_modules/typescript/dist/enums/symbolFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +0 -389
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.enum.js +0 -391
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.js +0 -391
- package/templates/admin/node_modules/typescript/dist/enums/syntaxKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +0 -30
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.enum.js +0 -32
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.js +0 -32
- package/templates/admin/node_modules/typescript/dist/enums/tokenFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +0 -76
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.enum.js +0 -78
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.js +0 -78
- package/templates/admin/node_modules/typescript/dist/enums/typeFlags.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.d.ts +0 -2
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +0 -7
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.enum.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.js +0 -9
- package/templates/admin/node_modules/typescript/dist/enums/typePredicateKind.js.map +0 -1
- package/templates/admin/node_modules/typescript/dist/internal/utils.d.ts +0 -23
- package/templates/admin/node_modules/typescript/dist/internal/utils.d.ts.map +0 -1
- package/templates/admin/node_modules/typescript/dist/internal/utils.js +0 -25
- package/templates/admin/node_modules/typescript/dist/internal/utils.js.map +0 -1
- package/templates/admin/node_modules/typescript/lib/getExePath.d.ts +0 -2
- package/templates/admin/node_modules/typescript/lib/getExePath.js +0 -70
- package/templates/admin/node_modules/typescript/lib/tsc.js +0 -28
- package/templates/admin/node_modules/typescript/lib/version.cjs +0 -3
- package/templates/admin/node_modules/typescript/lib/version.d.cts +0 -2
- package/templates/admin/node_modules/typescript/package.json +0 -87
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +0 -11
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/README.md +0 -54
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +0 -83
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +0 -22
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +0 -210
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +0 -14
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +0 -87
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +0 -132
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +0 -367
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +0 -1271
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +0 -16
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +0 -70
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +0 -39
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +0 -135
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +0 -7
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +0 -34
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -55
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +0 -412
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +0 -155
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +0 -246
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +0 -157
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +0 -436
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +0 -23
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +0 -74
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -77
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +0 -58
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +0 -289
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +0 -12
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +0 -163
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/package.json +0 -54
- package/templates/admin/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +0 -5
- package/templates/admin/node_modules/vite/LICENSE.md +0 -2322
- package/templates/admin/node_modules/vite/README.md +0 -20
- package/templates/admin/node_modules/vite/bin/openChrome.js +0 -68
- package/templates/admin/node_modules/vite/bin/vite.js +0 -79
- package/templates/admin/node_modules/vite/client.d.ts +0 -285
- package/templates/admin/node_modules/vite/dist/client/bundledDevClient.mjs +0 -1829
- package/templates/admin/node_modules/vite/dist/client/client.mjs +0 -1244
- package/templates/admin/node_modules/vite/dist/client/env.mjs +0 -18
- package/templates/admin/node_modules/vite/dist/node/chunks/build.js +0 -5494
- package/templates/admin/node_modules/vite/dist/node/chunks/dist.js +0 -6732
- package/templates/admin/node_modules/vite/dist/node/chunks/lib.js +0 -371
- package/templates/admin/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +0 -95
- package/templates/admin/node_modules/vite/dist/node/chunks/node.js +0 -37269
- package/templates/admin/node_modules/vite/dist/node/chunks/postcss-import.js +0 -465
- package/templates/admin/node_modules/vite/dist/node/cli.js +0 -835
- package/templates/admin/node_modules/vite/dist/node/index.d.ts +0 -4069
- package/templates/admin/node_modules/vite/dist/node/index.js +0 -2
- package/templates/admin/node_modules/vite/dist/node/internal.d.ts +0 -2
- package/templates/admin/node_modules/vite/dist/node/internal.js +0 -2
- package/templates/admin/node_modules/vite/dist/node/module-runner.d.ts +0 -313
- package/templates/admin/node_modules/vite/dist/node/module-runner.js +0 -1288
- package/templates/admin/node_modules/vite/misc/false.js +0 -1
- package/templates/admin/node_modules/vite/misc/true.js +0 -1
- package/templates/admin/node_modules/vite/package.json +0 -194
- package/templates/admin/node_modules/vite/types/customEvent.d.ts +0 -81
- package/templates/admin/node_modules/vite/types/hmrPayload.d.ts +0 -94
- package/templates/admin/node_modules/vite/types/hot.d.ts +0 -39
- package/templates/admin/node_modules/vite/types/import-meta.d.ts +0 -5
- package/templates/admin/node_modules/vite/types/importGlob.d.ts +0 -131
- package/templates/admin/node_modules/vite/types/importMeta.d.ts +0 -30
- package/templates/admin/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +0 -44
- package/templates/admin/node_modules/vite/types/internal/esbuildOptions.d.ts +0 -28
- package/templates/admin/node_modules/vite/types/internal/lightningcssOptions.d.ts +0 -18
- package/templates/admin/node_modules/vite/types/internal/rollupTypeCompat.d.ts +0 -24
- package/templates/admin/node_modules/vite/types/internal/terserOptions.d.ts +0 -11
- package/templates/admin/node_modules/vite/types/metadata.d.ts +0 -47
package/templates/admin/node_modules/rolldown/dist/shared/create-bundler-option-DSPiA5F7.mjs
DELETED
|
@@ -1,3220 +0,0 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-CtPG-2KR.mjs";
|
|
2
|
-
import { a as logInputHookInOutputPlugin, n as error } from "./logs-DmYCAKcW.mjs";
|
|
3
|
-
import { n as BuiltinPlugin } from "./normalize-string-or-regex-DWz4it3p.mjs";
|
|
4
|
-
import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-4JJxbZl2.mjs";
|
|
5
|
-
import { a as unimplemented } from "./misc-DOSKtd97.mjs";
|
|
6
|
-
import { Worker } from "node:worker_threads";
|
|
7
|
-
import path, { sep } from "node:path";
|
|
8
|
-
import { formatWithOptions, styleText } from "node:util";
|
|
9
|
-
import g$1 from "node:process";
|
|
10
|
-
import * as tty from "node:tty";
|
|
11
|
-
import os from "node:os";
|
|
12
|
-
//#region src/log/logger.ts
|
|
13
|
-
function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
14
|
-
const minimalPriority = logLevelPriority[logLevel];
|
|
15
|
-
const logger = (level, log, skipped = /* @__PURE__ */ new Set()) => {
|
|
16
|
-
if (logLevelPriority[level] < minimalPriority) return;
|
|
17
|
-
for (const plugin of getSortedPlugins("onLog", plugins)) {
|
|
18
|
-
if (skipped.has(plugin)) continue;
|
|
19
|
-
const { onLog: pluginOnLog } = plugin;
|
|
20
|
-
if (pluginOnLog) {
|
|
21
|
-
const getLogHandler = (level) => {
|
|
22
|
-
if (logLevelPriority[level] < minimalPriority) return () => {};
|
|
23
|
-
return (log) => logger(level, normalizeLog(log), new Set(skipped).add(plugin));
|
|
24
|
-
};
|
|
25
|
-
if (("handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({
|
|
26
|
-
debug: getLogHandler("debug"),
|
|
27
|
-
error: (log) => error(normalizeLog(log)),
|
|
28
|
-
info: getLogHandler("info"),
|
|
29
|
-
meta: {
|
|
30
|
-
rollupVersion: "4.23.0",
|
|
31
|
-
rolldownVersion: VERSION,
|
|
32
|
-
watchMode
|
|
33
|
-
},
|
|
34
|
-
warn: getLogHandler("warn"),
|
|
35
|
-
pluginName: plugin.name || "unknown"
|
|
36
|
-
}, level, log) === false) return;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
onLog(level, log);
|
|
40
|
-
};
|
|
41
|
-
return logger;
|
|
42
|
-
}
|
|
43
|
-
const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
|
|
44
|
-
const { onwarn, onLog } = config;
|
|
45
|
-
const defaultOnLog = getDefaultOnLog(printLog, onwarn);
|
|
46
|
-
if (onLog) {
|
|
47
|
-
const minimalPriority = logLevelPriority[logLevel];
|
|
48
|
-
return (level, log) => onLog(level, addLogToString(log), (level, handledLog) => {
|
|
49
|
-
if (level === "error") return error(normalizeLog(handledLog));
|
|
50
|
-
if (logLevelPriority[level] >= minimalPriority) defaultOnLog(level, normalizeLog(handledLog));
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return defaultOnLog;
|
|
54
|
-
};
|
|
55
|
-
const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
|
|
56
|
-
if (level === "warn") onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
|
|
57
|
-
else printLog(level, log);
|
|
58
|
-
} : printLog;
|
|
59
|
-
const addLogToString = (log) => {
|
|
60
|
-
Object.defineProperty(log, "toString", {
|
|
61
|
-
value: () => getExtendedLogMessage(log),
|
|
62
|
-
writable: true
|
|
63
|
-
});
|
|
64
|
-
return log;
|
|
65
|
-
};
|
|
66
|
-
const defaultPrintLog = (level, log) => {
|
|
67
|
-
const message = getExtendedLogMessage(log);
|
|
68
|
-
switch (level) {
|
|
69
|
-
case LOG_LEVEL_WARN: return console.warn(message);
|
|
70
|
-
case LOG_LEVEL_DEBUG: return console.debug(message);
|
|
71
|
-
default: return console.info(message);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const getExtendedLogMessage = (log) => {
|
|
75
|
-
let prefix = "";
|
|
76
|
-
if (log.plugin) prefix += `(${log.plugin} plugin) `;
|
|
77
|
-
if (log.loc) prefix += `${relativeId(log.loc.file)} (${log.loc.line}:${log.loc.column}) `;
|
|
78
|
-
return prefix + log.message;
|
|
79
|
-
};
|
|
80
|
-
function relativeId(id) {
|
|
81
|
-
if (!path.isAbsolute(id)) return id;
|
|
82
|
-
return path.relative(path.resolve(), id);
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region src/constants/plugin.ts
|
|
86
|
-
const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
|
|
87
|
-
"options",
|
|
88
|
-
"buildStart",
|
|
89
|
-
"resolveId",
|
|
90
|
-
"load",
|
|
91
|
-
"transform",
|
|
92
|
-
"moduleParsed",
|
|
93
|
-
"buildEnd",
|
|
94
|
-
"onLog",
|
|
95
|
-
"resolveDynamicImport",
|
|
96
|
-
"closeBundle",
|
|
97
|
-
"closeWatcher",
|
|
98
|
-
"watchChange"
|
|
99
|
-
];
|
|
100
|
-
const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES = [
|
|
101
|
-
"augmentChunkHash",
|
|
102
|
-
"outputOptions",
|
|
103
|
-
"renderChunk",
|
|
104
|
-
"renderStart",
|
|
105
|
-
"renderError",
|
|
106
|
-
"writeBundle",
|
|
107
|
-
"generateBundle",
|
|
108
|
-
"resolveFileUrl"
|
|
109
|
-
];
|
|
110
|
-
const ENUMERATED_PLUGIN_HOOK_NAMES = [
|
|
111
|
-
...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES,
|
|
112
|
-
...ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES,
|
|
113
|
-
"footer",
|
|
114
|
-
"banner",
|
|
115
|
-
"intro",
|
|
116
|
-
"outro"
|
|
117
|
-
];
|
|
118
|
-
ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[23], ENUMERATED_PLUGIN_HOOK_NAMES[23];
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region src/plugin/internal-hooks.ts
|
|
121
|
-
/**
|
|
122
|
-
* Names of the hidden hooks, alongside {@linkcode InternalFunctionPluginHooks}.
|
|
123
|
-
* Kept separate from `ENUMERATED_INPUT_PLUGIN_HOOK_NAMES` so the names stay out
|
|
124
|
-
* of the published `.d.ts` (that list's type is reachable from public types).
|
|
125
|
-
*/
|
|
126
|
-
const INTERNAL_PLUGIN_HOOK_NAMES = ["hotUpdate"];
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/utils/async-flatten.ts
|
|
129
|
-
async function asyncFlatten(array) {
|
|
130
|
-
do
|
|
131
|
-
array = (await Promise.all(array)).flat(Infinity);
|
|
132
|
-
while (array.some((v) => v?.then));
|
|
133
|
-
return array;
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/utils/normalize-plugin-option.ts
|
|
137
|
-
const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
|
|
138
|
-
function checkOutputPluginOption(plugins, onLog) {
|
|
139
|
-
for (const plugin of plugins) for (const hook of [...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...INTERNAL_PLUGIN_HOOK_NAMES]) if (hook in plugin) {
|
|
140
|
-
delete plugin[hook];
|
|
141
|
-
onLog(LOG_LEVEL_WARN, logInputHookInOutputPlugin(plugin.name, hook));
|
|
142
|
-
}
|
|
143
|
-
return plugins;
|
|
144
|
-
}
|
|
145
|
-
function normalizePlugins(plugins, anonymousPrefix) {
|
|
146
|
-
for (const [index, plugin] of plugins.entries()) {
|
|
147
|
-
if (getParallelPluginInfo(plugin)) continue;
|
|
148
|
-
if (plugin instanceof BuiltinPlugin) continue;
|
|
149
|
-
const objectPlugin = plugin;
|
|
150
|
-
if (!objectPlugin.name) objectPlugin.name = `${anonymousPrefix}${index + 1}`;
|
|
151
|
-
}
|
|
152
|
-
return plugins;
|
|
153
|
-
}
|
|
154
|
-
const ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
155
|
-
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/plugin/plugin-driver.ts
|
|
158
|
-
var PluginDriver = class {
|
|
159
|
-
static async callOptionsHook(inputOptions, watchMode = false) {
|
|
160
|
-
const logLevel = inputOptions.logLevel || "info";
|
|
161
|
-
const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
|
|
162
|
-
const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
163
|
-
for (const plugin of plugins) {
|
|
164
|
-
const name = plugin.name || "unknown";
|
|
165
|
-
const options = plugin.options;
|
|
166
|
-
if (options) {
|
|
167
|
-
const { handler } = normalizeHook(options);
|
|
168
|
-
const result = await handler.call(new MinimalPluginContextImpl(logger, logLevel, name, watchMode, "onLog"), inputOptions);
|
|
169
|
-
if (result) inputOptions = result;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return inputOptions;
|
|
173
|
-
}
|
|
174
|
-
static callOutputOptionsHook(rawPlugins, outputOptions, onLog, logLevel, watchMode) {
|
|
175
|
-
const sortedPlugins = getSortedPlugins("outputOptions", getObjectPlugins(rawPlugins));
|
|
176
|
-
for (const plugin of sortedPlugins) {
|
|
177
|
-
const name = plugin.name || "unknown";
|
|
178
|
-
const options = plugin.outputOptions;
|
|
179
|
-
if (options) {
|
|
180
|
-
const { handler } = normalizeHook(options);
|
|
181
|
-
const result = handler.call(new MinimalPluginContextImpl(onLog, logLevel, name, watchMode), outputOptions);
|
|
182
|
-
if (result) outputOptions = result;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return outputOptions;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
function getObjectPlugins(plugins) {
|
|
189
|
-
return plugins.filter((plugin) => {
|
|
190
|
-
if (!plugin) return;
|
|
191
|
-
if (getParallelPluginInfo(plugin)) return;
|
|
192
|
-
if (plugin instanceof BuiltinPlugin) return;
|
|
193
|
-
return plugin;
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function getSortedPlugins(hookName, plugins) {
|
|
197
|
-
const pre = [];
|
|
198
|
-
const normal = [];
|
|
199
|
-
const post = [];
|
|
200
|
-
for (const plugin of plugins) {
|
|
201
|
-
const hook = plugin[hookName];
|
|
202
|
-
if (hook) {
|
|
203
|
-
if (typeof hook === "object") {
|
|
204
|
-
if (hook.order === "pre") {
|
|
205
|
-
pre.push(plugin);
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
if (hook.order === "post") {
|
|
209
|
-
post.push(plugin);
|
|
210
|
-
continue;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
normal.push(plugin);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return [
|
|
217
|
-
...pre,
|
|
218
|
-
...normal,
|
|
219
|
-
...post
|
|
220
|
-
];
|
|
221
|
-
}
|
|
222
|
-
const DEFAULT_CONFIG = {
|
|
223
|
-
lang: void 0,
|
|
224
|
-
message: void 0,
|
|
225
|
-
abortEarly: void 0,
|
|
226
|
-
abortPipeEarly: void 0
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* Returns the global configuration.
|
|
230
|
-
*
|
|
231
|
-
* @param config The config to merge.
|
|
232
|
-
*
|
|
233
|
-
* @returns The configuration.
|
|
234
|
-
*/
|
|
235
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
236
|
-
function getGlobalConfig(config$1) {
|
|
237
|
-
if (!config$1 && true) return DEFAULT_CONFIG;
|
|
238
|
-
return {
|
|
239
|
-
lang: config$1?.lang ?? void 0,
|
|
240
|
-
message: config$1?.message,
|
|
241
|
-
abortEarly: config$1?.abortEarly ?? void 0,
|
|
242
|
-
abortPipeEarly: config$1?.abortPipeEarly ?? void 0
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Stringifies an unknown input to a literal or type string.
|
|
247
|
-
*
|
|
248
|
-
* @param input The unknown input.
|
|
249
|
-
*
|
|
250
|
-
* @returns A literal or type string.
|
|
251
|
-
*
|
|
252
|
-
* @internal
|
|
253
|
-
*/
|
|
254
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
255
|
-
function _stringify(input) {
|
|
256
|
-
const type = typeof input;
|
|
257
|
-
if (type === "string") return `"${input}"`;
|
|
258
|
-
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
259
|
-
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
260
|
-
return type;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Adds an issue to the dataset.
|
|
264
|
-
*
|
|
265
|
-
* @param context The issue context.
|
|
266
|
-
* @param label The issue label.
|
|
267
|
-
* @param dataset The input dataset.
|
|
268
|
-
* @param config The configuration.
|
|
269
|
-
* @param other The optional props.
|
|
270
|
-
*
|
|
271
|
-
* @internal
|
|
272
|
-
*/
|
|
273
|
-
function _addIssue(context, label, dataset, config$1, other) {
|
|
274
|
-
const input = other && "input" in other ? other.input : dataset.value;
|
|
275
|
-
const expected = other?.expected ?? context.expects ?? null;
|
|
276
|
-
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
277
|
-
const issue = {
|
|
278
|
-
kind: context.kind,
|
|
279
|
-
type: context.type,
|
|
280
|
-
input,
|
|
281
|
-
expected,
|
|
282
|
-
received,
|
|
283
|
-
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
284
|
-
requirement: context.requirement,
|
|
285
|
-
path: other?.path,
|
|
286
|
-
issues: other?.issues,
|
|
287
|
-
lang: config$1.lang,
|
|
288
|
-
abortEarly: config$1.abortEarly,
|
|
289
|
-
abortPipeEarly: config$1.abortPipeEarly
|
|
290
|
-
};
|
|
291
|
-
const isSchema = context.kind === "schema";
|
|
292
|
-
const message$1 = other?.message ?? context.message ?? (context.reference, issue.lang, void 0) ?? (isSchema ? (issue.lang, void 0) : null) ?? config$1.message ?? (issue.lang, void 0);
|
|
293
|
-
if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
|
|
294
|
-
if (isSchema) dataset.typed = false;
|
|
295
|
-
if (dataset.issues) dataset.issues.push(issue);
|
|
296
|
-
else dataset.issues = [issue];
|
|
297
|
-
}
|
|
298
|
-
const _standardCache = /* @__PURE__ */ new WeakMap();
|
|
299
|
-
/**
|
|
300
|
-
* Returns the Standard Schema properties.
|
|
301
|
-
*
|
|
302
|
-
* @param context The schema context.
|
|
303
|
-
*
|
|
304
|
-
* @returns The Standard Schema properties.
|
|
305
|
-
*/
|
|
306
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
307
|
-
function _getStandardProps(context) {
|
|
308
|
-
let cached = _standardCache.get(context);
|
|
309
|
-
if (!cached) {
|
|
310
|
-
cached = {
|
|
311
|
-
version: 1,
|
|
312
|
-
vendor: "valibot",
|
|
313
|
-
validate(value$1) {
|
|
314
|
-
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
_standardCache.set(context, cached);
|
|
318
|
-
}
|
|
319
|
-
return cached;
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Disallows inherited object properties and prevents object prototype
|
|
323
|
-
* pollution by disallowing certain keys.
|
|
324
|
-
*
|
|
325
|
-
* @param object The object to check.
|
|
326
|
-
* @param key The key to check.
|
|
327
|
-
*
|
|
328
|
-
* @returns Whether the key is allowed.
|
|
329
|
-
*
|
|
330
|
-
* @internal
|
|
331
|
-
*/
|
|
332
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
333
|
-
function _isValidObjectKey(object$1, key) {
|
|
334
|
-
return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Joins multiple `expects` values with the given separator.
|
|
338
|
-
*
|
|
339
|
-
* @param values The `expects` values.
|
|
340
|
-
* @param separator The separator.
|
|
341
|
-
*
|
|
342
|
-
* @returns The joined `expects` property.
|
|
343
|
-
*
|
|
344
|
-
* @internal
|
|
345
|
-
*/
|
|
346
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
347
|
-
function _joinExpects(values$1, separator) {
|
|
348
|
-
const list = [...new Set(values$1)];
|
|
349
|
-
if (list.length > 1) return `(${list.join(` ${separator} `)})`;
|
|
350
|
-
return list[0] ?? "never";
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* A Valibot error with useful information.
|
|
354
|
-
*/
|
|
355
|
-
var ValiError = class extends Error {
|
|
356
|
-
/**
|
|
357
|
-
* Creates a Valibot error with useful information.
|
|
358
|
-
*
|
|
359
|
-
* @param issues The error issues.
|
|
360
|
-
*/
|
|
361
|
-
constructor(issues) {
|
|
362
|
-
super(issues[0].message);
|
|
363
|
-
this.name = "ValiError";
|
|
364
|
-
this.issues = issues;
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
368
|
-
function args(schema) {
|
|
369
|
-
return {
|
|
370
|
-
kind: "transformation",
|
|
371
|
-
type: "args",
|
|
372
|
-
reference: args,
|
|
373
|
-
async: false,
|
|
374
|
-
schema,
|
|
375
|
-
"~run"(dataset, config$1) {
|
|
376
|
-
const func = dataset.value;
|
|
377
|
-
dataset.value = (...args_) => {
|
|
378
|
-
const argsDataset = this.schema["~run"]({ value: args_ }, config$1);
|
|
379
|
-
if (argsDataset.issues) throw new ValiError(argsDataset.issues);
|
|
380
|
-
return func(...argsDataset.value);
|
|
381
|
-
};
|
|
382
|
-
return dataset;
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Creates an await transformation action.
|
|
388
|
-
*
|
|
389
|
-
* @returns An await action.
|
|
390
|
-
*/
|
|
391
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
392
|
-
function awaitAsync() {
|
|
393
|
-
return {
|
|
394
|
-
kind: "transformation",
|
|
395
|
-
type: "await",
|
|
396
|
-
reference: awaitAsync,
|
|
397
|
-
async: true,
|
|
398
|
-
async "~run"(dataset) {
|
|
399
|
-
dataset.value = await dataset.value;
|
|
400
|
-
return dataset;
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Creates a description metadata action.
|
|
406
|
-
*
|
|
407
|
-
* @param description_ The description text.
|
|
408
|
-
*
|
|
409
|
-
* @returns A description action.
|
|
410
|
-
*/
|
|
411
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
412
|
-
function description(description_) {
|
|
413
|
-
return {
|
|
414
|
-
kind: "metadata",
|
|
415
|
-
type: "description",
|
|
416
|
-
reference: description,
|
|
417
|
-
description: description_
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
421
|
-
function returns(schema) {
|
|
422
|
-
return {
|
|
423
|
-
kind: "transformation",
|
|
424
|
-
type: "returns",
|
|
425
|
-
reference: returns,
|
|
426
|
-
async: false,
|
|
427
|
-
schema,
|
|
428
|
-
"~run"(dataset, config$1) {
|
|
429
|
-
const func = dataset.value;
|
|
430
|
-
dataset.value = (...args_) => {
|
|
431
|
-
const returnsDataset = this.schema["~run"]({ value: func(...args_) }, config$1);
|
|
432
|
-
if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
|
|
433
|
-
return returnsDataset.value;
|
|
434
|
-
};
|
|
435
|
-
return dataset;
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
440
|
-
function returnsAsync(schema) {
|
|
441
|
-
return {
|
|
442
|
-
kind: "transformation",
|
|
443
|
-
type: "returns",
|
|
444
|
-
reference: returnsAsync,
|
|
445
|
-
async: false,
|
|
446
|
-
schema,
|
|
447
|
-
"~run"(dataset, config$1) {
|
|
448
|
-
const func = dataset.value;
|
|
449
|
-
dataset.value = async (...args_) => {
|
|
450
|
-
const returnsDataset = await this.schema["~run"]({ value: await func(...args_) }, config$1);
|
|
451
|
-
if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
|
|
452
|
-
return returnsDataset.value;
|
|
453
|
-
};
|
|
454
|
-
return dataset;
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
const ABORT_EARLY_CONFIG = { abortEarly: true };
|
|
459
|
-
/**
|
|
460
|
-
* Returns the fallback value of the schema.
|
|
461
|
-
*
|
|
462
|
-
* @param schema The schema to get it from.
|
|
463
|
-
* @param dataset The output dataset if available.
|
|
464
|
-
* @param config The config if available.
|
|
465
|
-
*
|
|
466
|
-
* @returns The fallback value.
|
|
467
|
-
*/
|
|
468
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
469
|
-
function getFallback(schema, dataset, config$1) {
|
|
470
|
-
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* Returns the default value of the schema.
|
|
474
|
-
*
|
|
475
|
-
* @param schema The schema to get it from.
|
|
476
|
-
* @param dataset The input dataset if available.
|
|
477
|
-
* @param config The config if available.
|
|
478
|
-
*
|
|
479
|
-
* @returns The default value.
|
|
480
|
-
*/
|
|
481
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
482
|
-
function getDefault(schema, dataset, config$1) {
|
|
483
|
-
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Checks if the input matches the schema. By using a type predicate, this
|
|
487
|
-
* function can be used as a type guard.
|
|
488
|
-
*
|
|
489
|
-
* @param schema The schema to be used.
|
|
490
|
-
* @param input The input to be tested.
|
|
491
|
-
*
|
|
492
|
-
* @returns Whether the input matches the schema.
|
|
493
|
-
*/
|
|
494
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
495
|
-
function is(schema, input) {
|
|
496
|
-
return !schema["~run"]({ value: input }, ABORT_EARLY_CONFIG).issues;
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* Creates an any schema.
|
|
500
|
-
*
|
|
501
|
-
* Hint: This schema function exists only for completeness and is not
|
|
502
|
-
* recommended in practice. Instead, `unknown` should be used to accept
|
|
503
|
-
* unknown data.
|
|
504
|
-
*
|
|
505
|
-
* @returns An any schema.
|
|
506
|
-
*/
|
|
507
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
508
|
-
function any() {
|
|
509
|
-
return {
|
|
510
|
-
kind: "schema",
|
|
511
|
-
type: "any",
|
|
512
|
-
reference: any,
|
|
513
|
-
expects: "any",
|
|
514
|
-
async: false,
|
|
515
|
-
get "~standard"() {
|
|
516
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
517
|
-
},
|
|
518
|
-
"~run"(dataset) {
|
|
519
|
-
dataset.typed = true;
|
|
520
|
-
return dataset;
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
525
|
-
function array(item, message$1) {
|
|
526
|
-
return {
|
|
527
|
-
kind: "schema",
|
|
528
|
-
type: "array",
|
|
529
|
-
reference: array,
|
|
530
|
-
expects: "Array",
|
|
531
|
-
async: false,
|
|
532
|
-
item,
|
|
533
|
-
message: message$1,
|
|
534
|
-
get "~standard"() {
|
|
535
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
536
|
-
},
|
|
537
|
-
"~run"(dataset, config$1) {
|
|
538
|
-
const input = dataset.value;
|
|
539
|
-
if (Array.isArray(input)) {
|
|
540
|
-
dataset.typed = true;
|
|
541
|
-
dataset.value = [];
|
|
542
|
-
for (let key = 0; key < input.length; key++) {
|
|
543
|
-
const value$1 = input[key];
|
|
544
|
-
const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
|
|
545
|
-
if (itemDataset.issues) {
|
|
546
|
-
const pathItem = {
|
|
547
|
-
type: "array",
|
|
548
|
-
origin: "value",
|
|
549
|
-
input,
|
|
550
|
-
key,
|
|
551
|
-
value: value$1
|
|
552
|
-
};
|
|
553
|
-
for (const issue of itemDataset.issues) {
|
|
554
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
555
|
-
else issue.path = [pathItem];
|
|
556
|
-
dataset.issues?.push(issue);
|
|
557
|
-
}
|
|
558
|
-
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
559
|
-
if (config$1.abortEarly) {
|
|
560
|
-
dataset.typed = false;
|
|
561
|
-
break;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
if (!itemDataset.typed) dataset.typed = false;
|
|
565
|
-
dataset.value.push(itemDataset.value);
|
|
566
|
-
}
|
|
567
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
568
|
-
return dataset;
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
573
|
-
function boolean(message$1) {
|
|
574
|
-
return {
|
|
575
|
-
kind: "schema",
|
|
576
|
-
type: "boolean",
|
|
577
|
-
reference: boolean,
|
|
578
|
-
expects: "boolean",
|
|
579
|
-
async: false,
|
|
580
|
-
message: message$1,
|
|
581
|
-
get "~standard"() {
|
|
582
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
583
|
-
},
|
|
584
|
-
"~run"(dataset, config$1) {
|
|
585
|
-
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
586
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
587
|
-
return dataset;
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
592
|
-
function custom(check$1, message$1) {
|
|
593
|
-
return {
|
|
594
|
-
kind: "schema",
|
|
595
|
-
type: "custom",
|
|
596
|
-
reference: custom,
|
|
597
|
-
expects: "unknown",
|
|
598
|
-
async: false,
|
|
599
|
-
check: check$1,
|
|
600
|
-
message: message$1,
|
|
601
|
-
get "~standard"() {
|
|
602
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
603
|
-
},
|
|
604
|
-
"~run"(dataset, config$1) {
|
|
605
|
-
if (this.check(dataset.value)) dataset.typed = true;
|
|
606
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
607
|
-
return dataset;
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
612
|
-
function function_(message$1) {
|
|
613
|
-
return {
|
|
614
|
-
kind: "schema",
|
|
615
|
-
type: "function",
|
|
616
|
-
reference: function_,
|
|
617
|
-
expects: "Function",
|
|
618
|
-
async: false,
|
|
619
|
-
message: message$1,
|
|
620
|
-
get "~standard"() {
|
|
621
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
622
|
-
},
|
|
623
|
-
"~run"(dataset, config$1) {
|
|
624
|
-
if (typeof dataset.value === "function") dataset.typed = true;
|
|
625
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
626
|
-
return dataset;
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
631
|
-
function instance(class_, message$1) {
|
|
632
|
-
return {
|
|
633
|
-
kind: "schema",
|
|
634
|
-
type: "instance",
|
|
635
|
-
reference: instance,
|
|
636
|
-
expects: class_.name,
|
|
637
|
-
async: false,
|
|
638
|
-
class: class_,
|
|
639
|
-
message: message$1,
|
|
640
|
-
get "~standard"() {
|
|
641
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
642
|
-
},
|
|
643
|
-
"~run"(dataset, config$1) {
|
|
644
|
-
if (dataset.value instanceof this.class) dataset.typed = true;
|
|
645
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
646
|
-
return dataset;
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
651
|
-
function literal(literal_, message$1) {
|
|
652
|
-
return {
|
|
653
|
-
kind: "schema",
|
|
654
|
-
type: "literal",
|
|
655
|
-
reference: literal,
|
|
656
|
-
expects: /* @__PURE__ */ _stringify(literal_),
|
|
657
|
-
async: false,
|
|
658
|
-
literal: literal_,
|
|
659
|
-
message: message$1,
|
|
660
|
-
get "~standard"() {
|
|
661
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
662
|
-
},
|
|
663
|
-
"~run"(dataset, config$1) {
|
|
664
|
-
if (dataset.value === this.literal) dataset.typed = true;
|
|
665
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
666
|
-
return dataset;
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
671
|
-
function never(message$1) {
|
|
672
|
-
return {
|
|
673
|
-
kind: "schema",
|
|
674
|
-
type: "never",
|
|
675
|
-
reference: never,
|
|
676
|
-
expects: "never",
|
|
677
|
-
async: false,
|
|
678
|
-
message: message$1,
|
|
679
|
-
get "~standard"() {
|
|
680
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
681
|
-
},
|
|
682
|
-
"~run"(dataset, config$1) {
|
|
683
|
-
_addIssue(this, "type", dataset, config$1);
|
|
684
|
-
return dataset;
|
|
685
|
-
}
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
689
|
-
function nullish(wrapped, default_) {
|
|
690
|
-
return {
|
|
691
|
-
kind: "schema",
|
|
692
|
-
type: "nullish",
|
|
693
|
-
reference: nullish,
|
|
694
|
-
expects: `(${wrapped.expects} | null | undefined)`,
|
|
695
|
-
async: false,
|
|
696
|
-
wrapped,
|
|
697
|
-
default: default_,
|
|
698
|
-
get "~standard"() {
|
|
699
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
700
|
-
},
|
|
701
|
-
"~run"(dataset, config$1) {
|
|
702
|
-
if (dataset.value === null || dataset.value === void 0) {
|
|
703
|
-
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
704
|
-
if (dataset.value === null || dataset.value === void 0) {
|
|
705
|
-
dataset.typed = true;
|
|
706
|
-
return dataset;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
return this.wrapped["~run"](dataset, config$1);
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
714
|
-
function number(message$1) {
|
|
715
|
-
return {
|
|
716
|
-
kind: "schema",
|
|
717
|
-
type: "number",
|
|
718
|
-
reference: number,
|
|
719
|
-
expects: "number",
|
|
720
|
-
async: false,
|
|
721
|
-
message: message$1,
|
|
722
|
-
get "~standard"() {
|
|
723
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
724
|
-
},
|
|
725
|
-
"~run"(dataset, config$1) {
|
|
726
|
-
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
727
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
728
|
-
return dataset;
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
}
|
|
732
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
733
|
-
function object(entries$1, message$1) {
|
|
734
|
-
return {
|
|
735
|
-
kind: "schema",
|
|
736
|
-
type: "object",
|
|
737
|
-
reference: object,
|
|
738
|
-
expects: "Object",
|
|
739
|
-
async: false,
|
|
740
|
-
entries: entries$1,
|
|
741
|
-
message: message$1,
|
|
742
|
-
get "~standard"() {
|
|
743
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
744
|
-
},
|
|
745
|
-
"~run"(dataset, config$1) {
|
|
746
|
-
const input = dataset.value;
|
|
747
|
-
if (input && typeof input === "object") {
|
|
748
|
-
dataset.typed = true;
|
|
749
|
-
dataset.value = {};
|
|
750
|
-
for (const key in this.entries) {
|
|
751
|
-
const valueSchema = this.entries[key];
|
|
752
|
-
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
753
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
754
|
-
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
755
|
-
if (valueDataset.issues) {
|
|
756
|
-
const pathItem = {
|
|
757
|
-
type: "object",
|
|
758
|
-
origin: "value",
|
|
759
|
-
input,
|
|
760
|
-
key,
|
|
761
|
-
value: value$1
|
|
762
|
-
};
|
|
763
|
-
for (const issue of valueDataset.issues) {
|
|
764
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
765
|
-
else issue.path = [pathItem];
|
|
766
|
-
dataset.issues?.push(issue);
|
|
767
|
-
}
|
|
768
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
769
|
-
if (config$1.abortEarly) {
|
|
770
|
-
dataset.typed = false;
|
|
771
|
-
break;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
if (!valueDataset.typed) dataset.typed = false;
|
|
775
|
-
dataset.value[key] = valueDataset.value;
|
|
776
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
777
|
-
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
778
|
-
_addIssue(this, "key", dataset, config$1, {
|
|
779
|
-
input: void 0,
|
|
780
|
-
expected: `"${key}"`,
|
|
781
|
-
path: [{
|
|
782
|
-
type: "object",
|
|
783
|
-
origin: "key",
|
|
784
|
-
input,
|
|
785
|
-
key,
|
|
786
|
-
value: input[key]
|
|
787
|
-
}]
|
|
788
|
-
});
|
|
789
|
-
if (config$1.abortEarly) break;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
793
|
-
return dataset;
|
|
794
|
-
}
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
798
|
-
function optional(wrapped, default_) {
|
|
799
|
-
return {
|
|
800
|
-
kind: "schema",
|
|
801
|
-
type: "optional",
|
|
802
|
-
reference: optional,
|
|
803
|
-
expects: `(${wrapped.expects} | undefined)`,
|
|
804
|
-
async: false,
|
|
805
|
-
wrapped,
|
|
806
|
-
default: default_,
|
|
807
|
-
get "~standard"() {
|
|
808
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
809
|
-
},
|
|
810
|
-
"~run"(dataset, config$1) {
|
|
811
|
-
if (dataset.value === void 0) {
|
|
812
|
-
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
813
|
-
if (dataset.value === void 0) {
|
|
814
|
-
dataset.typed = true;
|
|
815
|
-
return dataset;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
return this.wrapped["~run"](dataset, config$1);
|
|
819
|
-
}
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
823
|
-
function picklist(options, message$1) {
|
|
824
|
-
return {
|
|
825
|
-
kind: "schema",
|
|
826
|
-
type: "picklist",
|
|
827
|
-
reference: picklist,
|
|
828
|
-
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
829
|
-
async: false,
|
|
830
|
-
options,
|
|
831
|
-
message: message$1,
|
|
832
|
-
get "~standard"() {
|
|
833
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
834
|
-
},
|
|
835
|
-
"~run"(dataset, config$1) {
|
|
836
|
-
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
837
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
838
|
-
return dataset;
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
}
|
|
842
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
843
|
-
function promise(message$1) {
|
|
844
|
-
return {
|
|
845
|
-
kind: "schema",
|
|
846
|
-
type: "promise",
|
|
847
|
-
reference: promise,
|
|
848
|
-
expects: "Promise",
|
|
849
|
-
async: false,
|
|
850
|
-
message: message$1,
|
|
851
|
-
get "~standard"() {
|
|
852
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
853
|
-
},
|
|
854
|
-
"~run"(dataset, config$1) {
|
|
855
|
-
if (dataset.value instanceof Promise) dataset.typed = true;
|
|
856
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
857
|
-
return dataset;
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
862
|
-
function record(key, value$1, message$1) {
|
|
863
|
-
return {
|
|
864
|
-
kind: "schema",
|
|
865
|
-
type: "record",
|
|
866
|
-
reference: record,
|
|
867
|
-
expects: "Object",
|
|
868
|
-
async: false,
|
|
869
|
-
key,
|
|
870
|
-
value: value$1,
|
|
871
|
-
message: message$1,
|
|
872
|
-
get "~standard"() {
|
|
873
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
874
|
-
},
|
|
875
|
-
"~run"(dataset, config$1) {
|
|
876
|
-
const input = dataset.value;
|
|
877
|
-
if (input && typeof input === "object") {
|
|
878
|
-
dataset.typed = true;
|
|
879
|
-
dataset.value = {};
|
|
880
|
-
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
881
|
-
const entryValue = input[entryKey];
|
|
882
|
-
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
883
|
-
if (keyDataset.issues) {
|
|
884
|
-
const pathItem = {
|
|
885
|
-
type: "object",
|
|
886
|
-
origin: "key",
|
|
887
|
-
input,
|
|
888
|
-
key: entryKey,
|
|
889
|
-
value: entryValue
|
|
890
|
-
};
|
|
891
|
-
for (const issue of keyDataset.issues) {
|
|
892
|
-
issue.path = [pathItem];
|
|
893
|
-
dataset.issues?.push(issue);
|
|
894
|
-
}
|
|
895
|
-
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
896
|
-
if (config$1.abortEarly) {
|
|
897
|
-
dataset.typed = false;
|
|
898
|
-
break;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
902
|
-
if (valueDataset.issues) {
|
|
903
|
-
const pathItem = {
|
|
904
|
-
type: "object",
|
|
905
|
-
origin: "value",
|
|
906
|
-
input,
|
|
907
|
-
key: entryKey,
|
|
908
|
-
value: entryValue
|
|
909
|
-
};
|
|
910
|
-
for (const issue of valueDataset.issues) {
|
|
911
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
912
|
-
else issue.path = [pathItem];
|
|
913
|
-
dataset.issues?.push(issue);
|
|
914
|
-
}
|
|
915
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
916
|
-
if (config$1.abortEarly) {
|
|
917
|
-
dataset.typed = false;
|
|
918
|
-
break;
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
922
|
-
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
923
|
-
}
|
|
924
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
925
|
-
return dataset;
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
930
|
-
function strictObject(entries$1, message$1) {
|
|
931
|
-
return {
|
|
932
|
-
kind: "schema",
|
|
933
|
-
type: "strict_object",
|
|
934
|
-
reference: strictObject,
|
|
935
|
-
expects: "Object",
|
|
936
|
-
async: false,
|
|
937
|
-
entries: entries$1,
|
|
938
|
-
message: message$1,
|
|
939
|
-
get "~standard"() {
|
|
940
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
941
|
-
},
|
|
942
|
-
"~run"(dataset, config$1) {
|
|
943
|
-
const input = dataset.value;
|
|
944
|
-
if (input && typeof input === "object") {
|
|
945
|
-
dataset.typed = true;
|
|
946
|
-
dataset.value = {};
|
|
947
|
-
for (const key in this.entries) {
|
|
948
|
-
const valueSchema = this.entries[key];
|
|
949
|
-
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
950
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
951
|
-
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
952
|
-
if (valueDataset.issues) {
|
|
953
|
-
const pathItem = {
|
|
954
|
-
type: "object",
|
|
955
|
-
origin: "value",
|
|
956
|
-
input,
|
|
957
|
-
key,
|
|
958
|
-
value: value$1
|
|
959
|
-
};
|
|
960
|
-
for (const issue of valueDataset.issues) {
|
|
961
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
962
|
-
else issue.path = [pathItem];
|
|
963
|
-
dataset.issues?.push(issue);
|
|
964
|
-
}
|
|
965
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
966
|
-
if (config$1.abortEarly) {
|
|
967
|
-
dataset.typed = false;
|
|
968
|
-
break;
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
if (!valueDataset.typed) dataset.typed = false;
|
|
972
|
-
dataset.value[key] = valueDataset.value;
|
|
973
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
974
|
-
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
975
|
-
_addIssue(this, "key", dataset, config$1, {
|
|
976
|
-
input: void 0,
|
|
977
|
-
expected: `"${key}"`,
|
|
978
|
-
path: [{
|
|
979
|
-
type: "object",
|
|
980
|
-
origin: "key",
|
|
981
|
-
input,
|
|
982
|
-
key,
|
|
983
|
-
value: input[key]
|
|
984
|
-
}]
|
|
985
|
-
});
|
|
986
|
-
if (config$1.abortEarly) break;
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
if (!dataset.issues || !config$1.abortEarly) {
|
|
990
|
-
for (const key in input) if (!(key in this.entries)) {
|
|
991
|
-
_addIssue(this, "key", dataset, config$1, {
|
|
992
|
-
input: key,
|
|
993
|
-
expected: "never",
|
|
994
|
-
path: [{
|
|
995
|
-
type: "object",
|
|
996
|
-
origin: "key",
|
|
997
|
-
input,
|
|
998
|
-
key,
|
|
999
|
-
value: input[key]
|
|
1000
|
-
}]
|
|
1001
|
-
});
|
|
1002
|
-
break;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
1006
|
-
return dataset;
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
}
|
|
1010
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1011
|
-
function string(message$1) {
|
|
1012
|
-
return {
|
|
1013
|
-
kind: "schema",
|
|
1014
|
-
type: "string",
|
|
1015
|
-
reference: string,
|
|
1016
|
-
expects: "string",
|
|
1017
|
-
async: false,
|
|
1018
|
-
message: message$1,
|
|
1019
|
-
get "~standard"() {
|
|
1020
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1021
|
-
},
|
|
1022
|
-
"~run"(dataset, config$1) {
|
|
1023
|
-
if (typeof dataset.value === "string") dataset.typed = true;
|
|
1024
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
1025
|
-
return dataset;
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1030
|
-
function tuple(items, message$1) {
|
|
1031
|
-
return {
|
|
1032
|
-
kind: "schema",
|
|
1033
|
-
type: "tuple",
|
|
1034
|
-
reference: tuple,
|
|
1035
|
-
expects: "Array",
|
|
1036
|
-
async: false,
|
|
1037
|
-
items,
|
|
1038
|
-
message: message$1,
|
|
1039
|
-
get "~standard"() {
|
|
1040
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1041
|
-
},
|
|
1042
|
-
"~run"(dataset, config$1) {
|
|
1043
|
-
const input = dataset.value;
|
|
1044
|
-
if (Array.isArray(input)) {
|
|
1045
|
-
dataset.typed = true;
|
|
1046
|
-
dataset.value = [];
|
|
1047
|
-
for (let key = 0; key < this.items.length; key++) {
|
|
1048
|
-
const value$1 = input[key];
|
|
1049
|
-
const itemDataset = this.items[key]["~run"]({ value: value$1 }, config$1);
|
|
1050
|
-
if (itemDataset.issues) {
|
|
1051
|
-
const pathItem = {
|
|
1052
|
-
type: "array",
|
|
1053
|
-
origin: "value",
|
|
1054
|
-
input,
|
|
1055
|
-
key,
|
|
1056
|
-
value: value$1
|
|
1057
|
-
};
|
|
1058
|
-
for (const issue of itemDataset.issues) {
|
|
1059
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
1060
|
-
else issue.path = [pathItem];
|
|
1061
|
-
dataset.issues?.push(issue);
|
|
1062
|
-
}
|
|
1063
|
-
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
1064
|
-
if (config$1.abortEarly) {
|
|
1065
|
-
dataset.typed = false;
|
|
1066
|
-
break;
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
if (!itemDataset.typed) dataset.typed = false;
|
|
1070
|
-
dataset.value.push(itemDataset.value);
|
|
1071
|
-
}
|
|
1072
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
1073
|
-
return dataset;
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1078
|
-
function undefined_(message$1) {
|
|
1079
|
-
return {
|
|
1080
|
-
kind: "schema",
|
|
1081
|
-
type: "undefined",
|
|
1082
|
-
reference: undefined_,
|
|
1083
|
-
expects: "undefined",
|
|
1084
|
-
async: false,
|
|
1085
|
-
message: message$1,
|
|
1086
|
-
get "~standard"() {
|
|
1087
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1088
|
-
},
|
|
1089
|
-
"~run"(dataset, config$1) {
|
|
1090
|
-
if (dataset.value === void 0) dataset.typed = true;
|
|
1091
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
1092
|
-
return dataset;
|
|
1093
|
-
}
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* Returns the sub issues of the provided datasets for the union issue.
|
|
1098
|
-
*
|
|
1099
|
-
* @param datasets The datasets.
|
|
1100
|
-
*
|
|
1101
|
-
* @returns The sub issues.
|
|
1102
|
-
*
|
|
1103
|
-
* @internal
|
|
1104
|
-
*/
|
|
1105
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1106
|
-
function _subIssues(datasets) {
|
|
1107
|
-
let issues;
|
|
1108
|
-
if (datasets) for (const dataset of datasets) if (issues) for (const issue of dataset.issues) issues.push(issue);
|
|
1109
|
-
else issues = dataset.issues;
|
|
1110
|
-
return issues;
|
|
1111
|
-
}
|
|
1112
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1113
|
-
function union(options, message$1) {
|
|
1114
|
-
return {
|
|
1115
|
-
kind: "schema",
|
|
1116
|
-
type: "union",
|
|
1117
|
-
reference: union,
|
|
1118
|
-
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
1119
|
-
async: false,
|
|
1120
|
-
options,
|
|
1121
|
-
message: message$1,
|
|
1122
|
-
get "~standard"() {
|
|
1123
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1124
|
-
},
|
|
1125
|
-
"~run"(dataset, config$1) {
|
|
1126
|
-
let validDataset;
|
|
1127
|
-
let typedDatasets;
|
|
1128
|
-
let untypedDatasets;
|
|
1129
|
-
for (const schema of this.options) {
|
|
1130
|
-
const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
|
|
1131
|
-
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
1132
|
-
else typedDatasets = [optionDataset];
|
|
1133
|
-
else {
|
|
1134
|
-
validDataset = optionDataset;
|
|
1135
|
-
break;
|
|
1136
|
-
}
|
|
1137
|
-
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
1138
|
-
else untypedDatasets = [optionDataset];
|
|
1139
|
-
}
|
|
1140
|
-
if (validDataset) return validDataset;
|
|
1141
|
-
if (typedDatasets) {
|
|
1142
|
-
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
1143
|
-
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
1144
|
-
dataset.typed = true;
|
|
1145
|
-
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
1146
|
-
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
1147
|
-
return dataset;
|
|
1148
|
-
}
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1152
|
-
function unionAsync(options, message$1) {
|
|
1153
|
-
return {
|
|
1154
|
-
kind: "schema",
|
|
1155
|
-
type: "union",
|
|
1156
|
-
reference: unionAsync,
|
|
1157
|
-
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
1158
|
-
async: true,
|
|
1159
|
-
options,
|
|
1160
|
-
message: message$1,
|
|
1161
|
-
get "~standard"() {
|
|
1162
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1163
|
-
},
|
|
1164
|
-
async "~run"(dataset, config$1) {
|
|
1165
|
-
let validDataset;
|
|
1166
|
-
let typedDatasets;
|
|
1167
|
-
let untypedDatasets;
|
|
1168
|
-
for (const schema of this.options) {
|
|
1169
|
-
const optionDataset = await schema["~run"]({ value: dataset.value }, config$1);
|
|
1170
|
-
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
1171
|
-
else typedDatasets = [optionDataset];
|
|
1172
|
-
else {
|
|
1173
|
-
validDataset = optionDataset;
|
|
1174
|
-
break;
|
|
1175
|
-
}
|
|
1176
|
-
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
1177
|
-
else untypedDatasets = [optionDataset];
|
|
1178
|
-
}
|
|
1179
|
-
if (validDataset) return validDataset;
|
|
1180
|
-
if (typedDatasets) {
|
|
1181
|
-
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
1182
|
-
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
1183
|
-
dataset.typed = true;
|
|
1184
|
-
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
1185
|
-
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
1186
|
-
return dataset;
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1191
|
-
function void_(message$1) {
|
|
1192
|
-
return {
|
|
1193
|
-
kind: "schema",
|
|
1194
|
-
type: "void",
|
|
1195
|
-
reference: void_,
|
|
1196
|
-
expects: "void",
|
|
1197
|
-
async: false,
|
|
1198
|
-
message: message$1,
|
|
1199
|
-
get "~standard"() {
|
|
1200
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1201
|
-
},
|
|
1202
|
-
"~run"(dataset, config$1) {
|
|
1203
|
-
if (dataset.value === void 0) dataset.typed = true;
|
|
1204
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
1205
|
-
return dataset;
|
|
1206
|
-
}
|
|
1207
|
-
};
|
|
1208
|
-
}
|
|
1209
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1210
|
-
function keyof(schema, message$1) {
|
|
1211
|
-
return /* @__PURE__ */ picklist(Object.keys(schema.entries), message$1);
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* Creates a modified copy of an object schema that does not contain the
|
|
1215
|
-
* selected entries.
|
|
1216
|
-
*
|
|
1217
|
-
* @param schema The schema to omit from.
|
|
1218
|
-
* @param keys The selected entries.
|
|
1219
|
-
*
|
|
1220
|
-
* @returns An object schema.
|
|
1221
|
-
*/
|
|
1222
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1223
|
-
function omit(schema, keys) {
|
|
1224
|
-
const entries$1 = { ...schema.entries };
|
|
1225
|
-
for (const key of keys) delete entries$1[key];
|
|
1226
|
-
return {
|
|
1227
|
-
...schema,
|
|
1228
|
-
entries: entries$1,
|
|
1229
|
-
get "~standard"() {
|
|
1230
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
}
|
|
1234
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1235
|
-
function partial(schema, keys) {
|
|
1236
|
-
const entries$1 = {};
|
|
1237
|
-
for (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
|
|
1238
|
-
return {
|
|
1239
|
-
...schema,
|
|
1240
|
-
entries: entries$1,
|
|
1241
|
-
get "~standard"() {
|
|
1242
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1243
|
-
}
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1247
|
-
function pipe(...pipe$1) {
|
|
1248
|
-
return {
|
|
1249
|
-
...pipe$1[0],
|
|
1250
|
-
pipe: pipe$1,
|
|
1251
|
-
get "~standard"() {
|
|
1252
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1253
|
-
},
|
|
1254
|
-
"~run"(dataset, config$1) {
|
|
1255
|
-
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
1256
|
-
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
1257
|
-
dataset.typed = false;
|
|
1258
|
-
break;
|
|
1259
|
-
}
|
|
1260
|
-
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
1261
|
-
}
|
|
1262
|
-
return dataset;
|
|
1263
|
-
}
|
|
1264
|
-
};
|
|
1265
|
-
}
|
|
1266
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1267
|
-
function pipeAsync(...pipe$1) {
|
|
1268
|
-
return {
|
|
1269
|
-
...pipe$1[0],
|
|
1270
|
-
pipe: pipe$1,
|
|
1271
|
-
async: true,
|
|
1272
|
-
get "~standard"() {
|
|
1273
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
1274
|
-
},
|
|
1275
|
-
async "~run"(dataset, config$1) {
|
|
1276
|
-
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
1277
|
-
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
1278
|
-
dataset.typed = false;
|
|
1279
|
-
break;
|
|
1280
|
-
}
|
|
1281
|
-
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = await item["~run"](dataset, config$1);
|
|
1282
|
-
}
|
|
1283
|
-
return dataset;
|
|
1284
|
-
}
|
|
1285
|
-
};
|
|
1286
|
-
}
|
|
1287
|
-
/**
|
|
1288
|
-
* Parses an unknown input based on a schema.
|
|
1289
|
-
*
|
|
1290
|
-
* @param schema The schema to be used.
|
|
1291
|
-
* @param input The input to be parsed.
|
|
1292
|
-
* @param config The parse configuration.
|
|
1293
|
-
*
|
|
1294
|
-
* @returns The parse result.
|
|
1295
|
-
*/
|
|
1296
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
1297
|
-
function safeParse(schema, input, config$1) {
|
|
1298
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
1299
|
-
return {
|
|
1300
|
-
typed: dataset.typed,
|
|
1301
|
-
success: !dataset.issues,
|
|
1302
|
-
output: dataset.value,
|
|
1303
|
-
issues: dataset.issues
|
|
1304
|
-
};
|
|
1305
|
-
}
|
|
1306
|
-
//#endregion
|
|
1307
|
-
//#region src/utils/flatten-valibot-schema.ts
|
|
1308
|
-
function unwrapSchema(schema) {
|
|
1309
|
-
if (!schema) return schema;
|
|
1310
|
-
if (schema.type === "optional" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1311
|
-
if (schema.type === "nullable" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1312
|
-
if (schema.type === "nullish" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1313
|
-
return schema;
|
|
1314
|
-
}
|
|
1315
|
-
function getValibotSchemaType(schema) {
|
|
1316
|
-
if (!schema) return "any";
|
|
1317
|
-
if (schema.type) switch (schema.type) {
|
|
1318
|
-
case "string": return "string";
|
|
1319
|
-
case "number": return "number";
|
|
1320
|
-
case "boolean": return "boolean";
|
|
1321
|
-
case "array": return "array";
|
|
1322
|
-
case "object":
|
|
1323
|
-
case "strict_object":
|
|
1324
|
-
case "loose_object": return "object";
|
|
1325
|
-
case "union": return "union";
|
|
1326
|
-
case "literal": return typeof schema.literal;
|
|
1327
|
-
case "record": return "object";
|
|
1328
|
-
case "optional": return getValibotSchemaType(schema.wrapped);
|
|
1329
|
-
case "nullable": return getValibotSchemaType(schema.wrapped);
|
|
1330
|
-
case "nullish": return getValibotSchemaType(schema.wrapped);
|
|
1331
|
-
case "never": return "never";
|
|
1332
|
-
case "any": return "any";
|
|
1333
|
-
case "custom": return "any";
|
|
1334
|
-
case "function": return "never";
|
|
1335
|
-
case "instance": return "object";
|
|
1336
|
-
default: return "any";
|
|
1337
|
-
}
|
|
1338
|
-
return "any";
|
|
1339
|
-
}
|
|
1340
|
-
function getValibotDescription(schema) {
|
|
1341
|
-
if (!schema) return void 0;
|
|
1342
|
-
if (schema.pipe && Array.isArray(schema.pipe)) {
|
|
1343
|
-
for (const action of schema.pipe) if (action.type === "description" && action.description) return action.description;
|
|
1344
|
-
}
|
|
1345
|
-
if (schema.type === "optional" && schema.wrapped) return getValibotDescription(schema.wrapped);
|
|
1346
|
-
}
|
|
1347
|
-
function flattenValibotSchema(schema, result = {}, prefix = "") {
|
|
1348
|
-
if (!schema || typeof schema !== "object") return result;
|
|
1349
|
-
if (schema.type === "strict_object" || schema.type === "object" || schema.type === "loose_object") {
|
|
1350
|
-
if (schema.entries && typeof schema.entries === "object") for (const [key, value] of Object.entries(schema.entries)) {
|
|
1351
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
1352
|
-
const valueSchema = value;
|
|
1353
|
-
const type = getValibotSchemaType(valueSchema);
|
|
1354
|
-
const description = getValibotDescription(valueSchema);
|
|
1355
|
-
if (type === "object") {
|
|
1356
|
-
const unwrappedSchema = unwrapSchema(valueSchema);
|
|
1357
|
-
if (unwrappedSchema && unwrappedSchema.entries) flattenValibotSchema(unwrappedSchema, result, fullKey);
|
|
1358
|
-
else result[fullKey] = {
|
|
1359
|
-
type,
|
|
1360
|
-
description
|
|
1361
|
-
};
|
|
1362
|
-
} else result[fullKey] = {
|
|
1363
|
-
type,
|
|
1364
|
-
description
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
return result;
|
|
1369
|
-
}
|
|
1370
|
-
//#endregion
|
|
1371
|
-
//#region src/utils/style-text.ts
|
|
1372
|
-
/**
|
|
1373
|
-
* Cross-platform styleText utility that works in both Node.js and browser environments
|
|
1374
|
-
* In Node.js, it uses the native `styleText` from `node:util`
|
|
1375
|
-
* In browser, it provides empty styling functions for compatibility
|
|
1376
|
-
*/
|
|
1377
|
-
function styleText$1(...args) {
|
|
1378
|
-
return styleText(...args);
|
|
1379
|
-
}
|
|
1380
|
-
//#endregion
|
|
1381
|
-
//#region src/utils/validator.ts
|
|
1382
|
-
const StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);
|
|
1383
|
-
function vFunction() {
|
|
1384
|
-
return /* @__PURE__ */ function_();
|
|
1385
|
-
}
|
|
1386
|
-
const LogLevelSchema = /* @__PURE__ */ union([
|
|
1387
|
-
/* @__PURE__ */ literal("debug"),
|
|
1388
|
-
/* @__PURE__ */ literal("info"),
|
|
1389
|
-
/* @__PURE__ */ literal("warn")
|
|
1390
|
-
]);
|
|
1391
|
-
const LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("silent")]);
|
|
1392
|
-
const LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("error")]);
|
|
1393
|
-
const RollupLogSchema = /* @__PURE__ */ any();
|
|
1394
|
-
const RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);
|
|
1395
|
-
const InputOptionSchema = /* @__PURE__ */ union([
|
|
1396
|
-
/* @__PURE__ */ string(),
|
|
1397
|
-
/* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
1398
|
-
/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
|
|
1399
|
-
]);
|
|
1400
|
-
const ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1401
|
-
/* @__PURE__ */ string(),
|
|
1402
|
-
/* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1403
|
-
/* @__PURE__ */ boolean()
|
|
1404
|
-
])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));
|
|
1405
|
-
const ExternalOptionSchema = /* @__PURE__ */ union([
|
|
1406
|
-
StringOrRegExpSchema,
|
|
1407
|
-
/* @__PURE__ */ array(StringOrRegExpSchema),
|
|
1408
|
-
ExternalOptionFunctionSchema
|
|
1409
|
-
]);
|
|
1410
|
-
const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1411
|
-
/* @__PURE__ */ literal("asset"),
|
|
1412
|
-
/* @__PURE__ */ literal("base64"),
|
|
1413
|
-
/* @__PURE__ */ literal("binary"),
|
|
1414
|
-
/* @__PURE__ */ literal("copy"),
|
|
1415
|
-
/* @__PURE__ */ literal("css"),
|
|
1416
|
-
/* @__PURE__ */ literal("dataurl"),
|
|
1417
|
-
/* @__PURE__ */ literal("empty"),
|
|
1418
|
-
/* @__PURE__ */ literal("js"),
|
|
1419
|
-
/* @__PURE__ */ literal("json"),
|
|
1420
|
-
/* @__PURE__ */ literal("jsx"),
|
|
1421
|
-
/* @__PURE__ */ literal("text"),
|
|
1422
|
-
/* @__PURE__ */ literal("ts"),
|
|
1423
|
-
/* @__PURE__ */ literal("tsx")
|
|
1424
|
-
]));
|
|
1425
|
-
const TransformOptionsSchema = /* @__PURE__ */ object({
|
|
1426
|
-
assumptions: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1427
|
-
ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1428
|
-
noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1429
|
-
objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1430
|
-
pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1431
|
-
setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1432
|
-
})),
|
|
1433
|
-
typescript: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1434
|
-
jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1435
|
-
jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1436
|
-
onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1437
|
-
allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1438
|
-
allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1439
|
-
removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1440
|
-
optimizeConstEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1441
|
-
optimizeEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1442
|
-
declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1443
|
-
stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1444
|
-
sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1445
|
-
})),
|
|
1446
|
-
rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1447
|
-
/* @__PURE__ */ literal("rewrite"),
|
|
1448
|
-
/* @__PURE__ */ literal("remove"),
|
|
1449
|
-
/* @__PURE__ */ boolean()
|
|
1450
|
-
]))
|
|
1451
|
-
})),
|
|
1452
|
-
helpers: /* @__PURE__ */ optional(/* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")])) })),
|
|
1453
|
-
decorator: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1454
|
-
legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1455
|
-
emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1456
|
-
strictNullChecks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1457
|
-
})),
|
|
1458
|
-
jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1459
|
-
/* @__PURE__ */ literal(false),
|
|
1460
|
-
/* @__PURE__ */ literal("preserve"),
|
|
1461
|
-
/* @__PURE__ */ literal("react"),
|
|
1462
|
-
/* @__PURE__ */ literal("react-jsx"),
|
|
1463
|
-
/* @__PURE__ */ strictObject({
|
|
1464
|
-
runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
|
|
1465
|
-
development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
|
|
1466
|
-
throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
1467
|
-
pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
|
|
1468
|
-
importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
|
|
1469
|
-
pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
|
|
1470
|
-
pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
|
|
1471
|
-
refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
|
|
1472
|
-
})
|
|
1473
|
-
])),
|
|
1474
|
-
target: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("The JavaScript target environment")),
|
|
1475
|
-
define: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Define global variables (syntax: key:value,key2:value2)")),
|
|
1476
|
-
inject: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ string()])]))), /* @__PURE__ */ description("Inject import statements on demand")),
|
|
1477
|
-
dropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Remove labeled statements with these label names")),
|
|
1478
|
-
plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1479
|
-
styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1480
|
-
taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1481
|
-
})), /* @__PURE__ */ description("Third-party plugins to use"))
|
|
1482
|
-
});
|
|
1483
|
-
const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1484
|
-
usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
|
|
1485
|
-
pollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Poll interval in milliseconds (only used when usePolling is true)")),
|
|
1486
|
-
compareContentsForPolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Compare file contents for poll-based watchers (only used when usePolling is true)")),
|
|
1487
|
-
useDebounce: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use debounced event delivery at the filesystem level")),
|
|
1488
|
-
debounceDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Debounce delay in milliseconds (only used when useDebounce is true)")),
|
|
1489
|
-
debounceTickRate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Tick rate in milliseconds for debouncer (only used when useDebounce is true)"))
|
|
1490
|
-
});
|
|
1491
|
-
const WatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1492
|
-
chokidar: /* @__PURE__ */ optional(/* @__PURE__ */ never(`The "watch.chokidar" option is deprecated, please use "watch.watcher" instead of it`)),
|
|
1493
|
-
exclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1494
|
-
include: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1495
|
-
watcher: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1496
|
-
notify: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1497
|
-
skipWrite: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Skip the bundle.write() step")),
|
|
1498
|
-
buildDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Throttle watch rebuilds")),
|
|
1499
|
-
clearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to clear the screen when a rebuild is triggered")),
|
|
1500
|
-
onInvalidate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(vFunction()), /* @__PURE__ */ description("An optional function that will be called immediately every time a module changes that is part of the build."))
|
|
1501
|
-
});
|
|
1502
|
-
const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1503
|
-
circularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting circular dependency")),
|
|
1504
|
-
eval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting uses of direct `eval`s")),
|
|
1505
|
-
missingGlobalName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.globals` option is missing when needed")),
|
|
1506
|
-
missingNameOptionForIifeExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.name` option is missing when needed")),
|
|
1507
|
-
invalidAnnotation: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a `#__PURE__` / `@__PURE__` annotation has no effect due to its position")),
|
|
1508
|
-
mixedExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the way to export values is ambiguous")),
|
|
1509
|
-
unresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an entrypoint cannot be resolved")),
|
|
1510
|
-
unresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an import cannot be resolved")),
|
|
1511
|
-
filenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when files generated have the same name with different contents")),
|
|
1512
|
-
commonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
|
|
1513
|
-
importIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an imported variable is not exported")),
|
|
1514
|
-
emptyImportMeta: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),
|
|
1515
|
-
toleratedTransform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting tolerated transform")),
|
|
1516
|
-
cannotCallNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a namespace is called as a function")),
|
|
1517
|
-
configurationFieldConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a config value is overridden by another config value with a higher priority")),
|
|
1518
|
-
preferBuiltinFeature: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
|
|
1519
|
-
couldNotCleanDirectory: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
1520
|
-
pluginTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
1521
|
-
duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
1522
|
-
unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
1523
|
-
ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting")),
|
|
1524
|
-
largeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)")),
|
|
1525
|
-
sourcemapBroken: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin transforms code without generating a sourcemap")),
|
|
1526
|
-
namespaceConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when multiple star re-exports provide the same name from different modules"))
|
|
1527
|
-
});
|
|
1528
|
-
const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1529
|
-
compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1530
|
-
target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
|
|
1531
|
-
dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1532
|
-
dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1533
|
-
keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1534
|
-
function: /* @__PURE__ */ boolean(),
|
|
1535
|
-
class: /* @__PURE__ */ boolean()
|
|
1536
|
-
})),
|
|
1537
|
-
unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
|
|
1538
|
-
joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1539
|
-
sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1540
|
-
dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1541
|
-
maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1542
|
-
treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1543
|
-
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1544
|
-
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1545
|
-
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
|
|
1546
|
-
propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1547
|
-
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1548
|
-
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1549
|
-
}))
|
|
1550
|
-
})])),
|
|
1551
|
-
mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1552
|
-
toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1553
|
-
keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1554
|
-
function: /* @__PURE__ */ boolean(),
|
|
1555
|
-
class: /* @__PURE__ */ boolean()
|
|
1556
|
-
})])),
|
|
1557
|
-
reserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1558
|
-
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1559
|
-
})])),
|
|
1560
|
-
mangleProps: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1561
|
-
include: /* @__PURE__ */ instance(RegExp),
|
|
1562
|
-
exclude: /* @__PURE__ */ optional(/* @__PURE__ */ instance(RegExp)),
|
|
1563
|
-
reserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1564
|
-
quoted: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1565
|
-
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1566
|
-
cache: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ literal(false)])))
|
|
1567
|
-
})),
|
|
1568
|
-
codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1569
|
-
removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1570
|
-
legalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1571
|
-
/* @__PURE__ */ literal("none"),
|
|
1572
|
-
/* @__PURE__ */ literal("inline"),
|
|
1573
|
-
/* @__PURE__ */ literal("eof"),
|
|
1574
|
-
/* @__PURE__ */ literal("external"),
|
|
1575
|
-
/* @__PURE__ */ strictObject({ linked: /* @__PURE__ */ string() })
|
|
1576
|
-
]))
|
|
1577
|
-
})]))
|
|
1578
|
-
});
|
|
1579
|
-
const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1580
|
-
alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1581
|
-
/* @__PURE__ */ literal(false),
|
|
1582
|
-
/* @__PURE__ */ string(),
|
|
1583
|
-
/* @__PURE__ */ array(/* @__PURE__ */ string())
|
|
1584
|
-
]))),
|
|
1585
|
-
aliasFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1586
|
-
conditionNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1587
|
-
extensionAlias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1588
|
-
exportsFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1589
|
-
extensions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1590
|
-
mainFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1591
|
-
mainFiles: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1592
|
-
modules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1593
|
-
symlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1594
|
-
tsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1595
|
-
});
|
|
1596
|
-
const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1597
|
-
moduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1598
|
-
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1599
|
-
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ custom((input) => /* @__PURE__ */ is(/* @__PURE__ */ array(/* @__PURE__ */ string()), input), "string array")),
|
|
1600
|
-
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1601
|
-
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1602
|
-
commonjs: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1603
|
-
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")])),
|
|
1604
|
-
propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")]))
|
|
1605
|
-
});
|
|
1606
|
-
const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1607
|
-
inlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1608
|
-
mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("all"), /* @__PURE__ */ literal("smart")])),
|
|
1609
|
-
pass: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
1610
|
-
})])), /* @__PURE__ */ description("Enable crossmodule constant inlining")),
|
|
1611
|
-
pifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use PIFE pattern for module wrappers"))
|
|
1612
|
-
});
|
|
1613
|
-
const LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
|
|
1614
|
-
const OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1615
|
-
LogLevelSchema,
|
|
1616
|
-
RollupLogSchema,
|
|
1617
|
-
LogOrStringHandlerSchema
|
|
1618
|
-
])));
|
|
1619
|
-
const OnwarnSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([RollupLogSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ union([RollupLogWithStringSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ returns(RollupLogWithStringSchema))])])))])));
|
|
1620
|
-
const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1621
|
-
port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1622
|
-
host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1623
|
-
implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1624
|
-
skipCommonRuntimeInjection: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1625
|
-
lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1626
|
-
})]);
|
|
1627
|
-
const InputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1628
|
-
input: /* @__PURE__ */ optional(InputOptionSchema),
|
|
1629
|
-
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1630
|
-
external: /* @__PURE__ */ optional(ExternalOptionSchema),
|
|
1631
|
-
makeAbsoluteExternalsRelative: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("ifRelativeSource")])),
|
|
1632
|
-
resolve: /* @__PURE__ */ optional(ResolveOptionsSchema),
|
|
1633
|
-
cwd: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Current working directory")),
|
|
1634
|
-
platform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1635
|
-
/* @__PURE__ */ literal("browser"),
|
|
1636
|
-
/* @__PURE__ */ literal("neutral"),
|
|
1637
|
-
/* @__PURE__ */ literal("node")
|
|
1638
|
-
])), /* @__PURE__ */ description(`Platform for which the code should be generated (node, ${styleText$1("underline", "browser")}, neutral)`)),
|
|
1639
|
-
shimMissingExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Create shim variables for missing exports")),
|
|
1640
|
-
treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), TreeshakingOptionsSchema])),
|
|
1641
|
-
optimization: /* @__PURE__ */ optional(OptimizationOptionsSchema),
|
|
1642
|
-
logLevel: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(LogLevelOptionSchema), /* @__PURE__ */ description(`Log level (${styleText$1("dim", "silent")}, ${styleText$1(["underline", "gray"], "info")}, debug, ${styleText$1("yellow", "warn")})`)),
|
|
1643
|
-
onLog: /* @__PURE__ */ optional(OnLogSchema),
|
|
1644
|
-
onwarn: /* @__PURE__ */ optional(OnwarnSchema),
|
|
1645
|
-
moduleTypes: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleTypesSchema), /* @__PURE__ */ description("Module types for customized extensions")),
|
|
1646
|
-
experimental: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1647
|
-
viteMode: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1648
|
-
resolveNewUrlToAsset: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1649
|
-
devMode: /* @__PURE__ */ optional(DevModeSchema),
|
|
1650
|
-
chunkModulesOrder: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("module-id"), /* @__PURE__ */ literal("exec-order")])),
|
|
1651
|
-
attachDebugInfo: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1652
|
-
/* @__PURE__ */ literal("none"),
|
|
1653
|
-
/* @__PURE__ */ literal("simple"),
|
|
1654
|
-
/* @__PURE__ */ literal("full")
|
|
1655
|
-
])),
|
|
1656
|
-
chunkImportMap: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
|
|
1657
|
-
baseUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1658
|
-
fileName: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1659
|
-
})])),
|
|
1660
|
-
onDemandWrapping: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1661
|
-
incrementalBuild: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1662
|
-
nativeMagicString: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1663
|
-
chunkOptimization: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1664
|
-
mergeCommonChunks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1665
|
-
avoidRedundantChunkLoads: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1666
|
-
})])),
|
|
1667
|
-
lazyBarrel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1668
|
-
})),
|
|
1669
|
-
transform: /* @__PURE__ */ optional(TransformOptionsSchema),
|
|
1670
|
-
watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
|
|
1671
|
-
checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
|
|
1672
|
-
devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Used to name the build.")) })), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
1673
|
-
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1674
|
-
/* @__PURE__ */ literal("strict"),
|
|
1675
|
-
/* @__PURE__ */ literal("allow-extension"),
|
|
1676
|
-
/* @__PURE__ */ literal("exports-only"),
|
|
1677
|
-
/* @__PURE__ */ literal(false)
|
|
1678
|
-
]))),
|
|
1679
|
-
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The value of `this` at the top level of each module.")),
|
|
1680
|
-
tsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description("Path to the tsconfig.json file."))
|
|
1681
|
-
});
|
|
1682
|
-
const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1683
|
-
input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
|
|
1684
|
-
external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
1685
|
-
treeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("enable treeshaking")),
|
|
1686
|
-
makeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Prevent normalization of external imports")),
|
|
1687
|
-
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description("Avoid facade chunks for entry points")),
|
|
1688
|
-
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The entity top-level `this` represents."))
|
|
1689
|
-
});
|
|
1690
|
-
const InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1691
|
-
...InputOptionsSchema.entries,
|
|
1692
|
-
...InputCliOverrideSchema.entries
|
|
1693
|
-
}), [
|
|
1694
|
-
"plugins",
|
|
1695
|
-
"onwarn",
|
|
1696
|
-
"onLog",
|
|
1697
|
-
"resolve",
|
|
1698
|
-
"experimental",
|
|
1699
|
-
"watch"
|
|
1700
|
-
]);
|
|
1701
|
-
const ModuleFormatSchema = /* @__PURE__ */ union([
|
|
1702
|
-
/* @__PURE__ */ literal("es"),
|
|
1703
|
-
/* @__PURE__ */ literal("cjs"),
|
|
1704
|
-
/* @__PURE__ */ literal("esm"),
|
|
1705
|
-
/* @__PURE__ */ literal("module"),
|
|
1706
|
-
/* @__PURE__ */ literal("commonjs"),
|
|
1707
|
-
/* @__PURE__ */ literal("iife"),
|
|
1708
|
-
/* @__PURE__ */ literal("umd")
|
|
1709
|
-
]);
|
|
1710
|
-
const AddonFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returnsAsync(/* @__PURE__ */ unionAsync([/* @__PURE__ */ string(), /* @__PURE__ */ pipeAsync(/* @__PURE__ */ promise(), /* @__PURE__ */ awaitAsync(), /* @__PURE__ */ string())])));
|
|
1711
|
-
const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1712
|
-
const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
|
|
1713
|
-
const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1714
|
-
const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
|
|
1715
|
-
const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1716
|
-
const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
|
|
1717
|
-
const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1718
|
-
const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1719
|
-
const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1720
|
-
const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1721
|
-
const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
|
|
1722
|
-
/* @__PURE__ */ boolean(),
|
|
1723
|
-
/* @__PURE__ */ void_(),
|
|
1724
|
-
/* @__PURE__ */ undefined_()
|
|
1725
|
-
])));
|
|
1726
|
-
const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
|
|
1727
|
-
includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1728
|
-
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1729
|
-
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1730
|
-
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1731
|
-
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1732
|
-
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1733
|
-
groups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({
|
|
1734
|
-
name: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),
|
|
1735
|
-
test: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
|
|
1736
|
-
priority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1737
|
-
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1738
|
-
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1739
|
-
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1740
|
-
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1741
|
-
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1742
|
-
entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1743
|
-
entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1744
|
-
includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1745
|
-
tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
1746
|
-
})))
|
|
1747
|
-
});
|
|
1748
|
-
const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1749
|
-
symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
|
|
1750
|
-
preset: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")])),
|
|
1751
|
-
profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
|
|
1752
|
-
});
|
|
1753
|
-
const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1754
|
-
dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
|
|
1755
|
-
file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
|
|
1756
|
-
exports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1757
|
-
/* @__PURE__ */ literal("auto"),
|
|
1758
|
-
/* @__PURE__ */ literal("named"),
|
|
1759
|
-
/* @__PURE__ */ literal("default"),
|
|
1760
|
-
/* @__PURE__ */ literal("none")
|
|
1761
|
-
])), /* @__PURE__ */ description(`Specify a export mode (${styleText$1("underline", "auto")}, named, default, none)`)),
|
|
1762
|
-
hashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1763
|
-
/* @__PURE__ */ literal("base64"),
|
|
1764
|
-
/* @__PURE__ */ literal("base36"),
|
|
1765
|
-
/* @__PURE__ */ literal("hex")
|
|
1766
|
-
])), /* @__PURE__ */ description("Use the specified character set for file hashes")),
|
|
1767
|
-
format: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText$1("underline", "esm")}, cjs, and iife)`)),
|
|
1768
|
-
sourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1769
|
-
/* @__PURE__ */ boolean(),
|
|
1770
|
-
/* @__PURE__ */ literal("inline"),
|
|
1771
|
-
/* @__PURE__ */ literal("hidden")
|
|
1772
|
-
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or \`-s\` for \`.map\` file)`)),
|
|
1773
|
-
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
1774
|
-
sourcemapFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ChunkFileNamesSchema), /* @__PURE__ */ description("Name pattern for emitted sourcemaps")),
|
|
1775
|
-
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
1776
|
-
sourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Exclude source content from sourcemaps")),
|
|
1777
|
-
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1778
|
-
/* @__PURE__ */ boolean(),
|
|
1779
|
-
/* @__PURE__ */ custom(() => true),
|
|
1780
|
-
StringOrRegExpSchema
|
|
1781
|
-
])),
|
|
1782
|
-
sourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1783
|
-
banner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1784
|
-
footer: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1785
|
-
postBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1786
|
-
postFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1787
|
-
intro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1788
|
-
outro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1789
|
-
extend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
1790
|
-
esModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("if-default-prop")])),
|
|
1791
|
-
assetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),
|
|
1792
|
-
entryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1793
|
-
chunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1794
|
-
sanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),
|
|
1795
|
-
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1796
|
-
/* @__PURE__ */ boolean(),
|
|
1797
|
-
/* @__PURE__ */ literal("dce-only"),
|
|
1798
|
-
MinifyOptionsSchema
|
|
1799
|
-
])), /* @__PURE__ */ description("Minify the bundled file")),
|
|
1800
|
-
name: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name for UMD / IIFE format outputs")),
|
|
1801
|
-
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), GlobalsFunctionSchema])), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key:value`)")),
|
|
1802
|
-
paths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description("Maps external module IDs to paths")),
|
|
1803
|
-
generatedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description("Generated code options")),
|
|
1804
|
-
externalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("external live bindings")),
|
|
1805
|
-
inlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inline dynamic imports")),
|
|
1806
|
-
dynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Dynamic import in CJS output")),
|
|
1807
|
-
manualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),
|
|
1808
|
-
codeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),
|
|
1809
|
-
advancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),
|
|
1810
|
-
legalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("none"), /* @__PURE__ */ literal("inline")])), /* @__PURE__ */ description("Control legal comments in the output")),
|
|
1811
|
-
comments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1812
|
-
legal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1813
|
-
annotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1814
|
-
jsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1815
|
-
})])), /* @__PURE__ */ description("Control comments in the output")),
|
|
1816
|
-
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1817
|
-
polyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Disable require polyfill injection")),
|
|
1818
|
-
hoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),
|
|
1819
|
-
preserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve module structure")),
|
|
1820
|
-
preserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Put preserved modules under this path at root level")),
|
|
1821
|
-
virtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1822
|
-
minifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify internal exports")),
|
|
1823
|
-
topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
|
|
1824
|
-
cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
|
|
1825
|
-
keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
|
|
1826
|
-
strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve source module execution order across generated chunks.")),
|
|
1827
|
-
strict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("auto")])), /* @__PURE__ */ description("Whether to always output `\"use strict\"` directive in non-ES module outputs."))
|
|
1828
|
-
});
|
|
1829
|
-
const getAddonDescription = (placement, wrapper) => {
|
|
1830
|
-
return `Code to insert the ${styleText$1("bold", placement)} of the bundled file (${styleText$1("bold", wrapper)} the wrapper function)`;
|
|
1831
|
-
};
|
|
1832
|
-
const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1833
|
-
assetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for asset files")),
|
|
1834
|
-
entryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted entry chunks")),
|
|
1835
|
-
chunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted secondary chunks")),
|
|
1836
|
-
sanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Sanitize file name")),
|
|
1837
|
-
banner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "outside"))),
|
|
1838
|
-
footer: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "outside"))),
|
|
1839
|
-
postBanner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1840
|
-
postFooter: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1841
|
-
intro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "inside"))),
|
|
1842
|
-
outro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "inside"))),
|
|
1843
|
-
esModule: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
1844
|
-
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key:value`)")),
|
|
1845
|
-
codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1846
|
-
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1847
|
-
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1848
|
-
})])), /* @__PURE__ */ description("Code splitting options. Enabled by default; use `--no-codeSplitting` to disable, or `--codeSplitting.minSize` / `--codeSplitting.minShareCount` to configure")),
|
|
1849
|
-
advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1850
|
-
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1851
|
-
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1852
|
-
})), /* @__PURE__ */ description("Deprecated: use codeSplitting instead")),
|
|
1853
|
-
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify the bundled file"))
|
|
1854
|
-
});
|
|
1855
|
-
const OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1856
|
-
...OutputOptionsSchema.entries,
|
|
1857
|
-
...OutputCliOverrideSchema.entries
|
|
1858
|
-
}), [
|
|
1859
|
-
"sourcemapIgnoreList",
|
|
1860
|
-
"sourcemapPathTransform",
|
|
1861
|
-
"plugins",
|
|
1862
|
-
"hoistTransitiveImports"
|
|
1863
|
-
]);
|
|
1864
|
-
const CliOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1865
|
-
config: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ boolean()])), /* @__PURE__ */ description("Path to the config file (default: `rolldown.config.js`)")),
|
|
1866
|
-
help: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show help")),
|
|
1867
|
-
environment: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("Pass additional settings to the config file via process.ENV.")),
|
|
1868
|
-
version: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show version number")),
|
|
1869
|
-
watch: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Watch files in bundle and rebuild on changes")),
|
|
1870
|
-
configLoader: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("bundle"), /* @__PURE__ */ literal("native")])), /* @__PURE__ */ description("How to load the config file (bundle, native)")),
|
|
1871
|
-
...InputCliOptionsSchema.entries,
|
|
1872
|
-
...OutputCliOptionsSchema.entries
|
|
1873
|
-
});
|
|
1874
|
-
function validateCliOptions(options) {
|
|
1875
|
-
let parsed = /* @__PURE__ */ safeParse(CliOptionsSchema, options);
|
|
1876
|
-
return [parsed.output, parsed.issues?.map((issue) => {
|
|
1877
|
-
return `Invalid value for option ${issue.path?.map((pathItem) => pathItem.key).join(" ")}: ${issue.message}`;
|
|
1878
|
-
})];
|
|
1879
|
-
}
|
|
1880
|
-
const inputHelperMsgRecord = {
|
|
1881
|
-
output: { ignored: true },
|
|
1882
|
-
"resolve.tsconfigFilename": { issueMsg: "It is deprecated. Please use the top-level `tsconfig` option instead." }
|
|
1883
|
-
};
|
|
1884
|
-
const outputHelperMsgRecord = {};
|
|
1885
|
-
function validateOption(key, options) {
|
|
1886
|
-
if (typeof options !== "object") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);
|
|
1887
|
-
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
1888
|
-
let parsed = /* @__PURE__ */ safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1889
|
-
if (!parsed.success) {
|
|
1890
|
-
const errors = parsed.issues.map((issue) => {
|
|
1891
|
-
let issueMsg = issue.message;
|
|
1892
|
-
const issuePaths = issue.path.map((path) => path.key);
|
|
1893
|
-
if (issue.type === "union") {
|
|
1894
|
-
const subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));
|
|
1895
|
-
if (subIssue) {
|
|
1896
|
-
if (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));
|
|
1897
|
-
issueMsg = subIssue.message;
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
const stringPath = issuePaths.join(".");
|
|
1901
|
-
const helper = key === "input" ? inputHelperMsgRecord[stringPath] : outputHelperMsgRecord[stringPath];
|
|
1902
|
-
if (helper && helper.ignored) return "";
|
|
1903
|
-
return `- For the "${stringPath}". ${helper?.issueMsg || issueMsg + "."} ${helper?.help ? `\n Help: ${helper.help}` : ""}`;
|
|
1904
|
-
}).filter(Boolean);
|
|
1905
|
-
if (errors.length) console.warn(`\x1b[33mWarning: Invalid ${key} options (${errors.length} issue${errors.length === 1 ? "" : "s"} found)\n${errors.join("\n")}\x1b[0m`);
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
function getInputCliKeys() {
|
|
1909
|
-
return (/* @__PURE__ */ keyof(InputCliOptionsSchema)).options;
|
|
1910
|
-
}
|
|
1911
|
-
function getOutputCliKeys() {
|
|
1912
|
-
return (/* @__PURE__ */ keyof(OutputCliOptionsSchema)).options;
|
|
1913
|
-
}
|
|
1914
|
-
function getCliSchemaInfo() {
|
|
1915
|
-
return flattenValibotSchema(CliOptionsSchema);
|
|
1916
|
-
}
|
|
1917
|
-
//#endregion
|
|
1918
|
-
//#region src/types/chunking-context.ts
|
|
1919
|
-
var ChunkingContextImpl = class {
|
|
1920
|
-
context;
|
|
1921
|
-
pluginContextData;
|
|
1922
|
-
constructor(context, pluginContextData) {
|
|
1923
|
-
this.context = context;
|
|
1924
|
-
this.pluginContextData = pluginContextData;
|
|
1925
|
-
}
|
|
1926
|
-
getModuleInfo(moduleId) {
|
|
1927
|
-
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
1928
|
-
if (bindingInfo) return transformModuleInfo(bindingInfo, this.pluginContextData.getModuleOption(moduleId));
|
|
1929
|
-
return null;
|
|
1930
|
-
}
|
|
1931
|
-
};
|
|
1932
|
-
//#endregion
|
|
1933
|
-
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
1934
|
-
const LogLevels = {
|
|
1935
|
-
silent: Number.NEGATIVE_INFINITY,
|
|
1936
|
-
fatal: 0,
|
|
1937
|
-
error: 0,
|
|
1938
|
-
warn: 1,
|
|
1939
|
-
log: 2,
|
|
1940
|
-
info: 3,
|
|
1941
|
-
success: 3,
|
|
1942
|
-
fail: 3,
|
|
1943
|
-
ready: 3,
|
|
1944
|
-
start: 3,
|
|
1945
|
-
box: 3,
|
|
1946
|
-
debug: 4,
|
|
1947
|
-
trace: 5,
|
|
1948
|
-
verbose: Number.POSITIVE_INFINITY
|
|
1949
|
-
};
|
|
1950
|
-
const LogTypes = {
|
|
1951
|
-
silent: { level: -1 },
|
|
1952
|
-
fatal: { level: LogLevels.fatal },
|
|
1953
|
-
error: { level: LogLevels.error },
|
|
1954
|
-
warn: { level: LogLevels.warn },
|
|
1955
|
-
log: { level: LogLevels.log },
|
|
1956
|
-
info: { level: LogLevels.info },
|
|
1957
|
-
success: { level: LogLevels.success },
|
|
1958
|
-
fail: { level: LogLevels.fail },
|
|
1959
|
-
ready: { level: LogLevels.info },
|
|
1960
|
-
start: { level: LogLevels.info },
|
|
1961
|
-
box: { level: LogLevels.info },
|
|
1962
|
-
debug: { level: LogLevels.debug },
|
|
1963
|
-
trace: { level: LogLevels.trace },
|
|
1964
|
-
verbose: { level: LogLevels.verbose }
|
|
1965
|
-
};
|
|
1966
|
-
function isPlainObject$1(value) {
|
|
1967
|
-
if (value === null || typeof value !== "object") return false;
|
|
1968
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1969
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
1970
|
-
if (Symbol.iterator in value) return false;
|
|
1971
|
-
if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
|
|
1972
|
-
return true;
|
|
1973
|
-
}
|
|
1974
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
1975
|
-
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
1976
|
-
const object = Object.assign({}, defaults);
|
|
1977
|
-
for (const key in baseObject) {
|
|
1978
|
-
if (key === "__proto__" || key === "constructor") continue;
|
|
1979
|
-
const value = baseObject[key];
|
|
1980
|
-
if (value === null || value === void 0) continue;
|
|
1981
|
-
if (merger && merger(object, key, value, namespace)) continue;
|
|
1982
|
-
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
1983
|
-
else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
1984
|
-
else object[key] = value;
|
|
1985
|
-
}
|
|
1986
|
-
return object;
|
|
1987
|
-
}
|
|
1988
|
-
function createDefu(merger) {
|
|
1989
|
-
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
1990
|
-
}
|
|
1991
|
-
const defu = createDefu();
|
|
1992
|
-
function isPlainObject(obj) {
|
|
1993
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
1994
|
-
}
|
|
1995
|
-
function isLogObj(arg) {
|
|
1996
|
-
if (!isPlainObject(arg)) return false;
|
|
1997
|
-
if (!arg.message && !arg.args) return false;
|
|
1998
|
-
if (arg.stack) return false;
|
|
1999
|
-
return true;
|
|
2000
|
-
}
|
|
2001
|
-
let paused = false;
|
|
2002
|
-
const queue = [];
|
|
2003
|
-
var Consola = class Consola {
|
|
2004
|
-
options;
|
|
2005
|
-
_lastLog;
|
|
2006
|
-
_mockFn;
|
|
2007
|
-
/**
|
|
2008
|
-
* Creates an instance of Consola with specified options or defaults.
|
|
2009
|
-
*
|
|
2010
|
-
* @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
|
|
2011
|
-
*/
|
|
2012
|
-
constructor(options = {}) {
|
|
2013
|
-
const types = options.types || LogTypes;
|
|
2014
|
-
this.options = defu({
|
|
2015
|
-
...options,
|
|
2016
|
-
defaults: { ...options.defaults },
|
|
2017
|
-
level: _normalizeLogLevel(options.level, types),
|
|
2018
|
-
reporters: [...options.reporters || []]
|
|
2019
|
-
}, {
|
|
2020
|
-
types: LogTypes,
|
|
2021
|
-
throttle: 1e3,
|
|
2022
|
-
throttleMin: 5,
|
|
2023
|
-
formatOptions: {
|
|
2024
|
-
date: true,
|
|
2025
|
-
colors: false,
|
|
2026
|
-
compact: true
|
|
2027
|
-
}
|
|
2028
|
-
});
|
|
2029
|
-
for (const type in types) {
|
|
2030
|
-
const defaults = {
|
|
2031
|
-
type,
|
|
2032
|
-
...this.options.defaults,
|
|
2033
|
-
...types[type]
|
|
2034
|
-
};
|
|
2035
|
-
this[type] = this._wrapLogFn(defaults);
|
|
2036
|
-
this[type].raw = this._wrapLogFn(defaults, true);
|
|
2037
|
-
}
|
|
2038
|
-
if (this.options.mockFn) this.mockTypes();
|
|
2039
|
-
this._lastLog = {};
|
|
2040
|
-
}
|
|
2041
|
-
/**
|
|
2042
|
-
* Gets the current log level of the Consola instance.
|
|
2043
|
-
*
|
|
2044
|
-
* @returns {number} The current log level.
|
|
2045
|
-
*/
|
|
2046
|
-
get level() {
|
|
2047
|
-
return this.options.level;
|
|
2048
|
-
}
|
|
2049
|
-
/**
|
|
2050
|
-
* Sets the minimum log level that will be output by the instance.
|
|
2051
|
-
*
|
|
2052
|
-
* @param {number} level - The new log level to set.
|
|
2053
|
-
*/
|
|
2054
|
-
set level(level) {
|
|
2055
|
-
this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
|
|
2056
|
-
}
|
|
2057
|
-
/**
|
|
2058
|
-
* Displays a prompt to the user and returns the response.
|
|
2059
|
-
* Throw an error if `prompt` is not supported by the current configuration.
|
|
2060
|
-
*
|
|
2061
|
-
* @template T
|
|
2062
|
-
* @param {string} message - The message to display in the prompt.
|
|
2063
|
-
* @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
|
|
2064
|
-
* @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
|
|
2065
|
-
*/
|
|
2066
|
-
prompt(message, opts) {
|
|
2067
|
-
if (!this.options.prompt) throw new Error("prompt is not supported!");
|
|
2068
|
-
return this.options.prompt(message, opts);
|
|
2069
|
-
}
|
|
2070
|
-
/**
|
|
2071
|
-
* Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
|
|
2072
|
-
*
|
|
2073
|
-
* @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
|
|
2074
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2075
|
-
*/
|
|
2076
|
-
create(options) {
|
|
2077
|
-
const instance = new Consola({
|
|
2078
|
-
...this.options,
|
|
2079
|
-
...options
|
|
2080
|
-
});
|
|
2081
|
-
if (this._mockFn) instance.mockTypes(this._mockFn);
|
|
2082
|
-
return instance;
|
|
2083
|
-
}
|
|
2084
|
-
/**
|
|
2085
|
-
* Creates a new Consola instance with the specified default log object properties.
|
|
2086
|
-
*
|
|
2087
|
-
* @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
|
|
2088
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2089
|
-
*/
|
|
2090
|
-
withDefaults(defaults) {
|
|
2091
|
-
return this.create({
|
|
2092
|
-
...this.options,
|
|
2093
|
-
defaults: {
|
|
2094
|
-
...this.options.defaults,
|
|
2095
|
-
...defaults
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
/**
|
|
2100
|
-
* Creates a new Consola instance with a specified tag, which will be included in every log.
|
|
2101
|
-
*
|
|
2102
|
-
* @param {string} tag - The tag to include in each log of the new instance.
|
|
2103
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2104
|
-
*/
|
|
2105
|
-
withTag(tag) {
|
|
2106
|
-
return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
|
|
2107
|
-
}
|
|
2108
|
-
/**
|
|
2109
|
-
* Adds a custom reporter to the Consola instance.
|
|
2110
|
-
* Reporters will be called for each log message, depending on their implementation and log level.
|
|
2111
|
-
*
|
|
2112
|
-
* @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
|
|
2113
|
-
* @returns {Consola} The current Consola instance.
|
|
2114
|
-
*/
|
|
2115
|
-
addReporter(reporter) {
|
|
2116
|
-
this.options.reporters.push(reporter);
|
|
2117
|
-
return this;
|
|
2118
|
-
}
|
|
2119
|
-
/**
|
|
2120
|
-
* Removes a custom reporter from the Consola instance.
|
|
2121
|
-
* If no reporter is specified, all reporters will be removed.
|
|
2122
|
-
*
|
|
2123
|
-
* @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
|
|
2124
|
-
* @returns {Consola} The current Consola instance.
|
|
2125
|
-
*/
|
|
2126
|
-
removeReporter(reporter) {
|
|
2127
|
-
if (reporter) {
|
|
2128
|
-
const i = this.options.reporters.indexOf(reporter);
|
|
2129
|
-
if (i !== -1) return this.options.reporters.splice(i, 1);
|
|
2130
|
-
} else this.options.reporters.splice(0);
|
|
2131
|
-
return this;
|
|
2132
|
-
}
|
|
2133
|
-
/**
|
|
2134
|
-
* Replaces all reporters of the Consola instance with the specified array of reporters.
|
|
2135
|
-
*
|
|
2136
|
-
* @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
|
|
2137
|
-
* @returns {Consola} The current Consola instance.
|
|
2138
|
-
*/
|
|
2139
|
-
setReporters(reporters) {
|
|
2140
|
-
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
2141
|
-
return this;
|
|
2142
|
-
}
|
|
2143
|
-
wrapAll() {
|
|
2144
|
-
this.wrapConsole();
|
|
2145
|
-
this.wrapStd();
|
|
2146
|
-
}
|
|
2147
|
-
restoreAll() {
|
|
2148
|
-
this.restoreConsole();
|
|
2149
|
-
this.restoreStd();
|
|
2150
|
-
}
|
|
2151
|
-
/**
|
|
2152
|
-
* Overrides console methods with Consola logging methods for consistent logging.
|
|
2153
|
-
*/
|
|
2154
|
-
wrapConsole() {
|
|
2155
|
-
for (const type in this.options.types) {
|
|
2156
|
-
if (!console["__" + type]) console["__" + type] = console[type];
|
|
2157
|
-
console[type] = this[type].raw;
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
/**
|
|
2161
|
-
* Restores the original console methods, removing Consola overrides.
|
|
2162
|
-
*/
|
|
2163
|
-
restoreConsole() {
|
|
2164
|
-
for (const type in this.options.types) if (console["__" + type]) {
|
|
2165
|
-
console[type] = console["__" + type];
|
|
2166
|
-
delete console["__" + type];
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
/**
|
|
2170
|
-
* Overrides standard output and error streams to redirect them through Consola.
|
|
2171
|
-
*/
|
|
2172
|
-
wrapStd() {
|
|
2173
|
-
this._wrapStream(this.options.stdout, "log");
|
|
2174
|
-
this._wrapStream(this.options.stderr, "log");
|
|
2175
|
-
}
|
|
2176
|
-
_wrapStream(stream, type) {
|
|
2177
|
-
if (!stream) return;
|
|
2178
|
-
if (!stream.__write) stream.__write = stream.write;
|
|
2179
|
-
stream.write = (data) => {
|
|
2180
|
-
this[type].raw(String(data).trim());
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
/**
|
|
2184
|
-
* Restores the original standard output and error streams, removing the Consola redirection.
|
|
2185
|
-
*/
|
|
2186
|
-
restoreStd() {
|
|
2187
|
-
this._restoreStream(this.options.stdout);
|
|
2188
|
-
this._restoreStream(this.options.stderr);
|
|
2189
|
-
}
|
|
2190
|
-
_restoreStream(stream) {
|
|
2191
|
-
if (!stream) return;
|
|
2192
|
-
if (stream.__write) {
|
|
2193
|
-
stream.write = stream.__write;
|
|
2194
|
-
delete stream.__write;
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
/**
|
|
2198
|
-
* Pauses logging, queues incoming logs until resumed.
|
|
2199
|
-
*/
|
|
2200
|
-
pauseLogs() {
|
|
2201
|
-
paused = true;
|
|
2202
|
-
}
|
|
2203
|
-
/**
|
|
2204
|
-
* Resumes logging, processing any queued logs.
|
|
2205
|
-
*/
|
|
2206
|
-
resumeLogs() {
|
|
2207
|
-
paused = false;
|
|
2208
|
-
const _queue = queue.splice(0);
|
|
2209
|
-
for (const item of _queue) item[0]._logFn(item[1], item[2]);
|
|
2210
|
-
}
|
|
2211
|
-
/**
|
|
2212
|
-
* Replaces logging methods with mocks if a mock function is provided.
|
|
2213
|
-
*
|
|
2214
|
-
* @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
|
|
2215
|
-
*/
|
|
2216
|
-
mockTypes(mockFn) {
|
|
2217
|
-
const _mockFn = mockFn || this.options.mockFn;
|
|
2218
|
-
this._mockFn = _mockFn;
|
|
2219
|
-
if (typeof _mockFn !== "function") return;
|
|
2220
|
-
for (const type in this.options.types) {
|
|
2221
|
-
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
2222
|
-
this[type].raw = this[type];
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
_wrapLogFn(defaults, isRaw) {
|
|
2226
|
-
return (...args) => {
|
|
2227
|
-
if (paused) {
|
|
2228
|
-
queue.push([
|
|
2229
|
-
this,
|
|
2230
|
-
defaults,
|
|
2231
|
-
args,
|
|
2232
|
-
isRaw
|
|
2233
|
-
]);
|
|
2234
|
-
return;
|
|
2235
|
-
}
|
|
2236
|
-
return this._logFn(defaults, args, isRaw);
|
|
2237
|
-
};
|
|
2238
|
-
}
|
|
2239
|
-
_logFn(defaults, args, isRaw) {
|
|
2240
|
-
if ((defaults.level || 0) > this.level) return false;
|
|
2241
|
-
const logObj = {
|
|
2242
|
-
date: /* @__PURE__ */ new Date(),
|
|
2243
|
-
args: [],
|
|
2244
|
-
...defaults,
|
|
2245
|
-
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
2246
|
-
};
|
|
2247
|
-
if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
|
|
2248
|
-
else logObj.args = [...args];
|
|
2249
|
-
if (logObj.message) {
|
|
2250
|
-
logObj.args.unshift(logObj.message);
|
|
2251
|
-
delete logObj.message;
|
|
2252
|
-
}
|
|
2253
|
-
if (logObj.additional) {
|
|
2254
|
-
if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
|
|
2255
|
-
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
2256
|
-
delete logObj.additional;
|
|
2257
|
-
}
|
|
2258
|
-
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
2259
|
-
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
2260
|
-
const resolveLog = (newLog = false) => {
|
|
2261
|
-
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
2262
|
-
if (this._lastLog.object && repeated > 0) {
|
|
2263
|
-
const args2 = [...this._lastLog.object.args];
|
|
2264
|
-
if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
|
|
2265
|
-
this._log({
|
|
2266
|
-
...this._lastLog.object,
|
|
2267
|
-
args: args2
|
|
2268
|
-
});
|
|
2269
|
-
this._lastLog.count = 1;
|
|
2270
|
-
}
|
|
2271
|
-
if (newLog) {
|
|
2272
|
-
this._lastLog.object = logObj;
|
|
2273
|
-
this._log(logObj);
|
|
2274
|
-
}
|
|
2275
|
-
};
|
|
2276
|
-
clearTimeout(this._lastLog.timeout);
|
|
2277
|
-
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
2278
|
-
this._lastLog.time = logObj.date;
|
|
2279
|
-
if (diffTime < this.options.throttle) try {
|
|
2280
|
-
const serializedLog = JSON.stringify([
|
|
2281
|
-
logObj.type,
|
|
2282
|
-
logObj.tag,
|
|
2283
|
-
logObj.args
|
|
2284
|
-
]);
|
|
2285
|
-
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
2286
|
-
this._lastLog.serialized = serializedLog;
|
|
2287
|
-
if (isSameLog) {
|
|
2288
|
-
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
2289
|
-
if (this._lastLog.count > this.options.throttleMin) {
|
|
2290
|
-
this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
|
|
2291
|
-
return;
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
} catch {}
|
|
2295
|
-
resolveLog(true);
|
|
2296
|
-
}
|
|
2297
|
-
_log(logObj) {
|
|
2298
|
-
for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
|
|
2299
|
-
}
|
|
2300
|
-
};
|
|
2301
|
-
function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
|
|
2302
|
-
if (input === void 0) return defaultLevel;
|
|
2303
|
-
if (typeof input === "number") return input;
|
|
2304
|
-
if (types[input] && types[input].level !== void 0) return types[input].level;
|
|
2305
|
-
return defaultLevel;
|
|
2306
|
-
}
|
|
2307
|
-
Consola.prototype.add = Consola.prototype.addReporter;
|
|
2308
|
-
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
2309
|
-
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
2310
|
-
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
2311
|
-
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
2312
|
-
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
2313
|
-
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
2314
|
-
function createConsola$1(options = {}) {
|
|
2315
|
-
return new Consola(options);
|
|
2316
|
-
}
|
|
2317
|
-
//#endregion
|
|
2318
|
-
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
2319
|
-
function parseStack(stack, message) {
|
|
2320
|
-
const cwd = process.cwd() + sep;
|
|
2321
|
-
return stack.split("\n").splice(message.split("\n").length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
|
|
2322
|
-
}
|
|
2323
|
-
function writeStream(data, stream) {
|
|
2324
|
-
return (stream.__write || stream.write).call(stream, data);
|
|
2325
|
-
}
|
|
2326
|
-
const bracket = (x) => x ? `[${x}]` : "";
|
|
2327
|
-
var BasicReporter = class {
|
|
2328
|
-
formatStack(stack, message, opts) {
|
|
2329
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2330
|
-
return indent + parseStack(stack, message).join(`
|
|
2331
|
-
${indent}`);
|
|
2332
|
-
}
|
|
2333
|
-
formatError(err, opts) {
|
|
2334
|
-
const message = err.message ?? formatWithOptions(opts, err);
|
|
2335
|
-
const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
|
|
2336
|
-
const level = opts?.errorLevel || 0;
|
|
2337
|
-
const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
|
|
2338
|
-
const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
|
|
2339
|
-
...opts,
|
|
2340
|
-
errorLevel: level + 1
|
|
2341
|
-
}) : "";
|
|
2342
|
-
return causedPrefix + message + "\n" + stack + causedError;
|
|
2343
|
-
}
|
|
2344
|
-
formatArgs(args, opts) {
|
|
2345
|
-
const _args = args.map((arg) => {
|
|
2346
|
-
if (arg && typeof arg.stack === "string") return this.formatError(arg, opts);
|
|
2347
|
-
return arg;
|
|
2348
|
-
});
|
|
2349
|
-
return formatWithOptions(opts, ..._args);
|
|
2350
|
-
}
|
|
2351
|
-
formatDate(date, opts) {
|
|
2352
|
-
return opts.date ? date.toLocaleTimeString() : "";
|
|
2353
|
-
}
|
|
2354
|
-
filterAndJoin(arr) {
|
|
2355
|
-
return arr.filter(Boolean).join(" ");
|
|
2356
|
-
}
|
|
2357
|
-
formatLogObj(logObj, opts) {
|
|
2358
|
-
const message = this.formatArgs(logObj.args, opts);
|
|
2359
|
-
if (logObj.type === "box") return "\n" + [
|
|
2360
|
-
bracket(logObj.tag),
|
|
2361
|
-
logObj.title && logObj.title,
|
|
2362
|
-
...message.split("\n")
|
|
2363
|
-
].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
|
|
2364
|
-
return this.filterAndJoin([
|
|
2365
|
-
bracket(logObj.type),
|
|
2366
|
-
bracket(logObj.tag),
|
|
2367
|
-
message
|
|
2368
|
-
]);
|
|
2369
|
-
}
|
|
2370
|
-
log(logObj, ctx) {
|
|
2371
|
-
return writeStream(this.formatLogObj(logObj, {
|
|
2372
|
-
columns: ctx.options.stdout.columns || 0,
|
|
2373
|
-
...ctx.options.formatOptions
|
|
2374
|
-
}) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
|
|
2375
|
-
}
|
|
2376
|
-
};
|
|
2377
|
-
//#endregion
|
|
2378
|
-
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
2379
|
-
const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
2380
|
-
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
2381
|
-
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
2382
|
-
const isWindows = platform === "win32";
|
|
2383
|
-
const isDumbTerminal = env.TERM === "dumb";
|
|
2384
|
-
const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
2385
|
-
const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
2386
|
-
const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
2387
|
-
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
2388
|
-
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
2389
|
-
}
|
|
2390
|
-
function clearBleed(index, string, open, close, replace) {
|
|
2391
|
-
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
2392
|
-
}
|
|
2393
|
-
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
2394
|
-
return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
|
|
2395
|
-
}
|
|
2396
|
-
function init(open, close, replace) {
|
|
2397
|
-
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
2398
|
-
}
|
|
2399
|
-
const colorDefs = {
|
|
2400
|
-
reset: init(0, 0),
|
|
2401
|
-
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
2402
|
-
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
2403
|
-
italic: init(3, 23),
|
|
2404
|
-
underline: init(4, 24),
|
|
2405
|
-
inverse: init(7, 27),
|
|
2406
|
-
hidden: init(8, 28),
|
|
2407
|
-
strikethrough: init(9, 29),
|
|
2408
|
-
black: init(30, 39),
|
|
2409
|
-
red: init(31, 39),
|
|
2410
|
-
green: init(32, 39),
|
|
2411
|
-
yellow: init(33, 39),
|
|
2412
|
-
blue: init(34, 39),
|
|
2413
|
-
magenta: init(35, 39),
|
|
2414
|
-
cyan: init(36, 39),
|
|
2415
|
-
white: init(37, 39),
|
|
2416
|
-
gray: init(90, 39),
|
|
2417
|
-
bgBlack: init(40, 49),
|
|
2418
|
-
bgRed: init(41, 49),
|
|
2419
|
-
bgGreen: init(42, 49),
|
|
2420
|
-
bgYellow: init(43, 49),
|
|
2421
|
-
bgBlue: init(44, 49),
|
|
2422
|
-
bgMagenta: init(45, 49),
|
|
2423
|
-
bgCyan: init(46, 49),
|
|
2424
|
-
bgWhite: init(47, 49),
|
|
2425
|
-
blackBright: init(90, 39),
|
|
2426
|
-
redBright: init(91, 39),
|
|
2427
|
-
greenBright: init(92, 39),
|
|
2428
|
-
yellowBright: init(93, 39),
|
|
2429
|
-
blueBright: init(94, 39),
|
|
2430
|
-
magentaBright: init(95, 39),
|
|
2431
|
-
cyanBright: init(96, 39),
|
|
2432
|
-
whiteBright: init(97, 39),
|
|
2433
|
-
bgBlackBright: init(100, 49),
|
|
2434
|
-
bgRedBright: init(101, 49),
|
|
2435
|
-
bgGreenBright: init(102, 49),
|
|
2436
|
-
bgYellowBright: init(103, 49),
|
|
2437
|
-
bgBlueBright: init(104, 49),
|
|
2438
|
-
bgMagentaBright: init(105, 49),
|
|
2439
|
-
bgCyanBright: init(106, 49),
|
|
2440
|
-
bgWhiteBright: init(107, 49)
|
|
2441
|
-
};
|
|
2442
|
-
function createColors(useColor = isColorSupported) {
|
|
2443
|
-
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
2444
|
-
}
|
|
2445
|
-
const colors = createColors();
|
|
2446
|
-
function getColor$1(color, fallback = "reset") {
|
|
2447
|
-
return colors[color] || colors[fallback];
|
|
2448
|
-
}
|
|
2449
|
-
const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
2450
|
-
function stripAnsi$1(text) {
|
|
2451
|
-
return text.replace(new RegExp(ansiRegex$1, "g"), "");
|
|
2452
|
-
}
|
|
2453
|
-
const boxStylePresets = {
|
|
2454
|
-
solid: {
|
|
2455
|
-
tl: "┌",
|
|
2456
|
-
tr: "┐",
|
|
2457
|
-
bl: "└",
|
|
2458
|
-
br: "┘",
|
|
2459
|
-
h: "─",
|
|
2460
|
-
v: "│"
|
|
2461
|
-
},
|
|
2462
|
-
double: {
|
|
2463
|
-
tl: "╔",
|
|
2464
|
-
tr: "╗",
|
|
2465
|
-
bl: "╚",
|
|
2466
|
-
br: "╝",
|
|
2467
|
-
h: "═",
|
|
2468
|
-
v: "║"
|
|
2469
|
-
},
|
|
2470
|
-
doubleSingle: {
|
|
2471
|
-
tl: "╓",
|
|
2472
|
-
tr: "╖",
|
|
2473
|
-
bl: "╙",
|
|
2474
|
-
br: "╜",
|
|
2475
|
-
h: "─",
|
|
2476
|
-
v: "║"
|
|
2477
|
-
},
|
|
2478
|
-
doubleSingleRounded: {
|
|
2479
|
-
tl: "╭",
|
|
2480
|
-
tr: "╮",
|
|
2481
|
-
bl: "╰",
|
|
2482
|
-
br: "╯",
|
|
2483
|
-
h: "─",
|
|
2484
|
-
v: "║"
|
|
2485
|
-
},
|
|
2486
|
-
singleThick: {
|
|
2487
|
-
tl: "┏",
|
|
2488
|
-
tr: "┓",
|
|
2489
|
-
bl: "┗",
|
|
2490
|
-
br: "┛",
|
|
2491
|
-
h: "━",
|
|
2492
|
-
v: "┃"
|
|
2493
|
-
},
|
|
2494
|
-
singleDouble: {
|
|
2495
|
-
tl: "╒",
|
|
2496
|
-
tr: "╕",
|
|
2497
|
-
bl: "╘",
|
|
2498
|
-
br: "╛",
|
|
2499
|
-
h: "═",
|
|
2500
|
-
v: "│"
|
|
2501
|
-
},
|
|
2502
|
-
singleDoubleRounded: {
|
|
2503
|
-
tl: "╭",
|
|
2504
|
-
tr: "╮",
|
|
2505
|
-
bl: "╰",
|
|
2506
|
-
br: "╯",
|
|
2507
|
-
h: "═",
|
|
2508
|
-
v: "│"
|
|
2509
|
-
},
|
|
2510
|
-
rounded: {
|
|
2511
|
-
tl: "╭",
|
|
2512
|
-
tr: "╮",
|
|
2513
|
-
bl: "╰",
|
|
2514
|
-
br: "╯",
|
|
2515
|
-
h: "─",
|
|
2516
|
-
v: "│"
|
|
2517
|
-
}
|
|
2518
|
-
};
|
|
2519
|
-
const defaultStyle = {
|
|
2520
|
-
borderColor: "white",
|
|
2521
|
-
borderStyle: "rounded",
|
|
2522
|
-
valign: "center",
|
|
2523
|
-
padding: 2,
|
|
2524
|
-
marginLeft: 1,
|
|
2525
|
-
marginTop: 1,
|
|
2526
|
-
marginBottom: 1
|
|
2527
|
-
};
|
|
2528
|
-
function box(text, _opts = {}) {
|
|
2529
|
-
const opts = {
|
|
2530
|
-
..._opts,
|
|
2531
|
-
style: {
|
|
2532
|
-
...defaultStyle,
|
|
2533
|
-
..._opts.style
|
|
2534
|
-
}
|
|
2535
|
-
};
|
|
2536
|
-
const textLines = text.split("\n");
|
|
2537
|
-
const boxLines = [];
|
|
2538
|
-
const _color = getColor$1(opts.style.borderColor);
|
|
2539
|
-
const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
|
|
2540
|
-
if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
|
|
2541
|
-
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
2542
|
-
const height = textLines.length + paddingOffset;
|
|
2543
|
-
const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
|
|
2544
|
-
const widthOffset = width + paddingOffset;
|
|
2545
|
-
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
2546
|
-
if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
|
|
2547
|
-
if (opts.title) {
|
|
2548
|
-
const title = _color ? _color(opts.title) : opts.title;
|
|
2549
|
-
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
|
|
2550
|
-
const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
|
|
2551
|
-
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
|
|
2552
|
-
} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
2553
|
-
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
2554
|
-
for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
|
|
2555
|
-
else {
|
|
2556
|
-
const line = textLines[i - valignOffset];
|
|
2557
|
-
const left = " ".repeat(paddingOffset);
|
|
2558
|
-
const right = " ".repeat(width - stripAnsi$1(line).length);
|
|
2559
|
-
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
2560
|
-
}
|
|
2561
|
-
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
2562
|
-
if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
|
|
2563
|
-
return boxLines.join("\n");
|
|
2564
|
-
}
|
|
2565
|
-
//#endregion
|
|
2566
|
-
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
2567
|
-
const r = Object.create(null);
|
|
2568
|
-
const i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis);
|
|
2569
|
-
const o = new Proxy(r, {
|
|
2570
|
-
get(e, s) {
|
|
2571
|
-
return i()[s] ?? r[s];
|
|
2572
|
-
},
|
|
2573
|
-
has(e, s) {
|
|
2574
|
-
return s in i() || s in r;
|
|
2575
|
-
},
|
|
2576
|
-
set(e, s, E) {
|
|
2577
|
-
const B = i(true);
|
|
2578
|
-
return B[s] = E, true;
|
|
2579
|
-
},
|
|
2580
|
-
deleteProperty(e, s) {
|
|
2581
|
-
if (!s) return false;
|
|
2582
|
-
const E = i(true);
|
|
2583
|
-
return delete E[s], true;
|
|
2584
|
-
},
|
|
2585
|
-
ownKeys() {
|
|
2586
|
-
const e = i(true);
|
|
2587
|
-
return Object.keys(e);
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
const t = typeof process < "u" && process.env && process.env.NODE_ENV || "";
|
|
2591
|
-
const f = [
|
|
2592
|
-
["APPVEYOR"],
|
|
2593
|
-
[
|
|
2594
|
-
"AWS_AMPLIFY",
|
|
2595
|
-
"AWS_APP_ID",
|
|
2596
|
-
{ ci: true }
|
|
2597
|
-
],
|
|
2598
|
-
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
2599
|
-
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
2600
|
-
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
2601
|
-
["BAMBOO", "bamboo_planKey"],
|
|
2602
|
-
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
2603
|
-
["BITRISE", "BITRISE_IO"],
|
|
2604
|
-
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
2605
|
-
["BUILDKITE"],
|
|
2606
|
-
["CIRCLE", "CIRCLECI"],
|
|
2607
|
-
["CIRRUS", "CIRRUS_CI"],
|
|
2608
|
-
[
|
|
2609
|
-
"CLOUDFLARE_PAGES",
|
|
2610
|
-
"CF_PAGES",
|
|
2611
|
-
{ ci: true }
|
|
2612
|
-
],
|
|
2613
|
-
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
2614
|
-
["CODEFRESH", "CF_BUILD_ID"],
|
|
2615
|
-
["DRONE"],
|
|
2616
|
-
["DRONE", "DRONE_BUILD_EVENT"],
|
|
2617
|
-
["DSARI"],
|
|
2618
|
-
["GITHUB_ACTIONS"],
|
|
2619
|
-
["GITLAB", "GITLAB_CI"],
|
|
2620
|
-
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
2621
|
-
["GOCD", "GO_PIPELINE_LABEL"],
|
|
2622
|
-
["LAYERCI"],
|
|
2623
|
-
["HUDSON", "HUDSON_URL"],
|
|
2624
|
-
["JENKINS", "JENKINS_URL"],
|
|
2625
|
-
["MAGNUM"],
|
|
2626
|
-
["NETLIFY"],
|
|
2627
|
-
[
|
|
2628
|
-
"NETLIFY",
|
|
2629
|
-
"NETLIFY_LOCAL",
|
|
2630
|
-
{ ci: false }
|
|
2631
|
-
],
|
|
2632
|
-
["NEVERCODE"],
|
|
2633
|
-
["RENDER"],
|
|
2634
|
-
["SAIL", "SAILCI"],
|
|
2635
|
-
["SEMAPHORE"],
|
|
2636
|
-
["SCREWDRIVER"],
|
|
2637
|
-
["SHIPPABLE"],
|
|
2638
|
-
["SOLANO", "TDDIUM"],
|
|
2639
|
-
["STRIDER"],
|
|
2640
|
-
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
2641
|
-
["TRAVIS"],
|
|
2642
|
-
["VERCEL", "NOW_BUILDER"],
|
|
2643
|
-
[
|
|
2644
|
-
"VERCEL",
|
|
2645
|
-
"VERCEL",
|
|
2646
|
-
{ ci: false }
|
|
2647
|
-
],
|
|
2648
|
-
[
|
|
2649
|
-
"VERCEL",
|
|
2650
|
-
"VERCEL_ENV",
|
|
2651
|
-
{ ci: false }
|
|
2652
|
-
],
|
|
2653
|
-
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
2654
|
-
[
|
|
2655
|
-
"CODESANDBOX",
|
|
2656
|
-
"CODESANDBOX_SSE",
|
|
2657
|
-
{ ci: false }
|
|
2658
|
-
],
|
|
2659
|
-
[
|
|
2660
|
-
"CODESANDBOX",
|
|
2661
|
-
"CODESANDBOX_HOST",
|
|
2662
|
-
{ ci: false }
|
|
2663
|
-
],
|
|
2664
|
-
["STACKBLITZ"],
|
|
2665
|
-
["STORMKIT"],
|
|
2666
|
-
["CLEAVR"],
|
|
2667
|
-
["ZEABUR"],
|
|
2668
|
-
[
|
|
2669
|
-
"CODESPHERE",
|
|
2670
|
-
"CODESPHERE_APP_ID",
|
|
2671
|
-
{ ci: true }
|
|
2672
|
-
],
|
|
2673
|
-
["RAILWAY", "RAILWAY_PROJECT_ID"],
|
|
2674
|
-
["RAILWAY", "RAILWAY_SERVICE_ID"],
|
|
2675
|
-
["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
|
|
2676
|
-
[
|
|
2677
|
-
"FIREBASE_APP_HOSTING",
|
|
2678
|
-
"FIREBASE_APP_HOSTING",
|
|
2679
|
-
{ ci: true }
|
|
2680
|
-
]
|
|
2681
|
-
];
|
|
2682
|
-
function b() {
|
|
2683
|
-
if (globalThis.process?.env) for (const e of f) {
|
|
2684
|
-
const s = e[1] || e[0];
|
|
2685
|
-
if (globalThis.process?.env[s]) return {
|
|
2686
|
-
name: e[0].toLowerCase(),
|
|
2687
|
-
...e[2]
|
|
2688
|
-
};
|
|
2689
|
-
}
|
|
2690
|
-
return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? {
|
|
2691
|
-
name: "stackblitz",
|
|
2692
|
-
ci: false
|
|
2693
|
-
} : {
|
|
2694
|
-
name: "",
|
|
2695
|
-
ci: false
|
|
2696
|
-
};
|
|
2697
|
-
}
|
|
2698
|
-
const l = b();
|
|
2699
|
-
l.name;
|
|
2700
|
-
function n(e) {
|
|
2701
|
-
return e ? e !== "false" : false;
|
|
2702
|
-
}
|
|
2703
|
-
const I = globalThis.process?.platform || "";
|
|
2704
|
-
const T = n(o.CI) || l.ci !== false;
|
|
2705
|
-
const a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
|
|
2706
|
-
const g = n(o.DEBUG);
|
|
2707
|
-
const R = t === "test" || n(o.TEST);
|
|
2708
|
-
o.MINIMAL;
|
|
2709
|
-
const A = /^win/i.test(I);
|
|
2710
|
-
!n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);
|
|
2711
|
-
const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
|
|
2712
|
-
Number(C?.split(".")[0]);
|
|
2713
|
-
const y = globalThis.process || Object.create(null);
|
|
2714
|
-
const _ = { versions: {} };
|
|
2715
|
-
new Proxy(y, { get(e, s) {
|
|
2716
|
-
if (s === "env") return o;
|
|
2717
|
-
if (s in e) return e[s];
|
|
2718
|
-
if (s in _) return _[s];
|
|
2719
|
-
} });
|
|
2720
|
-
const c = globalThis.process?.release?.name === "node";
|
|
2721
|
-
const O = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
|
|
2722
|
-
const D = !!globalThis.Deno;
|
|
2723
|
-
const L = !!globalThis.fastly;
|
|
2724
|
-
const S = !!globalThis.Netlify;
|
|
2725
|
-
const u = !!globalThis.EdgeRuntime;
|
|
2726
|
-
const N = globalThis.navigator?.userAgent === "Cloudflare-Workers";
|
|
2727
|
-
const F = [
|
|
2728
|
-
[S, "netlify"],
|
|
2729
|
-
[u, "edge-light"],
|
|
2730
|
-
[N, "workerd"],
|
|
2731
|
-
[L, "fastly"],
|
|
2732
|
-
[D, "deno"],
|
|
2733
|
-
[O, "bun"],
|
|
2734
|
-
[c, "node"]
|
|
2735
|
-
];
|
|
2736
|
-
function G() {
|
|
2737
|
-
const e = F.find((s) => s[0]);
|
|
2738
|
-
if (e) return { name: e[1] };
|
|
2739
|
-
}
|
|
2740
|
-
G()?.name;
|
|
2741
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
2742
|
-
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
2743
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
2744
|
-
}
|
|
2745
|
-
const regex = ansiRegex();
|
|
2746
|
-
function stripAnsi(string) {
|
|
2747
|
-
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
2748
|
-
return string.replace(regex, "");
|
|
2749
|
-
}
|
|
2750
|
-
function isAmbiguous(x) {
|
|
2751
|
-
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
2752
|
-
}
|
|
2753
|
-
function isFullWidth(x) {
|
|
2754
|
-
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
2755
|
-
}
|
|
2756
|
-
function isWide(x) {
|
|
2757
|
-
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
2758
|
-
}
|
|
2759
|
-
function validate(codePoint) {
|
|
2760
|
-
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
2761
|
-
}
|
|
2762
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
2763
|
-
validate(codePoint);
|
|
2764
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
2765
|
-
return 1;
|
|
2766
|
-
}
|
|
2767
|
-
const emojiRegex = () => {
|
|
2768
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
2769
|
-
};
|
|
2770
|
-
const segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split("") };
|
|
2771
|
-
const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
2772
|
-
function stringWidth$1(string, options = {}) {
|
|
2773
|
-
if (typeof string !== "string" || string.length === 0) return 0;
|
|
2774
|
-
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
2775
|
-
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
2776
|
-
if (string.length === 0) return 0;
|
|
2777
|
-
let width = 0;
|
|
2778
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
2779
|
-
for (const { segment: character } of segmenter.segment(string)) {
|
|
2780
|
-
const codePoint = character.codePointAt(0);
|
|
2781
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
|
|
2782
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
|
|
2783
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
|
|
2784
|
-
if (codePoint >= 55296 && codePoint <= 57343) continue;
|
|
2785
|
-
if (codePoint >= 65024 && codePoint <= 65039) continue;
|
|
2786
|
-
if (defaultIgnorableCodePointRegex.test(character)) continue;
|
|
2787
|
-
if (emojiRegex().test(character)) {
|
|
2788
|
-
width += 2;
|
|
2789
|
-
continue;
|
|
2790
|
-
}
|
|
2791
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
2792
|
-
}
|
|
2793
|
-
return width;
|
|
2794
|
-
}
|
|
2795
|
-
function isUnicodeSupported() {
|
|
2796
|
-
const { env } = g$1;
|
|
2797
|
-
const { TERM, TERM_PROGRAM } = env;
|
|
2798
|
-
if (g$1.platform !== "win32") return TERM !== "linux";
|
|
2799
|
-
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2800
|
-
}
|
|
2801
|
-
const TYPE_COLOR_MAP = {
|
|
2802
|
-
info: "cyan",
|
|
2803
|
-
fail: "red",
|
|
2804
|
-
success: "green",
|
|
2805
|
-
ready: "green",
|
|
2806
|
-
start: "magenta"
|
|
2807
|
-
};
|
|
2808
|
-
const LEVEL_COLOR_MAP = {
|
|
2809
|
-
0: "red",
|
|
2810
|
-
1: "yellow"
|
|
2811
|
-
};
|
|
2812
|
-
const unicode = isUnicodeSupported();
|
|
2813
|
-
const s = (c, fallback) => unicode ? c : fallback;
|
|
2814
|
-
const TYPE_ICONS = {
|
|
2815
|
-
error: s("✖", "×"),
|
|
2816
|
-
fatal: s("✖", "×"),
|
|
2817
|
-
ready: s("✔", "√"),
|
|
2818
|
-
warn: s("⚠", "‼"),
|
|
2819
|
-
info: s("ℹ", "i"),
|
|
2820
|
-
success: s("✔", "√"),
|
|
2821
|
-
debug: s("⚙", "D"),
|
|
2822
|
-
trace: s("→", "→"),
|
|
2823
|
-
fail: s("✖", "×"),
|
|
2824
|
-
start: s("◐", "o"),
|
|
2825
|
-
log: ""
|
|
2826
|
-
};
|
|
2827
|
-
function stringWidth(str) {
|
|
2828
|
-
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi$1(str).length;
|
|
2829
|
-
return stringWidth$1(str);
|
|
2830
|
-
}
|
|
2831
|
-
var FancyReporter = class extends BasicReporter {
|
|
2832
|
-
formatStack(stack, message, opts) {
|
|
2833
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2834
|
-
return `
|
|
2835
|
-
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join(`
|
|
2836
|
-
${indent}`);
|
|
2837
|
-
}
|
|
2838
|
-
formatType(logObj, isBadge, opts) {
|
|
2839
|
-
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
2840
|
-
if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
2841
|
-
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
2842
|
-
return _type ? getColor(typeColor)(_type) : "";
|
|
2843
|
-
}
|
|
2844
|
-
formatLogObj(logObj, opts) {
|
|
2845
|
-
const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
|
|
2846
|
-
if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
|
|
2847
|
-
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
2848
|
-
style: logObj.style
|
|
2849
|
-
});
|
|
2850
|
-
const date = this.formatDate(logObj.date, opts);
|
|
2851
|
-
const coloredDate = date && colors.gray(date);
|
|
2852
|
-
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
2853
|
-
const type = this.formatType(logObj, isBadge, opts);
|
|
2854
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
2855
|
-
let line;
|
|
2856
|
-
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
2857
|
-
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
2858
|
-
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
2859
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
2860
|
-
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
2861
|
-
if (logObj.type === "trace") {
|
|
2862
|
-
const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
|
|
2863
|
-
line += this.formatStack(_err.stack || "", _err.message);
|
|
2864
|
-
}
|
|
2865
|
-
return isBadge ? "\n" + line + "\n" : line;
|
|
2866
|
-
}
|
|
2867
|
-
};
|
|
2868
|
-
function characterFormat(str) {
|
|
2869
|
-
return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
|
|
2870
|
-
}
|
|
2871
|
-
function getColor(color = "white") {
|
|
2872
|
-
return colors[color] || colors.white;
|
|
2873
|
-
}
|
|
2874
|
-
function getBgColor(color = "bgWhite") {
|
|
2875
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
2876
|
-
}
|
|
2877
|
-
function createConsola(options = {}) {
|
|
2878
|
-
let level = _getDefaultLogLevel();
|
|
2879
|
-
if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
2880
|
-
return createConsola$1({
|
|
2881
|
-
level,
|
|
2882
|
-
defaults: { level },
|
|
2883
|
-
stdout: process.stdout,
|
|
2884
|
-
stderr: process.stderr,
|
|
2885
|
-
prompt: (...args) => import("./prompt-CH6TK0bC.mjs").then((m) => m.prompt(...args)),
|
|
2886
|
-
reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
2887
|
-
...options
|
|
2888
|
-
});
|
|
2889
|
-
}
|
|
2890
|
-
function _getDefaultLogLevel() {
|
|
2891
|
-
if (g) return LogLevels.debug;
|
|
2892
|
-
if (R) return LogLevels.warn;
|
|
2893
|
-
return LogLevels.info;
|
|
2894
|
-
}
|
|
2895
|
-
createConsola();
|
|
2896
|
-
//#endregion
|
|
2897
|
-
//#region src/cli/logger.ts
|
|
2898
|
-
/**
|
|
2899
|
-
* Console logger
|
|
2900
|
-
*/
|
|
2901
|
-
const logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });
|
|
2902
|
-
function createTestingLogger() {
|
|
2903
|
-
const types = [
|
|
2904
|
-
"silent",
|
|
2905
|
-
"fatal",
|
|
2906
|
-
"error",
|
|
2907
|
-
"warn",
|
|
2908
|
-
"log",
|
|
2909
|
-
"info",
|
|
2910
|
-
"success",
|
|
2911
|
-
"fail",
|
|
2912
|
-
"ready",
|
|
2913
|
-
"start",
|
|
2914
|
-
"box",
|
|
2915
|
-
"debug",
|
|
2916
|
-
"trace",
|
|
2917
|
-
"verbose"
|
|
2918
|
-
];
|
|
2919
|
-
const ret = Object.create(null);
|
|
2920
|
-
for (const type of types) ret[type] = (...args) => console.log(...args);
|
|
2921
|
-
return ret;
|
|
2922
|
-
}
|
|
2923
|
-
//#endregion
|
|
2924
|
-
//#region src/utils/bindingify-output-options.ts
|
|
2925
|
-
function bindingifyOutputOptions(outputOptions, pluginContextData, timings) {
|
|
2926
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapFileNames, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
2927
|
-
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
2928
|
-
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks, pluginContextData, timings);
|
|
2929
|
-
return {
|
|
2930
|
-
dir,
|
|
2931
|
-
file: file == null ? void 0 : file,
|
|
2932
|
-
format: bindingifyFormat(format),
|
|
2933
|
-
exports,
|
|
2934
|
-
hashCharacters,
|
|
2935
|
-
sourcemap: bindingifySourcemap(sourcemap),
|
|
2936
|
-
sourcemapBaseUrl,
|
|
2937
|
-
sourcemapDebugIds,
|
|
2938
|
-
sourcemapFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "sourcemapFileNames", sourcemapFileNames),
|
|
2939
|
-
sourcemapExcludeSources,
|
|
2940
|
-
sourcemapIgnoreList: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "sourcemapIgnoreList", sourcemapIgnoreList ?? /node_modules/),
|
|
2941
|
-
sourcemapPathTransform: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "sourcemapPathTransform", sourcemapPathTransform),
|
|
2942
|
-
banner: bindingifyAddon(banner, "banner", timings),
|
|
2943
|
-
footer: bindingifyAddon(footer, "footer", timings),
|
|
2944
|
-
postBanner: bindingifyAddon(postBanner, "postBanner", timings),
|
|
2945
|
-
postFooter: bindingifyAddon(postFooter, "postFooter", timings),
|
|
2946
|
-
intro: bindingifyAddon(intro, "intro", timings),
|
|
2947
|
-
outro: bindingifyAddon(outro, "outro", timings),
|
|
2948
|
-
extend: outputOptions.extend,
|
|
2949
|
-
globals: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "globals", globals),
|
|
2950
|
-
paths: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "paths", paths),
|
|
2951
|
-
generatedCode,
|
|
2952
|
-
esModule,
|
|
2953
|
-
name,
|
|
2954
|
-
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
2955
|
-
entryFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "entryFileNames", entryFileNames),
|
|
2956
|
-
chunkFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "chunkFileNames", chunkFileNames),
|
|
2957
|
-
plugins: [],
|
|
2958
|
-
minify: outputOptions.minify,
|
|
2959
|
-
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
2960
|
-
inlineDynamicImports,
|
|
2961
|
-
dynamicImportInCjs: outputOptions.dynamicImportInCjs,
|
|
2962
|
-
manualCodeSplitting: advancedChunks,
|
|
2963
|
-
polyfillRequire: outputOptions.polyfillRequire,
|
|
2964
|
-
sanitizeFileName,
|
|
2965
|
-
preserveModules,
|
|
2966
|
-
virtualDirname,
|
|
2967
|
-
legalComments,
|
|
2968
|
-
comments: bindingifyComments(comments),
|
|
2969
|
-
preserveModulesRoot,
|
|
2970
|
-
topLevelVar,
|
|
2971
|
-
minifyInternalExports: outputOptions.minifyInternalExports,
|
|
2972
|
-
cleanDir,
|
|
2973
|
-
strictExecutionOrder,
|
|
2974
|
-
strict: outputOptions.strict
|
|
2975
|
-
};
|
|
2976
|
-
}
|
|
2977
|
-
function bindingifyAddon(configAddon, name, timings) {
|
|
2978
|
-
if (configAddon == null || configAddon === "") return;
|
|
2979
|
-
if (typeof configAddon === "function") {
|
|
2980
|
-
const measured = measureHookCost(timings, OUTPUT_OPTIONS_OWNER, name, configAddon);
|
|
2981
|
-
return async (chunk) => measured(transformRenderedChunk(chunk));
|
|
2982
|
-
}
|
|
2983
|
-
return configAddon;
|
|
2984
|
-
}
|
|
2985
|
-
function bindingifyFormat(format) {
|
|
2986
|
-
switch (format) {
|
|
2987
|
-
case void 0:
|
|
2988
|
-
case "es":
|
|
2989
|
-
case "esm":
|
|
2990
|
-
case "module": return "es";
|
|
2991
|
-
case "cjs":
|
|
2992
|
-
case "commonjs": return "cjs";
|
|
2993
|
-
case "iife": return "iife";
|
|
2994
|
-
case "umd": return "umd";
|
|
2995
|
-
default: unimplemented(`output.format: ${format}`);
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
function bindingifySourcemap(sourcemap) {
|
|
2999
|
-
switch (sourcemap) {
|
|
3000
|
-
case true: return "file";
|
|
3001
|
-
case "inline": return "inline";
|
|
3002
|
-
case false:
|
|
3003
|
-
case void 0: return;
|
|
3004
|
-
case "hidden": return "hidden";
|
|
3005
|
-
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
3006
|
-
}
|
|
3007
|
-
}
|
|
3008
|
-
function bindingifyAssetFilenames(assetFileNames) {
|
|
3009
|
-
if (typeof assetFileNames === "function") return (asset) => {
|
|
3010
|
-
return assetFileNames({
|
|
3011
|
-
name: asset.name,
|
|
3012
|
-
names: asset.names,
|
|
3013
|
-
originalFileName: asset.originalFileName,
|
|
3014
|
-
originalFileNames: asset.originalFileNames,
|
|
3015
|
-
source: transformAssetSource(asset.source),
|
|
3016
|
-
type: "asset"
|
|
3017
|
-
});
|
|
3018
|
-
};
|
|
3019
|
-
return assetFileNames;
|
|
3020
|
-
}
|
|
3021
|
-
function bindingifyComments(comments) {
|
|
3022
|
-
if (comments == null) return;
|
|
3023
|
-
if (typeof comments === "boolean") return comments;
|
|
3024
|
-
return comments;
|
|
3025
|
-
}
|
|
3026
|
-
function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks, pluginContextData, timings) {
|
|
3027
|
-
let inlineDynamicImports;
|
|
3028
|
-
let effectiveChunksOption;
|
|
3029
|
-
if (codeSplitting === false) {
|
|
3030
|
-
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.");
|
|
3031
|
-
if (manualChunks != null) throw new Error("Invalid configuration: \"output.manualChunks\" cannot be used when \"output.codeSplitting\" is set to false.");
|
|
3032
|
-
if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`.");
|
|
3033
|
-
return {
|
|
3034
|
-
inlineDynamicImports: true,
|
|
3035
|
-
advancedChunks: void 0
|
|
3036
|
-
};
|
|
3037
|
-
} else if (codeSplitting === true) {
|
|
3038
|
-
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.");
|
|
3039
|
-
} else if (codeSplitting == null) {
|
|
3040
|
-
if (inlineDynamicImportsOption != null) {
|
|
3041
|
-
logger.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.");
|
|
3042
|
-
inlineDynamicImports = inlineDynamicImportsOption;
|
|
3043
|
-
}
|
|
3044
|
-
} else {
|
|
3045
|
-
effectiveChunksOption = codeSplitting;
|
|
3046
|
-
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.");
|
|
3047
|
-
}
|
|
3048
|
-
if (inlineDynamicImports === true && manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
|
|
3049
|
-
if (effectiveChunksOption == null) {
|
|
3050
|
-
if (advancedChunks != null) {
|
|
3051
|
-
logger.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead.");
|
|
3052
|
-
effectiveChunksOption = advancedChunks;
|
|
3053
|
-
}
|
|
3054
|
-
} else if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
3055
|
-
if (manualChunks != null && effectiveChunksOption != null) logger.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
3056
|
-
else if (manualChunks != null) effectiveChunksOption = { groups: [{ name(moduleId, ctx) {
|
|
3057
|
-
return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
|
|
3058
|
-
} }] };
|
|
3059
|
-
if (inlineDynamicImports === true && effectiveChunksOption != null) {
|
|
3060
|
-
logger.warn("`advancedChunks` option is ignored because `inlineDynamicImports: true` disables code splitting.");
|
|
3061
|
-
effectiveChunksOption = void 0;
|
|
3062
|
-
}
|
|
3063
|
-
let advancedChunksResult;
|
|
3064
|
-
if (effectiveChunksOption != null) {
|
|
3065
|
-
const { groups, ...restOptions } = effectiveChunksOption;
|
|
3066
|
-
advancedChunksResult = {
|
|
3067
|
-
...restOptions,
|
|
3068
|
-
groups: groups?.map((group) => {
|
|
3069
|
-
const { name, test, ...restGroup } = group;
|
|
3070
|
-
return {
|
|
3071
|
-
...restGroup,
|
|
3072
|
-
test: typeof test === "function" ? batchTest(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].test", test)) : test,
|
|
3073
|
-
name: typeof name === "function" ? batchName(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].name", name), pluginContextData) : name
|
|
3074
|
-
};
|
|
3075
|
-
})
|
|
3076
|
-
};
|
|
3077
|
-
}
|
|
3078
|
-
return {
|
|
3079
|
-
inlineDynamicImports,
|
|
3080
|
-
advancedChunks: advancedChunksResult
|
|
3081
|
-
};
|
|
3082
|
-
}
|
|
3083
|
-
/**
|
|
3084
|
-
* Wraps a per-id `test` in the batched shim that the binding expects.
|
|
3085
|
-
*
|
|
3086
|
-
* The loop runs in JS so that a group makes one napi crossing, not one per module.
|
|
3087
|
-
*
|
|
3088
|
-
* The result is a `Uint8Array`, which crosses as a buffer instead of one tagged value per id.
|
|
3089
|
-
*/
|
|
3090
|
-
function batchTest(test) {
|
|
3091
|
-
return (ids) => {
|
|
3092
|
-
const results = new Uint8Array(ids.length);
|
|
3093
|
-
for (let index = 0; index < ids.length; index++) {
|
|
3094
|
-
const result = test(ids[index]);
|
|
3095
|
-
if (result != null && typeof result !== "boolean") throw new TypeError(`\`output.codeSplitting.groups[].test\` returned ${typeof result} for module "${ids[index]}", but expected a boolean, null or undefined.`);
|
|
3096
|
-
results[index] = result === true ? 1 : 0;
|
|
3097
|
-
}
|
|
3098
|
-
return results;
|
|
3099
|
-
};
|
|
3100
|
-
}
|
|
3101
|
-
/**
|
|
3102
|
-
* This is the `name` equivalent of {@linkcode batchTest}. The context wrapper holds no per-call
|
|
3103
|
-
* state, so one instance serves the whole batch.
|
|
3104
|
-
*/
|
|
3105
|
-
function batchName(name, pluginContextData) {
|
|
3106
|
-
return (ids, bindingContext) => {
|
|
3107
|
-
const context = new ChunkingContextImpl(bindingContext, pluginContextData);
|
|
3108
|
-
const results = [];
|
|
3109
|
-
for (let index = 0; index < ids.length; index++) {
|
|
3110
|
-
const result = name(ids[index], context);
|
|
3111
|
-
if (result != null && typeof result !== "string") throw new TypeError(`\`output.codeSplitting.groups[].name\` returned ${typeof result} for module "${ids[index]}", but expected a string, null or undefined.`);
|
|
3112
|
-
results.push(result);
|
|
3113
|
-
}
|
|
3114
|
-
return results;
|
|
3115
|
-
};
|
|
3116
|
-
}
|
|
3117
|
-
//#endregion
|
|
3118
|
-
//#region src/utils/initialize-parallel-plugins.ts
|
|
3119
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
3120
|
-
async function initializeParallelPlugins(plugins) {
|
|
3121
|
-
const pluginInfos = [];
|
|
3122
|
-
for (const [index, plugin] of plugins.entries()) {
|
|
3123
|
-
const parallel = getParallelPluginInfo(plugin);
|
|
3124
|
-
if (parallel) {
|
|
3125
|
-
const { fileUrl, options } = parallel;
|
|
3126
|
-
pluginInfos.push({
|
|
3127
|
-
index,
|
|
3128
|
-
fileUrl,
|
|
3129
|
-
options
|
|
3130
|
-
});
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
if (pluginInfos.length <= 0) return;
|
|
3134
|
-
const count = availableParallelism();
|
|
3135
|
-
const parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);
|
|
3136
|
-
const registryId = parallelJsPluginRegistry.id;
|
|
3137
|
-
const workers = await initializeWorkers(registryId, count, pluginInfos);
|
|
3138
|
-
const stopWorkers = async () => {
|
|
3139
|
-
await Promise.all(workers.map((worker) => worker.terminate()));
|
|
3140
|
-
};
|
|
3141
|
-
return {
|
|
3142
|
-
registry: parallelJsPluginRegistry,
|
|
3143
|
-
stopWorkers
|
|
3144
|
-
};
|
|
3145
|
-
}
|
|
3146
|
-
function initializeWorkers(registryId, count, pluginInfos) {
|
|
3147
|
-
return Promise.all(Array.from({ length: count }, (_, i) => initializeWorker(registryId, pluginInfos, i)));
|
|
3148
|
-
}
|
|
3149
|
-
async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
3150
|
-
const urlString = import.meta.resolve("#parallel-plugin-worker");
|
|
3151
|
-
const workerData = {
|
|
3152
|
-
registryId,
|
|
3153
|
-
pluginInfos,
|
|
3154
|
-
threadNumber
|
|
3155
|
-
};
|
|
3156
|
-
let worker;
|
|
3157
|
-
try {
|
|
3158
|
-
worker = new Worker(new URL(urlString), { workerData });
|
|
3159
|
-
worker.unref();
|
|
3160
|
-
await new Promise((resolve, reject) => {
|
|
3161
|
-
worker.once("message", async (message) => {
|
|
3162
|
-
if (message.type === "error") reject(message.error);
|
|
3163
|
-
else resolve();
|
|
3164
|
-
});
|
|
3165
|
-
});
|
|
3166
|
-
return worker;
|
|
3167
|
-
} catch (e) {
|
|
3168
|
-
worker?.terminate();
|
|
3169
|
-
throw e;
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
|
-
const availableParallelism = () => {
|
|
3173
|
-
let availableParallelism = 1;
|
|
3174
|
-
try {
|
|
3175
|
-
availableParallelism = os.availableParallelism();
|
|
3176
|
-
} catch {
|
|
3177
|
-
const cpus = os.cpus();
|
|
3178
|
-
if (Array.isArray(cpus) && cpus.length > 0) availableParallelism = cpus.length;
|
|
3179
|
-
}
|
|
3180
|
-
return Math.min(availableParallelism, 8);
|
|
3181
|
-
};
|
|
3182
|
-
//#endregion
|
|
3183
|
-
//#region src/utils/create-bundler-option.ts
|
|
3184
|
-
async function createBundlerOptions(inputOptions, outputOptions, watchMode, measureTimings = false) {
|
|
3185
|
-
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
3186
|
-
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3187
|
-
const logLevel = inputOptions.logLevel || "info";
|
|
3188
|
-
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
3189
|
-
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
3190
|
-
const hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3191
|
-
const normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);
|
|
3192
|
-
const normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);
|
|
3193
|
-
let plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];
|
|
3194
|
-
const timings = measureTimings && inputOptions.checks?.pluginTimings !== false ? pluginTimingsRecorderFor(inputOptions) : void 0;
|
|
3195
|
-
if (timings) outputOptions = {
|
|
3196
|
-
...outputOptions,
|
|
3197
|
-
assetFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "assetFileNames", outputOptions.assetFileNames),
|
|
3198
|
-
sanitizeFileName: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, "sanitizeFileName", outputOptions.sanitizeFileName)
|
|
3199
|
-
};
|
|
3200
|
-
const parallelPluginInitResult = await initializeParallelPlugins(plugins);
|
|
3201
|
-
if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
|
|
3202
|
-
try {
|
|
3203
|
-
const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins);
|
|
3204
|
-
return {
|
|
3205
|
-
bundlerOptions: {
|
|
3206
|
-
inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings),
|
|
3207
|
-
outputOptions: bindingifyOutputOptions(outputOptions, pluginContextData, timings),
|
|
3208
|
-
parallelPluginsRegistry: parallelPluginInitResult?.registry
|
|
3209
|
-
},
|
|
3210
|
-
inputOptions,
|
|
3211
|
-
onLog,
|
|
3212
|
-
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
3213
|
-
};
|
|
3214
|
-
} catch (e) {
|
|
3215
|
-
await parallelPluginInitResult?.stopWorkers();
|
|
3216
|
-
throw e;
|
|
3217
|
-
}
|
|
3218
|
-
}
|
|
3219
|
-
//#endregion
|
|
3220
|
-
export { getOutputCliKeys as a, styleText$1 as c, getInputCliKeys as i, PluginDriver as l, logger as n, validateCliOptions as o, getCliSchemaInfo as r, validateOption as s, createBundlerOptions as t };
|