@powerlines/core 0.48.27 → 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 -9
- 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 +2 -10
- package/dist/context/base-context.d.cts +2 -81
- package/dist/context/base-context.d.mts +2 -83
- package/dist/context/base-context.mjs +0 -8
- package/dist/context/base-context.mjs.map +1 -1
- package/dist/context/context.cjs +2 -10
- package/dist/context/context.d.cts +2 -373
- package/dist/context/context.d.mts +2 -375
- package/dist/context/context.mjs +0 -8
- package/dist/context/context.mjs.map +1 -1
- package/dist/context/environment-context.cjs +0 -8
- 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 +0 -8
- package/dist/context/environment-context.mjs.map +1 -1
- package/dist/context/execution-context.cjs +2 -10
- 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 +0 -8
- 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 +0 -8
- 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 +0 -8
- 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-BKZ67WMa.d.cts +1 -0
- package/dist/index-BKZ67WMa.d.mts +1 -0
- package/dist/index-BVVgDSdq.d.cts +1 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/index-Den-MsLx.d.cts +1 -0
- package/dist/index-Den-MsLx.d.mts +1 -0
- package/dist/index-DmtQKWjk.d.cts +1 -0
- package/dist/index-DmtQKWjk.d.mts +1 -0
- package/dist/index-LtpXjuJR.d.mts +25 -0
- package/dist/index-LtpXjuJR.d.mts.map +1 -0
- package/dist/index-_6s0AX1B.d.cts +1 -0
- package/dist/index-_6s0AX1B.d.mts +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 -10
- package/dist/lib/config.d.cts +2 -140
- package/dist/lib/config.d.mts +2 -142
- package/dist/lib/config.mjs +0 -8
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +0 -8
- package/dist/lib/context-helpers.d.cts +2 -16
- package/dist/lib/context-helpers.d.mts +2 -18
- package/dist/lib/context-helpers.mjs +0 -8
- package/dist/lib/context-helpers.mjs.map +1 -1
- package/dist/lib/entry.cjs +0 -8
- package/dist/lib/entry.d.cts +2 -47
- package/dist/lib/entry.d.mts +2 -49
- package/dist/lib/entry.mjs +0 -8
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +2 -10
- 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 +0 -8
- package/dist/lib/environment.mjs.map +1 -1
- package/dist/lib/events.cjs +0 -8
- package/dist/lib/events.d.cts +2 -10
- package/dist/lib/events.d.mts +2 -12
- package/dist/lib/events.mjs +0 -8
- package/dist/lib/events.mjs.map +1 -1
- package/dist/lib/generate-types.cjs +0 -8
- package/dist/lib/generate-types.d.cts +2 -66
- package/dist/lib/generate-types.d.mts +2 -68
- package/dist/lib/generate-types.mjs +0 -8
- package/dist/lib/generate-types.mjs.map +1 -1
- package/dist/lib/hooks.cjs +2 -10
- package/dist/lib/hooks.d.cts +2 -28
- package/dist/lib/hooks.d.mts +2 -30
- package/dist/lib/hooks.mjs +0 -8
- 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 +0 -8
- package/dist/lib/install-dependencies.d.cts +2 -12
- package/dist/lib/install-dependencies.d.mts +2 -14
- package/dist/lib/install-dependencies.mjs +0 -8
- 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 -10
- package/dist/lib/plugins.d.cts +2 -39
- package/dist/lib/plugins.d.mts +2 -41
- package/dist/lib/plugins.mjs +0 -8
- package/dist/lib/plugins.mjs.map +1 -1
- package/dist/lib/resolver.cjs +2 -10
- package/dist/lib/resolver.d.cts +2 -20
- package/dist/lib/resolver.d.mts +2 -22
- package/dist/lib/resolver.mjs +0 -8
- 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 +0 -8
- package/dist/lib/streaming-channel.d.cts +2 -126
- package/dist/lib/streaming-channel.d.mts +2 -128
- package/dist/lib/streaming-channel.mjs +0 -8
- 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 +2 -10
- 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 +0 -8
- package/dist/lib/typescript/ts-morph.mjs.map +1 -1
- package/dist/lib/typescript/tsconfig.cjs +4 -12
- package/dist/lib/typescript/tsconfig.d.cts +2 -77
- package/dist/lib/typescript/tsconfig.d.mts +2 -79
- package/dist/lib/typescript/tsconfig.mjs +0 -8
- package/dist/lib/typescript/tsconfig.mjs.map +1 -1
- package/dist/lib/unplugin/helpers.cjs +0 -8
- package/dist/lib/unplugin/helpers.d.cts +2 -23
- package/dist/lib/unplugin/helpers.d.mts +2 -25
- package/dist/lib/unplugin/helpers.mjs +0 -8
- 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 +2 -10
- 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 +0 -8
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +0 -8
- package/dist/lib/unplugin/plugin.d.cts +2 -40
- package/dist/lib/unplugin/plugin.d.mts +2 -42
- package/dist/lib/unplugin/plugin.mjs +0 -8
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +0 -8
- 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 +0 -8
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +2 -10
- package/dist/lib/utilities/format.d.cts +2 -24
- package/dist/lib/utilities/format.d.mts +2 -26
- package/dist/lib/utilities/format.mjs +0 -8
- 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 +2 -10
- 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 +0 -8
- package/dist/lib/utilities/source-file.mjs.map +1 -1
- package/dist/lib/utilities/source-map.cjs +2 -10
- 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 +0 -8
- package/dist/lib/utilities/source-map.mjs.map +1 -1
- package/dist/lib/utilities/write-file.cjs +0 -8
- 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 +0 -8
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +3 -11
- package/dist/lib/vfs.d.cts +2 -321
- package/dist/lib/vfs.d.mts +2 -323
- package/dist/lib/vfs.mjs +1 -9
- 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 +0 -8
- 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 +0 -8
- 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 -8
- 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 +0 -8
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/combine-plugins.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/docs-helper.mjs.map +1 -1
- package/dist/plugin-utils/enable-plugin.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
- package/dist/plugin-utils/extend.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +2 -10
- 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 +0 -8
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/format.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.cjs +0 -8
- 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 +0 -8
- 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 +0 -8
- 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 +0 -8
- package/dist/plugin-utils/install.mjs.map +1 -1
- package/dist/plugin-utils/logging.cjs +2 -10
- 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 +0 -8
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +2 -10
- 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 +0 -8
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +0 -8
- 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 +0 -8
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +0 -8
- 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 +0 -8
- 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 +0 -8
- 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 +0 -8
- package/dist/storage/base.mjs.map +1 -1
- package/dist/storage/file-system.cjs +0 -8
- 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 +0 -8
- package/dist/storage/file-system.mjs.map +1 -1
- package/dist/storage/helpers.cjs +0 -8
- package/dist/storage/helpers.d.mts +0 -2
- package/dist/storage/helpers.d.mts.map +1 -1
- package/dist/storage/helpers.mjs +0 -8
- 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 +0 -8
- package/dist/storage/virtual.d.cts +1 -1
- package/dist/storage/virtual.d.cts.map +1 -1
- package/dist/storage/virtual.d.mts +1 -3
- package/dist/storage/virtual.d.mts.map +1 -1
- package/dist/storage/virtual.mjs +0 -8
- 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 +17 -17
- package/dist/constants/api.d.cts.map +0 -1
- package/dist/constants/api.d.mts.map +0 -1
- package/dist/constants/commands.d.cts.map +0 -1
- package/dist/constants/commands.d.mts.map +0 -1
- package/dist/constants/devtools.d.cts.map +0 -1
- package/dist/constants/devtools.d.mts.map +0 -1
- package/dist/constants/environments.d.cts.map +0 -1
- package/dist/constants/environments.d.mts.map +0 -1
- package/dist/constants/extensions.d.cts.map +0 -1
- package/dist/constants/extensions.d.mts.map +0 -1
- package/dist/constants/fs.d.cts.map +0 -1
- package/dist/constants/fs.d.mts.map +0 -1
- package/dist/constants/hooks.d.cts.map +0 -1
- package/dist/constants/hooks.d.mts.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/meta.d.cts.map +0 -1
- package/dist/constants/meta.d.mts.map +0 -1
- package/dist/constants/plugin.d.cts.map +0 -1
- package/dist/constants/plugin.d.mts.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/context.d.cts.map +0 -1
- package/dist/context/context.d.mts.map +0 -1
- package/dist/lib/config.d.cts.map +0 -1
- package/dist/lib/config.d.mts.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/entry.d.cts.map +0 -1
- package/dist/lib/entry.d.mts.map +0 -1
- package/dist/lib/events.d.cts.map +0 -1
- package/dist/lib/events.d.mts.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/hooks.d.cts.map +0 -1
- package/dist/lib/hooks.d.mts.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/meta.d.cts.map +0 -1
- package/dist/lib/meta.d.mts.map +0 -1
- package/dist/lib/plugins.d.cts.map +0 -1
- package/dist/lib/plugins.d.mts.map +0 -1
- package/dist/lib/resolver.d.cts.map +0 -1
- package/dist/lib/resolver.d.mts.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/typescript/ts-morph.d.cts.map +0 -1
- package/dist/lib/typescript/ts-morph.d.mts.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/unplugin/helpers.d.cts.map +0 -1
- package/dist/lib/unplugin/helpers.d.mts.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/plugin.d.cts.map +0 -1
- package/dist/lib/unplugin/plugin.d.mts.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/format.d.cts.map +0 -1
- package/dist/lib/utilities/format.d.mts.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-map.d.cts.map +0 -1
- package/dist/lib/utilities/source-map.d.mts.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/vfs.d.cts.map +0 -1
- package/dist/lib/vfs.d.mts.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/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
|
@@ -1,11 +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
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
2
|
const require_plugin_utils_virtual = require('../../plugin-utils/virtual.cjs');
|
|
11
3
|
require('../../plugin-utils/index.cjs');
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { CreateUnpluginModuleResolutionFunctionsOptions } from "./module-resolution.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/unplugin/plugin.d.ts
|
|
6
|
-
interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {
|
|
7
|
-
/**
|
|
8
|
-
* A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* If not provided, the plugin will be named "powerlines". If provided, the plugin will be named `${name} - Powerlines` (e.g., "MyPlugin - Powerlines").
|
|
12
|
-
*
|
|
13
|
-
* @defaultValue "powerlines"
|
|
14
|
-
*/
|
|
15
|
-
name?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to silence logging for the plugin hooks. This can be useful for plugins that run frequently or have hooks that are called often, to reduce noise in the logs. When set to `true`, the plugin will not log any messages for its hooks. When set to `false` (the default), the plugin will log messages for its hooks as normal.
|
|
18
|
-
*
|
|
19
|
-
* @defaultValue false
|
|
20
|
-
*/
|
|
21
|
-
silenceHookLogging?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a Powerlines unplugin instance.
|
|
25
|
-
*
|
|
26
|
-
* @param context - The plugin context.
|
|
27
|
-
* @returns The unplugin instance.
|
|
28
|
-
*/
|
|
29
|
-
declare function createUnpluginResolver<TContext extends UnresolvedContext>(context: TContext, options?: CreateUnpluginResolverOptions): () => UnpluginOptions<TContext>;
|
|
30
|
-
interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}
|
|
31
|
-
/**
|
|
32
|
-
* Creates a Powerlines unplugin instance.
|
|
33
|
-
*
|
|
34
|
-
* @param context - The plugin context.
|
|
35
|
-
* @returns The unplugin instance.
|
|
36
|
-
*/
|
|
37
|
-
declare function createUnplugin<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginOptions): () => UnpluginOptions<TContext>;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { CreateUnpluginOptions, CreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver };
|
|
40
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
1
|
+
import { i as createUnpluginResolver, n as CreateUnpluginResolverOptions, r as createUnplugin, t as CreateUnpluginOptions } from "../../plugin-CzV-aFwU.cjs";
|
|
2
|
+
export { CreateUnpluginOptions, CreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver };
|
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { UnpluginOptions } from "../../types/unplugin.mjs";
|
|
4
|
-
import { PluginContext, UnresolvedContext } from "../../types/context.mjs";
|
|
5
|
-
import { CreateUnpluginModuleResolutionFunctionsOptions } from "./module-resolution.mjs";
|
|
6
|
-
|
|
7
|
-
//#region src/lib/unplugin/plugin.d.ts
|
|
8
|
-
interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {
|
|
9
|
-
/**
|
|
10
|
-
* A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* If not provided, the plugin will be named "powerlines". If provided, the plugin will be named `${name} - Powerlines` (e.g., "MyPlugin - Powerlines").
|
|
14
|
-
*
|
|
15
|
-
* @defaultValue "powerlines"
|
|
16
|
-
*/
|
|
17
|
-
name?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Whether to silence logging for the plugin hooks. This can be useful for plugins that run frequently or have hooks that are called often, to reduce noise in the logs. When set to `true`, the plugin will not log any messages for its hooks. When set to `false` (the default), the plugin will log messages for its hooks as normal.
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue false
|
|
22
|
-
*/
|
|
23
|
-
silenceHookLogging?: boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Creates a Powerlines unplugin instance.
|
|
27
|
-
*
|
|
28
|
-
* @param context - The plugin context.
|
|
29
|
-
* @returns The unplugin instance.
|
|
30
|
-
*/
|
|
31
|
-
declare function createUnpluginResolver<TContext extends UnresolvedContext>(context: TContext, options?: CreateUnpluginResolverOptions): () => UnpluginOptions<TContext>;
|
|
32
|
-
interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}
|
|
33
|
-
/**
|
|
34
|
-
* Creates a Powerlines unplugin instance.
|
|
35
|
-
*
|
|
36
|
-
* @param context - The plugin context.
|
|
37
|
-
* @returns The unplugin instance.
|
|
38
|
-
*/
|
|
39
|
-
declare function createUnplugin<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginOptions): () => UnpluginOptions<TContext>;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { CreateUnpluginOptions, CreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver };
|
|
42
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
1
|
+
import { i as createUnpluginResolver, n as CreateUnpluginResolverOptions, r as createUnplugin, t as CreateUnpluginOptions } from "../../plugin-B_b7XqaN.mjs";
|
|
2
|
+
export { CreateUnpluginOptions, CreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver };
|
|
@@ -1,11 +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
1
|
import { removeVirtualPrefix } from "../../plugin-utils/virtual.mjs";
|
|
10
2
|
import "../../plugin-utils/index.mjs";
|
|
11
3
|
import { combineContexts } from "./helpers.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../../src/lib/unplugin/plugin.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 { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport type {\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { removeVirtualPrefix } from \"../../plugin-utils\";\nimport type { PluginContext, UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginOptions } from \"../../types/unplugin\";\nimport { getString } from \"../utilities/source-file\";\nimport { combineContexts } from \"./helpers\";\nimport {\n createUnpluginModuleResolutionFunctions,\n CreateUnpluginModuleResolutionFunctionsOptions\n} from \"./module-resolution\";\n\nexport interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.\n *\n * @remarks\n * If not provided, the plugin will be named \"powerlines\". If provided, the plugin will be named `${name} - Powerlines` (e.g., \"MyPlugin - Powerlines\").\n *\n * @defaultValue \"powerlines\"\n */\n name?: string;\n\n /**\n * Whether to silence logging for the plugin hooks. This can be useful for plugins that run frequently or have hooks that are called often, to reduce noise in the logs. When set to `true`, the plugin will not log any messages for its hooks. When set to `false` (the default), the plugin will log messages for its hooks as normal.\n *\n * @defaultValue false\n */\n silenceHookLogging?: boolean;\n}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnpluginResolver<TContext extends UnresolvedContext>(\n context: TContext,\n options: CreateUnpluginResolverOptions = {}\n): () => UnpluginOptions<TContext> {\n setParseImpl(context.parse);\n\n const name = options.name || \"powerlines\";\n\n const logger = context.extendLogger(\n !options.silenceHookLogging && name !== \"powerlines\" ? { source: name } : {}\n );\n logger.debug(`Initializing ${titleCase(name)} plugin`);\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n return () => ({\n name:\n name.toLowerCase() === \"powerlines\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n context,\n resolveId,\n load\n });\n } catch (error) {\n logger.error(error instanceof Error ? error.message : String(error));\n\n throw error;\n }\n}\n\nexport interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnplugin<TContext extends PluginContext = PluginContext>(\n context: TContext,\n options: CreateUnpluginOptions = {}\n): () => UnpluginOptions<TContext> {\n setParseImpl(context.parse.bind(context));\n\n const name = options.name || \"powerlines\";\n\n const logger = context.extendLogger(\n !options.silenceHookLogging && name !== \"powerlines\" ? { source: name } : {}\n );\n logger.debug(`Initializing ${titleCase(name)} plugin`);\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n async function buildStart(this: UnpluginBuildContext) {\n if (!options.silenceHookLogging) {\n logger.debug(\"Powerlines build plugin starting...\");\n }\n\n await context.callHook(\"buildStart\", {\n sequential: true\n });\n }\n\n async function transform(\n this: UnpluginBuildContext & UnpluginContext,\n code: string,\n id: string\n ): Promise<TransformResult | null | undefined> {\n let transformed: TransformResult | string = code;\n\n for (const hook of context.environment.selectHooks(\"transform\")) {\n const result: TransformResult | string | undefined =\n await hook.handler.apply(combineContexts(context, this), [\n getString(transformed),\n removeVirtualPrefix(id)\n ] as [code: string, id: string]);\n if (result) {\n transformed = result;\n }\n }\n\n return transformed;\n }\n\n async function buildEnd(this: UnpluginBuildContext): Promise<void> {\n if (!options.silenceHookLogging) {\n logger.debug(\"Powerlines build plugin finishing...\");\n }\n\n return context.callHook(\"buildEnd\", {\n sequential: true\n });\n }\n\n async function writeBundle(): Promise<void> {\n if (!options.silenceHookLogging) {\n logger.debug(\"Finalizing Powerlines project output...\");\n }\n\n return context.callHook(\"writeBundle\", {\n sequential: true\n });\n }\n\n return () => ({\n name:\n name.toLowerCase() === \"powerlines\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n context,\n resolveId,\n load,\n transform,\n buildStart,\n buildEnd,\n writeBundle,\n vite: {\n sharedDuringBuild: true\n }\n });\n } catch (error) {\n logger.error(error instanceof Error ? error.message : String(error));\n\n throw error;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../../src/lib/unplugin/plugin.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 { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport type {\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { removeVirtualPrefix } from \"../../plugin-utils\";\nimport type { PluginContext, UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginOptions } from \"../../types/unplugin\";\nimport { getString } from \"../utilities/source-file\";\nimport { combineContexts } from \"./helpers\";\nimport {\n createUnpluginModuleResolutionFunctions,\n CreateUnpluginModuleResolutionFunctionsOptions\n} from \"./module-resolution\";\n\nexport interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.\n *\n * @remarks\n * If not provided, the plugin will be named \"powerlines\". If provided, the plugin will be named `${name} - Powerlines` (e.g., \"MyPlugin - Powerlines\").\n *\n * @defaultValue \"powerlines\"\n */\n name?: string;\n\n /**\n * Whether to silence logging for the plugin hooks. This can be useful for plugins that run frequently or have hooks that are called often, to reduce noise in the logs. When set to `true`, the plugin will not log any messages for its hooks. When set to `false` (the default), the plugin will log messages for its hooks as normal.\n *\n * @defaultValue false\n */\n silenceHookLogging?: boolean;\n}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnpluginResolver<TContext extends UnresolvedContext>(\n context: TContext,\n options: CreateUnpluginResolverOptions = {}\n): () => UnpluginOptions<TContext> {\n setParseImpl(context.parse);\n\n const name = options.name || \"powerlines\";\n\n const logger = context.extendLogger(\n !options.silenceHookLogging && name !== \"powerlines\" ? { source: name } : {}\n );\n logger.debug(`Initializing ${titleCase(name)} plugin`);\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n return () => ({\n name:\n name.toLowerCase() === \"powerlines\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n context,\n resolveId,\n load\n });\n } catch (error) {\n logger.error(error instanceof Error ? error.message : String(error));\n\n throw error;\n }\n}\n\nexport interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnplugin<TContext extends PluginContext = PluginContext>(\n context: TContext,\n options: CreateUnpluginOptions = {}\n): () => UnpluginOptions<TContext> {\n setParseImpl(context.parse.bind(context));\n\n const name = options.name || \"powerlines\";\n\n const logger = context.extendLogger(\n !options.silenceHookLogging && name !== \"powerlines\" ? { source: name } : {}\n );\n logger.debug(`Initializing ${titleCase(name)} plugin`);\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n async function buildStart(this: UnpluginBuildContext) {\n if (!options.silenceHookLogging) {\n logger.debug(\"Powerlines build plugin starting...\");\n }\n\n await context.callHook(\"buildStart\", {\n sequential: true\n });\n }\n\n async function transform(\n this: UnpluginBuildContext & UnpluginContext,\n code: string,\n id: string\n ): Promise<TransformResult | null | undefined> {\n let transformed: TransformResult | string = code;\n\n for (const hook of context.environment.selectHooks(\"transform\")) {\n const result: TransformResult | string | undefined =\n await hook.handler.apply(combineContexts(context, this), [\n getString(transformed),\n removeVirtualPrefix(id)\n ] as [code: string, id: string]);\n if (result) {\n transformed = result;\n }\n }\n\n return transformed;\n }\n\n async function buildEnd(this: UnpluginBuildContext): Promise<void> {\n if (!options.silenceHookLogging) {\n logger.debug(\"Powerlines build plugin finishing...\");\n }\n\n return context.callHook(\"buildEnd\", {\n sequential: true\n });\n }\n\n async function writeBundle(): Promise<void> {\n if (!options.silenceHookLogging) {\n logger.debug(\"Finalizing Powerlines project output...\");\n }\n\n return context.callHook(\"writeBundle\", {\n sequential: true\n });\n }\n\n return () => ({\n name:\n name.toLowerCase() === \"powerlines\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n context,\n resolveId,\n load,\n transform,\n buildStart,\n buildEnd,\n writeBundle,\n vite: {\n sharedDuringBuild: true\n }\n });\n } catch (error) {\n logger.error(error instanceof Error ? error.message : String(error));\n\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6DA,SAAgB,uBACd,SACA,UAAyC,CAAC,GACT;CACjC,aAAa,QAAQ,KAAK;CAE1B,MAAM,OAAO,QAAQ,QAAQ;CAE7B,MAAM,SAAS,QAAQ,aACrB,CAAC,QAAQ,sBAAsB,SAAS,eAAe,EAAE,QAAQ,KAAK,IAAI,CAAC,CAC7E;CACA,OAAO,MAAM,gBAAgB,UAAU,IAAI,EAAE,QAAQ;CAErD,IAAI;EACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,OAAO;EAEpE,cAAc;GACZ,MACE,KAAK,YAAY,MAAM,eACnB,eACA,cAAc,UAAU,IAAI;GAClC;GACA;GACA;EACF;CACF,SAAS,OAAO;EACd,OAAO,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;EAEnE,MAAM;CACR;AACF;;;;;;;AAUA,SAAgB,eACd,SACA,UAAiC,CAAC,GACD;CACjC,aAAa,QAAQ,MAAM,KAAK,OAAO,CAAC;CAExC,MAAM,OAAO,QAAQ,QAAQ;CAE7B,MAAM,SAAS,QAAQ,aACrB,CAAC,QAAQ,sBAAsB,SAAS,eAAe,EAAE,QAAQ,KAAK,IAAI,CAAC,CAC7E;CACA,OAAO,MAAM,gBAAgB,UAAU,IAAI,EAAE,QAAQ;CAErD,IAAI;EACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,OAAO;EAEpE,eAAe,aAAuC;GACpD,IAAI,CAAC,QAAQ,oBACX,OAAO,MAAM,qCAAqC;GAGpD,MAAM,QAAQ,SAAS,cAAc,EACnC,YAAY,KACd,CAAC;EACH;EAEA,eAAe,UAEb,MACA,IAC6C;GAC7C,IAAI,cAAwC;GAE5C,KAAK,MAAM,QAAQ,QAAQ,YAAY,YAAY,WAAW,GAAG;IAC/D,MAAM,SACJ,MAAM,KAAK,QAAQ,MAAM,gBAAgB,SAAS,IAAI,GAAG,CACvD,UAAU,WAAW,GACrB,oBAAoB,EAAE,CACxB,CAA+B;IACjC,IAAI,QACF,cAAc;GAElB;GAEA,OAAO;EACT;EAEA,eAAe,WAAoD;GACjE,IAAI,CAAC,QAAQ,oBACX,OAAO,MAAM,sCAAsC;GAGrD,OAAO,QAAQ,SAAS,YAAY,EAClC,YAAY,KACd,CAAC;EACH;EAEA,eAAe,cAA6B;GAC1C,IAAI,CAAC,QAAQ,oBACX,OAAO,MAAM,yCAAyC;GAGxD,OAAO,QAAQ,SAAS,eAAe,EACrC,YAAY,KACd,CAAC;EACH;EAEA,cAAc;GACZ,MACE,KAAK,YAAY,MAAM,eACnB,eACA,cAAc,UAAU,IAAI;GAClC;GACA;GACA;GACA;GACA;GACA;GACA;GACA,MAAM,EACJ,mBAAmB,KACrB;EACF;CACF,SAAS,OAAO;EACd,OAAO,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;EAEnE,MAAM;CACR;AACF"}
|
|
@@ -1,11 +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
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
2
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
11
3
|
|
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/lib/utilities/file-header.d.ts
|
|
4
|
-
interface FileHeaderOptions {
|
|
5
|
-
directive?: string | null;
|
|
6
|
-
prettierIgnore?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Generates a file header comment with a warning about automatic overwriting.
|
|
10
|
-
*
|
|
11
|
-
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
12
|
-
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
13
|
-
* @returns A string containing the file header warning message.
|
|
14
|
-
*/
|
|
15
|
-
declare function getFileHeaderWarningText(overwrite?: boolean, framework?: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Generates a file header warning message based on the provided context.
|
|
18
|
-
*
|
|
19
|
-
* @param context - The Powerlines context.
|
|
20
|
-
* @returns A string containing the file header warning message.
|
|
21
|
-
*/
|
|
22
|
-
declare function getFileHeaderWarning(context: Context): string;
|
|
23
|
-
/**
|
|
24
|
-
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
25
|
-
*
|
|
26
|
-
* @param context - The Powerlines context.
|
|
27
|
-
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
28
|
-
* @returns A string containing the file header comment.
|
|
29
|
-
*/
|
|
30
|
-
declare function getFileHeader(context: Context, comment?: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
33
|
-
*
|
|
34
|
-
* @param context - The Powerlines context.
|
|
35
|
-
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
36
|
-
* @returns A string containing the file header comment for a TypeScript file.
|
|
37
|
-
*/
|
|
38
|
-
declare function getTypescriptFileHeader(context: Context, options?: FileHeaderOptions): string;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { FileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
41
|
-
//# sourceMappingURL=file-header.d.cts.map
|
|
1
|
+
import { a as getTypescriptFileHeader, i as getFileHeaderWarningText, n as getFileHeader, r as getFileHeaderWarning, t as FileHeaderOptions } from "../../file-header-Co9oo7aI.cjs";
|
|
2
|
+
export { FileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Context } from "../../types/context.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/utilities/file-header.d.ts
|
|
6
|
-
interface FileHeaderOptions {
|
|
7
|
-
directive?: string | null;
|
|
8
|
-
prettierIgnore?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Generates a file header comment with a warning about automatic overwriting.
|
|
12
|
-
*
|
|
13
|
-
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
14
|
-
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
15
|
-
* @returns A string containing the file header warning message.
|
|
16
|
-
*/
|
|
17
|
-
declare function getFileHeaderWarningText(overwrite?: boolean, framework?: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* Generates a file header warning message based on the provided context.
|
|
20
|
-
*
|
|
21
|
-
* @param context - The Powerlines context.
|
|
22
|
-
* @returns A string containing the file header warning message.
|
|
23
|
-
*/
|
|
24
|
-
declare function getFileHeaderWarning(context: Context): string;
|
|
25
|
-
/**
|
|
26
|
-
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
27
|
-
*
|
|
28
|
-
* @param context - The Powerlines context.
|
|
29
|
-
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
30
|
-
* @returns A string containing the file header comment.
|
|
31
|
-
*/
|
|
32
|
-
declare function getFileHeader(context: Context, comment?: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
35
|
-
*
|
|
36
|
-
* @param context - The Powerlines context.
|
|
37
|
-
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
38
|
-
* @returns A string containing the file header comment for a TypeScript file.
|
|
39
|
-
*/
|
|
40
|
-
declare function getTypescriptFileHeader(context: Context, options?: FileHeaderOptions): string;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { FileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
43
|
-
//# sourceMappingURL=file-header.d.mts.map
|
|
1
|
+
import { a as getTypescriptFileHeader, i as getFileHeaderWarningText, n as getFileHeader, r as getFileHeaderWarning, t as FileHeaderOptions } from "../../file-header-rHqeXgRV.mjs";
|
|
2
|
+
export { FileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
@@ -1,11 +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
1
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
10
2
|
|
|
11
3
|
//#region src/lib/utilities/file-header.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../../src/lib/utilities/file-header.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 { titleCase } from \"@stryke/string-format/title-case\";\nimport { Context } from \"../../types/context\";\n\nexport interface FileHeaderOptions {\n directive?: string | null;\n prettierIgnore?: boolean;\n}\n\n/**\n * Generates a file header comment with a warning about automatic overwriting.\n *\n * @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.\n * @param framework - The name of the framework to include in the warning message. Defaults to \"powerlines\".\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarningText(\n overwrite = true,\n framework = \"powerlines\"\n): string {\n return overwrite !== false\n ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \\`output.overwrite\\` option.`\n : `This file was generated on ${new Date().toLocaleString()} - it will not be overwritten by ${titleCase(framework)} while the \\`output.overwrite\\` option is set to \\`true\\`.`;\n}\n\n/**\n * Generates a file header warning message based on the provided context.\n *\n * @param context - The Powerlines context.\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarning(context: Context): string {\n return getFileHeaderWarningText(\n context.config.output?.overwrite,\n context.config.framework?.name\n );\n}\n\n/**\n * Generates a file header comment for a generated source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.\n * @returns A string containing the file header comment.\n */\nexport function getFileHeader(context: Context, comment = \"//\"): string {\n return `\n${comment} Generated by ${titleCase(context.config.framework?.name) || \"Powerlines\"}\n${comment} ${getFileHeaderWarning(context)}\n`;\n}\n\n/**\n * Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.\n * @returns A string containing the file header comment for a TypeScript file.\n */\nexport function getTypescriptFileHeader(\n context: Context,\n options: FileHeaderOptions = {}\n): string {\n const { directive = null, prettierIgnore = false } = options;\n\n return `/* eslint-disable */\n// biome-ignore lint: disable\n${prettierIgnore ? `// prettier-ignore` : \"\"}${directive ? `\\n\\n${directive}\\n` : \"\\n\"}\n${getFileHeader(context)}\n\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../../src/lib/utilities/file-header.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 { titleCase } from \"@stryke/string-format/title-case\";\nimport { Context } from \"../../types/context\";\n\nexport interface FileHeaderOptions {\n directive?: string | null;\n prettierIgnore?: boolean;\n}\n\n/**\n * Generates a file header comment with a warning about automatic overwriting.\n *\n * @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.\n * @param framework - The name of the framework to include in the warning message. Defaults to \"powerlines\".\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarningText(\n overwrite = true,\n framework = \"powerlines\"\n): string {\n return overwrite !== false\n ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \\`output.overwrite\\` option.`\n : `This file was generated on ${new Date().toLocaleString()} - it will not be overwritten by ${titleCase(framework)} while the \\`output.overwrite\\` option is set to \\`true\\`.`;\n}\n\n/**\n * Generates a file header warning message based on the provided context.\n *\n * @param context - The Powerlines context.\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarning(context: Context): string {\n return getFileHeaderWarningText(\n context.config.output?.overwrite,\n context.config.framework?.name\n );\n}\n\n/**\n * Generates a file header comment for a generated source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.\n * @returns A string containing the file header comment.\n */\nexport function getFileHeader(context: Context, comment = \"//\"): string {\n return `\n${comment} Generated by ${titleCase(context.config.framework?.name) || \"Powerlines\"}\n${comment} ${getFileHeaderWarning(context)}\n`;\n}\n\n/**\n * Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.\n * @returns A string containing the file header comment for a TypeScript file.\n */\nexport function getTypescriptFileHeader(\n context: Context,\n options: FileHeaderOptions = {}\n): string {\n const { directive = null, prettierIgnore = false } = options;\n\n return `/* eslint-disable */\n// biome-ignore lint: disable\n${prettierIgnore ? `// prettier-ignore` : \"\"}${directive ? `\\n\\n${directive}\\n` : \"\\n\"}\n${getFileHeader(context)}\n\n`;\n}\n"],"mappings":";;;;;;;;;;AAiCA,SAAgB,yBACd,YAAY,MACZ,YAAY,cACJ;CACR,OAAO,cAAc,QACjB,0JACA,+CAA8B,IAAI,KAAK,GAAE,eAAe,EAAE,mCAAmC,UAAU,SAAS,EAAE;AACxH;;;;;;;AAQA,SAAgB,qBAAqB,SAA0B;CAC7D,OAAO,yBACL,QAAQ,OAAO,QAAQ,WACvB,QAAQ,OAAO,WAAW,IAC5B;AACF;;;;;;;;AASA,SAAgB,cAAc,SAAkB,UAAU,MAAc;CACtE,OAAO;EACP,QAAQ,gBAAgB,UAAU,QAAQ,OAAO,WAAW,IAAI,KAAK,aAAa;EAClF,QAAQ,GAAG,qBAAqB,OAAO,EAAE;;AAE3C;;;;;;;;AASA,SAAgB,wBACd,SACA,UAA6B,CAAC,GACtB;CACR,MAAM,EAAE,YAAY,MAAM,iBAAiB,UAAU;CAErD,OAAO;;EAEP,iBAAiB,uBAAuB,KAAK,YAAY,OAAO,UAAU,MAAM,KAAK;EACrF,cAAc,OAAO,EAAE;;;AAGzB"}
|
|
@@ -1,13 +1,5 @@
|
|
|
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_path_append = require("@stryke/path/append");
|
|
12
4
|
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
13
5
|
let defu = require("defu");
|
|
@@ -15,7 +7,7 @@ let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
|
15
7
|
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
16
8
|
let prettier = require("prettier");
|
|
17
9
|
let prettier_plugin_organize_imports = require("prettier-plugin-organize-imports");
|
|
18
|
-
prettier_plugin_organize_imports =
|
|
10
|
+
prettier_plugin_organize_imports = require_chunk.__toESM(prettier_plugin_organize_imports, 1);
|
|
19
11
|
|
|
20
12
|
//#region src/lib/utilities/format.ts
|
|
21
13
|
/**
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/lib/utilities/format.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Formats code using Prettier based on the file path.
|
|
6
|
-
*
|
|
7
|
-
* @param context - The Powerlines context.
|
|
8
|
-
* @param path - The file path to use for resolving Prettier configuration.
|
|
9
|
-
* @param data - The code string to format.
|
|
10
|
-
* @param force - Whether to force formatting even for output/build paths.
|
|
11
|
-
* @returns A promise that resolves to the formatted code string.
|
|
12
|
-
*/
|
|
13
|
-
declare function format(context: Context, path: string, data: string, force?: boolean): Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Formats all files in a folder using Prettier based on their file paths.
|
|
16
|
-
*
|
|
17
|
-
* @param context - The Powerlines context.
|
|
18
|
-
* @param path - The folder path containing files to format.
|
|
19
|
-
* @returns A promise that resolves when all files have been formatted.
|
|
20
|
-
*/
|
|
21
|
-
declare function formatFolder(context: Context, path: string): Promise<void>;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { format, formatFolder };
|
|
24
|
-
//# sourceMappingURL=format.d.cts.map
|
|
1
|
+
import { n as formatFolder, t as format } from "../../format-Cf-cgZ-s.cjs";
|
|
2
|
+
export { format, formatFolder };
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Context } from "../../types/context.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/utilities/format.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Formats code using Prettier based on the file path.
|
|
8
|
-
*
|
|
9
|
-
* @param context - The Powerlines context.
|
|
10
|
-
* @param path - The file path to use for resolving Prettier configuration.
|
|
11
|
-
* @param data - The code string to format.
|
|
12
|
-
* @param force - Whether to force formatting even for output/build paths.
|
|
13
|
-
* @returns A promise that resolves to the formatted code string.
|
|
14
|
-
*/
|
|
15
|
-
declare function format(context: Context, path: string, data: string, force?: boolean): Promise<string>;
|
|
16
|
-
/**
|
|
17
|
-
* Formats all files in a folder using Prettier based on their file paths.
|
|
18
|
-
*
|
|
19
|
-
* @param context - The Powerlines context.
|
|
20
|
-
* @param path - The folder path containing files to format.
|
|
21
|
-
* @returns A promise that resolves when all files have been formatted.
|
|
22
|
-
*/
|
|
23
|
-
declare function formatFolder(context: Context, path: string): Promise<void>;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { format, formatFolder };
|
|
26
|
-
//# sourceMappingURL=format.d.mts.map
|
|
1
|
+
import { n as formatFolder, t as format } from "../../format-IQPqgWIe.mjs";
|
|
2
|
+
export { format, formatFolder };
|
|
@@ -1,11 +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
1
|
import { appendPath } from "@stryke/path/append";
|
|
10
2
|
import { findFileExtension } from "@stryke/path/file-path-fns";
|
|
11
3
|
import { defu as defu$1 } from "defu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.mjs","names":["prettier","defu"],"sources":["../../../src/lib/utilities/format.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { defu } from \"defu\";\nimport { format as prettier, resolveConfig } from \"prettier\";\nimport importsPlugin from \"prettier-plugin-organize-imports\";\nimport { Context } from \"../../types/context\";\n\n/**\n * Formats code using Prettier based on the file path.\n *\n * @param context - The Powerlines context.\n * @param path - The file path to use for resolving Prettier configuration.\n * @param data - The code string to format.\n * @param force - Whether to force formatting even for output/build paths.\n * @returns A promise that resolves to the formatted code string.\n */\nexport async function format(\n context: Context,\n path: string,\n data: string,\n force = false\n): Promise<string> {\n if (\n !force &&\n ((context.config.output.copy &&\n isParentPath(\n path,\n appendPath(context.config.output.copy.path, context.config.cwd)\n )) ||\n isParentPath(\n path,\n appendPath(context.config.output.path, context.config.cwd)\n ))\n ) {\n return data;\n }\n\n let code = data;\n try {\n const resolvedConfig = await resolveConfig(path);\n if (resolvedConfig) {\n code = await prettier(\n data,\n defu(\n {\n absolutePath: path,\n ...resolvedConfig\n },\n findFileExtension(path) === \"ts\" || findFileExtension(path) === \"tsx\"\n ? { plugins: [importsPlugin] }\n : {}\n )\n );\n }\n } catch (error) {\n throw new Error(\n `Failed to format file at ${path} with Prettier: ${\n (error as Error).message\n }`,\n { cause: error }\n );\n }\n\n return code;\n}\n\n/**\n * Formats all files in a folder using Prettier based on their file paths.\n *\n * @param context - The Powerlines context.\n * @param path - The folder path containing files to format.\n * @returns A promise that resolves when all files have been formatted.\n */\nexport async function formatFolder(context: Context, path: string) {\n if (\n !context.config.output.copy ||\n (!isParentPath(\n path,\n appendPath(context.config.output.copy.path, context.config.cwd)\n ) &&\n !isParentPath(\n path,\n appendPath(context.config.output.path, context.config.cwd)\n ))\n ) {\n await Promise.allSettled(\n (await listFiles(path)).map(async file => {\n if (\n (!context.config.output.copy ||\n !isParentPath(\n file,\n appendPath(context.config.output.copy.path, context.config.cwd)\n )) &&\n !isParentPath(\n file,\n appendPath(context.config.output.path, context.config.cwd)\n )\n ) {\n const data = await context.fs.read(file);\n if (data) {\n const formatted = await format(context, file, data);\n\n return context.fs.write(file, formatted);\n }\n }\n })\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.mjs","names":["prettier","defu"],"sources":["../../../src/lib/utilities/format.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { defu } from \"defu\";\nimport { format as prettier, resolveConfig } from \"prettier\";\nimport importsPlugin from \"prettier-plugin-organize-imports\";\nimport { Context } from \"../../types/context\";\n\n/**\n * Formats code using Prettier based on the file path.\n *\n * @param context - The Powerlines context.\n * @param path - The file path to use for resolving Prettier configuration.\n * @param data - The code string to format.\n * @param force - Whether to force formatting even for output/build paths.\n * @returns A promise that resolves to the formatted code string.\n */\nexport async function format(\n context: Context,\n path: string,\n data: string,\n force = false\n): Promise<string> {\n if (\n !force &&\n ((context.config.output.copy &&\n isParentPath(\n path,\n appendPath(context.config.output.copy.path, context.config.cwd)\n )) ||\n isParentPath(\n path,\n appendPath(context.config.output.path, context.config.cwd)\n ))\n ) {\n return data;\n }\n\n let code = data;\n try {\n const resolvedConfig = await resolveConfig(path);\n if (resolvedConfig) {\n code = await prettier(\n data,\n defu(\n {\n absolutePath: path,\n ...resolvedConfig\n },\n findFileExtension(path) === \"ts\" || findFileExtension(path) === \"tsx\"\n ? { plugins: [importsPlugin] }\n : {}\n )\n );\n }\n } catch (error) {\n throw new Error(\n `Failed to format file at ${path} with Prettier: ${\n (error as Error).message\n }`,\n { cause: error }\n );\n }\n\n return code;\n}\n\n/**\n * Formats all files in a folder using Prettier based on their file paths.\n *\n * @param context - The Powerlines context.\n * @param path - The folder path containing files to format.\n * @returns A promise that resolves when all files have been formatted.\n */\nexport async function formatFolder(context: Context, path: string) {\n if (\n !context.config.output.copy ||\n (!isParentPath(\n path,\n appendPath(context.config.output.copy.path, context.config.cwd)\n ) &&\n !isParentPath(\n path,\n appendPath(context.config.output.path, context.config.cwd)\n ))\n ) {\n await Promise.allSettled(\n (await listFiles(path)).map(async file => {\n if (\n (!context.config.output.copy ||\n !isParentPath(\n file,\n appendPath(context.config.output.copy.path, context.config.cwd)\n )) &&\n !isParentPath(\n file,\n appendPath(context.config.output.path, context.config.cwd)\n )\n ) {\n const data = await context.fs.read(file);\n if (data) {\n const formatted = await format(context, file, data);\n\n return context.fs.write(file, formatted);\n }\n }\n })\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,eAAsB,OACpB,SACA,MACA,MACA,QAAQ,OACS;CACjB,IACE,CAAC,UACC,QAAQ,OAAO,OAAO,QACtB,aACE,MACA,WAAW,QAAQ,OAAO,OAAO,KAAK,MAAM,QAAQ,OAAO,GAAG,CAChE,KACA,aACE,MACA,WAAW,QAAQ,OAAO,OAAO,MAAM,QAAQ,OAAO,GAAG,CAC3D,IAEF,OAAO;CAGT,IAAI,OAAO;CACX,IAAI;EACF,MAAM,iBAAiB,MAAM,cAAc,IAAI;EAC/C,IAAI,gBACF,OAAO,MAAMA,SACX,MACAC,OACE;GACE,cAAc;GACd,GAAG;EACL,GACA,kBAAkB,IAAI,MAAM,QAAQ,kBAAkB,IAAI,MAAM,QAC5D,EAAE,SAAS,CAAC,aAAa,EAAE,IAC3B,CAAC,CACP,CACF;CAEJ,SAAS,OAAO;EACd,MAAM,IAAI,MACR,4BAA4B,KAAK,kBAC9B,MAAgB,WAEnB,EAAE,OAAO,MAAM,CACjB;CACF;CAEA,OAAO;AACT;;;;;;;;AASA,eAAsB,aAAa,SAAkB,MAAc;CACjE,IACE,CAAC,QAAQ,OAAO,OAAO,QACtB,CAAC,aACA,MACA,WAAW,QAAQ,OAAO,OAAO,KAAK,MAAM,QAAQ,OAAO,GAAG,CAChE,KACE,CAAC,aACC,MACA,WAAW,QAAQ,OAAO,OAAO,MAAM,QAAQ,OAAO,GAAG,CAC3D,GAEF,MAAM,QAAQ,YACX,MAAM,UAAU,IAAI,GAAG,IAAI,OAAM,SAAQ;EACxC,KACG,CAAC,QAAQ,OAAO,OAAO,QACtB,CAAC,aACC,MACA,WAAW,QAAQ,OAAO,OAAO,KAAK,MAAM,QAAQ,OAAO,GAAG,CAChE,MACF,CAAC,aACC,MACA,WAAW,QAAQ,OAAO,OAAO,MAAM,QAAQ,OAAO,GAAG,CAC3D,GACA;GACA,MAAM,OAAO,MAAM,QAAQ,GAAG,KAAK,IAAI;GACvC,IAAI,MAAM;IACR,MAAM,YAAY,MAAM,OAAO,SAAS,MAAM,IAAI;IAElD,OAAO,QAAQ,GAAG,MAAM,MAAM,SAAS;GACzC;EACF;CACF,CAAC,CACH;AAEJ"}
|
|
@@ -1,11 +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
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
2
|
const require_lib_utilities_format = require('./format.cjs');
|
|
11
3
|
const require_lib_utilities_file_header = require('./file-header.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { generateSourceMap } from "
|
|
5
|
-
import { writeFile } from "
|
|
1
|
+
import { a as getTypescriptFileHeader, i as getFileHeaderWarningText, n as getFileHeader, r as getFileHeaderWarning, t as FileHeaderOptions } from "../../file-header-Co9oo7aI.cjs";
|
|
2
|
+
import { n as formatFolder, t as format } from "../../format-Cf-cgZ-s.cjs";
|
|
3
|
+
import { n as getSourceFile, r as getString, t as getMagicString } from "../../source-file-CuuHaBL5.cjs";
|
|
4
|
+
import { t as generateSourceMap } from "../../source-map-HU4IoICc.cjs";
|
|
5
|
+
import { t as writeFile } from "../../write-file-BVMnXVPo.cjs";
|
|
6
6
|
export { FileHeaderOptions, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, writeFile };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { generateSourceMap } from "./source-map.mjs";
|
|
7
|
-
import { writeFile } from "./write-file.mjs";
|
|
1
|
+
import { a as getTypescriptFileHeader, i as getFileHeaderWarningText, n as getFileHeader, r as getFileHeaderWarning, t as FileHeaderOptions } from "../../file-header-rHqeXgRV.mjs";
|
|
2
|
+
import { n as formatFolder, t as format } from "../../format-IQPqgWIe.mjs";
|
|
3
|
+
import { n as getSourceFile, r as getString, t as getMagicString } from "../../source-file-CLw13fKE.mjs";
|
|
4
|
+
import { t as generateSourceMap } from "../../source-map-Cy0aqSpe.mjs";
|
|
5
|
+
import { t as writeFile } from "../../write-file-CWf9Xxwd.mjs";
|
|
8
6
|
export { FileHeaderOptions, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, writeFile };
|
|
@@ -1,11 +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
1
|
import { format, formatFolder } from "./format.mjs";
|
|
10
2
|
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./file-header.mjs";
|
|
11
3
|
import { getMagicString, getSourceFile, getString } from "./source-file.mjs";
|
|
@@ -1,18 +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 _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
12
4
|
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
13
5
|
let _stryke_fs_read_file = require("@stryke/fs/read-file");
|
|
14
6
|
let magic_string = require("magic-string");
|
|
15
|
-
magic_string =
|
|
7
|
+
magic_string = require_chunk.__toESM(magic_string, 1);
|
|
16
8
|
|
|
17
9
|
//#region src/lib/utilities/source-file.ts
|
|
18
10
|
/**
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { TransformResult } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/utilities/source-file.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Get the string from the source.
|
|
8
|
-
*
|
|
9
|
-
* @param code - The source string or magic string.
|
|
10
|
-
* @returns The source string.
|
|
11
|
-
*/
|
|
12
|
-
declare function getString(code: string | MagicString | TransformResult): string;
|
|
13
|
-
/**
|
|
14
|
-
* Get the magic string.
|
|
15
|
-
*
|
|
16
|
-
* @param code - The source string or magic string.
|
|
17
|
-
* @returns The magic string.
|
|
18
|
-
*/
|
|
19
|
-
declare function getMagicString(code: string | MagicString): MagicString;
|
|
20
|
-
/**
|
|
21
|
-
* Get the source file.
|
|
22
|
-
*
|
|
23
|
-
* @param code - The source code.
|
|
24
|
-
* @param id - The name of the file.
|
|
25
|
-
* @returns The source file.
|
|
26
|
-
*/
|
|
27
|
-
declare function getSourceFile(code: string | MagicString, id: string): SourceFile;
|
|
28
|
-
//#endregion
|
|
29
|
-
export { getMagicString, getSourceFile, getString };
|
|
30
|
-
//# sourceMappingURL=source-file.d.cts.map
|
|
1
|
+
import { n as getSourceFile, r as getString, t as getMagicString } from "../../source-file-CuuHaBL5.cjs";
|
|
2
|
+
export { getMagicString, getSourceFile, getString };
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { SourceFile } from "../../types/context.mjs";
|
|
4
|
-
import { TransformResult } from "unplugin";
|
|
5
|
-
import MagicString from "magic-string";
|
|
6
|
-
|
|
7
|
-
//#region src/lib/utilities/source-file.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Get the string from the source.
|
|
10
|
-
*
|
|
11
|
-
* @param code - The source string or magic string.
|
|
12
|
-
* @returns The source string.
|
|
13
|
-
*/
|
|
14
|
-
declare function getString(code: string | MagicString | TransformResult): string;
|
|
15
|
-
/**
|
|
16
|
-
* Get the magic string.
|
|
17
|
-
*
|
|
18
|
-
* @param code - The source string or magic string.
|
|
19
|
-
* @returns The magic string.
|
|
20
|
-
*/
|
|
21
|
-
declare function getMagicString(code: string | MagicString): MagicString;
|
|
22
|
-
/**
|
|
23
|
-
* Get the source file.
|
|
24
|
-
*
|
|
25
|
-
* @param code - The source code.
|
|
26
|
-
* @param id - The name of the file.
|
|
27
|
-
* @returns The source file.
|
|
28
|
-
*/
|
|
29
|
-
declare function getSourceFile(code: string | MagicString, id: string): SourceFile;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { getMagicString, getSourceFile, getString };
|
|
32
|
-
//# sourceMappingURL=source-file.d.mts.map
|
|
1
|
+
import { n as getSourceFile, r as getString, t as getMagicString } from "../../source-file-CLw13fKE.mjs";
|
|
2
|
+
export { getMagicString, getSourceFile, getString };
|
|
@@ -1,11 +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
1
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
10
2
|
import { isString } from "@stryke/type-checks/is-string";
|
|
11
3
|
import { readFileIfExistingSync } from "@stryke/fs/read-file";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-file.mjs","names":[],"sources":["../../../src/lib/utilities/source-file.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 { readFileIfExistingSync } from \"@stryke/fs/read-file\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport MagicString from \"magic-string\";\nimport { TransformResult } from \"unplugin\";\nimport { SourceFile } from \"../../types/context\";\n\n/**\n * Get the string from the source.\n *\n * @param code - The source string or magic string.\n * @returns The source string.\n */\nexport function getString(\n code: string | MagicString | TransformResult\n): string {\n if (!code) {\n return \"\";\n }\n\n if (isString(code)) {\n return code;\n }\n\n if (isSetObject(code) && \"code\" in code) {\n return code.code;\n }\n\n return code.toString();\n}\n\n/**\n * Get the magic string.\n *\n * @param code - The source string or magic string.\n * @returns The magic string.\n */\nexport function getMagicString(code: string | MagicString): MagicString {\n if (isString(code)) {\n return new MagicString(code);\n }\n\n return code;\n}\n\n/**\n * Get the source file.\n *\n * @param code - The source code.\n * @param id - The name of the file.\n * @returns The source file.\n */\nexport function getSourceFile(\n code: string | MagicString,\n id: string\n): SourceFile {\n const content = code ?? readFileIfExistingSync(id);\n\n return {\n id,\n code: getMagicString(content),\n env: []\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-file.mjs","names":[],"sources":["../../../src/lib/utilities/source-file.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 { readFileIfExistingSync } from \"@stryke/fs/read-file\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport MagicString from \"magic-string\";\nimport { TransformResult } from \"unplugin\";\nimport { SourceFile } from \"../../types/context\";\n\n/**\n * Get the string from the source.\n *\n * @param code - The source string or magic string.\n * @returns The source string.\n */\nexport function getString(\n code: string | MagicString | TransformResult\n): string {\n if (!code) {\n return \"\";\n }\n\n if (isString(code)) {\n return code;\n }\n\n if (isSetObject(code) && \"code\" in code) {\n return code.code;\n }\n\n return code.toString();\n}\n\n/**\n * Get the magic string.\n *\n * @param code - The source string or magic string.\n * @returns The magic string.\n */\nexport function getMagicString(code: string | MagicString): MagicString {\n if (isString(code)) {\n return new MagicString(code);\n }\n\n return code;\n}\n\n/**\n * Get the source file.\n *\n * @param code - The source code.\n * @param id - The name of the file.\n * @returns The source file.\n */\nexport function getSourceFile(\n code: string | MagicString,\n id: string\n): SourceFile {\n const content = code ?? readFileIfExistingSync(id);\n\n return {\n id,\n code: getMagicString(content),\n env: []\n };\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,UACd,MACQ;CACR,IAAI,CAAC,MACH,OAAO;CAGT,IAAI,SAAS,IAAI,GACf,OAAO;CAGT,IAAI,YAAY,IAAI,KAAK,UAAU,MACjC,OAAO,KAAK;CAGd,OAAO,KAAK,SAAS;AACvB;;;;;;;AAQA,SAAgB,eAAe,MAAyC;CACtE,IAAI,SAAS,IAAI,GACf,OAAO,IAAI,YAAY,IAAI;CAG7B,OAAO;AACT;;;;;;;;AASA,SAAgB,cACd,MACA,IACY;CAGZ,OAAO;EACL;EACA,MAAM,eAJQ,QAAQ,uBAAuB,EAAE,CAInB;EAC5B,KAAK,CAAC;CACR;AACF"}
|
|
@@ -1,15 +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
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
|
-
const
|
|
2
|
+
const require_chunk = require('../../chunk-C_NdSu1c.cjs');
|
|
11
3
|
let diff_match_patch = require("diff-match-patch");
|
|
12
|
-
diff_match_patch =
|
|
4
|
+
diff_match_patch = require_chunk.__toESM(diff_match_patch, 1);
|
|
13
5
|
|
|
14
6
|
//#region src/lib/utilities/source-map.ts
|
|
15
7
|
const dmp = new diff_match_patch.default();
|