@powerlines/core 0.13.11 → 0.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/api.cjs +16 -0
- package/dist/constants/api.d.cts +5 -0
- package/dist/constants/api.d.cts.map +1 -0
- package/dist/constants/api.d.mts +5 -0
- package/dist/constants/api.d.mts.map +1 -0
- package/dist/constants/api.mjs +16 -0
- package/dist/constants/api.mjs.map +1 -0
- package/dist/constants/commands.cjs +2 -11
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.cts.map +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.d.mts.map +1 -1
- package/dist/constants/commands.mjs +3 -11
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/index.cjs +2 -0
- package/dist/constants/index.d.cts +2 -1
- package/dist/constants/index.d.mts +2 -1
- package/dist/constants/index.mjs +2 -1
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/lib/config.cjs +17 -28
- package/dist/lib/config.d.cts +6 -11
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +6 -11
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +17 -28
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/entry.cjs +4 -4
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +4 -4
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/logger.cjs +1 -1
- package/dist/lib/logger.d.cts.map +1 -1
- package/dist/lib/logger.d.mts.map +1 -1
- package/dist/lib/logger.mjs +1 -1
- package/dist/lib/logger.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +1 -1
- package/dist/lib/unplugin/plugin.mjs +1 -1
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +3 -3
- package/dist/lib/utilities/format.d.cts.map +1 -1
- package/dist/lib/utilities/format.d.mts.map +1 -1
- package/dist/lib/utilities/format.mjs +3 -3
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/plugin-base.cjs +2 -2
- package/dist/plugin-base.mjs +2 -2
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +8 -5
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +1 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +8 -5
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +32 -32
- package/dist/plugin-utils/get-config-path.mjs +32 -32
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.d.cts +4 -4
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +4 -4
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/paths.cjs +1 -1
- package/dist/plugin-utils/paths.mjs +1 -1
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/types/_internal.d.cts +6 -6
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.mts +6 -6
- package/dist/types/_internal.d.mts.map +1 -1
- package/dist/types/api.d.cts +62 -9
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +62 -9
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +89 -56
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +89 -56
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +101 -62
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +101 -62
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/index.d.cts +4 -3
- package/dist/types/index.d.mts +4 -3
- package/dist/types/utils.d.cts +9 -0
- package/dist/types/utils.d.cts.map +1 -0
- package/dist/types/utils.d.mts +9 -0
- package/dist/types/utils.d.mts.map +1 -0
- package/package.json +8 -8
package/dist/types/config.d.cts
CHANGED
|
@@ -5,12 +5,12 @@ import { PluginContext } from "./context.cjs";
|
|
|
5
5
|
import { Format } from "@storm-software/build-tools/types";
|
|
6
6
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
7
7
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
8
|
-
import { DeepPartial, MaybePromise, NonUndefined } from "@stryke/types/base";
|
|
8
|
+
import { DeepPartial, MaybePromise, NonUndefined, PartialKeys } from "@stryke/types/base";
|
|
9
9
|
import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
10
10
|
import { AssetGlob } from "@stryke/types/file";
|
|
11
11
|
import { ConfigLayer, ResolvedConfig } from "c12";
|
|
12
12
|
import { CompatibilityDateSpec, CompatibilityDates } from "compatx";
|
|
13
|
-
import { PreviewOptions,
|
|
13
|
+
import { PreviewOptions, ResolvedPreviewOptions } from "vite";
|
|
14
14
|
|
|
15
15
|
//#region src/types/config.d.ts
|
|
16
16
|
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
@@ -207,6 +207,15 @@ interface OutputConfig {
|
|
|
207
207
|
* This option can be a boolean or a string specifying the type of source map to generate. If set to `true`, external source maps will be generated. If set to `"inline"`, source maps will be included in the output files as data URIs. If set to `"hidden"`, external source maps will be generated but not referenced in the output files.
|
|
208
208
|
*/
|
|
209
209
|
sourceMap?: boolean | "inline" | "hidden";
|
|
210
|
+
/**
|
|
211
|
+
* Minify the output files
|
|
212
|
+
*
|
|
213
|
+
* @remarks
|
|
214
|
+
* This option can be a boolean or a string specifying the type of minification to apply. If set to `true`, the output files will be minified. If set to `"terser"`, the Terser minifier will be used. If set to `"esbuild"`, the esbuild minifier will be used.
|
|
215
|
+
*
|
|
216
|
+
* @defaultValue false
|
|
217
|
+
*/
|
|
218
|
+
minify?: boolean;
|
|
210
219
|
/**
|
|
211
220
|
* Whether to overwrite previously generated files in the artifacts directory during the build process.
|
|
212
221
|
*
|
|
@@ -230,6 +239,53 @@ interface OutputConfig {
|
|
|
230
239
|
*/
|
|
231
240
|
storage?: StoragePort | StoragePreset;
|
|
232
241
|
}
|
|
242
|
+
interface EngineOptions {
|
|
243
|
+
/**
|
|
244
|
+
* The root directory of the project
|
|
245
|
+
*/
|
|
246
|
+
root: string;
|
|
247
|
+
/**
|
|
248
|
+
* The current working directory the Powerlines processes should operate in
|
|
249
|
+
*
|
|
250
|
+
* @remarks
|
|
251
|
+
* If not provided, the {@link WorkspaceConfig.workspaceRoot | workspace root} will be used as the current working directory. If the workspace root cannot be determined, the process's current working directory will be used.
|
|
252
|
+
*/
|
|
253
|
+
cwd?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
256
|
+
*
|
|
257
|
+
* @defaultValue "production"
|
|
258
|
+
*/
|
|
259
|
+
mode?: "development" | "test" | "production";
|
|
260
|
+
/**
|
|
261
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
262
|
+
*
|
|
263
|
+
* @remarks
|
|
264
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
265
|
+
*
|
|
266
|
+
* @defaultValue "powerlines"
|
|
267
|
+
*/
|
|
268
|
+
framework?: string;
|
|
269
|
+
/**
|
|
270
|
+
* The organization or author of the project
|
|
271
|
+
*/
|
|
272
|
+
organization?: string;
|
|
273
|
+
/**
|
|
274
|
+
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
275
|
+
*
|
|
276
|
+
* @remarks
|
|
277
|
+
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
278
|
+
*/
|
|
279
|
+
configFile?: string;
|
|
280
|
+
}
|
|
281
|
+
type ResolvedEngineOptions = PartialKeys<Required<EngineOptions>, "organization" | "configFile">;
|
|
282
|
+
interface ExecutionOptions extends EngineOptions {
|
|
283
|
+
/**
|
|
284
|
+
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
285
|
+
*/
|
|
286
|
+
configIndex: number;
|
|
287
|
+
}
|
|
288
|
+
type ResolvedExecutionOptions = Pick<ExecutionOptions, "configIndex"> & ResolvedEngineOptions;
|
|
233
289
|
interface Config {
|
|
234
290
|
/**
|
|
235
291
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
@@ -324,11 +380,7 @@ interface EnvironmentConfig extends Config {
|
|
|
324
380
|
*/
|
|
325
381
|
consumer?: "client" | "server";
|
|
326
382
|
}
|
|
327
|
-
interface UserConfig extends Config {
|
|
328
|
-
/**
|
|
329
|
-
* The root directory of the project
|
|
330
|
-
*/
|
|
331
|
-
root: string;
|
|
383
|
+
interface UserConfig extends Config, ExecutionOptions {
|
|
332
384
|
/**
|
|
333
385
|
* The name of the project
|
|
334
386
|
*/
|
|
@@ -375,25 +427,12 @@ interface UserConfig extends Config {
|
|
|
375
427
|
* A custom logger function to use for logging messages
|
|
376
428
|
*/
|
|
377
429
|
customLogger?: LogFn;
|
|
378
|
-
/**
|
|
379
|
-
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
380
|
-
*
|
|
381
|
-
* @defaultValue "production"
|
|
382
|
-
*/
|
|
383
|
-
mode?: "development" | "test" | "production";
|
|
384
430
|
/**
|
|
385
431
|
* The type of project being built
|
|
386
432
|
*
|
|
387
433
|
* @defaultValue "application"
|
|
388
434
|
*/
|
|
389
435
|
projectType?: ProjectType;
|
|
390
|
-
/**
|
|
391
|
-
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
392
|
-
*
|
|
393
|
-
* @remarks
|
|
394
|
-
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
395
|
-
*/
|
|
396
|
-
configFile?: string;
|
|
397
436
|
/**
|
|
398
437
|
* Should the Powerlines processes automatically install missing package dependencies?
|
|
399
438
|
*
|
|
@@ -429,28 +468,7 @@ interface UserConfig extends Config {
|
|
|
429
468
|
* @defaultValue false
|
|
430
469
|
*/
|
|
431
470
|
singleBuild?: boolean;
|
|
432
|
-
/**
|
|
433
|
-
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
434
|
-
*
|
|
435
|
-
* @remarks
|
|
436
|
-
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
437
|
-
*
|
|
438
|
-
* @defaultValue "powerlines"
|
|
439
|
-
*/
|
|
440
|
-
framework?: string;
|
|
441
471
|
}
|
|
442
|
-
type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
443
|
-
root: string;
|
|
444
|
-
};
|
|
445
|
-
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig<TUserConfig> & {
|
|
446
|
-
/**
|
|
447
|
-
* The path to the user configuration file, if it exists.
|
|
448
|
-
*
|
|
449
|
-
* @remarks
|
|
450
|
-
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
451
|
-
*/
|
|
452
|
-
configFile?: ConfigLayer<TUserConfig>["configFile"];
|
|
453
|
-
};
|
|
454
472
|
type PowerlinesCommand = "new" | "types" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
455
473
|
/**
|
|
456
474
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -501,6 +519,12 @@ type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfi
|
|
|
501
519
|
*/
|
|
502
520
|
command: "lint";
|
|
503
521
|
};
|
|
522
|
+
type TestInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
523
|
+
/**
|
|
524
|
+
* A string identifier for the Powerlines command being executed
|
|
525
|
+
*/
|
|
526
|
+
command: "test";
|
|
527
|
+
};
|
|
504
528
|
type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
505
529
|
/**
|
|
506
530
|
* A string identifier for the Powerlines command being executed
|
|
@@ -513,14 +537,7 @@ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineCon
|
|
|
513
537
|
*/
|
|
514
538
|
command: "deploy";
|
|
515
539
|
};
|
|
516
|
-
type
|
|
517
|
-
type UserConfigFn<TUserConfig extends UserConfig = UserConfig> = (params: {
|
|
518
|
-
projectRoot: string;
|
|
519
|
-
workspaceRoot: string;
|
|
520
|
-
mode: string;
|
|
521
|
-
framework: string;
|
|
522
|
-
command?: PowerlinesCommand;
|
|
523
|
-
}) => MaybePromise<TUserConfig>;
|
|
540
|
+
type UserConfigFn<TUserConfig extends UserConfig = UserConfig> = (params: ResolvedEngineOptions) => MaybePromise<TUserConfig>;
|
|
524
541
|
type AnyOutputUserConfig = Partial<Omit<OutputConfig, "copy">> & {
|
|
525
542
|
/**
|
|
526
543
|
* The output configuration options to use for the build process
|
|
@@ -533,7 +550,7 @@ type AnyOutputUserConfig = Partial<Omit<OutputConfig, "copy">> & {
|
|
|
533
550
|
* @remarks
|
|
534
551
|
* This type represents the final shape of the configuration object that will be used throughout the Powerlines processes. It includes all default values, resolved paths, and normalized options. It is expected to be used in `powerlines.config.ts` files and by plugins and build processes to access the configuration options in a consistent format.
|
|
535
552
|
*/
|
|
536
|
-
type AnyUserConfig = (Partial<Omit<
|
|
553
|
+
type AnyUserConfig<TUserConfig extends UserConfig = UserConfig> = (Partial<Omit<TUserConfig, "output" | "resolve">> & {
|
|
537
554
|
/**
|
|
538
555
|
* The output configuration options to use for the build process
|
|
539
556
|
*/
|
|
@@ -542,7 +559,16 @@ type AnyUserConfig = (Partial<Omit<UserConfig, "output" | "resolve">> & {
|
|
|
542
559
|
* Configuration for module resolution during processing of the source code
|
|
543
560
|
*/
|
|
544
561
|
resolve?: Partial<ResolveConfig>;
|
|
545
|
-
} & Record<string, any>) | UserConfigFn;
|
|
562
|
+
} & Record<string, any>) | UserConfigFn<TUserConfig> | AnyUserConfig<TUserConfig>[];
|
|
563
|
+
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<AnyUserConfig<TUserConfig>> & {
|
|
564
|
+
/**
|
|
565
|
+
* The path to the user configuration file, if it exists.
|
|
566
|
+
*
|
|
567
|
+
* @remarks
|
|
568
|
+
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
569
|
+
*/
|
|
570
|
+
configFile?: ConfigLayer<AnyUserConfig<TUserConfig>>["configFile"];
|
|
571
|
+
};
|
|
546
572
|
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
547
573
|
/**
|
|
548
574
|
* The user provided entry point in the source code
|
|
@@ -589,7 +615,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "copy" | "storage">> & P
|
|
|
589
615
|
/**
|
|
590
616
|
* The resolved options for the Powerlines project configuration.
|
|
591
617
|
*/
|
|
592
|
-
type ResolvedConfig$
|
|
618
|
+
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "root" | "cwd" | "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "platform" | "projectType" | "input" | "output" | "resolve" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "root" | "cwd" | "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "input" | "tsconfig" | "platform" | "projectType" | "framework">> & {
|
|
593
619
|
/**
|
|
594
620
|
* The output configuration options to use for the build process
|
|
595
621
|
*/
|
|
@@ -617,6 +643,10 @@ type ResolvedConfig$2<TUserConfig extends UserConfig = UserConfig> = Omit<TUserC
|
|
|
617
643
|
* The original configuration options that were provided by the user to the Powerlines process.
|
|
618
644
|
*/
|
|
619
645
|
userConfig: TUserConfig;
|
|
646
|
+
/**
|
|
647
|
+
* The configuration options that were provided by Powerlines plugins, which may have been merged with the user configuration and modified by the configuration loading process.
|
|
648
|
+
*/
|
|
649
|
+
pluginConfig: Partial<TUserConfig>;
|
|
620
650
|
/**
|
|
621
651
|
* A string identifier for the Powerlines command being executed.
|
|
622
652
|
*/
|
|
@@ -643,11 +673,13 @@ declare type __ΩProjectType = any[];
|
|
|
643
673
|
declare type __ΩResolveConfig = any[];
|
|
644
674
|
declare type __ΩCopyConfig = any[];
|
|
645
675
|
declare type __ΩOutputConfig = any[];
|
|
676
|
+
declare type __ΩEngineOptions = any[];
|
|
677
|
+
declare type __ΩResolvedEngineOptions = any[];
|
|
678
|
+
declare type __ΩExecutionOptions = any[];
|
|
679
|
+
declare type __ΩResolvedExecutionOptions = any[];
|
|
646
680
|
declare type __ΩConfig = any[];
|
|
647
681
|
declare type __ΩEnvironmentConfig = any[];
|
|
648
682
|
declare type __ΩUserConfig = any[];
|
|
649
|
-
declare type __ΩInitialUserConfig = any[];
|
|
650
|
-
declare type __ΩParsedUserConfig = any[];
|
|
651
683
|
declare type __ΩPowerlinesCommand = any[];
|
|
652
684
|
declare type __ΩInlineConfig = any[];
|
|
653
685
|
declare type __ΩNewInlineConfig = any[];
|
|
@@ -656,12 +688,13 @@ declare type __ΩPrepareInlineConfig = any[];
|
|
|
656
688
|
declare type __ΩTypesInlineConfig = any[];
|
|
657
689
|
declare type __ΩBuildInlineConfig = any[];
|
|
658
690
|
declare type __ΩLintInlineConfig = any[];
|
|
691
|
+
declare type __ΩTestInlineConfig = any[];
|
|
659
692
|
declare type __ΩDocsInlineConfig = any[];
|
|
660
693
|
declare type __ΩDeployInlineConfig = any[];
|
|
661
|
-
declare type __ΩConfigEnv = any[];
|
|
662
694
|
declare type __ΩUserConfigFn = any[];
|
|
663
695
|
declare type __ΩAnyOutputUserConfig = any[];
|
|
664
696
|
declare type __ΩAnyUserConfig = any[];
|
|
697
|
+
declare type __ΩParsedUserConfig = any[];
|
|
665
698
|
declare type __ΩResolvedEntryTypeDefinition = any[];
|
|
666
699
|
declare type __ΩEnvironmentResolvedConfig = any[];
|
|
667
700
|
declare type __ΩResolveResolvedConfig = any[];
|
|
@@ -670,5 +703,5 @@ declare type __ΩCopyResolvedConfig = any[];
|
|
|
670
703
|
declare type __ΩOutputResolvedConfig = any[];
|
|
671
704
|
declare type __ΩResolvedConfig = any[];
|
|
672
705
|
//#endregion
|
|
673
|
-
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config,
|
|
706
|
+
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig, LogFn, LogLevel, LogLevelConfig, Logger, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩCopyResolvedConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩLogLevelConfig, __ΩLogger, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEngineOptions, __ΩResolvedEntryTypeDefinition, __ΩResolvedExecutionOptions, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig };
|
|
674
707
|
//# sourceMappingURL=config.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;KAwCY,QAAA;AAAA,KAEA,KAAA,IAAS,IAAA,EAAM,aAAA,KAAkB,IAAA;AAAA,KAEjC,cAAA,GAAiB,MAAA,CAAO,QAAA;AAAA,UAEnB,MAAA;EACf,GAAA,EAAK,KAAA;EACL,KAAA,EAAO,aAAA;AAAA;AANT;;;AAAA,KAYY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,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,GAAU,sBAAA;AAAA;AA5Ed;;;AAAA,KAkFY,qBAAA,GAAwB,QAAA,CAClC,IAAA,CAAK,aAAA;EAnFyD;;;;;;EA2F9D,QAAA;EA3F8D;;;EAgG9D,UAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,SAAA,GAAY,QAAA,CAAS,IAAA,CAAK,SAAA;AAAA,KAE9C,kBAAA,GAAqB,QAAA,CAAS,IAAA,CAAK,UAAA;EAC7C,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,oBAAA,GAAuB,QAAA,CACjC,IAAA,CAAK,YAAA,yBAEL,IAAA,CAAK,YAAA;EACH,IAAA,EAAM,kBAAA;AAAA;;;;KAME,gBAAA,qBAAmC,UAAA,GAAa,UAAA,IAAc,IAAA,CACxE,WAAA,0NAmBA,QAAA,CACE,IAAA,CACE,WAAA;EAjImB;;;EAqJrB,MAAA,EAAQ,oBAAA;EApJV;;;EAyJE,OAAA,EAAS,qBAAA;EAxJgB;AAE7B;;;;;;;;;EAkKI,iBAAA,EAAmB,kBAAA;EAlKW;;;EAuK9B,YAAA,EAAc,YAAA,CAAa,WAAA;EAnKtB;;;EAwKL,UAAA,EAAY,WAAA;EA/JJ;;;EAoKR,YAAA,EAAc,OAAA,CAAQ,WAAA;EApKiC;;;EAyKvD,OAAA,EAAS,YAAA,CAAa,YAAA,CAAa,WAAA;EApKhB;;;;;EA2KnB,QAAA,EAAU,QAAA;AAAA;AAAA"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -6,11 +6,11 @@ import { ConfigLayer, ResolvedConfig } from "c12";
|
|
|
6
6
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
7
7
|
import { Format } from "@storm-software/build-tools/types";
|
|
8
8
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
9
|
-
import { DeepPartial, MaybePromise, NonUndefined } from "@stryke/types/base";
|
|
9
|
+
import { DeepPartial, MaybePromise, NonUndefined, PartialKeys } from "@stryke/types/base";
|
|
10
10
|
import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
11
11
|
import { AssetGlob } from "@stryke/types/file";
|
|
12
12
|
import { CompatibilityDateSpec, CompatibilityDates } from "compatx";
|
|
13
|
-
import { PreviewOptions,
|
|
13
|
+
import { PreviewOptions, ResolvedPreviewOptions } from "vite";
|
|
14
14
|
|
|
15
15
|
//#region src/types/config.d.ts
|
|
16
16
|
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
@@ -207,6 +207,15 @@ interface OutputConfig {
|
|
|
207
207
|
* This option can be a boolean or a string specifying the type of source map to generate. If set to `true`, external source maps will be generated. If set to `"inline"`, source maps will be included in the output files as data URIs. If set to `"hidden"`, external source maps will be generated but not referenced in the output files.
|
|
208
208
|
*/
|
|
209
209
|
sourceMap?: boolean | "inline" | "hidden";
|
|
210
|
+
/**
|
|
211
|
+
* Minify the output files
|
|
212
|
+
*
|
|
213
|
+
* @remarks
|
|
214
|
+
* This option can be a boolean or a string specifying the type of minification to apply. If set to `true`, the output files will be minified. If set to `"terser"`, the Terser minifier will be used. If set to `"esbuild"`, the esbuild minifier will be used.
|
|
215
|
+
*
|
|
216
|
+
* @defaultValue false
|
|
217
|
+
*/
|
|
218
|
+
minify?: boolean;
|
|
210
219
|
/**
|
|
211
220
|
* Whether to overwrite previously generated files in the artifacts directory during the build process.
|
|
212
221
|
*
|
|
@@ -230,6 +239,53 @@ interface OutputConfig {
|
|
|
230
239
|
*/
|
|
231
240
|
storage?: StoragePort | StoragePreset;
|
|
232
241
|
}
|
|
242
|
+
interface EngineOptions {
|
|
243
|
+
/**
|
|
244
|
+
* The root directory of the project
|
|
245
|
+
*/
|
|
246
|
+
root: string;
|
|
247
|
+
/**
|
|
248
|
+
* The current working directory the Powerlines processes should operate in
|
|
249
|
+
*
|
|
250
|
+
* @remarks
|
|
251
|
+
* If not provided, the {@link WorkspaceConfig.workspaceRoot | workspace root} will be used as the current working directory. If the workspace root cannot be determined, the process's current working directory will be used.
|
|
252
|
+
*/
|
|
253
|
+
cwd?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
256
|
+
*
|
|
257
|
+
* @defaultValue "production"
|
|
258
|
+
*/
|
|
259
|
+
mode?: "development" | "test" | "production";
|
|
260
|
+
/**
|
|
261
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
262
|
+
*
|
|
263
|
+
* @remarks
|
|
264
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
265
|
+
*
|
|
266
|
+
* @defaultValue "powerlines"
|
|
267
|
+
*/
|
|
268
|
+
framework?: string;
|
|
269
|
+
/**
|
|
270
|
+
* The organization or author of the project
|
|
271
|
+
*/
|
|
272
|
+
organization?: string;
|
|
273
|
+
/**
|
|
274
|
+
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
275
|
+
*
|
|
276
|
+
* @remarks
|
|
277
|
+
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
278
|
+
*/
|
|
279
|
+
configFile?: string;
|
|
280
|
+
}
|
|
281
|
+
type ResolvedEngineOptions = PartialKeys<Required<EngineOptions>, "organization" | "configFile">;
|
|
282
|
+
interface ExecutionOptions extends EngineOptions {
|
|
283
|
+
/**
|
|
284
|
+
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
285
|
+
*/
|
|
286
|
+
configIndex: number;
|
|
287
|
+
}
|
|
288
|
+
type ResolvedExecutionOptions = Pick<ExecutionOptions, "configIndex"> & ResolvedEngineOptions;
|
|
233
289
|
interface Config {
|
|
234
290
|
/**
|
|
235
291
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
@@ -324,11 +380,7 @@ interface EnvironmentConfig extends Config {
|
|
|
324
380
|
*/
|
|
325
381
|
consumer?: "client" | "server";
|
|
326
382
|
}
|
|
327
|
-
interface UserConfig extends Config {
|
|
328
|
-
/**
|
|
329
|
-
* The root directory of the project
|
|
330
|
-
*/
|
|
331
|
-
root: string;
|
|
383
|
+
interface UserConfig extends Config, ExecutionOptions {
|
|
332
384
|
/**
|
|
333
385
|
* The name of the project
|
|
334
386
|
*/
|
|
@@ -375,25 +427,12 @@ interface UserConfig extends Config {
|
|
|
375
427
|
* A custom logger function to use for logging messages
|
|
376
428
|
*/
|
|
377
429
|
customLogger?: LogFn;
|
|
378
|
-
/**
|
|
379
|
-
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
380
|
-
*
|
|
381
|
-
* @defaultValue "production"
|
|
382
|
-
*/
|
|
383
|
-
mode?: "development" | "test" | "production";
|
|
384
430
|
/**
|
|
385
431
|
* The type of project being built
|
|
386
432
|
*
|
|
387
433
|
* @defaultValue "application"
|
|
388
434
|
*/
|
|
389
435
|
projectType?: ProjectType;
|
|
390
|
-
/**
|
|
391
|
-
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
392
|
-
*
|
|
393
|
-
* @remarks
|
|
394
|
-
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
395
|
-
*/
|
|
396
|
-
configFile?: string;
|
|
397
436
|
/**
|
|
398
437
|
* Should the Powerlines processes automatically install missing package dependencies?
|
|
399
438
|
*
|
|
@@ -429,28 +468,7 @@ interface UserConfig extends Config {
|
|
|
429
468
|
* @defaultValue false
|
|
430
469
|
*/
|
|
431
470
|
singleBuild?: boolean;
|
|
432
|
-
/**
|
|
433
|
-
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
434
|
-
*
|
|
435
|
-
* @remarks
|
|
436
|
-
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
437
|
-
*
|
|
438
|
-
* @defaultValue "powerlines"
|
|
439
|
-
*/
|
|
440
|
-
framework?: string;
|
|
441
471
|
}
|
|
442
|
-
type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
443
|
-
root: string;
|
|
444
|
-
};
|
|
445
|
-
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig<TUserConfig> & {
|
|
446
|
-
/**
|
|
447
|
-
* The path to the user configuration file, if it exists.
|
|
448
|
-
*
|
|
449
|
-
* @remarks
|
|
450
|
-
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
451
|
-
*/
|
|
452
|
-
configFile?: ConfigLayer<TUserConfig>["configFile"];
|
|
453
|
-
};
|
|
454
472
|
type PowerlinesCommand = "new" | "types" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
455
473
|
/**
|
|
456
474
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -501,6 +519,12 @@ type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfi
|
|
|
501
519
|
*/
|
|
502
520
|
command: "lint";
|
|
503
521
|
};
|
|
522
|
+
type TestInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
523
|
+
/**
|
|
524
|
+
* A string identifier for the Powerlines command being executed
|
|
525
|
+
*/
|
|
526
|
+
command: "test";
|
|
527
|
+
};
|
|
504
528
|
type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
505
529
|
/**
|
|
506
530
|
* A string identifier for the Powerlines command being executed
|
|
@@ -513,14 +537,7 @@ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineCon
|
|
|
513
537
|
*/
|
|
514
538
|
command: "deploy";
|
|
515
539
|
};
|
|
516
|
-
type
|
|
517
|
-
type UserConfigFn<TUserConfig extends UserConfig = UserConfig> = (params: {
|
|
518
|
-
projectRoot: string;
|
|
519
|
-
workspaceRoot: string;
|
|
520
|
-
mode: string;
|
|
521
|
-
framework: string;
|
|
522
|
-
command?: PowerlinesCommand;
|
|
523
|
-
}) => MaybePromise<TUserConfig>;
|
|
540
|
+
type UserConfigFn<TUserConfig extends UserConfig = UserConfig> = (params: ResolvedEngineOptions) => MaybePromise<TUserConfig>;
|
|
524
541
|
type AnyOutputUserConfig = Partial<Omit<OutputConfig, "copy">> & {
|
|
525
542
|
/**
|
|
526
543
|
* The output configuration options to use for the build process
|
|
@@ -533,7 +550,7 @@ type AnyOutputUserConfig = Partial<Omit<OutputConfig, "copy">> & {
|
|
|
533
550
|
* @remarks
|
|
534
551
|
* This type represents the final shape of the configuration object that will be used throughout the Powerlines processes. It includes all default values, resolved paths, and normalized options. It is expected to be used in `powerlines.config.ts` files and by plugins and build processes to access the configuration options in a consistent format.
|
|
535
552
|
*/
|
|
536
|
-
type AnyUserConfig = (Partial<Omit<
|
|
553
|
+
type AnyUserConfig<TUserConfig extends UserConfig = UserConfig> = (Partial<Omit<TUserConfig, "output" | "resolve">> & {
|
|
537
554
|
/**
|
|
538
555
|
* The output configuration options to use for the build process
|
|
539
556
|
*/
|
|
@@ -542,7 +559,16 @@ type AnyUserConfig = (Partial<Omit<UserConfig, "output" | "resolve">> & {
|
|
|
542
559
|
* Configuration for module resolution during processing of the source code
|
|
543
560
|
*/
|
|
544
561
|
resolve?: Partial<ResolveConfig>;
|
|
545
|
-
} & Record<string, any>) | UserConfigFn;
|
|
562
|
+
} & Record<string, any>) | UserConfigFn<TUserConfig> | AnyUserConfig<TUserConfig>[];
|
|
563
|
+
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<AnyUserConfig<TUserConfig>> & {
|
|
564
|
+
/**
|
|
565
|
+
* The path to the user configuration file, if it exists.
|
|
566
|
+
*
|
|
567
|
+
* @remarks
|
|
568
|
+
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
569
|
+
*/
|
|
570
|
+
configFile?: ConfigLayer<AnyUserConfig<TUserConfig>>["configFile"];
|
|
571
|
+
};
|
|
546
572
|
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
547
573
|
/**
|
|
548
574
|
* The user provided entry point in the source code
|
|
@@ -589,7 +615,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "copy" | "storage">> & P
|
|
|
589
615
|
/**
|
|
590
616
|
* The resolved options for the Powerlines project configuration.
|
|
591
617
|
*/
|
|
592
|
-
type ResolvedConfig$
|
|
618
|
+
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "root" | "cwd" | "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "platform" | "projectType" | "input" | "output" | "resolve" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "root" | "cwd" | "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "input" | "tsconfig" | "platform" | "projectType" | "framework">> & {
|
|
593
619
|
/**
|
|
594
620
|
* The output configuration options to use for the build process
|
|
595
621
|
*/
|
|
@@ -617,6 +643,10 @@ type ResolvedConfig$2<TUserConfig extends UserConfig = UserConfig> = Omit<TUserC
|
|
|
617
643
|
* The original configuration options that were provided by the user to the Powerlines process.
|
|
618
644
|
*/
|
|
619
645
|
userConfig: TUserConfig;
|
|
646
|
+
/**
|
|
647
|
+
* The configuration options that were provided by Powerlines plugins, which may have been merged with the user configuration and modified by the configuration loading process.
|
|
648
|
+
*/
|
|
649
|
+
pluginConfig: Partial<TUserConfig>;
|
|
620
650
|
/**
|
|
621
651
|
* A string identifier for the Powerlines command being executed.
|
|
622
652
|
*/
|
|
@@ -643,11 +673,13 @@ declare type __ΩProjectType = any[];
|
|
|
643
673
|
declare type __ΩResolveConfig = any[];
|
|
644
674
|
declare type __ΩCopyConfig = any[];
|
|
645
675
|
declare type __ΩOutputConfig = any[];
|
|
676
|
+
declare type __ΩEngineOptions = any[];
|
|
677
|
+
declare type __ΩResolvedEngineOptions = any[];
|
|
678
|
+
declare type __ΩExecutionOptions = any[];
|
|
679
|
+
declare type __ΩResolvedExecutionOptions = any[];
|
|
646
680
|
declare type __ΩConfig = any[];
|
|
647
681
|
declare type __ΩEnvironmentConfig = any[];
|
|
648
682
|
declare type __ΩUserConfig = any[];
|
|
649
|
-
declare type __ΩInitialUserConfig = any[];
|
|
650
|
-
declare type __ΩParsedUserConfig = any[];
|
|
651
683
|
declare type __ΩPowerlinesCommand = any[];
|
|
652
684
|
declare type __ΩInlineConfig = any[];
|
|
653
685
|
declare type __ΩNewInlineConfig = any[];
|
|
@@ -656,12 +688,13 @@ declare type __ΩPrepareInlineConfig = any[];
|
|
|
656
688
|
declare type __ΩTypesInlineConfig = any[];
|
|
657
689
|
declare type __ΩBuildInlineConfig = any[];
|
|
658
690
|
declare type __ΩLintInlineConfig = any[];
|
|
691
|
+
declare type __ΩTestInlineConfig = any[];
|
|
659
692
|
declare type __ΩDocsInlineConfig = any[];
|
|
660
693
|
declare type __ΩDeployInlineConfig = any[];
|
|
661
|
-
declare type __ΩConfigEnv = any[];
|
|
662
694
|
declare type __ΩUserConfigFn = any[];
|
|
663
695
|
declare type __ΩAnyOutputUserConfig = any[];
|
|
664
696
|
declare type __ΩAnyUserConfig = any[];
|
|
697
|
+
declare type __ΩParsedUserConfig = any[];
|
|
665
698
|
declare type __ΩResolvedEntryTypeDefinition = any[];
|
|
666
699
|
declare type __ΩEnvironmentResolvedConfig = any[];
|
|
667
700
|
declare type __ΩResolveResolvedConfig = any[];
|
|
@@ -670,5 +703,5 @@ declare type __ΩCopyResolvedConfig = any[];
|
|
|
670
703
|
declare type __ΩOutputResolvedConfig = any[];
|
|
671
704
|
declare type __ΩResolvedConfig = any[];
|
|
672
705
|
//#endregion
|
|
673
|
-
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config,
|
|
706
|
+
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig, LogFn, LogLevel, LogLevelConfig, Logger, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩCopyResolvedConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInlineConfig, __ΩLintInlineConfig, __ΩLogFn, __ΩLogLevel, __ΩLogLevelConfig, __ΩLogger, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEngineOptions, __ΩResolvedEntryTypeDefinition, __ΩResolvedExecutionOptions, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig };
|
|
674
707
|
//# sourceMappingURL=config.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;KAwCY,QAAA;AAAA,KAEA,KAAA,IAAS,IAAA,EAAM,aAAA,KAAkB,IAAA;AAAA,KAEjC,cAAA,GAAiB,MAAA,CAAO,QAAA;AAAA,UAEnB,MAAA;EACf,GAAA,EAAK,KAAA;EACL,KAAA,EAAO,aAAA;AAAA;AANT;;;AAAA,KAYY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,EAAU,QAAA,GAAW,QAAA,KAAa,MAAA,CAAO,QAAA;AAxBrE;;;AAAA,KA6BY,kBAAA,kBACO,aAAA,GAAgB,aAAA;EAI7B,MAAA,WAAiB,aAAA,CAAc,QAAA,EAAU,QAAA;EACzC,OAAA,EAAS,QAAA;AAAA;EAGT,MAAA,EAAQ,MAAA,CAAO,QAAA;EACf,OAAA;AAAA;;;;KAMM,YAAA,kBAA8B,aAAA,GAAgB,aAAA,aAEtD,aAAA,CAAc,QAAA,UACd,MAAA,CAAO,QAAA,IACP,iBAAA,CAAkB,QAAA,IAClB,kBAAA,CAAmB,QAAA,IACnB,OAAA,CAAQ,YAAA,CAAa,QAAA,KACrB,YAAA,CAAa,QAAA;AAAA,KAEL,aAAA,kBAA+B,aAAA,GAAgB,aAAA,IACzD,WAAA,CAAY,MAAA,CAAO,QAAA;AAAA,KAET,oBAAA,yBACc,aAAA,GAAgB,aAAA,qBAGxC,OAAA,EAAS,QAAA,KACN,YAAA,CAAa,aAAA,CAAc,QA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