@pandacss/config 0.0.0-dev-20230201155624 → 0.0.0-dev-20230203181426
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/index.d.ts +1 -8
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { UserConfig } from '@pandacss/types';
|
|
2
|
-
|
|
3
1
|
type ConfigFileOptions = {
|
|
4
2
|
cwd: string;
|
|
5
3
|
file?: string;
|
|
@@ -9,11 +7,6 @@ declare function loadConfigFile(options: ConfigFileOptions): Promise<{
|
|
|
9
7
|
path: string;
|
|
10
8
|
dependencies: string[];
|
|
11
9
|
}>;
|
|
12
|
-
type LoadConfigResult = {
|
|
13
|
-
path: string;
|
|
14
|
-
config: UserConfig;
|
|
15
|
-
dependencies: string[];
|
|
16
|
-
};
|
|
17
10
|
|
|
18
11
|
type Extendable<T> = T & {
|
|
19
12
|
extend?: T;
|
|
@@ -29,4 +22,4 @@ declare function mergeConfigs(configs: ExtendableRecord[]): any;
|
|
|
29
22
|
*/
|
|
30
23
|
declare function getResolvedConfig(config: ExtendableRecord, cwd: string): Promise<any>;
|
|
31
24
|
|
|
32
|
-
export {
|
|
25
|
+
export { getResolvedConfig, loadConfigFile, mergeConfigs };
|
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ async function bundleAndRequire(filepath, cwd) {
|
|
|
89
89
|
const filePath = require.resolve(filepath, { paths: [cwd] });
|
|
90
90
|
let config;
|
|
91
91
|
let dependencies;
|
|
92
|
-
const
|
|
92
|
+
const done = import_logger.logger.time.debug(`Bundling config file ${(0, import_logger.quote)((0, import_path2.relative)(cwd, filePath))}`);
|
|
93
93
|
try {
|
|
94
94
|
const realFileName = (0, import_fs2.realpathSync)(filePath);
|
|
95
95
|
dependencies = [realFileName];
|
|
@@ -105,7 +105,7 @@ async function bundleAndRequire(filepath, cwd) {
|
|
|
105
105
|
config = require("node-eval")(bundle.code).default;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
done();
|
|
109
109
|
return {
|
|
110
110
|
config,
|
|
111
111
|
dependencies
|
|
@@ -220,7 +220,7 @@ async function loadConfigFile(options) {
|
|
|
220
220
|
if (!filePath) {
|
|
221
221
|
throw new import_error.ConfigNotFoundError();
|
|
222
222
|
}
|
|
223
|
-
import_logger2.logger.debug(
|
|
223
|
+
import_logger2.logger.debug("config:path", filePath);
|
|
224
224
|
const result = await bundleAndRequire(filePath, cwd);
|
|
225
225
|
if (typeof result.config !== "object") {
|
|
226
226
|
throw new import_error.ConfigError(`\u{1F4A5} Config must export or return an object.`);
|
package/dist/index.mjs
CHANGED
|
@@ -63,7 +63,7 @@ async function bundleAndRequire(filepath, cwd) {
|
|
|
63
63
|
const filePath = __require.resolve(filepath, { paths: [cwd] });
|
|
64
64
|
let config;
|
|
65
65
|
let dependencies;
|
|
66
|
-
const
|
|
66
|
+
const done = logger.time.debug(`Bundling config file ${quote(relative(cwd, filePath))}`);
|
|
67
67
|
try {
|
|
68
68
|
const realFileName = realpathSync(filePath);
|
|
69
69
|
dependencies = [realFileName];
|
|
@@ -79,7 +79,7 @@ async function bundleAndRequire(filepath, cwd) {
|
|
|
79
79
|
config = __require("node-eval")(bundle.code).default;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
done();
|
|
83
83
|
return {
|
|
84
84
|
config,
|
|
85
85
|
dependencies
|
|
@@ -194,7 +194,7 @@ async function loadConfigFile(options) {
|
|
|
194
194
|
if (!filePath) {
|
|
195
195
|
throw new ConfigNotFoundError();
|
|
196
196
|
}
|
|
197
|
-
logger2.debug(
|
|
197
|
+
logger2.debug("config:path", filePath);
|
|
198
198
|
const result = await bundleAndRequire(filePath, cwd);
|
|
199
199
|
if (typeof result.config !== "object") {
|
|
200
200
|
throw new ConfigError(`\u{1F4A5} Config must export or return an object.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/config",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230203181426",
|
|
4
4
|
"description": "Find and load panda config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"esbuild": "0.17.5",
|
|
19
19
|
"escalade": "3.1.1",
|
|
20
20
|
"node-eval": "2.0.0",
|
|
21
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
22
|
-
"@pandacss/error": "0.0.0-dev-
|
|
23
|
-
"@pandacss/types": "0.0.0-dev-
|
|
21
|
+
"@pandacss/logger": "0.0.0-dev-20230203181426",
|
|
22
|
+
"@pandacss/error": "0.0.0-dev-20230203181426",
|
|
23
|
+
"@pandacss/types": "0.0.0-dev-20230203181426"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "pnpm tsup src/index.ts --format=esm,cjs --shims --dts",
|