@powerlines/plugin-typedoc 0.10.17 → 0.10.18

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.
@@ -28,6 +28,73 @@ interface BuildConfig {
28
28
  * @defaultValue "neutral"
29
29
  */
30
30
  platform?: "node" | "browser" | "neutral";
31
+ /**
32
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
33
+ *
34
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
35
+ */
36
+ mainFields?: string[];
37
+ /**
38
+ * Array of strings indicating what conditions should be used for module resolution.
39
+ */
40
+ conditions?: string[];
41
+ /**
42
+ * Array of strings indicating what file extensions should be used for module resolution.
43
+ *
44
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
45
+ */
46
+ extensions?: string[];
47
+ /**
48
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
49
+ *
50
+ * @remarks
51
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
52
+ */
53
+ dedupe?: string[];
54
+ /**
55
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
56
+ */
57
+ builtins?: (string | RegExp)[];
58
+ /**
59
+ * Define global variable replacements.
60
+ *
61
+ * @remarks
62
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * {
67
+ * define: {
68
+ * __VERSION__: '"1.0.0"',
69
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
70
+ * }
71
+ * }
72
+ * ```
73
+ *
74
+ * @see https://esbuild.github.io/api/#define
75
+ * @see https://vitejs.dev/config/build-options.html#define
76
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
77
+ */
78
+ define?: Record<string, any>;
79
+ /**
80
+ * Global variables that will have import statements injected where necessary
81
+ *
82
+ * @remarks
83
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * {
88
+ * inject: {
89
+ * process: 'process/browser',
90
+ * Buffer: ['buffer', 'Buffer'],
91
+ * }
92
+ * }
93
+ * ```
94
+ *
95
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
96
+ */
97
+ inject?: Record<string, string | string[]>;
31
98
  /**
32
99
  * The alias mappings to use for module resolution during the build process.
33
100
  *
@@ -43,6 +110,8 @@ interface BuildConfig {
43
110
  * }
44
111
  * }
45
112
  * ```
113
+ *
114
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
46
115
  */
47
116
  alias?: Record<string, string>;
48
117
  /**
@@ -61,13 +130,14 @@ interface BuildConfig {
61
130
  */
62
131
  skipNodeModulesBundle?: boolean;
63
132
  /**
64
- * Should the Powerlines processes skip the `"prepare"` task prior to building?
133
+ * An optional set of override options to apply to the selected build variant.
65
134
  *
66
- * @defaultValue false
135
+ * @remarks
136
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
67
137
  */
68
- skipPrepare?: boolean;
138
+ override?: Record<string, any>;
69
139
  }
70
- type BuildResolvedConfig = BuildConfig;
140
+ type BuildResolvedConfig = Omit<BuildConfig, "override">;
71
141
 
72
142
  type ReflectionMode = "default" | "explicit" | "never";
73
143
  type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
@@ -643,24 +713,33 @@ interface BaseConfig {
643
713
  * The entry point(s) for the application
644
714
  */
645
715
  entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
716
+ /**
717
+ * Configuration for the output of the build process
718
+ */
719
+ output?: OutputConfig;
646
720
  /**
647
721
  * Configuration for linting the source code
722
+ *
723
+ * @remarks
724
+ * If set to `false`, linting will be disabled.
648
725
  */
649
726
  lint?: Record<string, any> | false;
650
727
  /**
651
728
  * Configuration for testing the source code
729
+ *
730
+ * @remarks
731
+ * If set to `false`, testing will be disabled.
652
732
  */
653
733
  test?: Record<string, any> | false;
654
- /**
655
- * Configuration for the output of the build process
656
- */
657
- output?: OutputConfig;
658
734
  /**
659
735
  * Configuration for the transformation of the source code
660
736
  */
661
737
  transform?: Record<string, any>;
662
738
  /**
663
- * Options to to provide to the build process
739
+ * Configuration provided to build processes
740
+ *
741
+ * @remarks
742
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
664
743
  */
665
744
  build?: BuildConfig;
666
745
  /**
@@ -690,37 +769,6 @@ interface BaseConfig {
690
769
  tsconfigRaw?: TSConfig;
691
770
  }
692
771
  interface EnvironmentConfig extends BaseConfig {
693
- /**
694
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
695
- *
696
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
697
- */
698
- mainFields?: string[];
699
- /**
700
- * Array of strings indicating what conditions should be used for module resolution.
701
- */
702
- conditions?: string[];
703
- /**
704
- * Array of strings indicating what conditions should be used for external modules.
705
- */
706
- externalConditions?: string[];
707
- /**
708
- * Array of strings indicating what file extensions should be used for module resolution.
709
- *
710
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
711
- */
712
- extensions?: string[];
713
- /**
714
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
715
- *
716
- * @remarks
717
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
718
- */
719
- dedupe?: string[];
720
- /**
721
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
722
- */
723
- builtins?: (string | RegExp)[];
724
772
  /**
725
773
  * Configuration options for the preview server
726
774
  */
@@ -793,14 +841,26 @@ interface CommonUserConfig extends BaseConfig {
793
841
  */
794
842
  framework?: string;
795
843
  }
796
- type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
797
- build?: TBuildConfig & {
844
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
845
+ /**
846
+ * Configuration provided to build processes
847
+ *
848
+ * @remarks
849
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
850
+ */
851
+ build: Omit<TBuildConfig, "override"> & {
798
852
  /**
799
853
  * The build variant being used by the Powerlines engine.
800
854
  */
801
855
  variant?: TBuildVariant;
856
+ /**
857
+ * An optional set of override options to apply to the selected build variant.
858
+ *
859
+ * @remarks
860
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
861
+ */
862
+ override?: Partial<TBuildResolvedConfig>;
802
863
  };
803
- override?: Partial<TBuildResolvedConfig>;
804
864
  };
805
865
  type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
806
866
  /**
@@ -823,7 +883,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
823
883
  */
824
884
  output?: string;
825
885
  }
826
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview" | "mainFields" | "extensions"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr" | "mainFields" | "extensions">> & {
886
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
827
887
  /**
828
888
  * The name of the environment
829
889
  */
@@ -840,7 +900,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
840
900
  /**
841
901
  * The resolved options for the Powerlines project configuration.
842
902
  */
843
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "framework">> & {
903
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "framework">> & {
844
904
  /**
845
905
  * The configuration options that were provided inline to the Powerlines CLI.
846
906
  */
@@ -871,6 +931,13 @@ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserCon
871
931
  * The output configuration options to use for the build process
872
932
  */
873
933
  output: OutputResolvedConfig;
934
+ /**
935
+ * Configuration provided to build processes
936
+ *
937
+ * @remarks
938
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
939
+ */
940
+ build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
874
941
  /**
875
942
  * The log level to use for the Powerlines processes.
876
943
  *
@@ -924,7 +991,13 @@ interface InitContextOptions {
924
991
  */
925
992
  isHighPriority: boolean;
926
993
  }
927
- interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
994
+ /**
995
+ * The unresolved Powerlines context.
996
+ *
997
+ * @remarks
998
+ * This context is used before the user configuration has been fully resolved after the `config`.
999
+ */
1000
+ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
928
1001
  /**
929
1002
  * The Storm workspace configuration
930
1003
  */
@@ -932,7 +1005,10 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
932
1005
  /**
933
1006
  * An object containing the options provided to Powerlines
934
1007
  */
935
- config: TResolvedConfig;
1008
+ config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1009
+ projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1010
+ output: TResolvedConfig["output"];
1011
+ };
936
1012
  /**
937
1013
  * A logging function for the Powerlines engine
938
1014
  */
@@ -1089,6 +1165,12 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1089
1165
  */
1090
1166
  extendLog: (name: string) => LogFn;
1091
1167
  }
1168
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1169
+ /**
1170
+ * The fully resolved Powerlines configuration
1171
+ */
1172
+ config: TResolvedConfig;
1173
+ };
1092
1174
  interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1093
1175
  /**
1094
1176
  * The environment specific resolved configuration
@@ -1129,6 +1211,10 @@ interface GenerateTypesResult {
1129
1211
  directives?: string[];
1130
1212
  code: string;
1131
1213
  }
1214
+ type DeepPartial<T> = {
1215
+ [K in keyof T]?: DeepPartial<T[K]>;
1216
+ };
1217
+ type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
1132
1218
  interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
1133
1219
  /**
1134
1220
  * A function that returns configuration options to be merged with the build context's options.
@@ -1144,7 +1230,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1144
1230
  * @param config - The partial configuration object to be modified.
1145
1231
  * @returns A promise that resolves to a partial configuration object.
1146
1232
  */
1147
- config: (this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>;
1233
+ config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
1148
1234
  /**
1149
1235
  * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
1150
1236
  *
@@ -1247,7 +1333,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1247
1333
  * @param config - The partial configuration object to be modified.
1248
1334
  * @returns A promise that resolves to a partial configuration object.
1249
1335
  */
1250
- config: PluginHook<(this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>> | Partial<TContext["config"]["userConfig"]>;
1336
+ config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
1251
1337
  /**
1252
1338
  * A hook that is called to transform the source code.
1253
1339
  *
@@ -28,6 +28,73 @@ interface BuildConfig {
28
28
  * @defaultValue "neutral"
29
29
  */
30
30
  platform?: "node" | "browser" | "neutral";
31
+ /**
32
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
33
+ *
34
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
35
+ */
36
+ mainFields?: string[];
37
+ /**
38
+ * Array of strings indicating what conditions should be used for module resolution.
39
+ */
40
+ conditions?: string[];
41
+ /**
42
+ * Array of strings indicating what file extensions should be used for module resolution.
43
+ *
44
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
45
+ */
46
+ extensions?: string[];
47
+ /**
48
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
49
+ *
50
+ * @remarks
51
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
52
+ */
53
+ dedupe?: string[];
54
+ /**
55
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
56
+ */
57
+ builtins?: (string | RegExp)[];
58
+ /**
59
+ * Define global variable replacements.
60
+ *
61
+ * @remarks
62
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * {
67
+ * define: {
68
+ * __VERSION__: '"1.0.0"',
69
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
70
+ * }
71
+ * }
72
+ * ```
73
+ *
74
+ * @see https://esbuild.github.io/api/#define
75
+ * @see https://vitejs.dev/config/build-options.html#define
76
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
77
+ */
78
+ define?: Record<string, any>;
79
+ /**
80
+ * Global variables that will have import statements injected where necessary
81
+ *
82
+ * @remarks
83
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * {
88
+ * inject: {
89
+ * process: 'process/browser',
90
+ * Buffer: ['buffer', 'Buffer'],
91
+ * }
92
+ * }
93
+ * ```
94
+ *
95
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
96
+ */
97
+ inject?: Record<string, string | string[]>;
31
98
  /**
32
99
  * The alias mappings to use for module resolution during the build process.
33
100
  *
@@ -43,6 +110,8 @@ interface BuildConfig {
43
110
  * }
44
111
  * }
45
112
  * ```
113
+ *
114
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
46
115
  */
47
116
  alias?: Record<string, string>;
48
117
  /**
@@ -61,13 +130,14 @@ interface BuildConfig {
61
130
  */
62
131
  skipNodeModulesBundle?: boolean;
63
132
  /**
64
- * Should the Powerlines processes skip the `"prepare"` task prior to building?
133
+ * An optional set of override options to apply to the selected build variant.
65
134
  *
66
- * @defaultValue false
135
+ * @remarks
136
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
67
137
  */
68
- skipPrepare?: boolean;
138
+ override?: Record<string, any>;
69
139
  }
70
- type BuildResolvedConfig = BuildConfig;
140
+ type BuildResolvedConfig = Omit<BuildConfig, "override">;
71
141
 
72
142
  type ReflectionMode = "default" | "explicit" | "never";
73
143
  type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
@@ -643,24 +713,33 @@ interface BaseConfig {
643
713
  * The entry point(s) for the application
644
714
  */
645
715
  entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
716
+ /**
717
+ * Configuration for the output of the build process
718
+ */
719
+ output?: OutputConfig;
646
720
  /**
647
721
  * Configuration for linting the source code
722
+ *
723
+ * @remarks
724
+ * If set to `false`, linting will be disabled.
648
725
  */
649
726
  lint?: Record<string, any> | false;
650
727
  /**
651
728
  * Configuration for testing the source code
729
+ *
730
+ * @remarks
731
+ * If set to `false`, testing will be disabled.
652
732
  */
653
733
  test?: Record<string, any> | false;
654
- /**
655
- * Configuration for the output of the build process
656
- */
657
- output?: OutputConfig;
658
734
  /**
659
735
  * Configuration for the transformation of the source code
660
736
  */
661
737
  transform?: Record<string, any>;
662
738
  /**
663
- * Options to to provide to the build process
739
+ * Configuration provided to build processes
740
+ *
741
+ * @remarks
742
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
664
743
  */
665
744
  build?: BuildConfig;
666
745
  /**
@@ -690,37 +769,6 @@ interface BaseConfig {
690
769
  tsconfigRaw?: TSConfig;
691
770
  }
692
771
  interface EnvironmentConfig extends BaseConfig {
693
- /**
694
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
695
- *
696
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
697
- */
698
- mainFields?: string[];
699
- /**
700
- * Array of strings indicating what conditions should be used for module resolution.
701
- */
702
- conditions?: string[];
703
- /**
704
- * Array of strings indicating what conditions should be used for external modules.
705
- */
706
- externalConditions?: string[];
707
- /**
708
- * Array of strings indicating what file extensions should be used for module resolution.
709
- *
710
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
711
- */
712
- extensions?: string[];
713
- /**
714
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
715
- *
716
- * @remarks
717
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
718
- */
719
- dedupe?: string[];
720
- /**
721
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
722
- */
723
- builtins?: (string | RegExp)[];
724
772
  /**
725
773
  * Configuration options for the preview server
726
774
  */
@@ -793,14 +841,26 @@ interface CommonUserConfig extends BaseConfig {
793
841
  */
794
842
  framework?: string;
795
843
  }
796
- type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
797
- build?: TBuildConfig & {
844
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
845
+ /**
846
+ * Configuration provided to build processes
847
+ *
848
+ * @remarks
849
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
850
+ */
851
+ build: Omit<TBuildConfig, "override"> & {
798
852
  /**
799
853
  * The build variant being used by the Powerlines engine.
800
854
  */
801
855
  variant?: TBuildVariant;
856
+ /**
857
+ * An optional set of override options to apply to the selected build variant.
858
+ *
859
+ * @remarks
860
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
861
+ */
862
+ override?: Partial<TBuildResolvedConfig>;
802
863
  };
803
- override?: Partial<TBuildResolvedConfig>;
804
864
  };
805
865
  type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
806
866
  /**
@@ -823,7 +883,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
823
883
  */
824
884
  output?: string;
825
885
  }
826
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview" | "mainFields" | "extensions"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr" | "mainFields" | "extensions">> & {
886
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
827
887
  /**
828
888
  * The name of the environment
829
889
  */
@@ -840,7 +900,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
840
900
  /**
841
901
  * The resolved options for the Powerlines project configuration.
842
902
  */
843
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "framework">> & {
903
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "framework">> & {
844
904
  /**
845
905
  * The configuration options that were provided inline to the Powerlines CLI.
846
906
  */
@@ -871,6 +931,13 @@ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserCon
871
931
  * The output configuration options to use for the build process
872
932
  */
873
933
  output: OutputResolvedConfig;
934
+ /**
935
+ * Configuration provided to build processes
936
+ *
937
+ * @remarks
938
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
939
+ */
940
+ build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
874
941
  /**
875
942
  * The log level to use for the Powerlines processes.
876
943
  *
@@ -924,7 +991,13 @@ interface InitContextOptions {
924
991
  */
925
992
  isHighPriority: boolean;
926
993
  }
927
- interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
994
+ /**
995
+ * The unresolved Powerlines context.
996
+ *
997
+ * @remarks
998
+ * This context is used before the user configuration has been fully resolved after the `config`.
999
+ */
1000
+ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
928
1001
  /**
929
1002
  * The Storm workspace configuration
930
1003
  */
@@ -932,7 +1005,10 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
932
1005
  /**
933
1006
  * An object containing the options provided to Powerlines
934
1007
  */
935
- config: TResolvedConfig;
1008
+ config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1009
+ projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1010
+ output: TResolvedConfig["output"];
1011
+ };
936
1012
  /**
937
1013
  * A logging function for the Powerlines engine
938
1014
  */
@@ -1089,6 +1165,12 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1089
1165
  */
1090
1166
  extendLog: (name: string) => LogFn;
1091
1167
  }
1168
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1169
+ /**
1170
+ * The fully resolved Powerlines configuration
1171
+ */
1172
+ config: TResolvedConfig;
1173
+ };
1092
1174
  interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1093
1175
  /**
1094
1176
  * The environment specific resolved configuration
@@ -1129,6 +1211,10 @@ interface GenerateTypesResult {
1129
1211
  directives?: string[];
1130
1212
  code: string;
1131
1213
  }
1214
+ type DeepPartial<T> = {
1215
+ [K in keyof T]?: DeepPartial<T[K]>;
1216
+ };
1217
+ type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
1132
1218
  interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
1133
1219
  /**
1134
1220
  * A function that returns configuration options to be merged with the build context's options.
@@ -1144,7 +1230,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
1144
1230
  * @param config - The partial configuration object to be modified.
1145
1231
  * @returns A promise that resolves to a partial configuration object.
1146
1232
  */
1147
- config: (this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>;
1233
+ config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
1148
1234
  /**
1149
1235
  * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
1150
1236
  *
@@ -1247,7 +1333,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1247
1333
  * @param config - The partial configuration object to be modified.
1248
1334
  * @returns A promise that resolves to a partial configuration object.
1249
1335
  */
1250
- config: PluginHook<(this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>> | Partial<TContext["config"]["userConfig"]>;
1336
+ config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
1251
1337
  /**
1252
1338
  * A hook that is called to transform the source code.
1253
1339
  *
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TypeDocPluginOptions, P as Plugin, a as TypeDocPluginContext } from './index-DBJ4x2zK.cjs';
2
- export { G as GenerateDocsOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from './index-DBJ4x2zK.cjs';
1
+ import { T as TypeDocPluginOptions, P as Plugin, a as TypeDocPluginContext } from './index-DH2iPNev.cjs';
2
+ export { G as GenerateDocsOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from './index-DH2iPNev.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TypeDocPluginOptions, P as Plugin, a as TypeDocPluginContext } from './index-DBJ4x2zK.js';
2
- export { G as GenerateDocsOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from './index-DBJ4x2zK.js';
1
+ import { T as TypeDocPluginOptions, P as Plugin, a as TypeDocPluginContext } from './index-DH2iPNev.js';
2
+ export { G as GenerateDocsOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from './index-DH2iPNev.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -1,4 +1,4 @@
1
- export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DBJ4x2zK.cjs';
1
+ export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DH2iPNev.cjs';
2
2
  import '@storm-software/build-tools/types';
3
3
  import '@storm-software/config-tools/types';
4
4
  import '@storm-software/config/types';
@@ -1,4 +1,4 @@
1
- export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DBJ4x2zK.js';
1
+ export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DH2iPNev.js';
2
2
  import '@storm-software/build-tools/types';
3
3
  import '@storm-software/config-tools/types';
4
4
  import '@storm-software/config/types';
@@ -1,4 +1,4 @@
1
- export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DBJ4x2zK.cjs';
1
+ export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DH2iPNev.cjs';
2
2
  import 'typedoc';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -1,4 +1,4 @@
1
- export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DBJ4x2zK.js';
1
+ export { G as GenerateDocsOptions, a as TypeDocPluginContext, T as TypeDocPluginOptions, c as TypeDocPluginResolvedConfig, b as TypeDocPluginUserConfig } from '../index-DH2iPNev.js';
2
2
  import 'typedoc';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-typedoc",
3
- "version": "0.10.17",
3
+ "version": "0.10.18",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for running TypeDoc on the codebase.",
6
6
  "repository": {
@@ -91,16 +91,16 @@
91
91
  "@storm-software/config-tools": "^1.188.40",
92
92
  "@stryke/fs": "^0.32.13",
93
93
  "@stryke/path": "^0.19.2",
94
- "powerlines": "^0.19.5",
94
+ "powerlines": "^0.20.0",
95
95
  "typedoc": "0.25.12",
96
96
  "typedoc-plugin-markdown": "4.0.0-next.20"
97
97
  },
98
98
  "devDependencies": {
99
- "@powerlines/nx": "^0.10.9",
99
+ "@powerlines/nx": "^0.10.10",
100
100
  "@storm-software/tsup": "^0.2.38",
101
101
  "@types/node": "^22.19.1",
102
102
  "tsup": "8.4.0"
103
103
  },
104
104
  "publishConfig": { "access": "public" },
105
- "gitHead": "041609f2ea8770273cff82b402e3abdc3fcd9133"
105
+ "gitHead": "e33924ab31dbf508b8983523edbaecffeebbee4f"
106
106
  }