@bamboocss/config 1.11.1 → 1.11.3

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.
@@ -0,0 +1,84 @@
1
+ import { diffConfigs } from "./diff-config.mjs";
2
+ import { n as convertTsPathsToRegexes, t as PathMapping } from "./ts-config-paths-CvGId8kq.mjs";
3
+ import { n as mergeHooks, t as mergeConfigs } from "./merge-config-oEiBYbfB.mjs";
4
+ import { CompilerOptions, TypeAcquisition } from "typescript";
5
+ import { BambooHooks, Config, ConfigTsOptions, LoadConfigResult as LoadConfigResult$1 } from "@bamboocss/types";
6
+
7
+ //#region src/types.d.ts
8
+ interface ConfigFileOptions {
9
+ cwd: string;
10
+ file?: string;
11
+ }
12
+ interface BundleConfigResult<T = Config> {
13
+ config: T;
14
+ dependencies: string[];
15
+ path: string;
16
+ }
17
+ //#endregion
18
+ //#region src/bundle-config.d.ts
19
+ declare function bundleConfig(options: ConfigFileOptions): Promise<BundleConfigResult>;
20
+ //#endregion
21
+ //#region src/find-config.d.ts
22
+ declare function findConfig(options: Partial<ConfigFileOptions>): string;
23
+ //#endregion
24
+ //#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
25
+ type StripEnums<T extends Record<string, any>> = { [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any };
26
+ interface TSConfig {
27
+ compilerOptions?: StripEnums<CompilerOptions>;
28
+ exclude?: string[];
29
+ compileOnSave?: boolean;
30
+ extends?: string | string[];
31
+ files?: string[];
32
+ include?: string[];
33
+ typeAcquisition?: TypeAcquisition;
34
+ references?: {
35
+ path: string;
36
+ }[];
37
+ }
38
+ /**
39
+ * Defines a TSConfig structure.
40
+ * @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
41
+ * @returns the same `tsconfig.json` object.
42
+ */
43
+ //#endregion
44
+ //#region src/get-mod-deps.d.ts
45
+ interface GetDepsOptions {
46
+ filename: string;
47
+ ext: string;
48
+ cwd: string;
49
+ seen: Set<string>;
50
+ baseUrl: string | undefined;
51
+ pathMappings: PathMapping[];
52
+ foundModuleAliases: Map<string, string>;
53
+ compilerOptions?: TSConfig['compilerOptions'];
54
+ }
55
+ declare function getConfigDependencies(filePath: string, tsOptions?: ConfigTsOptions, compilerOptions?: TSConfig['compilerOptions']): {
56
+ deps: Set<string>;
57
+ aliases: Map<string, string>;
58
+ };
59
+ //#endregion
60
+ //#region src/get-resolved-config.d.ts
61
+ type Extendable<T> = T & {
62
+ extend?: T;
63
+ };
64
+ type ExtendableConfig = Extendable<Config>;
65
+ /**
66
+ * Recursively merge all presets into a single config (depth-first using stack)
67
+ */
68
+ declare function getResolvedConfig(config: ExtendableConfig, cwd: string, hooks?: Partial<BambooHooks>): Promise<Config>;
69
+ //#endregion
70
+ //#region src/load-config.d.ts
71
+ /**
72
+ * Find, load and resolve the final config (including presets)
73
+ */
74
+ declare function loadConfig(options: ConfigFileOptions): Promise<LoadConfigResult>;
75
+ //#endregion
76
+ //#region src/resolve-config.d.ts
77
+ /**
78
+ * Resolve the final config (including presets)
79
+ * @bamboocss/preset-base: ALWAYS included if NOT using eject: true
80
+ * @bamboocss/preset-bamboo: only included by default if no presets
81
+ */
82
+ declare function resolveConfig(result: BundleConfigResult, cwd: string): Promise<LoadConfigResult$1>;
83
+ //#endregion
84
+ export { type BundleConfigResult, type GetDepsOptions, bundleConfig, convertTsPathsToRegexes, diffConfigs, findConfig, getConfigDependencies, getResolvedConfig, loadConfig, mergeConfigs, mergeHooks, resolveConfig };