@powerlines/core 0.1.9 → 0.2.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/index.cjs +3 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib/index.cjs +3 -1
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.mts +2 -2
- package/dist/lib/index.mjs +2 -2
- package/dist/lib/unplugin/module-resolution.cjs +63 -51
- package/dist/lib/unplugin/module-resolution.d.cts +1 -1
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/module-resolution.mjs +63 -51
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +42 -7
- package/dist/lib/utilities/file-header.d.cts +32 -3
- package/dist/lib/utilities/file-header.d.cts.map +1 -1
- package/dist/lib/utilities/file-header.d.mts +32 -3
- package/dist/lib/utilities/file-header.d.mts.map +1 -1
- package/dist/lib/utilities/file-header.mjs +39 -6
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +3 -1
- package/dist/lib/utilities/index.d.cts +2 -2
- package/dist/lib/utilities/index.d.mts +2 -2
- package/dist/lib/utilities/index.mjs +2 -2
- package/dist/types/context.d.cts +20 -0
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +20 -0
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts +2 -0
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts +2 -0
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/unplugin.d.cts.map +1 -1
- package/package.json +15 -15
package/dist/index.cjs
CHANGED
|
@@ -21,11 +21,13 @@ exports.extendLog = require_lib_logger.extendLog;
|
|
|
21
21
|
exports.format = require_lib_utilities_format.format;
|
|
22
22
|
exports.formatFolder = require_lib_utilities_format.formatFolder;
|
|
23
23
|
exports.generateSourceMap = require_lib_utilities_source_map.generateSourceMap;
|
|
24
|
-
exports.getBaseFileHeader = require_lib_utilities_file_header.getBaseFileHeader;
|
|
25
24
|
exports.getFileHeader = require_lib_utilities_file_header.getFileHeader;
|
|
25
|
+
exports.getFileHeaderWarning = require_lib_utilities_file_header.getFileHeaderWarning;
|
|
26
|
+
exports.getFileHeaderWarningText = require_lib_utilities_file_header.getFileHeaderWarningText;
|
|
26
27
|
exports.getMagicString = require_lib_utilities_source_file.getMagicString;
|
|
27
28
|
exports.getSourceFile = require_lib_utilities_source_file.getSourceFile;
|
|
28
29
|
exports.getString = require_lib_utilities_source_file.getString;
|
|
30
|
+
exports.getTypescriptFileHeader = require_lib_utilities_file_header.getTypescriptFileHeader;
|
|
29
31
|
exports.getUniqueInputs = require_lib_entry.getUniqueInputs;
|
|
30
32
|
exports.isResolvedEntryTypeDefinition = require_lib_entry.isResolvedEntryTypeDefinition;
|
|
31
33
|
exports.isTypeDefinition = require_lib_entry.isTypeDefinition;
|
package/dist/index.d.cts
CHANGED
|
@@ -13,9 +13,9 @@ import { CreateLogOptions, __ΩCreateLogOptions, createLog, extendLog } from "./
|
|
|
13
13
|
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.cjs";
|
|
14
14
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.cjs";
|
|
15
15
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.cjs";
|
|
16
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
16
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./lib/utilities/file-header.cjs";
|
|
17
17
|
import { format, formatFolder } from "./lib/utilities/format.cjs";
|
|
18
18
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.cjs";
|
|
19
19
|
import { generateSourceMap } from "./lib/utilities/source-map.cjs";
|
|
20
20
|
import { writeFile } from "./lib/utilities/write-file.cjs";
|
|
21
|
-
export { API, APIContext, AnyUserConfig, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, 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, PartiallyResolvedContext, 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, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __Ω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, __ΩPartiallyResolvedContext, __Ω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, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
21
|
+
export { API, APIContext, AnyUserConfig, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, 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, PartiallyResolvedContext, 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, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __Ω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, __ΩPartiallyResolvedContext, __Ω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, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.d.mts
CHANGED
|
@@ -14,10 +14,10 @@ import { CreateLogOptions, __ΩCreateLogOptions, createLog, extendLog } from "./
|
|
|
14
14
|
import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helpers.mjs";
|
|
15
15
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
16
16
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
17
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
17
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./lib/utilities/file-header.mjs";
|
|
18
18
|
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
19
19
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
20
20
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
21
21
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
22
22
|
import "./lib/index.mjs";
|
|
23
|
-
export { API, APIContext, AnyUserConfig, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, 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, PartiallyResolvedContext, 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, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __Ω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, __ΩPartiallyResolvedContext, __Ω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, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
23
|
+
export { API, APIContext, AnyUserConfig, BaseConfig, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, ConfigEnv, Context, CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, FetchOptions, FileHeaderOptions, 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, PartiallyResolvedContext, 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, __ΩAPI, __ΩAPIContext, __ΩAnyUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfigEnv, __ΩContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩFetchOptions, __ΩFileHeaderOptions, __Ω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, __ΩPartiallyResolvedContext, __Ω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, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import { combineContexts, isUnpluginBuilderVariant } from "./lib/unplugin/helper
|
|
|
5
5
|
import { createUnpluginModuleResolutionFunctions } from "./lib/unplugin/module-resolution.mjs";
|
|
6
6
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
7
7
|
import { createUnplugin, createUnpluginResolver } from "./lib/unplugin/plugin.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./lib/utilities/file-header.mjs";
|
|
9
9
|
import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
10
10
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
11
11
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
12
12
|
import "./lib/index.mjs";
|
|
13
13
|
|
|
14
|
-
export { combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
14
|
+
export { combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/lib/index.cjs
CHANGED
|
@@ -22,11 +22,13 @@ exports.extendLog = require_lib_logger.extendLog;
|
|
|
22
22
|
exports.format = require_lib_utilities_format.format;
|
|
23
23
|
exports.formatFolder = require_lib_utilities_format.formatFolder;
|
|
24
24
|
exports.generateSourceMap = require_lib_utilities_source_map.generateSourceMap;
|
|
25
|
-
exports.getBaseFileHeader = require_lib_utilities_file_header.getBaseFileHeader;
|
|
26
25
|
exports.getFileHeader = require_lib_utilities_file_header.getFileHeader;
|
|
26
|
+
exports.getFileHeaderWarning = require_lib_utilities_file_header.getFileHeaderWarning;
|
|
27
|
+
exports.getFileHeaderWarningText = require_lib_utilities_file_header.getFileHeaderWarningText;
|
|
27
28
|
exports.getMagicString = require_lib_utilities_source_file.getMagicString;
|
|
28
29
|
exports.getSourceFile = require_lib_utilities_source_file.getSourceFile;
|
|
29
30
|
exports.getString = require_lib_utilities_source_file.getString;
|
|
31
|
+
exports.getTypescriptFileHeader = require_lib_utilities_file_header.getTypescriptFileHeader;
|
|
30
32
|
exports.getUniqueInputs = require_lib_entry.getUniqueInputs;
|
|
31
33
|
exports.isResolvedEntryTypeDefinition = require_lib_entry.isResolvedEntryTypeDefinition;
|
|
32
34
|
exports.isTypeDefinition = require_lib_entry.isTypeDefinition;
|
package/dist/lib/index.d.cts
CHANGED
|
@@ -4,9 +4,9 @@ import { CreateLogOptions, __ΩCreateLogOptions, createLog, extendLog } from "./
|
|
|
4
4
|
import { combineContexts, isUnpluginBuilderVariant } from "./unplugin/helpers.cjs";
|
|
5
5
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./unplugin/module-resolution.cjs";
|
|
6
6
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./unplugin/plugin.cjs";
|
|
7
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
7
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./utilities/file-header.cjs";
|
|
8
8
|
import { format, formatFolder } from "./utilities/format.cjs";
|
|
9
9
|
import { getMagicString, getSourceFile, getString } from "./utilities/source-file.cjs";
|
|
10
10
|
import { generateSourceMap } from "./utilities/source-map.cjs";
|
|
11
11
|
import { writeFile } from "./utilities/write-file.cjs";
|
|
12
|
-
export { CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, FileHeaderOptions, PartiallyResolvedContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩFileHeaderOptions, __ΩPartiallyResolvedContext, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
12
|
+
export { CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, FileHeaderOptions, PartiallyResolvedContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩFileHeaderOptions, __ΩPartiallyResolvedContext, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -5,10 +5,10 @@ import { combineContexts, isUnpluginBuilderVariant } from "./unplugin/helpers.mj
|
|
|
5
5
|
import { CreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, createUnpluginModuleResolutionFunctions } from "./unplugin/module-resolution.mjs";
|
|
6
6
|
import { CreateUnpluginOptions, CreateUnpluginResolverOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, createUnplugin, createUnpluginResolver } from "./unplugin/plugin.mjs";
|
|
7
7
|
import "./unplugin/index.mjs";
|
|
8
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
8
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./utilities/file-header.mjs";
|
|
9
9
|
import { format, formatFolder } from "./utilities/format.mjs";
|
|
10
10
|
import { getMagicString, getSourceFile, getString } from "./utilities/source-file.mjs";
|
|
11
11
|
import { generateSourceMap } from "./utilities/source-map.mjs";
|
|
12
12
|
import { writeFile } from "./utilities/write-file.mjs";
|
|
13
13
|
import "./utilities/index.mjs";
|
|
14
|
-
export { CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, FileHeaderOptions, PartiallyResolvedContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩFileHeaderOptions, __ΩPartiallyResolvedContext, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
14
|
+
export { CreateLogOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, FileHeaderOptions, PartiallyResolvedContext, __ΩCreateLogOptions, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩFileHeaderOptions, __ΩPartiallyResolvedContext, combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/lib/index.mjs
CHANGED
|
@@ -6,10 +6,10 @@ import { createUnpluginModuleResolutionFunctions } from "./unplugin/module-resol
|
|
|
6
6
|
import { getMagicString, getSourceFile, getString } from "./utilities/source-file.mjs";
|
|
7
7
|
import { createUnplugin, createUnpluginResolver } from "./unplugin/plugin.mjs";
|
|
8
8
|
import "./unplugin/index.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./utilities/file-header.mjs";
|
|
10
10
|
import { format, formatFolder } from "./utilities/format.mjs";
|
|
11
11
|
import { generateSourceMap } from "./utilities/source-map.mjs";
|
|
12
12
|
import { writeFile } from "./utilities/write-file.mjs";
|
|
13
13
|
import "./utilities/index.mjs";
|
|
14
14
|
|
|
15
|
-
export { combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap,
|
|
15
|
+
export { combineContexts, createLog, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, extendLog, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
|
@@ -18,58 +18,70 @@ let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-str
|
|
|
18
18
|
function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
19
19
|
const ctx = context;
|
|
20
20
|
let prefix = "";
|
|
21
|
-
if (options.prefix
|
|
22
|
-
|
|
23
|
-
let result = await ctx.$$internal.callHook("resolveId", {
|
|
24
|
-
sequential: true,
|
|
25
|
-
result: "first",
|
|
26
|
-
order: "pre"
|
|
27
|
-
}, id, importer, opts);
|
|
28
|
-
if (result) return result;
|
|
29
|
-
result = await ctx.$$internal.callHook("resolveId", {
|
|
30
|
-
sequential: true,
|
|
31
|
-
result: "first",
|
|
32
|
-
order: "normal"
|
|
33
|
-
}, id, importer, opts);
|
|
34
|
-
if (result) return result;
|
|
35
|
-
result = await ctx.resolve(id, importer, opts);
|
|
36
|
-
if (result) return result;
|
|
37
|
-
result = await ctx.$$internal.callHook("resolveId", {
|
|
38
|
-
sequential: true,
|
|
39
|
-
result: "first",
|
|
40
|
-
order: "post"
|
|
41
|
-
}, id, importer, opts);
|
|
42
|
-
if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
|
|
43
|
-
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
|
|
44
|
-
...result,
|
|
45
|
-
id: `${prefix}${result.id}`
|
|
46
|
-
};
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
async function load(id) {
|
|
50
|
-
let result = await ctx.$$internal.callHook("load", {
|
|
51
|
-
sequential: true,
|
|
52
|
-
result: "first",
|
|
53
|
-
order: "pre"
|
|
54
|
-
}, id);
|
|
55
|
-
if (result) return result;
|
|
56
|
-
result = await ctx.$$internal.callHook("load", {
|
|
57
|
-
sequential: true,
|
|
58
|
-
result: "first",
|
|
59
|
-
order: "normal"
|
|
60
|
-
}, id);
|
|
61
|
-
if (result) return result;
|
|
62
|
-
result = await ctx.load(id);
|
|
63
|
-
if (result) return result;
|
|
64
|
-
return ctx.$$internal.callHook("load", {
|
|
65
|
-
sequential: true,
|
|
66
|
-
result: "first",
|
|
67
|
-
order: "post"
|
|
68
|
-
}, id);
|
|
69
|
-
}
|
|
21
|
+
if (options.prefix === true) prefix = "\0";
|
|
22
|
+
else if ((0, __stryke_type_checks_is_set_string.isSetString)(options.prefix)) prefix = options.prefix;
|
|
70
23
|
return {
|
|
71
|
-
resolveId,
|
|
72
|
-
|
|
24
|
+
async resolveId(id, importer, opts = { isEntry: false }) {
|
|
25
|
+
let result = await ctx.$$internal.callHook("resolveId", {
|
|
26
|
+
sequential: true,
|
|
27
|
+
result: "first",
|
|
28
|
+
order: "pre"
|
|
29
|
+
}, id, importer, opts);
|
|
30
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
|
|
31
|
+
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
|
|
32
|
+
...result,
|
|
33
|
+
id: `${prefix}${result.id}`
|
|
34
|
+
};
|
|
35
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
36
|
+
sequential: true,
|
|
37
|
+
result: "first",
|
|
38
|
+
order: "normal"
|
|
39
|
+
}, id, importer, opts);
|
|
40
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
|
|
41
|
+
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
|
|
42
|
+
...result,
|
|
43
|
+
id: `${prefix}${result.id}`
|
|
44
|
+
};
|
|
45
|
+
result = await ctx.resolve(id, importer, opts);
|
|
46
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
|
|
47
|
+
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
|
|
48
|
+
...result,
|
|
49
|
+
id: `${prefix}${result.id}`
|
|
50
|
+
};
|
|
51
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
52
|
+
sequential: true,
|
|
53
|
+
result: "first",
|
|
54
|
+
order: "post"
|
|
55
|
+
}, id, importer, opts);
|
|
56
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
|
|
57
|
+
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
|
|
58
|
+
...result,
|
|
59
|
+
id: `${prefix}${result.id}`
|
|
60
|
+
};
|
|
61
|
+
return null;
|
|
62
|
+
},
|
|
63
|
+
async load(id) {
|
|
64
|
+
const moduleId = prefix ? id.replace(new RegExp(`^${prefix}*`, "g"), "") : id;
|
|
65
|
+
let result = await ctx.$$internal.callHook("load", {
|
|
66
|
+
sequential: true,
|
|
67
|
+
result: "first",
|
|
68
|
+
order: "pre"
|
|
69
|
+
}, moduleId);
|
|
70
|
+
if (result) return result;
|
|
71
|
+
result = await ctx.$$internal.callHook("load", {
|
|
72
|
+
sequential: true,
|
|
73
|
+
result: "first",
|
|
74
|
+
order: "normal"
|
|
75
|
+
}, moduleId);
|
|
76
|
+
if (result) return result;
|
|
77
|
+
result = await ctx.load(moduleId);
|
|
78
|
+
if (result) return result;
|
|
79
|
+
return ctx.$$internal.callHook("load", {
|
|
80
|
+
sequential: true,
|
|
81
|
+
result: "first",
|
|
82
|
+
order: "post"
|
|
83
|
+
}, moduleId);
|
|
84
|
+
}
|
|
73
85
|
};
|
|
74
86
|
}
|
|
75
87
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA8BiB,8CAAA;;AAAjB;AAwBA;;;;;;EAKG,MAAA,CAAA,EAAA,MAAA,GAAA,
|
|
1
|
+
{"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA8BiB,8CAAA;;AAAjB;AAwBA;;;;;;EAKG,MAAA,CAAA,EAAA,MAAA,GAAA,OAAA;;;;;;;;;;;;;;iBALa,yDACG,gBAAgB,wBAExB,oBACA,iDACR,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA8BiB,8CAAA;;AAAjB;AAwBA;;;;;;EAKG,MAAA,CAAA,EAAA,MAAA,GAAA,
|
|
1
|
+
{"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA8BiB,8CAAA;;AAAjB;AAwBA;;;;;;EAKG,MAAA,CAAA,EAAA,MAAA,GAAA,OAAA;;;;;;;;;;;;;;iBALa,yDACG,gBAAgB,wBAExB,oBACA,iDACR,KAAK"}
|
|
@@ -17,58 +17,70 @@ import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
|
17
17
|
function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
18
18
|
const ctx = context;
|
|
19
19
|
let prefix = "";
|
|
20
|
-
if (options.prefix
|
|
21
|
-
|
|
22
|
-
let result = await ctx.$$internal.callHook("resolveId", {
|
|
23
|
-
sequential: true,
|
|
24
|
-
result: "first",
|
|
25
|
-
order: "pre"
|
|
26
|
-
}, id, importer, opts);
|
|
27
|
-
if (result) return result;
|
|
28
|
-
result = await ctx.$$internal.callHook("resolveId", {
|
|
29
|
-
sequential: true,
|
|
30
|
-
result: "first",
|
|
31
|
-
order: "normal"
|
|
32
|
-
}, id, importer, opts);
|
|
33
|
-
if (result) return result;
|
|
34
|
-
result = await ctx.resolve(id, importer, opts);
|
|
35
|
-
if (result) return result;
|
|
36
|
-
result = await ctx.$$internal.callHook("resolveId", {
|
|
37
|
-
sequential: true,
|
|
38
|
-
result: "first",
|
|
39
|
-
order: "post"
|
|
40
|
-
}, id, importer, opts);
|
|
41
|
-
if (isSetString(result)) return `${prefix}${result}`;
|
|
42
|
-
else if (isSetObject(result)) return {
|
|
43
|
-
...result,
|
|
44
|
-
id: `${prefix}${result.id}`
|
|
45
|
-
};
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
async function load(id) {
|
|
49
|
-
let result = await ctx.$$internal.callHook("load", {
|
|
50
|
-
sequential: true,
|
|
51
|
-
result: "first",
|
|
52
|
-
order: "pre"
|
|
53
|
-
}, id);
|
|
54
|
-
if (result) return result;
|
|
55
|
-
result = await ctx.$$internal.callHook("load", {
|
|
56
|
-
sequential: true,
|
|
57
|
-
result: "first",
|
|
58
|
-
order: "normal"
|
|
59
|
-
}, id);
|
|
60
|
-
if (result) return result;
|
|
61
|
-
result = await ctx.load(id);
|
|
62
|
-
if (result) return result;
|
|
63
|
-
return ctx.$$internal.callHook("load", {
|
|
64
|
-
sequential: true,
|
|
65
|
-
result: "first",
|
|
66
|
-
order: "post"
|
|
67
|
-
}, id);
|
|
68
|
-
}
|
|
20
|
+
if (options.prefix === true) prefix = "\0";
|
|
21
|
+
else if (isSetString(options.prefix)) prefix = options.prefix;
|
|
69
22
|
return {
|
|
70
|
-
resolveId,
|
|
71
|
-
|
|
23
|
+
async resolveId(id, importer, opts = { isEntry: false }) {
|
|
24
|
+
let result = await ctx.$$internal.callHook("resolveId", {
|
|
25
|
+
sequential: true,
|
|
26
|
+
result: "first",
|
|
27
|
+
order: "pre"
|
|
28
|
+
}, id, importer, opts);
|
|
29
|
+
if (isSetString(result)) return `${prefix}${result}`;
|
|
30
|
+
else if (isSetObject(result)) return {
|
|
31
|
+
...result,
|
|
32
|
+
id: `${prefix}${result.id}`
|
|
33
|
+
};
|
|
34
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
35
|
+
sequential: true,
|
|
36
|
+
result: "first",
|
|
37
|
+
order: "normal"
|
|
38
|
+
}, id, importer, opts);
|
|
39
|
+
if (isSetString(result)) return `${prefix}${result}`;
|
|
40
|
+
else if (isSetObject(result)) return {
|
|
41
|
+
...result,
|
|
42
|
+
id: `${prefix}${result.id}`
|
|
43
|
+
};
|
|
44
|
+
result = await ctx.resolve(id, importer, opts);
|
|
45
|
+
if (isSetString(result)) return `${prefix}${result}`;
|
|
46
|
+
else if (isSetObject(result)) return {
|
|
47
|
+
...result,
|
|
48
|
+
id: `${prefix}${result.id}`
|
|
49
|
+
};
|
|
50
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
51
|
+
sequential: true,
|
|
52
|
+
result: "first",
|
|
53
|
+
order: "post"
|
|
54
|
+
}, id, importer, opts);
|
|
55
|
+
if (isSetString(result)) return `${prefix}${result}`;
|
|
56
|
+
else if (isSetObject(result)) return {
|
|
57
|
+
...result,
|
|
58
|
+
id: `${prefix}${result.id}`
|
|
59
|
+
};
|
|
60
|
+
return null;
|
|
61
|
+
},
|
|
62
|
+
async load(id) {
|
|
63
|
+
const moduleId = prefix ? id.replace(new RegExp(`^${prefix}*`, "g"), "") : id;
|
|
64
|
+
let result = await ctx.$$internal.callHook("load", {
|
|
65
|
+
sequential: true,
|
|
66
|
+
result: "first",
|
|
67
|
+
order: "pre"
|
|
68
|
+
}, moduleId);
|
|
69
|
+
if (result) return result;
|
|
70
|
+
result = await ctx.$$internal.callHook("load", {
|
|
71
|
+
sequential: true,
|
|
72
|
+
result: "first",
|
|
73
|
+
order: "normal"
|
|
74
|
+
}, moduleId);
|
|
75
|
+
if (result) return result;
|
|
76
|
+
result = await ctx.load(moduleId);
|
|
77
|
+
if (result) return result;
|
|
78
|
+
return ctx.$$internal.callHook("load", {
|
|
79
|
+
sequential: true,
|
|
80
|
+
result: "first",
|
|
81
|
+
order: "post"
|
|
82
|
+
}, moduleId);
|
|
83
|
+
}
|
|
72
84
|
};
|
|
73
85
|
}
|
|
74
86
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolution.mjs","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { LoadResult } from \"rollup\";\nimport type {\n ExternalIdResult,\n HookFnMap,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { UNSAFE_PluginContext } from \"../../types/_internal\";\nimport { PluginContext } from \"../../types/context\";\n\nexport interface CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A prefix to apply to all resolved module IDs. This can be used to create virtual modules by prefixing them with a specific string (e.g., `\\0`).\n *\n * @remarks\n * If set to `false`, no prefix will be applied, and resolved module IDs will be returned as-is. By default, this is set to `\\0`, which is a common convention for virtual modules in Rollup and Vite plugins.\n *\n * @defaultValue \"\\\\0\"\n */\n prefix?: string |
|
|
1
|
+
{"version":3,"file":"module-resolution.mjs","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { LoadResult } from \"rollup\";\nimport type {\n ExternalIdResult,\n HookFnMap,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { UNSAFE_PluginContext } from \"../../types/_internal\";\nimport { PluginContext } from \"../../types/context\";\n\nexport interface CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A prefix to apply to all resolved module IDs. This can be used to create virtual modules by prefixing them with a specific string (e.g., `\\0`).\n *\n * @remarks\n * If set to `false`, no prefix will be applied, and resolved module IDs will be returned as-is. By default, this is set to `\\0`, which is a common convention for virtual modules in Rollup and Vite plugins.\n *\n * @defaultValue \"\\\\0\"\n */\n prefix?: string | boolean;\n}\n\n/**\n * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.\n *\n * @remarks\n * This includes the `resolveId` and `load` hooks.\n *\n * @see https://rollupjs.org/plugin-development/#resolveid\n * @see https://rollupjs.org/plugin-development/#load\n *\n * @param context - The plugin context.\n * @returns The module resolution hooks (`resolveId` and `load`).\n */\nexport function createUnpluginModuleResolutionFunctions<\n TContext extends PluginContext = PluginContext\n>(\n context: TContext,\n options: CreateUnpluginModuleResolutionFunctionsOptions = {}\n): Pick<HookFnMap, \"resolveId\" | \"load\"> {\n const ctx = context as unknown as UNSAFE_PluginContext;\n\n let prefix = \"\";\n if (options.prefix === true) {\n prefix = \"\\0\";\n } else if (isSetString(options.prefix)) {\n prefix = options.prefix;\n }\n\n return {\n async resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n opts: {\n isEntry: boolean;\n } = { isEntry: false }\n ): Promise<string | ExternalIdResult | null | undefined> {\n let result = await ctx.$$internal.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n id,\n importer,\n opts\n );\n if (isSetString(result)) {\n return `${prefix}${result}`;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id: `${prefix}${result.id}`\n };\n }\n\n result = await ctx.$$internal.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n id,\n importer,\n opts\n );\n if (isSetString(result)) {\n return `${prefix}${result}`;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id: `${prefix}${result.id}`\n };\n }\n\n result = await ctx.resolve(id, importer, opts);\n if (isSetString(result)) {\n return `${prefix}${result}`;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id: `${prefix}${result.id}`\n };\n }\n\n result = await ctx.$$internal.callHook(\n \"resolveId\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n id,\n importer,\n opts\n );\n if (isSetString(result)) {\n return `${prefix}${result}`;\n } else if (isSetObject(result)) {\n return {\n ...result,\n id: `${prefix}${result.id}`\n };\n }\n\n return null;\n },\n async load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult | null | undefined> {\n const moduleId = prefix\n ? id.replace(new RegExp(`^${prefix}*`, \"g\"), \"\")\n : id;\n\n let result = await ctx.$$internal.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"pre\"\n },\n moduleId\n );\n if (result) {\n return result;\n }\n\n result = await ctx.$$internal.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"normal\"\n },\n moduleId\n );\n if (result) {\n return result;\n }\n\n result = await ctx.load(moduleId);\n if (result) {\n return result;\n }\n\n return ctx.$$internal.callHook(\n \"load\",\n {\n sequential: true,\n result: \"first\",\n order: \"post\"\n },\n moduleId\n );\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsDA,SAAgB,wCAGd,SACA,UAA0D,EAAE,EACrB;CACvC,MAAM,MAAM;CAEZ,IAAI,SAAS;AACb,KAAI,QAAQ,WAAW,KACrB,UAAS;UACA,YAAY,QAAQ,OAAO,CACpC,UAAS,QAAQ;AAGnB,QAAO;EACL,MAAM,UAEJ,IACA,UACA,OAEI,EAAE,SAAS,OAAO,EACiC;GACvD,IAAI,SAAS,MAAM,IAAI,WAAW,SAChC,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,IACA,UACA,KACD;AACD,OAAI,YAAY,OAAO,CACrB,QAAO,GAAG,SAAS;YACV,YAAY,OAAO,CAC5B,QAAO;IACL,GAAG;IACH,IAAI,GAAG,SAAS,OAAO;IACxB;AAGH,YAAS,MAAM,IAAI,WAAW,SAC5B,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,IACA,UACA,KACD;AACD,OAAI,YAAY,OAAO,CACrB,QAAO,GAAG,SAAS;YACV,YAAY,OAAO,CAC5B,QAAO;IACL,GAAG;IACH,IAAI,GAAG,SAAS,OAAO;IACxB;AAGH,YAAS,MAAM,IAAI,QAAQ,IAAI,UAAU,KAAK;AAC9C,OAAI,YAAY,OAAO,CACrB,QAAO,GAAG,SAAS;YACV,YAAY,OAAO,CAC5B,QAAO;IACL,GAAG;IACH,IAAI,GAAG,SAAS,OAAO;IACxB;AAGH,YAAS,MAAM,IAAI,WAAW,SAC5B,aACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,IACA,UACA,KACD;AACD,OAAI,YAAY,OAAO,CACrB,QAAO,GAAG,SAAS;YACV,YAAY,OAAO,CAC5B,QAAO;IACL,GAAG;IACH,IAAI,GAAG,SAAS,OAAO;IACxB;AAGH,UAAO;;EAET,MAAM,KAEJ,IACwC;GACxC,MAAM,WAAW,SACb,GAAG,QAAQ,IAAI,OAAO,IAAI,OAAO,IAAI,IAAI,EAAE,GAAG,GAC9C;GAEJ,IAAI,SAAS,MAAM,IAAI,WAAW,SAChC,QACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,SACD;AACD,OAAI,OACF,QAAO;AAGT,YAAS,MAAM,IAAI,WAAW,SAC5B,QACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,SACD;AACD,OAAI,OACF,QAAO;AAGT,YAAS,MAAM,IAAI,KAAK,SAAS;AACjC,OAAI,OACF,QAAO;AAGT,UAAO,IAAI,WAAW,SACpB,QACA;IACE,YAAY;IACZ,QAAQ;IACR,OAAO;IACR,EACD,SACD;;EAEJ"}
|
|
@@ -2,22 +2,57 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
3
3
|
|
|
4
4
|
//#region src/lib/utilities/file-header.ts
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Generates a file header comment with a warning about automatic overwriting.
|
|
7
|
+
*
|
|
8
|
+
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
9
|
+
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
10
|
+
* @returns A string containing the file header warning message.
|
|
11
|
+
*/
|
|
12
|
+
function getFileHeaderWarningText(overwrite = true, framework = "powerlines") {
|
|
13
|
+
return overwrite !== false ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \`output.overwrite\` option.` : `This file was generated on ${(/* @__PURE__ */ new Date()).toLocaleString()} - it will not be overwritten by ${(0, __stryke_string_format_title_case.titleCase)(framework)} while the \`output.overwrite\` option is set to \`true\`.`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generates a file header warning message based on the provided context.
|
|
17
|
+
*
|
|
18
|
+
* @param context - The Powerlines context.
|
|
19
|
+
* @returns A string containing the file header warning message.
|
|
20
|
+
*/
|
|
21
|
+
function getFileHeaderWarning(context) {
|
|
22
|
+
return getFileHeaderWarningText(context.config.output?.overwrite, context.config.framework);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
26
|
+
*
|
|
27
|
+
* @param context - The Powerlines context.
|
|
28
|
+
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
29
|
+
* @returns A string containing the file header comment.
|
|
30
|
+
*/
|
|
31
|
+
function getFileHeader(context, comment = "//") {
|
|
6
32
|
return `
|
|
7
|
-
|
|
8
|
-
${
|
|
33
|
+
${comment} Generated by ${(0, __stryke_string_format_title_case.titleCase)(context.config.framework) || "Powerlines"}
|
|
34
|
+
${comment} ${getFileHeaderWarning(context)}
|
|
9
35
|
`;
|
|
10
36
|
}
|
|
11
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
39
|
+
*
|
|
40
|
+
* @param context - The Powerlines context.
|
|
41
|
+
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
42
|
+
* @returns A string containing the file header comment for a TypeScript file.
|
|
43
|
+
*/
|
|
44
|
+
function getTypescriptFileHeader(context, options = {}) {
|
|
12
45
|
const { directive = null, prettierIgnore = false } = options;
|
|
13
46
|
return `/* eslint-disable */
|
|
14
47
|
// biome-ignore lint: disable
|
|
15
48
|
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
16
|
-
${
|
|
49
|
+
${getFileHeader(context)}
|
|
17
50
|
|
|
18
51
|
`;
|
|
19
52
|
}
|
|
20
53
|
|
|
21
54
|
//#endregion
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
55
|
+
exports.getFileHeader = getFileHeader;
|
|
56
|
+
exports.getFileHeaderWarning = getFileHeaderWarning;
|
|
57
|
+
exports.getFileHeaderWarningText = getFileHeaderWarningText;
|
|
58
|
+
exports.getTypescriptFileHeader = getTypescriptFileHeader;
|
|
@@ -5,9 +5,38 @@ interface FileHeaderOptions {
|
|
|
5
5
|
directive?: string | null;
|
|
6
6
|
prettierIgnore?: boolean;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Generates a file header comment with a warning about automatic overwriting.
|
|
10
|
+
*
|
|
11
|
+
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
12
|
+
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
13
|
+
* @returns A string containing the file header warning message.
|
|
14
|
+
*/
|
|
15
|
+
declare function getFileHeaderWarningText(overwrite?: boolean, framework?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a file header warning message based on the provided context.
|
|
18
|
+
*
|
|
19
|
+
* @param context - The Powerlines context.
|
|
20
|
+
* @returns A string containing the file header warning message.
|
|
21
|
+
*/
|
|
22
|
+
declare function getFileHeaderWarning(context: Context): string;
|
|
23
|
+
/**
|
|
24
|
+
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
25
|
+
*
|
|
26
|
+
* @param context - The Powerlines context.
|
|
27
|
+
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
28
|
+
* @returns A string containing the file header comment.
|
|
29
|
+
*/
|
|
30
|
+
declare function getFileHeader(context: Context, comment?: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
33
|
+
*
|
|
34
|
+
* @param context - The Powerlines context.
|
|
35
|
+
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
36
|
+
* @returns A string containing the file header comment for a TypeScript file.
|
|
37
|
+
*/
|
|
38
|
+
declare function getTypescriptFileHeader(context: Context, options?: FileHeaderOptions): string;
|
|
10
39
|
declare type __ΩFileHeaderOptions = any[];
|
|
11
40
|
//#endregion
|
|
12
|
-
export { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
41
|
+
export { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
13
42
|
//# sourceMappingURL=file-header.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-header.d.cts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;
|
|
1
|
+
{"version":3,"file":"file-header.d.cts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;AAYlC;AAeA;AAcA;AAcA;;;;;iBA3CgB,wBAAA;;;;;;;iBAeA,oBAAA,UAA8B;;;;;;;;iBAc9B,aAAA,UAAuB;;;;;;;;iBAcvB,uBAAA,UACL,mBACA"}
|
|
@@ -5,9 +5,38 @@ interface FileHeaderOptions {
|
|
|
5
5
|
directive?: string | null;
|
|
6
6
|
prettierIgnore?: boolean;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Generates a file header comment with a warning about automatic overwriting.
|
|
10
|
+
*
|
|
11
|
+
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
12
|
+
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
13
|
+
* @returns A string containing the file header warning message.
|
|
14
|
+
*/
|
|
15
|
+
declare function getFileHeaderWarningText(overwrite?: boolean, framework?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a file header warning message based on the provided context.
|
|
18
|
+
*
|
|
19
|
+
* @param context - The Powerlines context.
|
|
20
|
+
* @returns A string containing the file header warning message.
|
|
21
|
+
*/
|
|
22
|
+
declare function getFileHeaderWarning(context: Context): string;
|
|
23
|
+
/**
|
|
24
|
+
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
25
|
+
*
|
|
26
|
+
* @param context - The Powerlines context.
|
|
27
|
+
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
28
|
+
* @returns A string containing the file header comment.
|
|
29
|
+
*/
|
|
30
|
+
declare function getFileHeader(context: Context, comment?: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
33
|
+
*
|
|
34
|
+
* @param context - The Powerlines context.
|
|
35
|
+
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
36
|
+
* @returns A string containing the file header comment for a TypeScript file.
|
|
37
|
+
*/
|
|
38
|
+
declare function getTypescriptFileHeader(context: Context, options?: FileHeaderOptions): string;
|
|
10
39
|
declare type __ΩFileHeaderOptions = any[];
|
|
11
40
|
//#endregion
|
|
12
|
-
export { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
41
|
+
export { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
13
42
|
//# sourceMappingURL=file-header.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-header.d.mts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;
|
|
1
|
+
{"version":3,"file":"file-header.d.mts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;AAYlC;AAeA;AAcA;AAcA;;;;;iBA3CgB,wBAAA;;;;;;;iBAeA,oBAAA,UAA8B;;;;;;;;iBAc9B,aAAA,UAAuB;;;;;;;;iBAcvB,uBAAA,UACL,mBACA"}
|
|
@@ -1,22 +1,55 @@
|
|
|
1
1
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/utilities/file-header.ts
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Generates a file header comment with a warning about automatic overwriting.
|
|
6
|
+
*
|
|
7
|
+
* @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.
|
|
8
|
+
* @param framework - The name of the framework to include in the warning message. Defaults to "powerlines".
|
|
9
|
+
* @returns A string containing the file header warning message.
|
|
10
|
+
*/
|
|
11
|
+
function getFileHeaderWarningText(overwrite = true, framework = "powerlines") {
|
|
12
|
+
return overwrite !== false ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \`output.overwrite\` option.` : `This file was generated on ${(/* @__PURE__ */ new Date()).toLocaleString()} - it will not be overwritten by ${titleCase(framework)} while the \`output.overwrite\` option is set to \`true\`.`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generates a file header warning message based on the provided context.
|
|
16
|
+
*
|
|
17
|
+
* @param context - The Powerlines context.
|
|
18
|
+
* @returns A string containing the file header warning message.
|
|
19
|
+
*/
|
|
20
|
+
function getFileHeaderWarning(context) {
|
|
21
|
+
return getFileHeaderWarningText(context.config.output?.overwrite, context.config.framework);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generates a file header comment for a generated source file, including a warning about automatic overwriting.
|
|
25
|
+
*
|
|
26
|
+
* @param context - The Powerlines context.
|
|
27
|
+
* @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.
|
|
28
|
+
* @returns A string containing the file header comment.
|
|
29
|
+
*/
|
|
30
|
+
function getFileHeader(context, comment = "//") {
|
|
5
31
|
return `
|
|
6
|
-
|
|
7
|
-
${
|
|
32
|
+
${comment} Generated by ${titleCase(context.config.framework) || "Powerlines"}
|
|
33
|
+
${comment} ${getFileHeaderWarning(context)}
|
|
8
34
|
`;
|
|
9
35
|
}
|
|
10
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.
|
|
38
|
+
*
|
|
39
|
+
* @param context - The Powerlines context.
|
|
40
|
+
* @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.
|
|
41
|
+
* @returns A string containing the file header comment for a TypeScript file.
|
|
42
|
+
*/
|
|
43
|
+
function getTypescriptFileHeader(context, options = {}) {
|
|
11
44
|
const { directive = null, prettierIgnore = false } = options;
|
|
12
45
|
return `/* eslint-disable */
|
|
13
46
|
// biome-ignore lint: disable
|
|
14
47
|
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `\n\n${directive}\n` : "\n"}
|
|
15
|
-
${
|
|
48
|
+
${getFileHeader(context)}
|
|
16
49
|
|
|
17
50
|
`;
|
|
18
51
|
}
|
|
19
52
|
|
|
20
53
|
//#endregion
|
|
21
|
-
export {
|
|
54
|
+
export { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader };
|
|
22
55
|
//# sourceMappingURL=file-header.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../../src/lib/utilities/file-header.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 { titleCase } from \"@stryke/string-format/title-case\";\nimport { Context } from \"../../types/context\";\n\nexport interface FileHeaderOptions {\n directive?: string | null;\n prettierIgnore?: boolean;\n}\n\
|
|
1
|
+
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../../src/lib/utilities/file-header.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 { titleCase } from \"@stryke/string-format/title-case\";\nimport { Context } from \"../../types/context\";\n\nexport interface FileHeaderOptions {\n directive?: string | null;\n prettierIgnore?: boolean;\n}\n\n/**\n * Generates a file header comment with a warning about automatic overwriting.\n *\n * @param overwrite - Whether the file will be automatically overwritten. If `false`, the warning will indicate that the file will not be overwritten. If `true` or omitted, the warning will indicate that the file will be overwritten.\n * @param framework - The name of the framework to include in the warning message. Defaults to \"powerlines\".\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarningText(\n overwrite = true,\n framework = \"powerlines\"\n): string {\n return overwrite !== false\n ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \\`output.overwrite\\` option.`\n : `This file was generated on ${new Date().toLocaleString()} - it will not be overwritten by ${titleCase(framework)} while the \\`output.overwrite\\` option is set to \\`true\\`.`;\n}\n\n/**\n * Generates a file header warning message based on the provided context.\n *\n * @param context - The Powerlines context.\n * @returns A string containing the file header warning message.\n */\nexport function getFileHeaderWarning(context: Context): string {\n return getFileHeaderWarningText(\n context.config.output?.overwrite,\n context.config.framework\n );\n}\n\n/**\n * Generates a file header comment for a generated source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param comment - The comment syntax to use for the header (e.g., `//` for JavaScript/TypeScript, `#` for Python). Defaults to `//`.\n * @returns A string containing the file header comment.\n */\nexport function getFileHeader(context: Context, comment = \"//\"): string {\n return `\n${comment} Generated by ${titleCase(context.config.framework) || \"Powerlines\"}\n${comment} ${getFileHeaderWarning(context)}\n`;\n}\n\n/**\n * Generates a file header comment for a generated TypeScript source file, including a warning about automatic overwriting.\n *\n * @param context - The Powerlines context.\n * @param options - Additional options for generating the file header, such as a directive to include and whether to add a Prettier ignore comment.\n * @returns A string containing the file header comment for a TypeScript file.\n */\nexport function getTypescriptFileHeader(\n context: Context,\n options: FileHeaderOptions = {}\n): string {\n const { directive = null, prettierIgnore = false } = options;\n\n return `/* eslint-disable */\n// biome-ignore lint: disable\n${prettierIgnore ? `// prettier-ignore` : \"\"}${directive ? `\\n\\n${directive}\\n` : \"\\n\"}\n${getFileHeader(context)}\n\n`;\n}\n"],"mappings":";;;;;;;;;;AAiCA,SAAgB,yBACd,YAAY,MACZ,YAAY,cACJ;AACR,QAAO,cAAc,QACjB,0JACA,+CAA8B,IAAI,MAAM,EAAC,gBAAgB,CAAC,mCAAmC,UAAU,UAAU,CAAC;;;;;;;;AASxH,SAAgB,qBAAqB,SAA0B;AAC7D,QAAO,yBACL,QAAQ,OAAO,QAAQ,WACvB,QAAQ,OAAO,UAChB;;;;;;;;;AAUH,SAAgB,cAAc,SAAkB,UAAU,MAAc;AACtE,QAAO;EACP,QAAQ,gBAAgB,UAAU,QAAQ,OAAO,UAAU,IAAI,aAAa;EAC5E,QAAQ,GAAG,qBAAqB,QAAQ,CAAC;;;;;;;;;;AAW3C,SAAgB,wBACd,SACA,UAA6B,EAAE,EACvB;CACR,MAAM,EAAE,YAAY,MAAM,iBAAiB,UAAU;AAErD,QAAO;;EAEP,iBAAiB,uBAAuB,KAAK,YAAY,OAAO,UAAU,MAAM,KAAK;EACrF,cAAc,QAAQ,CAAC"}
|
|
@@ -7,9 +7,11 @@ const require_lib_utilities_write_file = require('./write-file.cjs');
|
|
|
7
7
|
exports.format = require_lib_utilities_format.format;
|
|
8
8
|
exports.formatFolder = require_lib_utilities_format.formatFolder;
|
|
9
9
|
exports.generateSourceMap = require_lib_utilities_source_map.generateSourceMap;
|
|
10
|
-
exports.getBaseFileHeader = require_lib_utilities_file_header.getBaseFileHeader;
|
|
11
10
|
exports.getFileHeader = require_lib_utilities_file_header.getFileHeader;
|
|
11
|
+
exports.getFileHeaderWarning = require_lib_utilities_file_header.getFileHeaderWarning;
|
|
12
|
+
exports.getFileHeaderWarningText = require_lib_utilities_file_header.getFileHeaderWarningText;
|
|
12
13
|
exports.getMagicString = require_lib_utilities_source_file.getMagicString;
|
|
13
14
|
exports.getSourceFile = require_lib_utilities_source_file.getSourceFile;
|
|
14
15
|
exports.getString = require_lib_utilities_source_file.getString;
|
|
16
|
+
exports.getTypescriptFileHeader = require_lib_utilities_file_header.getTypescriptFileHeader;
|
|
15
17
|
exports.writeFile = require_lib_utilities_write_file.writeFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
1
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./file-header.cjs";
|
|
2
2
|
import { format, formatFolder } from "./format.cjs";
|
|
3
3
|
import { getMagicString, getSourceFile, getString } from "./source-file.cjs";
|
|
4
4
|
import { generateSourceMap } from "./source-map.cjs";
|
|
5
5
|
import { writeFile } from "./write-file.cjs";
|
|
6
|
-
export { FileHeaderOptions, __ΩFileHeaderOptions, format, formatFolder, generateSourceMap,
|
|
6
|
+
export { FileHeaderOptions, __ΩFileHeaderOptions, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, writeFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FileHeaderOptions, __ΩFileHeaderOptions,
|
|
1
|
+
import { FileHeaderOptions, __ΩFileHeaderOptions, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./file-header.mjs";
|
|
2
2
|
import { format, formatFolder } from "./format.mjs";
|
|
3
3
|
import { getMagicString, getSourceFile, getString } from "./source-file.mjs";
|
|
4
4
|
import { generateSourceMap } from "./source-map.mjs";
|
|
5
5
|
import { writeFile } from "./write-file.mjs";
|
|
6
|
-
export { FileHeaderOptions, __ΩFileHeaderOptions, format, formatFolder, generateSourceMap,
|
|
6
|
+
export { FileHeaderOptions, __ΩFileHeaderOptions, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, writeFile };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getMagicString, getSourceFile, getString } from "./source-file.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getTypescriptFileHeader } from "./file-header.mjs";
|
|
3
3
|
import { format, formatFolder } from "./format.mjs";
|
|
4
4
|
import { generateSourceMap } from "./source-map.mjs";
|
|
5
5
|
import { writeFile } from "./write-file.mjs";
|
|
6
6
|
|
|
7
|
-
export { format, formatFolder, generateSourceMap,
|
|
7
|
+
export { format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, writeFile };
|
package/dist/types/context.d.cts
CHANGED
|
@@ -192,6 +192,10 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
192
192
|
* The path to the Powerlines entry modules directory
|
|
193
193
|
*/
|
|
194
194
|
entryPath: string;
|
|
195
|
+
/**
|
|
196
|
+
* The path to the Powerlines infrastructure modules directory
|
|
197
|
+
*/
|
|
198
|
+
infrastructurePath: string;
|
|
195
199
|
/**
|
|
196
200
|
* The path to the Powerlines TypeScript declaration files directory
|
|
197
201
|
*/
|
|
@@ -381,6 +385,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
381
385
|
* @param options - Additional options for writing the entry file
|
|
382
386
|
*/
|
|
383
387
|
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
|
|
390
|
+
*
|
|
391
|
+
* @param code - The source code of the infrastructure file
|
|
392
|
+
* @param id - The unique identifier of the infrastructure file
|
|
393
|
+
* @param options - Additional options for writing the infrastructure file
|
|
394
|
+
*/
|
|
395
|
+
emitInfrastructure: (code: string, id: string, options?: EmitOptions) => Promise<void>;
|
|
396
|
+
/**
|
|
397
|
+
* Synchronously resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
|
|
398
|
+
*
|
|
399
|
+
* @param code - The source code of the infrastructure file
|
|
400
|
+
* @param id - The unique identifier of the infrastructure file
|
|
401
|
+
* @param options - Additional options for writing the infrastructure file
|
|
402
|
+
*/
|
|
403
|
+
emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
384
404
|
/**
|
|
385
405
|
* A function to update the context fields using a new user configuration options
|
|
386
406
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAsDY,sCAAsC,iCAC1C,eADiB,CAAA,MAAA,CAAA,GAAA,CAAA,IAAA,EAAA,GAAA,EAAA,GACwB,OADxB,CAAA,GAAA,CAAA,EAAyB,GAAA;EAC1C,KAAA,EAAA,GAAA,GAAA,IAAA;EAAyC,GAAA,EAAA,GAAA,GAGpC,UAHoC,CAGzB,MAHyB,CAAA,KAAA,CAAA,CAAA;CAGzB;AAAX,UAGI,QAAA,CAHJ;EAAU;AAGvB;AAgCA;EAIiB,QAAA,EAAA,MAAA;EAQA;AAsBjB;;EAA8B,OAAA,EAAA,MAAA;EACT;;;EACoB,SAAA,EAAA,MAAA;EACV;;AAG/B;EAOiB,SAAA,EAAA,MAAA;EAYA;AAUjB;AAOA;EAYI,QAAA,EAAA,MAAA;EADmB;;;EAXc,UAAA,EAAA,MAAA;;AAuBzB,UAnGK,QAAA,SAAiB,IAmGN,CAAA;EAAG,MAAA,EAlGrB,IAkGqB;;AAC7B,UAhGe,iBAAA,CAgGf;EAAI,IAAA,EAAA,MAAA;EAQW,GAAA,EAtGV,SAsGU,GAAA,IAAiB;;;;;AAWxB,UA3GO,UAAA,CA2GP;EACQ;;;EACJ,EAAA,EAAA,MAAA;EAMP;;;EAeoB,IAAA,EAzHnB,WAyHmB;EAKA;;;EAenB,GAAA,EAAA,MAAA,EAAA;EAKU;;;
|
|
1
|
+
{"version":3,"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BAKX,QAAQ;;;;;;;;+CASkB,gBAAgB;;;;;;;;mDASZ;;;;;;;;oDAYrC,gBACP;;;;;;;;wDASiD;;;;;;;;oDAY1C,qBACP;;;;;;;;wDAYO;;;;;;;;2DAaA,gBACP;;;;;;;;+DAYO;;;;+BAOE,sBACF,uBACP;;;;mCAMW,wBACJ,uBACP;;;;;;;sCAQ+B;;;;;;;+BAQP;;;;;;0BAOL;;KAGd,gCAAgC,iBAAiB,kBAC3D,KAAK,kBAAkB;;;;UAIb;;UAGK,mCACS,iBAAiB,wBACjC,QAAQ;;;;;;;WAOP,OAAO,cAAc;;;;sBAKV,OAAO,cAAc,sBAAsB;;;;gBAKjD,eAAe,mBAAmB;;;;;;;;;;;;;;;qCAkB3C,QAAQ,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCA+B3B,QAAQ,mBAAmB;;;;;;;oBASjB,8BACV,QAAQ,mBAAmB;;;;;;uBAOX,QAAQ,mBAAmB;;UAGjC,iDACS,iBAAiB;UAEjC,OAAO,cAAc;WACpB,cAAc;;KAGb,sCACO,sCAEf,mBAAmB,UAAU;WACtB;;KAGC,kCACO,sCAEf,qBAAqB,UAAU;UAElB,2CACS,iBAAiB,wBACjC,QAAQ;;;;;;;WAOP,yBAAyB;;;;sBAKd,OAAO,cAAc,sBAAsB;;;;eAKlD;;;;SAKN,UAAU,cAAc;;;;0CAMxB,gBACK,uBACP,iBAAiB,cAAc,kBAAkB;;UAGvC,0CACa,iBAAiB,wBAErC,QAAQ,kBAAkB;;;;eAIrB;;;;;;;UAQL;;KAGE,2CACc,iBAAiB,kBACvC,uBAAuB,cAAc;KAE7B,0CAA0C,iBACpD,uBAAuB"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -192,6 +192,10 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
192
192
|
* The path to the Powerlines entry modules directory
|
|
193
193
|
*/
|
|
194
194
|
entryPath: string;
|
|
195
|
+
/**
|
|
196
|
+
* The path to the Powerlines infrastructure modules directory
|
|
197
|
+
*/
|
|
198
|
+
infrastructurePath: string;
|
|
195
199
|
/**
|
|
196
200
|
* The path to the Powerlines TypeScript declaration files directory
|
|
197
201
|
*/
|
|
@@ -381,6 +385,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
381
385
|
* @param options - Additional options for writing the entry file
|
|
382
386
|
*/
|
|
383
387
|
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
|
|
390
|
+
*
|
|
391
|
+
* @param code - The source code of the infrastructure file
|
|
392
|
+
* @param id - The unique identifier of the infrastructure file
|
|
393
|
+
* @param options - Additional options for writing the infrastructure file
|
|
394
|
+
*/
|
|
395
|
+
emitInfrastructure: (code: string, id: string, options?: EmitOptions) => Promise<void>;
|
|
396
|
+
/**
|
|
397
|
+
* Synchronously resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
|
|
398
|
+
*
|
|
399
|
+
* @param code - The source code of the infrastructure file
|
|
400
|
+
* @param id - The unique identifier of the infrastructure file
|
|
401
|
+
* @param options - Additional options for writing the infrastructure file
|
|
402
|
+
*/
|
|
403
|
+
emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
384
404
|
/**
|
|
385
405
|
* A function to update the context fields using a new user configuration options
|
|
386
406
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAsDY,sCAAsC,iCAC1C,eADiB,CAAA,MAAA,CAAA,GAAA,CAAA,IAAA,EAAA,GAAA,EAAA,GACwB,OADxB,CAAA,GAAA,CAAA,EAAyB,GAAA;EAC1C,KAAA,EAAA,GAAA,GAAA,IAAA;EAAyC,GAAA,EAAA,GAAA,GAGpC,UAHoC,CAGzB,MAHyB,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C,iDACS,iBAAiB;UAEjC,OAAO,cAAc;WACpB,cAAc;;KAGb,sCACO,sCAEf,mBAAmB,UAAU;WACtB;;KAGC,kCACO,sCAEf,qBAAqB,UAAU;UAElB,2CACS,iBAAiB,wBACjC,QAAQ;;;;;;;WAOP,yBAAyB;;;;sBAKd,OAAO,cAAc,sBAAsB;;;;eAKlD;;;;SAKN,UAAU,cAAc;;;;0CAMxB,gBACK,uBACP,iBAAiB,cAAc,kBAAkB;;UAGvC,0CACa,iBAAiB,wBAErC,QAAQ,kBAAkB;;;;eAIrB;;;;;;;UAQL;;KAGE,2CACc,iBAAiB,kBACvC,uBAAuB,cAAc;KAE7B,0CAA0C,iBACpD,uBAAuB"}
|
package/dist/types/fs.d.cts
CHANGED
|
@@ -165,6 +165,7 @@ interface VirtualFileMetadata {
|
|
|
165
165
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
166
166
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
167
167
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
168
|
+
* - `infrastructure`: Indicates that the file is an infrastructure module used by the system during deployments.
|
|
168
169
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
169
170
|
*/
|
|
170
171
|
type: string;
|
|
@@ -189,6 +190,7 @@ interface VirtualFileData {
|
|
|
189
190
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
190
191
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
191
192
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
193
|
+
* - `infrastructure`: Indicates that the file is an infrastructure module used by the system during deployments.
|
|
192
194
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
193
195
|
*/
|
|
194
196
|
type?: string;
|
package/dist/types/fs.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.cts","names":[],"sources":["../../src/types/fs.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA;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EAAA,MAAA,EAAA,GA1dgB,OA0dhB,CAAA,IAAA,CAAA;EAiBG;;;;;;;;;;;4BA7dW;;;;;;;;;;;;;2BAeD;;;;;;;;;;;;;;gCAgBK;;;;;;;;;;;;;;2BAgBL;;;;;;;;;;;iBAaV;;;;;KAML,WAAA,GAAc,eAAe;UAExB,mBAAA;;;;;;;;;;;;;;;;;;;;;;;cA0BH;;UAGG,eAAA;;;;;;;;;;;;;;;;;;;;;;;eA0BF;;UAGE,WAAA,SACP,SAAS,kBAAkB;;;;;;;;;;UAYpB,YAAA;;;;;;;;;;;;;YAcL;;;;SAKH,QAAQ;;KAGL,SAAA,YAAqB,MAAA,CAAO,kBAAkB;UAEzC,gBAAA,SAAuB;;;;;;;;;;;;;;;;uBAmBjB;;;;yBAKE;;;;;;UAQR,0BAAA;;;;YAIL,SAAS,eAAe;;;;OAK7B,SAAS;;;;SAKP,SAAS;;;;;;;4BAQU;;;;;;;;;;;;;;;;;;;;;gCAwBI;;;;;;;;;;;;;;2BAgBL;;;;;;;;;;;;;;iCAgBM;;;;;;;;;;;;;;0BAgBP;;;;;;;;;;;;;;4BAgBE;;;;;;;0BAQF;;;;;;;;;;;;;;;gDAiBsB,iBAAiB;;;;;;;;oDASb;;;;;;8BAOtB;;;;;;;;;;;;;+CAeiB;;;;;;;;;;;;;;2BAiBzB,MAAM,KAAK,yCACV,QAChB;;;;;;;+BASe,MAAM,KAAK,yCACV;;;;;;;4BAYf,KAAK,iCACK,KAAK,4BAChB;;;;;;;gCAWC,KAAK,iCACK,KAAK;;;;;;;;;;;;;;;;;qDAsBT,qBACP;;;;;;;;;;;;;;;;;yDAqBO;;;;;;;;;;;;;;iBAiBG"}
|
package/dist/types/fs.d.mts
CHANGED
|
@@ -165,6 +165,7 @@ interface VirtualFileMetadata {
|
|
|
165
165
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
166
166
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
167
167
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
168
|
+
* - `infrastructure`: Indicates that the file is an infrastructure module used by the system during deployments.
|
|
168
169
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
169
170
|
*/
|
|
170
171
|
type: string;
|
|
@@ -189,6 +190,7 @@ interface VirtualFileData {
|
|
|
189
190
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
190
191
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
191
192
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
193
|
+
* - `infrastructure`: Indicates that the file is an infrastructure module used by the system during deployments.
|
|
192
194
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
193
195
|
*/
|
|
194
196
|
type?: string;
|
package/dist/types/fs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA;KAEA,aAAA;AAFZ;AAEA;AAKA;AAYW,UAZM,cAAA,CAYN;EAQgB;;;EA+CA,IAAA,EAAA,MAAA;EAcG;;;;;;EA0ED,MAAA,CAAA,EA/IlB,aA+IkB,GAAA,IAAA;EAMjB;AAEZ;
|
|
1
|
+
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA;KAEA,aAAA;AAFZ;AAEA;AAKA;AAYW,UAZM,cAAA,CAYN;EAQgB;;;EA+CA,IAAA,EAAA,MAAA;EAcG;;;;;;EA0ED,MAAA,CAAA,EA/IlB,aA+IkB,GAAA,IAAA;EAMjB;AAEZ;AA6BA;AA6BA;;;EACqC,MAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GA1MV,OA0MU,CAAA,OAAA,CAAA;EAAmB;AAYxD;;;;;EAsBY,UAAA,EAAS,CAAA,GAAA,EAAA,MAAA,EAAY,GAAA,OAAO;EAEvB;;;;;AAgCj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gBL;;;;;;;;;;;;;;iCAgBM;;;;;;;;;;;;;;0BAgBP;;;;;;;;;;;;;;4BAgBE;;;;;;;0BAQF;;;;;;;;;;;;;;;gDAiBsB,iBAAiB;;;;;;;;oDASb;;;;;;8BAOtB;;;;;;;;;;;;;+CAeiB;;;;;;;;;;;;;;2BAiBzB,MAAM,KAAK,yCACV,QAChB;;;;;;;+BASe,MAAM,KAAK,yCACV;;;;;;;4BAYf,KAAK,iCACK,KAAK,4BAChB;;;;;;;gCAWC,KAAK,iCACK,KAAK;;;;;;;;;;;;;;;;;qDAsBT,qBACP;;;;;;;;;;;;;;;;;yDAqBO;;;;;;;;;;;;;;iBAiBG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;KAWA,cAAA,GACR;AAZQ,KAiBA,oBAjBsB,CAAA,sBAiBqB,cAjBrB,CAAA,GAkBhC,aAlBgC,SAAA,MAAA,GAAA,SAAA,GAoB5B,aApB4B,SAAA,QAAA,GAAA,UAAA,GAsB1B,aAtB0B,SAAA,SAAA,GAAA,QAAA,GAwBxB,aAxBwB;AAWtB,UAeK,iBAfS,
|
|
1
|
+
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;KAWA,cAAA,GACR;AAZQ,KAiBA,oBAjBsB,CAAA,sBAiBqB,cAjBrB,CAAA,GAkBhC,aAlBgC,SAAA,MAAA,GAAA,SAAA,GAoB5B,aApB4B,SAAA,QAAA,GAAA,UAAA,GAsB1B,aAtB0B,SAAA,SAAA,GAAA,QAAA,GAwBxB,aAxBwB;AAWtB,UAeK,iBAfS,CAAA,iBAgBP,OAfO,GAeG,OAfH,CAAA,SAgBhB,eAhBgB,CAAA;EAKd;;;;;EAOF,GAAA,EAUH,GAVG,CAUC,QAVD,CAAA,QA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C,CAsCtB,QAtCsB,CAAA;AACK,yCAAA,GAAA,EAAA;AAArB,iCAAA,GAAA,EAAA;AACF,uCAAA,GAAA,EAAA;AAArB,kCAAA,GAAA,EAAA;AAGgB,uCAAA,GAAA,EAAA;AAAhB,qCAAA,GAAA,EAAA;AADa,kCAAA,GAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An internal core package for Powerlines - please use the `powerlines` package for public usage.",
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -493,17 +493,17 @@
|
|
|
493
493
|
"types": "./dist/index.d.cts",
|
|
494
494
|
"files": ["dist/**/*", "files/**/*", "schemas/**/*"],
|
|
495
495
|
"dependencies": {
|
|
496
|
-
"@storm-software/config": "^1.135.
|
|
497
|
-
"@storm-software/config-tools": "^1.189.
|
|
498
|
-
"@stryke/convert": "^0.6.
|
|
499
|
-
"@stryke/fs": "^0.33.
|
|
500
|
-
"@stryke/hash": "^0.13.
|
|
501
|
-
"@stryke/helpers": "^0.9.
|
|
502
|
-
"@stryke/json": "^0.14.
|
|
503
|
-
"@stryke/path": "^0.26.
|
|
496
|
+
"@storm-software/config": "^1.135.18",
|
|
497
|
+
"@storm-software/config-tools": "^1.189.17",
|
|
498
|
+
"@stryke/convert": "^0.6.49",
|
|
499
|
+
"@stryke/fs": "^0.33.53",
|
|
500
|
+
"@stryke/hash": "^0.13.6",
|
|
501
|
+
"@stryke/helpers": "^0.9.51",
|
|
502
|
+
"@stryke/json": "^0.14.3",
|
|
503
|
+
"@stryke/path": "^0.26.15",
|
|
504
504
|
"@stryke/string-format": "^0.14.8",
|
|
505
|
-
"@stryke/type-checks": "^0.5.
|
|
506
|
-
"@stryke/unique-id": "^0.3.
|
|
505
|
+
"@stryke/type-checks": "^0.5.34",
|
|
506
|
+
"@stryke/unique-id": "^0.3.64",
|
|
507
507
|
"c12": "^3.3.3",
|
|
508
508
|
"chalk": "5.6.2",
|
|
509
509
|
"compatx": "^0.2.0",
|
|
@@ -515,14 +515,14 @@
|
|
|
515
515
|
"unplugin": "^3.0.0"
|
|
516
516
|
},
|
|
517
517
|
"devDependencies": {
|
|
518
|
-
"@storm-software/testing-tools": "^1.119.
|
|
519
|
-
"@stryke/types": "^0.10.
|
|
518
|
+
"@storm-software/testing-tools": "^1.119.92",
|
|
519
|
+
"@stryke/types": "^0.10.48",
|
|
520
520
|
"@types/diff-match-patch": "^1.0.36",
|
|
521
|
-
"@types/node": "^25.3.
|
|
521
|
+
"@types/node": "^25.3.5",
|
|
522
522
|
"@types/semver": "^7.7.1",
|
|
523
523
|
"tsdown": "^0.17.2",
|
|
524
524
|
"typescript": "^5.9.3"
|
|
525
525
|
},
|
|
526
526
|
"publishConfig": { "access": "public" },
|
|
527
|
-
"gitHead": "
|
|
527
|
+
"gitHead": "50b8a5ce8e5dbafd182ff7c8659469af86eef47c"
|
|
528
528
|
}
|