@bamboocss/config 1.11.1 → 1.11.2
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/diff-config-Co_3mDXE.cjs +197 -0
- package/dist/diff-config-KDQWMnQN.mjs +163 -0
- package/dist/diff-config.cjs +3 -0
- package/dist/diff-config.d.cts +10 -0
- package/dist/diff-config.d.mts +10 -0
- package/dist/diff-config.mjs +2 -6
- package/dist/index.cjs +575 -0
- package/dist/index.d.cts +84 -0
- package/dist/index.d.mts +84 -0
- package/dist/index.mjs +520 -589
- package/dist/merge-config-CcNpHJit.cjs +312 -0
- package/dist/merge-config-DI__LOWx.mjs +270 -0
- package/dist/merge-config-DVOlBQJY.d.cts +16 -0
- package/dist/merge-config-oEiBYbfB.d.mts +16 -0
- package/dist/merge-config.cjs +4 -0
- package/dist/merge-config.d.cts +2 -0
- package/dist/merge-config.d.mts +2 -0
- package/dist/merge-config.mjs +2 -8
- package/dist/resolve-ts-path-pattern.cjs +21 -0
- package/dist/resolve-ts-path-pattern.d.cts +9 -0
- package/dist/resolve-ts-path-pattern.d.mts +9 -0
- package/dist/resolve-ts-path-pattern.mjs +18 -5
- package/dist/ts-config-paths-CvGId8kq.d.mts +11 -0
- package/dist/ts-config-paths-wVx39QZ0.d.cts +11 -0
- package/package.json +19 -19
- package/dist/chunk-6TQW6KOI.mjs +0 -154
- package/dist/chunk-RIBK22OM.mjs +0 -265
- package/dist/chunk-RPIVZP2I.mjs +0 -22
- package/dist/diff-config.js +0 -188
- package/dist/index.js +0 -1086
- package/dist/merge-config.js +0 -259
- package/dist/resolve-ts-path-pattern.js +0 -46
package/dist/index.d.mts
ADDED
|
@@ -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 };
|