@powerlines/core 0.0.11 → 0.1.0
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/{types → constants}/commands.cjs +2 -3
- package/dist/constants/commands.d.cts +5 -0
- package/dist/constants/commands.d.cts.map +1 -0
- package/dist/constants/commands.d.mts +5 -0
- package/dist/constants/commands.d.mts.map +1 -0
- package/dist/{types → constants}/commands.mjs +1 -1
- package/dist/constants/commands.mjs.map +1 -0
- package/dist/{lib/constants → constants}/environments.cjs +2 -3
- package/dist/{lib/constants → constants}/environments.d.cts +1 -1
- package/dist/constants/environments.d.cts.map +1 -0
- package/dist/{lib/constants → constants}/environments.d.mts +1 -1
- package/dist/constants/environments.d.mts.map +1 -0
- package/dist/{lib/constants → constants}/environments.mjs +1 -1
- package/dist/constants/environments.mjs.map +1 -0
- package/dist/{types → constants}/fs.cjs +2 -3
- package/dist/constants/fs.d.cts +7 -0
- package/dist/constants/fs.d.cts.map +1 -0
- package/dist/constants/fs.d.mts +7 -0
- package/dist/constants/fs.d.mts.map +1 -0
- package/dist/{types → constants}/fs.mjs +1 -1
- package/dist/constants/fs.mjs.map +1 -0
- package/dist/{types → constants}/hooks.cjs +2 -3
- package/dist/constants/hooks.d.cts +5 -0
- package/dist/constants/hooks.d.cts.map +1 -0
- package/dist/constants/hooks.d.mts +5 -0
- package/dist/constants/hooks.d.mts.map +1 -0
- package/dist/{types → constants}/hooks.mjs +1 -1
- package/dist/constants/hooks.mjs.map +1 -0
- package/dist/constants/index.cjs +25 -0
- package/dist/constants/index.d.cts +7 -0
- package/dist/constants/index.d.mts +7 -0
- package/dist/constants/index.mjs +8 -0
- package/dist/{lib/constants → constants}/meta.cjs +2 -3
- package/dist/{lib/constants → constants}/meta.d.cts +1 -1
- package/dist/constants/meta.d.cts.map +1 -0
- package/dist/{lib/constants → constants}/meta.d.mts +1 -1
- package/dist/constants/meta.d.mts.map +1 -0
- package/dist/{lib/constants → constants}/meta.mjs +1 -1
- package/dist/constants/meta.mjs.map +1 -0
- package/dist/{types → constants}/plugin.cjs +23 -6
- package/dist/constants/plugin.d.cts +9 -0
- package/dist/constants/plugin.d.cts.map +1 -0
- package/dist/constants/plugin.d.mts +9 -0
- package/dist/constants/plugin.d.mts.map +1 -0
- package/dist/{types → constants}/plugin.mjs +19 -3
- package/dist/constants/plugin.mjs.map +1 -0
- package/dist/index.cjs +0 -26
- package/dist/index.d.cts +6 -8
- package/dist/index.d.mts +6 -8
- package/dist/index.mjs +1 -9
- package/dist/lib/config.cjs +1 -2
- package/dist/lib/entry.cjs +22 -26
- package/dist/lib/entry.d.cts +12 -12
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts +12 -12
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +21 -24
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/index.cjs +0 -10
- package/dist/lib/index.d.cts +1 -3
- package/dist/lib/index.d.mts +1 -3
- package/dist/lib/index.mjs +1 -3
- package/dist/lib/logger.cjs +1 -2
- package/dist/lib/unplugin/helpers.cjs +3 -4
- 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 +1 -1
- package/dist/lib/unplugin/helpers.mjs.map +1 -1
- package/dist/lib/unplugin/module-resolution.cjs +1 -2
- package/dist/lib/unplugin/plugin.cjs +1 -2
- package/dist/lib/utilities/file-header.cjs +1 -2
- package/dist/lib/utilities/file-header.d.cts.map +1 -1
- package/dist/lib/utilities/file-header.d.mts.map +1 -1
- package/dist/lib/utilities/format.cjs +1 -2
- package/dist/lib/utilities/source-file.cjs +1 -2
- package/dist/lib/utilities/source-map.cjs +1 -2
- package/dist/lib/utilities/write-file.cjs +1 -2
- package/dist/plugin-base.cjs +1 -2
- package/dist/plugin-utils/build-helpers.cjs +2 -3
- package/dist/plugin-utils/build-helpers.mjs +1 -1
- package/dist/plugin-utils/context-helpers.cjs +1 -2
- package/dist/plugin-utils/extend.cjs +1 -2
- package/dist/plugin-utils/format-package-json.cjs +1 -2
- package/dist/plugin-utils/get-config-path.cjs +1 -2
- package/dist/plugin-utils/helpers.cjs +6 -8
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +1 -2
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +1 -2
- package/dist/plugin-utils/modules.cjs +1 -2
- package/dist/plugin-utils/paths.cjs +1 -2
- package/dist/types/commands.d.cts +2 -2
- package/dist/types/commands.d.cts.map +1 -1
- package/dist/types/commands.d.mts +2 -2
- package/dist/types/commands.d.mts.map +1 -1
- package/dist/types/config.d.cts +8 -8
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +8 -8
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +4 -4
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +4 -4
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts +5 -8
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts +5 -8
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/hooks.d.cts +1 -2
- package/dist/types/hooks.d.cts.map +1 -1
- package/dist/types/hooks.d.mts +1 -2
- package/dist/types/hooks.d.mts.map +1 -1
- package/dist/types/index.d.mts +6 -7
- package/dist/types/plugin.d.cts +2 -4
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +2 -4
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/unplugin.d.cts +6 -8
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +6 -8
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +393 -103
- package/dist/lib/config.cjs.map +0 -1
- package/dist/lib/constants/environments.cjs.map +0 -1
- package/dist/lib/constants/environments.d.cts.map +0 -1
- package/dist/lib/constants/environments.d.mts.map +0 -1
- package/dist/lib/constants/environments.mjs.map +0 -1
- package/dist/lib/constants/index.cjs +0 -11
- package/dist/lib/constants/index.d.cts +0 -3
- package/dist/lib/constants/index.d.mts +0 -3
- package/dist/lib/constants/index.mjs +0 -4
- package/dist/lib/constants/meta.cjs.map +0 -1
- package/dist/lib/constants/meta.d.cts.map +0 -1
- package/dist/lib/constants/meta.d.mts.map +0 -1
- package/dist/lib/constants/meta.mjs.map +0 -1
- package/dist/lib/entry.cjs.map +0 -1
- package/dist/lib/logger.cjs.map +0 -1
- package/dist/lib/unplugin/helpers.cjs.map +0 -1
- package/dist/lib/unplugin/module-resolution.cjs.map +0 -1
- package/dist/lib/unplugin/plugin.cjs.map +0 -1
- package/dist/lib/utilities/file-header.cjs.map +0 -1
- package/dist/lib/utilities/format.cjs.map +0 -1
- package/dist/lib/utilities/source-file.cjs.map +0 -1
- package/dist/lib/utilities/source-map.cjs.map +0 -1
- package/dist/lib/utilities/write-file.cjs.map +0 -1
- package/dist/plugin-base.cjs.map +0 -1
- package/dist/plugin-utils/build-helpers.cjs.map +0 -1
- package/dist/plugin-utils/context-helpers.cjs.map +0 -1
- package/dist/plugin-utils/extend.cjs.map +0 -1
- package/dist/plugin-utils/format-package-json.cjs.map +0 -1
- package/dist/plugin-utils/get-config-path.cjs.map +0 -1
- package/dist/plugin-utils/helpers.cjs.map +0 -1
- package/dist/plugin-utils/merge.cjs.map +0 -1
- package/dist/plugin-utils/modules.cjs.map +0 -1
- package/dist/plugin-utils/paths.cjs.map +0 -1
- package/dist/types/api.cjs +0 -0
- package/dist/types/api.mjs +0 -1
- package/dist/types/commands.cjs.map +0 -1
- package/dist/types/commands.mjs.map +0 -1
- package/dist/types/config.cjs +0 -0
- package/dist/types/config.mjs +0 -1
- package/dist/types/context.cjs +0 -0
- package/dist/types/context.mjs +0 -1
- package/dist/types/fs.cjs.map +0 -1
- package/dist/types/fs.mjs.map +0 -1
- package/dist/types/hooks.cjs.map +0 -1
- package/dist/types/hooks.mjs.map +0 -1
- package/dist/types/index.cjs +0 -16
- package/dist/types/index.d.cts +0 -10
- package/dist/types/index.mjs +0 -7
- package/dist/types/plugin.cjs.map +0 -1
- package/dist/types/plugin.mjs.map +0 -1
- package/dist/types/tsconfig.cjs +0 -0
- package/dist/types/tsconfig.mjs +0 -1
- package/dist/types/unplugin.cjs +0 -24
- package/dist/types/unplugin.cjs.map +0 -1
- package/dist/types/unplugin.mjs +0 -22
- package/dist/types/unplugin.mjs.map +0 -1
package/dist/types/index.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ResolveOptions, STORAGE_PRESETS, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./fs.cjs";
|
|
2
|
-
import { CommandType, Commands, SUPPORTED_COMMANDS, __ΩCommandType, __ΩCommands } from "./commands.cjs";
|
|
3
|
-
import { API, __ΩAPI } from "./api.cjs";
|
|
4
|
-
import { BUILDER_VARIANTS, BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UNPLUGIN_BUILDER_VARIANTS, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./unplugin.cjs";
|
|
5
|
-
import { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, Plugin, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩPlugin, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./plugin.cjs";
|
|
6
|
-
import { CallHookOptions, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, __ΩCallHookOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem } from "./hooks.cjs";
|
|
7
|
-
import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./tsconfig.cjs";
|
|
8
|
-
import { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, WorkerProcess, __ΩAPIContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext, __ΩWorkerProcess } from "./context.cjs";
|
|
9
|
-
import { AnyUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, ConfigEnv, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, InitialUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, UserConfig, WorkspaceConfig, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfigEnv, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩUserConfig, __ΩWorkspaceConfig } from "./config.cjs";
|
|
10
|
-
export { API, APIContext, AnyUserConfig, BUILDER_VARIANTS, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, HOOKS_LIST_ORDERS, HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferHooksListItem, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialUserConfig, InlineConfig, KNOWN_PLUGIN_FIELDS, LintInlineConfig, LogFn, LogLevel, MetaInfo, NewInlineConfig, OutputConfig, OutputResolvedConfig, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFields, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, PluginHooksList, PluginHooksListItem, PluginNonHookFields, PowerlinesCommand, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionLevel, ReflectionMode, ResolveConfig, ResolveOptions, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, Resolver, STORAGE_PRESETS, SUPPORTED_COMMANDS, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, TSCompilerOptions, TSConfig, TransformResult, TypesResult, UNPLUGIN_BUILDER_VARIANTS, UnimportContext, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem, UnpluginOptions, UnpluginUserConfig, UnresolvedContext, UserConfig, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkerProcess, WorkspaceConfig, WriteData, WriteOptions, __VFS_PATCH__, __VFS_REVERT__, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩHookFields, __ΩHookListOrders, __ΩHooksList, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferHooksListItem, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩInitContextOptions, __ΩInitialUserConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩMetaInfo, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFields, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginHooksList, __ΩPluginHooksListItem, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionLevel, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTransformResult, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginHookList, __ΩUnpluginHookVariant, __ΩUnpluginHookVariantField, __ΩUnpluginHooksListItem, __ΩUnpluginOptions, __ΩUnpluginUserConfig, __ΩUnresolvedContext, __ΩUserConfig, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkerProcess, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions };
|
package/dist/types/index.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from "./unplugin.mjs";
|
|
2
|
-
import { SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
3
|
-
import { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from "./fs.mjs";
|
|
4
|
-
import { HOOKS_LIST_ORDERS } from "./hooks.mjs";
|
|
5
|
-
import { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from "./plugin.mjs";
|
|
6
|
-
|
|
7
|
-
export { BUILDER_VARIANTS, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, __VFS_PATCH__, __VFS_REVERT__ };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs","names":["SUPPORTED_COMMANDS","BUILDER_VARIANTS"],"sources":["../../src/types/plugin.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 { ArrayValues } from \"@stryke/types/array\";\nimport type { AnyFunction, MaybePromise } from \"@stryke/types/base\";\nimport { LoadResult } from \"rollup\";\nimport type { ExternalIdResult, HookFilter, TransformResult } from \"unplugin\";\nimport type { CommandType } from \"./commands\";\nimport { SUPPORTED_COMMANDS } from \"./commands\";\nimport type {\n EnvironmentConfig,\n EnvironmentResolvedConfig,\n PluginConfig,\n ResolvedConfig\n} from \"./config\";\nimport type {\n BuildPluginContext,\n PluginContext,\n UnresolvedContext\n} from \"./context\";\nimport type { BuilderVariant, UnpluginBuilderVariant } from \"./unplugin\";\nimport { BUILDER_VARIANTS, InferUnpluginOptions } from \"./unplugin\";\n\nexport interface PluginHookObject<\n THookFunction extends AnyFunction,\n TFilter extends keyof HookFilter = never\n> {\n /**\n * The order in which the plugin should be applied.\n */\n order?: \"pre\" | \"post\" | null | undefined;\n\n /**\n * A filter to determine when the hook should be called.\n */\n filter?: Pick<HookFilter, TFilter>;\n\n /**\n * The hook function to be called.\n */\n handler: THookFunction;\n}\n\nexport type PluginHook<\n THookFunction extends AnyFunction,\n TFilter extends keyof HookFilter = never\n> = THookFunction | PluginHookObject<THookFunction, TFilter>;\n\n/**\n * A result returned by the plugin from the `types` hook that describes the declaration types output file.\n */\nexport interface TypesResult {\n directives?: string[];\n code: string;\n}\n\nexport type PluginHookFunctions<TContext extends PluginContext> = {\n [TCommandType in CommandType]: (this: TContext) => MaybePromise<void>;\n} & {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config: (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<DeepPartial<TContext[\"config\"]> & Record<string, any>>;\n\n /**\n * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @remarks\n * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.\n *\n * @see https://vitejs.dev/guide/api-plugin#configenvironment\n *\n * @param this - The build context.\n * @param name - The name of the environment being configured.\n * @param environment - The Vite-like environment object containing information about the current build environment.\n * @returns A promise that resolves when the hook is complete.\n */\n configEnvironment: (\n this: TContext,\n name: string,\n environment: EnvironmentConfig\n ) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;\n\n /**\n * A hook that is called when the plugin is resolved.\n *\n * @see https://vitejs.dev/guide/api-plugin#configresolved\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n configResolved: (this: TContext) => MaybePromise<void>;\n\n /**\n * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.\n *\n * @param this - The build context.\n * @param code - The source code to generate types for.\n * @returns A promise that resolves when the hook is complete.\n */\n types: (\n this: TContext,\n code: string\n ) => MaybePromise<TypesResult | string | undefined | null>;\n\n /**\n * A hook that is called at the start of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildStart: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called at the end of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildEnd: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<LoadResult>;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>;\n\n /**\n * A hook that is called to write the bundle to disk.\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n writeBundle: (this: TContext) => MaybePromise<void>;\n};\n\nexport type PluginHooks<TContext extends PluginContext> = {\n [TPluginHook in keyof PluginHookFunctions<TContext>]?: PluginHook<\n PluginHookFunctions<TContext>[TPluginHook]\n >;\n} & {\n transform: PluginHook<\n PluginHookFunctions<TContext>[\"transform\"],\n \"code\" | \"id\"\n >;\n load: PluginHook<PluginHookFunctions<TContext>[\"load\"], \"id\">;\n resolveId: PluginHook<PluginHookFunctions<TContext>[\"resolveId\"], \"id\">;\n};\n\ntype DeepPartial<T> = {\n [K in keyof T]?: DeepPartial<T[K]>;\n};\n\nexport type Plugin<\n TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>\n> = Partial<PluginHooks<TContext>> & {\n /**\n * The name of the plugin, for use in deduplication, error messages and logs.\n */\n name: string;\n\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api?: Record<string, any>;\n\n /**\n * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.\n *\n * @remarks\n * The Plugin invocation order is as follows:\n * - `enforce: 'pre'` plugins\n * - `order: 'pre'` plugin hooks\n * - any other plugins (normal)\n * - `order: 'post'` plugin hooks\n * - `enforce: 'post'` plugins\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering\n * @see https://rollupjs.org/plugin-development/#build-hooks\n * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post\n * @see https://esbuild.github.io/plugins/#concepts\n */\n enforce?: \"pre\" | \"post\";\n\n /**\n * A function to determine if two plugins are the same and can be de-duplicated.\n *\n * @remarks\n * If this is not provided, plugins are de-duplicated by comparing their names.\n *\n * @param other - The other plugin to compare against.\n * @returns `true` if the two plugins are the same, `false` otherwise.\n */\n dedupe?: false | ((other: Plugin<any>) => boolean);\n\n /**\n * A list of pre-requisite plugins that must be loaded before this plugin can be used.\n */\n // dependsOn?: PluginConfig<TContext>[];\n\n /**\n * Define environments where this plugin should be active. By default, the plugin is active in all environments.\n *\n * @param environment - The environment to check.\n * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.\n */\n applyToEnvironment?: (\n environment: EnvironmentResolvedConfig\n ) => boolean | PluginConfig<TContext>;\n\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config?:\n | PluginHook<\n (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<DeepPartial<TContext[\"config\"]> & Record<string, any>>\n >\n | (DeepPartial<TContext[\"config\"]> & Record<string, any>);\n} & {\n [TBuilderVariant in BuilderVariant]?: InferUnpluginOptions<\n TContext,\n TBuilderVariant\n >;\n};\n\nexport const PLUGIN_NON_HOOK_FIELDS = [\n \"name\",\n \"api\",\n \"enforce\",\n \"dedupe\",\n \"applyToEnvironment\"\n] as const;\n\nexport type PluginNonHookFields =\n | ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n | UnpluginBuilderVariant;\n\nexport const PLUGIN_HOOKS_FIELDS = [\n ...SUPPORTED_COMMANDS,\n \"config\",\n \"configEnvironment\",\n \"configResolved\",\n \"types\",\n \"buildStart\",\n \"buildEnd\",\n \"transform\",\n \"load\",\n \"resolveId\",\n \"writeBundle\"\n] as const;\n\nexport type PluginHookFields<TContext extends PluginContext = PluginContext> =\n keyof PluginHookFunctions<TContext>;\n\nexport const KNOWN_PLUGIN_FIELDS = [\n ...PLUGIN_NON_HOOK_FIELDS,\n ...PLUGIN_HOOKS_FIELDS,\n ...BUILDER_VARIANTS\n] as const;\n\nexport type PluginFields = ArrayValues<typeof KNOWN_PLUGIN_FIELDS>;\n"],"mappings":";;;;AAoTA,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACD;AAMD,MAAa,sBAAsB;CACjC,GAAGA;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAKD,MAAa,sBAAsB;CACjC,GAAG;CACH,GAAG;CACH,GAAGC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.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 { ArrayValues } from \"@stryke/types/array\";\nimport type { AnyFunction, MaybePromise } from \"@stryke/types/base\";\nimport { LoadResult } from \"rollup\";\nimport type { ExternalIdResult, HookFilter, TransformResult } from \"unplugin\";\nimport type { CommandType } from \"./commands\";\nimport { SUPPORTED_COMMANDS } from \"./commands\";\nimport type {\n EnvironmentConfig,\n EnvironmentResolvedConfig,\n PluginConfig,\n ResolvedConfig\n} from \"./config\";\nimport type {\n BuildPluginContext,\n PluginContext,\n UnresolvedContext\n} from \"./context\";\nimport type { BuilderVariant, UnpluginBuilderVariant } from \"./unplugin\";\nimport { BUILDER_VARIANTS, InferUnpluginOptions } from \"./unplugin\";\n\nexport interface PluginHookObject<\n THookFunction extends AnyFunction,\n TFilter extends keyof HookFilter = never\n> {\n /**\n * The order in which the plugin should be applied.\n */\n order?: \"pre\" | \"post\" | null | undefined;\n\n /**\n * A filter to determine when the hook should be called.\n */\n filter?: Pick<HookFilter, TFilter>;\n\n /**\n * The hook function to be called.\n */\n handler: THookFunction;\n}\n\nexport type PluginHook<\n THookFunction extends AnyFunction,\n TFilter extends keyof HookFilter = never\n> = THookFunction | PluginHookObject<THookFunction, TFilter>;\n\n/**\n * A result returned by the plugin from the `types` hook that describes the declaration types output file.\n */\nexport interface TypesResult {\n directives?: string[];\n code: string;\n}\n\nexport type PluginHookFunctions<TContext extends PluginContext> = {\n [TCommandType in CommandType]: (this: TContext) => MaybePromise<void>;\n} & {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config: (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<DeepPartial<TContext[\"config\"]> & Record<string, any>>;\n\n /**\n * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @remarks\n * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.\n *\n * @see https://vitejs.dev/guide/api-plugin#configenvironment\n *\n * @param this - The build context.\n * @param name - The name of the environment being configured.\n * @param environment - The Vite-like environment object containing information about the current build environment.\n * @returns A promise that resolves when the hook is complete.\n */\n configEnvironment: (\n this: TContext,\n name: string,\n environment: EnvironmentConfig\n ) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;\n\n /**\n * A hook that is called when the plugin is resolved.\n *\n * @see https://vitejs.dev/guide/api-plugin#configresolved\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n configResolved: (this: TContext) => MaybePromise<void>;\n\n /**\n * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.\n *\n * @param this - The build context.\n * @param code - The source code to generate types for.\n * @returns A promise that resolves when the hook is complete.\n */\n types: (\n this: TContext,\n code: string\n ) => MaybePromise<TypesResult | string | undefined | null>;\n\n /**\n * A hook that is called at the start of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildStart: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called at the end of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildEnd: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<LoadResult>;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>;\n\n /**\n * A hook that is called to write the bundle to disk.\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n writeBundle: (this: TContext) => MaybePromise<void>;\n};\n\nexport type PluginHooks<TContext extends PluginContext> = {\n [TPluginHook in keyof PluginHookFunctions<TContext>]?: PluginHook<\n PluginHookFunctions<TContext>[TPluginHook]\n >;\n} & {\n transform: PluginHook<\n PluginHookFunctions<TContext>[\"transform\"],\n \"code\" | \"id\"\n >;\n load: PluginHook<PluginHookFunctions<TContext>[\"load\"], \"id\">;\n resolveId: PluginHook<PluginHookFunctions<TContext>[\"resolveId\"], \"id\">;\n};\n\ntype DeepPartial<T> = {\n [K in keyof T]?: DeepPartial<T[K]>;\n};\n\nexport type Plugin<\n TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>\n> = Partial<PluginHooks<TContext>> & {\n /**\n * The name of the plugin, for use in deduplication, error messages and logs.\n */\n name: string;\n\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api?: Record<string, any>;\n\n /**\n * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.\n *\n * @remarks\n * The Plugin invocation order is as follows:\n * - `enforce: 'pre'` plugins\n * - `order: 'pre'` plugin hooks\n * - any other plugins (normal)\n * - `order: 'post'` plugin hooks\n * - `enforce: 'post'` plugins\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering\n * @see https://rollupjs.org/plugin-development/#build-hooks\n * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post\n * @see https://esbuild.github.io/plugins/#concepts\n */\n enforce?: \"pre\" | \"post\";\n\n /**\n * A function to determine if two plugins are the same and can be de-duplicated.\n *\n * @remarks\n * If this is not provided, plugins are de-duplicated by comparing their names.\n *\n * @param other - The other plugin to compare against.\n * @returns `true` if the two plugins are the same, `false` otherwise.\n */\n dedupe?: false | ((other: Plugin<any>) => boolean);\n\n /**\n * A list of pre-requisite plugins that must be loaded before this plugin can be used.\n */\n // dependsOn?: PluginConfig<TContext>[];\n\n /**\n * Define environments where this plugin should be active. By default, the plugin is active in all environments.\n *\n * @param environment - The environment to check.\n * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.\n */\n applyToEnvironment?: (\n environment: EnvironmentResolvedConfig\n ) => boolean | PluginConfig<TContext>;\n\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config?:\n | PluginHook<\n (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<DeepPartial<TContext[\"config\"]> & Record<string, any>>\n >\n | (DeepPartial<TContext[\"config\"]> & Record<string, any>);\n} & {\n [TBuilderVariant in BuilderVariant]?: InferUnpluginOptions<\n TContext,\n TBuilderVariant\n >;\n};\n\nexport const PLUGIN_NON_HOOK_FIELDS = [\n \"name\",\n \"api\",\n \"enforce\",\n \"dedupe\",\n \"applyToEnvironment\"\n] as const;\n\nexport type PluginNonHookFields =\n | ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n | UnpluginBuilderVariant;\n\nexport const PLUGIN_HOOKS_FIELDS = [\n ...SUPPORTED_COMMANDS,\n \"config\",\n \"configEnvironment\",\n \"configResolved\",\n \"types\",\n \"buildStart\",\n \"buildEnd\",\n \"transform\",\n \"load\",\n \"resolveId\",\n \"writeBundle\"\n] as const;\n\nexport type PluginHookFields<TContext extends PluginContext = PluginContext> =\n keyof PluginHookFunctions<TContext>;\n\nexport const KNOWN_PLUGIN_FIELDS = [\n ...PLUGIN_NON_HOOK_FIELDS,\n ...PLUGIN_HOOKS_FIELDS,\n ...BUILDER_VARIANTS\n] as const;\n\nexport type PluginFields = ArrayValues<typeof KNOWN_PLUGIN_FIELDS>;\n"],"mappings":";;;;AAoTA,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACD;AAMD,MAAa,sBAAsB;CACjC,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAKD,MAAa,sBAAsB;CACjC,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}
|
package/dist/types/tsconfig.cjs
DELETED
|
File without changes
|
package/dist/types/tsconfig.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types/unplugin.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/types/unplugin.ts
|
|
3
|
-
const UNPLUGIN_BUILDER_VARIANTS = [
|
|
4
|
-
"rollup",
|
|
5
|
-
"webpack",
|
|
6
|
-
"rspack",
|
|
7
|
-
"vite",
|
|
8
|
-
"esbuild",
|
|
9
|
-
"farm",
|
|
10
|
-
"unloader",
|
|
11
|
-
"rolldown",
|
|
12
|
-
"bun"
|
|
13
|
-
];
|
|
14
|
-
const BUILDER_VARIANTS = [
|
|
15
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
16
|
-
"tsup",
|
|
17
|
-
"tsdown",
|
|
18
|
-
"unbuild"
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
exports.BUILDER_VARIANTS = BUILDER_VARIANTS;
|
|
23
|
-
exports.UNPLUGIN_BUILDER_VARIANTS = UNPLUGIN_BUILDER_VARIANTS;
|
|
24
|
-
//# sourceMappingURL=unplugin.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.cjs","names":["UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[]","BUILDER_VARIANTS: BuilderVariant[]"],"sources":["../../src/types/unplugin.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 { MaybePromise } from \"@stryke/types/base\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n HookFilter,\n UnpluginContextMeta\n} from \"unplugin\";\nimport type { API } from \"./api\";\nimport type { UserConfig } from \"./config\";\nimport type { Context } from \"./context\";\nimport type { PluginHook } from \"./plugin\";\n\nexport type UnpluginBuilderVariant =\n | \"rollup\"\n | \"webpack\"\n | \"rspack\"\n | \"vite\"\n | \"esbuild\"\n | \"farm\"\n | \"unloader\"\n | \"rolldown\"\n | \"bun\";\n\nexport const UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[] = [\n \"rollup\",\n \"webpack\",\n \"rspack\",\n \"vite\",\n \"esbuild\",\n \"farm\",\n \"unloader\",\n \"rolldown\",\n \"bun\"\n] as const;\n\nexport type BuilderVariant =\n | UnpluginBuilderVariant\n | \"tsup\"\n | \"tsdown\"\n | \"unbuild\";\n\nexport const BUILDER_VARIANTS: BuilderVariant[] = [\n ...UNPLUGIN_BUILDER_VARIANTS,\n \"tsup\",\n \"tsdown\",\n \"unbuild\"\n] as const;\n\nexport type InferUnpluginVariant<TBuildVariant extends BuilderVariant> =\n TBuildVariant extends \"tsup\"\n ? \"esbuild\"\n : TBuildVariant extends \"tsdown\"\n ? \"rolldown\"\n : TBuildVariant extends \"unbuild\"\n ? \"rollup\"\n : TBuildVariant;\n\nexport interface UnpluginOptions<\n TContext extends Context = Context\n> extends BaseUnpluginOptions {\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api: API<TContext[\"config\"]>;\n}\n\nexport type InferUnpluginOptions<\n TContext extends Context = Context,\n TBuilderVariant extends BuilderVariant = BuilderVariant,\n TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> =\n InferUnpluginVariant<TBuilderVariant>\n> = {\n [TKey in keyof Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant]]?: Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant][TKey] extends\n | infer THandler\n | {\n handler: infer THandler;\n }\n ? THandler extends (\n this: infer TOriginalContext,\n ...args: infer TArgs\n ) => infer TReturn\n ? PluginHook<\n (\n this: TOriginalContext & TContext,\n ...args: TArgs\n ) => MaybePromise<TReturn>,\n keyof HookFilter\n >\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey]\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey];\n};\n\nexport type UnpluginUserConfig = UserConfig & {\n /**\n * The meta information for the unplugin context\n */\n unplugin: UnpluginContextMeta;\n};\n\nexport type UnpluginFactory<TContext extends Context = Context> = (\n options: Partial<TContext[\"config\"][\"userConfig\"]>,\n meta: UnpluginContextMeta\n) => UnpluginOptions<TContext>;\n"],"mappings":";;AAwCA,MAAaA,4BAAsD;CACjE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAQD,MAAaC,mBAAqC;CAChD,GAAG;CACH;CACA;CACA;CACD"}
|
package/dist/types/unplugin.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/types/unplugin.ts
|
|
2
|
-
const UNPLUGIN_BUILDER_VARIANTS = [
|
|
3
|
-
"rollup",
|
|
4
|
-
"webpack",
|
|
5
|
-
"rspack",
|
|
6
|
-
"vite",
|
|
7
|
-
"esbuild",
|
|
8
|
-
"farm",
|
|
9
|
-
"unloader",
|
|
10
|
-
"rolldown",
|
|
11
|
-
"bun"
|
|
12
|
-
];
|
|
13
|
-
const BUILDER_VARIANTS = [
|
|
14
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
15
|
-
"tsup",
|
|
16
|
-
"tsdown",
|
|
17
|
-
"unbuild"
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS };
|
|
22
|
-
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.mjs","names":["UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[]","BUILDER_VARIANTS: BuilderVariant[]"],"sources":["../../src/types/unplugin.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 { MaybePromise } from \"@stryke/types/base\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n HookFilter,\n UnpluginContextMeta\n} from \"unplugin\";\nimport type { API } from \"./api\";\nimport type { UserConfig } from \"./config\";\nimport type { Context } from \"./context\";\nimport type { PluginHook } from \"./plugin\";\n\nexport type UnpluginBuilderVariant =\n | \"rollup\"\n | \"webpack\"\n | \"rspack\"\n | \"vite\"\n | \"esbuild\"\n | \"farm\"\n | \"unloader\"\n | \"rolldown\"\n | \"bun\";\n\nexport const UNPLUGIN_BUILDER_VARIANTS: UnpluginBuilderVariant[] = [\n \"rollup\",\n \"webpack\",\n \"rspack\",\n \"vite\",\n \"esbuild\",\n \"farm\",\n \"unloader\",\n \"rolldown\",\n \"bun\"\n] as const;\n\nexport type BuilderVariant =\n | UnpluginBuilderVariant\n | \"tsup\"\n | \"tsdown\"\n | \"unbuild\";\n\nexport const BUILDER_VARIANTS: BuilderVariant[] = [\n ...UNPLUGIN_BUILDER_VARIANTS,\n \"tsup\",\n \"tsdown\",\n \"unbuild\"\n] as const;\n\nexport type InferUnpluginVariant<TBuildVariant extends BuilderVariant> =\n TBuildVariant extends \"tsup\"\n ? \"esbuild\"\n : TBuildVariant extends \"tsdown\"\n ? \"rolldown\"\n : TBuildVariant extends \"unbuild\"\n ? \"rollup\"\n : TBuildVariant;\n\nexport interface UnpluginOptions<\n TContext extends Context = Context\n> extends BaseUnpluginOptions {\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api: API<TContext[\"config\"]>;\n}\n\nexport type InferUnpluginOptions<\n TContext extends Context = Context,\n TBuilderVariant extends BuilderVariant = BuilderVariant,\n TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> =\n InferUnpluginVariant<TBuilderVariant>\n> = {\n [TKey in keyof Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant]]?: Required<\n UnpluginOptions<TContext>\n >[TUnpluginVariant][TKey] extends\n | infer THandler\n | {\n handler: infer THandler;\n }\n ? THandler extends (\n this: infer TOriginalContext,\n ...args: infer TArgs\n ) => infer TReturn\n ? PluginHook<\n (\n this: TOriginalContext & TContext,\n ...args: TArgs\n ) => MaybePromise<TReturn>,\n keyof HookFilter\n >\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey]\n : Required<UnpluginOptions<TContext>>[TUnpluginVariant][TKey];\n};\n\nexport type UnpluginUserConfig = UserConfig & {\n /**\n * The meta information for the unplugin context\n */\n unplugin: UnpluginContextMeta;\n};\n\nexport type UnpluginFactory<TContext extends Context = Context> = (\n options: Partial<TContext[\"config\"][\"userConfig\"]>,\n meta: UnpluginContextMeta\n) => UnpluginOptions<TContext>;\n"],"mappings":";AAwCA,MAAaA,4BAAsD;CACjE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAQD,MAAaC,mBAAqC;CAChD,GAAG;CACH;CACA;CACA;CACD"}
|