@pandacss/node 0.0.0-dev-20230503093812 → 0.0.0-dev-20230503110111
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.js +41 -39
- package/dist/index.mjs +41 -39
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -2582,45 +2582,47 @@ async function debugFiles(ctx, options) {
|
|
|
2582
2582
|
await (0, import_promises2.mkdir)(options.outdir, { recursive: true });
|
|
2583
2583
|
}
|
|
2584
2584
|
const filesWithCss = [];
|
|
2585
|
-
await
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
const
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2585
|
+
await Promise.all(
|
|
2586
|
+
files.map(async (file) => {
|
|
2587
|
+
const measure = import_logger5.logger.time.debug(`Parsed ${file}`);
|
|
2588
|
+
const result = ctx.project.parseSourceFile(file);
|
|
2589
|
+
measure();
|
|
2590
|
+
if (!result)
|
|
2591
|
+
return;
|
|
2592
|
+
const list = result.getAll().map((result2) => {
|
|
2593
|
+
const node = result2.box.getNode();
|
|
2594
|
+
const range = getNodeRange(node);
|
|
2595
|
+
return {
|
|
2596
|
+
name: result2.name,
|
|
2597
|
+
type: result2.type,
|
|
2598
|
+
data: result2.data,
|
|
2599
|
+
kind: node.getKindName(),
|
|
2600
|
+
line: range.startLineNumber,
|
|
2601
|
+
column: range.startColumn
|
|
2602
|
+
};
|
|
2603
|
+
});
|
|
2604
|
+
const css = ctx.getParserCss(result);
|
|
2605
|
+
if (!css)
|
|
2606
|
+
return;
|
|
2607
|
+
if (options.dry) {
|
|
2608
|
+
console.log({ path: file, ast: list, code: css });
|
|
2609
|
+
return Promise.resolve();
|
|
2610
|
+
}
|
|
2611
|
+
if (options.outdir) {
|
|
2612
|
+
filesWithCss.push(file);
|
|
2613
|
+
const parsedPath = path.parse(file);
|
|
2614
|
+
const relative3 = path.relative(ctx.config.cwd, parsedPath.dir);
|
|
2615
|
+
const astJsonPath = `${relative3}/${parsedPath.name}.ast.json`.replaceAll(path.sep, "__");
|
|
2616
|
+
const cssPath = `${relative3}/${parsedPath.name}.css`.replaceAll(path.sep, "__");
|
|
2617
|
+
import_logger5.logger.info("cli", `Writing ${import_logger5.colors.bold(`${options.outdir}/${astJsonPath}`)}`);
|
|
2618
|
+
import_logger5.logger.info("cli", `Writing ${import_logger5.colors.bold(`${options.outdir}/${cssPath}`)}`);
|
|
2619
|
+
return Promise.all([
|
|
2620
|
+
(0, import_promises2.writeFile)(`${options.outdir}/${astJsonPath}`, JSON.stringify(list, debugResultSerializer, 2)),
|
|
2621
|
+
(0, import_promises2.writeFile)(`${options.outdir}/${cssPath}`, css)
|
|
2622
|
+
]);
|
|
2623
|
+
}
|
|
2624
|
+
})
|
|
2625
|
+
);
|
|
2624
2626
|
import_logger5.logger.info("cli", `Found ${import_logger5.colors.bold(`${filesWithCss.length}/${files.length}`)} files using Panda`);
|
|
2625
2627
|
measureTotal();
|
|
2626
2628
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2571,45 +2571,47 @@ async function debugFiles(ctx, options) {
|
|
|
2571
2571
|
await mkdir(options.outdir, { recursive: true });
|
|
2572
2572
|
}
|
|
2573
2573
|
const filesWithCss = [];
|
|
2574
|
-
await
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
const
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2574
|
+
await Promise.all(
|
|
2575
|
+
files.map(async (file) => {
|
|
2576
|
+
const measure = logger5.time.debug(`Parsed ${file}`);
|
|
2577
|
+
const result = ctx.project.parseSourceFile(file);
|
|
2578
|
+
measure();
|
|
2579
|
+
if (!result)
|
|
2580
|
+
return;
|
|
2581
|
+
const list = result.getAll().map((result2) => {
|
|
2582
|
+
const node = result2.box.getNode();
|
|
2583
|
+
const range = getNodeRange(node);
|
|
2584
|
+
return {
|
|
2585
|
+
name: result2.name,
|
|
2586
|
+
type: result2.type,
|
|
2587
|
+
data: result2.data,
|
|
2588
|
+
kind: node.getKindName(),
|
|
2589
|
+
line: range.startLineNumber,
|
|
2590
|
+
column: range.startColumn
|
|
2591
|
+
};
|
|
2592
|
+
});
|
|
2593
|
+
const css = ctx.getParserCss(result);
|
|
2594
|
+
if (!css)
|
|
2595
|
+
return;
|
|
2596
|
+
if (options.dry) {
|
|
2597
|
+
console.log({ path: file, ast: list, code: css });
|
|
2598
|
+
return Promise.resolve();
|
|
2599
|
+
}
|
|
2600
|
+
if (options.outdir) {
|
|
2601
|
+
filesWithCss.push(file);
|
|
2602
|
+
const parsedPath = path.parse(file);
|
|
2603
|
+
const relative3 = path.relative(ctx.config.cwd, parsedPath.dir);
|
|
2604
|
+
const astJsonPath = `${relative3}/${parsedPath.name}.ast.json`.replaceAll(path.sep, "__");
|
|
2605
|
+
const cssPath = `${relative3}/${parsedPath.name}.css`.replaceAll(path.sep, "__");
|
|
2606
|
+
logger5.info("cli", `Writing ${colors.bold(`${options.outdir}/${astJsonPath}`)}`);
|
|
2607
|
+
logger5.info("cli", `Writing ${colors.bold(`${options.outdir}/${cssPath}`)}`);
|
|
2608
|
+
return Promise.all([
|
|
2609
|
+
writeFile3(`${options.outdir}/${astJsonPath}`, JSON.stringify(list, debugResultSerializer, 2)),
|
|
2610
|
+
writeFile3(`${options.outdir}/${cssPath}`, css)
|
|
2611
|
+
]);
|
|
2612
|
+
}
|
|
2613
|
+
})
|
|
2614
|
+
);
|
|
2613
2615
|
logger5.info("cli", `Found ${colors.bold(`${filesWithCss.length}/${files.length}`)} files using Panda`);
|
|
2614
2616
|
measureTotal();
|
|
2615
2617
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230503110111",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"preferred-pm": "^3.0.3",
|
|
34
34
|
"ts-morph": "18.0.0",
|
|
35
35
|
"ts-pattern": "4.2.2",
|
|
36
|
-
"@pandacss/config": "0.0.0-dev-
|
|
37
|
-
"@pandacss/core": "0.0.0-dev-
|
|
38
|
-
"@pandacss/error": "0.0.0-dev-
|
|
39
|
-
"@pandacss/generator": "0.0.0-dev-
|
|
40
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
41
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
42
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
43
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
44
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
45
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
46
|
-
"@pandacss/types": "0.0.0-dev-
|
|
36
|
+
"@pandacss/config": "0.0.0-dev-20230503110111",
|
|
37
|
+
"@pandacss/core": "0.0.0-dev-20230503110111",
|
|
38
|
+
"@pandacss/error": "0.0.0-dev-20230503110111",
|
|
39
|
+
"@pandacss/generator": "0.0.0-dev-20230503110111",
|
|
40
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230503110111",
|
|
41
|
+
"@pandacss/logger": "0.0.0-dev-20230503110111",
|
|
42
|
+
"@pandacss/parser": "0.0.0-dev-20230503110111",
|
|
43
|
+
"@pandacss/extractor": "0.0.0-dev-20230503110111",
|
|
44
|
+
"@pandacss/shared": "0.0.0-dev-20230503110111",
|
|
45
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230503110111",
|
|
46
|
+
"@pandacss/types": "0.0.0-dev-20230503110111"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/fs-extra": "11.0.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/pluralize": "0.0.29",
|
|
54
54
|
"boxen": "^7.0.2",
|
|
55
55
|
"gzip-size": "^7.0.0",
|
|
56
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
56
|
+
"@pandacss/fixture": "0.0.0-dev-20230503110111"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|