@powerlines/core 0.48.27 → 0.48.28
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/_virtual/_rolldown/runtime.cjs +14 -0
- package/dist/_virtual/_rolldown/runtime.mjs +26 -0
- package/dist/constants/api.test.cjs +42 -0
- package/dist/constants/api.test.d.cts +1 -0
- package/dist/constants/api.test.d.mts +2 -0
- package/dist/constants/api.test.mjs +44 -0
- package/dist/constants/api.test.mjs.map +1 -0
- package/dist/constants/commands.test.cjs +29 -0
- package/dist/constants/commands.test.d.cts +1 -0
- package/dist/constants/commands.test.d.mts +2 -0
- package/dist/constants/commands.test.mjs +31 -0
- package/dist/constants/commands.test.mjs.map +1 -0
- package/dist/constants/devtools.test.cjs +46 -0
- package/dist/constants/devtools.test.d.cts +1 -0
- package/dist/constants/devtools.test.d.mts +2 -0
- package/dist/constants/devtools.test.mjs +48 -0
- package/dist/constants/devtools.test.mjs.map +1 -0
- package/dist/constants/environments.test.cjs +34 -0
- package/dist/constants/environments.test.d.cts +1 -0
- package/dist/constants/environments.test.d.mts +2 -0
- package/dist/constants/environments.test.mjs +36 -0
- package/dist/constants/environments.test.mjs.map +1 -0
- package/dist/constants/extensions.test.cjs +35 -0
- package/dist/constants/extensions.test.d.cts +1 -0
- package/dist/constants/extensions.test.d.mts +2 -0
- package/dist/constants/extensions.test.mjs +37 -0
- package/dist/constants/extensions.test.mjs.map +1 -0
- package/dist/constants/fs.test.cjs +34 -0
- package/dist/constants/fs.test.d.cts +1 -0
- package/dist/constants/fs.test.d.mts +2 -0
- package/dist/constants/fs.test.mjs +36 -0
- package/dist/constants/fs.test.mjs.map +1 -0
- package/dist/constants/hooks.test.cjs +29 -0
- package/dist/constants/hooks.test.d.cts +1 -0
- package/dist/constants/hooks.test.d.mts +2 -0
- package/dist/constants/hooks.test.mjs +31 -0
- package/dist/constants/hooks.test.mjs.map +1 -0
- package/dist/constants/log-level.test.cjs +76 -0
- package/dist/constants/log-level.test.d.cts +1 -0
- package/dist/constants/log-level.test.d.mts +2 -0
- package/dist/constants/log-level.test.mjs +78 -0
- package/dist/constants/log-level.test.mjs.map +1 -0
- package/dist/constants/meta.test.cjs +33 -0
- package/dist/constants/meta.test.d.cts +1 -0
- package/dist/constants/meta.test.d.mts +2 -0
- package/dist/constants/meta.test.mjs +35 -0
- package/dist/constants/meta.test.mjs.map +1 -0
- package/dist/constants/plugin.test.cjs +59 -0
- package/dist/constants/plugin.test.d.cts +1 -0
- package/dist/constants/plugin.test.d.mts +2 -0
- package/dist/constants/plugin.test.mjs +61 -0
- package/dist/constants/plugin.test.mjs.map +1 -0
- package/dist/context/base-context.cjs +8 -1
- package/dist/context/base-context.d.cts.map +1 -1
- package/dist/context/base-context.d.mts.map +1 -1
- package/dist/context/base-context.mjs +3 -1
- package/dist/context/base-context.mjs.map +1 -1
- package/dist/context/base-context.test.cjs +23 -0
- package/dist/context/base-context.test.d.cts +1 -0
- package/dist/context/base-context.test.d.mts +2 -0
- package/dist/context/base-context.test.mjs +25 -0
- package/dist/context/base-context.test.mjs.map +1 -0
- package/dist/context/context.cjs +8 -1
- package/dist/context/context.d.cts.map +1 -1
- package/dist/context/context.d.mts.map +1 -1
- package/dist/context/context.mjs +3 -1
- package/dist/context/context.mjs.map +1 -1
- package/dist/context/context.test.cjs +23 -0
- package/dist/context/context.test.d.cts +1 -0
- package/dist/context/context.test.d.mts +2 -0
- package/dist/context/context.test.mjs +25 -0
- package/dist/context/context.test.mjs.map +1 -0
- package/dist/context/environment-context.cjs +9 -1
- package/dist/context/environment-context.d.cts.map +1 -1
- package/dist/context/environment-context.d.mts.map +1 -1
- package/dist/context/environment-context.mjs +3 -1
- package/dist/context/environment-context.mjs.map +1 -1
- package/dist/context/environment-context.test.cjs +23 -0
- package/dist/context/environment-context.test.d.cts +1 -0
- package/dist/context/environment-context.test.d.mts +2 -0
- package/dist/context/environment-context.test.mjs +25 -0
- package/dist/context/environment-context.test.mjs.map +1 -0
- package/dist/context/execution-context.cjs +8 -1
- package/dist/context/execution-context.d.cts.map +1 -1
- package/dist/context/execution-context.d.mts.map +1 -1
- package/dist/context/execution-context.mjs +3 -1
- package/dist/context/execution-context.mjs.map +1 -1
- package/dist/context/execution-context.test.cjs +23 -0
- package/dist/context/execution-context.test.d.cts +1 -0
- package/dist/context/execution-context.test.d.mts +2 -0
- package/dist/context/execution-context.test.mjs +25 -0
- package/dist/context/execution-context.test.mjs.map +1 -0
- package/dist/context/plugin-context.cjs +9 -1
- package/dist/context/plugin-context.d.cts.map +1 -1
- package/dist/context/plugin-context.d.mts.map +1 -1
- package/dist/context/plugin-context.mjs +3 -1
- package/dist/context/plugin-context.mjs.map +1 -1
- package/dist/context/plugin-context.test.cjs +23 -0
- package/dist/context/plugin-context.test.d.cts +1 -0
- package/dist/context/plugin-context.test.d.mts +2 -0
- package/dist/context/plugin-context.test.mjs +25 -0
- package/dist/context/plugin-context.test.mjs.map +1 -0
- package/dist/lib/config.cjs +18 -0
- package/dist/lib/config.mjs +14 -1
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/config.test.cjs +23 -0
- package/dist/lib/config.test.d.cts +1 -0
- package/dist/lib/config.test.d.mts +2 -0
- package/dist/lib/config.test.mjs +25 -0
- package/dist/lib/config.test.mjs.map +1 -0
- package/dist/lib/context-helpers.cjs +11 -0
- package/dist/lib/context-helpers.d.cts.map +1 -1
- package/dist/lib/context-helpers.d.mts.map +1 -1
- package/dist/lib/context-helpers.mjs +6 -1
- package/dist/lib/context-helpers.mjs.map +1 -1
- package/dist/lib/context-helpers.test.cjs +23 -0
- package/dist/lib/context-helpers.test.d.cts +1 -0
- package/dist/lib/context-helpers.test.d.mts +2 -0
- package/dist/lib/context-helpers.test.mjs +25 -0
- package/dist/lib/context-helpers.test.mjs.map +1 -0
- package/dist/lib/entry.cjs +16 -0
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +11 -1
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/entry.test.cjs +23 -0
- package/dist/lib/entry.test.d.cts +1 -0
- package/dist/lib/entry.test.d.mts +2 -0
- package/dist/lib/entry.test.mjs +25 -0
- package/dist/lib/entry.test.mjs.map +1 -0
- package/dist/lib/environment.cjs +12 -0
- package/dist/lib/environment.d.cts.map +1 -1
- package/dist/lib/environment.d.mts.map +1 -1
- package/dist/lib/environment.mjs +8 -1
- package/dist/lib/environment.mjs.map +1 -1
- package/dist/lib/environment.test.cjs +23 -0
- package/dist/lib/environment.test.d.cts +1 -0
- package/dist/lib/environment.test.d.mts +2 -0
- package/dist/lib/environment.test.mjs +25 -0
- package/dist/lib/environment.test.mjs.map +1 -0
- package/dist/lib/events.cjs +9 -1
- package/dist/lib/events.d.cts.map +1 -1
- package/dist/lib/events.d.mts.map +1 -1
- package/dist/lib/events.mjs +4 -1
- package/dist/lib/events.mjs.map +1 -1
- package/dist/lib/events.test.cjs +23 -0
- package/dist/lib/events.test.d.cts +1 -0
- package/dist/lib/events.test.d.mts +2 -0
- package/dist/lib/events.test.mjs +25 -0
- package/dist/lib/events.test.mjs.map +1 -0
- package/dist/lib/generate-types.cjs +12 -0
- package/dist/lib/generate-types.d.cts.map +1 -1
- package/dist/lib/generate-types.d.mts.map +1 -1
- package/dist/lib/generate-types.mjs +7 -1
- package/dist/lib/generate-types.mjs.map +1 -1
- package/dist/lib/generate-types.test.cjs +23 -0
- package/dist/lib/generate-types.test.d.cts +1 -0
- package/dist/lib/generate-types.test.d.mts +2 -0
- package/dist/lib/generate-types.test.mjs +25 -0
- package/dist/lib/generate-types.test.mjs.map +1 -0
- package/dist/lib/hooks.cjs +12 -0
- package/dist/lib/hooks.d.cts.map +1 -1
- package/dist/lib/hooks.d.mts.map +1 -1
- package/dist/lib/hooks.mjs +8 -1
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/hooks.test.cjs +23 -0
- package/dist/lib/hooks.test.d.cts +1 -0
- package/dist/lib/hooks.test.d.mts +2 -0
- package/dist/lib/hooks.test.mjs +25 -0
- package/dist/lib/hooks.test.mjs.map +1 -0
- package/dist/lib/install-dependencies.cjs +9 -1
- package/dist/lib/install-dependencies.d.cts.map +1 -1
- package/dist/lib/install-dependencies.d.mts.map +1 -1
- package/dist/lib/install-dependencies.mjs +3 -1
- package/dist/lib/install-dependencies.mjs.map +1 -1
- package/dist/lib/install-dependencies.test.cjs +23 -0
- package/dist/lib/install-dependencies.test.d.cts +1 -0
- package/dist/lib/install-dependencies.test.d.mts +2 -0
- package/dist/lib/install-dependencies.test.mjs +25 -0
- package/dist/lib/install-dependencies.test.mjs.map +1 -0
- package/dist/lib/meta.test.cjs +35 -0
- package/dist/lib/meta.test.d.cts +1 -0
- package/dist/lib/meta.test.d.mts +2 -0
- package/dist/lib/meta.test.mjs +37 -0
- package/dist/lib/meta.test.mjs.map +1 -0
- package/dist/lib/plugins.cjs +11 -0
- package/dist/lib/plugins.d.cts.map +1 -1
- package/dist/lib/plugins.d.mts.map +1 -1
- package/dist/lib/plugins.mjs +7 -1
- package/dist/lib/plugins.mjs.map +1 -1
- package/dist/lib/plugins.test.cjs +23 -0
- package/dist/lib/plugins.test.d.cts +1 -0
- package/dist/lib/plugins.test.d.mts +2 -0
- package/dist/lib/plugins.test.mjs +25 -0
- package/dist/lib/plugins.test.mjs.map +1 -0
- package/dist/lib/resolver.cjs +8 -1
- package/dist/lib/resolver.mjs +3 -1
- package/dist/lib/resolver.mjs.map +1 -1
- package/dist/lib/resolver.test.cjs +23 -0
- package/dist/lib/resolver.test.d.cts +1 -0
- package/dist/lib/resolver.test.d.mts +2 -0
- package/dist/lib/resolver.test.mjs +25 -0
- package/dist/lib/resolver.test.mjs.map +1 -0
- package/dist/lib/streaming-channel.cjs +12 -1
- package/dist/lib/streaming-channel.d.cts.map +1 -1
- package/dist/lib/streaming-channel.d.mts.map +1 -1
- package/dist/lib/streaming-channel.mjs +6 -1
- package/dist/lib/streaming-channel.mjs.map +1 -1
- package/dist/lib/streaming-channel.test.cjs +23 -0
- package/dist/lib/streaming-channel.test.d.cts +1 -0
- package/dist/lib/streaming-channel.test.d.mts +2 -0
- package/dist/lib/streaming-channel.test.mjs +25 -0
- package/dist/lib/streaming-channel.test.mjs.map +1 -0
- package/dist/lib/typescript/ts-morph.cjs +11 -1
- package/dist/lib/typescript/ts-morph.d.cts.map +1 -1
- package/dist/lib/typescript/ts-morph.d.mts.map +1 -1
- package/dist/lib/typescript/ts-morph.mjs +6 -1
- package/dist/lib/typescript/ts-morph.mjs.map +1 -1
- package/dist/lib/typescript/ts-morph.test.cjs +23 -0
- package/dist/lib/typescript/ts-morph.test.d.cts +1 -0
- package/dist/lib/typescript/ts-morph.test.d.mts +2 -0
- package/dist/lib/typescript/ts-morph.test.mjs +25 -0
- package/dist/lib/typescript/ts-morph.test.mjs.map +1 -0
- package/dist/lib/typescript/tsconfig.cjs +19 -1
- package/dist/lib/typescript/tsconfig.d.cts.map +1 -1
- package/dist/lib/typescript/tsconfig.d.mts.map +1 -1
- package/dist/lib/typescript/tsconfig.mjs +14 -1
- package/dist/lib/typescript/tsconfig.mjs.map +1 -1
- package/dist/lib/typescript/tsconfig.test.cjs +23 -0
- package/dist/lib/typescript/tsconfig.test.d.cts +1 -0
- package/dist/lib/typescript/tsconfig.test.d.mts +2 -0
- package/dist/lib/typescript/tsconfig.test.mjs +25 -0
- package/dist/lib/typescript/tsconfig.test.mjs.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +11 -0
- package/dist/lib/unplugin/helpers.d.cts.map +1 -1
- package/dist/lib/unplugin/helpers.d.mts.map +1 -1
- package/dist/lib/unplugin/helpers.mjs +6 -1
- package/dist/lib/unplugin/helpers.mjs.map +1 -1
- package/dist/lib/unplugin/helpers.test.cjs +23 -0
- package/dist/lib/unplugin/helpers.test.d.cts +1 -0
- package/dist/lib/unplugin/helpers.test.d.mts +2 -0
- package/dist/lib/unplugin/helpers.test.mjs +25 -0
- package/dist/lib/unplugin/helpers.test.mjs.map +1 -0
- package/dist/lib/unplugin/module-resolution.cjs +8 -1
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/module-resolution.mjs +3 -1
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/module-resolution.test.cjs +23 -0
- package/dist/lib/unplugin/module-resolution.test.d.cts +1 -0
- package/dist/lib/unplugin/module-resolution.test.d.mts +2 -0
- package/dist/lib/unplugin/module-resolution.test.mjs +25 -0
- package/dist/lib/unplugin/module-resolution.test.mjs.map +1 -0
- package/dist/lib/unplugin/plugin.cjs +12 -1
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +6 -1
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.test.cjs +23 -0
- package/dist/lib/unplugin/plugin.test.d.cts +1 -0
- package/dist/lib/unplugin/plugin.test.d.mts +2 -0
- package/dist/lib/unplugin/plugin.test.mjs +25 -0
- package/dist/lib/unplugin/plugin.test.mjs.map +1 -0
- package/dist/lib/utilities/file-header.cjs +13 -0
- package/dist/lib/utilities/file-header.mjs +8 -1
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/file-header.test.cjs +23 -0
- package/dist/lib/utilities/file-header.test.d.cts +1 -0
- package/dist/lib/utilities/file-header.test.d.mts +2 -0
- package/dist/lib/utilities/file-header.test.mjs +25 -0
- package/dist/lib/utilities/file-header.test.mjs.map +1 -0
- package/dist/lib/utilities/format.cjs +11 -1
- package/dist/lib/utilities/format.mjs +6 -1
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/lib/utilities/format.test.cjs +23 -0
- package/dist/lib/utilities/format.test.d.cts +1 -0
- package/dist/lib/utilities/format.test.d.mts +2 -0
- package/dist/lib/utilities/format.test.mjs +25 -0
- package/dist/lib/utilities/format.test.mjs.map +1 -0
- package/dist/lib/utilities/source-file.cjs +12 -1
- package/dist/lib/utilities/source-file.mjs +7 -1
- package/dist/lib/utilities/source-file.mjs.map +1 -1
- package/dist/lib/utilities/source-file.test.cjs +23 -0
- package/dist/lib/utilities/source-file.test.d.cts +1 -0
- package/dist/lib/utilities/source-file.test.d.mts +2 -0
- package/dist/lib/utilities/source-file.test.mjs +25 -0
- package/dist/lib/utilities/source-file.test.mjs.map +1 -0
- package/dist/lib/utilities/source-map.cjs +8 -1
- package/dist/lib/utilities/source-map.mjs +3 -1
- package/dist/lib/utilities/source-map.mjs.map +1 -1
- package/dist/lib/utilities/source-map.test.cjs +23 -0
- package/dist/lib/utilities/source-map.test.d.cts +1 -0
- package/dist/lib/utilities/source-map.test.d.mts +2 -0
- package/dist/lib/utilities/source-map.test.mjs +25 -0
- package/dist/lib/utilities/source-map.test.mjs.map +1 -0
- package/dist/lib/utilities/write-file.cjs +9 -1
- package/dist/lib/utilities/write-file.mjs +3 -1
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/utilities/write-file.test.cjs +23 -0
- package/dist/lib/utilities/write-file.test.d.cts +1 -0
- package/dist/lib/utilities/write-file.test.d.mts +2 -0
- package/dist/lib/utilities/write-file.test.mjs +25 -0
- package/dist/lib/utilities/write-file.test.mjs.map +1 -0
- package/dist/lib/vfs.cjs +8 -1
- package/dist/lib/vfs.d.cts.map +1 -1
- package/dist/lib/vfs.d.mts.map +1 -1
- package/dist/lib/vfs.mjs +3 -1
- package/dist/lib/vfs.mjs.map +1 -1
- package/dist/lib/vfs.test.cjs +23 -0
- package/dist/lib/vfs.test.d.cts +1 -0
- package/dist/lib/vfs.test.d.mts +2 -0
- package/dist/lib/vfs.test.mjs +25 -0
- package/dist/lib/vfs.test.mjs.map +1 -0
- package/dist/plugin-base.cjs +12 -1
- package/dist/plugin-base.mjs +6 -1
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-base.test.cjs +23 -0
- package/dist/plugin-base.test.d.cts +1 -0
- package/dist/plugin-base.test.d.mts +2 -0
- package/dist/plugin-base.test.mjs +25 -0
- package/dist/plugin-base.test.mjs.map +1 -0
- package/dist/plugin-utils/build-helpers.cjs +8 -0
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/build-helpers.mjs +3 -1
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.test.cjs +23 -0
- package/dist/plugin-utils/build-helpers.test.d.cts +1 -0
- package/dist/plugin-utils/build-helpers.test.d.mts +2 -0
- package/dist/plugin-utils/build-helpers.test.mjs +25 -0
- package/dist/plugin-utils/build-helpers.test.mjs.map +1 -0
- package/dist/plugin-utils/combine-plugins.cjs +12 -1
- package/dist/plugin-utils/combine-plugins.mjs +6 -1
- package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
- package/dist/plugin-utils/combine-plugins.test.cjs +23 -0
- package/dist/plugin-utils/combine-plugins.test.d.cts +1 -0
- package/dist/plugin-utils/combine-plugins.test.d.mts +2 -0
- package/dist/plugin-utils/combine-plugins.test.mjs +25 -0
- package/dist/plugin-utils/combine-plugins.test.mjs.map +1 -0
- package/dist/plugin-utils/context-helpers.cjs +13 -0
- package/dist/plugin-utils/context-helpers.mjs +8 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.test.cjs +23 -0
- package/dist/plugin-utils/context-helpers.test.d.cts +1 -0
- package/dist/plugin-utils/context-helpers.test.d.mts +2 -0
- package/dist/plugin-utils/context-helpers.test.mjs +25 -0
- package/dist/plugin-utils/context-helpers.test.mjs.map +1 -0
- package/dist/plugin-utils/docs-helper.cjs +8 -0
- package/dist/plugin-utils/docs-helper.mjs +3 -1
- package/dist/plugin-utils/docs-helper.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.test.cjs +23 -0
- package/dist/plugin-utils/docs-helper.test.d.cts +1 -0
- package/dist/plugin-utils/docs-helper.test.d.mts +2 -0
- package/dist/plugin-utils/docs-helper.test.mjs +25 -0
- package/dist/plugin-utils/docs-helper.test.mjs.map +1 -0
- package/dist/plugin-utils/enable-plugin.cjs +9 -1
- package/dist/plugin-utils/enable-plugin.d.cts.map +1 -1
- package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
- package/dist/plugin-utils/enable-plugin.mjs +3 -1
- package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
- package/dist/plugin-utils/enable-plugin.test.cjs +23 -0
- package/dist/plugin-utils/enable-plugin.test.d.cts +1 -0
- package/dist/plugin-utils/enable-plugin.test.d.mts +2 -0
- package/dist/plugin-utils/enable-plugin.test.mjs +25 -0
- package/dist/plugin-utils/enable-plugin.test.mjs.map +1 -0
- package/dist/plugin-utils/extend.cjs +9 -1
- package/dist/plugin-utils/extend.d.cts.map +1 -1
- package/dist/plugin-utils/extend.d.mts.map +1 -1
- package/dist/plugin-utils/extend.mjs +3 -1
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/extend.test.cjs +23 -0
- package/dist/plugin-utils/extend.test.d.cts +1 -0
- package/dist/plugin-utils/extend.test.d.mts +2 -0
- package/dist/plugin-utils/extend.test.mjs +25 -0
- package/dist/plugin-utils/extend.test.mjs.map +1 -0
- package/dist/plugin-utils/filter.cjs +17 -0
- package/dist/plugin-utils/filter.mjs +13 -1
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/filter.test.cjs +23 -0
- package/dist/plugin-utils/filter.test.d.cts +1 -0
- package/dist/plugin-utils/filter.test.d.mts +2 -0
- package/dist/plugin-utils/filter.test.mjs +25 -0
- package/dist/plugin-utils/filter.test.mjs.map +1 -0
- package/dist/plugin-utils/format-package-json.cjs +9 -1
- package/dist/plugin-utils/format-package-json.mjs +3 -1
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.test.cjs +23 -0
- package/dist/plugin-utils/format-package-json.test.d.cts +1 -0
- package/dist/plugin-utils/format-package-json.test.d.mts +2 -0
- package/dist/plugin-utils/format-package-json.test.mjs +25 -0
- package/dist/plugin-utils/format-package-json.test.mjs.map +1 -0
- package/dist/plugin-utils/format.cjs +9 -1
- package/dist/plugin-utils/format.mjs +3 -1
- package/dist/plugin-utils/format.mjs.map +1 -1
- package/dist/plugin-utils/format.test.cjs +23 -0
- package/dist/plugin-utils/format.test.d.cts +1 -0
- package/dist/plugin-utils/format.test.d.mts +2 -0
- package/dist/plugin-utils/format.test.mjs +25 -0
- package/dist/plugin-utils/format.test.mjs.map +1 -0
- package/dist/plugin-utils/get-config-path.cjs +9 -1
- package/dist/plugin-utils/get-config-path.mjs +3 -1
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.test.cjs +23 -0
- package/dist/plugin-utils/get-config-path.test.d.cts +1 -0
- package/dist/plugin-utils/get-config-path.test.d.mts +2 -0
- package/dist/plugin-utils/get-config-path.test.mjs +25 -0
- package/dist/plugin-utils/get-config-path.test.mjs.map +1 -0
- package/dist/plugin-utils/helpers.cjs +25 -0
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +20 -1
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/helpers.test.cjs +23 -0
- package/dist/plugin-utils/helpers.test.d.cts +1 -0
- package/dist/plugin-utils/helpers.test.d.mts +2 -0
- package/dist/plugin-utils/helpers.test.mjs +25 -0
- package/dist/plugin-utils/helpers.test.mjs.map +1 -0
- package/dist/plugin-utils/install.cjs +12 -1
- package/dist/plugin-utils/install.mjs +6 -1
- package/dist/plugin-utils/install.mjs.map +1 -1
- package/dist/plugin-utils/install.test.cjs +23 -0
- package/dist/plugin-utils/install.test.d.cts +1 -0
- package/dist/plugin-utils/install.test.d.mts +2 -0
- package/dist/plugin-utils/install.test.mjs +25 -0
- package/dist/plugin-utils/install.test.mjs.map +1 -0
- package/dist/plugin-utils/logging.cjs +24 -0
- package/dist/plugin-utils/logging.mjs +20 -1
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/logging.test.cjs +23 -0
- package/dist/plugin-utils/logging.test.d.cts +1 -0
- package/dist/plugin-utils/logging.test.d.mts +2 -0
- package/dist/plugin-utils/logging.test.mjs +25 -0
- package/dist/plugin-utils/logging.test.mjs.map +1 -0
- package/dist/plugin-utils/merge.cjs +11 -1
- package/dist/plugin-utils/merge.d.cts.map +1 -1
- package/dist/plugin-utils/merge.d.mts.map +1 -1
- package/dist/plugin-utils/merge.mjs +6 -1
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/merge.test.cjs +23 -0
- package/dist/plugin-utils/merge.test.d.cts +1 -0
- package/dist/plugin-utils/merge.test.d.mts +2 -0
- package/dist/plugin-utils/merge.test.mjs +25 -0
- package/dist/plugin-utils/merge.test.mjs.map +1 -0
- package/dist/plugin-utils/modules.cjs +9 -1
- package/dist/plugin-utils/modules.mjs +4 -1
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/modules.test.cjs +23 -0
- package/dist/plugin-utils/modules.test.d.cts +1 -0
- package/dist/plugin-utils/modules.test.d.mts +2 -0
- package/dist/plugin-utils/modules.test.mjs +25 -0
- package/dist/plugin-utils/modules.test.mjs.map +1 -0
- package/dist/plugin-utils/paths.cjs +8 -0
- package/dist/plugin-utils/paths.mjs +3 -1
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/paths.test.cjs +23 -0
- package/dist/plugin-utils/paths.test.d.cts +1 -0
- package/dist/plugin-utils/paths.test.d.mts +2 -0
- package/dist/plugin-utils/paths.test.mjs +25 -0
- package/dist/plugin-utils/paths.test.mjs.map +1 -0
- package/dist/plugin-utils/virtual.cjs +17 -1
- package/dist/plugin-utils/virtual.mjs +12 -1
- package/dist/plugin-utils/virtual.mjs.map +1 -1
- package/dist/plugin-utils/virtual.test.cjs +23 -0
- package/dist/plugin-utils/virtual.test.d.cts +1 -0
- package/dist/plugin-utils/virtual.test.d.mts +2 -0
- package/dist/plugin-utils/virtual.test.mjs +25 -0
- package/dist/plugin-utils/virtual.test.mjs.map +1 -0
- package/dist/schemas/fs.d.cts.map +1 -1
- package/dist/schemas/fs.d.mts.map +1 -1
- package/dist/storage/base.cjs +9 -1
- package/dist/storage/base.d.cts.map +1 -1
- package/dist/storage/base.d.mts.map +1 -1
- package/dist/storage/base.mjs +3 -1
- package/dist/storage/base.mjs.map +1 -1
- package/dist/storage/base.test.cjs +23 -0
- package/dist/storage/base.test.d.cts +1 -0
- package/dist/storage/base.test.d.mts +2 -0
- package/dist/storage/base.test.mjs +25 -0
- package/dist/storage/base.test.mjs.map +1 -0
- package/dist/storage/file-system.cjs +9 -1
- package/dist/storage/file-system.mjs +3 -1
- package/dist/storage/file-system.mjs.map +1 -1
- package/dist/storage/file-system.test.cjs +23 -0
- package/dist/storage/file-system.test.d.cts +1 -0
- package/dist/storage/file-system.test.d.mts +2 -0
- package/dist/storage/file-system.test.mjs +25 -0
- package/dist/storage/file-system.test.mjs.map +1 -0
- package/dist/storage/helpers.cjs +12 -0
- package/dist/storage/helpers.mjs +7 -1
- package/dist/storage/helpers.mjs.map +1 -1
- package/dist/storage/helpers.test.cjs +23 -0
- package/dist/storage/helpers.test.d.cts +1 -0
- package/dist/storage/helpers.test.d.mts +2 -0
- package/dist/storage/helpers.test.mjs +25 -0
- package/dist/storage/helpers.test.mjs.map +1 -0
- package/dist/storage/virtual.cjs +9 -1
- package/dist/storage/virtual.d.cts.map +1 -1
- package/dist/storage/virtual.d.mts.map +1 -1
- package/dist/storage/virtual.mjs +3 -1
- package/dist/storage/virtual.mjs.map +1 -1
- package/dist/storage/virtual.test.cjs +23 -0
- package/dist/storage/virtual.test.d.cts +1 -0
- package/dist/storage/virtual.test.d.mts +2 -0
- package/dist/storage/virtual.test.mjs +25 -0
- package/dist/storage/virtual.test.mjs.map +1 -0
- package/package.json +257 -17
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
const require_lib_typescript_ts_morph = require('./ts-morph.cjs');
|
|
10
|
+
let vitest = require("vitest");
|
|
11
|
+
|
|
12
|
+
//#region src/lib/typescript/ts-morph.test.ts
|
|
13
|
+
(0, vitest.describe)("base/core/src/lib/typescript/ts-morph.ts", () => {
|
|
14
|
+
(0, vitest.it)("loads module exports", () => {
|
|
15
|
+
(0, vitest.expect)(require_lib_typescript_ts_morph.ts_morph_exports).toBeDefined();
|
|
16
|
+
(0, vitest.expect)(typeof require_lib_typescript_ts_morph.ts_morph_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
(0, vitest.it)("has at least one runtime export", () => {
|
|
19
|
+
(0, vitest.expect)(Object.keys(require_lib_typescript_ts_morph.ts_morph_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { ts_morph_exports } from "./ts-morph.mjs";
|
|
10
|
+
import { describe, expect, it } from "vitest";
|
|
11
|
+
|
|
12
|
+
//#region src/lib/typescript/ts-morph.test.ts
|
|
13
|
+
describe("base/core/src/lib/typescript/ts-morph.ts", () => {
|
|
14
|
+
it("loads module exports", () => {
|
|
15
|
+
expect(ts_morph_exports).toBeDefined();
|
|
16
|
+
expect(typeof ts_morph_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
it("has at least one runtime export", () => {
|
|
19
|
+
expect(Object.keys(ts_morph_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { };
|
|
25
|
+
//# sourceMappingURL=ts-morph.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-morph.test.mjs","names":["moduleExports"],"sources":["../../../src/lib/typescript/ts-morph.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./ts-morph\";\n\ndescribe(\"base/core/src/lib/typescript/ts-morph.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,kDAAkD;CACzD,GAAG,8BAA8B;EAC/B,OAAOA,gBAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,gBAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,gBAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
|
|
@@ -25,6 +25,18 @@ let typescript = require("typescript");
|
|
|
25
25
|
typescript = require_runtime.__toESM(typescript, 1);
|
|
26
26
|
|
|
27
27
|
//#region src/lib/typescript/tsconfig.ts
|
|
28
|
+
var tsconfig_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
29
|
+
findIncludeMatch: () => findIncludeMatch,
|
|
30
|
+
findMatch: () => findMatch,
|
|
31
|
+
getParsedTypeScriptConfig: () => getParsedTypeScriptConfig,
|
|
32
|
+
getTsconfigDtsPath: () => getTsconfigDtsPath,
|
|
33
|
+
getTsconfigFilePath: () => getTsconfigFilePath,
|
|
34
|
+
initializeTsconfig: () => initializeTsconfig,
|
|
35
|
+
isIncludeMatchFound: () => isIncludeMatchFound,
|
|
36
|
+
isMatchFound: () => isMatchFound,
|
|
37
|
+
resolveTsconfig: () => resolveTsconfig,
|
|
38
|
+
tryTsconfigFilePath: () => tryTsconfigFilePath
|
|
39
|
+
});
|
|
28
40
|
function getTsconfigDtsPath(context) {
|
|
29
41
|
return (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_file_path_fns.relativePath)((0, _stryke_path_join_paths.joinPaths)(context.config.cwd, context.config.root), (0, _stryke_path_file_path_fns.findFilePath)(context.typesPath)), (0, _stryke_path_file_path_fns.findFileName)(context.typesPath));
|
|
30
42
|
}
|
|
@@ -258,4 +270,10 @@ exports.initializeTsconfig = initializeTsconfig;
|
|
|
258
270
|
exports.isIncludeMatchFound = isIncludeMatchFound;
|
|
259
271
|
exports.isMatchFound = isMatchFound;
|
|
260
272
|
exports.resolveTsconfig = resolveTsconfig;
|
|
261
|
-
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
273
|
+
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
274
|
+
Object.defineProperty(exports, 'tsconfig_exports', {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: function () {
|
|
277
|
+
return tsconfig_exports;
|
|
278
|
+
}
|
|
279
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig.d.cts","names":[],"sources":["../../../src/lib/typescript/tscon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|
-
{"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"mappings":";;;;;;;;;iBAyCgB,kBAAA,yBACU,cAAA,GAAiB,cAAA,
|
|
1
|
+
{"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"mappings":";;;;;;;;;iBAyCgB,kBAAA,yBACU,cAAA,GAAiB,cAAA,4BAEzC,OAAA,EAAS,kBAAA,CAAmB,eAAA,EAAiB,cAAA;AAAA,iBAiJzB,kBAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,GACtC,OAAA,EAAS,QAAA,GAAW,OAAA;AAAA,iBA2CA,eAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,GACtC,OAAA,EAAS,QAAA,GAAW,OAAA;;;;;;;;AAzMtB;;iBAwTgB,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;;;;iBAmCc,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;AA9V4D;iBAqX9C,SAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,YACjB,UAAA,uBACU,MAAA;;;;;;;;iBAkCI,gBAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,sBACP,MAAA;;;;;;;;iBAuCI,YAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAM;;;;;;;;iBAYT,mBAAA,CACd,YAAA,EAAc,aAAA,EACd,KAAA,EAAO,aAAa;;;;;;AA/TO;AA2C7B;;;;;iBAySgB,yBAAA,CACd,aAAA,UACA,WAAA,UACA,QAAA,WACA,WAAA,GAAa,QAAA,EACb,oBAAA,GAAuB,QAAA,EACvB,IAAA,GAAM,EAAA,CAAG,eAAA,GACR,sBAAA"}
|
|
@@ -6,6 +6,7 @@ import __tsdown_shims_url from 'node:url'
|
|
|
6
6
|
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
7
|
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
8
|
|
|
9
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
9
10
|
import { existsSync } from "@stryke/fs/exists";
|
|
10
11
|
import { readJsonFile, readJsonFileSync } from "@stryke/fs/json";
|
|
11
12
|
import { appendPath } from "@stryke/path/append";
|
|
@@ -20,6 +21,18 @@ import { StormJSON } from "@stryke/json/storm-json";
|
|
|
20
21
|
import ts from "typescript";
|
|
21
22
|
|
|
22
23
|
//#region src/lib/typescript/tsconfig.ts
|
|
24
|
+
var tsconfig_exports = /* @__PURE__ */ __exportAll({
|
|
25
|
+
findIncludeMatch: () => findIncludeMatch,
|
|
26
|
+
findMatch: () => findMatch,
|
|
27
|
+
getParsedTypeScriptConfig: () => getParsedTypeScriptConfig,
|
|
28
|
+
getTsconfigDtsPath: () => getTsconfigDtsPath,
|
|
29
|
+
getTsconfigFilePath: () => getTsconfigFilePath,
|
|
30
|
+
initializeTsconfig: () => initializeTsconfig,
|
|
31
|
+
isIncludeMatchFound: () => isIncludeMatchFound,
|
|
32
|
+
isMatchFound: () => isMatchFound,
|
|
33
|
+
resolveTsconfig: () => resolveTsconfig,
|
|
34
|
+
tryTsconfigFilePath: () => tryTsconfigFilePath
|
|
35
|
+
});
|
|
23
36
|
function getTsconfigDtsPath(context) {
|
|
24
37
|
return joinPaths(relativePath(joinPaths(context.config.cwd, context.config.root), findFilePath(context.typesPath)), findFileName(context.typesPath));
|
|
25
38
|
}
|
|
@@ -244,5 +257,5 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
|
|
|
244
257
|
}
|
|
245
258
|
|
|
246
259
|
//#endregion
|
|
247
|
-
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
260
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath, tsconfig_exports };
|
|
248
261
|
//# sourceMappingURL=tsconfig.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig.mjs","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Diff, ObjectData } from \"@donedeal0/superdiff\";\nimport { getObjectDiff } from \"@donedeal0/superdiff\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile, readJsonFileSync } from \"@stryke/fs/json\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileName,\n findFilePath,\n relativePath\n} from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport chalk from \"chalk\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\nimport { ResolvedConfig } from \"../../types/config\";\nimport { EnvironmentContext } from \"../../types/context\";\nimport type { ParsedTypeScriptConfig, TSConfig } from \"../../types/tsconfig\";\n\nexport function getTsconfigDtsPath<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string {\n const dtsRelativePath = joinPaths(\n relativePath(\n joinPaths(context.config.cwd, context.config.root),\n findFilePath(context.typesPath)\n ),\n findFileName(context.typesPath)\n );\n\n return dtsRelativePath;\n}\n\nasync function resolveTsconfigChanges<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(\n context: EnvironmentContext<TResolvedConfig, TSystemContext>\n): Promise<TsConfigJson> {\n const tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw\n );\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n const tsconfigJson = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n tsconfigJson.compilerOptions ??= {};\n\n if (context.config.output.dts !== false) {\n const dtsRelativePath = getTsconfigDtsPath(context);\n\n if (\n !tsconfigJson.include?.some(filePattern =>\n isIncludeMatchFound(filePattern, [context.typesPath, dtsRelativePath])\n )\n ) {\n tsconfigJson.include ??= [];\n tsconfigJson.include.push(\n dtsRelativePath.startsWith(\"./\")\n ? dtsRelativePath.slice(2)\n : dtsRelativePath\n );\n }\n }\n\n if (\n !tsconfig.options.lib?.some(lib =>\n [\n \"lib.esnext.d.ts\",\n \"lib.es2021.d.ts\",\n \"lib.es2022.d.ts\",\n \"lib.es2023.d.ts\"\n ].includes(lib.toLowerCase())\n )\n ) {\n tsconfigJson.compilerOptions.lib ??= [];\n tsconfigJson.compilerOptions.lib.push(\"esnext\");\n }\n\n // if (tsconfig.options.module !== ts.ModuleKind.ESNext) {\n // tsconfigJson.compilerOptions.module = \"ESNext\";\n // }\n\n // if (\n // !tsconfig.options.target ||\n // ![\n // ts.ScriptTarget.ESNext,\n // ts.ScriptTarget.ES2024,\n // ts.ScriptTarget.ES2023,\n // ts.ScriptTarget.ES2022,\n // ts.ScriptTarget.ES2021\n // ].includes(tsconfig.options.target)\n // ) {\n // tsconfigJson.compilerOptions.target = \"ESNext\";\n // }\n\n // if (tsconfig.options.moduleResolution !== ts.ModuleResolutionKind.Bundler) {\n // tsconfigJson.compilerOptions.moduleResolution = \"Bundler\";\n // }\n\n // if (tsconfig.options.moduleDetection !== ts.ModuleDetectionKind.Force) {\n // tsconfigJson.compilerOptions.moduleDetection = \"force\";\n // }\n\n // if (tsconfig.options.allowSyntheticDefaultImports !== true) {\n // tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;\n // }\n\n // if (tsconfig.options.noImplicitOverride !== true) {\n // tsconfigJson.compilerOptions.noImplicitOverride = true;\n // }\n\n // if (tsconfig.options.noUncheckedIndexedAccess !== true) {\n // tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;\n // }\n\n // if (tsconfig.options.skipLibCheck !== true) {\n // tsconfigJson.compilerOptions.skipLibCheck = true;\n // }\n\n // if (tsconfig.options.resolveJsonModule !== true) {\n // tsconfigJson.compilerOptions.resolveJsonModule = true;\n // }\n\n // if (tsconfig.options.verbatimModuleSyntax !== false) {\n // tsconfigJson.compilerOptions.verbatimModuleSyntax = false;\n // }\n\n // if (tsconfig.options.allowJs !== true) {\n // tsconfigJson.compilerOptions.allowJs = true;\n // }\n\n // if (tsconfig.options.declaration !== true) {\n // tsconfigJson.compilerOptions.declaration = true;\n // }\n\n if (tsconfig.options.esModuleInterop !== true) {\n tsconfigJson.compilerOptions.esModuleInterop = true;\n }\n\n if (tsconfig.options.isolatedModules !== true) {\n tsconfigJson.compilerOptions.isolatedModules = true;\n }\n\n if (context.config.platform === \"node\") {\n if (\n !tsconfig.options.types?.some(\n type =>\n type.toLowerCase() === \"node\" || type.toLowerCase() === \"@types/node\"\n )\n ) {\n tsconfigJson.compilerOptions.types ??= [];\n tsconfigJson.compilerOptions.types.push(\"node\");\n }\n }\n\n return tsconfigJson;\n}\n\nexport async function initializeTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n context.debug(\n \"Initializing TypeScript configuration (tsconfig.json) for the Powerlines project.\"\n );\n\n if (!isPackageExists(\"typescript\")) {\n throw new Error(\n 'The TypeScript package is not installed. Please install the package using the command: \"npm install typescript --save-dev\"'\n );\n }\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n context.tsconfig.originalTsconfigJson =\n await readJsonFile<TsConfigJson>(tsconfigFilePath);\n\n context.tsconfig.tsconfigJson = await resolveTsconfigChanges<\n TResolvedConfig,\n TSystemContext\n >(context);\n\n context.debug(\n \"Writing updated TypeScript configuration (tsconfig.json) file to disk.\"\n );\n\n await context.fs.write(\n tsconfigFilePath,\n StormJSON.stringify(context.tsconfig.tsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw,\n context.tsconfig.originalTsconfigJson\n );\n}\n\nexport async function resolveTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n const updateTsconfigJson = await readJsonFile<TsConfigJson>(\n context.tsconfig.tsconfigFilePath\n );\n if (\n updateTsconfigJson?.compilerOptions?.types &&\n Array.isArray(updateTsconfigJson.compilerOptions.types) &&\n !updateTsconfigJson.compilerOptions.types.length\n ) {\n // If the types array is empty, we can safely remove it\n delete updateTsconfigJson.compilerOptions.types;\n }\n\n const result = getObjectDiff(\n context.tsconfig.originalTsconfigJson as NonNullable<ObjectData>,\n updateTsconfigJson as ObjectData,\n {\n ignoreArrayOrder: true,\n showOnly: {\n statuses: [\"added\", \"deleted\", \"updated\"],\n granularity: \"deep\"\n }\n }\n );\n\n const changes = [] as {\n field: string;\n status: \"added\" | \"deleted\" | \"updated\";\n previous: string;\n current: string;\n }[];\n const getChanges = (difference: Diff, property?: string) => {\n if (\n difference.status === \"added\" ||\n difference.status === \"deleted\" ||\n difference.status === \"updated\"\n ) {\n if (difference.diff) {\n for (const diff of difference.diff) {\n getChanges(\n diff,\n property\n ? `${property}.${difference.property}`\n : difference.property\n );\n }\n } else {\n changes.push({\n field: property\n ? `${property}.${difference.property}`\n : difference.property,\n status: difference.status,\n previous:\n difference.status === \"added\"\n ? \"---\"\n : StormJSON.stringify(difference.previousValue),\n current:\n difference.status === \"deleted\"\n ? \"---\"\n : StormJSON.stringify(difference.currentValue)\n });\n }\n }\n };\n\n for (const diff of result.diff) {\n getChanges(diff);\n }\n\n if (changes.length > 0) {\n context.warn(\n `Updating the following configuration values in \"${context.tsconfig.tsconfigFilePath}\" file:\n\n ${changes\n .map(\n (change, i) => `${chalk.bold.whiteBright(\n `${i + 1}. ${titleCase(change.status)} the ${change.field} field: `\n )}\n ${chalk.red(` - Previous: ${change.previous} `)}\n ${chalk.green(` - Updated: ${change.current} `)}\n `\n )\n .join(\"\\n\")}\n `\n );\n }\n\n await context.fs.write(\n context.tsconfig.tsconfigFilePath,\n StormJSON.stringify(updateTsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n if (!context.tsconfig) {\n throw new Error(\"Failed to parse the TypeScript configuration file.\");\n }\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, tsconfig);\n } else {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.app.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.lib.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.json\");\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n root\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, root);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, appendPath(root, cwd));\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,mBAGd,SAAsE;CAStE,OARwB,UACtB,aACE,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,IAAI,GACjD,aAAa,QAAQ,SAAS,CAChC,GACA,aAAa,QAAQ,SAAS,CAGX;AACvB;AAEA,eAAe,uBAIb,SACuB;CACvB,MAAM,WAAW,0BACf,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,UACf,QAAQ,OAAO,WACjB;CAQA,MAAM,eAAe,MAAM,aANF,oBACvB,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,QAGoD,CAAC;CACtE,aAAa,oBAAoB,CAAC;CAElC,IAAI,QAAQ,OAAO,OAAO,QAAQ,OAAO;EACvC,MAAM,kBAAkB,mBAAmB,OAAO;EAElD,IACE,CAAC,aAAa,SAAS,MAAK,gBAC1B,oBAAoB,aAAa,CAAC,QAAQ,WAAW,eAAe,CAAC,CACvE,GACA;GACA,aAAa,YAAY,CAAC;GAC1B,aAAa,QAAQ,KACnB,gBAAgB,WAAW,IAAI,IAC3B,gBAAgB,MAAM,CAAC,IACvB,eACN;EACF;CACF;CAEA,IACE,CAAC,SAAS,QAAQ,KAAK,MAAK,QAC1B;EACE;EACA;EACA;EACA;CACF,EAAE,SAAS,IAAI,YAAY,CAAC,CAC9B,GACA;EACA,aAAa,gBAAgB,QAAQ,CAAC;EACtC,aAAa,gBAAgB,IAAI,KAAK,QAAQ;CAChD;CA2DA,IAAI,SAAS,QAAQ,oBAAoB,MACvC,aAAa,gBAAgB,kBAAkB;CAGjD,IAAI,SAAS,QAAQ,oBAAoB,MACvC,aAAa,gBAAgB,kBAAkB;C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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH;;;;;;;;AASA,SAAgB,aACd,cACA,OACS;CACT,OAAO,UAAU,cAAc,KAAK,MAAM;AAC5C;;;;;;;;AASA,SAAgB,oBACd,cACA,OACS;CACT,OACE,iBACE,cACA,KACF,MAAM;AAEV;;;;;;;;;;;;AAaA,SAAgB,0BACd,eACA,aACA,UACA,cAAwB,CAAC,GACzB,sBACA,OAA2B,GAAG,KACN;CACxB,MAAM,mBAAmB,oBACvB,eACA,aACA,QACF;CACA,MAAM,eAAe,iBAA2B,gBAAgB;CAChE,IAAI,CAAC,cACH,MAAM,IAAI,MACR,2DAA2D,UACzD,aACA,YAAY,eACd,GACF;CAGF,MAAM,oBAAoB,GAAG,2BAC3B,KAAK,eAAe,CAAC,GAAG,YAAY,GACpC,MACA,WAAW,aAAa,aAAa,CACvC;CACA,IAAI,kBAAkB,OAAO,SAAS,GAAG;EACvC,MAAM,eAAe;EACvB,kBAAkB,OACjB,KACC,UACE,MACG,MAAM,aAAa,UAAa,MAAM,OACnC,IAAI,MAAM,SAAS,GAAG,MAAM,KAAK,OACjC,MAAM,MAAM,YAAY,SAAS,GAE3C,EACC,KAAK,IAAI,EAAE;;EAGV,MAAM,IAAI,MAAM,YAAY;CAC9B;CAEA,OAAO;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"tsconfig.mjs","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Diff, ObjectData } from \"@donedeal0/superdiff\";\nimport { getObjectDiff } from \"@donedeal0/superdiff\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile, readJsonFileSync } from \"@stryke/fs/json\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileName,\n findFilePath,\n relativePath\n} from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport chalk from \"chalk\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\nimport { ResolvedConfig } from \"../../types/config\";\nimport { EnvironmentContext } from \"../../types/context\";\nimport type { ParsedTypeScriptConfig, TSConfig } from \"../../types/tsconfig\";\n\nexport function getTsconfigDtsPath<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string {\n const dtsRelativePath = joinPaths(\n relativePath(\n joinPaths(context.config.cwd, context.config.root),\n findFilePath(context.typesPath)\n ),\n findFileName(context.typesPath)\n );\n\n return dtsRelativePath;\n}\n\nasync function resolveTsconfigChanges<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>(\n context: EnvironmentContext<TResolvedConfig, TSystemContext>\n): Promise<TsConfigJson> {\n const tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw\n );\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n const tsconfigJson = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n tsconfigJson.compilerOptions ??= {};\n\n if (context.config.output.dts !== false) {\n const dtsRelativePath = getTsconfigDtsPath(context);\n\n if (\n !tsconfigJson.include?.some(filePattern =>\n isIncludeMatchFound(filePattern, [context.typesPath, dtsRelativePath])\n )\n ) {\n tsconfigJson.include ??= [];\n tsconfigJson.include.push(\n dtsRelativePath.startsWith(\"./\")\n ? dtsRelativePath.slice(2)\n : dtsRelativePath\n );\n }\n }\n\n if (\n !tsconfig.options.lib?.some(lib =>\n [\n \"lib.esnext.d.ts\",\n \"lib.es2021.d.ts\",\n \"lib.es2022.d.ts\",\n \"lib.es2023.d.ts\"\n ].includes(lib.toLowerCase())\n )\n ) {\n tsconfigJson.compilerOptions.lib ??= [];\n tsconfigJson.compilerOptions.lib.push(\"esnext\");\n }\n\n // if (tsconfig.options.module !== ts.ModuleKind.ESNext) {\n // tsconfigJson.compilerOptions.module = \"ESNext\";\n // }\n\n // if (\n // !tsconfig.options.target ||\n // ![\n // ts.ScriptTarget.ESNext,\n // ts.ScriptTarget.ES2024,\n // ts.ScriptTarget.ES2023,\n // ts.ScriptTarget.ES2022,\n // ts.ScriptTarget.ES2021\n // ].includes(tsconfig.options.target)\n // ) {\n // tsconfigJson.compilerOptions.target = \"ESNext\";\n // }\n\n // if (tsconfig.options.moduleResolution !== ts.ModuleResolutionKind.Bundler) {\n // tsconfigJson.compilerOptions.moduleResolution = \"Bundler\";\n // }\n\n // if (tsconfig.options.moduleDetection !== ts.ModuleDetectionKind.Force) {\n // tsconfigJson.compilerOptions.moduleDetection = \"force\";\n // }\n\n // if (tsconfig.options.allowSyntheticDefaultImports !== true) {\n // tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;\n // }\n\n // if (tsconfig.options.noImplicitOverride !== true) {\n // tsconfigJson.compilerOptions.noImplicitOverride = true;\n // }\n\n // if (tsconfig.options.noUncheckedIndexedAccess !== true) {\n // tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;\n // }\n\n // if (tsconfig.options.skipLibCheck !== true) {\n // tsconfigJson.compilerOptions.skipLibCheck = true;\n // }\n\n // if (tsconfig.options.resolveJsonModule !== true) {\n // tsconfigJson.compilerOptions.resolveJsonModule = true;\n // }\n\n // if (tsconfig.options.verbatimModuleSyntax !== false) {\n // tsconfigJson.compilerOptions.verbatimModuleSyntax = false;\n // }\n\n // if (tsconfig.options.allowJs !== true) {\n // tsconfigJson.compilerOptions.allowJs = true;\n // }\n\n // if (tsconfig.options.declaration !== true) {\n // tsconfigJson.compilerOptions.declaration = true;\n // }\n\n if (tsconfig.options.esModuleInterop !== true) {\n tsconfigJson.compilerOptions.esModuleInterop = true;\n }\n\n if (tsconfig.options.isolatedModules !== true) {\n tsconfigJson.compilerOptions.isolatedModules = true;\n }\n\n if (context.config.platform === \"node\") {\n if (\n !tsconfig.options.types?.some(\n type =>\n type.toLowerCase() === \"node\" || type.toLowerCase() === \"@types/node\"\n )\n ) {\n tsconfigJson.compilerOptions.types ??= [];\n tsconfigJson.compilerOptions.types.push(\"node\");\n }\n }\n\n return tsconfigJson;\n}\n\nexport async function initializeTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n context.debug(\n \"Initializing TypeScript configuration (tsconfig.json) for the Powerlines project.\"\n );\n\n if (!isPackageExists(\"typescript\")) {\n throw new Error(\n 'The TypeScript package is not installed. Please install the package using the command: \"npm install typescript --save-dev\"'\n );\n }\n\n const tsconfigFilePath = getTsconfigFilePath(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n\n context.tsconfig.originalTsconfigJson =\n await readJsonFile<TsConfigJson>(tsconfigFilePath);\n\n context.tsconfig.tsconfigJson = await resolveTsconfigChanges<\n TResolvedConfig,\n TSystemContext\n >(context);\n\n context.debug(\n \"Writing updated TypeScript configuration (tsconfig.json) file to disk.\"\n );\n\n await context.fs.write(\n tsconfigFilePath,\n StormJSON.stringify(context.tsconfig.tsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig,\n context.config.tsconfigRaw,\n context.tsconfig.originalTsconfigJson\n );\n}\n\nexport async function resolveTsconfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> =\n EnvironmentContext<TResolvedConfig, TSystemContext>\n>(context: TContext): Promise<void> {\n const updateTsconfigJson = await readJsonFile<TsConfigJson>(\n context.tsconfig.tsconfigFilePath\n );\n if (\n updateTsconfigJson?.compilerOptions?.types &&\n Array.isArray(updateTsconfigJson.compilerOptions.types) &&\n !updateTsconfigJson.compilerOptions.types.length\n ) {\n // If the types array is empty, we can safely remove it\n delete updateTsconfigJson.compilerOptions.types;\n }\n\n const result = getObjectDiff(\n context.tsconfig.originalTsconfigJson as NonNullable<ObjectData>,\n updateTsconfigJson as ObjectData,\n {\n ignoreArrayOrder: true,\n showOnly: {\n statuses: [\"added\", \"deleted\", \"updated\"],\n granularity: \"deep\"\n }\n }\n );\n\n const changes = [] as {\n field: string;\n status: \"added\" | \"deleted\" | \"updated\";\n previous: string;\n current: string;\n }[];\n const getChanges = (difference: Diff, property?: string) => {\n if (\n difference.status === \"added\" ||\n difference.status === \"deleted\" ||\n difference.status === \"updated\"\n ) {\n if (difference.diff) {\n for (const diff of difference.diff) {\n getChanges(\n diff,\n property\n ? `${property}.${difference.property}`\n : difference.property\n );\n }\n } else {\n changes.push({\n field: property\n ? `${property}.${difference.property}`\n : difference.property,\n status: difference.status,\n previous:\n difference.status === \"added\"\n ? \"---\"\n : StormJSON.stringify(difference.previousValue),\n current:\n difference.status === \"deleted\"\n ? \"---\"\n : StormJSON.stringify(difference.currentValue)\n });\n }\n }\n };\n\n for (const diff of result.diff) {\n getChanges(diff);\n }\n\n if (changes.length > 0) {\n context.warn(\n `Updating the following configuration values in \"${context.tsconfig.tsconfigFilePath}\" file:\n\n ${changes\n .map(\n (change, i) => `${chalk.bold.whiteBright(\n `${i + 1}. ${titleCase(change.status)} the ${change.field} field: `\n )}\n ${chalk.red(` - Previous: ${change.previous} `)}\n ${chalk.green(` - Updated: ${change.current} `)}\n `\n )\n .join(\"\\n\")}\n `\n );\n }\n\n await context.fs.write(\n context.tsconfig.tsconfigFilePath,\n StormJSON.stringify(updateTsconfigJson)\n );\n\n context.tsconfig = getParsedTypeScriptConfig(\n context.config.cwd,\n context.config.root,\n context.config.tsconfig\n );\n if (!context.tsconfig) {\n throw new Error(\"Failed to parse the TypeScript configuration file.\");\n }\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, tsconfig);\n } else {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.app.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.lib.json\");\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(cwd, root, \"tsconfig.json\");\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n root\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n cwd: string,\n root: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, root);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, appendPath(root, cwd));\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,mBAGd,SAAsE;CAStE,OARwB,UACtB,aACE,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,IAAI,GACjD,aAAa,QAAQ,SAAS,CAChC,GACA,aAAa,QAAQ,SAAS,CAGX;AACvB;AAEA,eAAe,uBAIb,SACuB;CACvB,MAAM,WAAW,0BACf,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,UACf,QAAQ,OAAO,WACjB;CAQA,MAAM,eAAe,MAAM,aANF,oBACvB,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,QAAQ,OAAO,QAGoD,CAAC;CACtE,aAAa,oBAAoB,CAAC;CAElC,IAAI,QAAQ,OAAO,OAAO,QAAQ,OAAO;EACvC,MAAM,kBA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vB,kBAAkB,OACjB,KACC,UACE,MACG,MAAM,aAAa,UAAa,MAAM,OACnC,IAAI,MAAM,SAAS,GAAG,MAAM,KAAK,OACjC,MAAM,MAAM,YAAY,SAAS,GAE3C,EACC,KAAK,IAAI,EAAE;;EAGV,MAAM,IAAI,MAAM,YAAY;CAC9B;CAEA,OAAO;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
const require_lib_typescript_tsconfig = require('./tsconfig.cjs');
|
|
10
|
+
let vitest = require("vitest");
|
|
11
|
+
|
|
12
|
+
//#region src/lib/typescript/tsconfig.test.ts
|
|
13
|
+
(0, vitest.describe)("base/core/src/lib/typescript/tsconfig.ts", () => {
|
|
14
|
+
(0, vitest.it)("loads module exports", () => {
|
|
15
|
+
(0, vitest.expect)(require_lib_typescript_tsconfig.tsconfig_exports).toBeDefined();
|
|
16
|
+
(0, vitest.expect)(typeof require_lib_typescript_tsconfig.tsconfig_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
(0, vitest.it)("has at least one runtime export", () => {
|
|
19
|
+
(0, vitest.expect)(Object.keys(require_lib_typescript_tsconfig.tsconfig_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { tsconfig_exports } from "./tsconfig.mjs";
|
|
10
|
+
import { describe, expect, it } from "vitest";
|
|
11
|
+
|
|
12
|
+
//#region src/lib/typescript/tsconfig.test.ts
|
|
13
|
+
describe("base/core/src/lib/typescript/tsconfig.ts", () => {
|
|
14
|
+
it("loads module exports", () => {
|
|
15
|
+
expect(tsconfig_exports).toBeDefined();
|
|
16
|
+
expect(typeof tsconfig_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
it("has at least one runtime export", () => {
|
|
19
|
+
expect(Object.keys(tsconfig_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { };
|
|
25
|
+
//# sourceMappingURL=tsconfig.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsconfig.test.mjs","names":["moduleExports"],"sources":["../../../src/lib/typescript/tsconfig.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./tsconfig\";\n\ndescribe(\"base/core/src/lib/typescript/tsconfig.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,kDAAkD;CACzD,GAAG,8BAA8B;EAC/B,OAAOA,gBAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,gBAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,gBAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
|
|
@@ -7,11 +7,16 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
|
|
|
7
7
|
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
10
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
10
11
|
const require_constants_plugin = require('../../constants/plugin.cjs');
|
|
11
12
|
let defu = require("defu");
|
|
12
13
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
13
14
|
|
|
14
15
|
//#region src/lib/unplugin/helpers.ts
|
|
16
|
+
var helpers_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
17
|
+
combineContexts: () => combineContexts,
|
|
18
|
+
isUnpluginBuilderVariant: () => isUnpluginBuilderVariant
|
|
19
|
+
});
|
|
15
20
|
/**
|
|
16
21
|
* Merges a base plugin context with an unplugin context, combining their properties.
|
|
17
22
|
*
|
|
@@ -34,4 +39,10 @@ function isUnpluginBuilderVariant(str) {
|
|
|
34
39
|
|
|
35
40
|
//#endregion
|
|
36
41
|
exports.combineContexts = combineContexts;
|
|
42
|
+
Object.defineProperty(exports, 'helpers_exports', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return helpers_exports;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
37
48
|
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;AAgCA;;;;;iBAAgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,
|
|
1
|
+
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;AAgCA;;;;;iBAAgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,EACtC,QAAA,EAAU,SAAA,EAAW,QAAA,EAAU,SAAA,GAAY,SAAA,GAAY,SAAA;;;;;;;iBAUzC,wBAAA,CACd,GAAA,YACC,GAAA,IAAO,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;;;;;;;;iBAgCgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;;;;;;;;iBAgCgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,EACtC,QAAA,EAAU,SAAA,EAAW,QAAA,EAAU,SAAA,GAAY,SAAA,GAAY,SAAA;;;AAHzD;;;;iBAagB,wBAAA,CACd,GAAA,YACC,GAAA,IAAO,sBAAsB"}
|
|
@@ -6,11 +6,16 @@ import __tsdown_shims_url from 'node:url'
|
|
|
6
6
|
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
7
|
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
8
|
|
|
9
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
9
10
|
import { UNPLUGIN_BUILDER_VARIANTS } from "../../constants/plugin.mjs";
|
|
10
11
|
import { defu as defu$1 } from "defu";
|
|
11
12
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
12
13
|
|
|
13
14
|
//#region src/lib/unplugin/helpers.ts
|
|
15
|
+
var helpers_exports = /* @__PURE__ */ __exportAll({
|
|
16
|
+
combineContexts: () => combineContexts,
|
|
17
|
+
isUnpluginBuilderVariant: () => isUnpluginBuilderVariant
|
|
18
|
+
});
|
|
14
19
|
/**
|
|
15
20
|
* Merges a base plugin context with an unplugin context, combining their properties.
|
|
16
21
|
*
|
|
@@ -32,5 +37,5 @@ function isUnpluginBuilderVariant(str) {
|
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
//#endregion
|
|
35
|
-
export { combineContexts, isUnpluginBuilderVariant };
|
|
40
|
+
export { combineContexts, helpers_exports, isUnpluginBuilderVariant };
|
|
36
41
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","names":["defu"],"sources":["../../../src/lib/unplugin/helpers.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 { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { defu } from \"defu\";\nimport type { UnpluginBuildContext } from \"unplugin\";\nimport { UNPLUGIN_BUILDER_VARIANTS } from \"../../constants/plugin\";\nimport type { UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginBuilderVariant } from \"../../types/unplugin\";\n\n/**\n * Merges a base plugin context with an unplugin context, combining their properties.\n *\n * @param contextA - The base plugin context to merge into.\n * @param contextB - The unplugin context to merge from.\n * @returns The merged context.\n */\nexport function combineContexts<\n TContextA extends UnresolvedContext | UnpluginBuildContext,\n TContextB extends UnresolvedContext | UnpluginBuildContext\n>(contextA: TContextA, contextB: TContextB): TContextA & TContextB {\n return defu(contextA, contextB) as TContextA & TContextB;\n}\n\n/**\n * Checks if a value is a valid UnpluginBuilderVariant.\n *\n * @param str - The value to check.\n * @returns True if the value is a UnpluginBuilderVariant, false otherwise.\n */\nexport function isUnpluginBuilderVariant(\n str: unknown\n): str is UnpluginBuilderVariant {\n return (\n isSetString(str) &&\n UNPLUGIN_BUILDER_VARIANTS.includes(str as UnpluginBuilderVariant)\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":["defu"],"sources":["../../../src/lib/unplugin/helpers.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 { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { defu } from \"defu\";\nimport type { UnpluginBuildContext } from \"unplugin\";\nimport { UNPLUGIN_BUILDER_VARIANTS } from \"../../constants/plugin\";\nimport type { UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginBuilderVariant } from \"../../types/unplugin\";\n\n/**\n * Merges a base plugin context with an unplugin context, combining their properties.\n *\n * @param contextA - The base plugin context to merge into.\n * @param contextB - The unplugin context to merge from.\n * @returns The merged context.\n */\nexport function combineContexts<\n TContextA extends UnresolvedContext | UnpluginBuildContext,\n TContextB extends UnresolvedContext | UnpluginBuildContext\n>(contextA: TContextA, contextB: TContextB): TContextA & TContextB {\n return defu(contextA, contextB) as TContextA & TContextB;\n}\n\n/**\n * Checks if a value is a valid UnpluginBuilderVariant.\n *\n * @param str - The value to check.\n * @returns True if the value is a UnpluginBuilderVariant, false otherwise.\n */\nexport function isUnpluginBuilderVariant(\n str: unknown\n): str is UnpluginBuilderVariant {\n return (\n isSetString(str) &&\n UNPLUGIN_BUILDER_VARIANTS.includes(str as UnpluginBuilderVariant)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,gBAGd,UAAqB,UAA4C;CACjE,OAAOA,OAAK,UAAU,QAAQ;AAChC;;;;;;;AAQA,SAAgB,yBACd,KAC+B;CAC/B,OACE,YAAY,GAAG,KACf,0BAA0B,SAAS,GAA6B;AAEpE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
const require_lib_unplugin_helpers = require('./helpers.cjs');
|
|
10
|
+
let vitest = require("vitest");
|
|
11
|
+
|
|
12
|
+
//#region src/lib/unplugin/helpers.test.ts
|
|
13
|
+
(0, vitest.describe)("base/core/src/lib/unplugin/helpers.ts", () => {
|
|
14
|
+
(0, vitest.it)("loads module exports", () => {
|
|
15
|
+
(0, vitest.expect)(require_lib_unplugin_helpers.helpers_exports).toBeDefined();
|
|
16
|
+
(0, vitest.expect)(typeof require_lib_unplugin_helpers.helpers_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
(0, vitest.it)("has at least one runtime export", () => {
|
|
19
|
+
(0, vitest.expect)(Object.keys(require_lib_unplugin_helpers.helpers_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { helpers_exports } from "./helpers.mjs";
|
|
10
|
+
import { describe, expect, it } from "vitest";
|
|
11
|
+
|
|
12
|
+
//#region src/lib/unplugin/helpers.test.ts
|
|
13
|
+
describe("base/core/src/lib/unplugin/helpers.ts", () => {
|
|
14
|
+
it("loads module exports", () => {
|
|
15
|
+
expect(helpers_exports).toBeDefined();
|
|
16
|
+
expect(typeof helpers_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
it("has at least one runtime export", () => {
|
|
19
|
+
expect(Object.keys(helpers_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { };
|
|
25
|
+
//# sourceMappingURL=helpers.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.test.mjs","names":["moduleExports"],"sources":["../../../src/lib/unplugin/helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./helpers\";\n\ndescribe(\"base/core/src/lib/unplugin/helpers.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,+CAA+C;CACtD,GAAG,8BAA8B;EAC/B,OAAOA,eAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,eAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,eAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
|
|
@@ -16,6 +16,7 @@ defu = require_runtime.__toESM(defu, 1);
|
|
|
16
16
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
17
17
|
|
|
18
18
|
//#region src/lib/unplugin/module-resolution.ts
|
|
19
|
+
var module_resolution_exports = /* @__PURE__ */ require_runtime.__exportAll({ createUnpluginModuleResolutionFunctions: () => createUnpluginModuleResolutionFunctions });
|
|
19
20
|
/**
|
|
20
21
|
* Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
|
|
21
22
|
*
|
|
@@ -103,4 +104,10 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
//#endregion
|
|
106
|
-
exports.createUnpluginModuleResolutionFunctions = createUnpluginModuleResolutionFunctions;
|
|
107
|
+
exports.createUnpluginModuleResolutionFunctions = createUnpluginModuleResolutionFunctions;
|
|
108
|
+
Object.defineProperty(exports, 'module_resolution_exports', {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return module_resolution_exports;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;;UAmCiB,8CAAA;;AAAjB;;;;;;;;EAUE,MAAA;EAQkC;AAgBpC;;;;;EAhBE,SAAA,GAAY,OAAO,CAAC,cAAA;AAAA;;;;;;;;;;;;;AAqBC;iBALP,uCAAA,kBACG,iBAAA,
|
|
1
|
+
{"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;;UAmCiB,8CAAA;;AAAjB;;;;;;;;EAUE,MAAA;EAQkC;AAgBpC;;;;;EAhBE,SAAA,GAAY,OAAO,CAAC,cAAA;AAAA;;;;;;;;;;;;;AAqBC;iBALP,uCAAA,kBACG,iBAAA,EAEjB,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,8CAAA,GACR,IAAA,CAAK,eAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;;;;UAmCiB,8CAAA;;;;;;;;;;EAUf,MAAA;EAV6D;;;;;;EAkB7D,SAAA,GAAY,OAAO,CAAC,cAAA;AAAA;AAAc;AAgBpC;;;;;;;;;;;;AAhBoC,iBAgBpB,uCAAA,kBACG,iBAAA,
|
|
1
|
+
{"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;;;;UAmCiB,8CAAA;;;;;;;;;;EAUf,MAAA;EAV6D;;;;;;EAkB7D,SAAA,GAAY,OAAO,CAAC,cAAA;AAAA;AAAc;AAgBpC;;;;;;;;;;;;AAhBoC,iBAgBpB,uCAAA,kBACG,iBAAA,EAEjB,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,8CAAA,GACR,IAAA,CAAK,eAAA"}
|
|
@@ -6,6 +6,7 @@ import __tsdown_shims_url from 'node:url'
|
|
|
6
6
|
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
7
|
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
8
|
|
|
9
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
9
10
|
import { VIRTUAL_MODULE_PREFIX_REGEX, addVirtualPrefix, removeVirtualPrefix } from "../../plugin-utils/virtual.mjs";
|
|
10
11
|
import "../../plugin-utils/index.mjs";
|
|
11
12
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
@@ -13,6 +14,7 @@ import defu from "defu";
|
|
|
13
14
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
14
15
|
|
|
15
16
|
//#region src/lib/unplugin/module-resolution.ts
|
|
17
|
+
var module_resolution_exports = /* @__PURE__ */ __exportAll({ createUnpluginModuleResolutionFunctions: () => createUnpluginModuleResolutionFunctions });
|
|
16
18
|
/**
|
|
17
19
|
* Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
|
|
18
20
|
*
|
|
@@ -100,5 +102,5 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
//#endregion
|
|
103
|
-
export { createUnpluginModuleResolutionFunctions };
|
|
105
|
+
export { createUnpluginModuleResolutionFunctions, module_resolution_exports };
|
|
104
106
|
//# sourceMappingURL=module-resolution.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.mjs","names":[],"sources":["../../../src/lib/unplugin/module-resolution.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport { LoadResult } from \"rollup\";\nimport type {\n UnpluginBuildContext,\n UnpluginContext,\n UnpluginOptions\n} from \"unplugin\";\nimport {\n addVirtualPrefix,\n removeVirtualPrefix,\n VIRTUAL_MODULE_PREFIX_REGEX\n} from \"../../plugin-utils\";\nimport { ResolveResult, UnresolvedContext } from \"../../types/context\";\nimport { ResolveOptions } from \"../../types/fs\";\n\nexport interface CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * An indicator of whether to prefix virtual module IDs with a specific string. This is useful for ensuring that virtual modules are only processed by the plugin and not by other plugins or the bundler itself.\n *\n * @remarks\n * - If set to `true`, virtual module IDs will be prefixed with the string `__powerlines-virtual:`.\n * - If set to `false`, no prefix will be added to virtual module IDs.\n *\n * @defaultValue true\n */\n prefix?: boolean;\n\n /**\n * Optional overrides for the module resolution configuration.\n *\n * @remarks\n * This allows you to customize the behavior of the module resolution hooks by providing specific configuration options.\n */\n overrides?: Partial<ResolveOptions>;\n}\n\n/**\n * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.\n *\n * @remarks\n * This includes the `resolveId` and `load` hooks.\n *\n * @see https://rollupjs.org/plugin-development/#resolveid\n * @see https://rollupjs.org/plugin-development/#load\n *\n * @param context - The plugin context.\n * @param options - Options for creating the module resolution functions.\n * @returns The module resolution hooks (`resolveId` and `load`).\n */\nexport function createUnpluginModuleResolutionFunctions<\n TContext extends UnresolvedContext\n>(\n context: TContext,\n options: CreateUnpluginModuleResolutionFunctionsOptions = {}\n): Pick<UnpluginOptions, \"resolveId\" | \"load\"> {\n return {\n async resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n opts: {\n isEntry: boolean;\n } = { isEntry: false }\n ): Promise<string | ResolveResult | null | undefined> {\n const normalizedId = removeVirtualPrefix(id);\n const normalizedImporter = importer\n ? removeVirtualPrefix(importer)\n : undefined;\n\n let result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.resolve(\n normalizedId,\n normalizedImporter,\n defu(options.overrides ?? {}, {\n isFile: true,\n ...opts\n })\n );\n if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n return null;\n },\n load: {\n filter:\n options.prefix !== false\n ? {\n id: VIRTUAL_MODULE_PREFIX_REGEX\n }\n : undefined,\n async handler(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult | null | undefined> {\n const normalizedId = removeVirtualPrefix(id);\n\n let result = await context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n normalizedId\n );\n if (result) {\n return result;\n }\n\n result = await context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n normalizedId\n );\n if (result) {\n return result;\n }\n\n result = await context.load(normalizedId);\n if (result) {\n return result;\n }\n\n return context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n normalizedId\n );\n }\n }\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-resolution.mjs","names":[],"sources":["../../../src/lib/unplugin/module-resolution.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport { LoadResult } from \"rollup\";\nimport type {\n UnpluginBuildContext,\n UnpluginContext,\n UnpluginOptions\n} from \"unplugin\";\nimport {\n addVirtualPrefix,\n removeVirtualPrefix,\n VIRTUAL_MODULE_PREFIX_REGEX\n} from \"../../plugin-utils\";\nimport { ResolveResult, UnresolvedContext } from \"../../types/context\";\nimport { ResolveOptions } from \"../../types/fs\";\n\nexport interface CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * An indicator of whether to prefix virtual module IDs with a specific string. This is useful for ensuring that virtual modules are only processed by the plugin and not by other plugins or the bundler itself.\n *\n * @remarks\n * - If set to `true`, virtual module IDs will be prefixed with the string `__powerlines-virtual:`.\n * - If set to `false`, no prefix will be added to virtual module IDs.\n *\n * @defaultValue true\n */\n prefix?: boolean;\n\n /**\n * Optional overrides for the module resolution configuration.\n *\n * @remarks\n * This allows you to customize the behavior of the module resolution hooks by providing specific configuration options.\n */\n overrides?: Partial<ResolveOptions>;\n}\n\n/**\n * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.\n *\n * @remarks\n * This includes the `resolveId` and `load` hooks.\n *\n * @see https://rollupjs.org/plugin-development/#resolveid\n * @see https://rollupjs.org/plugin-development/#load\n *\n * @param context - The plugin context.\n * @param options - Options for creating the module resolution functions.\n * @returns The module resolution hooks (`resolveId` and `load`).\n */\nexport function createUnpluginModuleResolutionFunctions<\n TContext extends UnresolvedContext\n>(\n context: TContext,\n options: CreateUnpluginModuleResolutionFunctionsOptions = {}\n): Pick<UnpluginOptions, \"resolveId\" | \"load\"> {\n return {\n async resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n opts: {\n isEntry: boolean;\n } = { isEntry: false }\n ): Promise<string | ResolveResult | null | undefined> {\n const normalizedId = removeVirtualPrefix(id);\n const normalizedImporter = importer\n ? removeVirtualPrefix(importer)\n : undefined;\n\n let result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.resolve(\n normalizedId,\n normalizedImporter,\n defu(options.overrides ?? {}, {\n isFile: true,\n ...opts\n })\n );\n if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n result = await context.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n normalizedId,\n normalizedImporter,\n opts\n );\n if (isSetString(result)) {\n return result;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id:\n result.virtual && options.prefix !== false\n ? addVirtualPrefix(result.id)\n : result.id\n };\n }\n\n return null;\n },\n load: {\n filter:\n options.prefix !== false\n ? {\n id: VIRTUAL_MODULE_PREFIX_REGEX\n }\n : undefined,\n async handler(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult | null | undefined> {\n const normalizedId = removeVirtualPrefix(id);\n\n let result = await context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n normalizedId\n );\n if (result) {\n return result;\n }\n\n result = await context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n normalizedId\n );\n if (result) {\n return result;\n }\n\n result = await context.load(normalizedId);\n if (result) {\n return result;\n }\n\n return context.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n normalizedId\n );\n }\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,SAAgB,wCAGd,SACA,UAA0D,CAAC,GACd;CAC7C,OAAO;EACL,MAAM,UAEJ,IACA,UACA,OAEI,EAAE,SAAS,MAAM,GAC+B;GACpD,MAAM,eAAe,oBAAoB,EAAE;GAC3C,MAAM,qBAAqB,WACvB,oBAAoB,QAAQ,IAC5B;GAEJ,IAAI,SAAS,MAAM,QAAQ,SACzB,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;GACT,GACA,cACA,oBACA,IACF;GACA,IAAI,YAAY,MAAM,GACpB,OAAO;QACF,IAAI,YAAY,MAAM,GAC3B,OAAO;IACL,GAAG;IACH,IACE,OAAO,WAAW,QAAQ,WAAW,QACjC,iBAAiB,OAAO,EAAE,IAC1B,OAAO;GACf;GAGF,SAAS,MAAM,QAAQ,SACrB,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;GACT,GACA,cACA,oBACA,IACF;GACA,IAAI,YAAY,MAAM,GACpB,OAAO;QACF,IAAI,YAAY,MAAM,GAC3B,OAAO;IACL,GAAG;IACH,IACE,OAAO,WAAW,QAAQ,WAAW,QACjC,iBAAiB,OAAO,EAAE,IAC1B,OAAO;GACf;GAGF,SAAS,MAAM,QAAQ,QACrB,cACA,oBACA,KAAK,QAAQ,aAAa,CAAC,GAAG;IAC5B,QAAQ;IACR,GAAG;GACL,CAAC,CACH;GACA,IAAI,YAAY,MAAM,GACpB,OAAO;IACL,GAAG;IACH,IACE,OAAO,WAAW,QAAQ,WAAW,QACjC,iBAAiB,OAAO,EAAE,IAC1B,OAAO;GACf;GAGF,SAAS,MAAM,QAAQ,SACrB,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;GACT,GACA,cACA,oBACA,IACF;GACA,IAAI,YAAY,MAAM,GACpB,OAAO;QACF,IAAI,YAAY,MAAM,GAC3B,OAAO;IACL,GAAG;IACH,IACE,OAAO,WAAW,QAAQ,WAAW,QACjC,iBAAiB,OAAO,EAAE,IAC1B,OAAO;GACf;GAGF,OAAO;EACT;EACA,MAAM;GACJ,QACE,QAAQ,WAAW,QACf,EACE,IAAI,4BACN,IACA;GACN,MAAM,QAEJ,IACwC;IACxC,MAAM,eAAe,oBAAoB,EAAE;IAE3C,IAAI,SAAS,MAAM,QAAQ,SACzB,QACA;KACE,YAAY;KACZ,QAAQ;KACR,OAAO;IACT,GACA,YACF;IACA,IAAI,QACF,OAAO;IAGT,SAAS,MAAM,QAAQ,SACrB,QACA;KACE,YAAY;KACZ,QAAQ;KACR,OAAO;IACT,GACA,YACF;IACA,IAAI,QACF,OAAO;IAGT,SAAS,MAAM,QAAQ,KAAK,YAAY;IACxC,IAAI,QACF,OAAO;IAGT,OAAO,QAAQ,SACb,QACA;KACE,YAAY;KACZ,QAAQ;KACR,OAAO;IACT,GACA,YACF;GACF;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
const require_lib_unplugin_module_resolution = require('./module-resolution.cjs');
|
|
10
|
+
let vitest = require("vitest");
|
|
11
|
+
|
|
12
|
+
//#region src/lib/unplugin/module-resolution.test.ts
|
|
13
|
+
(0, vitest.describe)("base/core/src/lib/unplugin/module-resolution.ts", () => {
|
|
14
|
+
(0, vitest.it)("loads module exports", () => {
|
|
15
|
+
(0, vitest.expect)(require_lib_unplugin_module_resolution.module_resolution_exports).toBeDefined();
|
|
16
|
+
(0, vitest.expect)(typeof require_lib_unplugin_module_resolution.module_resolution_exports).toBe("object");
|
|
17
|
+
});
|
|
18
|
+
(0, vitest.it)("has at least one runtime export", () => {
|
|
19
|
+
(0, vitest.expect)(Object.keys(require_lib_unplugin_module_resolution.module_resolution_exports).length).toBeGreaterThan(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|