@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
package/dist/lib/resolver.cjs
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
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_join_paths = require("@stryke/path/join-paths");
|
|
12
4
|
let defu = require("defu");
|
|
13
|
-
defu =
|
|
5
|
+
defu = require_chunk.__toESM(defu, 1);
|
|
14
6
|
let jiti = require("jiti");
|
|
15
7
|
|
|
16
8
|
//#region src/lib/resolver.ts
|
|
17
|
-
var resolver_exports = /* @__PURE__ */ require_runtime.__exportAll({ createResolver: () => createResolver });
|
|
18
9
|
/**
|
|
19
10
|
* Create a Jiti resolver for the given workspace and project root.
|
|
20
11
|
*
|
|
@@ -41,10 +32,4 @@ function createResolver(options) {
|
|
|
41
32
|
}
|
|
42
33
|
|
|
43
34
|
//#endregion
|
|
44
|
-
exports.createResolver = createResolver;
|
|
45
|
-
Object.defineProperty(exports, 'resolver_exports', {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: function () {
|
|
48
|
-
return resolver_exports;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
35
|
+
exports.createResolver = createResolver;
|
package/dist/lib/resolver.d.cts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { JitiOptions } from "jiti";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/resolver.d.ts
|
|
6
|
-
type CreateResolverOptions = Omit<JitiOptions, "fsCache" | "moduleCache" | "interopDefault"> & Partial<Pick<ResolvedConfig, "mode" | "skipCache">> & {
|
|
7
|
-
cwd: string;
|
|
8
|
-
root: string;
|
|
9
|
-
cacheDir: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Create a Jiti resolver for the given workspace and project root.
|
|
13
|
-
*
|
|
14
|
-
* @param options - The options for creating the resolver.
|
|
15
|
-
* @returns A Jiti instance configured for the specified workspace and project root.
|
|
16
|
-
*/
|
|
17
|
-
declare function createResolver(options: CreateResolverOptions): Resolver;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { CreateResolverOptions, createResolver };
|
|
20
|
-
//# sourceMappingURL=resolver.d.cts.map
|
|
1
|
+
import { n as createResolver, t as CreateResolverOptions } from "../resolver-CfCl--Eh.cjs";
|
|
2
|
+
export { CreateResolverOptions, createResolver };
|
package/dist/lib/resolver.d.mts
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Resolver } from "../types/context.mjs";
|
|
4
|
-
import { ResolvedConfig } from "../types/config.mjs";
|
|
5
|
-
import { JitiOptions } from "jiti";
|
|
6
|
-
|
|
7
|
-
//#region src/lib/resolver.d.ts
|
|
8
|
-
type CreateResolverOptions = Omit<JitiOptions, "fsCache" | "moduleCache" | "interopDefault"> & Partial<Pick<ResolvedConfig, "mode" | "skipCache">> & {
|
|
9
|
-
cwd: string;
|
|
10
|
-
root: string;
|
|
11
|
-
cacheDir: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Create a Jiti resolver for the given workspace and project root.
|
|
15
|
-
*
|
|
16
|
-
* @param options - The options for creating the resolver.
|
|
17
|
-
* @returns A Jiti instance configured for the specified workspace and project root.
|
|
18
|
-
*/
|
|
19
|
-
declare function createResolver(options: CreateResolverOptions): Resolver;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { CreateResolverOptions, createResolver };
|
|
22
|
-
//# sourceMappingURL=resolver.d.mts.map
|
|
1
|
+
import { n as createResolver, t as CreateResolverOptions } from "../resolver-CdBAh8dA.mjs";
|
|
2
|
+
export { CreateResolverOptions, createResolver };
|
package/dist/lib/resolver.mjs
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
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 { joinPaths } from "@stryke/path/join-paths";
|
|
11
2
|
import defu from "defu";
|
|
12
3
|
import { createJiti } from "jiti";
|
|
13
4
|
|
|
14
5
|
//#region src/lib/resolver.ts
|
|
15
|
-
var resolver_exports = /* @__PURE__ */ __exportAll({ createResolver: () => createResolver });
|
|
16
6
|
/**
|
|
17
7
|
* Create a Jiti resolver for the given workspace and project root.
|
|
18
8
|
*
|
|
@@ -39,5 +29,5 @@ function createResolver(options) {
|
|
|
39
29
|
}
|
|
40
30
|
|
|
41
31
|
//#endregion
|
|
42
|
-
export { createResolver
|
|
32
|
+
export { createResolver };
|
|
43
33
|
//# sourceMappingURL=resolver.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.mjs","names":[],"sources":["../../src/lib/resolver.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 { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { JitiOptions, createJiti } from \"jiti\";\nimport { ResolvedConfig } from \"../types/config\";\nimport { Resolver } from \"../types/context\";\n\nexport type CreateResolverOptions = Omit<\n JitiOptions,\n \"fsCache\" | \"moduleCache\" | \"interopDefault\"\n> &\n Partial<Pick<ResolvedConfig, \"mode\" | \"skipCache\">> & {\n cwd: string;\n root: string;\n cacheDir: string;\n };\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nfunction resolveOptions(options: CreateResolverOptions): JitiOptions {\n return defu(options, {\n interopDefault: true,\n fsCache:\n options.mode !== \"development\"\n ? joinPaths(options.cacheDir, \"jiti\")\n : false,\n moduleCache: options.mode !== \"development\"\n });\n}\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nexport function createResolver(options: CreateResolverOptions): Resolver {\n const baseResolver = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n ) as Resolver;\n baseResolver.plugin = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n );\n\n return baseResolver;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolver.mjs","names":[],"sources":["../../src/lib/resolver.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 { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { JitiOptions, createJiti } from \"jiti\";\nimport { ResolvedConfig } from \"../types/config\";\nimport { Resolver } from \"../types/context\";\n\nexport type CreateResolverOptions = Omit<\n JitiOptions,\n \"fsCache\" | \"moduleCache\" | \"interopDefault\"\n> &\n Partial<Pick<ResolvedConfig, \"mode\" | \"skipCache\">> & {\n cwd: string;\n root: string;\n cacheDir: string;\n };\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nfunction resolveOptions(options: CreateResolverOptions): JitiOptions {\n return defu(options, {\n interopDefault: true,\n fsCache:\n options.mode !== \"development\"\n ? joinPaths(options.cacheDir, \"jiti\")\n : false,\n moduleCache: options.mode !== \"development\"\n });\n}\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nexport function createResolver(options: CreateResolverOptions): Resolver {\n const baseResolver = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n ) as Resolver;\n baseResolver.plugin = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n );\n\n return baseResolver;\n}\n"],"mappings":";;;;;;;;;;;AAwCA,SAAS,eAAe,SAA6C;CACnE,OAAO,KAAK,SAAS;EACnB,gBAAgB;EAChB,SACE,QAAQ,SAAS,gBACb,UAAU,QAAQ,UAAU,MAAM,IAClC;EACN,aAAa,QAAQ,SAAS;CAChC,CAAC;AACH;;;;;;;AAQA,SAAgB,eAAe,SAA0C;CACvE,MAAM,eAAe,WACnB,UAAU,QAAQ,KAAK,QAAQ,IAAI,GACnC,eAAe,OAAO,CACxB;CACA,aAAa,SAAS,WACpB,UAAU,QAAQ,KAAK,QAAQ,IAAI,GACnC,eAAe,OAAO,CACxB;CAEA,OAAO;AACT"}
|
package/dist/lib/schemas.cjs
CHANGED
|
@@ -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 require_fs = require('../
|
|
2
|
+
const require_fs = require('../fs-C2lru696.cjs');
|
|
11
3
|
|
|
12
4
|
exports.FileId = require_fs.FileId;
|
|
13
5
|
exports.FileMetadata = require_fs.FileMetadata;
|
package/dist/lib/schemas.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as FileSystem, i as FileStorage, n as FileMetadata, o as _capnpFileId, r as FileMetadata_KeyValuePair, t as FileId } from "../schemas-Zvqwdrw_.cjs";
|
|
2
2
|
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
|
package/dist/lib/schemas.d.mts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "../schemas/fs.mjs";
|
|
1
|
+
import { a as FileSystem, i as FileStorage, n as FileMetadata, o as _capnpFileId, r as FileMetadata_KeyValuePair, t as FileId } from "../schemas-Zvqwdrw_.mjs";
|
|
4
2
|
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
|
package/dist/lib/schemas.mjs
CHANGED
|
@@ -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
|
-
import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "../schemas/fs.mjs";
|
|
1
|
+
import { a as FileSystem, i as FileStorage, n as FileMetadata, o as _capnpFileId, r as FileMetadata_KeyValuePair, t as FileId } from "../fs-DqLn15uU.mjs";
|
|
10
2
|
|
|
11
3
|
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
|
|
@@ -1,21 +1,8 @@
|
|
|
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_lib_events = require('./events.cjs');
|
|
12
3
|
let _stryke_unique_id_nanoid_client = require("@stryke/unique-id/nanoid-client");
|
|
13
4
|
|
|
14
5
|
//#region src/lib/streaming-channel.ts
|
|
15
|
-
var streaming_channel_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
16
|
-
createStreamReader: () => createStreamReader,
|
|
17
|
-
createStreamSink: () => createStreamSink
|
|
18
|
-
});
|
|
19
6
|
const DEFAULT_HIGH_WATER_MARK = 256;
|
|
20
7
|
var StreamClosedError = class extends Error {
|
|
21
8
|
name = "StreamClosedError";
|
|
@@ -269,10 +256,4 @@ function toErrorPayload(reason) {
|
|
|
269
256
|
|
|
270
257
|
//#endregion
|
|
271
258
|
exports.createStreamReader = createStreamReader;
|
|
272
|
-
exports.createStreamSink = createStreamSink;
|
|
273
|
-
Object.defineProperty(exports, 'streaming_channel_exports', {
|
|
274
|
-
enumerable: true,
|
|
275
|
-
get: function () {
|
|
276
|
-
return streaming_channel_exports;
|
|
277
|
-
}
|
|
278
|
-
});
|
|
259
|
+
exports.createStreamSink = createStreamSink;
|
|
@@ -1,126 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/lib/streaming-channel.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Serialized error shape sent over the wire when a stream ends with a failure.
|
|
6
|
-
* Stays JSON-safe so the strict-JSON encoder can carry it without coercion.
|
|
7
|
-
*/
|
|
8
|
-
interface StreamErrorPayload {
|
|
9
|
-
name: string;
|
|
10
|
-
message: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Single buffered chunk in the server-side ring buffer.
|
|
14
|
-
*
|
|
15
|
-
* Sequence numbers start at 1 and increment per write. Subscribers track
|
|
16
|
-
* `lastSeenSeq` and ask for `afterSeq` on resubscribe so the server can
|
|
17
|
-
* replay any chunks the client missed during a brief disconnect.
|
|
18
|
-
*/
|
|
19
|
-
interface BufferedChunk<T> {
|
|
20
|
-
seq: number;
|
|
21
|
-
chunk: T;
|
|
22
|
-
}
|
|
23
|
-
interface StreamSinkEvents<T> {
|
|
24
|
-
/** Fired for each `write()`. The RPC layer subscribes and broadcasts. */
|
|
25
|
-
chunk: (seq: number, chunk: T) => void;
|
|
26
|
-
/** Terminal — fired exactly once per sink lifetime. */
|
|
27
|
-
end: (error?: StreamErrorPayload) => void;
|
|
28
|
-
}
|
|
29
|
-
interface CreateStreamSinkOptions {
|
|
30
|
-
id?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Size of the per-stream ring buffer kept for replay-on-resubscribe.
|
|
33
|
-
* `0` (default) disables replay.
|
|
34
|
-
*/
|
|
35
|
-
replayWindow?: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Server-side producer handle. Two equivalent surfaces share one piece of
|
|
39
|
-
* state: the imperative `write/error/close` triple, and a `WritableStream<T>`
|
|
40
|
-
* for `pipeTo`-style consumption.
|
|
41
|
-
*/
|
|
42
|
-
interface StreamSink<T> {
|
|
43
|
-
/** Stable id used by clients to subscribe. */
|
|
44
|
-
readonly id: string;
|
|
45
|
-
/**
|
|
46
|
-
* Aborts when the consumer cancels (server-side) or when the transport
|
|
47
|
-
* loses every subscriber. Producers should poll `signal.aborted` and exit
|
|
48
|
-
* cleanly.
|
|
49
|
-
*/
|
|
50
|
-
readonly signal: AbortSignal;
|
|
51
|
-
/** `true` after `close()` / `error()`. Further writes throw. */
|
|
52
|
-
readonly closed: boolean;
|
|
53
|
-
/** Last allocated sequence number. `0` until the first write. */
|
|
54
|
-
readonly lastSeq: number;
|
|
55
|
-
write: (chunk: T) => void;
|
|
56
|
-
error: (reason: unknown) => void;
|
|
57
|
-
close: () => void;
|
|
58
|
-
/** External-cancel path. Aborts the signal so handlers can short-circuit. */
|
|
59
|
-
abort: (reason?: unknown) => void;
|
|
60
|
-
/** `WritableStream<T>` adapter — same in-memory state as the imperative API. */
|
|
61
|
-
readonly writable: WritableStream<T>;
|
|
62
|
-
/**
|
|
63
|
-
* Internal — RPC layer subscribes to receive chunk/end notifications.
|
|
64
|
-
* Not part of the public contract; do not call directly.
|
|
65
|
-
*
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
readonly events: EventEmitter<StreamSinkEvents<T>>;
|
|
69
|
-
/**
|
|
70
|
-
* Internal — replay buffer. RPC layer reads on (re)subscribe to feed
|
|
71
|
-
* missed chunks before going live.
|
|
72
|
-
*
|
|
73
|
-
* @internal
|
|
74
|
-
*/
|
|
75
|
-
readonly buffer: ReadonlyArray<BufferedChunk<T>>;
|
|
76
|
-
}
|
|
77
|
-
interface CreateStreamReaderOptions {
|
|
78
|
-
id?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Maximum number of buffered chunks held client-side while the consumer
|
|
81
|
-
* isn't draining. On overflow, the oldest chunk is dropped.
|
|
82
|
-
*/
|
|
83
|
-
highWaterMark?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Called when the chunk queue overflows the high-water mark. The RPC
|
|
86
|
-
* layer wires this to a coded warning; the primitive itself is
|
|
87
|
-
* RPC-agnostic.
|
|
88
|
-
*/
|
|
89
|
-
onOverflow?: (dropped: number) => void;
|
|
90
|
-
/** Called when the consumer cancels — the RPC layer sends `:cancel` upstream. */
|
|
91
|
-
onCancel?: () => void;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Client-side consumer handle. Both an `AsyncIterable<T>` (for `for await`)
|
|
95
|
-
* and exposes `readable: ReadableStream<T>` (for `pipeTo`). Pick one — they
|
|
96
|
-
* share a single internal queue, so concurrent draining will race.
|
|
97
|
-
*/
|
|
98
|
-
interface StreamReader<T> extends AsyncIterable<T> {
|
|
99
|
-
readonly id: string;
|
|
100
|
-
readonly cancelled: boolean;
|
|
101
|
-
readonly done: boolean;
|
|
102
|
-
/** Highest `seq` observed. Used for replay on reconnect. */
|
|
103
|
-
readonly lastSeenSeq: number;
|
|
104
|
-
/** `ReadableStream<T>` adapter for `pipeTo`-style consumption. */
|
|
105
|
-
readonly readable: ReadableStream<T>;
|
|
106
|
-
cancel: () => void;
|
|
107
|
-
/** @internal */
|
|
108
|
-
_push: (seq: number, chunk: T) => void;
|
|
109
|
-
/** @internal */
|
|
110
|
-
_end: (error?: StreamErrorPayload) => void;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Build a server-side stream sink. RPC-agnostic — the RPC host wires
|
|
114
|
-
* `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay
|
|
115
|
-
* for late or reconnecting subscribers.
|
|
116
|
-
*/
|
|
117
|
-
declare function createStreamSink<T>(options?: CreateStreamSinkOptions): StreamSink<T>;
|
|
118
|
-
/**
|
|
119
|
-
* Build a client-side stream reader. RPC-agnostic — the RPC host calls
|
|
120
|
-
* `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the
|
|
121
|
-
* terminal frame. Consumers iterate with `for await` or pipe `readable`.
|
|
122
|
-
*/
|
|
123
|
-
declare function createStreamReader<T>(options?: CreateStreamReaderOptions): StreamReader<T>;
|
|
124
|
-
//#endregion
|
|
125
|
-
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
126
|
-
//# sourceMappingURL=streaming-channel.d.cts.map
|
|
1
|
+
import { a as StreamReader, c as createStreamReader, i as StreamErrorPayload, l as createStreamSink, n as CreateStreamReaderOptions, o as StreamSink, r as CreateStreamSinkOptions, s as StreamSinkEvents, t as BufferedChunk } from "../streaming-channel-CiyFd_6l.cjs";
|
|
2
|
+
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,128 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { EventEmitter } from "devframe/types";
|
|
4
|
-
|
|
5
|
-
//#region src/lib/streaming-channel.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Serialized error shape sent over the wire when a stream ends with a failure.
|
|
8
|
-
* Stays JSON-safe so the strict-JSON encoder can carry it without coercion.
|
|
9
|
-
*/
|
|
10
|
-
interface StreamErrorPayload {
|
|
11
|
-
name: string;
|
|
12
|
-
message: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Single buffered chunk in the server-side ring buffer.
|
|
16
|
-
*
|
|
17
|
-
* Sequence numbers start at 1 and increment per write. Subscribers track
|
|
18
|
-
* `lastSeenSeq` and ask for `afterSeq` on resubscribe so the server can
|
|
19
|
-
* replay any chunks the client missed during a brief disconnect.
|
|
20
|
-
*/
|
|
21
|
-
interface BufferedChunk<T> {
|
|
22
|
-
seq: number;
|
|
23
|
-
chunk: T;
|
|
24
|
-
}
|
|
25
|
-
interface StreamSinkEvents<T> {
|
|
26
|
-
/** Fired for each `write()`. The RPC layer subscribes and broadcasts. */
|
|
27
|
-
chunk: (seq: number, chunk: T) => void;
|
|
28
|
-
/** Terminal — fired exactly once per sink lifetime. */
|
|
29
|
-
end: (error?: StreamErrorPayload) => void;
|
|
30
|
-
}
|
|
31
|
-
interface CreateStreamSinkOptions {
|
|
32
|
-
id?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Size of the per-stream ring buffer kept for replay-on-resubscribe.
|
|
35
|
-
* `0` (default) disables replay.
|
|
36
|
-
*/
|
|
37
|
-
replayWindow?: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Server-side producer handle. Two equivalent surfaces share one piece of
|
|
41
|
-
* state: the imperative `write/error/close` triple, and a `WritableStream<T>`
|
|
42
|
-
* for `pipeTo`-style consumption.
|
|
43
|
-
*/
|
|
44
|
-
interface StreamSink<T> {
|
|
45
|
-
/** Stable id used by clients to subscribe. */
|
|
46
|
-
readonly id: string;
|
|
47
|
-
/**
|
|
48
|
-
* Aborts when the consumer cancels (server-side) or when the transport
|
|
49
|
-
* loses every subscriber. Producers should poll `signal.aborted` and exit
|
|
50
|
-
* cleanly.
|
|
51
|
-
*/
|
|
52
|
-
readonly signal: AbortSignal;
|
|
53
|
-
/** `true` after `close()` / `error()`. Further writes throw. */
|
|
54
|
-
readonly closed: boolean;
|
|
55
|
-
/** Last allocated sequence number. `0` until the first write. */
|
|
56
|
-
readonly lastSeq: number;
|
|
57
|
-
write: (chunk: T) => void;
|
|
58
|
-
error: (reason: unknown) => void;
|
|
59
|
-
close: () => void;
|
|
60
|
-
/** External-cancel path. Aborts the signal so handlers can short-circuit. */
|
|
61
|
-
abort: (reason?: unknown) => void;
|
|
62
|
-
/** `WritableStream<T>` adapter — same in-memory state as the imperative API. */
|
|
63
|
-
readonly writable: WritableStream<T>;
|
|
64
|
-
/**
|
|
65
|
-
* Internal — RPC layer subscribes to receive chunk/end notifications.
|
|
66
|
-
* Not part of the public contract; do not call directly.
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
readonly events: EventEmitter<StreamSinkEvents<T>>;
|
|
71
|
-
/**
|
|
72
|
-
* Internal — replay buffer. RPC layer reads on (re)subscribe to feed
|
|
73
|
-
* missed chunks before going live.
|
|
74
|
-
*
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
readonly buffer: ReadonlyArray<BufferedChunk<T>>;
|
|
78
|
-
}
|
|
79
|
-
interface CreateStreamReaderOptions {
|
|
80
|
-
id?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Maximum number of buffered chunks held client-side while the consumer
|
|
83
|
-
* isn't draining. On overflow, the oldest chunk is dropped.
|
|
84
|
-
*/
|
|
85
|
-
highWaterMark?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Called when the chunk queue overflows the high-water mark. The RPC
|
|
88
|
-
* layer wires this to a coded warning; the primitive itself is
|
|
89
|
-
* RPC-agnostic.
|
|
90
|
-
*/
|
|
91
|
-
onOverflow?: (dropped: number) => void;
|
|
92
|
-
/** Called when the consumer cancels — the RPC layer sends `:cancel` upstream. */
|
|
93
|
-
onCancel?: () => void;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Client-side consumer handle. Both an `AsyncIterable<T>` (for `for await`)
|
|
97
|
-
* and exposes `readable: ReadableStream<T>` (for `pipeTo`). Pick one — they
|
|
98
|
-
* share a single internal queue, so concurrent draining will race.
|
|
99
|
-
*/
|
|
100
|
-
interface StreamReader<T> extends AsyncIterable<T> {
|
|
101
|
-
readonly id: string;
|
|
102
|
-
readonly cancelled: boolean;
|
|
103
|
-
readonly done: boolean;
|
|
104
|
-
/** Highest `seq` observed. Used for replay on reconnect. */
|
|
105
|
-
readonly lastSeenSeq: number;
|
|
106
|
-
/** `ReadableStream<T>` adapter for `pipeTo`-style consumption. */
|
|
107
|
-
readonly readable: ReadableStream<T>;
|
|
108
|
-
cancel: () => void;
|
|
109
|
-
/** @internal */
|
|
110
|
-
_push: (seq: number, chunk: T) => void;
|
|
111
|
-
/** @internal */
|
|
112
|
-
_end: (error?: StreamErrorPayload) => void;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Build a server-side stream sink. RPC-agnostic — the RPC host wires
|
|
116
|
-
* `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay
|
|
117
|
-
* for late or reconnecting subscribers.
|
|
118
|
-
*/
|
|
119
|
-
declare function createStreamSink<T>(options?: CreateStreamSinkOptions): StreamSink<T>;
|
|
120
|
-
/**
|
|
121
|
-
* Build a client-side stream reader. RPC-agnostic — the RPC host calls
|
|
122
|
-
* `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the
|
|
123
|
-
* terminal frame. Consumers iterate with `for await` or pipe `readable`.
|
|
124
|
-
*/
|
|
125
|
-
declare function createStreamReader<T>(options?: CreateStreamReaderOptions): StreamReader<T>;
|
|
126
|
-
//#endregion
|
|
127
|
-
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
128
|
-
//# sourceMappingURL=streaming-channel.d.mts.map
|
|
1
|
+
import { a as StreamReader, c as createStreamReader, i as StreamErrorPayload, l as createStreamSink, n as CreateStreamReaderOptions, o as StreamSink, r as CreateStreamSinkOptions, s as StreamSinkEvents, t as BufferedChunk } from "../streaming-channel-CiyFd_6l.mjs";
|
|
2
|
+
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -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 { createEventEmitter } from "./events.mjs";
|
|
11
2
|
import { nanoid } from "@stryke/unique-id/nanoid-client";
|
|
12
3
|
|
|
13
4
|
//#region src/lib/streaming-channel.ts
|
|
14
|
-
var streaming_channel_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
-
createStreamReader: () => createStreamReader,
|
|
16
|
-
createStreamSink: () => createStreamSink
|
|
17
|
-
});
|
|
18
5
|
const DEFAULT_HIGH_WATER_MARK = 256;
|
|
19
6
|
var StreamClosedError = class extends Error {
|
|
20
7
|
name = "StreamClosedError";
|
|
@@ -267,5 +254,5 @@ function toErrorPayload(reason) {
|
|
|
267
254
|
}
|
|
268
255
|
|
|
269
256
|
//#endregion
|
|
270
|
-
export { createStreamReader, createStreamSink
|
|
257
|
+
export { createStreamReader, createStreamSink };
|
|
271
258
|
//# sourceMappingURL=streaming-channel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-channel.mjs","names":[],"sources":["../../src/lib/streaming-channel.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 { nanoid } from \"@stryke/unique-id/nanoid-client\";\nimport type { EventEmitter } from \"devframe/types\";\nimport { createEventEmitter } from \"./events\";\n\n/**\n * Serialized error shape sent over the wire when a stream ends with a failure.\n * Stays JSON-safe so the strict-JSON encoder can carry it without coercion.\n */\nexport interface StreamErrorPayload {\n name: string;\n message: string;\n}\n\n/**\n * Single buffered chunk in the server-side ring buffer.\n *\n * Sequence numbers start at 1 and increment per write. Subscribers track\n * `lastSeenSeq` and ask for `afterSeq` on resubscribe so the server can\n * replay any chunks the client missed during a brief disconnect.\n */\nexport interface BufferedChunk<T> {\n seq: number;\n chunk: T;\n}\n\nexport interface StreamSinkEvents<T> {\n /** Fired for each `write()`. The RPC layer subscribes and broadcasts. */\n chunk: (seq: number, chunk: T) => void;\n /** Terminal — fired exactly once per sink lifetime. */\n end: (error?: StreamErrorPayload) => void;\n}\n\nexport interface CreateStreamSinkOptions {\n id?: string;\n /**\n * Size of the per-stream ring buffer kept for replay-on-resubscribe.\n * `0` (default) disables replay.\n */\n replayWindow?: number;\n}\n\n/**\n * Server-side producer handle. Two equivalent surfaces share one piece of\n * state: the imperative `write/error/close` triple, and a `WritableStream<T>`\n * for `pipeTo`-style consumption.\n */\nexport interface StreamSink<T> {\n /** Stable id used by clients to subscribe. */\n readonly id: string;\n /**\n * Aborts when the consumer cancels (server-side) or when the transport\n * loses every subscriber. Producers should poll `signal.aborted` and exit\n * cleanly.\n */\n readonly signal: AbortSignal;\n /** `true` after `close()` / `error()`. Further writes throw. */\n readonly closed: boolean;\n /** Last allocated sequence number. `0` until the first write. */\n readonly lastSeq: number;\n\n write: (chunk: T) => void;\n error: (reason: unknown) => void;\n close: () => void;\n /** External-cancel path. Aborts the signal so handlers can short-circuit. */\n abort: (reason?: unknown) => void;\n\n /** `WritableStream<T>` adapter — same in-memory state as the imperative API. */\n readonly writable: WritableStream<T>;\n\n /**\n * Internal — RPC layer subscribes to receive chunk/end notifications.\n * Not part of the public contract; do not call directly.\n *\n * @internal\n */\n readonly events: EventEmitter<StreamSinkEvents<T>>;\n\n /**\n * Internal — replay buffer. RPC layer reads on (re)subscribe to feed\n * missed chunks before going live.\n *\n * @internal\n */\n readonly buffer: ReadonlyArray<BufferedChunk<T>>;\n}\n\nexport interface CreateStreamReaderOptions {\n id?: string;\n /**\n * Maximum number of buffered chunks held client-side while the consumer\n * isn't draining. On overflow, the oldest chunk is dropped.\n */\n highWaterMark?: number;\n /**\n * Called when the chunk queue overflows the high-water mark. The RPC\n * layer wires this to a coded warning; the primitive itself is\n * RPC-agnostic.\n */\n onOverflow?: (dropped: number) => void;\n /** Called when the consumer cancels — the RPC layer sends `:cancel` upstream. */\n onCancel?: () => void;\n}\n\n/**\n * Client-side consumer handle. Both an `AsyncIterable<T>` (for `for await`)\n * and exposes `readable: ReadableStream<T>` (for `pipeTo`). Pick one — they\n * share a single internal queue, so concurrent draining will race.\n */\nexport interface StreamReader<T> extends AsyncIterable<T> {\n readonly id: string;\n readonly cancelled: boolean;\n readonly done: boolean;\n /** Highest `seq` observed. Used for replay on reconnect. */\n readonly lastSeenSeq: number;\n /** `ReadableStream<T>` adapter for `pipeTo`-style consumption. */\n readonly readable: ReadableStream<T>;\n\n cancel: () => void;\n\n /** @internal */\n _push: (seq: number, chunk: T) => void;\n /** @internal */\n _end: (error?: StreamErrorPayload) => void;\n}\n\nconst DEFAULT_HIGH_WATER_MARK = 256;\n\nclass StreamClosedError extends Error {\n override name = \"StreamClosedError\";\n}\n\n/**\n * Build a server-side stream sink. RPC-agnostic — the RPC host wires\n * `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay\n * for late or reconnecting subscribers.\n */\nexport function createStreamSink<T>(\n options: CreateStreamSinkOptions = {}\n): StreamSink<T> {\n const id = options.id ?? nanoid();\n const replayWindow = Math.max(0, options.replayWindow ?? 0);\n const events = createEventEmitter<StreamSinkEvents<T>>();\n const controller = new AbortController();\n const buffer: BufferedChunk<T>[] = [];\n\n let closed = false;\n let lastSeq = 0;\n\n function write(chunk: T): void {\n if (closed) {\n throw new StreamClosedError(`Cannot write to a closed stream \"${id}\"`);\n }\n lastSeq += 1;\n if (replayWindow > 0) {\n buffer.push({ seq: lastSeq, chunk });\n if (buffer.length > replayWindow)\n buffer.splice(0, buffer.length - replayWindow);\n }\n events.emit(\"chunk\", lastSeq, chunk);\n }\n\n function error(reason: unknown): void {\n if (closed) return;\n closed = true;\n const payload = toErrorPayload(reason);\n controller.abort(reason);\n events.emit(\"end\", payload);\n }\n\n function close(): void {\n if (closed) return;\n closed = true;\n if (!controller.signal.aborted) controller.abort(\"stream closed\");\n events.emit(\"end\", undefined);\n }\n\n function abort(reason?: unknown): void {\n if (closed) return;\n if (!controller.signal.aborted) controller.abort(reason ?? \"aborted\");\n }\n\n const writable = new WritableStream<T>({\n write(chunk) {\n write(chunk);\n },\n close() {\n close();\n },\n abort(reason) {\n error(reason);\n }\n });\n\n return {\n id,\n signal: controller.signal,\n get closed() {\n return closed;\n },\n get lastSeq() {\n return lastSeq;\n },\n write,\n error,\n close,\n abort,\n writable,\n events,\n buffer\n };\n}\n\n/**\n * Build a client-side stream reader. RPC-agnostic — the RPC host calls\n * `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the\n * terminal frame. Consumers iterate with `for await` or pipe `readable`.\n */\nexport function createStreamReader<T>(\n options: CreateStreamReaderOptions = {}\n): StreamReader<T> {\n const id = options.id ?? nanoid();\n const highWaterMark = Math.max(\n 1,\n options.highWaterMark ?? DEFAULT_HIGH_WATER_MARK\n );\n\n const queue: T[] = [];\n let lastSeenSeq = 0;\n let done = false;\n let cancelled = false;\n let endError: StreamErrorPayload | undefined;\n let pending:\n | {\n resolve: (r: IteratorResult<T>) => void;\n reject: (err: unknown) => void;\n }\n | undefined;\n // Lazily created — accessing `reader.readable` claims the queue for\n // `pipeTo` consumption. While inactive, `_push` only feeds the\n // AsyncIterator path. Mixing the two surfaces is undefined behavior.\n let pullController: ReadableStreamDefaultController<T> | undefined;\n let readableInstance: ReadableStream<T> | undefined;\n\n function drainNext(): void {\n if (!pending) return;\n if (queue.length > 0) {\n const value = queue.shift()!;\n const r = pending;\n pending = undefined;\n r.resolve({ value, done: false });\n return;\n }\n if (done) {\n const r = pending;\n pending = undefined;\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n r.reject(err);\n } else {\n r.resolve({ value: undefined, done: true });\n }\n }\n }\n\n function feedReadable(): void {\n if (!pullController) return;\n while (queue.length > 0) {\n const v = queue.shift()!;\n try {\n pullController.enqueue(v);\n } catch {\n // controller closed/errored under us — drop silently; the\n // ReadableStream consumer is gone and we can't push further.\n break;\n }\n }\n if (done && pullController) {\n try {\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n pullController.error(err);\n } else {\n pullController.close();\n }\n } catch {\n // already closed\n }\n pullController = undefined;\n }\n }\n\n function push(seq: number, chunk: T): void {\n if (done || cancelled) return;\n if (seq <= lastSeenSeq) return; // dedupe replays we've already seen\n lastSeenSeq = seq;\n queue.push(chunk);\n if (queue.length > highWaterMark) {\n const overflow = queue.length - highWaterMark;\n queue.splice(0, overflow);\n options.onOverflow?.(overflow);\n }\n drainNext();\n if (readableInstance) feedReadable();\n }\n\n function end(error?: StreamErrorPayload): void {\n if (done) return;\n done = true;\n endError = error;\n drainNext();\n if (readableInstance) feedReadable();\n }\n\n function cancel(): void {\n if (cancelled || done) return;\n cancelled = true;\n options.onCancel?.();\n end(undefined);\n }\n\n function getReadable(): ReadableStream<T> {\n if (readableInstance) return readableInstance;\n readableInstance = new ReadableStream<T>({\n start(controller) {\n pullController = controller;\n feedReadable();\n },\n cancel() {\n cancel();\n }\n });\n return readableInstance;\n }\n\n const reader: StreamReader<T> = {\n id,\n get cancelled() {\n return cancelled;\n },\n get done() {\n return done;\n },\n get lastSeenSeq() {\n return lastSeenSeq;\n },\n get readable() {\n return getReadable();\n },\n cancel,\n _push: push,\n _end: end,\n [Symbol.asyncIterator](): AsyncIterator<T> {\n return {\n async next(): Promise<IteratorResult<T>> {\n if (queue.length > 0) {\n return Promise.resolve({ value: queue.shift()!, done: false });\n }\n if (done) {\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n return Promise.reject(err);\n }\n return Promise.resolve({\n value: undefined as unknown as T,\n done: true\n });\n }\n return new Promise<IteratorResult<T>>((resolve, reject) => {\n pending = { resolve, reject };\n });\n },\n async return(): Promise<IteratorResult<T>> {\n cancel();\n return Promise.resolve({\n value: undefined as unknown as T,\n done: true\n });\n }\n };\n }\n };\n\n return reader;\n}\n\nfunction toErrorPayload(reason: unknown): StreamErrorPayload {\n if (reason instanceof Error) {\n return { name: reason.name || \"Error\", message: reason.message };\n }\n if (typeof reason === \"string\") {\n return { name: \"Error\", message: reason };\n }\n try {\n return { name: \"Error\", message: JSON.stringify(reason) };\n } catch {\n return { name: \"Error\", message: String(reason) };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+IA,MAAM,0BAA0B;AAEhC,IAAM,oBAAN,cAAgC,MAAM;CACpC,AAAS,OAAO;AAClB;;;;;;AAOA,SAAgB,iBACd,UAAmC,CAAC,GACrB;CACf,MAAM,KAAK,QAAQ,MAAM,OAAO;CAChC,MAAM,eAAe,KAAK,IAAI,GAAG,QAAQ,gBAAgB,CAAC;CAC1D,MAAM,SAAS,mBAAwC;CACvD,MAAM,aAAa,IAAI,gBAAgB;CACvC,MAAM,SAA6B,CAAC;CAEpC,IAAI,SAAS;CACb,IAAI,UAAU;CAEd,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AC1D,QAAQ;EACN,OAAO;GAAE,MAAM;GAAS,SAAS,OAAO,MAAM;EAAE;CAClD;AACF"}
|
|
1
|
+
{"version":3,"file":"streaming-channel.mjs","names":[],"sources":["../../src/lib/streaming-channel.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 { nanoid } from \"@stryke/unique-id/nanoid-client\";\nimport type { EventEmitter } from \"devframe/types\";\nimport { createEventEmitter } from \"./events\";\n\n/**\n * Serialized error shape sent over the wire when a stream ends with a failure.\n * Stays JSON-safe so the strict-JSON encoder can carry it without coercion.\n */\nexport interface StreamErrorPayload {\n name: string;\n message: string;\n}\n\n/**\n * Single buffered chunk in the server-side ring buffer.\n *\n * Sequence numbers start at 1 and increment per write. Subscribers track\n * `lastSeenSeq` and ask for `afterSeq` on resubscribe so the server can\n * replay any chunks the client missed during a brief disconnect.\n */\nexport interface BufferedChunk<T> {\n seq: number;\n chunk: T;\n}\n\nexport interface StreamSinkEvents<T> {\n /** Fired for each `write()`. The RPC layer subscribes and broadcasts. */\n chunk: (seq: number, chunk: T) => void;\n /** Terminal — fired exactly once per sink lifetime. */\n end: (error?: StreamErrorPayload) => void;\n}\n\nexport interface CreateStreamSinkOptions {\n id?: string;\n /**\n * Size of the per-stream ring buffer kept for replay-on-resubscribe.\n * `0` (default) disables replay.\n */\n replayWindow?: number;\n}\n\n/**\n * Server-side producer handle. Two equivalent surfaces share one piece of\n * state: the imperative `write/error/close` triple, and a `WritableStream<T>`\n * for `pipeTo`-style consumption.\n */\nexport interface StreamSink<T> {\n /** Stable id used by clients to subscribe. */\n readonly id: string;\n /**\n * Aborts when the consumer cancels (server-side) or when the transport\n * loses every subscriber. Producers should poll `signal.aborted` and exit\n * cleanly.\n */\n readonly signal: AbortSignal;\n /** `true` after `close()` / `error()`. Further writes throw. */\n readonly closed: boolean;\n /** Last allocated sequence number. `0` until the first write. */\n readonly lastSeq: number;\n\n write: (chunk: T) => void;\n error: (reason: unknown) => void;\n close: () => void;\n /** External-cancel path. Aborts the signal so handlers can short-circuit. */\n abort: (reason?: unknown) => void;\n\n /** `WritableStream<T>` adapter — same in-memory state as the imperative API. */\n readonly writable: WritableStream<T>;\n\n /**\n * Internal — RPC layer subscribes to receive chunk/end notifications.\n * Not part of the public contract; do not call directly.\n *\n * @internal\n */\n readonly events: EventEmitter<StreamSinkEvents<T>>;\n\n /**\n * Internal — replay buffer. RPC layer reads on (re)subscribe to feed\n * missed chunks before going live.\n *\n * @internal\n */\n readonly buffer: ReadonlyArray<BufferedChunk<T>>;\n}\n\nexport interface CreateStreamReaderOptions {\n id?: string;\n /**\n * Maximum number of buffered chunks held client-side while the consumer\n * isn't draining. On overflow, the oldest chunk is dropped.\n */\n highWaterMark?: number;\n /**\n * Called when the chunk queue overflows the high-water mark. The RPC\n * layer wires this to a coded warning; the primitive itself is\n * RPC-agnostic.\n */\n onOverflow?: (dropped: number) => void;\n /** Called when the consumer cancels — the RPC layer sends `:cancel` upstream. */\n onCancel?: () => void;\n}\n\n/**\n * Client-side consumer handle. Both an `AsyncIterable<T>` (for `for await`)\n * and exposes `readable: ReadableStream<T>` (for `pipeTo`). Pick one — they\n * share a single internal queue, so concurrent draining will race.\n */\nexport interface StreamReader<T> extends AsyncIterable<T> {\n readonly id: string;\n readonly cancelled: boolean;\n readonly done: boolean;\n /** Highest `seq` observed. Used for replay on reconnect. */\n readonly lastSeenSeq: number;\n /** `ReadableStream<T>` adapter for `pipeTo`-style consumption. */\n readonly readable: ReadableStream<T>;\n\n cancel: () => void;\n\n /** @internal */\n _push: (seq: number, chunk: T) => void;\n /** @internal */\n _end: (error?: StreamErrorPayload) => void;\n}\n\nconst DEFAULT_HIGH_WATER_MARK = 256;\n\nclass StreamClosedError extends Error {\n override name = \"StreamClosedError\";\n}\n\n/**\n * Build a server-side stream sink. RPC-agnostic — the RPC host wires\n * `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay\n * for late or reconnecting subscribers.\n */\nexport function createStreamSink<T>(\n options: CreateStreamSinkOptions = {}\n): StreamSink<T> {\n const id = options.id ?? nanoid();\n const replayWindow = Math.max(0, options.replayWindow ?? 0);\n const events = createEventEmitter<StreamSinkEvents<T>>();\n const controller = new AbortController();\n const buffer: BufferedChunk<T>[] = [];\n\n let closed = false;\n let lastSeq = 0;\n\n function write(chunk: T): void {\n if (closed) {\n throw new StreamClosedError(`Cannot write to a closed stream \"${id}\"`);\n }\n lastSeq += 1;\n if (replayWindow > 0) {\n buffer.push({ seq: lastSeq, chunk });\n if (buffer.length > replayWindow)\n buffer.splice(0, buffer.length - replayWindow);\n }\n events.emit(\"chunk\", lastSeq, chunk);\n }\n\n function error(reason: unknown): void {\n if (closed) return;\n closed = true;\n const payload = toErrorPayload(reason);\n controller.abort(reason);\n events.emit(\"end\", payload);\n }\n\n function close(): void {\n if (closed) return;\n closed = true;\n if (!controller.signal.aborted) controller.abort(\"stream closed\");\n events.emit(\"end\", undefined);\n }\n\n function abort(reason?: unknown): void {\n if (closed) return;\n if (!controller.signal.aborted) controller.abort(reason ?? \"aborted\");\n }\n\n const writable = new WritableStream<T>({\n write(chunk) {\n write(chunk);\n },\n close() {\n close();\n },\n abort(reason) {\n error(reason);\n }\n });\n\n return {\n id,\n signal: controller.signal,\n get closed() {\n return closed;\n },\n get lastSeq() {\n return lastSeq;\n },\n write,\n error,\n close,\n abort,\n writable,\n events,\n buffer\n };\n}\n\n/**\n * Build a client-side stream reader. RPC-agnostic — the RPC host calls\n * `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the\n * terminal frame. Consumers iterate with `for await` or pipe `readable`.\n */\nexport function createStreamReader<T>(\n options: CreateStreamReaderOptions = {}\n): StreamReader<T> {\n const id = options.id ?? nanoid();\n const highWaterMark = Math.max(\n 1,\n options.highWaterMark ?? DEFAULT_HIGH_WATER_MARK\n );\n\n const queue: T[] = [];\n let lastSeenSeq = 0;\n let done = false;\n let cancelled = false;\n let endError: StreamErrorPayload | undefined;\n let pending:\n | {\n resolve: (r: IteratorResult<T>) => void;\n reject: (err: unknown) => void;\n }\n | undefined;\n // Lazily created — accessing `reader.readable` claims the queue for\n // `pipeTo` consumption. While inactive, `_push` only feeds the\n // AsyncIterator path. Mixing the two surfaces is undefined behavior.\n let pullController: ReadableStreamDefaultController<T> | undefined;\n let readableInstance: ReadableStream<T> | undefined;\n\n function drainNext(): void {\n if (!pending) return;\n if (queue.length > 0) {\n const value = queue.shift()!;\n const r = pending;\n pending = undefined;\n r.resolve({ value, done: false });\n return;\n }\n if (done) {\n const r = pending;\n pending = undefined;\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n r.reject(err);\n } else {\n r.resolve({ value: undefined, done: true });\n }\n }\n }\n\n function feedReadable(): void {\n if (!pullController) return;\n while (queue.length > 0) {\n const v = queue.shift()!;\n try {\n pullController.enqueue(v);\n } catch {\n // controller closed/errored under us — drop silently; the\n // ReadableStream consumer is gone and we can't push further.\n break;\n }\n }\n if (done && pullController) {\n try {\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n pullController.error(err);\n } else {\n pullController.close();\n }\n } catch {\n // already closed\n }\n pullController = undefined;\n }\n }\n\n function push(seq: number, chunk: T): void {\n if (done || cancelled) return;\n if (seq <= lastSeenSeq) return; // dedupe replays we've already seen\n lastSeenSeq = seq;\n queue.push(chunk);\n if (queue.length > highWaterMark) {\n const overflow = queue.length - highWaterMark;\n queue.splice(0, overflow);\n options.onOverflow?.(overflow);\n }\n drainNext();\n if (readableInstance) feedReadable();\n }\n\n function end(error?: StreamErrorPayload): void {\n if (done) return;\n done = true;\n endError = error;\n drainNext();\n if (readableInstance) feedReadable();\n }\n\n function cancel(): void {\n if (cancelled || done) return;\n cancelled = true;\n options.onCancel?.();\n end(undefined);\n }\n\n function getReadable(): ReadableStream<T> {\n if (readableInstance) return readableInstance;\n readableInstance = new ReadableStream<T>({\n start(controller) {\n pullController = controller;\n feedReadable();\n },\n cancel() {\n cancel();\n }\n });\n return readableInstance;\n }\n\n const reader: StreamReader<T> = {\n id,\n get cancelled() {\n return cancelled;\n },\n get done() {\n return done;\n },\n get lastSeenSeq() {\n return lastSeenSeq;\n },\n get readable() {\n return getReadable();\n },\n cancel,\n _push: push,\n _end: end,\n [Symbol.asyncIterator](): AsyncIterator<T> {\n return {\n async next(): Promise<IteratorResult<T>> {\n if (queue.length > 0) {\n return Promise.resolve({ value: queue.shift()!, done: false });\n }\n if (done) {\n if (endError) {\n const err = new Error(endError.message);\n err.name = endError.name;\n return Promise.reject(err);\n }\n return Promise.resolve({\n value: undefined as unknown as T,\n done: true\n });\n }\n return new Promise<IteratorResult<T>>((resolve, reject) => {\n pending = { resolve, reject };\n });\n },\n async return(): Promise<IteratorResult<T>> {\n cancel();\n return Promise.resolve({\n value: undefined as unknown as T,\n done: true\n });\n }\n };\n }\n };\n\n return reader;\n}\n\nfunction toErrorPayload(reason: unknown): StreamErrorPayload {\n if (reason instanceof Error) {\n return { name: reason.name || \"Error\", message: reason.message };\n }\n if (typeof reason === \"string\") {\n return { name: \"Error\", message: reason };\n }\n try {\n return { name: \"Error\", message: JSON.stringify(reason) };\n } catch {\n return { name: \"Error\", message: String(reason) };\n }\n}\n"],"mappings":";;;;AA+IA,MAAM,0BAA0B;AAEhC,IAAM,oBAAN,cAAgC,MAAM;CACpC,AAAS,OAAO;AAClB;;;;;;AAOA,SAAgB,iBACd,UAAmC,CAAC,GACrB;CACf,MAAM,KAAK,QAAQ,MAAM,OAAO;CAChC,MAAM,eAAe,KAAK,IAAI,GAAG,QAAQ,gBAAgB,CAAC;CAC1D,M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AW,UACpB,OAAO;EAAE,MAAM;EAAS,SAAS;CAAO;CAE1C,IAAI;EACF,OAAO;GAAE,MAAM;GAAS,SAAS,KAAK,UAAU,MAAM;EAAE;CAC1D,QAAQ;EACN,OAAO;GAAE,MAAM;GAAS,SAAS,OAAO,MAAM;EAAE;CAClD;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
|
const require_lib_typescript_ts_morph = require('./ts-morph.cjs');
|
|
11
3
|
const require_lib_typescript_tsconfig = require('./tsconfig.cjs');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as createProgram, t as VirtualFileSystemHost } from "../../ts-morph-BGgjbOgM.cjs";
|
|
2
|
+
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";
|
|
3
3
|
export { VirtualFileSystemHost, createProgram, findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { VirtualFileSystemHost, createProgram } from "./ts-morph.mjs";
|
|
4
|
-
import { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath } from "./tsconfig.mjs";
|
|
1
|
+
import { n as createProgram, t as VirtualFileSystemHost } from "../../ts-morph-zLvdifpA.mjs";
|
|
2
|
+
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";
|
|
5
3
|
export { VirtualFileSystemHost, createProgram, findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
@@ -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 { VirtualFileSystemHost, createProgram } from "./ts-morph.mjs";
|
|
10
2
|
import { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath } from "./tsconfig.mjs";
|
|
11
3
|
|