@powerlines/core 0.47.4 → 0.48.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 +5 -5
- package/dist/constants/api.d.cts +3 -3
- package/dist/constants/api.d.cts.map +1 -1
- package/dist/constants/api.d.mts +3 -3
- package/dist/constants/api.d.mts.map +1 -1
- package/dist/constants/api.mjs +4 -4
- package/dist/constants/api.mjs.map +1 -1
- package/dist/constants/commands.cjs +1 -1
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.mjs +2 -2
- 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/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.mjs.map +1 -1
- package/dist/constants/hooks.mjs.map +1 -1
- package/dist/constants/index.cjs +16 -4
- package/dist/constants/index.d.cts +4 -2
- package/dist/constants/index.d.mts +4 -2
- package/dist/constants/index.mjs +6 -4
- package/dist/constants/log-level.cjs +10 -10
- package/dist/constants/log-level.d.cts +10 -10
- package/dist/constants/log-level.d.mts +10 -10
- package/dist/constants/log-level.mjs +10 -10
- package/dist/constants/log-level.mjs.map +1 -1
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/constants/plugin.mjs.map +1 -1
- package/dist/context/base-context.cjs +121 -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 +119 -0
- package/dist/context/base-context.mjs.map +1 -0
- package/dist/context/context.cjs +935 -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 +933 -0
- package/dist/context/context.mjs.map +1 -0
- package/dist/context/environment-context.cjs +218 -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 +236 -0
- package/dist/context/execution-context.d.cts +106 -0
- package/dist/context/execution-context.d.cts.map +1 -0
- package/dist/context/execution-context.d.mts +106 -0
- package/dist/context/execution-context.d.mts.map +1 -0
- package/dist/context/execution-context.mjs +234 -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 +82 -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 -3
- package/dist/index.d.cts +27 -16
- package/dist/index.d.mts +27 -16
- package/dist/index.mjs +17 -4
- package/dist/lib/config.cjs +160 -21
- package/dist/lib/config.d.cts +116 -12
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +116 -12
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +154 -22
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +42 -0
- package/dist/lib/context-helpers.d.cts +16 -0
- package/dist/lib/context-helpers.d.cts.map +1 -0
- package/dist/lib/context-helpers.d.mts +16 -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 +5 -6
- package/dist/lib/entry.d.cts +5 -5
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts +5 -5
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +5 -5
- 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 +370 -0
- package/dist/lib/generate-types.d.cts +66 -0
- package/dist/lib/generate-types.d.cts.map +1 -0
- package/dist/lib/generate-types.d.mts +66 -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 -3
- package/dist/lib/index.d.cts +18 -5
- package/dist/lib/index.d.mts +18 -5
- package/dist/lib/index.mjs +19 -4
- package/dist/lib/install-dependencies.cjs +24 -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 +56 -0
- package/dist/lib/meta.d.cts +33 -0
- package/dist/lib/meta.d.cts.map +1 -0
- package/dist/lib/meta.d.mts +33 -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 +39 -0
- package/dist/lib/plugins.d.cts.map +1 -0
- package/dist/lib/plugins.d.mts +39 -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 +20 -0
- package/dist/lib/resolver.d.cts.map +1 -0
- package/dist/lib/resolver.d.mts +20 -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 +259 -0
- package/dist/lib/streaming-channel.d.cts +126 -0
- package/dist/lib/streaming-channel.d.cts.map +1 -0
- package/dist/lib/streaming-channel.d.mts +126 -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 +0 -1
- 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.map +1 -1
- package/dist/lib/unplugin/index.d.cts +3 -3
- package/dist/lib/unplugin/index.d.mts +3 -3
- package/dist/lib/unplugin/module-resolution.cjs +8 -9
- package/dist/lib/unplugin/module-resolution.d.cts +3 -4
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts +3 -4
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/module-resolution.mjs +8 -9
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +54 -61
- package/dist/lib/unplugin/plugin.d.cts +5 -7
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts +5 -7
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +54 -60
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +2 -3
- package/dist/lib/utilities/file-header.d.cts +1 -2
- package/dist/lib/utilities/file-header.d.cts.map +1 -1
- package/dist/lib/utilities/file-header.d.mts +1 -2
- package/dist/lib/utilities/file-header.d.mts.map +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +1 -1
- package/dist/lib/utilities/index.d.cts +2 -2
- package/dist/lib/utilities/index.d.mts +2 -2
- package/dist/lib/utilities/index.mjs +1 -1
- package/dist/lib/utilities/source-file.d.cts.map +1 -1
- package/dist/lib/utilities/source-file.d.mts.map +1 -1
- package/dist/lib/utilities/source-file.mjs.map +1 -1
- package/dist/lib/utilities/source-map.d.cts.map +1 -1
- package/dist/lib/utilities/source-map.d.mts.map +1 -1
- package/dist/lib/utilities/source-map.mjs.map +1 -1
- package/dist/lib/utilities/write-file.cjs +0 -1
- 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 +1 -2
- package/dist/plugin-base.d.cts +1 -5
- package/dist/plugin-base.d.cts.map +1 -1
- package/dist/plugin-base.d.mts +1 -5
- package/dist/plugin-base.d.mts.map +1 -1
- package/dist/plugin-base.mjs +1 -1
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +2 -3
- package/dist/plugin-utils/build-helpers.d.cts +3 -4
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/build-helpers.d.mts +3 -4
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
- 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.cjs +0 -1
- package/dist/plugin-utils/combine-plugins.d.cts +7 -9
- package/dist/plugin-utils/combine-plugins.d.cts.map +1 -1
- package/dist/plugin-utils/combine-plugins.d.mts +7 -9
- 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 +0 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.cjs +0 -1
- package/dist/plugin-utils/docs-helper.d.cts.map +1 -1
- package/dist/plugin-utils/docs-helper.d.mts.map +1 -1
- package/dist/plugin-utils/docs-helper.mjs.map +1 -1
- package/dist/plugin-utils/enable-plugin.cjs +33 -0
- package/dist/plugin-utils/enable-plugin.d.cts +29 -0
- package/dist/plugin-utils/enable-plugin.d.cts.map +1 -0
- package/dist/plugin-utils/enable-plugin.d.mts +29 -0
- package/dist/plugin-utils/enable-plugin.d.mts.map +1 -0
- package/dist/plugin-utils/enable-plugin.mjs +33 -0
- package/dist/plugin-utils/enable-plugin.mjs.map +1 -0
- package/dist/plugin-utils/extend.cjs +0 -1
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +2 -2
- package/dist/plugin-utils/filter.d.cts.map +1 -1
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +2 -2
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +0 -1
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +14 -7
- package/dist/plugin-utils/format.d.cts.map +1 -1
- package/dist/plugin-utils/format.d.mts.map +1 -1
- package/dist/plugin-utils/format.mjs +14 -6
- package/dist/plugin-utils/format.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +0 -1
- package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.cjs +1 -2
- package/dist/plugin-utils/helpers.d.cts +18 -23
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +18 -23
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +1 -1
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +7 -2
- package/dist/plugin-utils/index.d.cts +8 -6
- package/dist/plugin-utils/index.d.mts +8 -6
- package/dist/plugin-utils/index.mjs +5 -3
- package/dist/plugin-utils/install.cjs +46 -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 +50 -47
- package/dist/plugin-utils/logging.d.cts +3 -2
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +3 -2
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +50 -47
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -2
- package/dist/plugin-utils/merge.d.cts.map +1 -1
- package/dist/plugin-utils/merge.d.mts +1 -2
- package/dist/plugin-utils/merge.d.mts.map +1 -1
- package/dist/plugin-utils/merge.mjs +1 -1
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +1 -1
- package/dist/plugin-utils/modules.d.cts.map +1 -1
- package/dist/plugin-utils/modules.d.mts.map +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 +1 -2
- package/dist/plugin-utils/paths.d.cts.map +1 -1
- package/dist/plugin-utils/paths.d.mts.map +1 -1
- package/dist/plugin-utils/paths.mjs +1 -1
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.d.cts +1 -2
- package/dist/plugin-utils/virtual.d.cts.map +1 -1
- package/dist/plugin-utils/virtual.d.mts +1 -2
- package/dist/plugin-utils/virtual.d.mts.map +1 -1
- package/dist/plugin-utils/virtual.mjs.map +1 -1
- 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 +200 -0
- package/dist/storage/base.d.cts.map +1 -0
- package/dist/storage/base.d.mts +200 -0
- package/dist/storage/base.d.mts.map +1 -0
- package/dist/storage/base.mjs +216 -0
- package/dist/storage/base.mjs.map +1 -0
- package/dist/storage/file-system.cjs +179 -0
- package/dist/storage/file-system.d.cts +127 -0
- package/dist/storage/file-system.d.cts.map +1 -0
- package/dist/storage/file-system.d.mts +127 -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 +36 -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 +97 -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 +10 -162
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +10 -162
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +144 -181
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +145 -182
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +120 -184
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +123 -187
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts +1 -12
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts +2 -13
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/hooks.d.cts +1 -12
- package/dist/types/hooks.d.cts.map +1 -1
- package/dist/types/hooks.d.mts +1 -12
- package/dist/types/hooks.d.mts.map +1 -1
- package/dist/types/index.d.cts +9 -11
- package/dist/types/index.d.mts +9 -11
- package/dist/types/logging.d.cts +5 -20
- package/dist/types/logging.d.cts.map +1 -1
- package/dist/types/logging.d.mts +5 -20
- package/dist/types/logging.d.mts.map +1 -1
- package/dist/types/plugin.d.cts +5 -15
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +5 -15
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.cts +1 -8
- package/dist/types/tsconfig.d.cts.map +1 -1
- package/dist/types/tsconfig.d.mts +2 -9
- package/dist/types/tsconfig.d.mts.map +1 -1
- package/dist/types/unplugin.d.cts +6 -31
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +6 -31
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +158 -25
- package/schemas/fs.capnp +42 -0
- package/dist/types/_internal.cjs +0 -0
- package/dist/types/_internal.d.cts +0 -91
- package/dist/types/_internal.d.cts.map +0 -1
- package/dist/types/_internal.d.mts +0 -91
- package/dist/types/_internal.d.mts.map +0 -1
- package/dist/types/_internal.mjs +0 -1
- package/dist/types/commands.d.cts +0 -16
- package/dist/types/commands.d.cts.map +0 -1
- package/dist/types/commands.d.mts +0 -16
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/utils.d.cts +0 -9
- package/dist/types/utils.d.cts.map +0 -1
- package/dist/types/utils.d.mts +0 -9
- package/dist/types/utils.d.mts.map +0 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { GetDependencyConfigResult,
|
|
2
|
-
import { CombinePluginsOptions,
|
|
1
|
+
import { GetDependencyConfigResult, getDependencyConfig } from "./build-helpers.mjs";
|
|
2
|
+
import { CombinePluginsOptions, combinePluginOptions, combinePlugins } from "./combine-plugins.mjs";
|
|
3
3
|
import { getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
4
4
|
import { getDocsOutputPath } from "./docs-helper.mjs";
|
|
5
|
+
import { enable } from "./enable-plugin.mjs";
|
|
5
6
|
import { extend } from "./extend.mjs";
|
|
6
7
|
import { createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter } from "./filter.mjs";
|
|
7
8
|
import { formatPackageJson } from "./format-package-json.mjs";
|
|
8
9
|
import { formatConfig } from "./format.mjs";
|
|
9
10
|
import { getConfigPath } from "./get-config-path.mjs";
|
|
10
|
-
import { GetHookHandlerReturnType,
|
|
11
|
+
import { GetHookHandlerReturnType, addPluginHook, dedupeHooklist, extractPluginHook, findInvalidPluginConfig, getHookHandler, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey } from "./helpers.mjs";
|
|
12
|
+
import { installPackage, installPackages } from "./install.mjs";
|
|
11
13
|
import { colorBackground, colorText, consoleLog, consoleLogger, createLogFn, createLogger, extendLogFn, extendLogger, getTextColor, isValidLogLevel, isValidLogLevelConfig, isVerbose, resolveLogLevel, withCustomLogger, withLogFn, withLogger } from "./logging.mjs";
|
|
12
|
-
import { MergeResult,
|
|
14
|
+
import { MergeResult, merge, mergeConfig } from "./merge.mjs";
|
|
13
15
|
import { isBuiltinModule } from "./modules.mjs";
|
|
14
16
|
import { replacePathTokens } from "./paths.mjs";
|
|
15
|
-
import { PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX,
|
|
16
|
-
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX,
|
|
17
|
+
import { PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addVirtualPrefix, createVirtualPrefixRegex, isVirtualModule, prefixRegex, removeVirtualPrefix } from "./virtual.mjs";
|
|
18
|
+
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { colorBackground, colorText, consoleLog, consoleLogger, createLogFn, createLogger, extendLogFn, extendLogger, getTextColor, isValidLogLevel, isValidLogLevelConfig, isVerbose, resolveLogLevel, withCustomLogger, withLogFn, withLogger } from "./logging.mjs";
|
|
2
2
|
import { getDependencyConfig } from "./build-helpers.mjs";
|
|
3
3
|
import { addPluginHook, dedupeHooklist, extractPluginHook, findInvalidPluginConfig, getHookHandler, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey } from "./helpers.mjs";
|
|
4
4
|
import { merge, mergeConfig } from "./merge.mjs";
|
|
5
5
|
import { combinePluginOptions, combinePlugins } from "./combine-plugins.mjs";
|
|
6
6
|
import { getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
7
7
|
import { getDocsOutputPath } from "./docs-helper.mjs";
|
|
8
|
+
import { enable } from "./enable-plugin.mjs";
|
|
8
9
|
import { extend } from "./extend.mjs";
|
|
9
10
|
import { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addVirtualPrefix, createVirtualPrefixRegex, isVirtualModule, prefixRegex, removeVirtualPrefix } from "./virtual.mjs";
|
|
10
11
|
import { createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter } from "./filter.mjs";
|
|
11
12
|
import { formatConfig } from "./format.mjs";
|
|
12
13
|
import { formatPackageJson } from "./format-package-json.mjs";
|
|
13
14
|
import { getConfigPath } from "./get-config-path.mjs";
|
|
14
|
-
import {
|
|
15
|
+
import { installPackage, installPackages } from "./install.mjs";
|
|
15
16
|
import { isBuiltinModule } from "./modules.mjs";
|
|
17
|
+
import { replacePathTokens } from "./paths.mjs";
|
|
16
18
|
|
|
17
|
-
export { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
19
|
+
export { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let _stryke_fs_install = require("@stryke/fs/install");
|
|
3
|
+
let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
4
|
+
let _stryke_string_format_package = require("@stryke/string-format/package");
|
|
5
|
+
let _stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
|
|
6
|
+
|
|
7
|
+
//#region src/plugin-utils/install.ts
|
|
8
|
+
/**
|
|
9
|
+
* Installs a package if it is not already installed.
|
|
10
|
+
*
|
|
11
|
+
* @param context - The resolved options
|
|
12
|
+
* @param packageName - The name of the package to install
|
|
13
|
+
* @param dev - Whether to install the package as a dev dependency
|
|
14
|
+
*/
|
|
15
|
+
async function installPackage(context, packageName, dev = false) {
|
|
16
|
+
if (!await (0, _stryke_fs_package_fns.isPackageListed)((0, _stryke_string_format_package.getPackageName)(packageName), { cwd: context.config.root })) if (context.config.autoInstall) {
|
|
17
|
+
context.warn(`The package "${packageName}" is not installed. It will be installed automatically.`);
|
|
18
|
+
const result = await (0, _stryke_fs_install.install)(packageName, {
|
|
19
|
+
cwd: context.config.root,
|
|
20
|
+
dev
|
|
21
|
+
});
|
|
22
|
+
if ((0, _stryke_type_checks_is_number.isNumber)(result.exitCode) && result.exitCode > 0) {
|
|
23
|
+
context.error(result.stderr);
|
|
24
|
+
throw new Error(`An error occurred while installing the package "${packageName}"`);
|
|
25
|
+
}
|
|
26
|
+
} else context.warn(`The package "${packageName}" is not installed. Since the "autoInstall" option is set to false, it will not be installed automatically.`);
|
|
27
|
+
else if ((0, _stryke_string_format_package.hasPackageVersion)(packageName) && !process.env.POWERLINES_SKIP_VERSION_CHECK) {
|
|
28
|
+
if (!await (0, _stryke_fs_package_fns.doesPackageMatch)((0, _stryke_string_format_package.getPackageName)(packageName), (0, _stryke_string_format_package.getPackageVersion)(packageName), context.config.root)) {
|
|
29
|
+
const packageListing = await (0, _stryke_fs_package_fns.getPackageListing)((0, _stryke_string_format_package.getPackageName)(packageName), { cwd: context.config.root });
|
|
30
|
+
if (!packageListing?.version.startsWith("catalog:") && !packageListing?.version.startsWith("workspace:")) context.warn(`The package "${(0, _stryke_string_format_package.getPackageName)(packageName)}" is installed but does not match the expected version ${(0, _stryke_string_format_package.getPackageVersion)(packageName)} (installed version: ${packageListing?.version || "<Unknown>"}). Please ensure this is intentional before proceeding. Note: You can skip this validation with the "STORM_STACK_SKIP_VERSION_CHECK" environment variable.`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Installs a package if it is not already installed.
|
|
36
|
+
*
|
|
37
|
+
* @param context - The resolved options
|
|
38
|
+
* @param packages - The list of packages to install
|
|
39
|
+
*/
|
|
40
|
+
async function installPackages(context, packages) {
|
|
41
|
+
return Promise.all(packages.map(async (pkg) => installPackage(context, pkg.name, pkg.dev)));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.installPackage = installPackage;
|
|
46
|
+
exports.installPackages = installPackages;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Context } from "../types/context.cjs";
|
|
2
|
+
//#region src/plugin-utils/install.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Installs a package if it is not already installed.
|
|
5
|
+
*
|
|
6
|
+
* @param context - The resolved options
|
|
7
|
+
* @param packageName - The name of the package to install
|
|
8
|
+
* @param dev - Whether to install the package as a dev dependency
|
|
9
|
+
*/
|
|
10
|
+
declare function installPackage(context: Context, packageName: string, dev?: boolean): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Installs a package if it is not already installed.
|
|
13
|
+
*
|
|
14
|
+
* @param context - The resolved options
|
|
15
|
+
* @param packages - The list of packages to install
|
|
16
|
+
*/
|
|
17
|
+
declare function installPackages(context: Context, packages: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
dev?: boolean;
|
|
20
|
+
}>): Promise<void[]>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { installPackage, installPackages };
|
|
23
|
+
//# sourceMappingURL=install.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.cts","names":[],"sources":["../../src/plugin-utils/install.ts"],"mappings":";;;;;AAuCA;;;;iBAAsB,cAAA,CACpB,OAAA,EAAS,OAAA,EACT,WAAA,UACA,GAAA,aAAW,OAAA;;;;;;AAAA;iBA+DS,eAAA,CACpB,OAAA,EAAS,OAAA,EACT,QAAA,EAAU,KAAA;EAAQ,IAAA;EAAc,GAAA;AAAA,KAAgB,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Context } from "../types/context.mjs";
|
|
2
|
+
//#region src/plugin-utils/install.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Installs a package if it is not already installed.
|
|
5
|
+
*
|
|
6
|
+
* @param context - The resolved options
|
|
7
|
+
* @param packageName - The name of the package to install
|
|
8
|
+
* @param dev - Whether to install the package as a dev dependency
|
|
9
|
+
*/
|
|
10
|
+
declare function installPackage(context: Context, packageName: string, dev?: boolean): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Installs a package if it is not already installed.
|
|
13
|
+
*
|
|
14
|
+
* @param context - The resolved options
|
|
15
|
+
* @param packages - The list of packages to install
|
|
16
|
+
*/
|
|
17
|
+
declare function installPackages(context: Context, packages: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
dev?: boolean;
|
|
20
|
+
}>): Promise<void[]>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { installPackage, installPackages };
|
|
23
|
+
//# sourceMappingURL=install.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.mts","names":[],"sources":["../../src/plugin-utils/install.ts"],"mappings":";;;;;AAuCA;;;;iBAAsB,cAAA,CACpB,OAAA,EAAS,OAAA,EACT,WAAA,UACA,GAAA,aAAW,OAAA;;;;;;AAAA;iBA+DS,eAAA,CACpB,OAAA,EAAS,OAAA,EACT,QAAA,EAAU,KAAA;EAAQ,IAAA;EAAc,GAAA;AAAA,KAAgB,OAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { install } from "@stryke/fs/install";
|
|
2
|
+
import { doesPackageMatch, getPackageListing, isPackageListed } from "@stryke/fs/package-fns";
|
|
3
|
+
import { getPackageName, getPackageVersion, hasPackageVersion } from "@stryke/string-format/package";
|
|
4
|
+
import { isNumber } from "@stryke/type-checks/is-number";
|
|
5
|
+
|
|
6
|
+
//#region src/plugin-utils/install.ts
|
|
7
|
+
/**
|
|
8
|
+
* Installs a package if it is not already installed.
|
|
9
|
+
*
|
|
10
|
+
* @param context - The resolved options
|
|
11
|
+
* @param packageName - The name of the package to install
|
|
12
|
+
* @param dev - Whether to install the package as a dev dependency
|
|
13
|
+
*/
|
|
14
|
+
async function installPackage(context, packageName, dev = false) {
|
|
15
|
+
if (!await isPackageListed(getPackageName(packageName), { cwd: context.config.root })) if (context.config.autoInstall) {
|
|
16
|
+
context.warn(`The package "${packageName}" is not installed. It will be installed automatically.`);
|
|
17
|
+
const result = await install(packageName, {
|
|
18
|
+
cwd: context.config.root,
|
|
19
|
+
dev
|
|
20
|
+
});
|
|
21
|
+
if (isNumber(result.exitCode) && result.exitCode > 0) {
|
|
22
|
+
context.error(result.stderr);
|
|
23
|
+
throw new Error(`An error occurred while installing the package "${packageName}"`);
|
|
24
|
+
}
|
|
25
|
+
} else context.warn(`The package "${packageName}" is not installed. Since the "autoInstall" option is set to false, it will not be installed automatically.`);
|
|
26
|
+
else if (hasPackageVersion(packageName) && !process.env.POWERLINES_SKIP_VERSION_CHECK) {
|
|
27
|
+
if (!await doesPackageMatch(getPackageName(packageName), getPackageVersion(packageName), context.config.root)) {
|
|
28
|
+
const packageListing = await getPackageListing(getPackageName(packageName), { cwd: context.config.root });
|
|
29
|
+
if (!packageListing?.version.startsWith("catalog:") && !packageListing?.version.startsWith("workspace:")) context.warn(`The package "${getPackageName(packageName)}" is installed but does not match the expected version ${getPackageVersion(packageName)} (installed version: ${packageListing?.version || "<Unknown>"}). Please ensure this is intentional before proceeding. Note: You can skip this validation with the "STORM_STACK_SKIP_VERSION_CHECK" environment variable.`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Installs a package if it is not already installed.
|
|
35
|
+
*
|
|
36
|
+
* @param context - The resolved options
|
|
37
|
+
* @param packages - The list of packages to install
|
|
38
|
+
*/
|
|
39
|
+
async function installPackages(context, packages) {
|
|
40
|
+
return Promise.all(packages.map(async (pkg) => installPackage(context, pkg.name, pkg.dev)));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { installPackage, installPackages };
|
|
45
|
+
//# sourceMappingURL=install.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.mjs","names":[],"sources":["../../src/plugin-utils/install.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 { Context } from \"@powerlines/core\";\nimport { install } from \"@stryke/fs/install\";\nimport {\n doesPackageMatch,\n getPackageListing,\n isPackageListed\n} from \"@stryke/fs/package-fns\";\nimport {\n getPackageName,\n getPackageVersion,\n hasPackageVersion\n} from \"@stryke/string-format/package\";\nimport { isNumber } from \"@stryke/type-checks/is-number\";\n\n/**\n * Installs a package if it is not already installed.\n *\n * @param context - The resolved options\n * @param packageName - The name of the package to install\n * @param dev - Whether to install the package as a dev dependency\n */\nexport async function installPackage(\n context: Context,\n packageName: string,\n dev = false\n) {\n if (\n !(await isPackageListed(getPackageName(packageName), {\n cwd: context.config.root\n }))\n ) {\n if (context.config.autoInstall) {\n context.warn(\n `The package \"${packageName}\" is not installed. It will be installed automatically.`\n );\n\n const result = await install(packageName, {\n cwd: context.config.root,\n dev\n });\n if (isNumber(result.exitCode) && result.exitCode > 0) {\n context.error(result.stderr);\n throw new Error(\n `An error occurred while installing the package \"${packageName}\"`\n );\n }\n } else {\n context.warn(\n `The package \"${packageName}\" is not installed. Since the \"autoInstall\" option is set to false, it will not be installed automatically.`\n );\n }\n } else if (\n hasPackageVersion(packageName) &&\n !process.env.POWERLINES_SKIP_VERSION_CHECK\n ) {\n const isMatching = await doesPackageMatch(\n getPackageName(packageName),\n getPackageVersion(packageName)!,\n context.config.root\n );\n if (!isMatching) {\n const packageListing = await getPackageListing(\n getPackageName(packageName),\n {\n cwd: context.config.root\n }\n );\n if (\n !packageListing?.version.startsWith(\"catalog:\") &&\n !packageListing?.version.startsWith(\"workspace:\")\n ) {\n context.warn(\n `The package \"${getPackageName(packageName)}\" is installed but does not match the expected version ${getPackageVersion(\n packageName\n )} (installed version: ${packageListing?.version || \"<Unknown>\"}). Please ensure this is intentional before proceeding. Note: You can skip this validation with the \"STORM_STACK_SKIP_VERSION_CHECK\" environment variable.`\n );\n }\n }\n }\n}\n\n/**\n * Installs a package if it is not already installed.\n *\n * @param context - The resolved options\n * @param packages - The list of packages to install\n */\nexport async function installPackages(\n context: Context,\n packages: Array<{ name: string; dev?: boolean }>\n) {\n return Promise.all(\n packages.map(async pkg => installPackage(context, pkg.name, pkg.dev))\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAuCA,eAAsB,eACpB,SACA,aACA,MAAM,OACN;CACA,IACE,CAAE,MAAM,gBAAgB,eAAe,WAAW,GAAG,EACnD,KAAK,QAAQ,OAAO,KACtB,CAAC,GAED,IAAI,QAAQ,OAAO,aAAa;EAC9B,QAAQ,KACN,gBAAgB,YAAY,wDAC9B;EAEA,MAAM,SAAS,MAAM,QAAQ,aAAa;GACxC,KAAK,QAAQ,OAAO;GACpB;EACF,CAAC;EACD,IAAI,SAAS,OAAO,QAAQ,KAAK,OAAO,WAAW,GAAG;GACpD,QAAQ,MAAM,OAAO,MAAM;GAC3B,MAAM,IAAI,MACR,mDAAmD,YAAY,EACjE;EACF;CACF,OACE,QAAQ,KACN,gBAAgB,YAAY,4GAC9B;MAEG,IACL,kBAAkB,WAAW,KAC7B,CAAC,QAAQ,IAAI,+BAOb;MAAI,CAAC,MALoB,iBACvB,eAAe,WAAW,GAC1B,kBAAkB,WAAW,GAC7B,QAAQ,OAAO,IACjB,GACiB;GACf,MAAM,iBAAiB,MAAM,kBAC3B,eAAe,WAAW,GAC1B,EACE,KAAK,QAAQ,OAAO,KACtB,CACF;GACA,IACE,CAAC,gBAAgB,QAAQ,WAAW,UAAU,KAC9C,CAAC,gBAAgB,QAAQ,WAAW,YAAY,GAEhD,QAAQ,KACN,gBAAgB,eAAe,WAAW,EAAE,yDAAyD,kBACnG,WACF,EAAE,uBAAuB,gBAAgB,WAAW,YAAY,2JAClE;EAEJ;;AAEJ;;;;;;;AAQA,eAAsB,gBACpB,SACA,UACA;CACA,OAAO,QAAQ,IACb,SAAS,IAAI,OAAM,QAAO,eAAe,SAAS,IAAI,MAAM,IAAI,GAAG,CAAC,CACtE;AACF"}
|
|
@@ -2,14 +2,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_constants_environments = require('../constants/environments.cjs');
|
|
4
4
|
const require_constants_log_level = require('../constants/log-level.cjs');
|
|
5
|
+
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
5
6
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
6
7
|
let defu = require("defu");
|
|
7
|
-
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
8
|
-
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
9
|
-
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
10
8
|
let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
|
|
11
9
|
let _storm_software_config_tools_utilities_colors = require("@storm-software/config-tools/utilities/colors");
|
|
12
10
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
11
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
12
|
+
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
13
13
|
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
14
14
|
let chalk = require("chalk");
|
|
15
15
|
chalk = require_runtime.__toESM(chalk, 1);
|
|
@@ -37,11 +37,11 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
37
37
|
general: "trace",
|
|
38
38
|
fs: "trace",
|
|
39
39
|
performance: "trace",
|
|
40
|
-
|
|
40
|
+
communication: "trace",
|
|
41
41
|
plugins: "trace",
|
|
42
42
|
hooks: "trace",
|
|
43
43
|
env: "trace",
|
|
44
|
-
|
|
44
|
+
rpc: "trace",
|
|
45
45
|
config: "trace",
|
|
46
46
|
babel: "trace"
|
|
47
47
|
};
|
|
@@ -49,11 +49,11 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
49
49
|
general: "silent",
|
|
50
50
|
fs: "silent",
|
|
51
51
|
performance: "silent",
|
|
52
|
-
|
|
52
|
+
communication: "silent",
|
|
53
53
|
plugins: "silent",
|
|
54
54
|
hooks: "silent",
|
|
55
55
|
env: "silent",
|
|
56
|
-
|
|
56
|
+
rpc: "silent",
|
|
57
57
|
config: "silent",
|
|
58
58
|
babel: "silent"
|
|
59
59
|
};
|
|
@@ -65,11 +65,11 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
65
65
|
general: logLevel,
|
|
66
66
|
fs: defaultLogLevel.fs,
|
|
67
67
|
performance: logLevel,
|
|
68
|
-
|
|
68
|
+
communication: defaultLogLevel.communication,
|
|
69
69
|
plugins: logLevel,
|
|
70
70
|
hooks: logLevel,
|
|
71
71
|
env: defaultLogLevel.env,
|
|
72
|
-
|
|
72
|
+
rpc: defaultLogLevel.rpc,
|
|
73
73
|
config: defaultLogLevel.config,
|
|
74
74
|
babel: logLevel
|
|
75
75
|
};
|
|
@@ -79,29 +79,17 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
79
79
|
}
|
|
80
80
|
return defaultLogLevel;
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"#EF4444",
|
|
94
|
-
"#F0EC56",
|
|
95
|
-
"#F472B6",
|
|
96
|
-
"#22D3EE",
|
|
97
|
-
"#EAB308",
|
|
98
|
-
"#84CC16",
|
|
99
|
-
"#F87171",
|
|
100
|
-
"#0EA5E9",
|
|
101
|
-
"#D946EF",
|
|
102
|
-
"#FACC15",
|
|
103
|
-
"#34D399",
|
|
104
|
-
"#8B5CF6"
|
|
82
|
+
const colors = [
|
|
83
|
+
chalk.default.green,
|
|
84
|
+
chalk.default.greenBright,
|
|
85
|
+
chalk.default.red,
|
|
86
|
+
chalk.default.redBright,
|
|
87
|
+
chalk.default.cyan,
|
|
88
|
+
chalk.default.cyanBright,
|
|
89
|
+
chalk.default.yellow,
|
|
90
|
+
chalk.default.yellowBright,
|
|
91
|
+
chalk.default.magenta,
|
|
92
|
+
chalk.default.magentaBright
|
|
105
93
|
];
|
|
106
94
|
const BRAND_COLOR = (0, _storm_software_config_tools_utilities_colors.getColor)("brand");
|
|
107
95
|
/**
|
|
@@ -111,7 +99,9 @@ const BRAND_COLOR = (0, _storm_software_config_tools_utilities_colors.getColor)(
|
|
|
111
99
|
* @return A hexadecimal color string.
|
|
112
100
|
*/
|
|
113
101
|
const getTextColor = (text) => {
|
|
114
|
-
|
|
102
|
+
let code = 0;
|
|
103
|
+
for (let i = 0; i < text.length; ++i) code += text.charCodeAt(i);
|
|
104
|
+
return colors[code % colors.length] ?? chalk.default.cyanBright;
|
|
115
105
|
};
|
|
116
106
|
/**
|
|
117
107
|
* Generate a consistent color based on the input text.
|
|
@@ -121,7 +111,7 @@ const getTextColor = (text) => {
|
|
|
121
111
|
*/
|
|
122
112
|
const colorText = (text) => {
|
|
123
113
|
const title = (0, _stryke_string_format_title_case.titleCase)(text);
|
|
124
|
-
return
|
|
114
|
+
return getTextColor(title)(title);
|
|
125
115
|
};
|
|
126
116
|
/**
|
|
127
117
|
* Generate a consistent color based on the input text.
|
|
@@ -131,7 +121,7 @@ const colorText = (text) => {
|
|
|
131
121
|
*/
|
|
132
122
|
const colorBackground = (text) => {
|
|
133
123
|
const title = (0, _stryke_string_format_title_case.titleCase)(text);
|
|
134
|
-
return chalk.default.inverse
|
|
124
|
+
return chalk.default.inverse(getTextColor(title)(` ${title} `));
|
|
135
125
|
};
|
|
136
126
|
const consoleLog = (meta, ...args) => (0, _storm_software_config_tools_logger.getLogFn)((0, _storm_software_config_tools_logger.getLogLevel)(meta.category === require_constants_log_level.LogCategories.PERFORMANCE ? "performance" : meta.type), { logLevel: "all" })(`${meta.name ? chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.name)) : ""}${meta.name ? chalk.default.grey(" > ") : ""}${meta.command ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.command))}${chalk.default.grey(" > ")}` : ""}${meta.environment && (0, _stryke_string_format_kebab_case.kebabCase)(meta.environment) !== "default" ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.environment))}${chalk.default.grey(" > ")}` : ""}${meta.plugin ? `${chalk.default.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.default.grey(" > ")}` : ""}${meta.source ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.source))}${chalk.default.grey(" > ")}` : ""}${meta.category && meta.category !== require_constants_log_level.LogCategories.GENERAL && meta.category !== require_constants_log_level.LogCategories.PERFORMANCE ? `${colorBackground((0, _stryke_string_format_kebab_case.kebabCase)(meta.category))} ` : ""}${args.join(" ")} `.trim());
|
|
137
127
|
function isValidLogLevel(logLevel, type) {
|
|
@@ -184,6 +174,19 @@ const validateLogger = (type, name, options, callback) => {
|
|
|
184
174
|
...options
|
|
185
175
|
},
|
|
186
176
|
message
|
|
177
|
+
} : message instanceof Error || message.error ? {
|
|
178
|
+
name,
|
|
179
|
+
plugin: options.plugin,
|
|
180
|
+
message: `${(message instanceof Error ? message : message.error)?.message ? (message instanceof Error ? message : message.error)?.name ? `[${message.name}]: ${message.message}` : message.message : JSON.stringify(message)}${(message instanceof Error ? message : message.error)?.stack ? `
|
|
181
|
+
Stack Trace: ${message.stack}` : ""}`,
|
|
182
|
+
meta: {
|
|
183
|
+
type,
|
|
184
|
+
name,
|
|
185
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
186
|
+
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
187
|
+
timestamp: Date.now(),
|
|
188
|
+
...options
|
|
189
|
+
}
|
|
187
190
|
} : {
|
|
188
191
|
name,
|
|
189
192
|
plugin: options.plugin,
|
|
@@ -447,40 +450,40 @@ const consoleLogger = (meta, message) => consoleLog({
|
|
|
447
450
|
const createLogger = (name, options, callback = consoleLogger) => {
|
|
448
451
|
const result = {
|
|
449
452
|
options: {
|
|
450
|
-
|
|
451
|
-
|
|
453
|
+
name,
|
|
454
|
+
...options
|
|
452
455
|
},
|
|
453
456
|
error: validateLogger("error", name, {
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
name,
|
|
458
|
+
...options
|
|
456
459
|
}, (data) => callback({
|
|
457
460
|
...data.meta,
|
|
458
461
|
type: "error"
|
|
459
462
|
}, data.message)),
|
|
460
463
|
warn: validateLogger("warn", name, {
|
|
461
|
-
|
|
462
|
-
|
|
464
|
+
name,
|
|
465
|
+
...options
|
|
463
466
|
}, (data) => callback({
|
|
464
467
|
...data.meta,
|
|
465
468
|
type: "warn"
|
|
466
469
|
}, data.message)),
|
|
467
470
|
info: validateLogger("info", name, {
|
|
468
|
-
|
|
469
|
-
|
|
471
|
+
name,
|
|
472
|
+
...options
|
|
470
473
|
}, (data) => callback({
|
|
471
474
|
...data.meta,
|
|
472
475
|
type: "info"
|
|
473
476
|
}, data.message)),
|
|
474
477
|
debug: validateLogger("debug", name, {
|
|
475
|
-
|
|
476
|
-
|
|
478
|
+
name,
|
|
479
|
+
...options
|
|
477
480
|
}, (data) => callback({
|
|
478
481
|
...data.meta,
|
|
479
482
|
type: "debug"
|
|
480
483
|
}, data.message)),
|
|
481
484
|
trace: validateLogger("trace", name, {
|
|
482
|
-
|
|
483
|
-
|
|
485
|
+
name,
|
|
486
|
+
...options
|
|
484
487
|
}, (data) => callback({
|
|
485
488
|
...data.meta,
|
|
486
489
|
type: "trace"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CustomLogger, LogCategory, LogFn, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMeta, Logger, LoggerOptions } from "../types/logging.cjs";
|
|
2
2
|
import { UnresolvedContext } from "../types/context.cjs";
|
|
3
3
|
import { Mode } from "../types/config.cjs";
|
|
4
|
+
import { ChalkInstance } from "chalk";
|
|
4
5
|
|
|
5
6
|
//#region src/plugin-utils/logging.d.ts
|
|
6
7
|
/**
|
|
@@ -31,7 +32,7 @@ declare function resolveLogLevel(logLevel?: LogLevelUserConfig, mode?: Mode): Lo
|
|
|
31
32
|
* @param text - The input text to generate the color from.
|
|
32
33
|
* @return A hexadecimal color string.
|
|
33
34
|
*/
|
|
34
|
-
declare const getTextColor: (text: string) =>
|
|
35
|
+
declare const getTextColor: (text: string) => ChalkInstance;
|
|
35
36
|
/**
|
|
36
37
|
* Generate a consistent color based on the input text.
|
|
37
38
|
*
|
|
@@ -89,7 +90,7 @@ declare const consoleLogger: LogFn;
|
|
|
89
90
|
* @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.
|
|
90
91
|
* @returns A logging function.
|
|
91
92
|
*/
|
|
92
|
-
declare const createLogger: (name: string, options: LoggerOptions, callback?: LogFn) => Logger;
|
|
93
|
+
declare const createLogger: (name: string | undefined, options: LoggerOptions, callback?: LogFn) => Logger;
|
|
93
94
|
/**
|
|
94
95
|
* Extend a logging function with a specific name, adding a colored badge to the log output.
|
|
95
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;AAsFzB;cAAa,YAAA,GAAgB,IAAA,aAAe,aAO3C;;;AAAA;AAQD;;;cAAa,SAAA,GAAa,IAAY;AAAA;AAYtC;;;;AAA4C;AAZN,cAYzB,eAAA,GAAmB,IAAY;AAAA,cAM/B,UAAA,GAAc,IAAA,EAAM,OAAO,KAAK,IAAA;AAAA,iBAwC7B,eAAA,CAAgB,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,QAAQ;AAAA,iBAQlD,qBAAA,CACd,IAAA,EAAM,QAAA,EACN,QAAA,EAAU,sBAAA,EACV,QAAA,GAAU,WAAA;;;;;AAnDiC;AAwC7C;;cAuBa,WAAA,GAAe,IAAA,UAAc,OAAA,EAAS,YAAA,KAAe,KAiCjE;;;;;;;AAxDiE;cA4LrD,UAAA,GAAc,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,MAAA,KAAS,MAAA;;;;;;;;cAuFxD,SAAA,GAAa,MAAA,EAAQ,MAAA,EAAQ,KAAA,EAAO,KAAA,KAAQ,MAAA;;;;;;;AAxQV;cA+YlC,gBAAA,GACX,MAAA,EAAQ,MAAA,EACR,YAAA,EAAc,YAAA,KACb,MAAA;AAAA,cAoEU,aAAA,EAAe,KAUzB;;;;;;;;cASU,YAAA,GACX,IAAA,sBACA,OAAA,EAAS,aAAA,EACT,QAAA,GAAU,KAAA,KACT,MAAA;AA5TH;;;;;;;AAAA,cAmXa,WAAA,GAAe,KAAA,EAAO,KAAA,EAAO,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;AArSjE;cA2TY,YAAA,GACX,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,aAAA,KACR,MAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CustomLogger, LogCategory, LogFn, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMeta, Logger, LoggerOptions } from "../types/logging.mjs";
|
|
2
2
|
import { UnresolvedContext } from "../types/context.mjs";
|
|
3
3
|
import { Mode } from "../types/config.mjs";
|
|
4
|
+
import { ChalkInstance } from "chalk";
|
|
4
5
|
|
|
5
6
|
//#region src/plugin-utils/logging.d.ts
|
|
6
7
|
/**
|
|
@@ -31,7 +32,7 @@ declare function resolveLogLevel(logLevel?: LogLevelUserConfig, mode?: Mode): Lo
|
|
|
31
32
|
* @param text - The input text to generate the color from.
|
|
32
33
|
* @return A hexadecimal color string.
|
|
33
34
|
*/
|
|
34
|
-
declare const getTextColor: (text: string) =>
|
|
35
|
+
declare const getTextColor: (text: string) => ChalkInstance;
|
|
35
36
|
/**
|
|
36
37
|
* Generate a consistent color based on the input text.
|
|
37
38
|
*
|
|
@@ -89,7 +90,7 @@ declare const consoleLogger: LogFn;
|
|
|
89
90
|
* @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.
|
|
90
91
|
* @returns A logging function.
|
|
91
92
|
*/
|
|
92
|
-
declare const createLogger: (name: string, options: LoggerOptions, callback?: LogFn) => Logger;
|
|
93
|
+
declare const createLogger: (name: string | undefined, options: LoggerOptions, callback?: LogFn) => Logger;
|
|
93
94
|
/**
|
|
94
95
|
* Extend a logging function with a specific name, adding a colored badge to the log output.
|
|
95
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;AAsFzB;cAAa,YAAA,GAAgB,IAAA,aAAe,aAO3C;;;AAAA;AAQD;;;cAAa,SAAA,GAAa,IAAY;AAAA;AAYtC;;;;AAA4C;AAZN,cAYzB,eAAA,GAAmB,IAAY;AAAA,cAM/B,UAAA,GAAc,IAAA,EAAM,OAAO,KAAK,IAAA;AAAA,iBAwC7B,eAAA,CAAgB,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,QAAQ;AAAA,iBAQlD,qBAAA,CACd,IAAA,EAAM,QAAA,EACN,QAAA,EAAU,sBAAA,EACV,QAAA,GAAU,WAAA;;;;;AAnDiC;AAwC7C;;cAuBa,WAAA,GAAe,IAAA,UAAc,OAAA,EAAS,YAAA,KAAe,KAiCjE;;;;;;;AAxDiE;cA4LrD,UAAA,GAAc,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,MAAA,KAAS,MAAA;;;;;;;;cAuFxD,SAAA,GAAa,MAAA,EAAQ,MAAA,EAAQ,KAAA,EAAO,KAAA,KAAQ,MAAA;;;;;;;AAxQV;cA+YlC,gBAAA,GACX,MAAA,EAAQ,MAAA,EACR,YAAA,EAAc,YAAA,KACb,MAAA;AAAA,cAoEU,aAAA,EAAe,KAUzB;;;;;;;;cASU,YAAA,GACX,IAAA,sBACA,OAAA,EAAS,aAAA,EACT,QAAA,GAAU,KAAA,KACT,MAAA;AA5TH;;;;;;;AAAA,cAmXa,WAAA,GAAe,KAAA,EAAO,KAAA,EAAO,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;AArSjE;cA2TY,YAAA,GACX,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,aAAA,KACR,MAAA"}
|