@powerlines/core 0.48.28 → 0.48.29
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/dist/api-DTCbbtSH.d.cts +6 -0
- package/dist/api-DTCbbtSH.d.cts.map +1 -0
- package/dist/api-DTCbbtSH.d.mts +6 -0
- package/dist/api-DTCbbtSH.d.mts.map +1 -0
- package/dist/base-context-BmxgDD3S.d.mts +79 -0
- package/dist/base-context-BmxgDD3S.d.mts.map +1 -0
- package/dist/base-context-mHoSEqHf.d.cts +79 -0
- package/dist/base-context-mHoSEqHf.d.cts.map +1 -0
- package/dist/{_virtual/_rolldown/runtime.cjs → chunk-C_NdSu1c.cjs} +6 -23
- package/dist/commands-DzGd8pnR.d.cts +5 -0
- package/dist/commands-DzGd8pnR.d.cts.map +1 -0
- package/dist/commands-DzGd8pnR.d.mts +5 -0
- package/dist/commands-DzGd8pnR.d.mts.map +1 -0
- package/dist/config-BnV_o0Es.d.cts +2461 -0
- package/dist/config-BnV_o0Es.d.cts.map +1 -0
- package/dist/config-DKeDSykZ.d.cts +138 -0
- package/dist/config-DKeDSykZ.d.cts.map +1 -0
- package/dist/config-DbOP5nVu.d.mts +138 -0
- package/dist/config-DbOP5nVu.d.mts.map +1 -0
- package/dist/config-DboKmDhl.d.mts +2461 -0
- package/dist/config-DboKmDhl.d.mts.map +1 -0
- package/dist/constants/api.cjs +0 -8
- package/dist/constants/api.d.cts +2 -6
- package/dist/constants/api.d.mts +2 -8
- package/dist/constants/api.mjs +0 -8
- package/dist/constants/api.mjs.map +1 -1
- package/dist/constants/commands.cjs +0 -8
- package/dist/constants/commands.d.cts +2 -5
- package/dist/constants/commands.d.mts +2 -7
- package/dist/constants/commands.mjs +0 -8
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/devtools.cjs +0 -8
- package/dist/constants/devtools.d.cts +2 -13
- package/dist/constants/devtools.d.mts +2 -15
- package/dist/constants/devtools.mjs +0 -8
- package/dist/constants/devtools.mjs.map +1 -1
- package/dist/constants/environments.cjs +0 -8
- package/dist/constants/environments.d.cts +2 -10
- package/dist/constants/environments.d.mts +2 -12
- package/dist/constants/environments.mjs +0 -8
- package/dist/constants/environments.mjs.map +1 -1
- package/dist/constants/extensions.cjs +0 -8
- package/dist/constants/extensions.d.cts +2 -5
- package/dist/constants/extensions.d.mts +2 -7
- package/dist/constants/extensions.mjs +0 -8
- package/dist/constants/extensions.mjs.map +1 -1
- package/dist/constants/fs.cjs +0 -8
- package/dist/constants/fs.d.cts +2 -7
- package/dist/constants/fs.d.mts +2 -9
- package/dist/constants/fs.mjs +0 -8
- package/dist/constants/fs.mjs.map +1 -1
- package/dist/constants/hooks.cjs +0 -8
- package/dist/constants/hooks.d.cts +2 -5
- package/dist/constants/hooks.d.mts +2 -7
- package/dist/constants/hooks.mjs +0 -8
- package/dist/constants/hooks.mjs.map +1 -1
- package/dist/constants/index.cjs +0 -8
- package/dist/constants/index.d.cts +10 -10
- package/dist/constants/index.d.mts +10 -12
- package/dist/constants/index.mjs +0 -8
- package/dist/constants/log-level.cjs +0 -8
- package/dist/constants/log-level.d.cts +2 -67
- package/dist/constants/log-level.d.mts +2 -69
- package/dist/constants/log-level.mjs +0 -8
- package/dist/constants/log-level.mjs.map +1 -1
- package/dist/constants/meta.cjs +0 -8
- package/dist/constants/meta.d.cts +2 -6
- package/dist/constants/meta.d.mts +2 -8
- package/dist/constants/meta.mjs +0 -8
- package/dist/constants/meta.mjs.map +1 -1
- package/dist/constants/plugin.cjs +0 -8
- package/dist/constants/plugin.d.cts +2 -9
- package/dist/constants/plugin.d.mts +2 -11
- package/dist/constants/plugin.mjs +0 -8
- package/dist/constants/plugin.mjs.map +1 -1
- package/dist/context/base-context.cjs +3 -18
- package/dist/context/base-context.d.cts +2 -81
- package/dist/context/base-context.d.mts +2 -83
- package/dist/context/base-context.mjs +1 -11
- package/dist/context/base-context.mjs.map +1 -1
- package/dist/context/context.cjs +3 -18
- package/dist/context/context.d.cts +2 -373
- package/dist/context/context.d.mts +2 -375
- package/dist/context/context.mjs +1 -11
- package/dist/context/context.mjs.map +1 -1
- package/dist/context/environment-context.cjs +1 -17
- package/dist/context/environment-context.d.cts +2 -5
- package/dist/context/environment-context.d.cts.map +1 -1
- package/dist/context/environment-context.d.mts +2 -7
- package/dist/context/environment-context.d.mts.map +1 -1
- package/dist/context/environment-context.mjs +1 -11
- package/dist/context/environment-context.mjs.map +1 -1
- package/dist/context/execution-context.cjs +3 -18
- package/dist/context/execution-context.d.cts +2 -6
- package/dist/context/execution-context.d.cts.map +1 -1
- package/dist/context/execution-context.d.mts +2 -8
- package/dist/context/execution-context.d.mts.map +1 -1
- package/dist/context/execution-context.mjs +1 -11
- package/dist/context/execution-context.mjs.map +1 -1
- package/dist/context/index.cjs +0 -8
- package/dist/context/index.d.cts +2 -2
- package/dist/context/index.d.mts +2 -4
- package/dist/context/index.mjs +0 -8
- package/dist/context/plugin-context.cjs +1 -17
- package/dist/context/plugin-context.d.cts +1 -3
- package/dist/context/plugin-context.d.cts.map +1 -1
- package/dist/context/plugin-context.d.mts +1 -5
- package/dist/context/plugin-context.d.mts.map +1 -1
- package/dist/context/plugin-context.mjs +1 -11
- package/dist/context/plugin-context.mjs.map +1 -1
- package/dist/context-C6oL3mPw.d.mts +368 -0
- package/dist/context-C6oL3mPw.d.mts.map +1 -0
- package/dist/context-DcY6YqBQ.d.cts +368 -0
- package/dist/context-DcY6YqBQ.d.cts.map +1 -0
- package/dist/context-helpers-BKxpDArS.d.mts +15 -0
- package/dist/context-helpers-BKxpDArS.d.mts.map +1 -0
- package/dist/context-helpers-zXovPE7i.d.cts +15 -0
- package/dist/context-helpers-zXovPE7i.d.cts.map +1 -0
- package/dist/devtools-h0du-bSj.d.cts +13 -0
- package/dist/devtools-h0du-bSj.d.cts.map +1 -0
- package/dist/devtools-h0du-bSj.d.mts +13 -0
- package/dist/devtools-h0du-bSj.d.mts.map +1 -0
- package/dist/entry-BC_V2K2U.d.cts +46 -0
- package/dist/entry-BC_V2K2U.d.cts.map +1 -0
- package/dist/entry-CHIaWcmk.d.mts +46 -0
- package/dist/entry-CHIaWcmk.d.mts.map +1 -0
- package/dist/environments-BYv_kHRG.d.cts +10 -0
- package/dist/environments-BYv_kHRG.d.cts.map +1 -0
- package/dist/environments-BYv_kHRG.d.mts +10 -0
- package/dist/environments-BYv_kHRG.d.mts.map +1 -0
- package/dist/events-NA1XM2Vz.d.cts +10 -0
- package/dist/events-NA1XM2Vz.d.cts.map +1 -0
- package/dist/events-NA1XM2Vz.d.mts +10 -0
- package/dist/events-NA1XM2Vz.d.mts.map +1 -0
- package/dist/extensions-ctxXzgay.d.cts +5 -0
- package/dist/extensions-ctxXzgay.d.cts.map +1 -0
- package/dist/extensions-ctxXzgay.d.mts +5 -0
- package/dist/extensions-ctxXzgay.d.mts.map +1 -0
- package/dist/file-header-Co9oo7aI.d.cts +41 -0
- package/dist/file-header-Co9oo7aI.d.cts.map +1 -0
- package/dist/file-header-rHqeXgRV.d.mts +41 -0
- package/dist/file-header-rHqeXgRV.d.mts.map +1 -0
- package/dist/format-Cf-cgZ-s.d.cts +24 -0
- package/dist/format-Cf-cgZ-s.d.cts.map +1 -0
- package/dist/format-IQPqgWIe.d.mts +24 -0
- package/dist/format-IQPqgWIe.d.mts.map +1 -0
- package/dist/fs-BzXT5ZPj.d.cts +7 -0
- package/dist/fs-BzXT5ZPj.d.cts.map +1 -0
- package/dist/fs-BzXT5ZPj.d.mts +7 -0
- package/dist/fs-BzXT5ZPj.d.mts.map +1 -0
- package/dist/{schemas/fs.cjs → fs-C2lru696.cjs} +38 -16
- package/dist/{schemas/fs.mjs → fs-DqLn15uU.mjs} +2 -10
- package/dist/fs-DqLn15uU.mjs.map +1 -0
- package/dist/generate-types-CDkVosrS.d.cts +65 -0
- package/dist/generate-types-CDkVosrS.d.cts.map +1 -0
- package/dist/generate-types-Dw6p3cB_.d.mts +65 -0
- package/dist/generate-types-Dw6p3cB_.d.mts.map +1 -0
- package/dist/helpers-CrRRFQl5.d.mts +22 -0
- package/dist/helpers-CrRRFQl5.d.mts.map +1 -0
- package/dist/helpers-DBLIQW3U.d.cts +22 -0
- package/dist/helpers-DBLIQW3U.d.cts.map +1 -0
- package/dist/hooks-Dhc3ahex.d.cts +5 -0
- package/dist/hooks-Dhc3ahex.d.cts.map +1 -0
- package/dist/hooks-Dhc3ahex.d.mts +5 -0
- package/dist/hooks-Dhc3ahex.d.mts.map +1 -0
- package/dist/index-LtpXjuJR.d.mts +25 -0
- package/dist/index-LtpXjuJR.d.mts.map +1 -0
- package/dist/index-xk4vSgtB.d.cts +25 -0
- package/dist/index-xk4vSgtB.d.cts.map +1 -0
- package/dist/index.cjs +1 -9
- package/dist/index.d.cts +24 -32
- package/dist/index.d.mts +24 -34
- package/dist/index.mjs +1 -9
- package/dist/install-dependencies-CCjZfS9Y.d.mts +12 -0
- package/dist/install-dependencies-CCjZfS9Y.d.mts.map +1 -0
- package/dist/install-dependencies-CyeYsrfz.d.cts +12 -0
- package/dist/install-dependencies-CyeYsrfz.d.cts.map +1 -0
- package/dist/lib/config.cjs +2 -28
- package/dist/lib/config.d.cts +2 -140
- package/dist/lib/config.d.mts +2 -142
- package/dist/lib/config.mjs +1 -22
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +0 -19
- package/dist/lib/context-helpers.d.cts +2 -16
- package/dist/lib/context-helpers.d.mts +2 -18
- package/dist/lib/context-helpers.mjs +1 -14
- package/dist/lib/context-helpers.mjs.map +1 -1
- package/dist/lib/entry.cjs +0 -24
- package/dist/lib/entry.d.cts +2 -47
- package/dist/lib/entry.d.mts +2 -49
- package/dist/lib/entry.mjs +1 -19
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +2 -22
- package/dist/lib/environment.d.cts +1 -2
- package/dist/lib/environment.d.cts.map +1 -1
- package/dist/lib/environment.d.mts +1 -4
- package/dist/lib/environment.d.mts.map +1 -1
- package/dist/lib/environment.mjs +1 -16
- package/dist/lib/environment.mjs.map +1 -1
- package/dist/lib/events.cjs +1 -17
- package/dist/lib/events.d.cts +2 -10
- package/dist/lib/events.d.mts +2 -12
- package/dist/lib/events.mjs +1 -12
- package/dist/lib/events.mjs.map +1 -1
- package/dist/lib/generate-types.cjs +0 -20
- package/dist/lib/generate-types.d.cts +2 -66
- package/dist/lib/generate-types.d.mts +2 -68
- package/dist/lib/generate-types.mjs +1 -15
- package/dist/lib/generate-types.mjs.map +1 -1
- package/dist/lib/hooks.cjs +2 -22
- package/dist/lib/hooks.d.cts +2 -28
- package/dist/lib/hooks.d.mts +2 -30
- package/dist/lib/hooks.mjs +1 -16
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.cjs +1 -9
- package/dist/lib/index.d.cts +23 -23
- package/dist/lib/index.d.mts +23 -25
- package/dist/lib/index.mjs +1 -9
- package/dist/lib/install-dependencies.cjs +1 -17
- package/dist/lib/install-dependencies.d.cts +2 -12
- package/dist/lib/install-dependencies.d.mts +2 -14
- package/dist/lib/install-dependencies.mjs +1 -11
- package/dist/lib/install-dependencies.mjs.map +1 -1
- package/dist/lib/meta.cjs +0 -8
- package/dist/lib/meta.d.cts +2 -33
- package/dist/lib/meta.d.mts +2 -35
- package/dist/lib/meta.mjs +0 -8
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/plugins.cjs +2 -21
- package/dist/lib/plugins.d.cts +2 -39
- package/dist/lib/plugins.d.mts +2 -41
- package/dist/lib/plugins.mjs +1 -15
- package/dist/lib/plugins.mjs.map +1 -1
- package/dist/lib/resolver.cjs +3 -18
- package/dist/lib/resolver.d.cts +2 -20
- package/dist/lib/resolver.d.mts +2 -22
- package/dist/lib/resolver.mjs +1 -11
- package/dist/lib/resolver.mjs.map +1 -1
- package/dist/lib/schemas.cjs +1 -9
- package/dist/lib/schemas.d.cts +1 -1
- package/dist/lib/schemas.d.mts +1 -3
- package/dist/lib/schemas.mjs +1 -9
- package/dist/lib/streaming-channel.cjs +1 -20
- package/dist/lib/streaming-channel.d.cts +2 -126
- package/dist/lib/streaming-channel.d.mts +2 -128
- package/dist/lib/streaming-channel.mjs +1 -14
- package/dist/lib/streaming-channel.mjs.map +1 -1
- package/dist/lib/typescript/index.cjs +0 -8
- package/dist/lib/typescript/index.d.cts +2 -2
- package/dist/lib/typescript/index.d.mts +2 -4
- package/dist/lib/typescript/index.mjs +0 -8
- package/dist/lib/typescript/ts-morph.cjs +3 -21
- package/dist/lib/typescript/ts-morph.d.cts +2 -38
- package/dist/lib/typescript/ts-morph.d.mts +2 -40
- package/dist/lib/typescript/ts-morph.mjs +1 -14
- package/dist/lib/typescript/ts-morph.mjs.map +1 -1
- package/dist/lib/typescript/tsconfig.cjs +5 -31
- package/dist/lib/typescript/tsconfig.d.cts +2 -77
- package/dist/lib/typescript/tsconfig.d.mts +2 -79
- package/dist/lib/typescript/tsconfig.mjs +1 -22
- package/dist/lib/typescript/tsconfig.mjs.map +1 -1
- package/dist/lib/unplugin/helpers.cjs +0 -19
- package/dist/lib/unplugin/helpers.d.cts +2 -23
- package/dist/lib/unplugin/helpers.d.mts +2 -25
- package/dist/lib/unplugin/helpers.mjs +1 -14
- package/dist/lib/unplugin/helpers.mjs.map +1 -1
- package/dist/lib/unplugin/index.cjs +0 -8
- package/dist/lib/unplugin/index.d.cts +3 -3
- package/dist/lib/unplugin/index.d.mts +3 -5
- package/dist/lib/unplugin/index.mjs +0 -8
- package/dist/lib/unplugin/module-resolution.cjs +3 -18
- package/dist/lib/unplugin/module-resolution.d.cts +2 -41
- package/dist/lib/unplugin/module-resolution.d.mts +2 -43
- package/dist/lib/unplugin/module-resolution.mjs +1 -11
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +1 -20
- package/dist/lib/unplugin/plugin.d.cts +2 -40
- package/dist/lib/unplugin/plugin.d.mts +2 -42
- package/dist/lib/unplugin/plugin.mjs +1 -14
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +0 -21
- package/dist/lib/utilities/file-header.d.cts +2 -41
- package/dist/lib/utilities/file-header.d.mts +2 -43
- package/dist/lib/utilities/file-header.mjs +1 -16
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +3 -21
- package/dist/lib/utilities/format.d.cts +2 -24
- package/dist/lib/utilities/format.d.mts +2 -26
- package/dist/lib/utilities/format.mjs +1 -14
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +0 -8
- package/dist/lib/utilities/index.d.cts +5 -5
- package/dist/lib/utilities/index.d.mts +5 -7
- package/dist/lib/utilities/index.mjs +0 -8
- package/dist/lib/utilities/source-file.cjs +3 -22
- package/dist/lib/utilities/source-file.d.cts +2 -30
- package/dist/lib/utilities/source-file.d.mts +2 -32
- package/dist/lib/utilities/source-file.mjs +1 -15
- package/dist/lib/utilities/source-file.mjs.map +1 -1
- package/dist/lib/utilities/source-map.cjs +3 -18
- package/dist/lib/utilities/source-map.d.cts +2 -16
- package/dist/lib/utilities/source-map.d.mts +2 -18
- package/dist/lib/utilities/source-map.mjs +1 -11
- package/dist/lib/utilities/source-map.mjs.map +1 -1
- package/dist/lib/utilities/write-file.cjs +1 -17
- package/dist/lib/utilities/write-file.d.cts +2 -15
- package/dist/lib/utilities/write-file.d.mts +2 -17
- package/dist/lib/utilities/write-file.mjs +1 -11
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +4 -19
- package/dist/lib/vfs.d.cts +2 -321
- package/dist/lib/vfs.d.mts +2 -323
- package/dist/lib/vfs.mjs +2 -12
- package/dist/lib/vfs.mjs.map +1 -1
- package/dist/log-level-BC8g4BBL.d.cts +67 -0
- package/dist/log-level-BC8g4BBL.d.cts.map +1 -0
- package/dist/log-level-BC8g4BBL.d.mts +67 -0
- package/dist/log-level-BC8g4BBL.d.mts.map +1 -0
- package/dist/meta-CdDd2ykC.d.cts +33 -0
- package/dist/meta-CdDd2ykC.d.cts.map +1 -0
- package/dist/meta-CfTCHU_o.d.mts +33 -0
- package/dist/meta-CfTCHU_o.d.mts.map +1 -0
- package/dist/meta-QA_SN1j3.d.cts +6 -0
- package/dist/meta-QA_SN1j3.d.cts.map +1 -0
- package/dist/meta-QA_SN1j3.d.mts +6 -0
- package/dist/meta-QA_SN1j3.d.mts.map +1 -0
- package/dist/module-resolution-CRMNPsdn.d.mts +40 -0
- package/dist/module-resolution-CRMNPsdn.d.mts.map +1 -0
- package/dist/module-resolution-D-w-EZaK.d.cts +40 -0
- package/dist/module-resolution-D-w-EZaK.d.cts.map +1 -0
- package/dist/plugin-B_b7XqaN.d.mts +39 -0
- package/dist/plugin-B_b7XqaN.d.mts.map +1 -0
- package/dist/plugin-CzV-aFwU.d.cts +39 -0
- package/dist/plugin-CzV-aFwU.d.cts.map +1 -0
- package/dist/plugin-base.cjs +1 -20
- package/dist/plugin-base.d.cts +1 -3
- package/dist/plugin-base.d.cts.map +1 -1
- package/dist/plugin-base.d.mts +1 -5
- package/dist/plugin-base.d.mts.map +1 -1
- package/dist/plugin-base.mjs +1 -14
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-fhBG7SSQ.d.cts +9 -0
- package/dist/plugin-fhBG7SSQ.d.cts.map +1 -0
- package/dist/plugin-fhBG7SSQ.d.mts +9 -0
- package/dist/plugin-fhBG7SSQ.d.mts.map +1 -0
- package/dist/plugin-utils/build-helpers.cjs +0 -16
- package/dist/plugin-utils/build-helpers.d.cts +1 -2
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/build-helpers.d.mts +1 -4
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/build-helpers.mjs +1 -11
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/combine-plugins.cjs +1 -20
- package/dist/plugin-utils/combine-plugins.d.cts +1 -1
- package/dist/plugin-utils/combine-plugins.d.mts +1 -3
- package/dist/plugin-utils/combine-plugins.d.mts.map +1 -1
- package/dist/plugin-utils/combine-plugins.mjs +1 -14
- package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +0 -21
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +1 -3
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +1 -16
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.cjs +0 -16
- package/dist/plugin-utils/docs-helper.d.mts +0 -2
- package/dist/plugin-utils/docs-helper.d.mts.map +1 -1
- package/dist/plugin-utils/docs-helper.mjs +1 -11
- package/dist/plugin-utils/docs-helper.mjs.map +1 -1
- package/dist/plugin-utils/enable-plugin.cjs +1 -17
- package/dist/plugin-utils/enable-plugin.d.cts +1 -2
- package/dist/plugin-utils/enable-plugin.d.cts.map +1 -1
- package/dist/plugin-utils/enable-plugin.d.mts +1 -4
- package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
- package/dist/plugin-utils/enable-plugin.mjs +1 -11
- package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
- package/dist/plugin-utils/extend.cjs +1 -17
- package/dist/plugin-utils/extend.d.cts +1 -3
- package/dist/plugin-utils/extend.d.cts.map +1 -1
- package/dist/plugin-utils/extend.d.mts +1 -5
- package/dist/plugin-utils/extend.d.mts.map +1 -1
- package/dist/plugin-utils/extend.mjs +1 -11
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +2 -27
- package/dist/plugin-utils/filter.d.cts +1 -1
- package/dist/plugin-utils/filter.d.mts +1 -3
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +1 -21
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +1 -17
- package/dist/plugin-utils/format-package-json.d.cts +1 -1
- package/dist/plugin-utils/format-package-json.d.mts +1 -3
- package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
- package/dist/plugin-utils/format-package-json.mjs +1 -11
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +1 -17
- package/dist/plugin-utils/format.d.mts +0 -2
- package/dist/plugin-utils/format.d.mts.map +1 -1
- package/dist/plugin-utils/format.mjs +1 -11
- package/dist/plugin-utils/format.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +1 -17
- package/dist/plugin-utils/get-config-path.d.cts +1 -1
- package/dist/plugin-utils/get-config-path.d.mts +1 -3
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
- package/dist/plugin-utils/get-config-path.mjs +1 -11
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.cjs +0 -33
- package/dist/plugin-utils/helpers.d.cts +1 -5
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +1 -7
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +1 -28
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +0 -8
- package/dist/plugin-utils/index.d.mts +0 -2
- package/dist/plugin-utils/index.mjs +0 -8
- package/dist/plugin-utils/install.cjs +1 -20
- package/dist/plugin-utils/install.d.cts +1 -1
- package/dist/plugin-utils/install.d.mts +1 -3
- package/dist/plugin-utils/install.d.mts.map +1 -1
- package/dist/plugin-utils/install.mjs +1 -14
- package/dist/plugin-utils/install.mjs.map +1 -1
- package/dist/plugin-utils/logging.cjs +2 -34
- package/dist/plugin-utils/logging.d.cts +1 -3
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +1 -5
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +1 -28
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +3 -21
- package/dist/plugin-utils/merge.d.cts +1 -3
- package/dist/plugin-utils/merge.d.cts.map +1 -1
- package/dist/plugin-utils/merge.d.mts +1 -5
- package/dist/plugin-utils/merge.d.mts.map +1 -1
- package/dist/plugin-utils/merge.mjs +1 -14
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +1 -17
- package/dist/plugin-utils/modules.d.cts +1 -1
- package/dist/plugin-utils/modules.d.mts +1 -3
- package/dist/plugin-utils/modules.d.mts.map +1 -1
- package/dist/plugin-utils/modules.mjs +1 -12
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +0 -16
- package/dist/plugin-utils/paths.d.cts +1 -1
- package/dist/plugin-utils/paths.d.mts +1 -3
- package/dist/plugin-utils/paths.d.mts.map +1 -1
- package/dist/plugin-utils/paths.mjs +1 -11
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +1 -25
- package/dist/plugin-utils/virtual.d.mts +0 -2
- package/dist/plugin-utils/virtual.d.mts.map +1 -1
- package/dist/plugin-utils/virtual.mjs +1 -20
- package/dist/plugin-utils/virtual.mjs.map +1 -1
- package/dist/plugins-DfL1fBZi.d.cts +37 -0
- package/dist/plugins-DfL1fBZi.d.cts.map +1 -0
- package/dist/plugins-zG2X2LA8.d.mts +37 -0
- package/dist/plugins-zG2X2LA8.d.mts.map +1 -0
- package/dist/resolver-CdBAh8dA.d.mts +19 -0
- package/dist/resolver-CdBAh8dA.d.mts.map +1 -0
- package/dist/resolver-CfCl--Eh.d.cts +19 -0
- package/dist/resolver-CfCl--Eh.d.cts.map +1 -0
- package/dist/{schemas/fs.d.cts → schemas-Zvqwdrw_.d.cts} +2 -2
- package/dist/schemas-Zvqwdrw_.d.cts.map +1 -0
- package/dist/{schemas/fs.d.mts → schemas-Zvqwdrw_.d.mts} +2 -4
- package/dist/schemas-Zvqwdrw_.d.mts.map +1 -0
- package/dist/source-file-CLw13fKE.d.mts +30 -0
- package/dist/source-file-CLw13fKE.d.mts.map +1 -0
- package/dist/source-file-CuuHaBL5.d.cts +30 -0
- package/dist/source-file-CuuHaBL5.d.cts.map +1 -0
- package/dist/source-map-Cy0aqSpe.d.mts +16 -0
- package/dist/source-map-Cy0aqSpe.d.mts.map +1 -0
- package/dist/source-map-HU4IoICc.d.cts +16 -0
- package/dist/source-map-HU4IoICc.d.cts.map +1 -0
- package/dist/storage/base.cjs +1 -17
- package/dist/storage/base.d.cts +1 -2
- package/dist/storage/base.d.cts.map +1 -1
- package/dist/storage/base.d.mts +1 -4
- package/dist/storage/base.d.mts.map +1 -1
- package/dist/storage/base.mjs +1 -11
- package/dist/storage/base.mjs.map +1 -1
- package/dist/storage/file-system.cjs +1 -17
- package/dist/storage/file-system.d.cts +1 -1
- package/dist/storage/file-system.d.mts +1 -3
- package/dist/storage/file-system.d.mts.map +1 -1
- package/dist/storage/file-system.mjs +1 -11
- package/dist/storage/file-system.mjs.map +1 -1
- package/dist/storage/helpers.cjs +0 -20
- package/dist/storage/helpers.d.mts +0 -2
- package/dist/storage/helpers.d.mts.map +1 -1
- package/dist/storage/helpers.mjs +1 -15
- package/dist/storage/helpers.mjs.map +1 -1
- package/dist/storage/index.cjs +0 -8
- package/dist/storage/index.d.mts +0 -2
- package/dist/storage/index.mjs +0 -8
- package/dist/storage/virtual.cjs +1 -17
- package/dist/storage/virtual.d.cts +1 -1
- package/dist/storage/virtual.d.mts +1 -3
- package/dist/storage/virtual.d.mts.map +1 -1
- package/dist/storage/virtual.mjs +1 -11
- package/dist/storage/virtual.mjs.map +1 -1
- package/dist/streaming-channel-CiyFd_6l.d.cts +126 -0
- package/dist/streaming-channel-CiyFd_6l.d.cts.map +1 -0
- package/dist/streaming-channel-CiyFd_6l.d.mts +126 -0
- package/dist/streaming-channel-CiyFd_6l.d.mts.map +1 -0
- package/dist/ts-morph-BGgjbOgM.d.cts +38 -0
- package/dist/ts-morph-BGgjbOgM.d.cts.map +1 -0
- package/dist/ts-morph-zLvdifpA.d.mts +38 -0
- package/dist/ts-morph-zLvdifpA.d.mts.map +1 -0
- package/dist/tsconfig-DExoZEQ0.d.cts +75 -0
- package/dist/tsconfig-DExoZEQ0.d.cts.map +1 -0
- package/dist/tsconfig-De09cBeX.d.mts +75 -0
- package/dist/tsconfig-De09cBeX.d.mts.map +1 -0
- package/dist/vfs-B9Vhnajc.d.cts +320 -0
- package/dist/vfs-B9Vhnajc.d.cts.map +1 -0
- package/dist/vfs-Dl6nPqdS.d.mts +320 -0
- package/dist/vfs-Dl6nPqdS.d.mts.map +1 -0
- package/dist/write-file-BVMnXVPo.d.cts +15 -0
- package/dist/write-file-BVMnXVPo.d.cts.map +1 -0
- package/dist/write-file-CWf9Xxwd.d.mts +15 -0
- package/dist/write-file-CWf9Xxwd.d.mts.map +1 -0
- package/package.json +2 -242
- package/dist/_virtual/_rolldown/runtime.mjs +0 -26
- package/dist/constants/api.d.cts.map +0 -1
- package/dist/constants/api.d.mts.map +0 -1
- package/dist/constants/api.test.cjs +0 -42
- package/dist/constants/api.test.d.mts +0 -2
- package/dist/constants/api.test.mjs +0 -44
- package/dist/constants/api.test.mjs.map +0 -1
- package/dist/constants/commands.d.cts.map +0 -1
- package/dist/constants/commands.d.mts.map +0 -1
- package/dist/constants/commands.test.cjs +0 -29
- package/dist/constants/commands.test.d.mts +0 -2
- package/dist/constants/commands.test.mjs +0 -31
- package/dist/constants/commands.test.mjs.map +0 -1
- package/dist/constants/devtools.d.cts.map +0 -1
- package/dist/constants/devtools.d.mts.map +0 -1
- package/dist/constants/devtools.test.cjs +0 -46
- package/dist/constants/devtools.test.d.mts +0 -2
- package/dist/constants/devtools.test.mjs +0 -48
- package/dist/constants/devtools.test.mjs.map +0 -1
- package/dist/constants/environments.d.cts.map +0 -1
- package/dist/constants/environments.d.mts.map +0 -1
- package/dist/constants/environments.test.cjs +0 -34
- package/dist/constants/environments.test.d.mts +0 -2
- package/dist/constants/environments.test.mjs +0 -36
- package/dist/constants/environments.test.mjs.map +0 -1
- package/dist/constants/extensions.d.cts.map +0 -1
- package/dist/constants/extensions.d.mts.map +0 -1
- package/dist/constants/extensions.test.cjs +0 -35
- package/dist/constants/extensions.test.d.mts +0 -2
- package/dist/constants/extensions.test.mjs +0 -37
- package/dist/constants/extensions.test.mjs.map +0 -1
- package/dist/constants/fs.d.cts.map +0 -1
- package/dist/constants/fs.d.mts.map +0 -1
- package/dist/constants/fs.test.cjs +0 -34
- package/dist/constants/fs.test.d.mts +0 -2
- package/dist/constants/fs.test.mjs +0 -36
- package/dist/constants/fs.test.mjs.map +0 -1
- package/dist/constants/hooks.d.cts.map +0 -1
- package/dist/constants/hooks.d.mts.map +0 -1
- package/dist/constants/hooks.test.cjs +0 -29
- package/dist/constants/hooks.test.d.mts +0 -2
- package/dist/constants/hooks.test.mjs +0 -31
- package/dist/constants/hooks.test.mjs.map +0 -1
- package/dist/constants/log-level.d.cts.map +0 -1
- package/dist/constants/log-level.d.mts.map +0 -1
- package/dist/constants/log-level.test.cjs +0 -76
- package/dist/constants/log-level.test.d.mts +0 -2
- package/dist/constants/log-level.test.mjs +0 -78
- package/dist/constants/log-level.test.mjs.map +0 -1
- package/dist/constants/meta.d.cts.map +0 -1
- package/dist/constants/meta.d.mts.map +0 -1
- package/dist/constants/meta.test.cjs +0 -33
- package/dist/constants/meta.test.d.mts +0 -2
- package/dist/constants/meta.test.mjs +0 -35
- package/dist/constants/meta.test.mjs.map +0 -1
- package/dist/constants/plugin.d.cts.map +0 -1
- package/dist/constants/plugin.d.mts.map +0 -1
- package/dist/constants/plugin.test.cjs +0 -59
- package/dist/constants/plugin.test.d.mts +0 -2
- package/dist/constants/plugin.test.mjs +0 -61
- package/dist/constants/plugin.test.mjs.map +0 -1
- package/dist/context/base-context.d.cts.map +0 -1
- package/dist/context/base-context.d.mts.map +0 -1
- package/dist/context/base-context.test.cjs +0 -23
- package/dist/context/base-context.test.d.cts +0 -1
- package/dist/context/base-context.test.d.mts +0 -2
- package/dist/context/base-context.test.mjs +0 -25
- package/dist/context/base-context.test.mjs.map +0 -1
- package/dist/context/context.d.cts.map +0 -1
- package/dist/context/context.d.mts.map +0 -1
- package/dist/context/context.test.cjs +0 -23
- package/dist/context/context.test.d.cts +0 -1
- package/dist/context/context.test.d.mts +0 -2
- package/dist/context/context.test.mjs +0 -25
- package/dist/context/context.test.mjs.map +0 -1
- package/dist/context/environment-context.test.cjs +0 -23
- package/dist/context/environment-context.test.d.cts +0 -1
- package/dist/context/environment-context.test.d.mts +0 -2
- package/dist/context/environment-context.test.mjs +0 -25
- package/dist/context/environment-context.test.mjs.map +0 -1
- package/dist/context/execution-context.test.cjs +0 -23
- package/dist/context/execution-context.test.d.cts +0 -1
- package/dist/context/execution-context.test.d.mts +0 -2
- package/dist/context/execution-context.test.mjs +0 -25
- package/dist/context/execution-context.test.mjs.map +0 -1
- package/dist/context/plugin-context.test.cjs +0 -23
- package/dist/context/plugin-context.test.d.cts +0 -1
- package/dist/context/plugin-context.test.d.mts +0 -2
- package/dist/context/plugin-context.test.mjs +0 -25
- package/dist/context/plugin-context.test.mjs.map +0 -1
- package/dist/lib/config.d.cts.map +0 -1
- package/dist/lib/config.d.mts.map +0 -1
- package/dist/lib/config.test.cjs +0 -23
- package/dist/lib/config.test.d.cts +0 -1
- package/dist/lib/config.test.d.mts +0 -2
- package/dist/lib/config.test.mjs +0 -25
- package/dist/lib/config.test.mjs.map +0 -1
- package/dist/lib/context-helpers.d.cts.map +0 -1
- package/dist/lib/context-helpers.d.mts.map +0 -1
- package/dist/lib/context-helpers.test.cjs +0 -23
- package/dist/lib/context-helpers.test.d.cts +0 -1
- package/dist/lib/context-helpers.test.d.mts +0 -2
- package/dist/lib/context-helpers.test.mjs +0 -25
- package/dist/lib/context-helpers.test.mjs.map +0 -1
- package/dist/lib/entry.d.cts.map +0 -1
- package/dist/lib/entry.d.mts.map +0 -1
- package/dist/lib/entry.test.cjs +0 -23
- package/dist/lib/entry.test.d.cts +0 -1
- package/dist/lib/entry.test.d.mts +0 -2
- package/dist/lib/entry.test.mjs +0 -25
- package/dist/lib/entry.test.mjs.map +0 -1
- package/dist/lib/environment.test.cjs +0 -23
- package/dist/lib/environment.test.d.cts +0 -1
- package/dist/lib/environment.test.d.mts +0 -2
- package/dist/lib/environment.test.mjs +0 -25
- package/dist/lib/environment.test.mjs.map +0 -1
- package/dist/lib/events.d.cts.map +0 -1
- package/dist/lib/events.d.mts.map +0 -1
- package/dist/lib/events.test.cjs +0 -23
- package/dist/lib/events.test.d.cts +0 -1
- package/dist/lib/events.test.d.mts +0 -2
- package/dist/lib/events.test.mjs +0 -25
- package/dist/lib/events.test.mjs.map +0 -1
- package/dist/lib/generate-types.d.cts.map +0 -1
- package/dist/lib/generate-types.d.mts.map +0 -1
- package/dist/lib/generate-types.test.cjs +0 -23
- package/dist/lib/generate-types.test.d.cts +0 -1
- package/dist/lib/generate-types.test.d.mts +0 -2
- package/dist/lib/generate-types.test.mjs +0 -25
- package/dist/lib/generate-types.test.mjs.map +0 -1
- package/dist/lib/hooks.d.cts.map +0 -1
- package/dist/lib/hooks.d.mts.map +0 -1
- package/dist/lib/hooks.test.cjs +0 -23
- package/dist/lib/hooks.test.d.cts +0 -1
- package/dist/lib/hooks.test.d.mts +0 -2
- package/dist/lib/hooks.test.mjs +0 -25
- package/dist/lib/hooks.test.mjs.map +0 -1
- package/dist/lib/install-dependencies.d.cts.map +0 -1
- package/dist/lib/install-dependencies.d.mts.map +0 -1
- package/dist/lib/install-dependencies.test.cjs +0 -23
- package/dist/lib/install-dependencies.test.d.cts +0 -1
- package/dist/lib/install-dependencies.test.d.mts +0 -2
- package/dist/lib/install-dependencies.test.mjs +0 -25
- package/dist/lib/install-dependencies.test.mjs.map +0 -1
- package/dist/lib/meta.d.cts.map +0 -1
- package/dist/lib/meta.d.mts.map +0 -1
- package/dist/lib/meta.test.cjs +0 -35
- package/dist/lib/meta.test.d.cts +0 -1
- package/dist/lib/meta.test.d.mts +0 -2
- package/dist/lib/meta.test.mjs +0 -37
- package/dist/lib/meta.test.mjs.map +0 -1
- package/dist/lib/plugins.d.cts.map +0 -1
- package/dist/lib/plugins.d.mts.map +0 -1
- package/dist/lib/plugins.test.cjs +0 -23
- package/dist/lib/plugins.test.d.cts +0 -1
- package/dist/lib/plugins.test.d.mts +0 -2
- package/dist/lib/plugins.test.mjs +0 -25
- package/dist/lib/plugins.test.mjs.map +0 -1
- package/dist/lib/resolver.d.cts.map +0 -1
- package/dist/lib/resolver.d.mts.map +0 -1
- package/dist/lib/resolver.test.cjs +0 -23
- package/dist/lib/resolver.test.d.cts +0 -1
- package/dist/lib/resolver.test.d.mts +0 -2
- package/dist/lib/resolver.test.mjs +0 -25
- package/dist/lib/resolver.test.mjs.map +0 -1
- package/dist/lib/streaming-channel.d.cts.map +0 -1
- package/dist/lib/streaming-channel.d.mts.map +0 -1
- package/dist/lib/streaming-channel.test.cjs +0 -23
- package/dist/lib/streaming-channel.test.d.cts +0 -1
- package/dist/lib/streaming-channel.test.d.mts +0 -2
- package/dist/lib/streaming-channel.test.mjs +0 -25
- package/dist/lib/streaming-channel.test.mjs.map +0 -1
- package/dist/lib/typescript/ts-morph.d.cts.map +0 -1
- package/dist/lib/typescript/ts-morph.d.mts.map +0 -1
- package/dist/lib/typescript/ts-morph.test.cjs +0 -23
- package/dist/lib/typescript/ts-morph.test.d.cts +0 -1
- package/dist/lib/typescript/ts-morph.test.d.mts +0 -2
- package/dist/lib/typescript/ts-morph.test.mjs +0 -25
- package/dist/lib/typescript/ts-morph.test.mjs.map +0 -1
- package/dist/lib/typescript/tsconfig.d.cts.map +0 -1
- package/dist/lib/typescript/tsconfig.d.mts.map +0 -1
- package/dist/lib/typescript/tsconfig.test.cjs +0 -23
- package/dist/lib/typescript/tsconfig.test.d.cts +0 -1
- package/dist/lib/typescript/tsconfig.test.d.mts +0 -2
- package/dist/lib/typescript/tsconfig.test.mjs +0 -25
- package/dist/lib/typescript/tsconfig.test.mjs.map +0 -1
- package/dist/lib/unplugin/helpers.d.cts.map +0 -1
- package/dist/lib/unplugin/helpers.d.mts.map +0 -1
- package/dist/lib/unplugin/helpers.test.cjs +0 -23
- package/dist/lib/unplugin/helpers.test.d.cts +0 -1
- package/dist/lib/unplugin/helpers.test.d.mts +0 -2
- package/dist/lib/unplugin/helpers.test.mjs +0 -25
- package/dist/lib/unplugin/helpers.test.mjs.map +0 -1
- package/dist/lib/unplugin/module-resolution.d.cts.map +0 -1
- package/dist/lib/unplugin/module-resolution.d.mts.map +0 -1
- package/dist/lib/unplugin/module-resolution.test.cjs +0 -23
- package/dist/lib/unplugin/module-resolution.test.d.cts +0 -1
- package/dist/lib/unplugin/module-resolution.test.d.mts +0 -2
- package/dist/lib/unplugin/module-resolution.test.mjs +0 -25
- package/dist/lib/unplugin/module-resolution.test.mjs.map +0 -1
- package/dist/lib/unplugin/plugin.d.cts.map +0 -1
- package/dist/lib/unplugin/plugin.d.mts.map +0 -1
- package/dist/lib/unplugin/plugin.test.cjs +0 -23
- package/dist/lib/unplugin/plugin.test.d.cts +0 -1
- package/dist/lib/unplugin/plugin.test.d.mts +0 -2
- package/dist/lib/unplugin/plugin.test.mjs +0 -25
- package/dist/lib/unplugin/plugin.test.mjs.map +0 -1
- package/dist/lib/utilities/file-header.d.cts.map +0 -1
- package/dist/lib/utilities/file-header.d.mts.map +0 -1
- package/dist/lib/utilities/file-header.test.cjs +0 -23
- package/dist/lib/utilities/file-header.test.d.cts +0 -1
- package/dist/lib/utilities/file-header.test.d.mts +0 -2
- package/dist/lib/utilities/file-header.test.mjs +0 -25
- package/dist/lib/utilities/file-header.test.mjs.map +0 -1
- package/dist/lib/utilities/format.d.cts.map +0 -1
- package/dist/lib/utilities/format.d.mts.map +0 -1
- package/dist/lib/utilities/format.test.cjs +0 -23
- package/dist/lib/utilities/format.test.d.cts +0 -1
- package/dist/lib/utilities/format.test.d.mts +0 -2
- package/dist/lib/utilities/format.test.mjs +0 -25
- package/dist/lib/utilities/format.test.mjs.map +0 -1
- package/dist/lib/utilities/source-file.d.cts.map +0 -1
- package/dist/lib/utilities/source-file.d.mts.map +0 -1
- package/dist/lib/utilities/source-file.test.cjs +0 -23
- package/dist/lib/utilities/source-file.test.d.cts +0 -1
- package/dist/lib/utilities/source-file.test.d.mts +0 -2
- package/dist/lib/utilities/source-file.test.mjs +0 -25
- package/dist/lib/utilities/source-file.test.mjs.map +0 -1
- package/dist/lib/utilities/source-map.d.cts.map +0 -1
- package/dist/lib/utilities/source-map.d.mts.map +0 -1
- package/dist/lib/utilities/source-map.test.cjs +0 -23
- package/dist/lib/utilities/source-map.test.d.cts +0 -1
- package/dist/lib/utilities/source-map.test.d.mts +0 -2
- package/dist/lib/utilities/source-map.test.mjs +0 -25
- package/dist/lib/utilities/source-map.test.mjs.map +0 -1
- package/dist/lib/utilities/write-file.d.cts.map +0 -1
- package/dist/lib/utilities/write-file.d.mts.map +0 -1
- package/dist/lib/utilities/write-file.test.cjs +0 -23
- package/dist/lib/utilities/write-file.test.d.cts +0 -1
- package/dist/lib/utilities/write-file.test.d.mts +0 -2
- package/dist/lib/utilities/write-file.test.mjs +0 -25
- package/dist/lib/utilities/write-file.test.mjs.map +0 -1
- package/dist/lib/vfs.d.cts.map +0 -1
- package/dist/lib/vfs.d.mts.map +0 -1
- package/dist/lib/vfs.test.cjs +0 -23
- package/dist/lib/vfs.test.d.cts +0 -1
- package/dist/lib/vfs.test.d.mts +0 -2
- package/dist/lib/vfs.test.mjs +0 -25
- package/dist/lib/vfs.test.mjs.map +0 -1
- package/dist/plugin-base.test.cjs +0 -23
- package/dist/plugin-base.test.d.cts +0 -1
- package/dist/plugin-base.test.d.mts +0 -2
- package/dist/plugin-base.test.mjs +0 -25
- package/dist/plugin-base.test.mjs.map +0 -1
- package/dist/plugin-utils/build-helpers.test.cjs +0 -23
- package/dist/plugin-utils/build-helpers.test.d.cts +0 -1
- package/dist/plugin-utils/build-helpers.test.d.mts +0 -2
- package/dist/plugin-utils/build-helpers.test.mjs +0 -25
- package/dist/plugin-utils/build-helpers.test.mjs.map +0 -1
- package/dist/plugin-utils/combine-plugins.test.cjs +0 -23
- package/dist/plugin-utils/combine-plugins.test.d.cts +0 -1
- package/dist/plugin-utils/combine-plugins.test.d.mts +0 -2
- package/dist/plugin-utils/combine-plugins.test.mjs +0 -25
- package/dist/plugin-utils/combine-plugins.test.mjs.map +0 -1
- package/dist/plugin-utils/context-helpers.test.cjs +0 -23
- package/dist/plugin-utils/context-helpers.test.d.cts +0 -1
- package/dist/plugin-utils/context-helpers.test.d.mts +0 -2
- package/dist/plugin-utils/context-helpers.test.mjs +0 -25
- package/dist/plugin-utils/context-helpers.test.mjs.map +0 -1
- package/dist/plugin-utils/docs-helper.test.cjs +0 -23
- package/dist/plugin-utils/docs-helper.test.d.cts +0 -1
- package/dist/plugin-utils/docs-helper.test.d.mts +0 -2
- package/dist/plugin-utils/docs-helper.test.mjs +0 -25
- package/dist/plugin-utils/docs-helper.test.mjs.map +0 -1
- package/dist/plugin-utils/enable-plugin.test.cjs +0 -23
- package/dist/plugin-utils/enable-plugin.test.d.cts +0 -1
- package/dist/plugin-utils/enable-plugin.test.d.mts +0 -2
- package/dist/plugin-utils/enable-plugin.test.mjs +0 -25
- package/dist/plugin-utils/enable-plugin.test.mjs.map +0 -1
- package/dist/plugin-utils/extend.test.cjs +0 -23
- package/dist/plugin-utils/extend.test.d.cts +0 -1
- package/dist/plugin-utils/extend.test.d.mts +0 -2
- package/dist/plugin-utils/extend.test.mjs +0 -25
- package/dist/plugin-utils/extend.test.mjs.map +0 -1
- package/dist/plugin-utils/filter.test.cjs +0 -23
- package/dist/plugin-utils/filter.test.d.cts +0 -1
- package/dist/plugin-utils/filter.test.d.mts +0 -2
- package/dist/plugin-utils/filter.test.mjs +0 -25
- package/dist/plugin-utils/filter.test.mjs.map +0 -1
- package/dist/plugin-utils/format-package-json.test.cjs +0 -23
- package/dist/plugin-utils/format-package-json.test.d.cts +0 -1
- package/dist/plugin-utils/format-package-json.test.d.mts +0 -2
- package/dist/plugin-utils/format-package-json.test.mjs +0 -25
- package/dist/plugin-utils/format-package-json.test.mjs.map +0 -1
- package/dist/plugin-utils/format.test.cjs +0 -23
- package/dist/plugin-utils/format.test.d.cts +0 -1
- package/dist/plugin-utils/format.test.d.mts +0 -2
- package/dist/plugin-utils/format.test.mjs +0 -25
- package/dist/plugin-utils/format.test.mjs.map +0 -1
- package/dist/plugin-utils/get-config-path.test.cjs +0 -23
- package/dist/plugin-utils/get-config-path.test.d.cts +0 -1
- package/dist/plugin-utils/get-config-path.test.d.mts +0 -2
- package/dist/plugin-utils/get-config-path.test.mjs +0 -25
- package/dist/plugin-utils/get-config-path.test.mjs.map +0 -1
- package/dist/plugin-utils/helpers.test.cjs +0 -23
- package/dist/plugin-utils/helpers.test.d.cts +0 -1
- package/dist/plugin-utils/helpers.test.d.mts +0 -2
- package/dist/plugin-utils/helpers.test.mjs +0 -25
- package/dist/plugin-utils/helpers.test.mjs.map +0 -1
- package/dist/plugin-utils/install.test.cjs +0 -23
- package/dist/plugin-utils/install.test.d.cts +0 -1
- package/dist/plugin-utils/install.test.d.mts +0 -2
- package/dist/plugin-utils/install.test.mjs +0 -25
- package/dist/plugin-utils/install.test.mjs.map +0 -1
- package/dist/plugin-utils/logging.test.cjs +0 -23
- package/dist/plugin-utils/logging.test.d.cts +0 -1
- package/dist/plugin-utils/logging.test.d.mts +0 -2
- package/dist/plugin-utils/logging.test.mjs +0 -25
- package/dist/plugin-utils/logging.test.mjs.map +0 -1
- package/dist/plugin-utils/merge.test.cjs +0 -23
- package/dist/plugin-utils/merge.test.d.cts +0 -1
- package/dist/plugin-utils/merge.test.d.mts +0 -2
- package/dist/plugin-utils/merge.test.mjs +0 -25
- package/dist/plugin-utils/merge.test.mjs.map +0 -1
- package/dist/plugin-utils/modules.test.cjs +0 -23
- package/dist/plugin-utils/modules.test.d.cts +0 -1
- package/dist/plugin-utils/modules.test.d.mts +0 -2
- package/dist/plugin-utils/modules.test.mjs +0 -25
- package/dist/plugin-utils/modules.test.mjs.map +0 -1
- package/dist/plugin-utils/paths.test.cjs +0 -23
- package/dist/plugin-utils/paths.test.d.cts +0 -1
- package/dist/plugin-utils/paths.test.d.mts +0 -2
- package/dist/plugin-utils/paths.test.mjs +0 -25
- package/dist/plugin-utils/paths.test.mjs.map +0 -1
- package/dist/plugin-utils/virtual.test.cjs +0 -23
- package/dist/plugin-utils/virtual.test.d.cts +0 -1
- package/dist/plugin-utils/virtual.test.d.mts +0 -2
- package/dist/plugin-utils/virtual.test.mjs +0 -25
- package/dist/plugin-utils/virtual.test.mjs.map +0 -1
- package/dist/schemas/fs.d.cts.map +0 -1
- package/dist/schemas/fs.d.mts.map +0 -1
- package/dist/schemas/fs.mjs.map +0 -1
- package/dist/storage/base.test.cjs +0 -23
- package/dist/storage/base.test.d.cts +0 -1
- package/dist/storage/base.test.d.mts +0 -2
- package/dist/storage/base.test.mjs +0 -25
- package/dist/storage/base.test.mjs.map +0 -1
- package/dist/storage/file-system.test.cjs +0 -23
- package/dist/storage/file-system.test.d.cts +0 -1
- package/dist/storage/file-system.test.d.mts +0 -2
- package/dist/storage/file-system.test.mjs +0 -25
- package/dist/storage/file-system.test.mjs.map +0 -1
- package/dist/storage/helpers.test.cjs +0 -23
- package/dist/storage/helpers.test.d.cts +0 -1
- package/dist/storage/helpers.test.d.mts +0 -2
- package/dist/storage/helpers.test.mjs +0 -25
- package/dist/storage/helpers.test.mjs.map +0 -1
- package/dist/storage/virtual.test.cjs +0 -23
- package/dist/storage/virtual.test.d.cts +0 -1
- package/dist/storage/virtual.test.d.mts +0 -2
- package/dist/storage/virtual.test.mjs +0 -25
- package/dist/storage/virtual.test.mjs.map +0 -1
- package/dist/types/api.d.cts +0 -16
- package/dist/types/api.d.cts.map +0 -1
- package/dist/types/api.d.mts +0 -18
- package/dist/types/api.d.mts.map +0 -1
- package/dist/types/config.d.cts +0 -739
- package/dist/types/config.d.cts.map +0 -1
- package/dist/types/config.d.mts +0 -741
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/context.d.cts +0 -682
- package/dist/types/context.d.cts.map +0 -1
- package/dist/types/context.d.mts +0 -684
- package/dist/types/context.d.mts.map +0 -1
- package/dist/types/fs.d.cts +0 -538
- package/dist/types/fs.d.cts.map +0 -1
- package/dist/types/fs.d.mts +0 -540
- package/dist/types/fs.d.mts.map +0 -1
- package/dist/types/hooks.d.cts +0 -96
- package/dist/types/hooks.d.cts.map +0 -1
- package/dist/types/hooks.d.mts +0 -98
- package/dist/types/hooks.d.mts.map +0 -1
- package/dist/types/index.d.cts +0 -9
- package/dist/types/index.d.mts +0 -11
- package/dist/types/logging.d.cts +0 -145
- package/dist/types/logging.d.cts.map +0 -1
- package/dist/types/logging.d.mts +0 -147
- package/dist/types/logging.d.mts.map +0 -1
- package/dist/types/plugin.d.cts +0 -207
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -209
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/types/tsconfig.d.cts +0 -73
- package/dist/types/tsconfig.d.cts.map +0 -1
- package/dist/types/tsconfig.d.mts +0 -75
- package/dist/types/tsconfig.d.mts.map +0 -1
- package/dist/types/unplugin.d.cts +0 -22
- package/dist/types/unplugin.d.cts.map +0 -1
- package/dist/types/unplugin.d.mts +0 -24
- package/dist/types/unplugin.d.mts.map +0 -1
- /package/dist/{constants/api.test.d.cts → index-BKZ67WMa.d.cts} +0 -0
- /package/dist/{constants/commands.test.d.cts → index-BKZ67WMa.d.mts} +0 -0
- /package/dist/{constants/devtools.test.d.cts → index-BVVgDSdq.d.cts} +0 -0
- /package/dist/{constants/environments.test.d.cts → index-BVVgDSdq.d.mts} +0 -0
- /package/dist/{constants/extensions.test.d.cts → index-Den-MsLx.d.cts} +0 -0
- /package/dist/{constants/fs.test.d.cts → index-Den-MsLx.d.mts} +0 -0
- /package/dist/{constants/hooks.test.d.cts → index-DmtQKWjk.d.cts} +0 -0
- /package/dist/{constants/log-level.test.d.cts → index-DmtQKWjk.d.mts} +0 -0
- /package/dist/{constants/meta.test.d.cts → index-_6s0AX1B.d.cts} +0 -0
- /package/dist/{constants/plugin.test.d.cts → index-_6s0AX1B.d.mts} +0 -0
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import __tsdown_shims_path from 'node:path'
|
|
4
|
-
import __tsdown_shims_url from 'node:url'
|
|
5
|
-
|
|
6
|
-
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
-
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
-
|
|
9
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
|
-
const
|
|
2
|
+
const require_chunk = require('../../chunk-C_NdSu1c.cjs');
|
|
11
3
|
let defu = require("defu");
|
|
12
|
-
defu =
|
|
4
|
+
defu = require_chunk.__toESM(defu, 1);
|
|
13
5
|
let ts_morph = require("ts-morph");
|
|
14
6
|
|
|
15
7
|
//#region src/lib/typescript/ts-morph.ts
|
|
16
|
-
var ts_morph_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
17
|
-
VirtualFileSystemHost: () => VirtualFileSystemHost,
|
|
18
|
-
createProgram: () => createProgram
|
|
19
|
-
});
|
|
20
8
|
var VirtualFileSystemHost = class extends ts_morph.InMemoryFileSystemHost {
|
|
21
9
|
#context;
|
|
22
10
|
constructor(context) {
|
|
@@ -114,10 +102,4 @@ function createProgram(context, override) {
|
|
|
114
102
|
|
|
115
103
|
//#endregion
|
|
116
104
|
exports.VirtualFileSystemHost = VirtualFileSystemHost;
|
|
117
|
-
exports.createProgram = createProgram;
|
|
118
|
-
Object.defineProperty(exports, 'ts_morph_exports', {
|
|
119
|
-
enumerable: true,
|
|
120
|
-
get: function () {
|
|
121
|
-
return ts_morph_exports;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
105
|
+
exports.createProgram = createProgram;
|
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/lib/typescript/ts-morph.d.ts
|
|
5
|
-
declare class VirtualFileSystemHost extends InMemoryFileSystemHost implements FileSystemHost {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(context: Context);
|
|
8
|
-
deleteSync(path: string): void;
|
|
9
|
-
readDirSync(dirPath: string): RuntimeDirEntry[];
|
|
10
|
-
readFile(filePath: string): Promise<string>;
|
|
11
|
-
readFileSync(filePath: string): string;
|
|
12
|
-
writeFile(filePath: string, fileText: string): Promise<void>;
|
|
13
|
-
writeFileSync(filePath: string, fileText: string): void;
|
|
14
|
-
mkdir(dirPath: string): Promise<void>;
|
|
15
|
-
mkdirSync(dirPath: string): void;
|
|
16
|
-
move(srcPath: string, destPath: string): Promise<void>;
|
|
17
|
-
moveSync(srcPath: string, destPath: string): void;
|
|
18
|
-
copy(srcPath: string, destPath: string): Promise<void>;
|
|
19
|
-
copySync(srcPath: string, destPath: string): void;
|
|
20
|
-
fileExists(filePath: string): Promise<boolean>;
|
|
21
|
-
fileExistsSync(filePath: string): boolean;
|
|
22
|
-
directoryExists(dirPath: string): Promise<boolean>;
|
|
23
|
-
directoryExistsSync(dirPath: string): boolean;
|
|
24
|
-
realpathSync(path: string): string;
|
|
25
|
-
getCurrentDirectory(): string;
|
|
26
|
-
glob(patterns: ReadonlyArray<string>): Promise<string[]>;
|
|
27
|
-
globSync(patterns: ReadonlyArray<string>): string[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing
|
|
31
|
-
*
|
|
32
|
-
* @param context - The Powerlines context
|
|
33
|
-
* @returns A ts-morph {@link Project} instance
|
|
34
|
-
*/
|
|
35
|
-
declare function createProgram(context: Context, override: Partial<ProjectOptions>): Project;
|
|
36
|
-
//#endregion
|
|
37
|
-
export { VirtualFileSystemHost, createProgram };
|
|
38
|
-
//# sourceMappingURL=ts-morph.d.cts.map
|
|
1
|
+
import { n as createProgram, t as VirtualFileSystemHost } from "../../ts-morph-BGgjbOgM.cjs";
|
|
2
|
+
export { VirtualFileSystemHost, createProgram };
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Context } from "../../types/context.mjs";
|
|
4
|
-
import { FileSystemHost, InMemoryFileSystemHost, Project, ProjectOptions, RuntimeDirEntry } from "ts-morph";
|
|
5
|
-
|
|
6
|
-
//#region src/lib/typescript/ts-morph.d.ts
|
|
7
|
-
declare class VirtualFileSystemHost extends InMemoryFileSystemHost implements FileSystemHost {
|
|
8
|
-
#private;
|
|
9
|
-
constructor(context: Context);
|
|
10
|
-
deleteSync(path: string): void;
|
|
11
|
-
readDirSync(dirPath: string): RuntimeDirEntry[];
|
|
12
|
-
readFile(filePath: string): Promise<string>;
|
|
13
|
-
readFileSync(filePath: string): string;
|
|
14
|
-
writeFile(filePath: string, fileText: string): Promise<void>;
|
|
15
|
-
writeFileSync(filePath: string, fileText: string): void;
|
|
16
|
-
mkdir(dirPath: string): Promise<void>;
|
|
17
|
-
mkdirSync(dirPath: string): void;
|
|
18
|
-
move(srcPath: string, destPath: string): Promise<void>;
|
|
19
|
-
moveSync(srcPath: string, destPath: string): void;
|
|
20
|
-
copy(srcPath: string, destPath: string): Promise<void>;
|
|
21
|
-
copySync(srcPath: string, destPath: string): void;
|
|
22
|
-
fileExists(filePath: string): Promise<boolean>;
|
|
23
|
-
fileExistsSync(filePath: string): boolean;
|
|
24
|
-
directoryExists(dirPath: string): Promise<boolean>;
|
|
25
|
-
directoryExistsSync(dirPath: string): boolean;
|
|
26
|
-
realpathSync(path: string): string;
|
|
27
|
-
getCurrentDirectory(): string;
|
|
28
|
-
glob(patterns: ReadonlyArray<string>): Promise<string[]>;
|
|
29
|
-
globSync(patterns: ReadonlyArray<string>): string[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing
|
|
33
|
-
*
|
|
34
|
-
* @param context - The Powerlines context
|
|
35
|
-
* @returns A ts-morph {@link Project} instance
|
|
36
|
-
*/
|
|
37
|
-
declare function createProgram(context: Context, override: Partial<ProjectOptions>): Project;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { VirtualFileSystemHost, createProgram };
|
|
40
|
-
//# sourceMappingURL=ts-morph.d.mts.map
|
|
1
|
+
import { n as createProgram, t as VirtualFileSystemHost } from "../../ts-morph-zLvdifpA.mjs";
|
|
2
|
+
export { VirtualFileSystemHost, createProgram };
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import __tsdown_shims_path from 'node:path'
|
|
4
|
-
import __tsdown_shims_url from 'node:url'
|
|
5
|
-
|
|
6
|
-
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
-
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
-
|
|
9
|
-
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
10
1
|
import defu from "defu";
|
|
11
2
|
import { InMemoryFileSystemHost, Project } from "ts-morph";
|
|
12
3
|
|
|
13
4
|
//#region src/lib/typescript/ts-morph.ts
|
|
14
|
-
var ts_morph_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
-
VirtualFileSystemHost: () => VirtualFileSystemHost,
|
|
16
|
-
createProgram: () => createProgram
|
|
17
|
-
});
|
|
18
5
|
var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
|
|
19
6
|
#context;
|
|
20
7
|
constructor(context) {
|
|
@@ -111,5 +98,5 @@ function createProgram(context, override) {
|
|
|
111
98
|
}
|
|
112
99
|
|
|
113
100
|
//#endregion
|
|
114
|
-
export { VirtualFileSystemHost, createProgram
|
|
101
|
+
export { VirtualFileSystemHost, createProgram };
|
|
115
102
|
//# sourceMappingURL=ts-morph.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-morph.mjs","names":["#context"],"sources":["../../../src/lib/typescript/ts-morph.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport {\n CompilerOptions,\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n ProjectOptions,\n RuntimeDirEntry\n} from \"ts-morph\";\nimport type { Context } from \"../../types/context\";\n\nexport class VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #context: Context;\n\n public constructor(context: Context) {\n super();\n\n this.#context = context;\n }\n\n public override deleteSync(path: string) {\n this.#context.fs.removeSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n if (!this.#context.fs.isDirectorySync(dirPath)) {\n return [];\n }\n\n return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#context.fs.resolveSync(entry);\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#context.fs.isDirectorySync(fullPath),\n isFile: this.#context.fs.isFileSync(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return (await this.#context.fs.read(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return this.#context.fs.readSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#context.fs.write(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#context.fs.writeSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#context.fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#context.fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#context.fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#context.fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#context.fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#context.fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#context.fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#context.fs.isFileSync(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#context.fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#context.fs.isDirectorySync(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#context.fs.resolveSync(path) || path;\n }\n\n public override getCurrentDirectory() {\n return this.#context.config.cwd;\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#context.fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#context.fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @param context - The Powerlines context\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(\n context: Context,\n override: Partial<ProjectOptions>\n): Project {\n context.debug(\n `Creating ts-morph Project instance with configuration from: ${\n context.tsconfig.tsconfigFilePath\n }.`\n );\n\n const project = new Project(\n defu(override ?? {}, {\n skipAddingFilesFromTsConfig: false,\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context),\n compilerOptions: defu(context.tsconfig.options ?? {}, {\n lib: [\"lib.esnext.full.d.ts\"]\n }) as CompilerOptions\n })\n );\n\n return project;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ts-morph.mjs","names":["#context"],"sources":["../../../src/lib/typescript/ts-morph.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport {\n CompilerOptions,\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n ProjectOptions,\n RuntimeDirEntry\n} from \"ts-morph\";\nimport type { Context } from \"../../types/context\";\n\nexport class VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #context: Context;\n\n public constructor(context: Context) {\n super();\n\n this.#context = context;\n }\n\n public override deleteSync(path: string) {\n this.#context.fs.removeSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n if (!this.#context.fs.isDirectorySync(dirPath)) {\n return [];\n }\n\n return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#context.fs.resolveSync(entry);\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#context.fs.isDirectorySync(fullPath),\n isFile: this.#context.fs.isFileSync(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return (await this.#context.fs.read(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return this.#context.fs.readSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#context.fs.write(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#context.fs.writeSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#context.fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#context.fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#context.fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#context.fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#context.fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#context.fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#context.fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#context.fs.isFileSync(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#context.fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#context.fs.isDirectorySync(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#context.fs.resolveSync(path) || path;\n }\n\n public override getCurrentDirectory() {\n return this.#context.config.cwd;\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#context.fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#context.fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @param context - The Powerlines context\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(\n context: Context,\n override: Partial<ProjectOptions>\n): Project {\n context.debug(\n `Creating ts-morph Project instance with configuration from: ${\n context.tsconfig.tsconfigFilePath\n }.`\n );\n\n const project = new Project(\n defu(override ?? {}, {\n skipAddingFilesFromTsConfig: false,\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context),\n compilerOptions: defu(context.tsconfig.options ?? {}, {\n lib: [\"lib.esnext.full.d.ts\"]\n }) as CompilerOptions\n })\n );\n\n return project;\n}\n"],"mappings":";;;;AA6BA,IAAa,wBAAb,cACU,uBAEV;CACE;CAEA,AAAO,YAAY,SAAkB;EACnC,MAAM;EAEN,KAAKA,WAAW;CAClB;CAEA,AAAgB,WAAW,MAAc;EACvC,KAAKA,SAAS,GAAG,WAAW,IAAI;CAClC;CAEA,AAAgB,YAAY,SAAoC;EAC9D,IAAI,CAAC,KAAKA,SAAS,GAAG,gBAAgB,OAAO,GAC3C,OAAO,CAAC;EAGV,OAAO,KAAKA,SAAS,GAAG,SAAS,OAAO,EAAE,QAAQ,KAAK,UAAU;GAC/D,MAAM,WAAW,KAAKA,SAAS,GAAG,YAAY,KAAK;GACnD,IAAI,UACF,IAAI,KAAK;IACP,MAAM;IACN,aAAa,KAAKA,SAAS,GAAG,gBAAgB,QAAQ;IACtD,QAAQ,KAAKA,SAAS,GAAG,WAAW,QAAQ;IAC5C,WAAW;GACb,CAAC;GAGH,OAAO;EACT,GAAG,CAAC,CAAsB;CAC5B;CAEA,MAAsB,SAAS,UAAkB;EAC/C,IAAI,CAAC,KAAKA,SAAS,GAAG,WAAW,QAAQ,GACvC,OAAO;EAGT,OAAQ,MAAM,KAAKA,SAAS,GAAG,KAAK,QAAQ;CAC9C;CAEA,AAAgB,aAAa,UAAkB;EAC7C,IAAI,CAAC,KAAKA,SAAS,GAAG,WAAW,QAAQ,GACvC,OAAO;EAGT,OAAO,KAAKA,SAAS,GAAG,SAAS,QAAQ;CAC3C;CAEA,MAAsB,UAAU,UAAkB,UAAkB;EAClE,OAAO,KAAKA,SAAS,GAAG,MAAM,UAAU,QAA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AAgB,cACd,SACA,UACS;CACT,QAAQ,MACN,+DACE,QAAQ,SAAS,iBAClB,EACH;CAaA,OAAO,IAXa,QAClB,KAAK,YAAY,CAAC,GAAG;EACnB,6BAA6B;EAC7B,kBAAkB,QAAQ,SAAS;EACnC,YAAY,IAAI,sBAAsB,OAAO;EAC7C,iBAAiB,KAAK,QAAQ,SAAS,WAAW,CAAC,GAAG,EACpD,KAAK,CAAC,sBAAsB,EAC9B,CAAC;CACH,CAAC,CAGU;AACf"}
|
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import __tsdown_shims_path from 'node:path'
|
|
4
|
-
import __tsdown_shims_url from 'node:url'
|
|
5
|
-
|
|
6
|
-
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
-
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
-
|
|
9
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
|
-
const
|
|
2
|
+
const require_chunk = require('../../chunk-C_NdSu1c.cjs');
|
|
11
3
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
12
4
|
let _stryke_fs_json = require("@stryke/fs/json");
|
|
13
5
|
let _stryke_path_append = require("@stryke/path/append");
|
|
14
6
|
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
15
7
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
16
8
|
let defu = require("defu");
|
|
17
|
-
defu =
|
|
9
|
+
defu = require_chunk.__toESM(defu, 1);
|
|
18
10
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
19
11
|
let chalk = require("chalk");
|
|
20
|
-
chalk =
|
|
12
|
+
chalk = require_chunk.__toESM(chalk, 1);
|
|
21
13
|
let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
22
14
|
let _donedeal0_superdiff = require("@donedeal0/superdiff");
|
|
23
15
|
let _stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
24
16
|
let typescript = require("typescript");
|
|
25
|
-
typescript =
|
|
17
|
+
typescript = require_chunk.__toESM(typescript, 1);
|
|
26
18
|
|
|
27
19
|
//#region src/lib/typescript/tsconfig.ts
|
|
28
|
-
var tsconfig_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
29
|
-
findIncludeMatch: () => findIncludeMatch,
|
|
30
|
-
findMatch: () => findMatch,
|
|
31
|
-
getParsedTypeScriptConfig: () => getParsedTypeScriptConfig,
|
|
32
|
-
getTsconfigDtsPath: () => getTsconfigDtsPath,
|
|
33
|
-
getTsconfigFilePath: () => getTsconfigFilePath,
|
|
34
|
-
initializeTsconfig: () => initializeTsconfig,
|
|
35
|
-
isIncludeMatchFound: () => isIncludeMatchFound,
|
|
36
|
-
isMatchFound: () => isMatchFound,
|
|
37
|
-
resolveTsconfig: () => resolveTsconfig,
|
|
38
|
-
tryTsconfigFilePath: () => tryTsconfigFilePath
|
|
39
|
-
});
|
|
40
20
|
function getTsconfigDtsPath(context) {
|
|
41
21
|
return (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_file_path_fns.relativePath)((0, _stryke_path_join_paths.joinPaths)(context.config.cwd, context.config.root), (0, _stryke_path_file_path_fns.findFilePath)(context.typesPath)), (0, _stryke_path_file_path_fns.findFileName)(context.typesPath));
|
|
42
22
|
}
|
|
@@ -270,10 +250,4 @@ exports.initializeTsconfig = initializeTsconfig;
|
|
|
270
250
|
exports.isIncludeMatchFound = isIncludeMatchFound;
|
|
271
251
|
exports.isMatchFound = isMatchFound;
|
|
272
252
|
exports.resolveTsconfig = resolveTsconfig;
|
|
273
|
-
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
274
|
-
Object.defineProperty(exports, 'tsconfig_exports', {
|
|
275
|
-
enumerable: true,
|
|
276
|
-
get: function () {
|
|
277
|
-
return tsconfig_exports;
|
|
278
|
-
}
|
|
279
|
-
});
|
|
253
|
+
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ResolvedConfig } from "../../types/config.cjs";
|
|
4
|
-
import { FilterPattern } from "@stryke/types/file";
|
|
5
|
-
import ts from "typescript";
|
|
6
|
-
|
|
7
|
-
//#region src/lib/typescript/tsconfig.d.ts
|
|
8
|
-
declare function getTsconfigDtsPath<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string;
|
|
9
|
-
declare function initializeTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
10
|
-
declare function resolveTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Get the path to the tsconfig.json file.
|
|
13
|
-
*
|
|
14
|
-
* @param cwd - The root directory of the workspace.
|
|
15
|
-
* @param root - The root directory of the project.
|
|
16
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
17
|
-
* @returns The absolute path to the tsconfig.json file.
|
|
18
|
-
* @throws If the tsconfig.json file does not exist.
|
|
19
|
-
*/
|
|
20
|
-
declare function getTsconfigFilePath(cwd: string, root: string, tsconfig?: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* Get the path to the tsconfig.json file.
|
|
23
|
-
*
|
|
24
|
-
* @param cwd - The root directory of the workspace.
|
|
25
|
-
* @param root - The root directory of the project.
|
|
26
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
27
|
-
* @returns The absolute path to the tsconfig.json file.
|
|
28
|
-
* @throws If the tsconfig.json file does not exist.
|
|
29
|
-
*/
|
|
30
|
-
declare function tryTsconfigFilePath(cwd: string, root: string, tsconfig: string): string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
33
|
-
*
|
|
34
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
35
|
-
* @param types - An array of type names to check against.
|
|
36
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
37
|
-
*/
|
|
38
|
-
declare function findMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[], extensions?: string[]): string | RegExp | null | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
41
|
-
*
|
|
42
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
43
|
-
* @param types - An array of type names to check against.
|
|
44
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
45
|
-
*/
|
|
46
|
-
declare function findIncludeMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): string | RegExp | null | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
49
|
-
*
|
|
50
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
51
|
-
* @param types - An array of type names to check against.
|
|
52
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
53
|
-
*/
|
|
54
|
-
declare function isMatchFound(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
57
|
-
*
|
|
58
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
59
|
-
* @param types - An array of type names to check against.
|
|
60
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
61
|
-
*/
|
|
62
|
-
declare function isIncludeMatchFound(tsconfigType: FilterPattern, types: FilterPattern[]): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Get the parsed TypeScript configuration.
|
|
65
|
-
*
|
|
66
|
-
* @param workspaceRoot - The root directory of the workspace.
|
|
67
|
-
* @param projectRoot - The root directory of the project.
|
|
68
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
69
|
-
* @param tsconfigRaw - The raw tsconfig.json content.
|
|
70
|
-
* @param originalTsconfigJson - The original tsconfig.json content.
|
|
71
|
-
* @param host - The TypeScript parse config host.
|
|
72
|
-
* @returns The resolved TypeScript configuration.
|
|
73
|
-
*/
|
|
74
|
-
declare function getParsedTypeScriptConfig(workspaceRoot: string, projectRoot: string, tsconfig?: string, tsconfigRaw?: TSConfig, originalTsconfigJson?: TSConfig, host?: ts.ParseConfigHost): ParsedTypeScriptConfig;
|
|
75
|
-
//#endregion
|
|
76
|
-
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
77
|
-
//# sourceMappingURL=tsconfig.d.cts.map
|
|
1
|
+
import { a as getTsconfigFilePath, c as isMatchFound, i as getTsconfigDtsPath, l as resolveTsconfig, n as findMatch, o as initializeTsconfig, r as getParsedTypeScriptConfig, s as isIncludeMatchFound, t as findIncludeMatch, u as tryTsconfigFilePath } from "../../tsconfig-DExoZEQ0.cjs";
|
|
2
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
@@ -1,79 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { ParsedTypeScriptConfig, TSConfig } from "../../types/tsconfig.mjs";
|
|
4
|
-
import { EnvironmentContext } from "../../types/context.mjs";
|
|
5
|
-
import { ResolvedConfig } from "../../types/config.mjs";
|
|
6
|
-
import ts from "typescript";
|
|
7
|
-
import { FilterPattern } from "@stryke/types/file";
|
|
8
|
-
|
|
9
|
-
//#region src/lib/typescript/tsconfig.d.ts
|
|
10
|
-
declare function getTsconfigDtsPath<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string;
|
|
11
|
-
declare function initializeTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
12
|
-
declare function resolveTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Get the path to the tsconfig.json file.
|
|
15
|
-
*
|
|
16
|
-
* @param cwd - The root directory of the workspace.
|
|
17
|
-
* @param root - The root directory of the project.
|
|
18
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
19
|
-
* @returns The absolute path to the tsconfig.json file.
|
|
20
|
-
* @throws If the tsconfig.json file does not exist.
|
|
21
|
-
*/
|
|
22
|
-
declare function getTsconfigFilePath(cwd: string, root: string, tsconfig?: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Get the path to the tsconfig.json file.
|
|
25
|
-
*
|
|
26
|
-
* @param cwd - The root directory of the workspace.
|
|
27
|
-
* @param root - The root directory of the project.
|
|
28
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
29
|
-
* @returns The absolute path to the tsconfig.json file.
|
|
30
|
-
* @throws If the tsconfig.json file does not exist.
|
|
31
|
-
*/
|
|
32
|
-
declare function tryTsconfigFilePath(cwd: string, root: string, tsconfig: string): string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
35
|
-
*
|
|
36
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
37
|
-
* @param types - An array of type names to check against.
|
|
38
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
39
|
-
*/
|
|
40
|
-
declare function findMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[], extensions?: string[]): string | RegExp | null | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
43
|
-
*
|
|
44
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
45
|
-
* @param types - An array of type names to check against.
|
|
46
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
47
|
-
*/
|
|
48
|
-
declare function findIncludeMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): string | RegExp | null | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
51
|
-
*
|
|
52
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
53
|
-
* @param types - An array of type names to check against.
|
|
54
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
55
|
-
*/
|
|
56
|
-
declare function isMatchFound(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
59
|
-
*
|
|
60
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
61
|
-
* @param types - An array of type names to check against.
|
|
62
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
63
|
-
*/
|
|
64
|
-
declare function isIncludeMatchFound(tsconfigType: FilterPattern, types: FilterPattern[]): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Get the parsed TypeScript configuration.
|
|
67
|
-
*
|
|
68
|
-
* @param workspaceRoot - The root directory of the workspace.
|
|
69
|
-
* @param projectRoot - The root directory of the project.
|
|
70
|
-
* @param tsconfig - The path to the tsconfig.json file.
|
|
71
|
-
* @param tsconfigRaw - The raw tsconfig.json content.
|
|
72
|
-
* @param originalTsconfigJson - The original tsconfig.json content.
|
|
73
|
-
* @param host - The TypeScript parse config host.
|
|
74
|
-
* @returns The resolved TypeScript configuration.
|
|
75
|
-
*/
|
|
76
|
-
declare function getParsedTypeScriptConfig(workspaceRoot: string, projectRoot: string, tsconfig?: string, tsconfigRaw?: TSConfig, originalTsconfigJson?: TSConfig, host?: ts.ParseConfigHost): ParsedTypeScriptConfig;
|
|
77
|
-
//#endregion
|
|
78
|
-
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
79
|
-
//# sourceMappingURL=tsconfig.d.mts.map
|
|
1
|
+
import { a as getTsconfigFilePath, c as isMatchFound, i as getTsconfigDtsPath, l as resolveTsconfig, n as findMatch, o as initializeTsconfig, r as getParsedTypeScriptConfig, s as isIncludeMatchFound, t as findIncludeMatch, u as tryTsconfigFilePath } from "../../tsconfig-De09cBeX.mjs";
|
|
2
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import __tsdown_shims_path from 'node:path'
|
|
4
|
-
import __tsdown_shims_url from 'node:url'
|
|
5
|
-
|
|
6
|
-
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
-
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
-
|
|
9
|
-
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
10
1
|
import { existsSync } from "@stryke/fs/exists";
|
|
11
2
|
import { readJsonFile, readJsonFileSync } from "@stryke/fs/json";
|
|
12
3
|
import { appendPath } from "@stryke/path/append";
|
|
@@ -21,18 +12,6 @@ import { StormJSON } from "@stryke/json/storm-json";
|
|
|
21
12
|
import ts from "typescript";
|
|
22
13
|
|
|
23
14
|
//#region src/lib/typescript/tsconfig.ts
|
|
24
|
-
var tsconfig_exports = /* @__PURE__ */ __exportAll({
|
|
25
|
-
findIncludeMatch: () => findIncludeMatch,
|
|
26
|
-
findMatch: () => findMatch,
|
|
27
|
-
getParsedTypeScriptConfig: () => getParsedTypeScriptConfig,
|
|
28
|
-
getTsconfigDtsPath: () => getTsconfigDtsPath,
|
|
29
|
-
getTsconfigFilePath: () => getTsconfigFilePath,
|
|
30
|
-
initializeTsconfig: () => initializeTsconfig,
|
|
31
|
-
isIncludeMatchFound: () => isIncludeMatchFound,
|
|
32
|
-
isMatchFound: () => isMatchFound,
|
|
33
|
-
resolveTsconfig: () => resolveTsconfig,
|
|
34
|
-
tryTsconfigFilePath: () => tryTsconfigFilePath
|
|
35
|
-
});
|
|
36
15
|
function getTsconfigDtsPath(context) {
|
|
37
16
|
return joinPaths(relativePath(joinPaths(context.config.cwd, context.config.root), findFilePath(context.typesPath)), findFileName(context.typesPath));
|
|
38
17
|
}
|
|
@@ -257,5 +236,5 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
|
|
|
257
236
|
}
|
|
258
237
|
|
|
259
238
|
//#endregion
|
|
260
|
-
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath
|
|
239
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
261
240
|
//# sourceMappingURL=tsconfig.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig.mjs","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Diff, ObjectData } from \"@donedeal0/superdiff\";\nimport { getObjectDiff } from \"@donedeal0/superdiff\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile, readJsonFileSync } from \"@stryke/fs/json\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileName,\n findFilePath,\n relativePath\n} from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport chalk from \"chalk\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\nimport { ResolvedConfig } from \"../../types/config\";\nimport { EnvironmentContext } from \"../../types/context\";\nimport type { ParsedTypeScriptConfig, TSConfig } from \"../../types/tsconfig\";\n\nexport function getTsconfigDtsPath<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string {\n const dtsRelativePath = joinPaths(\n relativePath(\n joinPaths(context.config.cwd, context.config.root),\n findFilePath(context.typesPath)\n ),\n findFileName(context.typesPath)\n );\n\n return dtsRelativePath;\n}\n\nasync function resolveTsconfigChanges<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(\n context: EnvironmentContext<TResolvedConfig, TSystemContext>\n): Promise<TsConfigJson> {\n const tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw\n );\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n const tsconfigJson = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n tsconfigJson.compilerOptions ??= {};\n\n if (context.config.output.dts !== false) {\n const dtsRelativePath = getTsconfigDtsPath(context);\n\n if (\n !tsconfigJson.include?.some(filePattern =>\n isIncludeMatchFound(filePattern, [context.typesPath, dtsRelativePath])\n )\n ) {\n tsconfigJson.include ??= [];\n tsconfigJson.include.push(\n dtsRelativePath.startsWith(\"./\")\n ? dtsRelativePath.slice(2)\n : dtsRelativePath\n );\n }\n }\n\n if (\n !tsconfig.options.lib?.some(lib =>\n [\n \"lib.esnext.d.ts\",\n \"lib.es2021.d.ts\",\n \"lib.es2022.d.ts\",\n \"lib.es2023.d.ts\"\n ].includes(lib.toLowerCase())\n )\n ) {\n tsconfigJson.compilerOptions.lib ??= [];\n tsconfigJson.compilerOptions.lib.push(\"esnext\");\n }\n\n // if (tsconfig.options.module !== ts.ModuleKind.ESNext) {\n // tsconfigJson.compilerOptions.module = \"ESNext\";\n // }\n\n // if (\n // !tsconfig.options.target ||\n // ![\n // ts.ScriptTarget.ESNext,\n // ts.ScriptTarget.ES2024,\n // ts.ScriptTarget.ES2023,\n // ts.ScriptTarget.ES2022,\n // ts.ScriptTarget.ES2021\n // ].includes(tsconfig.options.target)\n // ) {\n // tsconfigJson.compilerOptions.target = \"ESNext\";\n // }\n\n // if (tsconfig.options.moduleResolution !== ts.ModuleResolutionKind.Bundler) {\n // tsconfigJson.compilerOptions.moduleResolution = \"Bundler\";\n // }\n\n // if (tsconfig.options.moduleDetection !== ts.ModuleDetectionKind.Force) {\n // tsconfigJson.compilerOptions.moduleDetection = \"force\";\n // }\n\n // if (tsconfig.options.allowSyntheticDefaultImports !== true) {\n // tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;\n // }\n\n // if (tsconfig.options.noImplicitOverride !== true) {\n // tsconfigJson.compilerOptions.noImplicitOverride = true;\n // }\n\n // if (tsconfig.options.noUncheckedIndexedAccess !== true) {\n // tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;\n // }\n\n // if (tsconfig.options.skipLibCheck !== true) {\n // tsconfigJson.compilerOptions.skipLibCheck = true;\n // }\n\n // if (tsconfig.options.resolveJsonModule !== true) {\n // tsconfigJson.compilerOptions.resolveJsonModule = true;\n // }\n\n // if (tsconfig.options.verbatimModuleSyntax !== false) {\n // tsconfigJson.compilerOptions.verbatimModuleSyntax = false;\n // }\n\n // if (tsconfig.options.allowJs !== true) {\n // tsconfigJson.compilerOptions.allowJs = true;\n // }\n\n // if (tsconfig.options.declaration !== true) {\n // tsconfigJson.compilerOptions.declaration = true;\n // }\n\n if (tsconfig.options.esModuleInterop !== true) {\n tsconfigJson.compilerOptions.esModuleInterop = true;\n }\n\n if (tsconfig.options.isolatedModules !== true) {\n tsconfigJson.compilerOptions.isolatedModules = true;\n }\n\n if (context.config.platform === \"node\") {\n if (\n !tsconfig.options.types?.some(\n type =>\n type.toLowerCase() === \"node\" || type.toLowerCase() === \"@types/node\"\n )\n ) {\n tsconfigJson.compilerOptions.types ??= [];\n tsconfigJson.compilerOptions.types.push(\"node\");\n }\n }\n\n return tsconfigJson;\n}\n\nexport async function initializeTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n context.debug(\n \"Initializing TypeScript configuration (tsconfig.json) for the Powerlines project.\"\n );\n\n if (!isPackageExists(\"typescript\")) {\n throw new Error(\n 'The TypeScript package is not installed. Please install the package using the command: \"npm install typescript --save-dev\"'\n );\n }\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n context.tsconfig.originalTsconfigJson =\n await readJsonFile<TsConfigJson>(tsconfigFilePath);\n\n context.tsconfig.tsconfigJson = await resolveTsconfigChanges<\n TResolvedConfig,\n TSystemContext\n >(context);\n\n context.debug(\n \"Writing updated TypeScript configuration (tsconfig.json) file to disk.\"\n );\n\n await context.fs.write(\n tsconfigFilePath,\n StormJSON.stringify(context.tsconfig.tsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw,\n context.tsconfig.originalTsconfigJson\n );\n}\n\nexport async function resolveTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n const updateTsconfigJson = await readJsonFile<TsConfigJson>(\n context.tsconfig.tsconfigFilePath\n );\n if (\n updateTsconfigJson?.compilerOptions?.types &&\n Array.isArray(updateTsconfigJson.compilerOptions.types) &&\n !updateTsconfigJson.compilerOptions.types.length\n ) {\n // If the types array is empty, we can safely remove it\n delete updateTsconfigJson.compilerOptions.types;\n }\n\n const result = getObjectDiff(\n context.tsconfig.originalTsconfigJson as NonNullable<ObjectData>,\n updateTsconfigJson as ObjectData,\n {\n ignoreArrayOrder: true,\n showOnly: {\n statuses: [\"added\", \"deleted\", \"updated\"],\n granularity: \"deep\"\n }\n }\n );\n\n const changes = [] as {\n field: string;\n status: \"added\" | \"deleted\" | \"updated\";\n previous: string;\n current: string;\n }[];\n const getChanges = (difference: Diff, property?: string) => {\n if (\n difference.status === \"added\" ||\n difference.status === \"deleted\" ||\n difference.status === \"updated\"\n ) {\n if (difference.diff) {\n for (const diff of difference.diff) {\n getChanges(\n diff,\n property\n ? `${property}.${difference.property}`\n : difference.property\n );\n }\n } else {\n changes.push({\n field: property\n ? `${property}.${difference.property}`\n : difference.property,\n status: difference.status,\n previous:\n difference.status === \"added\"\n ? \"---\"\n : StormJSON.stringify(difference.previousValue),\n current:\n difference.status === \"deleted\"\n ? \"---\"\n : StormJSON.stringify(difference.currentValue)\n });\n }\n }\n };\n\n for (const diff of result.diff) {\n getChanges(diff);\n }\n\n if (changes.length > 0) {\n context.warn(\n `Updating the following configuration values in \"${context.tsconfig.tsconfigFilePath}\" file:\n\n ${changes\n .map(\n (change, i) => `${chalk.bold.whiteBright(\n `${i + 1}. ${titleCase(change.status)} the ${change.field} field: `\n )}\n ${chalk.red(` - Previous: ${change.previous} `)}\n ${chalk.green(` - Updated: ${change.current} `)}\n `\n )\n .join(\"\\n\")}\n `\n );\n }\n\n await context.fs.write(\n context.tsconfig.tsconfigFilePath,\n StormJSON.stringify(updateTsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n if (!context.tsconfig) {\n throw new Error(\"Failed to parse the TypeScript configuration file.\");\n }\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, tsconfig);\n } else {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.app.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.lib.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.json\");\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n root\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, root);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, appendPath(root, cwd));\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,mBAGd,SAAsE;CAStE,OARwB,UACtB,aACE,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,IAAI,GACjD,aAAa,QAAQ,SAAS,CAChC,GACA,aAAa,QAAQ,SAAS,CAGX;AACvB;AAEA,eAAe,uBAIb,S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oBACvB,eACA,aACA,QACF;CACA,MAAM,eAAe,iBAA2B,gBAAgB;CAChE,IAAI,CAAC,cACH,MAAM,IAAI,MACR,2DAA2D,UACzD,aACA,YAAY,eACd,GACF;CAGF,MAAM,oBAAoB,GAAG,2BAC3B,KAAK,eAAe,CAAC,GAAG,YAAY,GACpC,MACA,WAAW,aAAa,aAAa,CACvC;CACA,IAAI,kBAAkB,OAAO,SAAS,GAAG;EACvC,MAAM,eAAe;EACvB,kBAAkB,OACjB,KACC,UACE,MACG,MAAM,aAAa,UAAa,MAAM,OACnC,IAAI,MAAM,SAAS,GAAG,MAAM,KAAK,OACjC,MAAM,MAAM,YAAY,SAAS,GAE3C,EACC,KAAK,IAAI,EAAE;;EAGV,MAAM,IAAI,MAAM,YAAY;CAC9B;CAEA,OAAO;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"tsconfig.mjs","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Diff, ObjectData } from \"@donedeal0/superdiff\";\nimport { getObjectDiff } from \"@donedeal0/superdiff\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile, readJsonFileSync } from \"@stryke/fs/json\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileName,\n findFilePath,\n relativePath\n} from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport chalk from \"chalk\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\nimport { ResolvedConfig } from \"../../types/config\";\nimport { EnvironmentContext } from \"../../types/context\";\nimport type { ParsedTypeScriptConfig, TSConfig } from \"../../types/tsconfig\";\n\nexport function getTsconfigDtsPath<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string {\n const dtsRelativePath = joinPaths(\n relativePath(\n joinPaths(context.config.cwd, context.config.root),\n findFilePath(context.typesPath)\n ),\n findFileName(context.typesPath)\n );\n\n return dtsRelativePath;\n}\n\nasync function resolveTsconfigChanges<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(\n context: EnvironmentContext<TResolvedConfig, TSystemContext>\n): Promise<TsConfigJson> {\n const tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw\n );\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n const tsconfigJson = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n tsconfigJson.compilerOptions ??= {};\n\n if (context.config.output.dts !== false) {\n const dtsRelativePath = getTsconfigDtsPath(context);\n\n if (\n !tsconfigJson.include?.some(filePattern =>\n isIncludeMatchFound(filePattern, [context.typesPath, dtsRelativePath])\n )\n ) {\n tsconfigJson.include ??= [];\n tsconfigJson.include.push(\n dtsRelativePath.startsWith(\"./\")\n ? dtsRelativePath.slice(2)\n : dtsRelativePath\n );\n }\n }\n\n if (\n !tsconfig.options.lib?.some(lib =>\n [\n \"lib.esnext.d.ts\",\n \"lib.es2021.d.ts\",\n \"lib.es2022.d.ts\",\n \"lib.es2023.d.ts\"\n ].includes(lib.toLowerCase())\n )\n ) {\n tsconfigJson.compilerOptions.lib ??= [];\n tsconfigJson.compilerOptions.lib.push(\"esnext\");\n }\n\n // if (tsconfig.options.module !== ts.ModuleKind.ESNext) {\n // tsconfigJson.compilerOptions.module = \"ESNext\";\n // }\n\n // if (\n // !tsconfig.options.target ||\n // ![\n // ts.ScriptTarget.ESNext,\n // ts.ScriptTarget.ES2024,\n // ts.ScriptTarget.ES2023,\n // ts.ScriptTarget.ES2022,\n // ts.ScriptTarget.ES2021\n // ].includes(tsconfig.options.target)\n // ) {\n // tsconfigJson.compilerOptions.target = \"ESNext\";\n // }\n\n // if (tsconfig.options.moduleResolution !== ts.ModuleResolutionKind.Bundler) {\n // tsconfigJson.compilerOptions.moduleResolution = \"Bundler\";\n // }\n\n // if (tsconfig.options.moduleDetection !== ts.ModuleDetectionKind.Force) {\n // tsconfigJson.compilerOptions.moduleDetection = \"force\";\n // }\n\n // if (tsconfig.options.allowSyntheticDefaultImports !== true) {\n // tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;\n // }\n\n // if (tsconfig.options.noImplicitOverride !== true) {\n // tsconfigJson.compilerOptions.noImplicitOverride = true;\n // }\n\n // if (tsconfig.options.noUncheckedIndexedAccess !== true) {\n // tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;\n // }\n\n // if (tsconfig.options.skipLibCheck !== true) {\n // tsconfigJson.compilerOptions.skipLibCheck = true;\n // }\n\n // if (tsconfig.options.resolveJsonModule !== true) {\n // tsconfigJson.compilerOptions.resolveJsonModule = true;\n // }\n\n // if (tsconfig.options.verbatimModuleSyntax !== false) {\n // tsconfigJson.compilerOptions.verbatimModuleSyntax = false;\n // }\n\n // if (tsconfig.options.allowJs !== true) {\n // tsconfigJson.compilerOptions.allowJs = true;\n // }\n\n // if (tsconfig.options.declaration !== true) {\n // tsconfigJson.compilerOptions.declaration = true;\n // }\n\n if (tsconfig.options.esModuleInterop !== true) {\n tsconfigJson.compilerOptions.esModuleInterop = true;\n }\n\n if (tsconfig.options.isolatedModules !== true) {\n tsconfigJson.compilerOptions.isolatedModules = true;\n }\n\n if (context.config.platform === \"node\") {\n if (\n !tsconfig.options.types?.some(\n type =>\n type.toLowerCase() === \"node\" || type.toLowerCase() === \"@types/node\"\n )\n ) {\n tsconfigJson.compilerOptions.types ??= [];\n tsconfigJson.compilerOptions.types.push(\"node\");\n }\n }\n\n return tsconfigJson;\n}\n\nexport async function initializeTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n context.debug(\n \"Initializing TypeScript configuration (tsconfig.json) for the Powerlines project.\"\n );\n\n if (!isPackageExists(\"typescript\")) {\n throw new Error(\n 'The TypeScript package is not installed. Please install the package using the command: \"npm install typescript --save-dev\"'\n );\n }\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n context.tsconfig.originalTsconfigJson =\n await readJsonFile<TsConfigJson>(tsconfigFilePath);\n\n context.tsconfig.tsconfigJson = await resolveTsconfigChanges<\n TResolvedConfig,\n TSystemContext\n >(context);\n\n context.debug(\n \"Writing updated TypeScript configuration (tsconfig.json) file to disk.\"\n );\n\n await context.fs.write(\n tsconfigFilePath,\n StormJSON.stringify(context.tsconfig.tsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw,\n context.tsconfig.originalTsconfigJson\n );\n}\n\nexport async function resolveTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n const updateTsconfigJson = await readJsonFile<TsConfigJson>(\n context.tsconfig.tsconfigFilePath\n );\n if (\n updateTsconfigJson?.compilerOptions?.types &&\n Array.isArray(updateTsconfigJson.compilerOptions.types) &&\n !updateTsconfigJson.compilerOptions.types.length\n ) {\n // If the types array is empty, we can safely remove it\n delete updateTsconfigJson.compilerOptions.types;\n }\n\n const result = getObjectDiff(\n context.tsconfig.originalTsconfigJson as NonNullable<ObjectData>,\n updateTsconfigJson as ObjectData,\n {\n ignoreArrayOrder: true,\n showOnly: {\n statuses: [\"added\", \"deleted\", \"updated\"],\n granularity: \"deep\"\n }\n }\n );\n\n const changes = [] as {\n field: string;\n status: \"added\" | \"deleted\" | \"updated\";\n previous: string;\n current: string;\n }[];\n const getChanges = (difference: Diff, property?: string) => {\n if (\n difference.status === \"added\" ||\n difference.status === \"deleted\" ||\n difference.status === \"updated\"\n ) {\n if (difference.diff) {\n for (const diff of difference.diff) {\n getChanges(\n diff,\n property\n ? `${property}.${difference.property}`\n : difference.property\n );\n }\n } else {\n changes.push({\n field: property\n ? `${property}.${difference.property}`\n : difference.property,\n status: difference.status,\n previous:\n difference.status === \"added\"\n ? \"---\"\n : StormJSON.stringify(difference.previousValue),\n current:\n difference.status === \"deleted\"\n ? \"---\"\n : StormJSON.stringify(difference.currentValue)\n });\n }\n }\n };\n\n for (const diff of result.diff) {\n getChanges(diff);\n }\n\n if (changes.length > 0) {\n context.warn(\n `Updating the following configuration values in \"${context.tsconfig.tsconfigFilePath}\" file:\n\n ${changes\n .map(\n (change, i) => `${chalk.bold.whiteBright(\n `${i + 1}. ${titleCase(change.status)} the ${change.field} field: `\n )}\n ${chalk.red(` - Previous: ${change.previous} `)}\n ${chalk.green(` - Updated: ${change.current} `)}\n `\n )\n .join(\"\\n\")}\n `\n );\n }\n\n await context.fs.write(\n context.tsconfig.tsconfigFilePath,\n StormJSON.stringify(updateTsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n if (!context.tsconfig) {\n throw new Error(\"Failed to parse the TypeScript configuration file.\");\n }\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, tsconfig);\n } else {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.app.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.lib.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.json\");\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n root\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, root);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, appendPath(root, cwd));\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,SAAgB,mBAGd,SAAsE;CAStE,OARwB,UACtB,aACE,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,IAAI,GACjD,aAAa,QAAQ,SAAS,CAChC,GACA,aAAa,QAAQ,SAAS,CAGX;AACvB;AAEA,eAAe,uBAIb,SACuB;CACvB,MAAM,WAAW,0BACf,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,UACf,QAAQ,OAAO,WACjB;CAQA,MAAM,eAAe,MAAM,aANF,oBACvB,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,QAGoD,CAAC;CACtE,aAAa,oBAAoB,CAAC;CAElC,IAAI,QAAQ,OAAO,OAAO,QAAQ,OAAO;EACvC,MAAM,kBAAkB,mBAAmB,OAAO;EAElD,IACE,CAAC,aAAa,SAAS,MAAK,gBAC1B,oBAAoB,aAAa,CAAC,QAAQ,WAAW,eAAe,CAAC,CACvE,GACA;GACA,aAAa,YAAY,CAAC;GAC1B,aAAa,QAAQ,KACnB,gBAAgB,WAAW,IAAI,IAC3B,gBAAgB,MAAM,CAAC,IACvB,eACN;EACF;CACF;CAEA,IACE,CAAC,SAAS,QAAQ,KAAK,MAAK,QAC1B;EACE;EACA;EACA;EACA;CACF,EAAE,SAAS,IAAI,YAAY,CAAC,CAC9B,GACA;EACA,aAAa,gBAAgB,QAAQ,CAAC;EACtC,aAAa,gBAAgB,IAAI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AC3B,KAAK,cAAc,SAAS,EAAE,YAAY,IAAI,KACpD,CACJ;AACF;;;;;;;;AASA,SAAgB,iBACd,cACA,OACoC;CACpC,OAAO,UAAU,cAAc,OAAO;EACpC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH;;;;;;;;AASA,SAAgB,aACd,cACA,OACS;CACT,OAAO,UAAU,cAAc,KAAK,MAAM;AAC5C;;;;;;;;AASA,SAAgB,oBACd,cACA,OACS;CACT,OACE,iBACE,cACA,KACF,MAAM;AAEV;;;;;;;;;;;;AAaA,SAAgB,0BACd,eACA,aACA,UACA,cAAwB,CAAC,GACzB,sBACA,OAA2B,GAAG,KACN;CACxB,MAAM,mBAAmB,oBACvB,eACA,aACA,QACF;CACA,MAAM,eAAe,iBAA2B,gBAAgB;CAChE,IAAI,CAAC,cACH,MAAM,IAAI,MACR,2DAA2D,UACzD,aACA,YAAY,eACd,GACF;CAGF,MAAM,oBAAoB,GAAG,2BAC3B,KAAK,eAAe,CAAC,GAAG,YAAY,GACpC,MACA,WAAW,aAAa,aAAa,CACvC;CACA,IAAI,kBAAkB,OAAO,SAAS,GAAG;EACvC,MAAM,eAAe;EACvB,kBAAkB,OACjB,KACC,UACE,MACG,MAAM,aAAa,UAAa,MAAM,OACnC,IAAI,MAAM,SAAS,GAAG,MAAM,KAAK,OACjC,MAAM,MAAM,YAAY,SAAS,GAE3C,EACC,KAAK,IAAI,EAAE;;EAGV,MAAM,IAAI,MAAM,YAAY;CAC9B;CAEA,OAAO;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;CACF;AACF"}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import __tsdown_shims_path from 'node:path'
|
|
4
|
-
import __tsdown_shims_url from 'node:url'
|
|
5
|
-
|
|
6
|
-
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
-
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
-
|
|
9
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
11
2
|
const require_constants_plugin = require('../../constants/plugin.cjs');
|
|
12
3
|
let defu = require("defu");
|
|
13
4
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
14
5
|
|
|
15
6
|
//#region src/lib/unplugin/helpers.ts
|
|
16
|
-
var helpers_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
17
|
-
combineContexts: () => combineContexts,
|
|
18
|
-
isUnpluginBuilderVariant: () => isUnpluginBuilderVariant
|
|
19
|
-
});
|
|
20
7
|
/**
|
|
21
8
|
* Merges a base plugin context with an unplugin context, combining their properties.
|
|
22
9
|
*
|
|
@@ -39,10 +26,4 @@ function isUnpluginBuilderVariant(str) {
|
|
|
39
26
|
|
|
40
27
|
//#endregion
|
|
41
28
|
exports.combineContexts = combineContexts;
|
|
42
|
-
Object.defineProperty(exports, 'helpers_exports', {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return helpers_exports;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
29
|
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { UnpluginBuildContext } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/unplugin/helpers.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Merges a base plugin context with an unplugin context, combining their properties.
|
|
8
|
-
*
|
|
9
|
-
* @param contextA - The base plugin context to merge into.
|
|
10
|
-
* @param contextB - The unplugin context to merge from.
|
|
11
|
-
* @returns The merged context.
|
|
12
|
-
*/
|
|
13
|
-
declare function combineContexts<TContextA extends UnresolvedContext | UnpluginBuildContext, TContextB extends UnresolvedContext | UnpluginBuildContext>(contextA: TContextA, contextB: TContextB): TContextA & TContextB;
|
|
14
|
-
/**
|
|
15
|
-
* Checks if a value is a valid UnpluginBuilderVariant.
|
|
16
|
-
*
|
|
17
|
-
* @param str - The value to check.
|
|
18
|
-
* @returns True if the value is a UnpluginBuilderVariant, false otherwise.
|
|
19
|
-
*/
|
|
20
|
-
declare function isUnpluginBuilderVariant(str: unknown): str is UnpluginBuilderVariant;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { combineContexts, isUnpluginBuilderVariant };
|
|
23
|
-
//# sourceMappingURL=helpers.d.cts.map
|
|
1
|
+
import { n as isUnpluginBuilderVariant, t as combineContexts } from "../../helpers-DBLIQW3U.cjs";
|
|
2
|
+
export { combineContexts, isUnpluginBuilderVariant };
|