@pandacss/node 1.11.4 → 1.11.5
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 +30 -244
- package/dist/index.mjs +33 -241
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -1859,8 +1859,8 @@ var nodeRuntime = {
|
|
|
1859
1859
|
readDirSync: import_fs_extra.default.readdirSync,
|
|
1860
1860
|
rmDirSync: import_fs_extra.default.emptyDirSync,
|
|
1861
1861
|
rmFileSync: import_fs_extra.default.removeSync,
|
|
1862
|
-
ensureDirSync(
|
|
1863
|
-
return import_fs_extra.default.ensureDirSync(
|
|
1862
|
+
ensureDirSync(path4) {
|
|
1863
|
+
return import_fs_extra.default.ensureDirSync(path4);
|
|
1864
1864
|
},
|
|
1865
1865
|
watch(options) {
|
|
1866
1866
|
const { include, exclude, cwd, poll } = options;
|
|
@@ -1871,8 +1871,8 @@ var nodeRuntime = {
|
|
|
1871
1871
|
const watcher = import_chokidar.default.watch(dirnames, {
|
|
1872
1872
|
usePolling: poll,
|
|
1873
1873
|
cwd,
|
|
1874
|
-
ignored(
|
|
1875
|
-
const relativePath = (0, import_path2.relative)(workingDir,
|
|
1874
|
+
ignored(path4, stats) {
|
|
1875
|
+
const relativePath = (0, import_path2.relative)(workingDir, path4);
|
|
1876
1876
|
return !!stats?.isFile() && !isValidPath(relativePath);
|
|
1877
1877
|
},
|
|
1878
1878
|
ignoreInitial: true,
|
|
@@ -2026,13 +2026,13 @@ var PandaContext = class extends import_generator2.Generator {
|
|
|
2026
2026
|
});
|
|
2027
2027
|
};
|
|
2028
2028
|
writeSplitCss = async (sheet) => {
|
|
2029
|
-
const { path: pathUtil, fs:
|
|
2029
|
+
const { path: pathUtil, fs: fs3 } = this.runtime;
|
|
2030
2030
|
const rootDir = this.paths.root;
|
|
2031
2031
|
const stylesDir = [...rootDir, "styles"];
|
|
2032
2032
|
const artifacts = this.getSplitCssArtifacts(sheet);
|
|
2033
2033
|
const subDirs = new Set([...artifacts.recipes, ...artifacts.themes].map((a) => a.dir).filter(Boolean));
|
|
2034
|
-
|
|
2035
|
-
subDirs.forEach((dir) =>
|
|
2034
|
+
fs3.ensureDirSync(pathUtil.join(...stylesDir));
|
|
2035
|
+
subDirs.forEach((dir) => fs3.ensureDirSync(pathUtil.join(...stylesDir, dir)));
|
|
2036
2036
|
const styleFiles = [];
|
|
2037
2037
|
for (const layer of artifacts.layers) {
|
|
2038
2038
|
styleFiles.push({ file: layer.file, code: layer.code });
|
|
@@ -2102,226 +2102,12 @@ var PandaContext = class extends import_generator2.Generator {
|
|
|
2102
2102
|
// src/load-tsconfig.ts
|
|
2103
2103
|
init_cjs_shims();
|
|
2104
2104
|
var import_config2 = require("@pandacss/config");
|
|
2105
|
-
var import_node_path2 = __toESM(require("path"));
|
|
2106
|
-
|
|
2107
|
-
// src/tsconfig-utils.ts
|
|
2108
|
-
init_cjs_shims();
|
|
2109
|
-
var import_node_fs = require("fs");
|
|
2110
2105
|
var import_node_path = __toESM(require("path"));
|
|
2111
|
-
async function resolveDirectTsconfigJson(filename) {
|
|
2112
|
-
if (import_node_path.default.extname(filename) !== ".json") return null;
|
|
2113
|
-
const resolved = import_node_path.default.resolve(filename);
|
|
2114
|
-
try {
|
|
2115
|
-
const stat = await import_node_fs.promises.stat(resolved);
|
|
2116
|
-
if (stat.isFile() || stat.isFIFO()) return resolved;
|
|
2117
|
-
throw new Error(`${filename} exists but is not a regular file.`);
|
|
2118
|
-
} catch (e) {
|
|
2119
|
-
if (e && typeof e === "object" && "code" in e && e.code === "ENOENT") {
|
|
2120
|
-
return null;
|
|
2121
|
-
}
|
|
2122
|
-
throw e;
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
async function findClosestTsconfig(filename, root, configName = "tsconfig.json") {
|
|
2126
|
-
const resolvedRoot = import_node_path.default.resolve(root);
|
|
2127
|
-
let dir = import_node_path.default.dirname(import_node_path.default.resolve(filename));
|
|
2128
|
-
for (; ; ) {
|
|
2129
|
-
const candidate = import_node_path.default.join(dir, configName);
|
|
2130
|
-
try {
|
|
2131
|
-
const stat = await import_node_fs.promises.stat(candidate);
|
|
2132
|
-
if (stat.isFile() || stat.isFIFO()) {
|
|
2133
|
-
return candidate;
|
|
2134
|
-
}
|
|
2135
|
-
} catch {
|
|
2136
|
-
}
|
|
2137
|
-
if (dir === resolvedRoot || import_node_path.default.dirname(dir) === dir) {
|
|
2138
|
-
return null;
|
|
2139
|
-
}
|
|
2140
|
-
dir = import_node_path.default.dirname(dir);
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
function resolveBaseUrlForCompilerOptions(baseUrl, tsconfigFile, cwd) {
|
|
2144
|
-
if (baseUrl == null) return cwd;
|
|
2145
|
-
if (baseUrl.startsWith("${")) return baseUrl;
|
|
2146
|
-
if (import_node_path.default.isAbsolute(baseUrl)) return baseUrl;
|
|
2147
|
-
return import_node_path.default.resolve(import_node_path.default.dirname(tsconfigFile), baseUrl);
|
|
2148
|
-
}
|
|
2149
|
-
var SOURCE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
|
|
2150
|
-
function resolveReferencedTsconfigPath(refPath, fromDir, configName = "tsconfig.json") {
|
|
2151
|
-
const p = refPath.endsWith(".json") ? refPath : import_node_path.default.join(refPath, configName);
|
|
2152
|
-
return import_node_path.default.resolve(fromDir, p);
|
|
2153
|
-
}
|
|
2154
|
-
async function resolveSolutionTsconfigForFile(absoluteFilename, rootTsconfigPath, rootParsed, getTsconfigModule) {
|
|
2155
|
-
const { parseTsconfig } = getTsconfigModule;
|
|
2156
|
-
if (isSourceFileIncludedInTsconfig(absoluteFilename, rootTsconfigPath, rootParsed)) {
|
|
2157
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2158
|
-
}
|
|
2159
|
-
const refs = rootParsed.references;
|
|
2160
|
-
if (!refs?.length) {
|
|
2161
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2162
|
-
}
|
|
2163
|
-
if (!SOURCE_EXTENSIONS.some((ext) => absoluteFilename.endsWith(ext))) {
|
|
2164
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2165
|
-
}
|
|
2166
|
-
const rootDir = import_node_path.default.dirname(rootTsconfigPath);
|
|
2167
|
-
for (const ref of refs) {
|
|
2168
|
-
const refPath = resolveReferencedTsconfigPath(ref.path, rootDir);
|
|
2169
|
-
try {
|
|
2170
|
-
await import_node_fs.promises.access(refPath);
|
|
2171
|
-
} catch {
|
|
2172
|
-
continue;
|
|
2173
|
-
}
|
|
2174
|
-
const childParsed = parseTsconfig(refPath);
|
|
2175
|
-
if (isSourceFileIncludedInTsconfig(absoluteFilename, refPath, childParsed)) {
|
|
2176
|
-
return { tsconfig: childParsed, tsconfigFile: refPath };
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2180
|
-
}
|
|
2181
|
-
var POSIX_SEP_RE = new RegExp("\\" + import_node_path.default.posix.sep, "g");
|
|
2182
|
-
var NATIVE_SEP_RE = new RegExp("\\" + import_node_path.default.sep, "g");
|
|
2183
|
-
var PATTERN_REGEX_CACHE = /* @__PURE__ */ new Map();
|
|
2184
|
-
var GLOB_ALL_PATTERN = `**/*`;
|
|
2185
|
-
var TS_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
|
|
2186
|
-
var JS_EXTENSIONS = [".js", ".jsx", ".mjs", ".cjs"];
|
|
2187
|
-
var TSJS_EXTENSIONS = TS_EXTENSIONS.concat(JS_EXTENSIONS);
|
|
2188
|
-
var TS_EXTENSIONS_RE_GROUP = `\\.(?:${TS_EXTENSIONS.map((ext) => ext.slice(1)).join("|")})`;
|
|
2189
|
-
var TSJS_EXTENSIONS_RE_GROUP = `\\.(?:${TSJS_EXTENSIONS.map((ext) => ext.slice(1)).join("|")})`;
|
|
2190
|
-
var IS_POSIX = import_node_path.default.posix.sep === import_node_path.default.sep;
|
|
2191
|
-
var native2posix = IS_POSIX ? (filename) => filename : (filename) => filename.replace(NATIVE_SEP_RE, import_node_path.default.posix.sep);
|
|
2192
|
-
var resolve2posix = IS_POSIX ? (dir, filename) => dir ? import_node_path.default.resolve(dir, filename) : import_node_path.default.resolve(filename) : (dir, filename) => {
|
|
2193
|
-
const posix2native = (f) => f.replace(POSIX_SEP_RE, import_node_path.default.sep);
|
|
2194
|
-
return native2posix(
|
|
2195
|
-
dir ? import_node_path.default.resolve(posix2native(dir), posix2native(filename)) : import_node_path.default.resolve(posix2native(filename))
|
|
2196
|
-
);
|
|
2197
|
-
};
|
|
2198
|
-
function isGlobMatch(filename, dir, patterns, allowJs) {
|
|
2199
|
-
const extensions = allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS;
|
|
2200
|
-
return patterns.some((patternArg) => {
|
|
2201
|
-
let pattern = patternArg;
|
|
2202
|
-
let lastWildcardIndex = pattern.length;
|
|
2203
|
-
let hasWildcard = false;
|
|
2204
|
-
let hasExtension = false;
|
|
2205
|
-
let hasSlash = false;
|
|
2206
|
-
let lastSlashIndex = -1;
|
|
2207
|
-
for (let i = pattern.length - 1; i > -1; i--) {
|
|
2208
|
-
const c = pattern[i];
|
|
2209
|
-
if (!hasWildcard) {
|
|
2210
|
-
if (c === "*" || c === "?") {
|
|
2211
|
-
lastWildcardIndex = i;
|
|
2212
|
-
hasWildcard = true;
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
if (!hasSlash) {
|
|
2216
|
-
if (c === ".") {
|
|
2217
|
-
hasExtension = true;
|
|
2218
|
-
} else if (c === "/") {
|
|
2219
|
-
lastSlashIndex = i;
|
|
2220
|
-
hasSlash = true;
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
if (hasWildcard && hasSlash) {
|
|
2224
|
-
break;
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) {
|
|
2228
|
-
pattern += `${pattern.endsWith("/") ? "" : "/"}${GLOB_ALL_PATTERN}`;
|
|
2229
|
-
lastWildcardIndex = pattern.length - 1;
|
|
2230
|
-
hasWildcard = true;
|
|
2231
|
-
}
|
|
2232
|
-
if (lastWildcardIndex < pattern.length - 1 && !filename.endsWith(pattern.slice(lastWildcardIndex + 1))) {
|
|
2233
|
-
return false;
|
|
2234
|
-
}
|
|
2235
|
-
if (pattern.endsWith("*") && !extensions.some((ext) => filename.endsWith(ext))) {
|
|
2236
|
-
return false;
|
|
2237
|
-
}
|
|
2238
|
-
if (pattern === GLOB_ALL_PATTERN) {
|
|
2239
|
-
return filename.startsWith(`${dir}/`);
|
|
2240
|
-
}
|
|
2241
|
-
const resolvedPattern = resolve2posix(dir, pattern);
|
|
2242
|
-
let firstWildcardIndex = -1;
|
|
2243
|
-
for (let i = 0; i < resolvedPattern.length; i++) {
|
|
2244
|
-
if (resolvedPattern[i] === "*" || resolvedPattern[i] === "?") {
|
|
2245
|
-
firstWildcardIndex = i;
|
|
2246
|
-
hasWildcard = true;
|
|
2247
|
-
break;
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
if (firstWildcardIndex > 1 && !filename.startsWith(resolvedPattern.slice(0, firstWildcardIndex - 1))) {
|
|
2251
|
-
return false;
|
|
2252
|
-
}
|
|
2253
|
-
if (!hasWildcard) {
|
|
2254
|
-
return filename === resolvedPattern;
|
|
2255
|
-
}
|
|
2256
|
-
if (firstWildcardIndex + GLOB_ALL_PATTERN.length === resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) && resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) === GLOB_ALL_PATTERN) {
|
|
2257
|
-
return true;
|
|
2258
|
-
}
|
|
2259
|
-
if (PATTERN_REGEX_CACHE.has(resolvedPattern)) {
|
|
2260
|
-
return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename);
|
|
2261
|
-
}
|
|
2262
|
-
const regex2 = pattern2regex(resolvedPattern, allowJs);
|
|
2263
|
-
PATTERN_REGEX_CACHE.set(resolvedPattern, regex2);
|
|
2264
|
-
return regex2.test(filename);
|
|
2265
|
-
});
|
|
2266
|
-
}
|
|
2267
|
-
function pattern2regex(resolvedPattern, allowJs) {
|
|
2268
|
-
let regexStr = "^";
|
|
2269
|
-
for (let i = 0; i < resolvedPattern.length; i++) {
|
|
2270
|
-
const char = resolvedPattern[i];
|
|
2271
|
-
if (char === "?") {
|
|
2272
|
-
regexStr += "[^\\/]";
|
|
2273
|
-
continue;
|
|
2274
|
-
}
|
|
2275
|
-
if (char === "*") {
|
|
2276
|
-
if (resolvedPattern[i + 1] === "*" && resolvedPattern[i + 2] === "/") {
|
|
2277
|
-
i += 2;
|
|
2278
|
-
regexStr += "(?:[^\\/]*\\/)*";
|
|
2279
|
-
continue;
|
|
2280
|
-
}
|
|
2281
|
-
regexStr += "[^\\/]*";
|
|
2282
|
-
continue;
|
|
2283
|
-
}
|
|
2284
|
-
if ("/.+^${}()|[]\\".includes(char)) {
|
|
2285
|
-
regexStr += "\\";
|
|
2286
|
-
}
|
|
2287
|
-
regexStr += char;
|
|
2288
|
-
}
|
|
2289
|
-
if (resolvedPattern.endsWith("*")) {
|
|
2290
|
-
regexStr += allowJs ? TSJS_EXTENSIONS_RE_GROUP : TS_EXTENSIONS_RE_GROUP;
|
|
2291
|
-
}
|
|
2292
|
-
regexStr += "$";
|
|
2293
|
-
return new RegExp(regexStr);
|
|
2294
|
-
}
|
|
2295
|
-
function isIncluded(filename, tsconfigFile, tsconfig) {
|
|
2296
|
-
const dir = native2posix(import_node_path.default.dirname(tsconfigFile));
|
|
2297
|
-
const files = (tsconfig.files || []).map((file) => resolve2posix(dir, file));
|
|
2298
|
-
const absoluteFilename = resolve2posix(null, filename);
|
|
2299
|
-
if (files.includes(filename)) {
|
|
2300
|
-
return true;
|
|
2301
|
-
}
|
|
2302
|
-
const allowJs = tsconfig.compilerOptions?.allowJs;
|
|
2303
|
-
const included = isGlobMatch(
|
|
2304
|
-
absoluteFilename,
|
|
2305
|
-
dir,
|
|
2306
|
-
tsconfig.include || (tsconfig.files ? [] : [GLOB_ALL_PATTERN]),
|
|
2307
|
-
allowJs
|
|
2308
|
-
);
|
|
2309
|
-
if (included) {
|
|
2310
|
-
const excluded = isGlobMatch(absoluteFilename, dir, tsconfig.exclude || [], allowJs);
|
|
2311
|
-
return !excluded;
|
|
2312
|
-
}
|
|
2313
|
-
return false;
|
|
2314
|
-
}
|
|
2315
|
-
function isSourceFileIncludedInTsconfig(absoluteFilename, tsconfigFile, tsconfig) {
|
|
2316
|
-
return isIncluded(absoluteFilename, tsconfigFile, tsconfig);
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
|
-
// src/load-tsconfig.ts
|
|
2320
2106
|
async function loadTsConfig(conf, cwd) {
|
|
2321
2107
|
const root = cwd;
|
|
2322
|
-
let tsconfigFile = await resolveDirectTsconfigJson(conf.path);
|
|
2108
|
+
let tsconfigFile = await (0, import_config2.resolveDirectTsconfigJson)(conf.path);
|
|
2323
2109
|
if (!tsconfigFile) {
|
|
2324
|
-
tsconfigFile = await findClosestTsconfig(conf.path, root, "tsconfig.json");
|
|
2110
|
+
tsconfigFile = await (0, import_config2.findClosestTsconfig)(conf.path, root, "tsconfig.json");
|
|
2325
2111
|
}
|
|
2326
2112
|
if (!tsconfigFile) {
|
|
2327
2113
|
return {
|
|
@@ -2331,8 +2117,8 @@ async function loadTsConfig(conf, cwd) {
|
|
|
2331
2117
|
}
|
|
2332
2118
|
const gtc = await import("get-tsconfig");
|
|
2333
2119
|
const rootParsed = gtc.parseTsconfig(tsconfigFile);
|
|
2334
|
-
const { tsconfig, tsconfigFile: effectiveTsconfigPath } = await resolveSolutionTsconfigForFile(
|
|
2335
|
-
|
|
2120
|
+
const { tsconfig, tsconfigFile: effectiveTsconfigPath } = await (0, import_config2.resolveSolutionTsconfigForFile)(
|
|
2121
|
+
import_node_path.default.resolve(conf.path),
|
|
2336
2122
|
tsconfigFile,
|
|
2337
2123
|
rootParsed,
|
|
2338
2124
|
gtc
|
|
@@ -2348,7 +2134,7 @@ async function loadTsConfig(conf, cwd) {
|
|
|
2348
2134
|
baseUrl,
|
|
2349
2135
|
pathMappings: (0, import_config2.convertTsPathsToRegexes)(
|
|
2350
2136
|
compilerOptions.paths,
|
|
2351
|
-
resolveBaseUrlForCompilerOptions(baseUrl, effectiveTsconfigPath, cwd)
|
|
2137
|
+
(0, import_config2.resolveBaseUrlForCompilerOptions)(baseUrl, effectiveTsconfigPath, cwd)
|
|
2352
2138
|
)
|
|
2353
2139
|
};
|
|
2354
2140
|
}
|
|
@@ -2586,8 +2372,8 @@ var Builder = class {
|
|
|
2586
2372
|
// src/cpu-profile.ts
|
|
2587
2373
|
init_cjs_shims();
|
|
2588
2374
|
var import_logger6 = require("@pandacss/logger");
|
|
2589
|
-
var
|
|
2590
|
-
var
|
|
2375
|
+
var import_node_fs = __toESM(require("fs"));
|
|
2376
|
+
var import_node_path2 = __toESM(require("path"));
|
|
2591
2377
|
var import_node_readline = __toESM(require("readline"));
|
|
2592
2378
|
var startProfiling = async (cwd, prefix, isWatching) => {
|
|
2593
2379
|
const inspector = await import("inspector").then((r) => r.default);
|
|
@@ -2651,8 +2437,8 @@ var startProfiling = async (cwd, prefix, isWatching) => {
|
|
|
2651
2437
|
const date = /* @__PURE__ */ new Date();
|
|
2652
2438
|
const timestamp = date.toISOString().replace(/[-:.]/g, "");
|
|
2653
2439
|
const title = `panda-${prefix}-${timestamp}`;
|
|
2654
|
-
const outfile =
|
|
2655
|
-
|
|
2440
|
+
const outfile = import_node_path2.default.join(cwd, `${title}.cpuprofile`);
|
|
2441
|
+
import_node_fs.default.writeFileSync(outfile, JSON.stringify(params.profile));
|
|
2656
2442
|
import_logger6.logger.info("cpu-prof", outfile);
|
|
2657
2443
|
cb?.();
|
|
2658
2444
|
});
|
|
@@ -2706,12 +2492,12 @@ async function debug(ctx, options) {
|
|
|
2706
2492
|
const files = ctx.getFiles();
|
|
2707
2493
|
const measureTotal = import_logger8.logger.time.debug(`Done parsing ${files.length} files`);
|
|
2708
2494
|
ctx.config.minify = false;
|
|
2709
|
-
const { fs:
|
|
2495
|
+
const { fs: fs3, path: path4 } = ctx.runtime;
|
|
2710
2496
|
const outdir = options.outdir;
|
|
2711
2497
|
if (!options.dry && outdir) {
|
|
2712
|
-
|
|
2498
|
+
fs3.ensureDirSync(outdir);
|
|
2713
2499
|
import_logger8.logger.info("cli", `Writing ${import_logger8.colors.bold(`${outdir}/config.json`)}`);
|
|
2714
|
-
await
|
|
2500
|
+
await fs3.writeFile(`${outdir}/config.json`, JSON.stringify(ctx.config, null, 2));
|
|
2715
2501
|
}
|
|
2716
2502
|
if (options.onlyConfig) {
|
|
2717
2503
|
measureTotal();
|
|
@@ -2734,14 +2520,14 @@ async function debug(ctx, options) {
|
|
|
2734
2520
|
if (outdir) {
|
|
2735
2521
|
filesWithCss.push(file);
|
|
2736
2522
|
const parsedPath = (0, import_path5.parse)(file);
|
|
2737
|
-
const relative2 =
|
|
2738
|
-
const astJsonPath = `${relative2}${
|
|
2739
|
-
const cssPath = `${relative2}${
|
|
2523
|
+
const relative2 = path4.relative(ctx.config.cwd, parsedPath.dir);
|
|
2524
|
+
const astJsonPath = `${relative2}${path4.sep}${parsedPath.name}.ast.json`.replaceAll(path4.sep, "__");
|
|
2525
|
+
const cssPath = `${relative2}${path4.sep}${parsedPath.name}.css`.replaceAll(path4.sep, "__");
|
|
2740
2526
|
import_logger8.logger.info("cli", `Writing ${import_logger8.colors.bold(`${outdir}/${astJsonPath}`)}`);
|
|
2741
2527
|
import_logger8.logger.info("cli", `Writing ${import_logger8.colors.bold(`${outdir}/${cssPath}`)}`);
|
|
2742
2528
|
return Promise.allSettled([
|
|
2743
|
-
|
|
2744
|
-
|
|
2529
|
+
fs3.writeFile(`${outdir}${path4.sep}${astJsonPath}`, JSON.stringify(result.toJSON(), null, 2)),
|
|
2530
|
+
fs3.writeFile(`${outdir}${path4.sep}${cssPath}`, css)
|
|
2745
2531
|
]);
|
|
2746
2532
|
}
|
|
2747
2533
|
});
|
|
@@ -2836,16 +2622,16 @@ function setupGitIgnore(ctx) {
|
|
|
2836
2622
|
// src/logstream.ts
|
|
2837
2623
|
init_cjs_shims();
|
|
2838
2624
|
var import_logger10 = require("@pandacss/logger");
|
|
2839
|
-
var
|
|
2840
|
-
var
|
|
2625
|
+
var import_node_fs2 = __toESM(require("fs"));
|
|
2626
|
+
var import_node_path3 = __toESM(require("path"));
|
|
2841
2627
|
var setLogStream = (options) => {
|
|
2842
2628
|
const { cwd = process.cwd() } = options;
|
|
2843
2629
|
let stream;
|
|
2844
2630
|
if (options.logfile) {
|
|
2845
|
-
const outPath =
|
|
2631
|
+
const outPath = import_node_path3.default.resolve(cwd, options.logfile);
|
|
2846
2632
|
ensure(outPath);
|
|
2847
2633
|
import_logger10.logger.info("logfile", outPath);
|
|
2848
|
-
stream =
|
|
2634
|
+
stream = import_node_fs2.default.createWriteStream(outPath, { flags: "a" });
|
|
2849
2635
|
import_logger10.logger.onLog = (entry) => {
|
|
2850
2636
|
stream?.write(JSON.stringify(entry) + "\n");
|
|
2851
2637
|
};
|
|
@@ -2863,8 +2649,8 @@ var setLogStream = (options) => {
|
|
|
2863
2649
|
};
|
|
2864
2650
|
};
|
|
2865
2651
|
var ensure = (outPath) => {
|
|
2866
|
-
const dirname2 =
|
|
2867
|
-
|
|
2652
|
+
const dirname2 = import_node_path3.default.dirname(outPath);
|
|
2653
|
+
import_node_fs2.default.mkdirSync(dirname2, { recursive: true });
|
|
2868
2654
|
return outPath;
|
|
2869
2655
|
};
|
|
2870
2656
|
|
package/dist/index.mjs
CHANGED
|
@@ -1835,8 +1835,8 @@ var nodeRuntime = {
|
|
|
1835
1835
|
readDirSync: fsExtra.readdirSync,
|
|
1836
1836
|
rmDirSync: fsExtra.emptyDirSync,
|
|
1837
1837
|
rmFileSync: fsExtra.removeSync,
|
|
1838
|
-
ensureDirSync(
|
|
1839
|
-
return fsExtra.ensureDirSync(
|
|
1838
|
+
ensureDirSync(path5) {
|
|
1839
|
+
return fsExtra.ensureDirSync(path5);
|
|
1840
1840
|
},
|
|
1841
1841
|
watch(options) {
|
|
1842
1842
|
const { include, exclude, cwd, poll } = options;
|
|
@@ -1847,8 +1847,8 @@ var nodeRuntime = {
|
|
|
1847
1847
|
const watcher = chokidar.watch(dirnames, {
|
|
1848
1848
|
usePolling: poll,
|
|
1849
1849
|
cwd,
|
|
1850
|
-
ignored(
|
|
1851
|
-
const relativePath = relative(workingDir,
|
|
1850
|
+
ignored(path5, stats) {
|
|
1851
|
+
const relativePath = relative(workingDir, path5);
|
|
1852
1852
|
return !!stats?.isFile() && !isValidPath(relativePath);
|
|
1853
1853
|
},
|
|
1854
1854
|
ignoreInitial: true,
|
|
@@ -2002,13 +2002,13 @@ var PandaContext = class extends Generator2 {
|
|
|
2002
2002
|
});
|
|
2003
2003
|
};
|
|
2004
2004
|
writeSplitCss = async (sheet) => {
|
|
2005
|
-
const { path: pathUtil, fs:
|
|
2005
|
+
const { path: pathUtil, fs: fs3 } = this.runtime;
|
|
2006
2006
|
const rootDir = this.paths.root;
|
|
2007
2007
|
const stylesDir = [...rootDir, "styles"];
|
|
2008
2008
|
const artifacts = this.getSplitCssArtifacts(sheet);
|
|
2009
2009
|
const subDirs = new Set([...artifacts.recipes, ...artifacts.themes].map((a) => a.dir).filter(Boolean));
|
|
2010
|
-
|
|
2011
|
-
subDirs.forEach((dir) =>
|
|
2010
|
+
fs3.ensureDirSync(pathUtil.join(...stylesDir));
|
|
2011
|
+
subDirs.forEach((dir) => fs3.ensureDirSync(pathUtil.join(...stylesDir, dir)));
|
|
2012
2012
|
const styleFiles = [];
|
|
2013
2013
|
for (const layer of artifacts.layers) {
|
|
2014
2014
|
styleFiles.push({ file: layer.file, code: layer.code });
|
|
@@ -2077,222 +2077,14 @@ var PandaContext = class extends Generator2 {
|
|
|
2077
2077
|
|
|
2078
2078
|
// src/load-tsconfig.ts
|
|
2079
2079
|
init_esm_shims();
|
|
2080
|
-
import {
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2080
|
+
import {
|
|
2081
|
+
convertTsPathsToRegexes,
|
|
2082
|
+
findClosestTsconfig,
|
|
2083
|
+
resolveBaseUrlForCompilerOptions,
|
|
2084
|
+
resolveDirectTsconfigJson,
|
|
2085
|
+
resolveSolutionTsconfigForFile
|
|
2086
|
+
} from "@pandacss/config";
|
|
2086
2087
|
import path2 from "path";
|
|
2087
|
-
async function resolveDirectTsconfigJson(filename) {
|
|
2088
|
-
if (path2.extname(filename) !== ".json") return null;
|
|
2089
|
-
const resolved = path2.resolve(filename);
|
|
2090
|
-
try {
|
|
2091
|
-
const stat = await fs.stat(resolved);
|
|
2092
|
-
if (stat.isFile() || stat.isFIFO()) return resolved;
|
|
2093
|
-
throw new Error(`${filename} exists but is not a regular file.`);
|
|
2094
|
-
} catch (e) {
|
|
2095
|
-
if (e && typeof e === "object" && "code" in e && e.code === "ENOENT") {
|
|
2096
|
-
return null;
|
|
2097
|
-
}
|
|
2098
|
-
throw e;
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
async function findClosestTsconfig(filename, root, configName = "tsconfig.json") {
|
|
2102
|
-
const resolvedRoot = path2.resolve(root);
|
|
2103
|
-
let dir = path2.dirname(path2.resolve(filename));
|
|
2104
|
-
for (; ; ) {
|
|
2105
|
-
const candidate = path2.join(dir, configName);
|
|
2106
|
-
try {
|
|
2107
|
-
const stat = await fs.stat(candidate);
|
|
2108
|
-
if (stat.isFile() || stat.isFIFO()) {
|
|
2109
|
-
return candidate;
|
|
2110
|
-
}
|
|
2111
|
-
} catch {
|
|
2112
|
-
}
|
|
2113
|
-
if (dir === resolvedRoot || path2.dirname(dir) === dir) {
|
|
2114
|
-
return null;
|
|
2115
|
-
}
|
|
2116
|
-
dir = path2.dirname(dir);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
function resolveBaseUrlForCompilerOptions(baseUrl, tsconfigFile, cwd) {
|
|
2120
|
-
if (baseUrl == null) return cwd;
|
|
2121
|
-
if (baseUrl.startsWith("${")) return baseUrl;
|
|
2122
|
-
if (path2.isAbsolute(baseUrl)) return baseUrl;
|
|
2123
|
-
return path2.resolve(path2.dirname(tsconfigFile), baseUrl);
|
|
2124
|
-
}
|
|
2125
|
-
var SOURCE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
|
|
2126
|
-
function resolveReferencedTsconfigPath(refPath, fromDir, configName = "tsconfig.json") {
|
|
2127
|
-
const p = refPath.endsWith(".json") ? refPath : path2.join(refPath, configName);
|
|
2128
|
-
return path2.resolve(fromDir, p);
|
|
2129
|
-
}
|
|
2130
|
-
async function resolveSolutionTsconfigForFile(absoluteFilename, rootTsconfigPath, rootParsed, getTsconfigModule) {
|
|
2131
|
-
const { parseTsconfig } = getTsconfigModule;
|
|
2132
|
-
if (isSourceFileIncludedInTsconfig(absoluteFilename, rootTsconfigPath, rootParsed)) {
|
|
2133
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2134
|
-
}
|
|
2135
|
-
const refs = rootParsed.references;
|
|
2136
|
-
if (!refs?.length) {
|
|
2137
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2138
|
-
}
|
|
2139
|
-
if (!SOURCE_EXTENSIONS.some((ext) => absoluteFilename.endsWith(ext))) {
|
|
2140
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2141
|
-
}
|
|
2142
|
-
const rootDir = path2.dirname(rootTsconfigPath);
|
|
2143
|
-
for (const ref of refs) {
|
|
2144
|
-
const refPath = resolveReferencedTsconfigPath(ref.path, rootDir);
|
|
2145
|
-
try {
|
|
2146
|
-
await fs.access(refPath);
|
|
2147
|
-
} catch {
|
|
2148
|
-
continue;
|
|
2149
|
-
}
|
|
2150
|
-
const childParsed = parseTsconfig(refPath);
|
|
2151
|
-
if (isSourceFileIncludedInTsconfig(absoluteFilename, refPath, childParsed)) {
|
|
2152
|
-
return { tsconfig: childParsed, tsconfigFile: refPath };
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
return { tsconfig: rootParsed, tsconfigFile: rootTsconfigPath };
|
|
2156
|
-
}
|
|
2157
|
-
var POSIX_SEP_RE = new RegExp("\\" + path2.posix.sep, "g");
|
|
2158
|
-
var NATIVE_SEP_RE = new RegExp("\\" + path2.sep, "g");
|
|
2159
|
-
var PATTERN_REGEX_CACHE = /* @__PURE__ */ new Map();
|
|
2160
|
-
var GLOB_ALL_PATTERN = `**/*`;
|
|
2161
|
-
var TS_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
|
|
2162
|
-
var JS_EXTENSIONS = [".js", ".jsx", ".mjs", ".cjs"];
|
|
2163
|
-
var TSJS_EXTENSIONS = TS_EXTENSIONS.concat(JS_EXTENSIONS);
|
|
2164
|
-
var TS_EXTENSIONS_RE_GROUP = `\\.(?:${TS_EXTENSIONS.map((ext) => ext.slice(1)).join("|")})`;
|
|
2165
|
-
var TSJS_EXTENSIONS_RE_GROUP = `\\.(?:${TSJS_EXTENSIONS.map((ext) => ext.slice(1)).join("|")})`;
|
|
2166
|
-
var IS_POSIX = path2.posix.sep === path2.sep;
|
|
2167
|
-
var native2posix = IS_POSIX ? (filename) => filename : (filename) => filename.replace(NATIVE_SEP_RE, path2.posix.sep);
|
|
2168
|
-
var resolve2posix = IS_POSIX ? (dir, filename) => dir ? path2.resolve(dir, filename) : path2.resolve(filename) : (dir, filename) => {
|
|
2169
|
-
const posix2native = (f) => f.replace(POSIX_SEP_RE, path2.sep);
|
|
2170
|
-
return native2posix(
|
|
2171
|
-
dir ? path2.resolve(posix2native(dir), posix2native(filename)) : path2.resolve(posix2native(filename))
|
|
2172
|
-
);
|
|
2173
|
-
};
|
|
2174
|
-
function isGlobMatch(filename, dir, patterns, allowJs) {
|
|
2175
|
-
const extensions = allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS;
|
|
2176
|
-
return patterns.some((patternArg) => {
|
|
2177
|
-
let pattern = patternArg;
|
|
2178
|
-
let lastWildcardIndex = pattern.length;
|
|
2179
|
-
let hasWildcard = false;
|
|
2180
|
-
let hasExtension = false;
|
|
2181
|
-
let hasSlash = false;
|
|
2182
|
-
let lastSlashIndex = -1;
|
|
2183
|
-
for (let i = pattern.length - 1; i > -1; i--) {
|
|
2184
|
-
const c = pattern[i];
|
|
2185
|
-
if (!hasWildcard) {
|
|
2186
|
-
if (c === "*" || c === "?") {
|
|
2187
|
-
lastWildcardIndex = i;
|
|
2188
|
-
hasWildcard = true;
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
if (!hasSlash) {
|
|
2192
|
-
if (c === ".") {
|
|
2193
|
-
hasExtension = true;
|
|
2194
|
-
} else if (c === "/") {
|
|
2195
|
-
lastSlashIndex = i;
|
|
2196
|
-
hasSlash = true;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
if (hasWildcard && hasSlash) {
|
|
2200
|
-
break;
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) {
|
|
2204
|
-
pattern += `${pattern.endsWith("/") ? "" : "/"}${GLOB_ALL_PATTERN}`;
|
|
2205
|
-
lastWildcardIndex = pattern.length - 1;
|
|
2206
|
-
hasWildcard = true;
|
|
2207
|
-
}
|
|
2208
|
-
if (lastWildcardIndex < pattern.length - 1 && !filename.endsWith(pattern.slice(lastWildcardIndex + 1))) {
|
|
2209
|
-
return false;
|
|
2210
|
-
}
|
|
2211
|
-
if (pattern.endsWith("*") && !extensions.some((ext) => filename.endsWith(ext))) {
|
|
2212
|
-
return false;
|
|
2213
|
-
}
|
|
2214
|
-
if (pattern === GLOB_ALL_PATTERN) {
|
|
2215
|
-
return filename.startsWith(`${dir}/`);
|
|
2216
|
-
}
|
|
2217
|
-
const resolvedPattern = resolve2posix(dir, pattern);
|
|
2218
|
-
let firstWildcardIndex = -1;
|
|
2219
|
-
for (let i = 0; i < resolvedPattern.length; i++) {
|
|
2220
|
-
if (resolvedPattern[i] === "*" || resolvedPattern[i] === "?") {
|
|
2221
|
-
firstWildcardIndex = i;
|
|
2222
|
-
hasWildcard = true;
|
|
2223
|
-
break;
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
if (firstWildcardIndex > 1 && !filename.startsWith(resolvedPattern.slice(0, firstWildcardIndex - 1))) {
|
|
2227
|
-
return false;
|
|
2228
|
-
}
|
|
2229
|
-
if (!hasWildcard) {
|
|
2230
|
-
return filename === resolvedPattern;
|
|
2231
|
-
}
|
|
2232
|
-
if (firstWildcardIndex + GLOB_ALL_PATTERN.length === resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) && resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) === GLOB_ALL_PATTERN) {
|
|
2233
|
-
return true;
|
|
2234
|
-
}
|
|
2235
|
-
if (PATTERN_REGEX_CACHE.has(resolvedPattern)) {
|
|
2236
|
-
return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename);
|
|
2237
|
-
}
|
|
2238
|
-
const regex2 = pattern2regex(resolvedPattern, allowJs);
|
|
2239
|
-
PATTERN_REGEX_CACHE.set(resolvedPattern, regex2);
|
|
2240
|
-
return regex2.test(filename);
|
|
2241
|
-
});
|
|
2242
|
-
}
|
|
2243
|
-
function pattern2regex(resolvedPattern, allowJs) {
|
|
2244
|
-
let regexStr = "^";
|
|
2245
|
-
for (let i = 0; i < resolvedPattern.length; i++) {
|
|
2246
|
-
const char = resolvedPattern[i];
|
|
2247
|
-
if (char === "?") {
|
|
2248
|
-
regexStr += "[^\\/]";
|
|
2249
|
-
continue;
|
|
2250
|
-
}
|
|
2251
|
-
if (char === "*") {
|
|
2252
|
-
if (resolvedPattern[i + 1] === "*" && resolvedPattern[i + 2] === "/") {
|
|
2253
|
-
i += 2;
|
|
2254
|
-
regexStr += "(?:[^\\/]*\\/)*";
|
|
2255
|
-
continue;
|
|
2256
|
-
}
|
|
2257
|
-
regexStr += "[^\\/]*";
|
|
2258
|
-
continue;
|
|
2259
|
-
}
|
|
2260
|
-
if ("/.+^${}()|[]\\".includes(char)) {
|
|
2261
|
-
regexStr += "\\";
|
|
2262
|
-
}
|
|
2263
|
-
regexStr += char;
|
|
2264
|
-
}
|
|
2265
|
-
if (resolvedPattern.endsWith("*")) {
|
|
2266
|
-
regexStr += allowJs ? TSJS_EXTENSIONS_RE_GROUP : TS_EXTENSIONS_RE_GROUP;
|
|
2267
|
-
}
|
|
2268
|
-
regexStr += "$";
|
|
2269
|
-
return new RegExp(regexStr);
|
|
2270
|
-
}
|
|
2271
|
-
function isIncluded(filename, tsconfigFile, tsconfig) {
|
|
2272
|
-
const dir = native2posix(path2.dirname(tsconfigFile));
|
|
2273
|
-
const files = (tsconfig.files || []).map((file) => resolve2posix(dir, file));
|
|
2274
|
-
const absoluteFilename = resolve2posix(null, filename);
|
|
2275
|
-
if (files.includes(filename)) {
|
|
2276
|
-
return true;
|
|
2277
|
-
}
|
|
2278
|
-
const allowJs = tsconfig.compilerOptions?.allowJs;
|
|
2279
|
-
const included = isGlobMatch(
|
|
2280
|
-
absoluteFilename,
|
|
2281
|
-
dir,
|
|
2282
|
-
tsconfig.include || (tsconfig.files ? [] : [GLOB_ALL_PATTERN]),
|
|
2283
|
-
allowJs
|
|
2284
|
-
);
|
|
2285
|
-
if (included) {
|
|
2286
|
-
const excluded = isGlobMatch(absoluteFilename, dir, tsconfig.exclude || [], allowJs);
|
|
2287
|
-
return !excluded;
|
|
2288
|
-
}
|
|
2289
|
-
return false;
|
|
2290
|
-
}
|
|
2291
|
-
function isSourceFileIncludedInTsconfig(absoluteFilename, tsconfigFile, tsconfig) {
|
|
2292
|
-
return isIncluded(absoluteFilename, tsconfigFile, tsconfig);
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
// src/load-tsconfig.ts
|
|
2296
2088
|
async function loadTsConfig(conf, cwd) {
|
|
2297
2089
|
const root = cwd;
|
|
2298
2090
|
let tsconfigFile = await resolveDirectTsconfigJson(conf.path);
|
|
@@ -2308,7 +2100,7 @@ async function loadTsConfig(conf, cwd) {
|
|
|
2308
2100
|
const gtc = await import("get-tsconfig");
|
|
2309
2101
|
const rootParsed = gtc.parseTsconfig(tsconfigFile);
|
|
2310
2102
|
const { tsconfig, tsconfigFile: effectiveTsconfigPath } = await resolveSolutionTsconfigForFile(
|
|
2311
|
-
|
|
2103
|
+
path2.resolve(conf.path),
|
|
2312
2104
|
tsconfigFile,
|
|
2313
2105
|
rootParsed,
|
|
2314
2106
|
gtc
|
|
@@ -2562,8 +2354,8 @@ var Builder = class {
|
|
|
2562
2354
|
// src/cpu-profile.ts
|
|
2563
2355
|
init_esm_shims();
|
|
2564
2356
|
import { logger as logger6 } from "@pandacss/logger";
|
|
2565
|
-
import
|
|
2566
|
-
import
|
|
2357
|
+
import fs from "fs";
|
|
2358
|
+
import path3 from "path";
|
|
2567
2359
|
import readline from "readline";
|
|
2568
2360
|
var startProfiling = async (cwd, prefix, isWatching) => {
|
|
2569
2361
|
const inspector = await import("inspector").then((r) => r.default);
|
|
@@ -2627,8 +2419,8 @@ var startProfiling = async (cwd, prefix, isWatching) => {
|
|
|
2627
2419
|
const date = /* @__PURE__ */ new Date();
|
|
2628
2420
|
const timestamp = date.toISOString().replace(/[-:.]/g, "");
|
|
2629
2421
|
const title = `panda-${prefix}-${timestamp}`;
|
|
2630
|
-
const outfile =
|
|
2631
|
-
|
|
2422
|
+
const outfile = path3.join(cwd, `${title}.cpuprofile`);
|
|
2423
|
+
fs.writeFileSync(outfile, JSON.stringify(params.profile));
|
|
2632
2424
|
logger6.info("cpu-prof", outfile);
|
|
2633
2425
|
cb?.();
|
|
2634
2426
|
});
|
|
@@ -2682,12 +2474,12 @@ async function debug(ctx, options) {
|
|
|
2682
2474
|
const files = ctx.getFiles();
|
|
2683
2475
|
const measureTotal = logger8.time.debug(`Done parsing ${files.length} files`);
|
|
2684
2476
|
ctx.config.minify = false;
|
|
2685
|
-
const { fs:
|
|
2477
|
+
const { fs: fs3, path: path5 } = ctx.runtime;
|
|
2686
2478
|
const outdir = options.outdir;
|
|
2687
2479
|
if (!options.dry && outdir) {
|
|
2688
|
-
|
|
2480
|
+
fs3.ensureDirSync(outdir);
|
|
2689
2481
|
logger8.info("cli", `Writing ${colors2.bold(`${outdir}/config.json`)}`);
|
|
2690
|
-
await
|
|
2482
|
+
await fs3.writeFile(`${outdir}/config.json`, JSON.stringify(ctx.config, null, 2));
|
|
2691
2483
|
}
|
|
2692
2484
|
if (options.onlyConfig) {
|
|
2693
2485
|
measureTotal();
|
|
@@ -2710,14 +2502,14 @@ async function debug(ctx, options) {
|
|
|
2710
2502
|
if (outdir) {
|
|
2711
2503
|
filesWithCss.push(file);
|
|
2712
2504
|
const parsedPath = parse(file);
|
|
2713
|
-
const relative2 =
|
|
2714
|
-
const astJsonPath = `${relative2}${
|
|
2715
|
-
const cssPath = `${relative2}${
|
|
2505
|
+
const relative2 = path5.relative(ctx.config.cwd, parsedPath.dir);
|
|
2506
|
+
const astJsonPath = `${relative2}${path5.sep}${parsedPath.name}.ast.json`.replaceAll(path5.sep, "__");
|
|
2507
|
+
const cssPath = `${relative2}${path5.sep}${parsedPath.name}.css`.replaceAll(path5.sep, "__");
|
|
2716
2508
|
logger8.info("cli", `Writing ${colors2.bold(`${outdir}/${astJsonPath}`)}`);
|
|
2717
2509
|
logger8.info("cli", `Writing ${colors2.bold(`${outdir}/${cssPath}`)}`);
|
|
2718
2510
|
return Promise.allSettled([
|
|
2719
|
-
|
|
2720
|
-
|
|
2511
|
+
fs3.writeFile(`${outdir}${path5.sep}${astJsonPath}`, JSON.stringify(result.toJSON(), null, 2)),
|
|
2512
|
+
fs3.writeFile(`${outdir}${path5.sep}${cssPath}`, css)
|
|
2721
2513
|
]);
|
|
2722
2514
|
}
|
|
2723
2515
|
});
|
|
@@ -2812,16 +2604,16 @@ function setupGitIgnore(ctx) {
|
|
|
2812
2604
|
// src/logstream.ts
|
|
2813
2605
|
init_esm_shims();
|
|
2814
2606
|
import { logger as logger10 } from "@pandacss/logger";
|
|
2815
|
-
import
|
|
2816
|
-
import
|
|
2607
|
+
import fs2 from "fs";
|
|
2608
|
+
import path4 from "path";
|
|
2817
2609
|
var setLogStream = (options) => {
|
|
2818
2610
|
const { cwd = process.cwd() } = options;
|
|
2819
2611
|
let stream;
|
|
2820
2612
|
if (options.logfile) {
|
|
2821
|
-
const outPath =
|
|
2613
|
+
const outPath = path4.resolve(cwd, options.logfile);
|
|
2822
2614
|
ensure(outPath);
|
|
2823
2615
|
logger10.info("logfile", outPath);
|
|
2824
|
-
stream =
|
|
2616
|
+
stream = fs2.createWriteStream(outPath, { flags: "a" });
|
|
2825
2617
|
logger10.onLog = (entry) => {
|
|
2826
2618
|
stream?.write(JSON.stringify(entry) + "\n");
|
|
2827
2619
|
};
|
|
@@ -2839,8 +2631,8 @@ var setLogStream = (options) => {
|
|
|
2839
2631
|
};
|
|
2840
2632
|
};
|
|
2841
2633
|
var ensure = (outPath) => {
|
|
2842
|
-
const dirname2 =
|
|
2843
|
-
|
|
2634
|
+
const dirname2 = path4.dirname(outPath);
|
|
2635
|
+
fs2.mkdirSync(dirname2, { recursive: true });
|
|
2844
2636
|
return outPath;
|
|
2845
2637
|
};
|
|
2846
2638
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
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.5",
|
|
57
|
+
"@pandacss/core": "1.11.5",
|
|
58
|
+
"@pandacss/generator": "1.11.5",
|
|
59
|
+
"@pandacss/plugin-lightningcss": "1.11.5",
|
|
60
|
+
"@pandacss/plugin-svelte": "1.11.5",
|
|
61
|
+
"@pandacss/plugin-vue": "1.11.5",
|
|
62
|
+
"@pandacss/reporter": "1.11.5",
|
|
63
|
+
"@pandacss/logger": "1.11.5",
|
|
64
|
+
"@pandacss/parser": "1.11.5",
|
|
65
|
+
"@pandacss/shared": "1.11.5",
|
|
66
|
+
"@pandacss/token-dictionary": "1.11.5",
|
|
67
|
+
"@pandacss/types": "1.11.5"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/picomatch": "4.0.2",
|