@powerlines/plugin-env 0.15.8 → 0.15.10
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/babel/plugin.cjs +1 -1
- package/dist/babel/plugin.mjs +1 -1
- package/dist/helpers/load.cjs +2 -2
- package/dist/helpers/load.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/plugin-alloy/src/core/components/source-file.cjs +1 -1
- package/dist/plugin-alloy/src/core/components/source-file.mjs +1 -1
- package/dist/plugin-alloy/src/index.cjs +12 -5
- package/dist/plugin-alloy/src/index.mjs +12 -5
- package/dist/plugin-alloy/src/types/components.d.cts +2 -5
- package/dist/plugin-alloy/src/types/components.d.mts +2 -5
- package/dist/plugin-alloy/src/types/index.d.cts +1 -1
- package/dist/plugin-alloy/src/types/index.d.mts +1 -1
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +1 -1
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +1 -1
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +23 -5
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +1 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +1 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +24 -6
- package/dist/plugin-automd/src/index.cjs +2 -2
- package/dist/plugin-automd/src/index.mjs +1 -1
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -1
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -1
- package/dist/plugin-babel/src/index.cjs +4 -7
- package/dist/plugin-babel/src/index.mjs +2 -5
- package/dist/powerlines/src/api.d.mts +2 -2
- package/dist/powerlines/src/index.d.mts +8 -5
- package/dist/powerlines/src/internal/helpers/hooks.cjs +37 -19
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +47 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +46 -2
- package/dist/powerlines/src/internal/helpers/hooks.mjs +37 -20
- package/dist/powerlines/src/lib/build/esbuild.cjs +2 -2
- package/dist/powerlines/src/lib/build/esbuild.mjs +2 -2
- package/dist/powerlines/src/lib/entry.cjs +1 -1
- package/dist/powerlines/src/lib/entry.mjs +1 -1
- package/dist/powerlines/src/types/api.cjs +62 -1
- package/dist/powerlines/src/types/api.d.cts +104 -0
- package/dist/powerlines/src/types/api.d.mts +104 -5
- package/dist/powerlines/src/types/api.mjs +61 -2
- package/dist/powerlines/src/types/build.cjs +26 -4
- package/dist/powerlines/src/types/build.d.cts +43 -3
- package/dist/powerlines/src/types/build.d.mts +42 -4
- package/dist/powerlines/src/types/build.mjs +23 -3
- package/dist/powerlines/src/types/config.cjs +107 -0
- package/dist/powerlines/src/types/config.d.cts +60 -4
- package/dist/powerlines/src/types/config.d.mts +61 -5
- package/dist/powerlines/src/types/config.mjs +99 -1
- package/dist/powerlines/src/types/context.cjs +57 -0
- package/dist/powerlines/src/types/context.d.cts +113 -1
- package/dist/powerlines/src/types/context.d.mts +113 -3
- package/dist/powerlines/src/types/context.mjs +54 -1
- package/dist/powerlines/src/types/hooks.cjs +33 -14
- package/dist/powerlines/src/types/hooks.d.cts +32 -0
- package/dist/powerlines/src/types/hooks.d.mts +32 -2
- package/dist/powerlines/src/types/hooks.mjs +32 -12
- package/dist/powerlines/src/types/index.cjs +3 -3
- package/dist/powerlines/src/types/index.d.mts +8 -8
- package/dist/powerlines/src/types/index.mjs +7 -7
- package/dist/powerlines/src/types/plugin.cjs +40 -105
- package/dist/powerlines/src/types/plugin.d.cts +35 -61
- package/dist/powerlines/src/types/plugin.d.mts +35 -61
- package/dist/powerlines/src/types/plugin.mjs +40 -102
- package/dist/powerlines/src/types/resolved.d.cts +16 -4
- package/dist/powerlines/src/types/resolved.d.mts +16 -5
- package/dist/powerlines/src/types/unplugin.cjs +47 -1
- package/dist/powerlines/src/types/unplugin.d.cts +22 -0
- package/dist/powerlines/src/types/unplugin.d.mts +22 -6
- package/dist/powerlines/src/types/unplugin.mjs +45 -2
- package/package.json +9 -9
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.cjs";
|
|
2
|
+
import { Plugin } from "./plugin.cjs";
|
|
3
|
+
import { HooksList, InferHooksListItem } from "./hooks.cjs";
|
|
2
4
|
import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
|
|
3
5
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.cjs";
|
|
4
6
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.cjs";
|
|
@@ -60,6 +62,9 @@ interface TransformResult$1 {
|
|
|
60
62
|
code: string;
|
|
61
63
|
map: SourceMap | null;
|
|
62
64
|
}
|
|
65
|
+
interface SelectHooksOptions {
|
|
66
|
+
order?: "pre" | "post" | "normal";
|
|
67
|
+
}
|
|
63
68
|
/**
|
|
64
69
|
* Options for initializing or updating the context with new configuration values
|
|
65
70
|
*/
|
|
@@ -396,6 +401,112 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<Unr
|
|
|
396
401
|
*/
|
|
397
402
|
config: TResolvedConfig;
|
|
398
403
|
};
|
|
404
|
+
interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
405
|
+
/**
|
|
406
|
+
* The expected plugins options for the Powerlines project.
|
|
407
|
+
*
|
|
408
|
+
* @remarks
|
|
409
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
410
|
+
*/
|
|
411
|
+
plugins: Plugin<PluginContext<TResolvedConfig>>[];
|
|
412
|
+
/**
|
|
413
|
+
* A function to add a plugin to the context and update the configuration options
|
|
414
|
+
*/
|
|
415
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
416
|
+
/**
|
|
417
|
+
* A table for storing the current context for each configured environment
|
|
418
|
+
*/
|
|
419
|
+
environments: Record<string, EnvironmentContext<TResolvedConfig>>;
|
|
420
|
+
/**
|
|
421
|
+
* Retrieves the context for a specific environment by name
|
|
422
|
+
*
|
|
423
|
+
* @throws Will throw an error if the environment does not exist
|
|
424
|
+
*
|
|
425
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
426
|
+
* @returns A promise that resolves to the environment context.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```ts
|
|
430
|
+
* const devEnv = await apiContext.getEnvironment("development");
|
|
431
|
+
* const defaultEnv = await apiContext.getEnvironment();
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
435
|
+
/**
|
|
436
|
+
* Safely retrieves the context for a specific environment by name
|
|
437
|
+
*
|
|
438
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
439
|
+
* @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```ts
|
|
443
|
+
* const devEnv = await apiContext.getEnvironmentSafe("development");
|
|
444
|
+
* const defaultEnv = await apiContext.getEnvironmentSafe();
|
|
445
|
+
* ```
|
|
446
|
+
*
|
|
447
|
+
* @remarks
|
|
448
|
+
* This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
|
|
449
|
+
* This can be useful in scenarios where the existence of an environment is optional or uncertain.
|
|
450
|
+
*
|
|
451
|
+
* ```ts
|
|
452
|
+
* const testEnv = await apiContext.getEnvironmentSafe("test");
|
|
453
|
+
* if (testEnv) {
|
|
454
|
+
* // Environment exists, safe to use it
|
|
455
|
+
* } else {
|
|
456
|
+
* // Environment does not exist, handle accordingly
|
|
457
|
+
* }
|
|
458
|
+
* ```
|
|
459
|
+
*
|
|
460
|
+
* Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
|
|
461
|
+
*/
|
|
462
|
+
getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
|
|
463
|
+
/**
|
|
464
|
+
* A function to copy the context and update the fields for a specific environment
|
|
465
|
+
*
|
|
466
|
+
* @param environment - The environment configuration to use.
|
|
467
|
+
* @returns A new context instance with the updated environment.
|
|
468
|
+
*/
|
|
469
|
+
in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
470
|
+
/**
|
|
471
|
+
* A function to merge all configured environments into a single context
|
|
472
|
+
*
|
|
473
|
+
* @returns A promise that resolves to the merged environment context.
|
|
474
|
+
*/
|
|
475
|
+
toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
476
|
+
}
|
|
477
|
+
interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
478
|
+
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
479
|
+
context: PluginContext<TResolvedConfig>;
|
|
480
|
+
}
|
|
481
|
+
type SelectHookResultItem<TContext extends PluginContext, TKey extends string> = InferHooksListItem<TContext, TKey> & {
|
|
482
|
+
context: TContext;
|
|
483
|
+
};
|
|
484
|
+
type SelectHookResult<TContext extends PluginContext, TKey extends string> = SelectHookResultItem<TContext, TKey>[];
|
|
485
|
+
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
486
|
+
/**
|
|
487
|
+
* The expected plugins options for the Powerlines project.
|
|
488
|
+
*
|
|
489
|
+
* @remarks
|
|
490
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
491
|
+
*/
|
|
492
|
+
plugins: EnvironmentContextPlugin<TResolvedConfig>[];
|
|
493
|
+
/**
|
|
494
|
+
* A function to add a plugin to the context and update the configuration options
|
|
495
|
+
*/
|
|
496
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* The environment specific resolved configuration
|
|
499
|
+
*/
|
|
500
|
+
environment: EnvironmentResolvedConfig;
|
|
501
|
+
/**
|
|
502
|
+
* A table holding references to hook functions registered by plugins
|
|
503
|
+
*/
|
|
504
|
+
hooks: HooksList<PluginContext<TResolvedConfig>>;
|
|
505
|
+
/**
|
|
506
|
+
* Retrieves the hook handlers for a specific hook name
|
|
507
|
+
*/
|
|
508
|
+
selectHooks: <TKey extends string>(key: TKey, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig>, TKey>;
|
|
509
|
+
}
|
|
399
510
|
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
400
511
|
/**
|
|
401
512
|
* The environment specific resolved configuration
|
|
@@ -410,5 +521,6 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
410
521
|
logger: LogFn;
|
|
411
522
|
}
|
|
412
523
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
524
|
+
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
413
525
|
//#endregion
|
|
414
|
-
export { BuildPluginContext, Context, LogLevel, PluginContext, UnresolvedContext };
|
|
526
|
+
export { APIContext, BuildPluginContext, Context, EnvironmentContext, LogLevel, PluginContext, SelectHooksOptions, UnresolvedContext, WithUnpluginBuildContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
|
-
import "./plugin.mjs";
|
|
3
|
-
import "./hooks.mjs";
|
|
2
|
+
import { Plugin } from "./plugin.mjs";
|
|
3
|
+
import { HooksList, InferHooksListItem } from "./hooks.mjs";
|
|
4
4
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
5
5
|
import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.mjs";
|
|
6
6
|
import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
|
|
@@ -62,6 +62,9 @@ interface TransformResult$1 {
|
|
|
62
62
|
code: string;
|
|
63
63
|
map: SourceMap | null;
|
|
64
64
|
}
|
|
65
|
+
interface SelectHooksOptions {
|
|
66
|
+
order?: "pre" | "post" | "normal";
|
|
67
|
+
}
|
|
65
68
|
/**
|
|
66
69
|
* Options for initializing or updating the context with new configuration values
|
|
67
70
|
*/
|
|
@@ -398,6 +401,112 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<Unr
|
|
|
398
401
|
*/
|
|
399
402
|
config: TResolvedConfig;
|
|
400
403
|
};
|
|
404
|
+
interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
405
|
+
/**
|
|
406
|
+
* The expected plugins options for the Powerlines project.
|
|
407
|
+
*
|
|
408
|
+
* @remarks
|
|
409
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
410
|
+
*/
|
|
411
|
+
plugins: Plugin<PluginContext<TResolvedConfig>>[];
|
|
412
|
+
/**
|
|
413
|
+
* A function to add a plugin to the context and update the configuration options
|
|
414
|
+
*/
|
|
415
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
416
|
+
/**
|
|
417
|
+
* A table for storing the current context for each configured environment
|
|
418
|
+
*/
|
|
419
|
+
environments: Record<string, EnvironmentContext<TResolvedConfig>>;
|
|
420
|
+
/**
|
|
421
|
+
* Retrieves the context for a specific environment by name
|
|
422
|
+
*
|
|
423
|
+
* @throws Will throw an error if the environment does not exist
|
|
424
|
+
*
|
|
425
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
426
|
+
* @returns A promise that resolves to the environment context.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```ts
|
|
430
|
+
* const devEnv = await apiContext.getEnvironment("development");
|
|
431
|
+
* const defaultEnv = await apiContext.getEnvironment();
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
435
|
+
/**
|
|
436
|
+
* Safely retrieves the context for a specific environment by name
|
|
437
|
+
*
|
|
438
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
439
|
+
* @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```ts
|
|
443
|
+
* const devEnv = await apiContext.getEnvironmentSafe("development");
|
|
444
|
+
* const defaultEnv = await apiContext.getEnvironmentSafe();
|
|
445
|
+
* ```
|
|
446
|
+
*
|
|
447
|
+
* @remarks
|
|
448
|
+
* This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
|
|
449
|
+
* This can be useful in scenarios where the existence of an environment is optional or uncertain.
|
|
450
|
+
*
|
|
451
|
+
* ```ts
|
|
452
|
+
* const testEnv = await apiContext.getEnvironmentSafe("test");
|
|
453
|
+
* if (testEnv) {
|
|
454
|
+
* // Environment exists, safe to use it
|
|
455
|
+
* } else {
|
|
456
|
+
* // Environment does not exist, handle accordingly
|
|
457
|
+
* }
|
|
458
|
+
* ```
|
|
459
|
+
*
|
|
460
|
+
* Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
|
|
461
|
+
*/
|
|
462
|
+
getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
|
|
463
|
+
/**
|
|
464
|
+
* A function to copy the context and update the fields for a specific environment
|
|
465
|
+
*
|
|
466
|
+
* @param environment - The environment configuration to use.
|
|
467
|
+
* @returns A new context instance with the updated environment.
|
|
468
|
+
*/
|
|
469
|
+
in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
470
|
+
/**
|
|
471
|
+
* A function to merge all configured environments into a single context
|
|
472
|
+
*
|
|
473
|
+
* @returns A promise that resolves to the merged environment context.
|
|
474
|
+
*/
|
|
475
|
+
toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
476
|
+
}
|
|
477
|
+
interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
478
|
+
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
479
|
+
context: PluginContext<TResolvedConfig>;
|
|
480
|
+
}
|
|
481
|
+
type SelectHookResultItem<TContext extends PluginContext, TKey extends string> = InferHooksListItem<TContext, TKey> & {
|
|
482
|
+
context: TContext;
|
|
483
|
+
};
|
|
484
|
+
type SelectHookResult<TContext extends PluginContext, TKey extends string> = SelectHookResultItem<TContext, TKey>[];
|
|
485
|
+
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
486
|
+
/**
|
|
487
|
+
* The expected plugins options for the Powerlines project.
|
|
488
|
+
*
|
|
489
|
+
* @remarks
|
|
490
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
491
|
+
*/
|
|
492
|
+
plugins: EnvironmentContextPlugin<TResolvedConfig>[];
|
|
493
|
+
/**
|
|
494
|
+
* A function to add a plugin to the context and update the configuration options
|
|
495
|
+
*/
|
|
496
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* The environment specific resolved configuration
|
|
499
|
+
*/
|
|
500
|
+
environment: EnvironmentResolvedConfig;
|
|
501
|
+
/**
|
|
502
|
+
* A table holding references to hook functions registered by plugins
|
|
503
|
+
*/
|
|
504
|
+
hooks: HooksList<PluginContext<TResolvedConfig>>;
|
|
505
|
+
/**
|
|
506
|
+
* Retrieves the hook handlers for a specific hook name
|
|
507
|
+
*/
|
|
508
|
+
selectHooks: <TKey extends string>(key: TKey, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig>, TKey>;
|
|
509
|
+
}
|
|
401
510
|
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
402
511
|
/**
|
|
403
512
|
* The environment specific resolved configuration
|
|
@@ -412,5 +521,6 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
412
521
|
logger: LogFn;
|
|
413
522
|
}
|
|
414
523
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
524
|
+
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
415
525
|
//#endregion
|
|
416
|
-
export { BuildPluginContext, Context, EmitEntryOptions, EmitOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult$1 as TransformResult, UnresolvedContext };
|
|
526
|
+
export { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, TransformResult$1 as TransformResult, UnresolvedContext, WithUnpluginBuildContext };
|
|
@@ -293,6 +293,59 @@ const __ΩContext = [
|
|
|
293
293
|
"Context",
|
|
294
294
|
"\"w!c\"Pe\"!o$\".%o##Pe#!4&?'MKw(y"
|
|
295
295
|
];
|
|
296
|
+
const __ΩEnvironmentContextPlugin = [
|
|
297
|
+
"ResolvedConfig",
|
|
298
|
+
"TResolvedConfig",
|
|
299
|
+
"Plugin",
|
|
300
|
+
"plugin",
|
|
301
|
+
() => __ΩPluginContext,
|
|
302
|
+
"context",
|
|
303
|
+
"EnvironmentContextPlugin",
|
|
304
|
+
"\"w!c\"P\"w#4$e\"!o%\"4&Mw'y"
|
|
305
|
+
];
|
|
306
|
+
const __ΩSelectHookResultItem = [
|
|
307
|
+
"TContext",
|
|
308
|
+
"TKey",
|
|
309
|
+
"InferHooksListItem",
|
|
310
|
+
"context",
|
|
311
|
+
"SelectHookResultItem",
|
|
312
|
+
"b!b\"P\"w#Pe#!4$MKw%y"
|
|
313
|
+
];
|
|
314
|
+
const __ΩSelectHookResult = [
|
|
315
|
+
"TContext",
|
|
316
|
+
"TKey",
|
|
317
|
+
() => __ΩSelectHookResultItem,
|
|
318
|
+
"SelectHookResult",
|
|
319
|
+
"b!b\"e!!e!\"o##Fw$y"
|
|
320
|
+
];
|
|
321
|
+
const __ΩEnvironmentContext = [
|
|
322
|
+
"ResolvedConfig",
|
|
323
|
+
"TResolvedConfig",
|
|
324
|
+
() => __ΩContext,
|
|
325
|
+
() => __ΩEnvironmentContextPlugin,
|
|
326
|
+
"plugins",
|
|
327
|
+
"The expected plugins options for the Powerlines project.",
|
|
328
|
+
"Plugin",
|
|
329
|
+
"plugin",
|
|
330
|
+
"",
|
|
331
|
+
"addPlugin",
|
|
332
|
+
"A function to add a plugin to the context and update the configuration options",
|
|
333
|
+
"EnvironmentResolvedConfig",
|
|
334
|
+
"environment",
|
|
335
|
+
"The environment specific resolved configuration",
|
|
336
|
+
"HooksList",
|
|
337
|
+
"hooks",
|
|
338
|
+
"A table holding references to hook functions registered by plugins",
|
|
339
|
+
"key",
|
|
340
|
+
() => __ΩSelectHooksOptions,
|
|
341
|
+
"options",
|
|
342
|
+
() => __ΩSelectHookResult,
|
|
343
|
+
() => __ΩPluginContext,
|
|
344
|
+
"selectHooks",
|
|
345
|
+
"Retrieves the hook handlers for a specific hook name",
|
|
346
|
+
"EnvironmentContext",
|
|
347
|
+
"\"w!c\"Pe\"!o#\"e\"!o$\"F4%?&P\"w'2($`/)4*?+\"w,4-?.\"w/40?1P\"22n3248e#!o6\"\"o5#/)47?8Mw9y"
|
|
348
|
+
];
|
|
296
349
|
const __ΩPluginContext = [
|
|
297
350
|
"ResolvedConfig",
|
|
298
351
|
"TResolvedConfig",
|
|
@@ -308,4 +361,4 @@ const __ΩPluginContext = [
|
|
|
308
361
|
];
|
|
309
362
|
|
|
310
363
|
//#endregion
|
|
311
|
-
export { __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩFetchOptions, __ΩInitContextOptions, __ΩLogLevel, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHooksOptions, __ΩTransformResult, __ΩUnresolvedContext };
|
|
364
|
+
export { __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩFetchOptions, __ΩInitContextOptions, __ΩLogLevel, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩTransformResult, __ΩUnresolvedContext };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
const require_build = require('./build.cjs');
|
|
1
2
|
|
|
2
3
|
//#region ../powerlines/src/types/hooks.ts
|
|
4
|
+
const __ΩRequired = [
|
|
5
|
+
"T",
|
|
6
|
+
"Required",
|
|
7
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
8
|
+
];
|
|
3
9
|
const __ΩReturnType = [
|
|
4
10
|
"T",
|
|
5
11
|
"args",
|
|
@@ -14,39 +20,52 @@ const __ΩParameters = [
|
|
|
14
20
|
"Parameters",
|
|
15
21
|
"l>e\"!R!RPde#!Ph\"!@2\"\"/#qk#'QRb!Pde\"!p)w$y"
|
|
16
22
|
];
|
|
17
|
-
const __Ω
|
|
23
|
+
const __ΩUnpluginHookFunctions = [
|
|
18
24
|
"PluginContext",
|
|
19
25
|
"TContext",
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
26
|
+
() => require_build.__ΩUnpluginBuilderVariant,
|
|
27
|
+
"TUnpluginBuilderVariant",
|
|
28
|
+
() => __ΩRequired,
|
|
29
|
+
"TField",
|
|
30
|
+
() => __ΩRequired,
|
|
31
|
+
"handler",
|
|
32
|
+
"this",
|
|
33
|
+
"args",
|
|
34
|
+
"",
|
|
35
|
+
"WithUnpluginBuildContext",
|
|
36
|
+
"UnpluginHookFunctions",
|
|
37
|
+
"l½PPe$!\"w,K2)e#\"@2*e##/+RPPe$!\"w,K2)e#\"@2*e##/+R!RPddde#!Ph\"!2)h\"\"@2*h\"#/+qk:QQRPde#!pSR!RPde#!Ph\"!4(MqkqyQRPde%!p{RPddde#!Ph\"!2)h\"\"@2*h\"#/+qk#QRPde#!pR!R\"w!c\"n#c$!o%\"e!\"fgc&Pd!o'\"e\"\"fe\"#fPh\"!Ph#!4(MJqk³»Qw-y"
|
|
23
38
|
];
|
|
24
|
-
const __Ω
|
|
39
|
+
const __ΩInferHookFunction = [
|
|
25
40
|
"TContext",
|
|
26
41
|
"TKey",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
":",
|
|
43
|
+
() => require_build.__ΩUnpluginBuilderVariant,
|
|
44
|
+
() => __ΩRequired,
|
|
45
|
+
() => __ΩUnpluginHookFunctions,
|
|
46
|
+
"PluginHookFunctions",
|
|
47
|
+
"InferHookFunction",
|
|
48
|
+
"le-!e(!e$!o&$R!RPe#!!o%\"e'!fgqk#0QRPde'\"p2R!RPe#!n$qkEMQRPde#!pOR\"w'e$!fR!RPe#!\"w'gqkckQRPde%!pmRPdde#!Ph\"!.#h\"\"Sqk[{QRb!b\"Pde\"\"pw(y"
|
|
30
49
|
];
|
|
31
50
|
const __ΩInferHookReturnType = [
|
|
32
51
|
"TContext",
|
|
33
52
|
"TKey",
|
|
34
53
|
() => __ΩReturnType,
|
|
35
|
-
() => __Ω
|
|
54
|
+
() => __ΩInferHookFunction,
|
|
36
55
|
"InferHookReturnType",
|
|
37
|
-
"
|
|
56
|
+
"b!b\"e!!e!\"o$#o#\"w%y"
|
|
38
57
|
];
|
|
39
58
|
const __ΩInferHookParameters = [
|
|
40
59
|
"TContext",
|
|
41
60
|
"TKey",
|
|
42
61
|
() => __ΩParameters,
|
|
43
|
-
() => __Ω
|
|
62
|
+
() => __ΩInferHookFunction,
|
|
44
63
|
"InferHookParameters",
|
|
45
64
|
"b!b\"e!!e!\"o$#o#\"w%y"
|
|
46
65
|
];
|
|
47
66
|
|
|
48
67
|
//#endregion
|
|
49
|
-
exports.__Ω
|
|
50
|
-
exports.__ΩInferHookHandler = __ΩInferHookHandler;
|
|
68
|
+
exports.__ΩInferHookFunction = __ΩInferHookFunction;
|
|
51
69
|
exports.__ΩInferHookParameters = __ΩInferHookParameters;
|
|
52
|
-
exports.__ΩInferHookReturnType = __ΩInferHookReturnType;
|
|
70
|
+
exports.__ΩInferHookReturnType = __ΩInferHookReturnType;
|
|
71
|
+
exports.__ΩUnpluginHookFunctions = __ΩUnpluginHookFunctions;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UnpluginBuilderVariant } from "./build.cjs";
|
|
2
|
+
import { Plugin, PluginHookFields, PluginHookFunctions } from "./plugin.cjs";
|
|
3
|
+
import { PluginContext, WithUnpluginBuildContext } from "./context.cjs";
|
|
4
|
+
import { UnpluginOptions } from "unplugin";
|
|
5
|
+
|
|
6
|
+
//#region ../powerlines/src/types/hooks.d.ts
|
|
7
|
+
type HookListOrders = "preOrdered" | "preEnforced" | "normal" | "postEnforced" | "postOrdered";
|
|
8
|
+
type UnpluginHookFunctions<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> = Required<UnpluginOptions>[TUnpluginBuilderVariant$1][TField$1] extends infer THandler | {
|
|
9
|
+
handler: infer THandler;
|
|
10
|
+
} ? THandler extends ((this: infer THandlerOriginalContext, ...args: infer THandlerArgs) => infer THandlerReturn) ? (this: THandlerOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerArgs) => THandlerReturn : THandler extends {
|
|
11
|
+
handler: infer THandlerFunction;
|
|
12
|
+
} ? THandlerFunction extends ((this: infer THandlerFunctionOriginalContext, ...args: infer THandlerFunctionArgs) => infer THandlerFunctionReturn) ? (this: THandlerFunctionOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerFunctionArgs) => THandlerFunctionReturn : never : never : never;
|
|
13
|
+
interface PluginHooksListItem<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> {
|
|
14
|
+
plugin: Plugin<TContext>;
|
|
15
|
+
handler: PluginHookFunctions<TContext>[TFields];
|
|
16
|
+
}
|
|
17
|
+
type PluginHooksList<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> = { [TKey in HookListOrders]?: PluginHooksListItem<TContext, TFields>[] | undefined };
|
|
18
|
+
interface UnpluginHooksListItem<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> {
|
|
19
|
+
plugin: Plugin<TContext>;
|
|
20
|
+
handler: UnpluginHookFunctions<TContext, TUnpluginBuilderVariant$1, TField$1>;
|
|
21
|
+
}
|
|
22
|
+
type UnpluginHookList<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof UnpluginOptions[TUnpluginBuilderVariant$1] = keyof UnpluginOptions[TUnpluginBuilderVariant$1]> = { [TKey in HookListOrders]?: UnpluginHooksListItem<TContext, TUnpluginBuilderVariant$1, TField$1>[] | undefined };
|
|
23
|
+
type UnpluginHookVariantField<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant> = { [TKey in keyof UnpluginOptions[TUnpluginBuilderVariant$1]]?: UnpluginHookList<TContext, TUnpluginBuilderVariant$1, TKey> };
|
|
24
|
+
type UnpluginHookVariant<TContext extends PluginContext = PluginContext> = { [TKey in UnpluginBuilderVariant]?: UnpluginHookVariantField<TContext, TKey> };
|
|
25
|
+
type HookFields<TContext extends PluginContext = PluginContext> = PluginHookFields<TContext> | UnpluginBuilderVariant;
|
|
26
|
+
type HooksList<TContext extends PluginContext = PluginContext> = { [TField in HookFields<TContext>]?: TField extends PluginHookFields<TContext> ? PluginHooksList<TContext, TField> : TField extends UnpluginBuilderVariant ? UnpluginHookVariant<TContext>[TField] : never };
|
|
27
|
+
type InferHooksListItem<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHooksListItem<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHooksListItem<TContext, TKey$1> : never;
|
|
28
|
+
type InferHookFunction<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHookFunctions<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHookFunctions<TContext>[TKey$1] : never;
|
|
29
|
+
type InferHookReturnType<TContext extends PluginContext, TKey$1 extends string> = ReturnType<InferHookFunction<TContext, TKey$1>>;
|
|
30
|
+
type InferHookParameters<TContext extends PluginContext, TKey$1 extends string> = Parameters<InferHookFunction<TContext, TKey$1>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { HooksList, InferHookParameters, InferHookReturnType, InferHooksListItem };
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
1
|
+
import { UnpluginBuilderVariant } from "./build.mjs";
|
|
2
|
+
import { Plugin, PluginHookFields, PluginHookFunctions } from "./plugin.mjs";
|
|
3
|
+
import { PluginContext, WithUnpluginBuildContext } from "./context.mjs";
|
|
4
|
+
import { UnpluginOptions } from "unplugin";
|
|
5
|
+
|
|
6
|
+
//#region ../powerlines/src/types/hooks.d.ts
|
|
7
|
+
type HookListOrders = "preOrdered" | "preEnforced" | "normal" | "postEnforced" | "postOrdered";
|
|
8
|
+
type UnpluginHookFunctions<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> = Required<UnpluginOptions>[TUnpluginBuilderVariant$1][TField$1] extends infer THandler | {
|
|
9
|
+
handler: infer THandler;
|
|
10
|
+
} ? THandler extends ((this: infer THandlerOriginalContext, ...args: infer THandlerArgs) => infer THandlerReturn) ? (this: THandlerOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerArgs) => THandlerReturn : THandler extends {
|
|
11
|
+
handler: infer THandlerFunction;
|
|
12
|
+
} ? THandlerFunction extends ((this: infer THandlerFunctionOriginalContext, ...args: infer THandlerFunctionArgs) => infer THandlerFunctionReturn) ? (this: THandlerFunctionOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerFunctionArgs) => THandlerFunctionReturn : never : never : never;
|
|
13
|
+
interface PluginHooksListItem<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> {
|
|
14
|
+
plugin: Plugin<TContext>;
|
|
15
|
+
handler: PluginHookFunctions<TContext>[TFields];
|
|
16
|
+
}
|
|
17
|
+
type PluginHooksList<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> = { [TKey in HookListOrders]?: PluginHooksListItem<TContext, TFields>[] | undefined };
|
|
18
|
+
interface UnpluginHooksListItem<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> {
|
|
19
|
+
plugin: Plugin<TContext>;
|
|
20
|
+
handler: UnpluginHookFunctions<TContext, TUnpluginBuilderVariant$1, TField$1>;
|
|
21
|
+
}
|
|
22
|
+
type UnpluginHookList<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof UnpluginOptions[TUnpluginBuilderVariant$1] = keyof UnpluginOptions[TUnpluginBuilderVariant$1]> = { [TKey in HookListOrders]?: UnpluginHooksListItem<TContext, TUnpluginBuilderVariant$1, TField$1>[] | undefined };
|
|
23
|
+
type UnpluginHookVariantField<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant> = { [TKey in keyof UnpluginOptions[TUnpluginBuilderVariant$1]]?: UnpluginHookList<TContext, TUnpluginBuilderVariant$1, TKey> };
|
|
24
|
+
type UnpluginHookVariant<TContext extends PluginContext = PluginContext> = { [TKey in UnpluginBuilderVariant]?: UnpluginHookVariantField<TContext, TKey> };
|
|
25
|
+
type HookFields<TContext extends PluginContext = PluginContext> = PluginHookFields<TContext> | UnpluginBuilderVariant;
|
|
26
|
+
type HooksList<TContext extends PluginContext = PluginContext> = { [TField in HookFields<TContext>]?: TField extends PluginHookFields<TContext> ? PluginHooksList<TContext, TField> : TField extends UnpluginBuilderVariant ? UnpluginHookVariant<TContext>[TField] : never };
|
|
27
|
+
type InferHooksListItem<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHooksListItem<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHooksListItem<TContext, TKey$1> : never;
|
|
28
|
+
type InferHookFunction<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHookFunctions<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHookFunctions<TContext>[TKey$1] : never;
|
|
29
|
+
type InferHookReturnType<TContext extends PluginContext, TKey$1 extends string> = ReturnType<InferHookFunction<TContext, TKey$1>>;
|
|
30
|
+
type InferHookParameters<TContext extends PluginContext, TKey$1 extends string> = Parameters<InferHookFunction<TContext, TKey$1>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { __ΩUnpluginBuilderVariant } from "./build.mjs";
|
|
2
|
+
|
|
1
3
|
//#region ../powerlines/src/types/hooks.ts
|
|
4
|
+
const __ΩRequired = [
|
|
5
|
+
"T",
|
|
6
|
+
"Required",
|
|
7
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
8
|
+
];
|
|
2
9
|
const __ΩReturnType = [
|
|
3
10
|
"T",
|
|
4
11
|
"args",
|
|
@@ -13,36 +20,49 @@ const __ΩParameters = [
|
|
|
13
20
|
"Parameters",
|
|
14
21
|
"l>e\"!R!RPde#!Ph\"!@2\"\"/#qk#'QRb!Pde\"!p)w$y"
|
|
15
22
|
];
|
|
16
|
-
const __Ω
|
|
23
|
+
const __ΩUnpluginHookFunctions = [
|
|
17
24
|
"PluginContext",
|
|
18
25
|
"TContext",
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
26
|
+
() => __ΩUnpluginBuilderVariant,
|
|
27
|
+
"TUnpluginBuilderVariant",
|
|
28
|
+
() => __ΩRequired,
|
|
29
|
+
"TField",
|
|
30
|
+
() => __ΩRequired,
|
|
31
|
+
"handler",
|
|
32
|
+
"this",
|
|
33
|
+
"args",
|
|
34
|
+
"",
|
|
35
|
+
"WithUnpluginBuildContext",
|
|
36
|
+
"UnpluginHookFunctions",
|
|
37
|
+
"l½PPe$!\"w,K2)e#\"@2*e##/+RPPe$!\"w,K2)e#\"@2*e##/+R!RPddde#!Ph\"!2)h\"\"@2*h\"#/+qk:QQRPde#!pSR!RPde#!Ph\"!4(MqkqyQRPde%!p{RPddde#!Ph\"!2)h\"\"@2*h\"#/+qk#QRPde#!pR!R\"w!c\"n#c$!o%\"e!\"fgc&Pd!o'\"e\"\"fe\"#fPh\"!Ph#!4(MJqk³»Qw-y"
|
|
22
38
|
];
|
|
23
|
-
const __Ω
|
|
39
|
+
const __ΩInferHookFunction = [
|
|
24
40
|
"TContext",
|
|
25
41
|
"TKey",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
":",
|
|
43
|
+
() => __ΩUnpluginBuilderVariant,
|
|
44
|
+
() => __ΩRequired,
|
|
45
|
+
() => __ΩUnpluginHookFunctions,
|
|
46
|
+
"PluginHookFunctions",
|
|
47
|
+
"InferHookFunction",
|
|
48
|
+
"le-!e(!e$!o&$R!RPe#!!o%\"e'!fgqk#0QRPde'\"p2R!RPe#!n$qkEMQRPde#!pOR\"w'e$!fR!RPe#!\"w'gqkckQRPde%!pmRPdde#!Ph\"!.#h\"\"Sqk[{QRb!b\"Pde\"\"pw(y"
|
|
29
49
|
];
|
|
30
50
|
const __ΩInferHookReturnType = [
|
|
31
51
|
"TContext",
|
|
32
52
|
"TKey",
|
|
33
53
|
() => __ΩReturnType,
|
|
34
|
-
() => __Ω
|
|
54
|
+
() => __ΩInferHookFunction,
|
|
35
55
|
"InferHookReturnType",
|
|
36
|
-
"
|
|
56
|
+
"b!b\"e!!e!\"o$#o#\"w%y"
|
|
37
57
|
];
|
|
38
58
|
const __ΩInferHookParameters = [
|
|
39
59
|
"TContext",
|
|
40
60
|
"TKey",
|
|
41
61
|
() => __ΩParameters,
|
|
42
|
-
() => __Ω
|
|
62
|
+
() => __ΩInferHookFunction,
|
|
43
63
|
"InferHookParameters",
|
|
44
64
|
"b!b\"e!!e!\"o$#o#\"w%y"
|
|
45
65
|
];
|
|
46
66
|
|
|
47
67
|
//#endregion
|
|
48
|
-
export { __Ω
|
|
68
|
+
export { __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩUnpluginHookFunctions };
|
|
@@ -3,9 +3,9 @@ const require_config = require('./config.cjs');
|
|
|
3
3
|
const require_resolved = require('./resolved.cjs');
|
|
4
4
|
const require_context = require('./context.cjs');
|
|
5
5
|
const require_build = require('./build.cjs');
|
|
6
|
+
const require_hooks = require('./hooks.cjs');
|
|
7
|
+
const require_api = require('./api.cjs');
|
|
8
|
+
const require_unplugin = require('./unplugin.cjs');
|
|
6
9
|
const require_commands = require('./commands.cjs');
|
|
7
10
|
const require_plugin = require('./plugin.cjs');
|
|
8
11
|
const require_babel = require('./babel.cjs');
|
|
9
|
-
const require_hooks = require('./hooks.cjs');
|
|
10
|
-
require('./api.cjs');
|
|
11
|
-
require('./unplugin.cjs');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileMetadata, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
|
-
import { BuildConfig, BuildResolvedConfig,
|
|
2
|
+
import { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupBuildOutputConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.mjs";
|
|
3
3
|
import { CommandType, SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
4
|
+
import { API } from "./api.mjs";
|
|
5
|
+
import { InferUnpluginOptions, UnpluginOptions } from "./unplugin.mjs";
|
|
6
|
+
import { Plugin, PluginHook, PluginHookFields, PluginHookFunctions, PluginHookObject, PluginHooks, TypesResult } from "./plugin.mjs";
|
|
7
|
+
import { HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem } from "./hooks.mjs";
|
|
6
8
|
import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig } from "./tsconfig.mjs";
|
|
7
|
-
import { BuildPluginContext, Context, EmitEntryOptions, EmitOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult, UnresolvedContext } from "./context.mjs";
|
|
9
|
+
import { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, TransformResult, UnresolvedContext, WithUnpluginBuildContext } from "./context.mjs";
|
|
8
10
|
import { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, DeclareBabelTransformPluginReturn } from "./babel.mjs";
|
|
9
|
-
import { BabelUserConfig, BaseConfig, CommonUserConfig, DeployConfig, EnvironmentConfig, InlineConfig, LogFn, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, ProjectType, UserConfig, WorkspaceConfig } from "./config.mjs";
|
|
10
|
-
import { BabelResolvedConfig, EnvironmentResolvedConfig, OutputResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
|
|
11
|
-
import "./api.mjs";
|
|
12
|
-
import "./unplugin.mjs";
|
|
11
|
+
import { BabelUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, CommonUserConfig, DeployConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig } from "./config.mjs";
|
|
12
|
+
import { BabelResolvedConfig, ESBuildResolvedConfig, EnvironmentResolvedConfig, FarmResolvedConfig, InferResolvedConfig, OutputResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, RolldownResolvedConfig, RollupResolvedConfig, RspackResolvedConfig, TsdownResolvedConfig, TsupResolvedConfig, UnbuildResolvedConfig, ViteResolvedConfig, WebpackResolvedConfig } from "./resolved.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset } from "./fs.mjs";
|
|
2
|
-
import { __ΩBabelUserConfig, __ΩBaseConfig, __ΩCommonUserConfig, __ΩDeployConfig, __ΩEnvironmentConfig, __ΩLogFn, __ΩOutputConfig, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩProjectType, __ΩUserConfig, __ΩWorkspaceConfig } from "./config.mjs";
|
|
2
|
+
import { __ΩBabelUserConfig, __ΩBaseConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩCommonUserConfig, __ΩDeployConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEnvironmentConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩNewInlineConfig, __ΩOutputConfig, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩUserConfig, __ΩWorkspaceConfig } from "./config.mjs";
|
|
3
3
|
import { __ΩBabelResolvedConfig, __ΩOutputResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEntryTypeDefinition } from "./resolved.mjs";
|
|
4
|
-
import { __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩFetchOptions, __ΩInitContextOptions, __ΩLogLevel, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHooksOptions, __ΩTransformResult, __ΩUnresolvedContext } from "./context.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩFetchOptions, __ΩInitContextOptions, __ΩLogLevel, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩTransformResult, __ΩUnresolvedContext } from "./context.mjs";
|
|
5
|
+
import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS, __ΩBuildConfig, __ΩBuildResolvedConfig, __ΩESBuildResolvedBuildConfig, __ΩUnpluginBuilderVariant } from "./build.mjs";
|
|
6
|
+
import { __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩUnpluginHookFunctions } from "./hooks.mjs";
|
|
7
|
+
import { __ΩAPI } from "./api.mjs";
|
|
8
|
+
import { __ΩInferUnpluginOptions, __ΩUnpluginOptions } from "./unplugin.mjs";
|
|
6
9
|
import { SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
7
|
-
import {
|
|
10
|
+
import { PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, __ΩPlugin, __ΩPluginHook, __ΩPluginHookFunctions, __ΩPluginHookObject, __ΩPluginHooks } from "./plugin.mjs";
|
|
8
11
|
import { __ΩBabelPluginPass, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩDeclareBabelTransformPluginReturn, __ΩImportSpecifier, __ΩResolvedBabelTransformPluginOptions } from "./babel.mjs";
|
|
9
|
-
import { __ΩHooks, __ΩInferHookHandler, __ΩInferHookParameters, __ΩInferHookReturnType } from "./hooks.mjs";
|
|
10
|
-
import "./api.mjs";
|
|
11
|
-
import "./unplugin.mjs";
|
|
12
12
|
|
|
13
13
|
export { };
|