@bamboocss/config 1.12.0 → 1.12.1
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/package.json +6 -6
- package/dist/diff-config.d.cts +0 -10
- package/dist/diff-config.d.mts +0 -10
- package/dist/index.d.cts +0 -111
- package/dist/index.d.mts +0 -111
- package/dist/merge-config.d.cts +0 -16
- package/dist/merge-config.d.mts +0 -16
- package/dist/resolve-ts-path-pattern.d.cts +0 -13
- package/dist/resolve-ts-path-pattern.d.mts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/config",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Find and load bamboo config",
|
|
5
5
|
"homepage": "https://bamboo-css.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"escalade": "3.2.0",
|
|
65
65
|
"microdiff": "1.5.0",
|
|
66
66
|
"typescript": "6.0.2",
|
|
67
|
-
"@bamboocss/logger": "1.12.
|
|
68
|
-
"@bamboocss/preset-bamboo": "1.12.
|
|
69
|
-
"@bamboocss/
|
|
70
|
-
"@bamboocss/
|
|
71
|
-
"@bamboocss/types": "1.12.
|
|
67
|
+
"@bamboocss/logger": "1.12.1",
|
|
68
|
+
"@bamboocss/preset-bamboo": "1.12.1",
|
|
69
|
+
"@bamboocss/shared": "1.12.1",
|
|
70
|
+
"@bamboocss/preset-base": "1.12.1",
|
|
71
|
+
"@bamboocss/types": "1.12.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"pkg-types": "2.3.0"
|
package/dist/diff-config.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config, DiffConfigResult } from "@bamboocss/types";
|
|
2
|
-
|
|
3
|
-
//#region src/diff-config.d.ts
|
|
4
|
-
type ConfigOrFn = Config | (() => Config);
|
|
5
|
-
/**
|
|
6
|
-
* Diff the two config objects and return the list of affected properties
|
|
7
|
-
*/
|
|
8
|
-
declare function diffConfigs(config: ConfigOrFn, prevConfig: Config | undefined): DiffConfigResult;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { diffConfigs };
|
package/dist/diff-config.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config, DiffConfigResult } from "@bamboocss/types";
|
|
2
|
-
|
|
3
|
-
//#region src/diff-config.d.ts
|
|
4
|
-
type ConfigOrFn = Config | (() => Config);
|
|
5
|
-
/**
|
|
6
|
-
* Diff the two config objects and return the list of affected properties
|
|
7
|
-
*/
|
|
8
|
-
declare function diffConfigs(config: ConfigOrFn, prevConfig: Config | undefined): DiffConfigResult;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { diffConfigs };
|
package/dist/index.d.cts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { BambooHooks as BambooHooks$1, BambooPlugin, Config, ConfigTsOptions, DiffConfigResult, LoadConfigResult as LoadConfigResult$1 } from "@bamboocss/types";
|
|
2
|
-
import { CompilerOptions, TypeAcquisition } from "typescript";
|
|
3
|
-
|
|
4
|
-
//#region src/types.d.ts
|
|
5
|
-
interface ConfigFileOptions {
|
|
6
|
-
cwd: string;
|
|
7
|
-
file?: string;
|
|
8
|
-
}
|
|
9
|
-
interface BundleConfigResult<T = Config> {
|
|
10
|
-
config: T;
|
|
11
|
-
dependencies: string[];
|
|
12
|
-
path: string;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/bundle-config.d.ts
|
|
16
|
-
declare function bundleConfig(options: ConfigFileOptions): Promise<BundleConfigResult>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/diff-config.d.ts
|
|
19
|
-
type ConfigOrFn = Config | (() => Config);
|
|
20
|
-
/**
|
|
21
|
-
* Diff the two config objects and return the list of affected properties
|
|
22
|
-
*/
|
|
23
|
-
declare function diffConfigs(config: ConfigOrFn, prevConfig: Config | undefined): DiffConfigResult;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/find-config.d.ts
|
|
26
|
-
declare function findConfig(options: Partial<ConfigFileOptions>): string;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
|
|
29
|
-
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 };
|
|
30
|
-
interface TSConfig {
|
|
31
|
-
compilerOptions?: StripEnums<CompilerOptions>;
|
|
32
|
-
exclude?: string[];
|
|
33
|
-
compileOnSave?: boolean;
|
|
34
|
-
extends?: string | string[];
|
|
35
|
-
files?: string[];
|
|
36
|
-
include?: string[];
|
|
37
|
-
typeAcquisition?: TypeAcquisition;
|
|
38
|
-
references?: {
|
|
39
|
-
path: string;
|
|
40
|
-
}[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Defines a TSConfig structure.
|
|
44
|
-
* @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
|
|
45
|
-
* @returns the same `tsconfig.json` object.
|
|
46
|
-
*/
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/ts-config-paths.d.ts
|
|
49
|
-
interface PathMapping {
|
|
50
|
-
pattern: RegExp;
|
|
51
|
-
paths: string[];
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @see https://github.com/aleclarson/vite-tsconfig-paths/blob/e8f0acf7adfcfbf77edbe937f64b4e5d39557ad0/src/mappings.ts
|
|
55
|
-
*/
|
|
56
|
-
declare function convertTsPathsToRegexes(paths: Record<string, string[]>, baseUrl: string): PathMapping[];
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/get-mod-deps.d.ts
|
|
59
|
-
interface GetDepsOptions {
|
|
60
|
-
filename: string;
|
|
61
|
-
ext: string;
|
|
62
|
-
cwd: string;
|
|
63
|
-
seen: Set<string>;
|
|
64
|
-
baseUrl: string | undefined;
|
|
65
|
-
pathMappings: PathMapping[];
|
|
66
|
-
foundModuleAliases: Map<string, string>;
|
|
67
|
-
compilerOptions?: TSConfig['compilerOptions'];
|
|
68
|
-
}
|
|
69
|
-
declare function getConfigDependencies(filePath: string, tsOptions?: ConfigTsOptions, compilerOptions?: TSConfig['compilerOptions']): {
|
|
70
|
-
deps: Set<string>;
|
|
71
|
-
aliases: Map<string, string>;
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/get-resolved-config.d.ts
|
|
75
|
-
type Extendable$1<T> = T & {
|
|
76
|
-
extend?: T;
|
|
77
|
-
};
|
|
78
|
-
type ExtendableConfig$1 = Extendable$1<Config>;
|
|
79
|
-
/**
|
|
80
|
-
* Recursively merge all presets into a single config (depth-first using stack)
|
|
81
|
-
*/
|
|
82
|
-
declare function getResolvedConfig(config: ExtendableConfig$1, cwd: string, hooks?: Partial<BambooHooks$1>): Promise<Config>;
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/load-config.d.ts
|
|
85
|
-
/**
|
|
86
|
-
* Find, load and resolve the final config (including presets)
|
|
87
|
-
*/
|
|
88
|
-
declare function loadConfig(options: ConfigFileOptions): Promise<LoadConfigResult>;
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/resolve-config.d.ts
|
|
91
|
-
/**
|
|
92
|
-
* Resolve the final config (including presets)
|
|
93
|
-
* @bamboocss/preset-base: ALWAYS included if NOT using eject: true
|
|
94
|
-
* @bamboocss/preset-bamboo: only included by default if no presets
|
|
95
|
-
*/
|
|
96
|
-
declare function resolveConfig(result: BundleConfigResult, cwd: string): Promise<LoadConfigResult$1>;
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/merge-hooks.d.ts
|
|
99
|
-
declare const mergeHooks: (plugins: BambooPlugin[]) => BambooHooks;
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/merge-config.d.ts
|
|
102
|
-
type Extendable<T> = T & {
|
|
103
|
-
extend?: T;
|
|
104
|
-
};
|
|
105
|
-
type ExtendableConfig = Extendable<Config>;
|
|
106
|
-
/**
|
|
107
|
-
* Merge all configs into a single config
|
|
108
|
-
*/
|
|
109
|
-
declare function mergeConfigs(configs: ExtendableConfig[]): any;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { type BundleConfigResult, type GetDepsOptions, bundleConfig, convertTsPathsToRegexes, diffConfigs, findConfig, getConfigDependencies, getResolvedConfig, loadConfig, mergeConfigs, mergeHooks, resolveConfig };
|
package/dist/index.d.mts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { CompilerOptions, TypeAcquisition } from "typescript";
|
|
2
|
-
import { BambooHooks as BambooHooks$1, BambooPlugin, Config, ConfigTsOptions, DiffConfigResult, LoadConfigResult as LoadConfigResult$1 } from "@bamboocss/types";
|
|
3
|
-
|
|
4
|
-
//#region src/types.d.ts
|
|
5
|
-
interface ConfigFileOptions {
|
|
6
|
-
cwd: string;
|
|
7
|
-
file?: string;
|
|
8
|
-
}
|
|
9
|
-
interface BundleConfigResult<T = Config> {
|
|
10
|
-
config: T;
|
|
11
|
-
dependencies: string[];
|
|
12
|
-
path: string;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/bundle-config.d.ts
|
|
16
|
-
declare function bundleConfig(options: ConfigFileOptions): Promise<BundleConfigResult>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/diff-config.d.ts
|
|
19
|
-
type ConfigOrFn = Config | (() => Config);
|
|
20
|
-
/**
|
|
21
|
-
* Diff the two config objects and return the list of affected properties
|
|
22
|
-
*/
|
|
23
|
-
declare function diffConfigs(config: ConfigOrFn, prevConfig: Config | undefined): DiffConfigResult;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/find-config.d.ts
|
|
26
|
-
declare function findConfig(options: Partial<ConfigFileOptions>): string;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
|
|
29
|
-
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 };
|
|
30
|
-
interface TSConfig {
|
|
31
|
-
compilerOptions?: StripEnums<CompilerOptions>;
|
|
32
|
-
exclude?: string[];
|
|
33
|
-
compileOnSave?: boolean;
|
|
34
|
-
extends?: string | string[];
|
|
35
|
-
files?: string[];
|
|
36
|
-
include?: string[];
|
|
37
|
-
typeAcquisition?: TypeAcquisition;
|
|
38
|
-
references?: {
|
|
39
|
-
path: string;
|
|
40
|
-
}[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Defines a TSConfig structure.
|
|
44
|
-
* @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
|
|
45
|
-
* @returns the same `tsconfig.json` object.
|
|
46
|
-
*/
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/ts-config-paths.d.ts
|
|
49
|
-
interface PathMapping {
|
|
50
|
-
pattern: RegExp;
|
|
51
|
-
paths: string[];
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @see https://github.com/aleclarson/vite-tsconfig-paths/blob/e8f0acf7adfcfbf77edbe937f64b4e5d39557ad0/src/mappings.ts
|
|
55
|
-
*/
|
|
56
|
-
declare function convertTsPathsToRegexes(paths: Record<string, string[]>, baseUrl: string): PathMapping[];
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/get-mod-deps.d.ts
|
|
59
|
-
interface GetDepsOptions {
|
|
60
|
-
filename: string;
|
|
61
|
-
ext: string;
|
|
62
|
-
cwd: string;
|
|
63
|
-
seen: Set<string>;
|
|
64
|
-
baseUrl: string | undefined;
|
|
65
|
-
pathMappings: PathMapping[];
|
|
66
|
-
foundModuleAliases: Map<string, string>;
|
|
67
|
-
compilerOptions?: TSConfig['compilerOptions'];
|
|
68
|
-
}
|
|
69
|
-
declare function getConfigDependencies(filePath: string, tsOptions?: ConfigTsOptions, compilerOptions?: TSConfig['compilerOptions']): {
|
|
70
|
-
deps: Set<string>;
|
|
71
|
-
aliases: Map<string, string>;
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/get-resolved-config.d.ts
|
|
75
|
-
type Extendable$1<T> = T & {
|
|
76
|
-
extend?: T;
|
|
77
|
-
};
|
|
78
|
-
type ExtendableConfig$1 = Extendable$1<Config>;
|
|
79
|
-
/**
|
|
80
|
-
* Recursively merge all presets into a single config (depth-first using stack)
|
|
81
|
-
*/
|
|
82
|
-
declare function getResolvedConfig(config: ExtendableConfig$1, cwd: string, hooks?: Partial<BambooHooks$1>): Promise<Config>;
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/load-config.d.ts
|
|
85
|
-
/**
|
|
86
|
-
* Find, load and resolve the final config (including presets)
|
|
87
|
-
*/
|
|
88
|
-
declare function loadConfig(options: ConfigFileOptions): Promise<LoadConfigResult>;
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/resolve-config.d.ts
|
|
91
|
-
/**
|
|
92
|
-
* Resolve the final config (including presets)
|
|
93
|
-
* @bamboocss/preset-base: ALWAYS included if NOT using eject: true
|
|
94
|
-
* @bamboocss/preset-bamboo: only included by default if no presets
|
|
95
|
-
*/
|
|
96
|
-
declare function resolveConfig(result: BundleConfigResult, cwd: string): Promise<LoadConfigResult$1>;
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/merge-hooks.d.ts
|
|
99
|
-
declare const mergeHooks: (plugins: BambooPlugin[]) => BambooHooks;
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/merge-config.d.ts
|
|
102
|
-
type Extendable<T> = T & {
|
|
103
|
-
extend?: T;
|
|
104
|
-
};
|
|
105
|
-
type ExtendableConfig = Extendable<Config>;
|
|
106
|
-
/**
|
|
107
|
-
* Merge all configs into a single config
|
|
108
|
-
*/
|
|
109
|
-
declare function mergeConfigs(configs: ExtendableConfig[]): any;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { type BundleConfigResult, type GetDepsOptions, bundleConfig, convertTsPathsToRegexes, diffConfigs, findConfig, getConfigDependencies, getResolvedConfig, loadConfig, mergeConfigs, mergeHooks, resolveConfig };
|
package/dist/merge-config.d.cts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BambooPlugin, Config } from "@bamboocss/types";
|
|
2
|
-
|
|
3
|
-
//#region src/merge-hooks.d.ts
|
|
4
|
-
declare const mergeHooks: (plugins: BambooPlugin[]) => BambooHooks;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/merge-config.d.ts
|
|
7
|
-
type Extendable<T> = T & {
|
|
8
|
-
extend?: T;
|
|
9
|
-
};
|
|
10
|
-
type ExtendableConfig = Extendable<Config>;
|
|
11
|
-
/**
|
|
12
|
-
* Merge all configs into a single config
|
|
13
|
-
*/
|
|
14
|
-
declare function mergeConfigs(configs: ExtendableConfig[]): any;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { mergeConfigs, mergeHooks };
|
package/dist/merge-config.d.mts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BambooPlugin, Config } from "@bamboocss/types";
|
|
2
|
-
|
|
3
|
-
//#region src/merge-hooks.d.ts
|
|
4
|
-
declare const mergeHooks: (plugins: BambooPlugin[]) => BambooHooks;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/merge-config.d.ts
|
|
7
|
-
type Extendable<T> = T & {
|
|
8
|
-
extend?: T;
|
|
9
|
-
};
|
|
10
|
-
type ExtendableConfig = Extendable<Config>;
|
|
11
|
-
/**
|
|
12
|
-
* Merge all configs into a single config
|
|
13
|
-
*/
|
|
14
|
-
declare function mergeConfigs(configs: ExtendableConfig[]): any;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { mergeConfigs, mergeHooks };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/ts-config-paths.d.ts
|
|
2
|
-
interface PathMapping {
|
|
3
|
-
pattern: RegExp;
|
|
4
|
-
paths: string[];
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/resolve-ts-path-pattern.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* @see https://github.com/aleclarson/vite-tsconfig-paths/blob/e8f0acf7adfcfbf77edbe937f64b4e5d39557ad0/src/index.ts#LL231C57-L231C57
|
|
10
|
-
*/
|
|
11
|
-
declare const resolveTsPathPattern: (pathMappings: PathMapping[], moduleSpecifier: string) => string | undefined;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { resolveTsPathPattern };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/ts-config-paths.d.ts
|
|
2
|
-
interface PathMapping {
|
|
3
|
-
pattern: RegExp;
|
|
4
|
-
paths: string[];
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/resolve-ts-path-pattern.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* @see https://github.com/aleclarson/vite-tsconfig-paths/blob/e8f0acf7adfcfbf77edbe937f64b4e5d39557ad0/src/index.ts#LL231C57-L231C57
|
|
10
|
-
*/
|
|
11
|
-
declare const resolveTsPathPattern: (pathMappings: PathMapping[], moduleSpecifier: string) => string | undefined;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { resolveTsPathPattern };
|