@powerlines/core 0.15.0 → 0.15.1
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 +6 -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 +3 -2
- 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/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 -30
- package/dist/constants/index.d.cts +5 -3
- package/dist/constants/index.d.mts +5 -3
- package/dist/constants/index.mjs +5 -3
- 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 -9
- package/dist/index.d.cts +20 -9
- package/dist/index.d.mts +20 -9
- package/dist/index.mjs +17 -5
- package/dist/lib/config.cjs +160 -15
- package/dist/lib/config.d.cts +92 -6
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +92 -6
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +154 -16
- 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 +5 -5
- package/dist/lib/entry.d.cts.map +1 -1
- 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 +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 -9
- 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 +18 -18
- package/dist/lib/unplugin/module-resolution.mjs +18 -18
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +55 -62
- package/dist/lib/unplugin/plugin.d.cts +10 -11
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts +10 -11
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +55 -62
- 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 +1 -1
- package/dist/lib/utilities/format.mjs +1 -1
- package/dist/lib/utilities/index.cjs +2 -2
- package/dist/lib/utilities/index.mjs +2 -2
- 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 +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 -2
- package/dist/plugin-utils/build-helpers.mjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +22 -12
- package/dist/plugin-utils/context-helpers.d.cts +9 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +9 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +22 -13
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +13 -5
- package/dist/plugin-utils/filter.d.cts +2 -1
- package/dist/plugin-utils/filter.d.cts.map +1 -1
- package/dist/plugin-utils/filter.d.mts +2 -1
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +13 -6
- package/dist/plugin-utils/filter.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/helpers.cjs +6 -6
- package/dist/plugin-utils/helpers.d.cts +15 -15
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +15 -15
- 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 +34 -4
- package/dist/plugin-utils/index.d.cts +7 -4
- package/dist/plugin-utils/index.d.mts +7 -4
- package/dist/plugin-utils/index.mjs +9 -6
- 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 +588 -1
- package/dist/plugin-utils/logging.d.cts +93 -1
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +93 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +572 -1
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +1 -1
- package/dist/plugin-utils/merge.mjs +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 +6 -2
- package/dist/plugin-utils/paths.mjs +6 -2
- 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 -152
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +18 -152
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +194 -135
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +195 -136
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +152 -128
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +155 -131
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.mts +1 -1
- package/dist/types/index.d.cts +5 -6
- package/dist/types/index.d.mts +5 -6
- 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 +6 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +6 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.mts +1 -1
- package/dist/types/unplugin.d.cts +5 -26
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +5 -26
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +259 -457
- package/schemas/fs.capnp +42 -0
- package/dist/constants/virtual-modules.cjs +0 -8
- package/dist/constants/virtual-modules.d.cts +0 -6
- package/dist/constants/virtual-modules.d.cts.map +0 -1
- package/dist/constants/virtual-modules.d.mts +0 -6
- package/dist/constants/virtual-modules.d.mts.map +0 -1
- package/dist/constants/virtual-modules.mjs +0 -7
- package/dist/constants/virtual-modules.mjs.map +0 -1
- package/dist/lib/logger.cjs +0 -99
- package/dist/lib/logger.d.cts +0 -53
- package/dist/lib/logger.d.cts.map +0 -1
- package/dist/lib/logger.d.mts +0 -53
- package/dist/lib/logger.d.mts.map +0 -1
- package/dist/lib/logger.mjs +0 -93
- 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 -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
package/dist/index.cjs
CHANGED
|
@@ -1,45 +1,98 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_lib_resolver = require('./lib/resolver.cjs');
|
|
2
3
|
const require_lib_config = require('./lib/config.cjs');
|
|
4
|
+
const require_lib_utilities_format = require('./lib/utilities/format.cjs');
|
|
5
|
+
const require_lib_hooks = require('./lib/hooks.cjs');
|
|
6
|
+
const require_lib_context_helpers = require('./lib/context-helpers.cjs');
|
|
3
7
|
const require_lib_entry = require('./lib/entry.cjs');
|
|
4
|
-
const
|
|
8
|
+
const require_lib_events = require('./lib/events.cjs');
|
|
9
|
+
const require_lib_typescript_ts_morph = require('./lib/typescript/ts-morph.cjs');
|
|
10
|
+
const require_lib_utilities_file_header = require('./lib/utilities/file-header.cjs');
|
|
11
|
+
const require_lib_generate_types = require('./lib/generate-types.cjs');
|
|
12
|
+
const require_lib_install_dependencies = require('./lib/install-dependencies.cjs');
|
|
13
|
+
const require_lib_meta = require('./lib/meta.cjs');
|
|
14
|
+
const require_lib_plugins = require('./lib/plugins.cjs');
|
|
15
|
+
const require_fs = require('./schemas/fs.cjs');
|
|
16
|
+
const require_lib_streaming_channel = require('./lib/streaming-channel.cjs');
|
|
17
|
+
const require_lib_typescript_tsconfig = require('./lib/typescript/tsconfig.cjs');
|
|
5
18
|
const require_lib_unplugin_helpers = require('./lib/unplugin/helpers.cjs');
|
|
6
19
|
const require_lib_unplugin_module_resolution = require('./lib/unplugin/module-resolution.cjs');
|
|
7
20
|
const require_lib_utilities_source_file = require('./lib/utilities/source-file.cjs');
|
|
8
21
|
const require_lib_unplugin_plugin = require('./lib/unplugin/plugin.cjs');
|
|
9
|
-
const require_lib_utilities_file_header = require('./lib/utilities/file-header.cjs');
|
|
10
|
-
const require_lib_utilities_format = require('./lib/utilities/format.cjs');
|
|
11
22
|
const require_lib_utilities_source_map = require('./lib/utilities/source-map.cjs');
|
|
12
23
|
const require_lib_utilities_write_file = require('./lib/utilities/write-file.cjs');
|
|
24
|
+
const require_lib_vfs = require('./lib/vfs.cjs');
|
|
13
25
|
require('./lib/index.cjs');
|
|
14
26
|
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
27
|
+
exports.FileId = require_fs.FileId;
|
|
28
|
+
exports.FileMetadata = require_fs.FileMetadata;
|
|
29
|
+
exports.FileMetadata_KeyValuePair = require_fs.FileMetadata_KeyValuePair;
|
|
30
|
+
exports.FileStorage = require_fs.FileStorage;
|
|
31
|
+
exports.FileSystem = require_fs.FileSystem;
|
|
32
|
+
exports.VirtualFileSystem = require_lib_vfs.VirtualFileSystem;
|
|
33
|
+
exports.VirtualFileSystemHost = require_lib_typescript_ts_morph.VirtualFileSystemHost;
|
|
34
|
+
exports._capnpFileId = require_fs._capnpFileId;
|
|
35
|
+
exports.callHook = require_lib_hooks.callHook;
|
|
17
36
|
exports.combineContexts = require_lib_unplugin_helpers.combineContexts;
|
|
18
|
-
exports.
|
|
37
|
+
exports.createEventEmitter = require_lib_events.createEventEmitter;
|
|
38
|
+
exports.createProgram = require_lib_typescript_ts_morph.createProgram;
|
|
39
|
+
exports.createResolver = require_lib_resolver.createResolver;
|
|
40
|
+
exports.createStreamReader = require_lib_streaming_channel.createStreamReader;
|
|
41
|
+
exports.createStreamSink = require_lib_streaming_channel.createStreamSink;
|
|
19
42
|
exports.createUnplugin = require_lib_unplugin_plugin.createUnplugin;
|
|
20
43
|
exports.createUnpluginModuleResolutionFunctions = require_lib_unplugin_module_resolution.createUnpluginModuleResolutionFunctions;
|
|
21
44
|
exports.createUnpluginResolver = require_lib_unplugin_plugin.createUnpluginResolver;
|
|
22
45
|
exports.defineConfig = require_lib_config.defineConfig;
|
|
23
|
-
exports.
|
|
46
|
+
exports.emitBuiltinTypes = require_lib_generate_types.emitBuiltinTypes;
|
|
47
|
+
exports.extractHooks = require_lib_hooks.extractHooks;
|
|
48
|
+
exports.findIncludeMatch = require_lib_typescript_tsconfig.findIncludeMatch;
|
|
49
|
+
exports.findMatch = require_lib_typescript_tsconfig.findMatch;
|
|
24
50
|
exports.format = require_lib_utilities_format.format;
|
|
25
51
|
exports.formatFolder = require_lib_utilities_format.formatFolder;
|
|
52
|
+
exports.formatTypes = require_lib_generate_types.formatTypes;
|
|
26
53
|
exports.generateSourceMap = require_lib_utilities_source_map.generateSourceMap;
|
|
54
|
+
exports.getConfigProps = require_lib_context_helpers.getConfigProps;
|
|
55
|
+
exports.getDefaultLogLevel = require_lib_config.getDefaultLogLevel;
|
|
56
|
+
exports.getDefaultMode = require_lib_config.getDefaultMode;
|
|
27
57
|
exports.getFileHeader = require_lib_utilities_file_header.getFileHeader;
|
|
28
58
|
exports.getFileHeaderWarning = require_lib_utilities_file_header.getFileHeaderWarning;
|
|
29
59
|
exports.getFileHeaderWarningText = require_lib_utilities_file_header.getFileHeaderWarningText;
|
|
30
60
|
exports.getMagicString = require_lib_utilities_source_file.getMagicString;
|
|
61
|
+
exports.getParsedTypeScriptConfig = require_lib_typescript_tsconfig.getParsedTypeScriptConfig;
|
|
62
|
+
exports.getPersistedMeta = require_lib_meta.getPersistedMeta;
|
|
63
|
+
exports.getPrefixedRootHash = require_lib_meta.getPrefixedRootHash;
|
|
31
64
|
exports.getSourceFile = require_lib_utilities_source_file.getSourceFile;
|
|
32
65
|
exports.getString = require_lib_utilities_source_file.getString;
|
|
33
|
-
exports.
|
|
66
|
+
exports.getTsconfigDtsPath = require_lib_typescript_tsconfig.getTsconfigDtsPath;
|
|
67
|
+
exports.getTsconfigFilePath = require_lib_typescript_tsconfig.getTsconfigFilePath;
|
|
34
68
|
exports.getTypescriptFileHeader = require_lib_utilities_file_header.getTypescriptFileHeader;
|
|
35
69
|
exports.getUniqueInputs = require_lib_entry.getUniqueInputs;
|
|
70
|
+
exports.handleTypes = require_lib_generate_types.handleTypes;
|
|
71
|
+
exports.initPlugin = require_lib_plugins.initPlugin;
|
|
72
|
+
exports.initializeTsconfig = require_lib_typescript_tsconfig.initializeTsconfig;
|
|
73
|
+
exports.installDependencies = require_lib_install_dependencies.installDependencies;
|
|
74
|
+
exports.isIncludeMatchFound = require_lib_typescript_tsconfig.isIncludeMatchFound;
|
|
75
|
+
exports.isMatchFound = require_lib_typescript_tsconfig.isMatchFound;
|
|
36
76
|
exports.isResolvedEntryTypeDefinition = require_lib_entry.isResolvedEntryTypeDefinition;
|
|
37
77
|
exports.isTypeDefinition = require_lib_entry.isTypeDefinition;
|
|
38
78
|
exports.isUnpluginBuilderVariant = require_lib_unplugin_helpers.isUnpluginBuilderVariant;
|
|
79
|
+
exports.loadParsedConfig = require_lib_config.loadParsedConfig;
|
|
39
80
|
exports.loadUserConfigFile = require_lib_config.loadUserConfigFile;
|
|
40
81
|
exports.loadWorkspaceConfig = require_lib_config.loadWorkspaceConfig;
|
|
82
|
+
exports.mergeConfigs = require_lib_hooks.mergeConfigs;
|
|
83
|
+
exports.mergeResults = require_lib_hooks.mergeResults;
|
|
84
|
+
exports.normalizeBasePath = require_lib_config.normalizeBasePath;
|
|
41
85
|
exports.resolveEntryOutput = require_lib_entry.resolveEntryOutput;
|
|
42
86
|
exports.resolveInput = require_lib_entry.resolveInput;
|
|
43
87
|
exports.resolveInputs = require_lib_entry.resolveInputs;
|
|
44
88
|
exports.resolveInputsSync = require_lib_entry.resolveInputsSync;
|
|
45
|
-
exports.
|
|
89
|
+
exports.resolvePackageConfigs = require_lib_config.resolvePackageConfigs;
|
|
90
|
+
exports.resolvePlugin = require_lib_plugins.resolvePlugin;
|
|
91
|
+
exports.resolvePluginConfig = require_lib_context_helpers.resolvePluginConfig;
|
|
92
|
+
exports.resolvePlugins = require_lib_plugins.resolvePlugins;
|
|
93
|
+
exports.resolveRoot = require_lib_config.resolveRoot;
|
|
94
|
+
exports.resolveTsconfig = require_lib_typescript_tsconfig.resolveTsconfig;
|
|
95
|
+
exports.tryResolveWorkspaceConfig = require_lib_config.tryResolveWorkspaceConfig;
|
|
96
|
+
exports.tryTsconfigFilePath = require_lib_typescript_tsconfig.tryTsconfigFilePath;
|
|
97
|
+
exports.writeFile = require_lib_utilities_write_file.writeFile;
|
|
98
|
+
exports.writeMetaFile = require_lib_meta.writeMetaFile;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.cjs";
|
|
2
|
-
import { BaseCommandType, CommandType, Commands, __ΩBaseCommandType, __ΩCommandType, __ΩCommands } from "./types/
|
|
3
|
-
import {
|
|
4
|
-
import { API, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, __ΩAPI, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess } from "./types/api.cjs";
|
|
5
|
-
import { BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./types/unplugin.cjs";
|
|
2
|
+
import { BaseCommandType, BaseExecutionAPIMethods, CommandType, Commands, PowerlinesExecutionAPIMethods, SupportedCommands, __ΩBaseCommandType, __ΩBaseExecutionAPIMethods, __ΩCommandType, __ΩCommands, __ΩPowerlinesExecutionAPIMethods, __ΩSupportedCommands } from "./types/api.cjs";
|
|
3
|
+
import { BuilderVariant, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, __ΩBuilderVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginHookFunctions, __ΩUnpluginOptions } from "./types/unplugin.cjs";
|
|
6
4
|
import { BasePlugin, HookFunctions, Hooks, Plugin, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩBasePlugin, __ΩHookFunctions, __ΩHooks, __ΩPlugin, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./types/plugin.cjs";
|
|
7
5
|
import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, NormalizedStringFilter, PluginFilter, TransformHookFilter, __ΩCallHookOptions, __ΩHookListOrders, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩNormalizedStringFilter, __ΩPluginFilter, __ΩTransformHookFilter } from "./types/hooks.cjs";
|
|
6
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./types/logging.cjs";
|
|
8
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.cjs";
|
|
9
|
-
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions,
|
|
10
|
-
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig,
|
|
11
|
-
import { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig } from "./lib/config.cjs";
|
|
8
|
+
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, 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 } from "./types/context.cjs";
|
|
9
|
+
import { AnyOutputUserConfig, AnyUserConfig, BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseExecutionOptions, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩConfigParams, __ΩCopyConfig, __ΩCreateInlineConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩFrameworkOptions, __ΩInferOverridableConfig, __ΩInlineConfig, __ΩInlineConfigPaths, __ΩLintInlineConfig, __ΩMode, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./types/config.cjs";
|
|
10
|
+
import { PartiallyResolvedContext, ResolvePackageConfigsResult, __ΩPartiallyResolvedContext, __ΩResolvePackageConfigsResult, defineConfig, getDefaultLogLevel, getDefaultMode, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, normalizeBasePath, resolvePackageConfigs, resolveRoot, tryResolveWorkspaceConfig } from "./lib/config.cjs";
|
|
11
|
+
import { getConfigProps, resolvePluginConfig } from "./lib/context-helpers.cjs";
|
|
12
12
|
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.cjs";
|
|
13
|
-
import {
|
|
13
|
+
import { createEventEmitter } from "./lib/events.cjs";
|
|
14
|
+
import { TypegenContext, __ΩTypegenContext, emitBuiltinTypes, formatTypes, handleTypes } from "./lib/generate-types.cjs";
|
|
15
|
+
import { callHook, extractHooks, mergeConfigs, mergeResults } from "./lib/hooks.cjs";
|
|
16
|
+
import { installDependencies } from "./lib/install-dependencies.cjs";
|
|
17
|
+
import { CreateContextOptions, __ΩCreateContextOptions, getPersistedMeta, getPrefixedRootHash, writeMetaFile } from "./lib/meta.cjs";
|
|
18
|
+
import { ResolvePluginsOptions, __ΩResolvePluginsOptions, initPlugin, resolvePlugin, resolvePlugins } from "./lib/plugins.cjs";
|
|
19
|
+
import { CreateResolverOptions, __ΩCreateResolverOptions, createResolver } from "./lib/resolver.cjs";
|
|
20
|
+
import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "./schemas/fs.cjs";
|
|
21
|
+
import { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, __ΩBufferedChunk, __ΩCreateStreamReaderOptions, __ΩCreateStreamSinkOptions, __ΩStreamErrorPayload, __ΩStreamReader, __ΩStreamSink, __ΩStreamSinkEvents, createStreamReader, createStreamSink } from "./lib/streaming-channel.cjs";
|
|
22
|
+
import { VirtualFileSystemHost, createProgram } from "./lib/typescript/ts-morph.cjs";
|
|
23
|
+
import { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath } from "./lib/typescript/tsconfig.cjs";
|
|
14
24
|
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.cjs";
|
|
15
25
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.cjs";
|
|
16
26
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.cjs";
|
|
@@ -19,4 +29,5 @@ import { format, formatFolder } from "./lib/utilities/format.cjs";
|
|
|
19
29
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.cjs";
|
|
20
30
|
import { generateSourceMap } from "./lib/utilities/source-map.cjs";
|
|
21
31
|
import { writeFile } from "./lib/utilities/write-file.cjs";
|
|
22
|
-
|
|
32
|
+
import { VirtualFileSystem } from "./lib/vfs.cjs";
|
|
33
|
+
export { AnyOutputUserConfig, AnyUserConfig, BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesCommand, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigFn, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystem, VirtualFileSystemHost, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkspaceConfig, WriteData, WriteOptions, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseCommandType, __ΩBaseContext, __ΩBaseExecutionAPIMethods, __ΩBaseExecutionOptions, __ΩBasePlugin, __ΩBufferedChunk, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfig, __ΩConfigParams, __ΩContext, __ΩCopyConfig, __ΩCreateContextOptions, __ΩCreateInlineConfig, __ΩCreateResolverOptions, __ΩCreateStreamReaderOptions, __ΩCreateStreamSinkOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentPlugin, __ΩEnvironmentResolvedConfig, __ΩExecutionContext, __ΩExecutionOptions, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩFrameworkOptions, __ΩHookFunctions, __ΩHookListOrders, __ΩHooks, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferOverridableConfig, __ΩInitContextOptions, __ΩInlineConfig, __ΩInlineConfigPaths, __ΩLevel, __ΩLintInlineConfig, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩMetaInfo, __ΩMode, __ΩNormalizedStringFilter, __ΩOptions, __ΩOutputConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFilter, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPowerlinesExecutionAPIMethods, __ΩPowerlinesMessage, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolvePackageConfigsResult, __ΩResolvePluginsOptions, __ΩResolveResult, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩStreamErrorPayload, __ΩStreamReader, __ΩStreamSink, __ΩStreamSinkEvents, __ΩSupportedCommands, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTestInlineConfig, __ΩTransformHookFilter, __ΩTransformResult, __ΩTypegenContext, __ΩTypesInlineConfig, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginBuilderVariant, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnresolvedContext, __ΩUserConfig, __ΩUserConfigFn, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, _capnpFileId, callHook, combineContexts, createEventEmitter, createProgram, createResolver, createStreamReader, createStreamSink, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, emitBuiltinTypes, extractHooks, findIncludeMatch, findMatch, format, formatFolder, formatTypes, generateSourceMap, getConfigProps, getDefaultLogLevel, getDefaultMode, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getParsedTypeScriptConfig, getPersistedMeta, getPrefixedRootHash, getSourceFile, getString, getTsconfigDtsPath, getTsconfigFilePath, getTypescriptFileHeader, getUniqueInputs, handleTypes, initPlugin, initializeTsconfig, installDependencies, isIncludeMatchFound, isMatchFound, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, mergeConfigs, mergeResults, normalizeBasePath, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, resolvePackageConfigs, resolvePlugin, resolvePluginConfig, resolvePlugins, resolveRoot, resolveTsconfig, tryResolveWorkspaceConfig, tryTsconfigFilePath, writeFile, writeMetaFile };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.mjs";
|
|
2
|
-
import { BaseCommandType, CommandType, Commands, __ΩBaseCommandType, __ΩCommandType, __ΩCommands } from "./types/
|
|
3
|
-
import {
|
|
4
|
-
import { API, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, __ΩAPI, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess } from "./types/api.mjs";
|
|
5
|
-
import { BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./types/unplugin.mjs";
|
|
2
|
+
import { BaseCommandType, BaseExecutionAPIMethods, CommandType, Commands, PowerlinesExecutionAPIMethods, SupportedCommands, __ΩBaseCommandType, __ΩBaseExecutionAPIMethods, __ΩCommandType, __ΩCommands, __ΩPowerlinesExecutionAPIMethods, __ΩSupportedCommands } from "./types/api.mjs";
|
|
3
|
+
import { BuilderVariant, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, __ΩBuilderVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginHookFunctions, __ΩUnpluginOptions } from "./types/unplugin.mjs";
|
|
6
4
|
import { BasePlugin, HookFunctions, Hooks, Plugin, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩBasePlugin, __ΩHookFunctions, __ΩHooks, __ΩPlugin, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./types/plugin.mjs";
|
|
7
5
|
import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, NormalizedStringFilter, PluginFilter, TransformHookFilter, __ΩCallHookOptions, __ΩHookListOrders, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩNormalizedStringFilter, __ΩPluginFilter, __ΩTransformHookFilter } from "./types/hooks.mjs";
|
|
6
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./types/logging.mjs";
|
|
8
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.mjs";
|
|
9
|
-
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions,
|
|
10
|
-
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig,
|
|
11
|
-
import { PartiallyResolvedContext, __ΩPartiallyResolvedContext, defineConfig, loadUserConfigFile, loadWorkspaceConfig } from "./lib/config.mjs";
|
|
8
|
+
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, 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 } from "./types/context.mjs";
|
|
9
|
+
import { AnyOutputUserConfig, AnyUserConfig, BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseExecutionOptions, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩConfigParams, __ΩCopyConfig, __ΩCreateInlineConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩFrameworkOptions, __ΩInferOverridableConfig, __ΩInlineConfig, __ΩInlineConfigPaths, __ΩLintInlineConfig, __ΩMode, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./types/config.mjs";
|
|
10
|
+
import { PartiallyResolvedContext, ResolvePackageConfigsResult, __ΩPartiallyResolvedContext, __ΩResolvePackageConfigsResult, defineConfig, getDefaultLogLevel, getDefaultMode, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, normalizeBasePath, resolvePackageConfigs, resolveRoot, tryResolveWorkspaceConfig } from "./lib/config.mjs";
|
|
11
|
+
import { getConfigProps, resolvePluginConfig } from "./lib/context-helpers.mjs";
|
|
12
12
|
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { createEventEmitter } from "./lib/events.mjs";
|
|
14
|
+
import { TypegenContext, __ΩTypegenContext, emitBuiltinTypes, formatTypes, handleTypes } from "./lib/generate-types.mjs";
|
|
15
|
+
import { callHook, extractHooks, mergeConfigs, mergeResults } from "./lib/hooks.mjs";
|
|
16
|
+
import { installDependencies } from "./lib/install-dependencies.mjs";
|
|
17
|
+
import { CreateContextOptions, __ΩCreateContextOptions, getPersistedMeta, getPrefixedRootHash, writeMetaFile } from "./lib/meta.mjs";
|
|
18
|
+
import { ResolvePluginsOptions, __ΩResolvePluginsOptions, initPlugin, resolvePlugin, resolvePlugins } from "./lib/plugins.mjs";
|
|
19
|
+
import { CreateResolverOptions, __ΩCreateResolverOptions, createResolver } from "./lib/resolver.mjs";
|
|
20
|
+
import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "./schemas/fs.mjs";
|
|
21
|
+
import { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, __ΩBufferedChunk, __ΩCreateStreamReaderOptions, __ΩCreateStreamSinkOptions, __ΩStreamErrorPayload, __ΩStreamReader, __ΩStreamSink, __ΩStreamSinkEvents, createStreamReader, createStreamSink } from "./lib/streaming-channel.mjs";
|
|
22
|
+
import { VirtualFileSystemHost, createProgram } from "./lib/typescript/ts-morph.mjs";
|
|
23
|
+
import { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath } from "./lib/typescript/tsconfig.mjs";
|
|
14
24
|
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.mjs";
|
|
15
25
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
16
26
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
@@ -19,4 +29,5 @@ import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
|
19
29
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
20
30
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
21
31
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
22
|
-
|
|
32
|
+
import { VirtualFileSystem } from "./lib/vfs.mjs";
|
|
33
|
+
export { AnyOutputUserConfig, AnyUserConfig, BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesCommand, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigFn, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystem, VirtualFileSystemHost, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkspaceConfig, WriteData, WriteOptions, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseCommandType, __ΩBaseContext, __ΩBaseExecutionAPIMethods, __ΩBaseExecutionOptions, __ΩBasePlugin, __ΩBufferedChunk, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfig, __ΩConfigParams, __ΩContext, __ΩCopyConfig, __ΩCreateContextOptions, __ΩCreateInlineConfig, __ΩCreateResolverOptions, __ΩCreateStreamReaderOptions, __ΩCreateStreamSinkOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentPlugin, __ΩEnvironmentResolvedConfig, __ΩExecutionContext, __ΩExecutionOptions, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩFrameworkOptions, __ΩHookFunctions, __ΩHookListOrders, __ΩHooks, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferOverridableConfig, __ΩInitContextOptions, __ΩInlineConfig, __ΩInlineConfigPaths, __ΩLevel, __ΩLintInlineConfig, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩMetaInfo, __ΩMode, __ΩNormalizedStringFilter, __ΩOptions, __ΩOutputConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFilter, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPowerlinesExecutionAPIMethods, __ΩPowerlinesMessage, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolvePackageConfigsResult, __ΩResolvePluginsOptions, __ΩResolveResult, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩStreamErrorPayload, __ΩStreamReader, __ΩStreamSink, __ΩStreamSinkEvents, __ΩSupportedCommands, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTestInlineConfig, __ΩTransformHookFilter, __ΩTransformResult, __ΩTypegenContext, __ΩTypesInlineConfig, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginBuilderVariant, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnresolvedContext, __ΩUserConfig, __ΩUserConfigFn, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, _capnpFileId, callHook, combineContexts, createEventEmitter, createProgram, createResolver, createStreamReader, createStreamSink, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, emitBuiltinTypes, extractHooks, findIncludeMatch, findMatch, format, formatFolder, formatTypes, generateSourceMap, getConfigProps, getDefaultLogLevel, getDefaultMode, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getParsedTypeScriptConfig, getPersistedMeta, getPrefixedRootHash, getSourceFile, getString, getTsconfigDtsPath, getTsconfigFilePath, getTypescriptFileHeader, getUniqueInputs, handleTypes, initPlugin, initializeTsconfig, installDependencies, isIncludeMatchFound, isMatchFound, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, mergeConfigs, mergeResults, normalizeBasePath, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, resolvePackageConfigs, resolvePlugin, resolvePluginConfig, resolvePlugins, resolveRoot, resolveTsconfig, tryResolveWorkspaceConfig, tryTsconfigFilePath, writeFile, writeMetaFile };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createResolver } from "./lib/resolver.mjs";
|
|
2
|
+
import { defineConfig, getDefaultLogLevel, getDefaultMode, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, normalizeBasePath, resolvePackageConfigs, resolveRoot, tryResolveWorkspaceConfig } from "./lib/config.mjs";
|
|
3
|
+
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
4
|
+
import { callHook, extractHooks, mergeConfigs, mergeResults } from "./lib/hooks.mjs";
|
|
5
|
+
import { getConfigProps, resolvePluginConfig } from "./lib/context-helpers.mjs";
|
|
2
6
|
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.mjs";
|
|
3
|
-
import {
|
|
7
|
+
import { createEventEmitter } from "./lib/events.mjs";
|
|
8
|
+
import { VirtualFileSystemHost, createProgram } from "./lib/typescript/ts-morph.mjs";
|
|
9
|
+
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./lib/utilities/file-header.mjs";
|
|
10
|
+
import { emitBuiltinTypes, formatTypes, handleTypes } from "./lib/generate-types.mjs";
|
|
11
|
+
import { installDependencies } from "./lib/install-dependencies.mjs";
|
|
12
|
+
import { getPersistedMeta, getPrefixedRootHash, writeMetaFile } from "./lib/meta.mjs";
|
|
13
|
+
import { initPlugin, resolvePlugin, resolvePlugins } from "./lib/plugins.mjs";
|
|
14
|
+
import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "./schemas/fs.mjs";
|
|
15
|
+
import { createStreamReader, createStreamSink } from "./lib/streaming-channel.mjs";
|
|
16
|
+
import { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath } from "./lib/typescript/tsconfig.mjs";
|
|
4
17
|
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.mjs";
|
|
5
18
|
import { createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
6
19
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
7
20
|
import { createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
8
|
-
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./lib/utilities/file-header.mjs";
|
|
9
|
-
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
10
21
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
11
22
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
23
|
+
import { VirtualFileSystem } from "./lib/vfs.mjs";
|
|
12
24
|
import "./lib/index.mjs";
|
|
13
25
|
|
|
14
|
-
export {
|
|
26
|
+
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, VirtualFileSystem, VirtualFileSystemHost, _capnpFileId, callHook, combineContexts, createEventEmitter, createProgram, createResolver, createStreamReader, createStreamSink, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, emitBuiltinTypes, extractHooks, findIncludeMatch, findMatch, format, formatFolder, formatTypes, generateSourceMap, getConfigProps, getDefaultLogLevel, getDefaultMode, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getParsedTypeScriptConfig, getPersistedMeta, getPrefixedRootHash, getSourceFile, getString, getTsconfigDtsPath, getTsconfigFilePath, getTypescriptFileHeader, getUniqueInputs, handleTypes, initPlugin, initializeTsconfig, installDependencies, isIncludeMatchFound, isMatchFound, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, mergeConfigs, mergeResults, normalizeBasePath, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, resolvePackageConfigs, resolvePlugin, resolvePluginConfig, resolvePlugins, resolveRoot, resolveTsconfig, tryResolveWorkspaceConfig, tryTsconfigFilePath, writeFile, writeMetaFile };
|
package/dist/lib/config.cjs
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_plugin_utils_logging = require('../plugin-utils/logging.cjs');
|
|
4
|
+
const require_lib_resolver = require('./resolver.cjs');
|
|
3
5
|
let _storm_software_config_tools_get_config = require("@storm-software/config-tools/get-config");
|
|
6
|
+
let _stryke_env_environment_checks = require("@stryke/env/environment-checks");
|
|
7
|
+
let _stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
|
|
4
8
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
9
|
+
let _stryke_fs_is_file = require("@stryke/fs/is-file");
|
|
10
|
+
let _stryke_fs_json = require("@stryke/fs/json");
|
|
5
11
|
let _stryke_path_append = require("@stryke/path/append");
|
|
12
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
6
13
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
7
14
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
8
15
|
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
16
|
+
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
9
17
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
10
18
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
11
19
|
let c12 = require("c12");
|
|
@@ -13,6 +21,113 @@ let defu = require("defu");
|
|
|
13
21
|
defu = require_runtime.__toESM(defu, 1);
|
|
14
22
|
|
|
15
23
|
//#region src/lib/config.ts
|
|
24
|
+
function normalizeBasePath(base = "/") {
|
|
25
|
+
let out = base.startsWith("/") ? base : `/${base}`;
|
|
26
|
+
if (!out.endsWith("/")) out = `${out}/`;
|
|
27
|
+
return out.replace(/\/+/g, "/");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the package configurations for the project by loading the `package.json` and `project.json` files, if they exist. This function will look for these files in the project root and parse their contents as JavaScript objects. The parsed contents will be stored in the context for later use by plugins and other parts of the build process.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* The `package.json` file is typically used to store metadata about the project, such as its name, version, dependencies, and other information. The `project.json` file is an optional file that can be used to store additional configuration or metadata specific to the project, and is not required for all projects.
|
|
34
|
+
*
|
|
35
|
+
* @param cwd - The current working directory to look for the package configurations. Defaults to the `cwd` specified in the context configuration.
|
|
36
|
+
* @param root - The root directory of the project to look for the package configurations. Defaults to the `root` specified in the context configuration.
|
|
37
|
+
* @returns A promise that resolves when the package configurations have been loaded and stored in the context.
|
|
38
|
+
*/
|
|
39
|
+
async function resolvePackageConfigs(cwd, root) {
|
|
40
|
+
const result = {};
|
|
41
|
+
if (cwd || root) {
|
|
42
|
+
const projectJsonPath = (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root || ".", cwd || "."), "project.json");
|
|
43
|
+
if ((0, _stryke_fs_exists.existsSync)(projectJsonPath)) result.projectJson = await (0, _stryke_fs_json.readJsonFile)(projectJsonPath);
|
|
44
|
+
const packageJsonPath = (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root || ".", cwd || "."), "package.json");
|
|
45
|
+
if ((0, _stryke_fs_exists.existsSync)(packageJsonPath)) result.packageJson = await (0, _stryke_fs_json.readJsonFile)(packageJsonPath);
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the root directory for the project based on the provided options. This function will determine the root directory by checking the provided `root` option, and if it is not provided, it will look for a configuration file (such as `powerlines.config.ts`) in the current working directory. If a configuration file is found, the root directory will be set to the directory containing that file. If no configuration file is found, the root directory will default to the current working directory.
|
|
51
|
+
*
|
|
52
|
+
* @param cwd - The current working directory to use as the base for resolving the root directory. This is typically the directory from which the Powerlines process was executed.
|
|
53
|
+
* @param root - An optional root directory to use for the project. If provided, this will be used as the root directory instead of looking for a configuration file. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.
|
|
54
|
+
* @param configFile - An optional path to a configuration file to look for when resolving the root directory. If provided, this file will be used to determine the root directory if the `root` option is not provided. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.
|
|
55
|
+
* @returns The resolved root directory for the project, which will be used as the base for resolving other paths and configurations throughout the Powerlines process. This will typically be an absolute path to the root directory of the project.
|
|
56
|
+
*/
|
|
57
|
+
function resolveRoot(cwd, root, configFile) {
|
|
58
|
+
let result = root || ".";
|
|
59
|
+
if (!root) {
|
|
60
|
+
if (configFile) {
|
|
61
|
+
if (!(0, _stryke_fs_exists.existsSync)((0, _stryke_path_append.appendPath)(configFile, cwd))) throw new Error(`The user-provided configuration file at "${configFile}" does not exist. Please ensure this path is correct and try again.`);
|
|
62
|
+
if (!(0, _stryke_fs_is_file.isFile)(configFile)) throw new Error(`The user-provided configuration file at "${configFile}" is not a file. Please ensure this path is correct and try again.`);
|
|
63
|
+
result = (0, _stryke_path_file_path_fns.relativePath)(cwd, (0, _stryke_path_file_path_fns.findFilePath)(configFile));
|
|
64
|
+
}
|
|
65
|
+
} else result = (0, _stryke_path_replace.replacePath)(root, cwd);
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.
|
|
70
|
+
*
|
|
71
|
+
* @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.
|
|
72
|
+
* @param root - An optional root directory to use as the base for searching for the configuration file. If provided, this will be used as the starting point for searching for the configuration file instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.
|
|
73
|
+
* @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.
|
|
74
|
+
*/
|
|
75
|
+
async function tryResolveWorkspaceConfig(cwd, root) {
|
|
76
|
+
return (0, _storm_software_config_tools_get_config.tryGetWorkspaceConfig)(false, {
|
|
77
|
+
cwd: root ? (0, _stryke_path_append.appendPath)(root, cwd) : void 0,
|
|
78
|
+
workspaceRoot: cwd
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to "production".
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* The mode is used to determine which configuration file to load (e.g., `powerlines.development.config.js` for development mode, `powerlines.production.config.js` for production mode, etc.) and can also be used by plugins and other parts of the build process to conditionally apply certain behaviors based on the current mode.
|
|
86
|
+
*
|
|
87
|
+
* @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.
|
|
88
|
+
* @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.
|
|
89
|
+
* @returns A promise that resolves to the default mode for the current execution, which can be "development", "production", or "test".
|
|
90
|
+
*/
|
|
91
|
+
async function getDefaultMode(cwd, root) {
|
|
92
|
+
const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);
|
|
93
|
+
return _stryke_env_environment_checks.isProduction ? "production" : _stryke_env_environment_checks.isDevelopment ? "development" : _stryke_env_environment_checks.isTest ? "test" : workspaceConfig?.mode || "production";
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to "info" for development mode and "warn" for production mode.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* The log level is used to determine which log messages should be output during the execution of the Powerlines process. For example, if the log level is set to "warn", only messages with a level of "warn", "error", or "fatal" will be output, while messages with a level of "info", "debug", or "trace" will be suppressed. This allows users to control the verbosity of the logs and focus on the most relevant information based on their current needs.
|
|
100
|
+
*
|
|
101
|
+
* @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.
|
|
102
|
+
* @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.
|
|
103
|
+
* @returns A promise that resolves to the default log level for the current execution, which can be "fatal", "error", "warn", "info", "debug", or "trace".
|
|
104
|
+
*/
|
|
105
|
+
async function getDefaultLogLevel(cwd, root) {
|
|
106
|
+
const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);
|
|
107
|
+
return require_plugin_utils_logging.resolveLogLevel(workspaceConfig?.logLevel ? workspaceConfig.logLevel === "success" || workspaceConfig.logLevel === "performance" ? "info" : workspaceConfig.logLevel === "all" ? "debug" : workspaceConfig.logLevel === "fatal" ? "error" : workspaceConfig.logLevel : void 0, workspaceConfig?.mode || await getDefaultMode(cwd, root));
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Load the user configuration file for the project and set up the context with the loaded configuration. This function will be called during the initialization of the context to load the user configuration file based on the provided options and set up the context accordingly. It will also set up the resolver for loading modules from the user configuration file and ensure that the context is properly initialized with the loaded configuration.
|
|
111
|
+
*
|
|
112
|
+
* @remarks
|
|
113
|
+
* This method will set up the resolver and load the user configuration file based on the provided options. It is called during the construction of the context and can also be called when cloning the context to ensure that the new context has the same configuration and resolver setup.
|
|
114
|
+
*
|
|
115
|
+
* @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.
|
|
116
|
+
* @param root - The root directory of the project to look for the configuration file. This is typically the root directory of the project, which may be different from the current working directory if the process was executed from a subdirectory.
|
|
117
|
+
* @param framework - The name of the framework to use when looking for configuration files (default is "powerlines"). This is used to determine the naming convention for the configuration files to look for (e.g., `powerlines.development.config.js` for the "powerlines" framework in development mode).
|
|
118
|
+
* @param orgId - The name of the organization to use when looking for configuration files (optional). This can be used to further customize the naming convention for the configuration files to look for (e.g., `powerlines.myorg.development.config.js` for the "powerlines" framework in development mode with an organization of "myorg").
|
|
119
|
+
* @param inlineConfig - The inline configuration options provided during the execution of a Powerlines command, which can include properties such as the project root, mode, and an explicit path to a configuration file. This is used to determine how the context should be initialized and which configuration file should be loaded for the execution.
|
|
120
|
+
* @returns A promise that resolves when the context has been successfully initialized with the loaded configuration and resolver setup.
|
|
121
|
+
* @throws Will throw an error if no configuration file is found in the project root or current working directory. This ensures that the context cannot be initialized without a valid configuration, which is essential for the proper functioning of the Powerlines process.
|
|
122
|
+
*/
|
|
123
|
+
async function loadParsedConfig(cwd, root, framework, orgId, inlineConfig) {
|
|
124
|
+
const configFile = await loadUserConfigFile(cwd, root, inlineConfig.mode || await getDefaultMode(cwd, root), inlineConfig.command, {
|
|
125
|
+
name: framework,
|
|
126
|
+
orgId
|
|
127
|
+
}, inlineConfig.configFile);
|
|
128
|
+
if (!configFile) throw new Error(`No configuration file found in ${(0, _stryke_path_append.appendPath)(root, cwd)}. Please ensure you have a valid configuration file in your project.`);
|
|
129
|
+
return configFile;
|
|
130
|
+
}
|
|
16
131
|
/**
|
|
17
132
|
* Loads the workspace configuration.
|
|
18
133
|
*
|
|
@@ -30,20 +145,44 @@ async function loadWorkspaceConfig(cwd, root) {
|
|
|
30
145
|
/**
|
|
31
146
|
* Loads the user configuration file for the project.
|
|
32
147
|
*
|
|
33
|
-
* @
|
|
34
|
-
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* This function will attempt to locate and load the user configuration file for the project based on the provided parameters. It will look for configuration files in various formats (e.g., `.ts`, `.js`, `.mts`, `.mjs`) and with different naming conventions (e.g., `powerlines.config.ts`, `powerlines.development.config.js`, etc.) in the project root and current working directory. If a configuration file is found, it will be loaded using a Jiti resolver, and the resulting configuration object will be returned. If no configuration file is found, an empty configuration object will be returned.
|
|
150
|
+
*
|
|
151
|
+
* @param cwd - The current working directory to start searching from.
|
|
152
|
+
* @param root - The root directory of the project.
|
|
153
|
+
* @param mode - The mode to determine which configuration file to load (e.g., "development", "test", "production").
|
|
154
|
+
* @param command - The command being executed (e.g., "build", "dev", "test"), which can be used to further customize the configuration loading logic if needed.
|
|
155
|
+
* @param framework - The name of the framework to use when looking for configuration files (default is "powerlines").
|
|
156
|
+
* @param configFile - An explicit path to a configuration file to load (optional). If provided, this file will be loaded instead of searching for configuration files based on the mode and framework.
|
|
35
157
|
* @returns A promise that resolves to the resolved user configuration.
|
|
36
158
|
*/
|
|
37
|
-
async function loadUserConfigFile(
|
|
159
|
+
async function loadUserConfigFile(cwd, root, mode, command, framework, configFile) {
|
|
160
|
+
const frameworkName = (0, _stryke_string_format_kebab_case.kebabCase)(framework?.name || "powerlines");
|
|
161
|
+
const frameworkOrgId = (0, _stryke_string_format_kebab_case.kebabCase)(framework?.orgId || "storm-software");
|
|
38
162
|
let resolvedUserConfig = {};
|
|
39
163
|
let resolvedUserConfigFile;
|
|
40
|
-
if (
|
|
41
|
-
if (!resolvedUserConfigFile) resolvedUserConfigFile = (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(
|
|
164
|
+
if (configFile) resolvedUserConfigFile = (0, _stryke_fs_exists.existsSync)((0, _stryke_path_replace.replacePath)(configFile, root)) ? (0, _stryke_path_replace.replacePath)(configFile, root) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), (0, _stryke_path_replace.replacePath)(configFile, root))) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), (0, _stryke_path_replace.replacePath)(configFile, root)) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), configFile)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), configFile) : void 0;
|
|
165
|
+
if (!resolvedUserConfigFile) resolvedUserConfigFile = (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.ts`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.ts`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.js`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.js`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.mts`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.mts`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.mjs`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.${mode}.config.mjs`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.ts`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.ts`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.js`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.js`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.mts`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.mts`) : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.mjs`)) ? (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_append.appendPath)(root, cwd), `${frameworkName}.config.mjs`) : void 0;
|
|
166
|
+
const jiti = require_lib_resolver.createResolver({
|
|
167
|
+
cwd,
|
|
168
|
+
root,
|
|
169
|
+
cacheDir: (0, _stryke_env_get_env_paths.getEnvPaths)({
|
|
170
|
+
orgId: frameworkOrgId,
|
|
171
|
+
appId: frameworkName,
|
|
172
|
+
workspaceRoot: cwd
|
|
173
|
+
}).cache,
|
|
174
|
+
mode
|
|
175
|
+
});
|
|
42
176
|
if (resolvedUserConfigFile) {
|
|
43
177
|
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
44
178
|
if (resolved?.default) {
|
|
45
179
|
let config = {};
|
|
46
|
-
if ((0, _stryke_type_checks_is_function.isFunction)(resolved.default)) config = await Promise.resolve(resolved.default(
|
|
180
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(resolved.default)) config = await Promise.resolve(resolved.default({
|
|
181
|
+
root,
|
|
182
|
+
cwd,
|
|
183
|
+
mode,
|
|
184
|
+
command
|
|
185
|
+
}));
|
|
47
186
|
else if ((0, _stryke_type_checks_is_set_object.isSetObject)(resolved.default) || Array.isArray(resolved.default)) config = resolved.default;
|
|
48
187
|
if ((0, _stryke_type_checks_is_set_object.isSetObject)(config) || Array.isArray(config)) resolvedUserConfig = {
|
|
49
188
|
...config,
|
|
@@ -53,19 +192,18 @@ async function loadUserConfigFile(options, jiti) {
|
|
|
53
192
|
}
|
|
54
193
|
}
|
|
55
194
|
const result = await (0, c12.loadConfig)({
|
|
56
|
-
cwd:
|
|
57
|
-
name:
|
|
58
|
-
envName:
|
|
195
|
+
cwd: root,
|
|
196
|
+
name: frameworkName,
|
|
197
|
+
envName: mode,
|
|
59
198
|
globalRc: true,
|
|
60
|
-
packageJson: (0, _stryke_string_format_camel_case.camelCase)(
|
|
199
|
+
packageJson: (0, _stryke_string_format_camel_case.camelCase)(frameworkName),
|
|
61
200
|
dotenv: true,
|
|
62
201
|
jiti
|
|
63
202
|
});
|
|
64
203
|
return (0, defu.default)({ config: {
|
|
65
|
-
root
|
|
66
|
-
cwd
|
|
67
|
-
framework
|
|
68
|
-
organization: options.organization
|
|
204
|
+
root,
|
|
205
|
+
cwd,
|
|
206
|
+
framework
|
|
69
207
|
} }, resolvedUserConfig, (0, _stryke_type_checks_is_set_object.isSetObject)(result?.config) ? {
|
|
70
208
|
...result.config,
|
|
71
209
|
...result
|
|
@@ -83,5 +221,12 @@ function defineConfig(config) {
|
|
|
83
221
|
|
|
84
222
|
//#endregion
|
|
85
223
|
exports.defineConfig = defineConfig;
|
|
224
|
+
exports.getDefaultLogLevel = getDefaultLogLevel;
|
|
225
|
+
exports.getDefaultMode = getDefaultMode;
|
|
226
|
+
exports.loadParsedConfig = loadParsedConfig;
|
|
86
227
|
exports.loadUserConfigFile = loadUserConfigFile;
|
|
87
|
-
exports.loadWorkspaceConfig = loadWorkspaceConfig;
|
|
228
|
+
exports.loadWorkspaceConfig = loadWorkspaceConfig;
|
|
229
|
+
exports.normalizeBasePath = normalizeBasePath;
|
|
230
|
+
exports.resolvePackageConfigs = resolvePackageConfigs;
|
|
231
|
+
exports.resolveRoot = resolveRoot;
|
|
232
|
+
exports.tryResolveWorkspaceConfig = tryResolveWorkspaceConfig;
|