@powerlines/core 0.9.1 → 0.9.2
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/constants/api.cjs +18 -0
- package/dist/constants/api.d.cts +6 -0
- package/dist/constants/api.d.cts.map +1 -0
- package/dist/constants/api.d.mts +6 -0
- package/dist/constants/api.d.mts.map +1 -0
- package/dist/constants/api.mjs +16 -0
- package/dist/constants/api.mjs.map +1 -0
- package/dist/constants/commands.cjs +3 -11
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.cts.map +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.d.mts.map +1 -1
- package/dist/constants/commands.mjs +3 -11
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/devtools.cjs +23 -0
- package/dist/constants/devtools.d.cts +13 -0
- package/dist/constants/devtools.d.cts.map +1 -0
- package/dist/constants/devtools.d.mts +13 -0
- package/dist/constants/devtools.d.mts.map +1 -0
- package/dist/constants/devtools.mjs +14 -0
- package/dist/constants/devtools.mjs.map +1 -0
- package/dist/constants/environments.cjs +1 -0
- package/dist/constants/extensions.cjs +21 -0
- package/dist/constants/extensions.d.cts +5 -0
- package/dist/constants/extensions.d.cts.map +1 -0
- package/dist/constants/extensions.d.mts +5 -0
- package/dist/constants/extensions.d.mts.map +1 -0
- package/dist/constants/extensions.mjs +20 -0
- package/dist/constants/extensions.mjs.map +1 -0
- package/dist/constants/fs.cjs +1 -0
- package/dist/constants/hooks.cjs +1 -0
- package/dist/constants/index.cjs +48 -24
- package/dist/constants/index.d.cts +5 -1
- package/dist/constants/index.d.mts +5 -1
- package/dist/constants/index.mjs +6 -2
- package/dist/constants/log-level.cjs +90 -0
- package/dist/constants/log-level.d.cts +63 -0
- package/dist/constants/log-level.d.cts.map +1 -0
- package/dist/constants/log-level.d.mts +63 -0
- package/dist/constants/log-level.d.mts.map +1 -0
- package/dist/constants/log-level.mjs +82 -0
- package/dist/constants/log-level.mjs.map +1 -0
- package/dist/constants/meta.cjs +1 -0
- package/dist/constants/plugin.cjs +3 -2
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/context/base-context.cjs +127 -0
- package/dist/context/base-context.d.cts +81 -0
- package/dist/context/base-context.d.cts.map +1 -0
- package/dist/context/base-context.d.mts +81 -0
- package/dist/context/base-context.d.mts.map +1 -0
- package/dist/context/base-context.mjs +125 -0
- package/dist/context/base-context.mjs.map +1 -0
- package/dist/context/context.cjs +934 -0
- package/dist/context/context.d.cts +369 -0
- package/dist/context/context.d.cts.map +1 -0
- package/dist/context/context.d.mts +369 -0
- package/dist/context/context.d.mts.map +1 -0
- package/dist/context/context.mjs +932 -0
- package/dist/context/context.mjs.map +1 -0
- package/dist/context/environment-context.cjs +219 -0
- package/dist/context/environment-context.d.cts +100 -0
- package/dist/context/environment-context.d.cts.map +1 -0
- package/dist/context/environment-context.d.mts +100 -0
- package/dist/context/environment-context.d.mts.map +1 -0
- package/dist/context/environment-context.mjs +218 -0
- package/dist/context/environment-context.mjs.map +1 -0
- package/dist/context/execution-context.cjs +230 -0
- package/dist/context/execution-context.d.cts +101 -0
- package/dist/context/execution-context.d.cts.map +1 -0
- package/dist/context/execution-context.d.mts +101 -0
- package/dist/context/execution-context.d.mts.map +1 -0
- package/dist/context/execution-context.mjs +228 -0
- package/dist/context/execution-context.mjs.map +1 -0
- package/dist/context/index.cjs +12 -0
- package/dist/context/index.d.cts +6 -0
- package/dist/context/index.d.mts +6 -0
- package/dist/context/index.mjs +7 -0
- package/dist/context/plugin-context.cjs +83 -0
- package/dist/context/plugin-context.d.cts +18 -0
- package/dist/context/plugin-context.d.cts.map +1 -0
- package/dist/context/plugin-context.d.mts +18 -0
- package/dist/context/plugin-context.d.mts.map +1 -0
- package/dist/context/plugin-context.mjs +82 -0
- package/dist/context/plugin-context.mjs.map +1 -0
- package/dist/index.cjs +62 -6
- package/dist/index.d.cts +23 -11
- package/dist/index.d.mts +23 -11
- package/dist/index.mjs +17 -5
- package/dist/lib/config.cjs +167 -28
- package/dist/lib/config.d.cts +95 -14
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +95 -14
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +160 -28
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +43 -0
- package/dist/lib/context-helpers.d.cts +19 -0
- package/dist/lib/context-helpers.d.cts.map +1 -0
- package/dist/lib/context-helpers.d.mts +19 -0
- package/dist/lib/context-helpers.d.mts.map +1 -0
- package/dist/lib/context-helpers.mjs +41 -0
- package/dist/lib/context-helpers.mjs.map +1 -0
- package/dist/lib/entry.cjs +9 -9
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +9 -9
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +72 -0
- package/dist/lib/environment.d.cts +12 -0
- package/dist/lib/environment.d.cts.map +1 -0
- package/dist/lib/environment.d.mts +12 -0
- package/dist/lib/environment.d.mts.map +1 -0
- package/dist/lib/environment.mjs +67 -0
- package/dist/lib/environment.mjs.map +1 -0
- package/dist/lib/events.cjs +43 -0
- package/dist/lib/events.d.cts +10 -0
- package/dist/lib/events.d.cts.map +1 -0
- package/dist/lib/events.d.mts +10 -0
- package/dist/lib/events.d.mts.map +1 -0
- package/dist/lib/events.mjs +42 -0
- package/dist/lib/events.mjs.map +1 -0
- package/dist/lib/generate-types.cjs +371 -0
- package/dist/lib/generate-types.d.cts +67 -0
- package/dist/lib/generate-types.d.cts.map +1 -0
- package/dist/lib/generate-types.d.mts +67 -0
- package/dist/lib/generate-types.d.mts.map +1 -0
- package/dist/lib/generate-types.mjs +368 -0
- package/dist/lib/generate-types.mjs.map +1 -0
- package/dist/lib/hooks.cjs +152 -0
- package/dist/lib/hooks.d.cts +28 -0
- package/dist/lib/hooks.d.cts.map +1 -0
- package/dist/lib/hooks.d.mts +28 -0
- package/dist/lib/hooks.d.mts.map +1 -0
- package/dist/lib/hooks.mjs +147 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.cjs +64 -6
- package/dist/lib/index.d.cts +15 -3
- package/dist/lib/index.d.mts +15 -3
- package/dist/lib/index.mjs +19 -5
- package/dist/lib/install-dependencies.cjs +25 -0
- package/dist/lib/install-dependencies.d.cts +12 -0
- package/dist/lib/install-dependencies.d.cts.map +1 -0
- package/dist/lib/install-dependencies.d.mts +12 -0
- package/dist/lib/install-dependencies.d.mts.map +1 -0
- package/dist/lib/install-dependencies.mjs +24 -0
- package/dist/lib/install-dependencies.mjs.map +1 -0
- package/dist/lib/meta.cjs +57 -0
- package/dist/lib/meta.d.cts +34 -0
- package/dist/lib/meta.d.cts.map +1 -0
- package/dist/lib/meta.d.mts +34 -0
- package/dist/lib/meta.d.mts.map +1 -0
- package/dist/lib/meta.mjs +54 -0
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/plugins.cjs +150 -0
- package/dist/lib/plugins.d.cts +40 -0
- package/dist/lib/plugins.d.cts.map +1 -0
- package/dist/lib/plugins.d.mts +40 -0
- package/dist/lib/plugins.d.mts.map +1 -0
- package/dist/lib/plugins.mjs +146 -0
- package/dist/lib/plugins.mjs.map +1 -0
- package/dist/lib/resolver.cjs +35 -0
- package/dist/lib/resolver.d.cts +21 -0
- package/dist/lib/resolver.d.cts.map +1 -0
- package/dist/lib/resolver.d.mts +21 -0
- package/dist/lib/resolver.d.mts.map +1 -0
- package/dist/lib/resolver.mjs +33 -0
- package/dist/lib/resolver.mjs.map +1 -0
- package/dist/lib/schemas.cjs +9 -0
- package/dist/lib/schemas.d.cts +2 -0
- package/dist/lib/schemas.d.mts +2 -0
- package/dist/lib/schemas.mjs +3 -0
- package/dist/lib/streaming-channel.cjs +260 -0
- package/dist/lib/streaming-channel.d.cts +133 -0
- package/dist/lib/streaming-channel.d.cts.map +1 -0
- package/dist/lib/streaming-channel.d.mts +133 -0
- package/dist/lib/streaming-channel.d.mts.map +1 -0
- package/dist/lib/streaming-channel.mjs +258 -0
- package/dist/lib/streaming-channel.mjs.map +1 -0
- package/dist/lib/typescript/index.cjs +16 -0
- package/dist/lib/typescript/index.d.cts +3 -0
- package/dist/lib/typescript/index.d.mts +3 -0
- package/dist/lib/typescript/index.mjs +4 -0
- package/dist/lib/typescript/ts-morph.cjs +105 -0
- package/dist/lib/typescript/ts-morph.d.cts +38 -0
- package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
- package/dist/lib/typescript/ts-morph.d.mts +38 -0
- package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
- package/dist/lib/typescript/ts-morph.mjs +102 -0
- package/dist/lib/typescript/ts-morph.mjs.map +1 -0
- package/dist/lib/typescript/tsconfig.cjs +253 -0
- package/dist/lib/typescript/tsconfig.d.cts +77 -0
- package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
- package/dist/lib/typescript/tsconfig.d.mts +77 -0
- package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
- package/dist/lib/typescript/tsconfig.mjs +240 -0
- package/dist/lib/typescript/tsconfig.mjs.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +2 -2
- package/dist/lib/unplugin/module-resolution.cjs +21 -20
- package/dist/lib/unplugin/module-resolution.d.cts +8 -0
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts +8 -0
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/module-resolution.mjs +20 -20
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +57 -63
- package/dist/lib/unplugin/plugin.d.cts +11 -5
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts +11 -5
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +57 -63
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +2 -2
- package/dist/lib/utilities/file-header.mjs +2 -2
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +16 -8
- package/dist/lib/utilities/format.d.cts.map +1 -1
- package/dist/lib/utilities/format.d.mts.map +1 -1
- package/dist/lib/utilities/format.mjs +15 -8
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +2 -2
- package/dist/lib/utilities/index.mjs +2 -2
- package/dist/lib/utilities/source-file.cjs +1 -1
- package/dist/lib/utilities/source-map.cjs +1 -1
- package/dist/lib/utilities/write-file.cjs +1 -2
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.cts.map +1 -1
- package/dist/lib/utilities/write-file.d.mts +1 -1
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.mjs +1 -2
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +1104 -0
- package/dist/lib/vfs.d.cts +321 -0
- package/dist/lib/vfs.d.cts.map +1 -0
- package/dist/lib/vfs.d.mts +321 -0
- package/dist/lib/vfs.d.mts.map +1 -0
- package/dist/lib/vfs.mjs +1102 -0
- package/dist/lib/vfs.mjs.map +1 -0
- package/dist/plugin-base.cjs +5 -9
- package/dist/plugin-base.mjs +5 -9
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/combine-plugins.d.cts +7 -8
- package/dist/plugin-utils/combine-plugins.d.cts.map +1 -1
- package/dist/plugin-utils/combine-plugins.d.mts +7 -8
- package/dist/plugin-utils/combine-plugins.d.mts.map +1 -1
- package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +29 -16
- package/dist/plugin-utils/context-helpers.d.cts +10 -2
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +10 -2
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +29 -17
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.cjs +17 -0
- package/dist/plugin-utils/docs-helper.d.cts +11 -0
- package/dist/plugin-utils/docs-helper.d.cts.map +1 -0
- package/dist/plugin-utils/docs-helper.d.mts +11 -0
- package/dist/plugin-utils/docs-helper.d.mts.map +1 -0
- package/dist/plugin-utils/docs-helper.mjs +16 -0
- package/dist/plugin-utils/docs-helper.mjs.map +1 -0
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +101 -0
- package/dist/plugin-utils/filter.d.cts +16 -0
- package/dist/plugin-utils/filter.d.cts.map +1 -0
- package/dist/plugin-utils/filter.d.mts +16 -0
- package/dist/plugin-utils/filter.d.mts.map +1 -0
- package/dist/plugin-utils/filter.mjs +91 -0
- package/dist/plugin-utils/filter.mjs.map +1 -0
- package/dist/plugin-utils/format-package-json.cjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +44 -0
- package/dist/plugin-utils/format.d.cts +11 -0
- package/dist/plugin-utils/format.d.cts.map +1 -0
- package/dist/plugin-utils/format.d.mts +11 -0
- package/dist/plugin-utils/format.d.mts.map +1 -0
- package/dist/plugin-utils/format.mjs +43 -0
- package/dist/plugin-utils/format.mjs.map +1 -0
- package/dist/plugin-utils/get-config-path.cjs +34 -32
- package/dist/plugin-utils/get-config-path.d.cts +4 -1
- package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
- package/dist/plugin-utils/get-config-path.d.mts +4 -1
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
- package/dist/plugin-utils/get-config-path.mjs +34 -32
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.cjs +25 -10
- package/dist/plugin-utils/helpers.d.cts +31 -24
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +31 -24
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +22 -8
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +48 -4
- package/dist/plugin-utils/index.d.cts +9 -3
- package/dist/plugin-utils/index.d.mts +9 -3
- package/dist/plugin-utils/index.mjs +11 -5
- package/dist/plugin-utils/install.cjs +47 -0
- package/dist/plugin-utils/install.d.cts +23 -0
- package/dist/plugin-utils/install.d.cts.map +1 -0
- package/dist/plugin-utils/install.d.mts +23 -0
- package/dist/plugin-utils/install.d.mts.map +1 -0
- package/dist/plugin-utils/install.mjs +45 -0
- package/dist/plugin-utils/install.mjs.map +1 -0
- package/dist/plugin-utils/logging.cjs +605 -0
- package/dist/plugin-utils/logging.d.cts +111 -0
- package/dist/plugin-utils/logging.d.cts.map +1 -0
- package/dist/plugin-utils/logging.d.mts +111 -0
- package/dist/plugin-utils/logging.d.mts.map +1 -0
- package/dist/plugin-utils/logging.mjs +588 -0
- package/dist/plugin-utils/logging.mjs.map +1 -0
- package/dist/plugin-utils/merge.cjs +4 -4
- package/dist/plugin-utils/merge.d.cts +0 -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 +3 -3
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +1 -1
- package/dist/plugin-utils/modules.mjs +1 -1
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +18 -4
- package/dist/plugin-utils/paths.d.cts +12 -2
- package/dist/plugin-utils/paths.d.cts.map +1 -1
- package/dist/plugin-utils/paths.d.mts +12 -2
- package/dist/plugin-utils/paths.d.mts.map +1 -1
- package/dist/plugin-utils/paths.mjs +18 -4
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +80 -0
- package/dist/plugin-utils/virtual.d.cts +69 -0
- package/dist/plugin-utils/virtual.d.cts.map +1 -0
- package/dist/plugin-utils/virtual.d.mts +69 -0
- package/dist/plugin-utils/virtual.d.mts.map +1 -0
- package/dist/plugin-utils/virtual.mjs +73 -0
- package/dist/plugin-utils/virtual.mjs.map +1 -0
- package/dist/schemas/fs.cjs +232 -0
- package/dist/schemas/fs.d.cts +127 -0
- package/dist/schemas/fs.d.cts.map +1 -0
- package/dist/schemas/fs.d.mts +127 -0
- package/dist/schemas/fs.d.mts.map +1 -0
- package/dist/schemas/fs.mjs +226 -0
- package/dist/schemas/fs.mjs.map +1 -0
- package/dist/storage/base.cjs +216 -0
- package/dist/storage/base.d.cts +201 -0
- package/dist/storage/base.d.cts.map +1 -0
- package/dist/storage/base.d.mts +201 -0
- package/dist/storage/base.d.mts.map +1 -0
- package/dist/storage/base.mjs +215 -0
- package/dist/storage/base.mjs.map +1 -0
- package/dist/storage/file-system.cjs +180 -0
- package/dist/storage/file-system.d.cts +129 -0
- package/dist/storage/file-system.d.cts.map +1 -0
- package/dist/storage/file-system.d.mts +129 -0
- package/dist/storage/file-system.d.mts.map +1 -0
- package/dist/storage/file-system.mjs +179 -0
- package/dist/storage/file-system.mjs.map +1 -0
- package/dist/storage/helpers.cjs +37 -0
- package/dist/storage/helpers.d.cts +25 -0
- package/dist/storage/helpers.d.cts.map +1 -0
- package/dist/storage/helpers.d.mts +25 -0
- package/dist/storage/helpers.d.mts.map +1 -0
- package/dist/storage/helpers.mjs +34 -0
- package/dist/storage/helpers.mjs.map +1 -0
- package/dist/storage/index.cjs +12 -0
- package/dist/storage/index.d.cts +5 -0
- package/dist/storage/index.d.mts +5 -0
- package/dist/storage/index.mjs +6 -0
- package/dist/storage/virtual.cjs +98 -0
- package/dist/storage/virtual.d.cts +80 -0
- package/dist/storage/virtual.d.cts.map +1 -0
- package/dist/storage/virtual.d.mts +80 -0
- package/dist/storage/virtual.d.mts.map +1 -0
- package/dist/storage/virtual.mjs +97 -0
- package/dist/storage/virtual.mjs.map +1 -0
- package/dist/types/api.d.cts +18 -99
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +18 -99
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +239 -141
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +240 -142
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +228 -117
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +231 -120
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts +49 -5
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts +50 -6
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/hooks.d.cts +26 -38
- package/dist/types/hooks.d.cts.map +1 -1
- package/dist/types/hooks.d.mts +26 -38
- package/dist/types/hooks.d.mts.map +1 -1
- package/dist/types/index.d.cts +9 -0
- package/dist/types/index.d.mts +8 -8
- package/dist/types/logging.d.cts +161 -0
- package/dist/types/logging.d.cts.map +1 -0
- package/dist/types/logging.d.mts +161 -0
- package/dist/types/logging.d.mts.map +1 -0
- package/dist/types/plugin.d.cts +23 -24
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +23 -24
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.cts +15 -12
- package/dist/types/tsconfig.d.cts.map +1 -1
- package/dist/types/tsconfig.d.mts +16 -13
- package/dist/types/tsconfig.d.mts.map +1 -1
- package/dist/types/unplugin.d.cts +10 -23
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +10 -23
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +270 -425
- package/schemas/fs.capnp +42 -0
- package/dist/lib/logger.cjs +0 -59
- package/dist/lib/logger.d.cts +0 -23
- package/dist/lib/logger.d.cts.map +0 -1
- package/dist/lib/logger.d.mts +0 -23
- package/dist/lib/logger.d.mts.map +0 -1
- package/dist/lib/logger.mjs +0 -56
- package/dist/lib/logger.mjs.map +0 -1
- package/dist/types/_internal.cjs +0 -0
- package/dist/types/_internal.d.cts +0 -106
- package/dist/types/_internal.d.cts.map +0 -1
- package/dist/types/_internal.d.mts +0 -106
- package/dist/types/_internal.d.mts.map +0 -1
- package/dist/types/_internal.mjs +0 -1
- package/dist/types/commands.d.cts +0 -13
- package/dist/types/commands.d.cts.map +0 -1
- package/dist/types/commands.d.mts +0 -13
- package/dist/types/commands.d.mts.map +0 -1
package/dist/types/context.d.mts
CHANGED
|
@@ -1,40 +1,37 @@
|
|
|
1
1
|
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
2
|
import { Plugin } from "./plugin.mjs";
|
|
3
|
-
import { HooksList,
|
|
3
|
+
import { CallHookOptions, HooksList, HooksListItem, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
|
|
4
|
+
import { LogFn, LogMessage, Logger, LoggerOptions } from "./logging.mjs";
|
|
4
5
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
5
|
-
import { EnvironmentResolvedConfig,
|
|
6
|
-
import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
|
|
7
|
-
import MagicString, { SourceMap } from "magic-string";
|
|
8
|
-
import { Jiti } from "jiti";
|
|
6
|
+
import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./config.mjs";
|
|
9
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
|
+
import { Jiti } from "jiti";
|
|
9
|
+
import { ExternalIdResult, UnpluginBuildContext } from "unplugin";
|
|
10
|
+
import MagicString, { SourceMap } from "magic-string";
|
|
10
11
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
11
|
-
import { PackageJson } from "@stryke/types/package-json";
|
|
12
|
-
import { Worker } from "jest-worker";
|
|
13
12
|
import { ParseResult, ParserOptions } from "oxc-parser";
|
|
14
|
-
import { Range } from "semver";
|
|
15
13
|
import { RequestInfo, Response } from "undici";
|
|
14
|
+
import { DeepReadonly } from "@stryke/types/base";
|
|
15
|
+
import { PackageJson } from "@stryke/types/package-json";
|
|
16
|
+
import { Range } from "semver";
|
|
16
17
|
import { Unimport } from "unimport";
|
|
17
18
|
|
|
18
19
|
//#region src/types/context.d.ts
|
|
19
|
-
type
|
|
20
|
-
close: () => void;
|
|
21
|
-
end: () => ReturnType<Worker["end"]>;
|
|
22
|
-
};
|
|
23
|
-
interface MetaInfo {
|
|
20
|
+
type MetaInfo = Record<string, any> & {
|
|
24
21
|
/**
|
|
25
22
|
* The checksum generated from the resolved options
|
|
26
23
|
*/
|
|
27
24
|
checksum: string;
|
|
28
25
|
/**
|
|
29
|
-
* The
|
|
26
|
+
* The execution id
|
|
30
27
|
*/
|
|
31
|
-
|
|
28
|
+
executionId: string;
|
|
32
29
|
/**
|
|
33
30
|
* The release id
|
|
34
31
|
*/
|
|
35
32
|
releaseId: string;
|
|
36
33
|
/**
|
|
37
|
-
* The
|
|
34
|
+
* The execution timestamp
|
|
38
35
|
*/
|
|
39
36
|
timestamp: number;
|
|
40
37
|
/**
|
|
@@ -45,7 +42,7 @@ interface MetaInfo {
|
|
|
45
42
|
* A hash that represents the path to the configuration root directory
|
|
46
43
|
*/
|
|
47
44
|
configHash: string;
|
|
48
|
-
}
|
|
45
|
+
};
|
|
49
46
|
interface Resolver extends Jiti {
|
|
50
47
|
plugin: Jiti;
|
|
51
48
|
}
|
|
@@ -134,98 +131,171 @@ interface ResolveResult extends ExternalIdResult {
|
|
|
134
131
|
virtual?: boolean;
|
|
135
132
|
}
|
|
136
133
|
/**
|
|
137
|
-
* The
|
|
134
|
+
* The base Powerlines context.
|
|
138
135
|
*
|
|
139
136
|
* @remarks
|
|
140
|
-
* This context
|
|
137
|
+
* This context provides the foundational structure for interacting with the Powerlines engine.
|
|
141
138
|
*/
|
|
142
|
-
interface
|
|
139
|
+
interface BaseContext<TSystemContext = unknown> extends Pick<Required<Options>, "cwd"> {
|
|
143
140
|
/**
|
|
144
|
-
* The
|
|
141
|
+
* The system instance associated with the context, which can be used to interact with the Powerlines engine and perform various operations during the build process. The specific type of the system may vary depending on the environment and use case, but it typically provides methods for logging, file system operations, and other interactions with the Powerlines engine.
|
|
145
142
|
*/
|
|
146
|
-
|
|
143
|
+
system: TSystemContext;
|
|
147
144
|
/**
|
|
148
|
-
*
|
|
145
|
+
* The timestamp when the context was initialized
|
|
149
146
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
timestamp: number;
|
|
148
|
+
/**
|
|
149
|
+
* The Powerlines environment paths
|
|
150
|
+
*/
|
|
151
|
+
envPaths: EnvPaths;
|
|
152
|
+
/**
|
|
153
|
+
* The file system path to the Powerlines package installation
|
|
154
|
+
*/
|
|
155
|
+
powerlinesPath: string;
|
|
156
|
+
/**
|
|
157
|
+
* The options provided to the Powerlines process.
|
|
158
|
+
*/
|
|
159
|
+
options: Options;
|
|
153
160
|
/**
|
|
154
|
-
*
|
|
161
|
+
* An instance of the Powerlines logger client that can be used to generate log messages with consistent formatting and metadata.
|
|
155
162
|
*/
|
|
156
|
-
|
|
163
|
+
logger: Logger;
|
|
157
164
|
/**
|
|
158
165
|
* A logging function for fatal messages
|
|
159
166
|
*/
|
|
160
|
-
fatal: (message: string |
|
|
167
|
+
fatal: (message: string | LogMessage | Error) => void;
|
|
161
168
|
/**
|
|
162
169
|
* A logging function for error messages
|
|
163
170
|
*/
|
|
164
|
-
error: (message: string |
|
|
171
|
+
error: (message: string | LogMessage | Error) => void;
|
|
165
172
|
/**
|
|
166
173
|
* A logging function for warning messages
|
|
167
174
|
*/
|
|
168
|
-
warn: (message: string |
|
|
175
|
+
warn: (message: string | LogMessage) => void;
|
|
169
176
|
/**
|
|
170
177
|
* A logging function for informational messages
|
|
171
178
|
*/
|
|
172
|
-
info: (message: string |
|
|
179
|
+
info: (message: string | LogMessage) => void;
|
|
173
180
|
/**
|
|
174
181
|
* A logging function for debug messages
|
|
175
182
|
*/
|
|
176
|
-
debug: (message: string |
|
|
183
|
+
debug: (message: string | LogMessage) => void;
|
|
177
184
|
/**
|
|
178
185
|
* A logging function for trace messages
|
|
179
186
|
*/
|
|
180
|
-
trace: (message: string |
|
|
187
|
+
trace: (message: string | LogMessage) => void;
|
|
181
188
|
/**
|
|
182
|
-
*
|
|
189
|
+
* A function to create a timer for measuring the duration of asynchronous operations
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* const stopTimer = context.timer("Your Async Operation");
|
|
194
|
+
* await performAsyncOperation();
|
|
195
|
+
* stopTimer(); // "Your Async Operation completed in 123.45 milliseconds"
|
|
196
|
+
* ```
|
|
197
|
+
*
|
|
198
|
+
* @param name - The name of the timer.
|
|
199
|
+
* @returns A function that, when called, stops the timer and logs the duration.
|
|
183
200
|
*/
|
|
184
|
-
|
|
201
|
+
timer: (name: string) => () => void;
|
|
185
202
|
/**
|
|
186
|
-
*
|
|
203
|
+
* Create a new logger instance
|
|
204
|
+
*
|
|
205
|
+
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
206
|
+
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
187
207
|
*/
|
|
188
|
-
|
|
208
|
+
createLogger: (options: LoggerOptions, logFn?: LogFn) => Logger;
|
|
189
209
|
/**
|
|
190
|
-
*
|
|
210
|
+
* Extend the current logger instance with a new source
|
|
211
|
+
*
|
|
212
|
+
* @param options - The overlay metadata to use for the badge in the log output.
|
|
213
|
+
* @returns A logger client instance that extends the current logger with the provided configuration options.
|
|
191
214
|
*/
|
|
192
|
-
|
|
215
|
+
extendLogger: (options: LoggerOptions, logFn?: LogFn) => Logger;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The unresolved Powerlines context.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
222
|
+
*/
|
|
223
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> extends BaseContext<TSystemContext> {
|
|
193
224
|
/**
|
|
194
|
-
* The
|
|
225
|
+
* The options provided to the Powerlines process, resolved with default values and merged with any configuration provided by plugins or other sources. This is typically the final configuration used during the build process, but may also include additional options that are relevant to the context and its interactions with the Powerlines engine.
|
|
195
226
|
*/
|
|
196
|
-
|
|
227
|
+
options: ExecutionOptions;
|
|
197
228
|
/**
|
|
198
|
-
*
|
|
229
|
+
* An object containing the options provided to Powerlines
|
|
199
230
|
*/
|
|
200
|
-
|
|
231
|
+
config: Omit<TResolvedConfig["userConfig"], "output"> & Required<Pick<TResolvedConfig["userConfig"], "output">> & Pick<TResolvedConfig, "cwd" | "mode" | "framework" | "configFile" | "name" | "logLevel"> & {
|
|
232
|
+
/**
|
|
233
|
+
* The output configuration options for the Powerlines process, which may include settings related to the output directory, file naming conventions, and other options that affect how the compiled output is generated and structured. This is typically derived from the user configuration but may also include additional options provided by plugins or other sources.
|
|
234
|
+
*/
|
|
235
|
+
output: TResolvedConfig["output"];
|
|
236
|
+
/**
|
|
237
|
+
* The configuration values read from the user configuration file before any resolution or merging with default values or plugin-provided configurations. This represents the raw configuration as defined by the user, and can be useful for debugging or for plugins that need to access the original configuration values before they are processed by Powerlines.
|
|
238
|
+
*/
|
|
239
|
+
readonly userConfig: DeepReadonly<TResolvedConfig["userConfig"]>;
|
|
240
|
+
/**
|
|
241
|
+
* The configuration options that were provided inline to the Powerlines CLI.
|
|
242
|
+
*/
|
|
243
|
+
readonly inlineConfig: DeepReadonly<TResolvedConfig["inlineConfig"]>;
|
|
244
|
+
};
|
|
201
245
|
/**
|
|
202
|
-
*
|
|
246
|
+
* A place to store metadata information on the context for access in plugins and other parts of the system. This can be used to store information about the current execution, such as a unique identifier for the execution, timestamps, or any other relevant data that may be useful for plugins or other parts of the system to access during the build process.
|
|
203
247
|
*/
|
|
204
|
-
|
|
248
|
+
meta: MetaInfo;
|
|
205
249
|
/**
|
|
206
|
-
* The
|
|
250
|
+
* The metadata information currently written to disk
|
|
207
251
|
*/
|
|
208
|
-
|
|
252
|
+
persistedMeta?: MetaInfo;
|
|
209
253
|
/**
|
|
210
254
|
* The path to a directory where the reflection data buffers (used by the build processes) are stored
|
|
211
255
|
*/
|
|
212
|
-
dataPath: string;
|
|
256
|
+
readonly dataPath: string;
|
|
213
257
|
/**
|
|
214
258
|
* The path to a directory where the project cache (used by the build processes) is stored
|
|
215
259
|
*/
|
|
216
|
-
cachePath: string;
|
|
260
|
+
readonly cachePath: string;
|
|
217
261
|
/**
|
|
218
|
-
* The Powerlines
|
|
262
|
+
* The Powerlines artifacts directory
|
|
219
263
|
*/
|
|
220
|
-
|
|
264
|
+
readonly artifactsPath: string;
|
|
221
265
|
/**
|
|
222
|
-
* The
|
|
266
|
+
* The path to the Powerlines builtin runtime modules directory
|
|
223
267
|
*/
|
|
224
|
-
|
|
268
|
+
readonly builtinsPath: string;
|
|
225
269
|
/**
|
|
226
|
-
* The
|
|
270
|
+
* The path to the Powerlines entry modules directory
|
|
227
271
|
*/
|
|
228
|
-
|
|
272
|
+
readonly entryPath: string;
|
|
273
|
+
/**
|
|
274
|
+
* The path to the Powerlines infrastructure modules directory
|
|
275
|
+
*/
|
|
276
|
+
readonly infrastructurePath: string;
|
|
277
|
+
/**
|
|
278
|
+
* The path to the Powerlines TypeScript declaration files directory
|
|
279
|
+
*/
|
|
280
|
+
readonly typesPath: string;
|
|
281
|
+
/**
|
|
282
|
+
* Invokes the configured plugin hooks
|
|
283
|
+
*
|
|
284
|
+
* @remarks
|
|
285
|
+
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
286
|
+
*
|
|
287
|
+
* @param hook - The hook to call
|
|
288
|
+
* @param options - The options to provide to the hook
|
|
289
|
+
* @param args - The arguments to pass to the hook
|
|
290
|
+
* @returns The result of the hook call
|
|
291
|
+
*/
|
|
292
|
+
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
293
|
+
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
294
|
+
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
295
|
+
/**
|
|
296
|
+
* The virtual file system interface for managing files during the build process
|
|
297
|
+
*/
|
|
298
|
+
fs: VirtualFileSystemInterface;
|
|
229
299
|
/**
|
|
230
300
|
* The project's `package.json` file content
|
|
231
301
|
*/
|
|
@@ -250,10 +320,6 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
250
320
|
* The entry points of the source code
|
|
251
321
|
*/
|
|
252
322
|
entry: ResolvedEntryTypeDefinition[];
|
|
253
|
-
/**
|
|
254
|
-
* The virtual file system manager used during the build process to reference generated runtime files
|
|
255
|
-
*/
|
|
256
|
-
fs: VirtualFileSystemInterface;
|
|
257
323
|
/**
|
|
258
324
|
* The Jiti module resolver
|
|
259
325
|
*/
|
|
@@ -269,6 +335,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
269
335
|
* This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
|
|
270
336
|
*/
|
|
271
337
|
alias: Record<string, string>;
|
|
338
|
+
/**
|
|
339
|
+
* The resolved tsconfig file paths for the project
|
|
340
|
+
*/
|
|
341
|
+
resolvePatterns: RegExp[];
|
|
342
|
+
/**
|
|
343
|
+
* Additional arguments provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed.
|
|
344
|
+
*/
|
|
345
|
+
additionalArgs: Record<string, string | string[]>;
|
|
272
346
|
/**
|
|
273
347
|
* A function to perform HTTP fetch requests
|
|
274
348
|
*
|
|
@@ -407,28 +481,6 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
407
481
|
* @param options - Additional options for writing the infrastructure file
|
|
408
482
|
*/
|
|
409
483
|
emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
410
|
-
/**
|
|
411
|
-
* A function to update the context fields using a new user configuration options
|
|
412
|
-
*/
|
|
413
|
-
withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
|
|
414
|
-
/**
|
|
415
|
-
* A function to update the context fields using inline configuration options
|
|
416
|
-
*/
|
|
417
|
-
withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
|
|
418
|
-
/**
|
|
419
|
-
* Create a new logger instance
|
|
420
|
-
*
|
|
421
|
-
* @param name - The name to use for the logger instance
|
|
422
|
-
* @returns A logger function
|
|
423
|
-
*/
|
|
424
|
-
createLog: (name: string | null) => LogFn;
|
|
425
|
-
/**
|
|
426
|
-
* Extend the current logger instance with a new name
|
|
427
|
-
*
|
|
428
|
-
* @param name - The name to use for the extended logger instance
|
|
429
|
-
* @returns A logger function
|
|
430
|
-
*/
|
|
431
|
-
extendLog: (name: string) => LogFn;
|
|
432
484
|
/**
|
|
433
485
|
* Generates a checksum representing the current context state
|
|
434
486
|
*
|
|
@@ -436,28 +488,48 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
436
488
|
*/
|
|
437
489
|
generateChecksum: () => Promise<string>;
|
|
438
490
|
}
|
|
439
|
-
|
|
491
|
+
/**
|
|
492
|
+
* The resolved Powerlines context.
|
|
493
|
+
*
|
|
494
|
+
* @remarks
|
|
495
|
+
* This context is used after the user configuration has been fully resolved and merged with default values, providing access to the final configuration options and utility functions for interacting with the Powerlines engine.
|
|
496
|
+
*/
|
|
497
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> = Omit<UnresolvedContext<TResolvedConfig, TSystemContext>, "config" | "callHook"> & {
|
|
440
498
|
/**
|
|
441
499
|
* The fully resolved Powerlines configuration
|
|
442
500
|
*/
|
|
443
501
|
config: TResolvedConfig;
|
|
502
|
+
/**
|
|
503
|
+
* Invokes the configured plugin hooks
|
|
504
|
+
*
|
|
505
|
+
* @remarks
|
|
506
|
+
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
507
|
+
*
|
|
508
|
+
* @param hook - The hook to call
|
|
509
|
+
* @param options - The options to provide to the hook
|
|
510
|
+
* @param args - The arguments to pass to the hook
|
|
511
|
+
* @returns The result of the hook call
|
|
512
|
+
*/
|
|
513
|
+
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
514
|
+
environment?: string | EnvironmentContext<any, any>;
|
|
515
|
+
}, ...args: InferHookParameters<PluginContext<any, any>, TKey>) => Promise<InferHookReturnType<PluginContext<any, any>, TKey> | undefined>;
|
|
444
516
|
};
|
|
445
|
-
interface
|
|
517
|
+
interface ExecutionContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> extends Context<TResolvedConfig, TSystemContext> {
|
|
518
|
+
/**
|
|
519
|
+
* The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
520
|
+
*/
|
|
521
|
+
readonly id: string;
|
|
446
522
|
/**
|
|
447
523
|
* The expected plugins options for the Powerlines project.
|
|
448
524
|
*
|
|
449
525
|
* @remarks
|
|
450
526
|
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
451
527
|
*/
|
|
452
|
-
plugins: Plugin<PluginContext<TResolvedConfig>>[];
|
|
453
|
-
/**
|
|
454
|
-
* A function to add a plugin to the context and update the configuration options
|
|
455
|
-
*/
|
|
456
|
-
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
528
|
+
plugins: Plugin<PluginContext<TResolvedConfig, TSystemContext>>[];
|
|
457
529
|
/**
|
|
458
530
|
* A table for storing the current context for each configured environment
|
|
459
531
|
*/
|
|
460
|
-
environments: Record<string, EnvironmentContext<TResolvedConfig>>;
|
|
532
|
+
environments: Record<string, EnvironmentContext<TResolvedConfig, TSystemContext>>;
|
|
461
533
|
/**
|
|
462
534
|
* Retrieves the context for a specific environment by name
|
|
463
535
|
*
|
|
@@ -472,7 +544,7 @@ interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> ex
|
|
|
472
544
|
* const defaultEnv = await apiContext.getEnvironment();
|
|
473
545
|
* ```
|
|
474
546
|
*/
|
|
475
|
-
getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
547
|
+
getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
|
|
476
548
|
/**
|
|
477
549
|
* Safely retrieves the context for a specific environment by name
|
|
478
550
|
*
|
|
@@ -500,70 +572,108 @@ interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> ex
|
|
|
500
572
|
*
|
|
501
573
|
* Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
|
|
502
574
|
*/
|
|
503
|
-
getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
|
|
575
|
+
getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext> | undefined>;
|
|
504
576
|
/**
|
|
505
577
|
* A function to copy the context and update the fields for a specific environment
|
|
506
578
|
*
|
|
507
579
|
* @param environment - The environment configuration to use.
|
|
508
580
|
* @returns A new context instance with the updated environment.
|
|
509
581
|
*/
|
|
510
|
-
|
|
582
|
+
createEnvironment: (environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
|
|
511
583
|
/**
|
|
512
584
|
* A function to merge all configured environments into a single context
|
|
513
585
|
*
|
|
514
586
|
* @returns A promise that resolves to the merged environment context.
|
|
515
587
|
*/
|
|
516
|
-
toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
588
|
+
toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
|
|
589
|
+
/**
|
|
590
|
+
* A function used internally to add a plugin to the context and update the configuration options
|
|
591
|
+
*
|
|
592
|
+
* @danger
|
|
593
|
+
* This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
|
|
594
|
+
*
|
|
595
|
+
* @internal
|
|
596
|
+
*/
|
|
597
|
+
unstable_addPlugin: (plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>) => Promise<void>;
|
|
517
598
|
}
|
|
518
|
-
interface
|
|
519
|
-
|
|
520
|
-
|
|
599
|
+
interface EnvironmentPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> extends Plugin<PluginContext<TResolvedConfig, TSystemContext>> {
|
|
600
|
+
/**
|
|
601
|
+
* A internal field to store the plugin configuration and context for the environment context
|
|
602
|
+
*
|
|
603
|
+
* @danger
|
|
604
|
+
* This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
|
|
605
|
+
*
|
|
606
|
+
* @internal
|
|
607
|
+
*/
|
|
608
|
+
$$internal: {
|
|
609
|
+
/**
|
|
610
|
+
* The unique identifier of the plugin, which can be used for logging and other purposes to distinguish between different plugins in the same process.
|
|
611
|
+
*/
|
|
612
|
+
readonly id: string;
|
|
613
|
+
/**
|
|
614
|
+
* The context for the plugin, which provides access to the Powerlines engine and other utilities for interacting with the build process.
|
|
615
|
+
*
|
|
616
|
+
* @remarks
|
|
617
|
+
* This context is specific to the plugin and environment, allowing for environment-specific modifications without affecting the global context.
|
|
618
|
+
*/
|
|
619
|
+
readonly context: PluginContext<TResolvedConfig, TSystemContext>;
|
|
620
|
+
};
|
|
521
621
|
}
|
|
522
|
-
type SelectHookResultItem<TContext extends PluginContext, TKey extends string> =
|
|
622
|
+
type SelectHookResultItem<TContext extends PluginContext, TKey extends string> = HooksListItem<TContext, TKey> & {
|
|
523
623
|
context: TContext;
|
|
524
624
|
};
|
|
525
625
|
type SelectHookResult<TContext extends PluginContext, TKey extends string> = SelectHookResultItem<TContext, TKey>[];
|
|
526
|
-
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
626
|
+
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> extends Context<EnvironmentResolvedConfig<TResolvedConfig>, TSystemContext> {
|
|
627
|
+
/**
|
|
628
|
+
* The unique identifier of the environment associated with this context, which can be used for logging and other purposes to distinguish between different environments in the same process.
|
|
629
|
+
*/
|
|
630
|
+
readonly id: string;
|
|
527
631
|
/**
|
|
528
632
|
* The expected plugins options for the Powerlines project.
|
|
529
633
|
*
|
|
530
634
|
* @remarks
|
|
531
635
|
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
532
636
|
*/
|
|
533
|
-
plugins:
|
|
637
|
+
plugins: EnvironmentPlugin<TResolvedConfig, TSystemContext>[];
|
|
534
638
|
/**
|
|
535
|
-
* A
|
|
639
|
+
* A table holding references to hook functions registered by plugins
|
|
536
640
|
*/
|
|
537
|
-
|
|
641
|
+
hooks: HooksList<PluginContext<TResolvedConfig, TSystemContext>>;
|
|
538
642
|
/**
|
|
539
|
-
* The environment specific
|
|
643
|
+
* The execution context associated with this environment, which provides access to the project configuration, environment, and utility functions for performing the build. The execution context is used to manage the state and behavior of the build process across multiple environments, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
|
|
644
|
+
*
|
|
645
|
+
* @danger
|
|
646
|
+
* This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
|
|
647
|
+
*
|
|
648
|
+
* @internal
|
|
540
649
|
*/
|
|
541
|
-
|
|
650
|
+
unstable_execution: ExecutionContext<TResolvedConfig, TSystemContext>;
|
|
542
651
|
/**
|
|
543
|
-
*
|
|
652
|
+
* Retrieves the hook handlers for a specific hook name
|
|
544
653
|
*/
|
|
545
|
-
|
|
654
|
+
selectHooks: <TKey extends string>(key: TKey, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig, TSystemContext>, TKey>;
|
|
546
655
|
/**
|
|
547
|
-
*
|
|
656
|
+
* A function used internally to add a plugin to the context and update the configuration options
|
|
657
|
+
*
|
|
658
|
+
* @danger
|
|
659
|
+
* This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
|
|
660
|
+
*
|
|
661
|
+
* @internal
|
|
548
662
|
*/
|
|
549
|
-
|
|
663
|
+
unstable_addPlugin: (plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>) => Promise<void>;
|
|
550
664
|
}
|
|
551
|
-
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>,
|
|
665
|
+
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown> extends Context<EnvironmentResolvedConfig<TResolvedConfig>, TSystemContext> {
|
|
552
666
|
/**
|
|
553
|
-
* The
|
|
667
|
+
* The unique identifier of the plugin associated with this context, which can be used for logging and other purposes to distinguish between different plugins in the same process.
|
|
554
668
|
*/
|
|
555
|
-
|
|
669
|
+
readonly id: string;
|
|
556
670
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
* @remarks
|
|
560
|
-
* This is provided for compatibility with other logging libraries that expect a `logger` property.
|
|
671
|
+
* The context for the environment associated with this plugin context, which provides access to the Powerlines engine and other utilities for interacting with the build process. This context is specific to the plugin and environment, allowing for environment-specific modifications without affecting the global context.
|
|
561
672
|
*/
|
|
562
|
-
|
|
673
|
+
readonly environment: EnvironmentContext;
|
|
563
674
|
}
|
|
564
675
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
565
676
|
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
566
|
-
declare type __ΩWorkerProcess = any[];
|
|
567
677
|
declare type __ΩMetaInfo = any[];
|
|
568
678
|
declare type __ΩResolver = any[];
|
|
569
679
|
declare type __ΩTransformResult = any[];
|
|
@@ -576,10 +686,11 @@ declare type __ΩParseOptions = any[];
|
|
|
576
686
|
declare type __ΩEmitOptions = any[];
|
|
577
687
|
declare type __ΩEmitEntryOptions = any[];
|
|
578
688
|
declare type __ΩResolveResult = any[];
|
|
689
|
+
declare type __ΩBaseContext = any[];
|
|
579
690
|
declare type __ΩUnresolvedContext = any[];
|
|
580
691
|
declare type __ΩContext = any[];
|
|
581
|
-
declare type __Ω
|
|
582
|
-
declare type __Ω
|
|
692
|
+
declare type __ΩExecutionContext = any[];
|
|
693
|
+
declare type __ΩEnvironmentPlugin = any[];
|
|
583
694
|
declare type __ΩSelectHookResultItem = any[];
|
|
584
695
|
declare type __ΩSelectHookResult = any[];
|
|
585
696
|
declare type __ΩEnvironmentContext = any[];
|
|
@@ -587,5 +698,5 @@ declare type __ΩPluginContext = any[];
|
|
|
587
698
|
declare type __ΩBuildPluginContext = any[];
|
|
588
699
|
declare type __ΩWithUnpluginBuildContext = any[];
|
|
589
700
|
//#endregion
|
|
590
|
-
export {
|
|
701
|
+
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentPlugin, __ΩExecutionContext, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext };
|
|
591
702
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;KAuDY,QAAA,GAAW,MAAA;EAAX;;;EAIV,QAAA;EAJqB;;;EASrB,WAAA;EAUA;;;EALA,SAAA;EAeU;AAGZ;;EAbE,SAAA;EAaoC;;;EARpC,QAAA;EASY;;AAGd;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAA;AAAA;;;;UAMU,UAAA;EASf;;;EALA,EAAA;EAeS;;;EAVT,IAAA,EAAM,WAAA;EAamB;;;EARzB,GAAA;EASmB;;;EAJnB,MAAA,GAAS,iBAAA;AAAA;AAAA,KAGC,eAAA,GAAkB,IAAA,CAAK,QAAA;EACjC,WAAA,QAAmB,OAAA;EACnB,aAAA,GAAgB,MAAA,EAAQ,UAAA,KAAe,OAAA,CAAQ,UAAA;EAC/C,qBAAA,QAA6B,OAAA;AAAA;AAAA,UAGd,kBAAA;EACf,KAAA;AAAA;;;;UAMe,kBAAA;EAVc;;;AAG/B;;EAaE,cAAA;AAAA;;AANF;;UAYiB,YAAA,SAAqB,mBAAA;EANpC;;AAMF;EAIE,SAAA;AAAA;;;AAMF;UAAiB,YAAA,SAAqB,aAAA;;;;EAIpC,0BAAA;AAAA;AAAA,UAGe,WAAA,SAAoB,YAAA;EAYjC;;;EARF,SAAA;EAJmC;;;EASnC,eAAA;EAEA,kBAAA,GAAq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