@pandacss/node 1.11.2 → 1.11.4
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.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +14 -12
- package/dist/index.mjs +14 -12
- package/package.json +16 -13
package/dist/index.d.mts
CHANGED
|
@@ -35,6 +35,7 @@ declare class OutputEngine {
|
|
|
35
35
|
constructor(options: OutputEngineOptions);
|
|
36
36
|
empty: () => void;
|
|
37
37
|
ensure: (file: string, cwd: string) => string;
|
|
38
|
+
writeFile: (filePath: string, code: string) => Promise<void> | undefined;
|
|
38
39
|
write: (output: Artifact | undefined) => Promise<PromiseSettledResult<void>[]> | undefined;
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -69,7 +70,7 @@ declare function analyze(ctx: PandaContext, options?: AnalysisOptions): {
|
|
|
69
70
|
report: _pandacss_reporter.TokenAnalysisReport;
|
|
70
71
|
formatted: string;
|
|
71
72
|
};
|
|
72
|
-
writeReport(filePath: string): Promise<void
|
|
73
|
+
writeReport(filePath: string): Promise<void> | undefined;
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
declare function buildInfo(ctx: PandaContext, outfile: string): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare class OutputEngine {
|
|
|
35
35
|
constructor(options: OutputEngineOptions);
|
|
36
36
|
empty: () => void;
|
|
37
37
|
ensure: (file: string, cwd: string) => string;
|
|
38
|
+
writeFile: (filePath: string, code: string) => Promise<void> | undefined;
|
|
38
39
|
write: (output: Artifact | undefined) => Promise<PromiseSettledResult<void>[]> | undefined;
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -69,7 +70,7 @@ declare function analyze(ctx: PandaContext, options?: AnalysisOptions): {
|
|
|
69
70
|
report: _pandacss_reporter.TokenAnalysisReport;
|
|
70
71
|
formatted: string;
|
|
71
72
|
};
|
|
72
|
-
writeReport(filePath: string): Promise<void
|
|
73
|
+
writeReport(filePath: string): Promise<void> | undefined;
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
declare function buildInfo(ctx: PandaContext, outfile: string): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -344,10 +344,8 @@ function analyze(ctx, options = {}) {
|
|
|
344
344
|
return { report, formatted: (0, import_reporter.formatTokenReport)(report.getSummary(), format) };
|
|
345
345
|
},
|
|
346
346
|
writeReport(filePath) {
|
|
347
|
-
const dirname2 = ctx.runtime.path.dirname(filePath);
|
|
348
|
-
ctx.runtime.fs.ensureDirSync(dirname2);
|
|
349
347
|
const str = JSON.stringify(reporter.report, replacer, 2);
|
|
350
|
-
return ctx.
|
|
348
|
+
return ctx.output.writeFile(filePath, str);
|
|
351
349
|
}
|
|
352
350
|
};
|
|
353
351
|
}
|
|
@@ -370,8 +368,7 @@ async function buildInfo(ctx, outfile) {
|
|
|
370
368
|
ctx.staticCss.process(staticCss);
|
|
371
369
|
}
|
|
372
370
|
const output = JSON.stringify(ctx.encoder.toJSON(), null, minify ? 0 : 2);
|
|
373
|
-
ctx.output.
|
|
374
|
-
await ctx.runtime.fs.writeFile(outfile, output);
|
|
371
|
+
await ctx.output.writeFile(outfile, output);
|
|
375
372
|
import_logger.logger.info("cli", "Done!");
|
|
376
373
|
}
|
|
377
374
|
|
|
@@ -1920,6 +1917,14 @@ var OutputEngine = class {
|
|
|
1920
1917
|
this.fs.ensureDirSync(dirname2);
|
|
1921
1918
|
return outPath;
|
|
1922
1919
|
};
|
|
1920
|
+
writeFile = (filePath, code) => {
|
|
1921
|
+
this.fs.ensureDirSync(this.path.dirname(filePath));
|
|
1922
|
+
if (this.fs.existsSync(filePath) && this.fs.readFileSync(filePath) === code) {
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1925
|
+
import_logger3.logger.debug("write:file", filePath);
|
|
1926
|
+
return this.fs.writeFile(filePath, code);
|
|
1927
|
+
};
|
|
1923
1928
|
write = (output) => {
|
|
1924
1929
|
if (!output) return;
|
|
1925
1930
|
const { dir = this.paths.root, files } = output;
|
|
@@ -1929,8 +1934,7 @@ var OutputEngine = class {
|
|
|
1929
1934
|
if (!artifact?.code) return;
|
|
1930
1935
|
const { file, code } = artifact;
|
|
1931
1936
|
const absPath = this.path.join(...dir, file);
|
|
1932
|
-
|
|
1933
|
-
return this.fs.writeFile(absPath, code);
|
|
1937
|
+
return this.writeFile(absPath, code);
|
|
1934
1938
|
})
|
|
1935
1939
|
);
|
|
1936
1940
|
};
|
|
@@ -2668,7 +2672,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2668
2672
|
if (outfile) {
|
|
2669
2673
|
const css = ctx.getCss(sheet);
|
|
2670
2674
|
import_logger7.logger.info("css", ctx.runtime.path.resolve(outfile));
|
|
2671
|
-
await ctx.
|
|
2675
|
+
await ctx.output.writeFile(outfile, css);
|
|
2672
2676
|
} else {
|
|
2673
2677
|
await ctx.writeCss(sheet);
|
|
2674
2678
|
}
|
|
@@ -2686,7 +2690,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2686
2690
|
} else if (outfile) {
|
|
2687
2691
|
const css = ctx.getCss(sheet);
|
|
2688
2692
|
import_logger7.logger.info("css", ctx.runtime.path.resolve(outfile));
|
|
2689
|
-
await ctx.
|
|
2693
|
+
await ctx.output.writeFile(outfile, css);
|
|
2690
2694
|
} else {
|
|
2691
2695
|
await ctx.writeCss(sheet);
|
|
2692
2696
|
}
|
|
@@ -2779,7 +2783,6 @@ async function generate(config, configPath) {
|
|
|
2779
2783
|
{ cwd, poll }
|
|
2780
2784
|
);
|
|
2781
2785
|
const bundleStyles = async (ctx2, changedFilePath) => {
|
|
2782
|
-
const outfile = ctx2.runtime.path.join(...ctx2.paths.root, "styles.css");
|
|
2783
2786
|
const parserResult = ctx2.project.parseSourceFile(changedFilePath);
|
|
2784
2787
|
if (parserResult) {
|
|
2785
2788
|
const done = import_logger9.logger.time.info(ctx2.messages.buildComplete(1));
|
|
@@ -2787,8 +2790,7 @@ async function generate(config, configPath) {
|
|
|
2787
2790
|
ctx2.appendLayerParams(sheet);
|
|
2788
2791
|
ctx2.appendBaselineCss(sheet);
|
|
2789
2792
|
ctx2.appendParserCss(sheet);
|
|
2790
|
-
|
|
2791
|
-
await ctx2.runtime.fs.writeFile(outfile, css);
|
|
2793
|
+
await ctx2.writeCss(sheet);
|
|
2792
2794
|
done();
|
|
2793
2795
|
}
|
|
2794
2796
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -320,10 +320,8 @@ function analyze(ctx, options = {}) {
|
|
|
320
320
|
return { report, formatted: formatTokenReport(report.getSummary(), format) };
|
|
321
321
|
},
|
|
322
322
|
writeReport(filePath) {
|
|
323
|
-
const dirname2 = ctx.runtime.path.dirname(filePath);
|
|
324
|
-
ctx.runtime.fs.ensureDirSync(dirname2);
|
|
325
323
|
const str = JSON.stringify(reporter.report, replacer, 2);
|
|
326
|
-
return ctx.
|
|
324
|
+
return ctx.output.writeFile(filePath, str);
|
|
327
325
|
}
|
|
328
326
|
};
|
|
329
327
|
}
|
|
@@ -346,8 +344,7 @@ async function buildInfo(ctx, outfile) {
|
|
|
346
344
|
ctx.staticCss.process(staticCss);
|
|
347
345
|
}
|
|
348
346
|
const output = JSON.stringify(ctx.encoder.toJSON(), null, minify ? 0 : 2);
|
|
349
|
-
ctx.output.
|
|
350
|
-
await ctx.runtime.fs.writeFile(outfile, output);
|
|
347
|
+
await ctx.output.writeFile(outfile, output);
|
|
351
348
|
logger.info("cli", "Done!");
|
|
352
349
|
}
|
|
353
350
|
|
|
@@ -1896,6 +1893,14 @@ var OutputEngine = class {
|
|
|
1896
1893
|
this.fs.ensureDirSync(dirname2);
|
|
1897
1894
|
return outPath;
|
|
1898
1895
|
};
|
|
1896
|
+
writeFile = (filePath, code) => {
|
|
1897
|
+
this.fs.ensureDirSync(this.path.dirname(filePath));
|
|
1898
|
+
if (this.fs.existsSync(filePath) && this.fs.readFileSync(filePath) === code) {
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
logger3.debug("write:file", filePath);
|
|
1902
|
+
return this.fs.writeFile(filePath, code);
|
|
1903
|
+
};
|
|
1899
1904
|
write = (output) => {
|
|
1900
1905
|
if (!output) return;
|
|
1901
1906
|
const { dir = this.paths.root, files } = output;
|
|
@@ -1905,8 +1910,7 @@ var OutputEngine = class {
|
|
|
1905
1910
|
if (!artifact?.code) return;
|
|
1906
1911
|
const { file, code } = artifact;
|
|
1907
1912
|
const absPath = this.path.join(...dir, file);
|
|
1908
|
-
|
|
1909
|
-
return this.fs.writeFile(absPath, code);
|
|
1913
|
+
return this.writeFile(absPath, code);
|
|
1910
1914
|
})
|
|
1911
1915
|
);
|
|
1912
1916
|
};
|
|
@@ -2644,7 +2648,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2644
2648
|
if (outfile) {
|
|
2645
2649
|
const css = ctx.getCss(sheet);
|
|
2646
2650
|
logger7.info("css", ctx.runtime.path.resolve(outfile));
|
|
2647
|
-
await ctx.
|
|
2651
|
+
await ctx.output.writeFile(outfile, css);
|
|
2648
2652
|
} else {
|
|
2649
2653
|
await ctx.writeCss(sheet);
|
|
2650
2654
|
}
|
|
@@ -2662,7 +2666,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2662
2666
|
} else if (outfile) {
|
|
2663
2667
|
const css = ctx.getCss(sheet);
|
|
2664
2668
|
logger7.info("css", ctx.runtime.path.resolve(outfile));
|
|
2665
|
-
await ctx.
|
|
2669
|
+
await ctx.output.writeFile(outfile, css);
|
|
2666
2670
|
} else {
|
|
2667
2671
|
await ctx.writeCss(sheet);
|
|
2668
2672
|
}
|
|
@@ -2755,7 +2759,6 @@ async function generate(config, configPath) {
|
|
|
2755
2759
|
{ cwd, poll }
|
|
2756
2760
|
);
|
|
2757
2761
|
const bundleStyles = async (ctx2, changedFilePath) => {
|
|
2758
|
-
const outfile = ctx2.runtime.path.join(...ctx2.paths.root, "styles.css");
|
|
2759
2762
|
const parserResult = ctx2.project.parseSourceFile(changedFilePath);
|
|
2760
2763
|
if (parserResult) {
|
|
2761
2764
|
const done = logger9.time.info(ctx2.messages.buildComplete(1));
|
|
@@ -2763,8 +2766,7 @@ async function generate(config, configPath) {
|
|
|
2763
2766
|
ctx2.appendLayerParams(sheet);
|
|
2764
2767
|
ctx2.appendBaselineCss(sheet);
|
|
2765
2768
|
ctx2.appendParserCss(sheet);
|
|
2766
|
-
|
|
2767
|
-
await ctx2.runtime.fs.writeFile(outfile, css);
|
|
2769
|
+
await ctx2.writeCss(sheet);
|
|
2768
2770
|
done();
|
|
2769
2771
|
}
|
|
2770
2772
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"ts-morph": "28.0.0",
|
|
54
54
|
"ts-pattern": "5.9.0",
|
|
55
55
|
"get-tsconfig": "^4.13.0",
|
|
56
|
-
"@pandacss/config": "1.11.
|
|
57
|
-
"@pandacss/core": "1.11.
|
|
58
|
-
"@pandacss/generator": "1.11.
|
|
59
|
-
"@pandacss/plugin-lightningcss": "1.11.
|
|
60
|
-
"@pandacss/plugin-svelte": "1.11.
|
|
61
|
-
"@pandacss/plugin-vue": "1.11.
|
|
62
|
-
"@pandacss/reporter": "1.11.
|
|
63
|
-
"@pandacss/logger": "1.11.
|
|
64
|
-
"@pandacss/parser": "1.11.
|
|
65
|
-
"@pandacss/shared": "1.11.
|
|
66
|
-
"@pandacss/token-dictionary": "1.11.
|
|
67
|
-
"@pandacss/types": "1.11.
|
|
56
|
+
"@pandacss/config": "1.11.4",
|
|
57
|
+
"@pandacss/core": "1.11.4",
|
|
58
|
+
"@pandacss/generator": "1.11.4",
|
|
59
|
+
"@pandacss/plugin-lightningcss": "1.11.4",
|
|
60
|
+
"@pandacss/plugin-svelte": "1.11.4",
|
|
61
|
+
"@pandacss/plugin-vue": "1.11.4",
|
|
62
|
+
"@pandacss/reporter": "1.11.4",
|
|
63
|
+
"@pandacss/logger": "1.11.4",
|
|
64
|
+
"@pandacss/parser": "1.11.4",
|
|
65
|
+
"@pandacss/shared": "1.11.4",
|
|
66
|
+
"@pandacss/token-dictionary": "1.11.4",
|
|
67
|
+
"@pandacss/types": "1.11.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/picomatch": "4.0.2",
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
"@types/pluralize": "0.0.33",
|
|
76
76
|
"boxen": "8.0.1"
|
|
77
77
|
},
|
|
78
|
+
"engines": {
|
|
79
|
+
"node": ">=20"
|
|
80
|
+
},
|
|
78
81
|
"scripts": {
|
|
79
82
|
"build": "tsup --tsconfig tsconfig.build.json src/index.ts --format=cjs,esm --shims --dts",
|
|
80
83
|
"build-fast": "tsup --tsconfig tsconfig.build.json src/index.ts --format=cjs,esm --shims --no-dts",
|