@bamboocss/dev 1.60.1 → 1.60.3
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/cli-default.cjs +14 -11
- package/dist/cli-default.mjs +14 -11
- package/dist/cli-main.cjs +16 -13
- package/dist/cli-main.mjs +16 -13
- package/dist/{interactive-DFSU7GMa.mjs → interactive-C-4ufWAa.mjs} +1 -1
- package/dist/{interactive-DT0H8bnO.cjs → interactive-w_KayzrO.cjs} +1 -1
- package/dist/interactive.cjs +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/{mcp-init-CcVew-sv.mjs → mcp-init-BzBxbjHl.mjs} +1 -1
- package/dist/{mcp-init-h7CqTz_9.cjs → mcp-init-DsgaxnTj.cjs} +1 -1
- package/dist/{package-DytQjfDT.mjs → package-CtQ3dbCL.mjs} +1 -1
- package/dist/{package-cWAB1_tY.cjs → package-wqSGP7f7.cjs} +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.mts +2 -1
- package/package.json +8 -8
package/dist/cli-default.cjs
CHANGED
|
@@ -127,7 +127,7 @@ function isLocError(error) {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region package.json
|
|
129
129
|
var name = "@bamboocss/dev";
|
|
130
|
-
var version = "1.60.
|
|
130
|
+
var version = "1.60.3";
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/cli-main.ts
|
|
133
133
|
/**
|
|
@@ -286,7 +286,7 @@ async function main() {
|
|
|
286
286
|
else stream.end();
|
|
287
287
|
stopProfiling();
|
|
288
288
|
});
|
|
289
|
-
cli.command("cssgen [
|
|
289
|
+
cli.command("cssgen [...globsOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities)").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globsOrType, flags = {}) => {
|
|
290
290
|
const { silent, config: configPath, outfile, watch, poll, splitting, ...rest } = flags;
|
|
291
291
|
const cwd = (0, node_path.resolve)(flags.cwd ?? "");
|
|
292
292
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -301,14 +301,15 @@ async function main() {
|
|
|
301
301
|
"static",
|
|
302
302
|
"global",
|
|
303
303
|
"keyframes"
|
|
304
|
-
].find((type) => type ===
|
|
305
|
-
|
|
304
|
+
].find((type) => type === globsOrType[0]);
|
|
305
|
+
if (cssArtifact && globsOrType.length > 1) throw new _bamboocss_shared.BambooError("INVALID_ARGUMENT", `\`cssgen ${cssArtifact}\` writes that part of the css alone, and takes no globs: ${globsOrType.slice(1).join(", ")}.`);
|
|
306
|
+
const globs = cssArtifact ? [] : globsOrType;
|
|
306
307
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
307
308
|
let ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
308
309
|
cwd,
|
|
309
310
|
config: silenced({
|
|
310
311
|
...rest,
|
|
311
|
-
...
|
|
312
|
+
...globs.length ? { include: globs } : void 0
|
|
312
313
|
}, silent),
|
|
313
314
|
configPath
|
|
314
315
|
});
|
|
@@ -363,9 +364,11 @@ async function main() {
|
|
|
363
364
|
let stopProfiling = () => void 0;
|
|
364
365
|
if (flags.cpuProf) stopProfiling = await (0, _bamboocss_node.startProfiling)(cwd, "cli", flags.watch);
|
|
365
366
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
367
|
+
const exclude = rest.exclude == null ? void 0 : [rest.exclude].flat().map(String);
|
|
366
368
|
await (0, _bamboocss_node.generate)(silenced((0, _bamboocss_shared.compact)({
|
|
367
369
|
include: files.length ? files : void 0,
|
|
368
370
|
...rest,
|
|
371
|
+
exclude,
|
|
369
372
|
cwd
|
|
370
373
|
}), silent), configPath, { requireFiles: files.length > 0 });
|
|
371
374
|
stopProfiling();
|
|
@@ -381,7 +384,7 @@ async function main() {
|
|
|
381
384
|
config: silenced({ cwd }, silent)
|
|
382
385
|
}), { outdir });
|
|
383
386
|
});
|
|
384
|
-
cli.command("analyze [
|
|
387
|
+
cli.command("analyze [...globs]", "Analyze design token usage in globs").option("--outfile [filepath]", "Output analyze report in JSON").option("--silent", "Don't print any logs").option("--scope <type>", "Select analysis scope: token or recipe, and with --unused pattern or keyframe").option("--unused", "List only the configured names no source uses, one per line").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (globs, flags = {}) => {
|
|
385
388
|
const { silent, config: configPath } = flags;
|
|
386
389
|
const scope = flags.scope?.replace(/s$/, "");
|
|
387
390
|
if (scope != null && ![
|
|
@@ -399,7 +402,7 @@ async function main() {
|
|
|
399
402
|
if (flags.unused && !outfile) keepStdoutToOutput();
|
|
400
403
|
const ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
401
404
|
cwd,
|
|
402
|
-
config: silenced((0, _bamboocss_shared.compact)({ include:
|
|
405
|
+
config: silenced((0, _bamboocss_shared.compact)({ include: globs.length ? globs : void 0 }), silent),
|
|
403
406
|
configPath
|
|
404
407
|
});
|
|
405
408
|
const result = await (0, _bamboocss_node.analyze)(ctx);
|
|
@@ -445,7 +448,7 @@ async function main() {
|
|
|
445
448
|
process.stdout.write((flags.json ? JSON.stringify(report, null, 2) : (0, _bamboocss_node.formatDoctorReport)(report)) + "\n");
|
|
446
449
|
if (report.problems.length) process.exitCode = 1;
|
|
447
450
|
});
|
|
448
|
-
cli.command("debug [
|
|
451
|
+
cli.command("debug [...globs]", "Debug design token extraction & css generated from files in globs").option("--silent", "Don't print any logs").option("--dry", "Output debug files in stdout without writing to disk").option("--outdir [dir]", "Output directory for debug files, default to './styled-system/debug'").option("--only-config", "Should only output the config file, default to 'false'").option("--zip", "Write the debug files as one <outdir>.zip, to attach to a bug report").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globs, flags = {}) => {
|
|
449
452
|
const { silent, dry = false, outdir: outdirFlag, config: configPath } = flags ?? {};
|
|
450
453
|
if (dry && flags.zip) throw new _bamboocss_shared.BambooError("INVALID_FLAG", "--zip writes an archive, and --dry writes nothing.");
|
|
451
454
|
const cwd = (0, node_path.resolve)(flags.cwd);
|
|
@@ -458,7 +461,7 @@ async function main() {
|
|
|
458
461
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
459
462
|
const ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
460
463
|
cwd,
|
|
461
|
-
config: silenced(
|
|
464
|
+
config: silenced(globs.length ? { include: globs } : void 0, silent),
|
|
462
465
|
configPath
|
|
463
466
|
});
|
|
464
467
|
await (0, _bamboocss_node.debug)(ctx, {
|
|
@@ -470,14 +473,14 @@ async function main() {
|
|
|
470
473
|
stopProfiling();
|
|
471
474
|
stream.end();
|
|
472
475
|
});
|
|
473
|
-
cli.command("ship [
|
|
476
|
+
cli.command("ship [...globs]", "Ship extract result from files in globs").option("--silent", "Don't print any logs").option("--o, --outfile [file]", "Output path for the build info file, default to './styled-system/bamboo.buildinfo.json'").option("-m, --minify", "Minify generated JSON file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").action(async (globs, flags = {}) => {
|
|
474
477
|
const { silent, outfile: outfileFlag, minify, config: configPath, watch, poll } = flags;
|
|
475
478
|
const cwd = (0, node_path.resolve)(flags.cwd);
|
|
476
479
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
477
480
|
let ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
478
481
|
cwd,
|
|
479
482
|
config: silenced((0, _bamboocss_shared.compact)({
|
|
480
|
-
include:
|
|
483
|
+
include: globs.length ? globs : void 0,
|
|
481
484
|
minify
|
|
482
485
|
}), silent),
|
|
483
486
|
configPath
|
package/dist/cli-default.mjs
CHANGED
|
@@ -125,7 +125,7 @@ function isLocError(error) {
|
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region package.json
|
|
127
127
|
var name = "@bamboocss/dev";
|
|
128
|
-
var version = "1.60.
|
|
128
|
+
var version = "1.60.3";
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/cli-main.ts
|
|
131
131
|
/**
|
|
@@ -284,7 +284,7 @@ async function main() {
|
|
|
284
284
|
else stream.end();
|
|
285
285
|
stopProfiling();
|
|
286
286
|
});
|
|
287
|
-
cli.command("cssgen [
|
|
287
|
+
cli.command("cssgen [...globsOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities)").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globsOrType, flags = {}) => {
|
|
288
288
|
const { silent, config: configPath, outfile, watch, poll, splitting, ...rest } = flags;
|
|
289
289
|
const cwd = resolve(flags.cwd ?? "");
|
|
290
290
|
const stream = setLogStream({
|
|
@@ -299,14 +299,15 @@ async function main() {
|
|
|
299
299
|
"static",
|
|
300
300
|
"global",
|
|
301
301
|
"keyframes"
|
|
302
|
-
].find((type) => type ===
|
|
303
|
-
|
|
302
|
+
].find((type) => type === globsOrType[0]);
|
|
303
|
+
if (cssArtifact && globsOrType.length > 1) throw new BambooError("INVALID_ARGUMENT", `\`cssgen ${cssArtifact}\` writes that part of the css alone, and takes no globs: ${globsOrType.slice(1).join(", ")}.`);
|
|
304
|
+
const globs = cssArtifact ? [] : globsOrType;
|
|
304
305
|
if (silent) logger.level = "silent";
|
|
305
306
|
let ctx = await loadConfigAndCreateContext({
|
|
306
307
|
cwd,
|
|
307
308
|
config: silenced({
|
|
308
309
|
...rest,
|
|
309
|
-
...
|
|
310
|
+
...globs.length ? { include: globs } : void 0
|
|
310
311
|
}, silent),
|
|
311
312
|
configPath
|
|
312
313
|
});
|
|
@@ -361,9 +362,11 @@ async function main() {
|
|
|
361
362
|
let stopProfiling = () => void 0;
|
|
362
363
|
if (flags.cpuProf) stopProfiling = await startProfiling(cwd, "cli", flags.watch);
|
|
363
364
|
if (silent) logger.level = "silent";
|
|
365
|
+
const exclude = rest.exclude == null ? void 0 : [rest.exclude].flat().map(String);
|
|
364
366
|
await generate(silenced(compact({
|
|
365
367
|
include: files.length ? files : void 0,
|
|
366
368
|
...rest,
|
|
369
|
+
exclude,
|
|
367
370
|
cwd
|
|
368
371
|
}), silent), configPath, { requireFiles: files.length > 0 });
|
|
369
372
|
stopProfiling();
|
|
@@ -379,7 +382,7 @@ async function main() {
|
|
|
379
382
|
config: silenced({ cwd }, silent)
|
|
380
383
|
}), { outdir });
|
|
381
384
|
});
|
|
382
|
-
cli.command("analyze [
|
|
385
|
+
cli.command("analyze [...globs]", "Analyze design token usage in globs").option("--outfile [filepath]", "Output analyze report in JSON").option("--silent", "Don't print any logs").option("--scope <type>", "Select analysis scope: token or recipe, and with --unused pattern or keyframe").option("--unused", "List only the configured names no source uses, one per line").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (globs, flags = {}) => {
|
|
383
386
|
const { silent, config: configPath } = flags;
|
|
384
387
|
const scope = flags.scope?.replace(/s$/, "");
|
|
385
388
|
if (scope != null && ![
|
|
@@ -397,7 +400,7 @@ async function main() {
|
|
|
397
400
|
if (flags.unused && !outfile) keepStdoutToOutput();
|
|
398
401
|
const ctx = await loadConfigAndCreateContext({
|
|
399
402
|
cwd,
|
|
400
|
-
config: silenced(compact({ include:
|
|
403
|
+
config: silenced(compact({ include: globs.length ? globs : void 0 }), silent),
|
|
401
404
|
configPath
|
|
402
405
|
});
|
|
403
406
|
const result = await analyze(ctx);
|
|
@@ -443,7 +446,7 @@ async function main() {
|
|
|
443
446
|
process.stdout.write((flags.json ? JSON.stringify(report, null, 2) : formatDoctorReport(report)) + "\n");
|
|
444
447
|
if (report.problems.length) process.exitCode = 1;
|
|
445
448
|
});
|
|
446
|
-
cli.command("debug [
|
|
449
|
+
cli.command("debug [...globs]", "Debug design token extraction & css generated from files in globs").option("--silent", "Don't print any logs").option("--dry", "Output debug files in stdout without writing to disk").option("--outdir [dir]", "Output directory for debug files, default to './styled-system/debug'").option("--only-config", "Should only output the config file, default to 'false'").option("--zip", "Write the debug files as one <outdir>.zip, to attach to a bug report").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globs, flags = {}) => {
|
|
447
450
|
const { silent, dry = false, outdir: outdirFlag, config: configPath } = flags ?? {};
|
|
448
451
|
if (dry && flags.zip) throw new BambooError("INVALID_FLAG", "--zip writes an archive, and --dry writes nothing.");
|
|
449
452
|
const cwd = resolve(flags.cwd);
|
|
@@ -456,7 +459,7 @@ async function main() {
|
|
|
456
459
|
if (silent) logger.level = "silent";
|
|
457
460
|
const ctx = await loadConfigAndCreateContext({
|
|
458
461
|
cwd,
|
|
459
|
-
config: silenced(
|
|
462
|
+
config: silenced(globs.length ? { include: globs } : void 0, silent),
|
|
460
463
|
configPath
|
|
461
464
|
});
|
|
462
465
|
await debug(ctx, {
|
|
@@ -468,14 +471,14 @@ async function main() {
|
|
|
468
471
|
stopProfiling();
|
|
469
472
|
stream.end();
|
|
470
473
|
});
|
|
471
|
-
cli.command("ship [
|
|
474
|
+
cli.command("ship [...globs]", "Ship extract result from files in globs").option("--silent", "Don't print any logs").option("--o, --outfile [file]", "Output path for the build info file, default to './styled-system/bamboo.buildinfo.json'").option("-m, --minify", "Minify generated JSON file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").action(async (globs, flags = {}) => {
|
|
472
475
|
const { silent, outfile: outfileFlag, minify, config: configPath, watch, poll } = flags;
|
|
473
476
|
const cwd = resolve(flags.cwd);
|
|
474
477
|
if (silent) logger.level = "silent";
|
|
475
478
|
let ctx = await loadConfigAndCreateContext({
|
|
476
479
|
cwd,
|
|
477
480
|
config: silenced(compact({
|
|
478
|
-
include:
|
|
481
|
+
include: globs.length ? globs : void 0,
|
|
479
482
|
minify
|
|
480
483
|
}), silent),
|
|
481
484
|
configPath
|
package/dist/cli-main.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-CKQMccvm.cjs");
|
|
3
|
-
const require_package = require("./package-
|
|
3
|
+
const require_package = require("./package-wqSGP7f7.cjs");
|
|
4
4
|
let _bamboocss_logger = require("@bamboocss/logger");
|
|
5
5
|
let _bamboocss_node = require("@bamboocss/node");
|
|
6
6
|
let _bamboocss_shared = require("@bamboocss/shared");
|
|
@@ -91,7 +91,7 @@ async function main() {
|
|
|
91
91
|
cli.command("init", "Initialize the bamboo config file").option("-i, --interactive", "Run in interactive mode", { default: false }).option("-f, --force", "Force overwrite existing config file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--silent", "Suppress all messages except errors").option("--no-gitignore", "Don't update the .gitignore").option("--no-codegen", "Don't run the codegen logic").option("--out-extension <ext>", "The extension of the generated js files (default: 'mjs')").option("--outdir <dir>", "The output directory for the generated files").option("--strict-values [mode]", "Require every style value to be a token, so a raw css value is written `[14px]`").option("--logfile <file>", "Outputs logs to a file").action(async (initFlags = {}) => {
|
|
92
92
|
let options = {};
|
|
93
93
|
if (initFlags.interactive) {
|
|
94
|
-
const { interactive } = await Promise.resolve().then(() => require("./interactive-
|
|
94
|
+
const { interactive } = await Promise.resolve().then(() => require("./interactive-w_KayzrO.cjs"));
|
|
95
95
|
options = await interactive({ cwd: (0, node_path.resolve)(initFlags.cwd ?? "") });
|
|
96
96
|
}
|
|
97
97
|
const flags = {
|
|
@@ -165,7 +165,7 @@ async function main() {
|
|
|
165
165
|
else stream.end();
|
|
166
166
|
stopProfiling();
|
|
167
167
|
});
|
|
168
|
-
cli.command("cssgen [
|
|
168
|
+
cli.command("cssgen [...globsOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities)").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globsOrType, flags = {}) => {
|
|
169
169
|
const { silent, config: configPath, outfile, watch, poll, splitting, ...rest } = flags;
|
|
170
170
|
const cwd = (0, node_path.resolve)(flags.cwd ?? "");
|
|
171
171
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -180,14 +180,15 @@ async function main() {
|
|
|
180
180
|
"static",
|
|
181
181
|
"global",
|
|
182
182
|
"keyframes"
|
|
183
|
-
].find((type) => type ===
|
|
184
|
-
|
|
183
|
+
].find((type) => type === globsOrType[0]);
|
|
184
|
+
if (cssArtifact && globsOrType.length > 1) throw new _bamboocss_shared.BambooError("INVALID_ARGUMENT", `\`cssgen ${cssArtifact}\` writes that part of the css alone, and takes no globs: ${globsOrType.slice(1).join(", ")}.`);
|
|
185
|
+
const globs = cssArtifact ? [] : globsOrType;
|
|
185
186
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
186
187
|
let ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
187
188
|
cwd,
|
|
188
189
|
config: silenced({
|
|
189
190
|
...rest,
|
|
190
|
-
...
|
|
191
|
+
...globs.length ? { include: globs } : void 0
|
|
191
192
|
}, silent),
|
|
192
193
|
configPath
|
|
193
194
|
});
|
|
@@ -242,9 +243,11 @@ async function main() {
|
|
|
242
243
|
let stopProfiling = () => void 0;
|
|
243
244
|
if (flags.cpuProf) stopProfiling = await (0, _bamboocss_node.startProfiling)(cwd, "cli", flags.watch);
|
|
244
245
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
246
|
+
const exclude = rest.exclude == null ? void 0 : [rest.exclude].flat().map(String);
|
|
245
247
|
await (0, _bamboocss_node.generate)(silenced((0, _bamboocss_shared.compact)({
|
|
246
248
|
include: files.length ? files : void 0,
|
|
247
249
|
...rest,
|
|
250
|
+
exclude,
|
|
248
251
|
cwd
|
|
249
252
|
}), silent), configPath, { requireFiles: files.length > 0 });
|
|
250
253
|
stopProfiling();
|
|
@@ -260,7 +263,7 @@ async function main() {
|
|
|
260
263
|
config: silenced({ cwd }, silent)
|
|
261
264
|
}), { outdir });
|
|
262
265
|
});
|
|
263
|
-
cli.command("analyze [
|
|
266
|
+
cli.command("analyze [...globs]", "Analyze design token usage in globs").option("--outfile [filepath]", "Output analyze report in JSON").option("--silent", "Don't print any logs").option("--scope <type>", "Select analysis scope: token or recipe, and with --unused pattern or keyframe").option("--unused", "List only the configured names no source uses, one per line").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (globs, flags = {}) => {
|
|
264
267
|
const { silent, config: configPath } = flags;
|
|
265
268
|
const scope = flags.scope?.replace(/s$/, "");
|
|
266
269
|
if (scope != null && ![
|
|
@@ -278,7 +281,7 @@ async function main() {
|
|
|
278
281
|
if (flags.unused && !outfile) keepStdoutToOutput();
|
|
279
282
|
const ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
280
283
|
cwd,
|
|
281
|
-
config: silenced((0, _bamboocss_shared.compact)({ include:
|
|
284
|
+
config: silenced((0, _bamboocss_shared.compact)({ include: globs.length ? globs : void 0 }), silent),
|
|
282
285
|
configPath
|
|
283
286
|
});
|
|
284
287
|
const result = await (0, _bamboocss_node.analyze)(ctx);
|
|
@@ -324,7 +327,7 @@ async function main() {
|
|
|
324
327
|
process.stdout.write((flags.json ? JSON.stringify(report, null, 2) : (0, _bamboocss_node.formatDoctorReport)(report)) + "\n");
|
|
325
328
|
if (report.problems.length) process.exitCode = 1;
|
|
326
329
|
});
|
|
327
|
-
cli.command("debug [
|
|
330
|
+
cli.command("debug [...globs]", "Debug design token extraction & css generated from files in globs").option("--silent", "Don't print any logs").option("--dry", "Output debug files in stdout without writing to disk").option("--outdir [dir]", "Output directory for debug files, default to './styled-system/debug'").option("--only-config", "Should only output the config file, default to 'false'").option("--zip", "Write the debug files as one <outdir>.zip, to attach to a bug report").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globs, flags = {}) => {
|
|
328
331
|
const { silent, dry = false, outdir: outdirFlag, config: configPath } = flags ?? {};
|
|
329
332
|
if (dry && flags.zip) throw new _bamboocss_shared.BambooError("INVALID_FLAG", "--zip writes an archive, and --dry writes nothing.");
|
|
330
333
|
const cwd = (0, node_path.resolve)(flags.cwd);
|
|
@@ -337,7 +340,7 @@ async function main() {
|
|
|
337
340
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
338
341
|
const ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
339
342
|
cwd,
|
|
340
|
-
config: silenced(
|
|
343
|
+
config: silenced(globs.length ? { include: globs } : void 0, silent),
|
|
341
344
|
configPath
|
|
342
345
|
});
|
|
343
346
|
await (0, _bamboocss_node.debug)(ctx, {
|
|
@@ -349,14 +352,14 @@ async function main() {
|
|
|
349
352
|
stopProfiling();
|
|
350
353
|
stream.end();
|
|
351
354
|
});
|
|
352
|
-
cli.command("ship [
|
|
355
|
+
cli.command("ship [...globs]", "Ship extract result from files in globs").option("--silent", "Don't print any logs").option("--o, --outfile [file]", "Output path for the build info file, default to './styled-system/bamboo.buildinfo.json'").option("-m, --minify", "Minify generated JSON file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").action(async (globs, flags = {}) => {
|
|
353
356
|
const { silent, outfile: outfileFlag, minify, config: configPath, watch, poll } = flags;
|
|
354
357
|
const cwd = (0, node_path.resolve)(flags.cwd);
|
|
355
358
|
if (silent) _bamboocss_logger.logger.level = "silent";
|
|
356
359
|
let ctx = await (0, _bamboocss_node.loadConfigAndCreateContext)({
|
|
357
360
|
cwd,
|
|
358
361
|
config: silenced((0, _bamboocss_shared.compact)({
|
|
359
|
-
include:
|
|
362
|
+
include: globs.length ? globs : void 0,
|
|
360
363
|
minify
|
|
361
364
|
}), silent),
|
|
362
365
|
configPath
|
|
@@ -469,7 +472,7 @@ async function main() {
|
|
|
469
472
|
process.exitCode = 1;
|
|
470
473
|
});
|
|
471
474
|
cli.command("init-mcp", "Initialize MCP configuration for AI clients").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--client <clients>", "AI clients to configure (claude, cursor, vscode, windsurf, codex)").action(async (mcpInitFlags) => {
|
|
472
|
-
const { initMcpConfig } = await Promise.resolve().then(() => require("./mcp-init-
|
|
475
|
+
const { initMcpConfig } = await Promise.resolve().then(() => require("./mcp-init-DsgaxnTj.cjs"));
|
|
473
476
|
const resolvedCwd = (0, node_path.resolve)(mcpInitFlags.cwd ?? cwd);
|
|
474
477
|
let clients;
|
|
475
478
|
if (mcpInitFlags.client) clients = (Array.isArray(mcpInitFlags.client) ? mcpInitFlags.client : [mcpInitFlags.client]).flatMap((c) => c.split(",")).map((c) => c.trim());
|
package/dist/cli-main.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-CtQ3dbCL.mjs";
|
|
2
2
|
import { logger } from "@bamboocss/logger";
|
|
3
3
|
import { BambooContext, analyze, artifactsToRebuild, buildInfo, codegen, cssgen, debug, doctor, formatDoctorReport, generate, generatePackageExports, loadConfigAndCreateContext, setLogStream, setupConfig, setupGitIgnore, spec, startProfiling } from "@bamboocss/node";
|
|
4
4
|
import { BambooError, closestMatch, compact } from "@bamboocss/shared";
|
|
@@ -89,7 +89,7 @@ async function main() {
|
|
|
89
89
|
cli.command("init", "Initialize the bamboo config file").option("-i, --interactive", "Run in interactive mode", { default: false }).option("-f, --force", "Force overwrite existing config file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--silent", "Suppress all messages except errors").option("--no-gitignore", "Don't update the .gitignore").option("--no-codegen", "Don't run the codegen logic").option("--out-extension <ext>", "The extension of the generated js files (default: 'mjs')").option("--outdir <dir>", "The output directory for the generated files").option("--strict-values [mode]", "Require every style value to be a token, so a raw css value is written `[14px]`").option("--logfile <file>", "Outputs logs to a file").action(async (initFlags = {}) => {
|
|
90
90
|
let options = {};
|
|
91
91
|
if (initFlags.interactive) {
|
|
92
|
-
const { interactive } = await import("./interactive-
|
|
92
|
+
const { interactive } = await import("./interactive-C-4ufWAa.mjs");
|
|
93
93
|
options = await interactive({ cwd: resolve(initFlags.cwd ?? "") });
|
|
94
94
|
}
|
|
95
95
|
const flags = {
|
|
@@ -163,7 +163,7 @@ async function main() {
|
|
|
163
163
|
else stream.end();
|
|
164
164
|
stopProfiling();
|
|
165
165
|
});
|
|
166
|
-
cli.command("cssgen [
|
|
166
|
+
cli.command("cssgen [...globsOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities)").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globsOrType, flags = {}) => {
|
|
167
167
|
const { silent, config: configPath, outfile, watch, poll, splitting, ...rest } = flags;
|
|
168
168
|
const cwd = resolve(flags.cwd ?? "");
|
|
169
169
|
const stream = setLogStream({
|
|
@@ -178,14 +178,15 @@ async function main() {
|
|
|
178
178
|
"static",
|
|
179
179
|
"global",
|
|
180
180
|
"keyframes"
|
|
181
|
-
].find((type) => type ===
|
|
182
|
-
|
|
181
|
+
].find((type) => type === globsOrType[0]);
|
|
182
|
+
if (cssArtifact && globsOrType.length > 1) throw new BambooError("INVALID_ARGUMENT", `\`cssgen ${cssArtifact}\` writes that part of the css alone, and takes no globs: ${globsOrType.slice(1).join(", ")}.`);
|
|
183
|
+
const globs = cssArtifact ? [] : globsOrType;
|
|
183
184
|
if (silent) logger.level = "silent";
|
|
184
185
|
let ctx = await loadConfigAndCreateContext({
|
|
185
186
|
cwd,
|
|
186
187
|
config: silenced({
|
|
187
188
|
...rest,
|
|
188
|
-
...
|
|
189
|
+
...globs.length ? { include: globs } : void 0
|
|
189
190
|
}, silent),
|
|
190
191
|
configPath
|
|
191
192
|
});
|
|
@@ -240,9 +241,11 @@ async function main() {
|
|
|
240
241
|
let stopProfiling = () => void 0;
|
|
241
242
|
if (flags.cpuProf) stopProfiling = await startProfiling(cwd, "cli", flags.watch);
|
|
242
243
|
if (silent) logger.level = "silent";
|
|
244
|
+
const exclude = rest.exclude == null ? void 0 : [rest.exclude].flat().map(String);
|
|
243
245
|
await generate(silenced(compact({
|
|
244
246
|
include: files.length ? files : void 0,
|
|
245
247
|
...rest,
|
|
248
|
+
exclude,
|
|
246
249
|
cwd
|
|
247
250
|
}), silent), configPath, { requireFiles: files.length > 0 });
|
|
248
251
|
stopProfiling();
|
|
@@ -258,7 +261,7 @@ async function main() {
|
|
|
258
261
|
config: silenced({ cwd }, silent)
|
|
259
262
|
}), { outdir });
|
|
260
263
|
});
|
|
261
|
-
cli.command("analyze [
|
|
264
|
+
cli.command("analyze [...globs]", "Analyze design token usage in globs").option("--outfile [filepath]", "Output analyze report in JSON").option("--silent", "Don't print any logs").option("--scope <type>", "Select analysis scope: token or recipe, and with --unused pattern or keyframe").option("--unused", "List only the configured names no source uses, one per line").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (globs, flags = {}) => {
|
|
262
265
|
const { silent, config: configPath } = flags;
|
|
263
266
|
const scope = flags.scope?.replace(/s$/, "");
|
|
264
267
|
if (scope != null && ![
|
|
@@ -276,7 +279,7 @@ async function main() {
|
|
|
276
279
|
if (flags.unused && !outfile) keepStdoutToOutput();
|
|
277
280
|
const ctx = await loadConfigAndCreateContext({
|
|
278
281
|
cwd,
|
|
279
|
-
config: silenced(compact({ include:
|
|
282
|
+
config: silenced(compact({ include: globs.length ? globs : void 0 }), silent),
|
|
280
283
|
configPath
|
|
281
284
|
});
|
|
282
285
|
const result = await analyze(ctx);
|
|
@@ -322,7 +325,7 @@ async function main() {
|
|
|
322
325
|
process.stdout.write((flags.json ? JSON.stringify(report, null, 2) : formatDoctorReport(report)) + "\n");
|
|
323
326
|
if (report.problems.length) process.exitCode = 1;
|
|
324
327
|
});
|
|
325
|
-
cli.command("debug [
|
|
328
|
+
cli.command("debug [...globs]", "Debug design token extraction & css generated from files in globs").option("--silent", "Don't print any logs").option("--dry", "Output debug files in stdout without writing to disk").option("--outdir [dir]", "Output directory for debug files, default to './styled-system/debug'").option("--only-config", "Should only output the config file, default to 'false'").option("--zip", "Write the debug files as one <outdir>.zip, to attach to a bug report").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (globs, flags = {}) => {
|
|
326
329
|
const { silent, dry = false, outdir: outdirFlag, config: configPath } = flags ?? {};
|
|
327
330
|
if (dry && flags.zip) throw new BambooError("INVALID_FLAG", "--zip writes an archive, and --dry writes nothing.");
|
|
328
331
|
const cwd = resolve(flags.cwd);
|
|
@@ -335,7 +338,7 @@ async function main() {
|
|
|
335
338
|
if (silent) logger.level = "silent";
|
|
336
339
|
const ctx = await loadConfigAndCreateContext({
|
|
337
340
|
cwd,
|
|
338
|
-
config: silenced(
|
|
341
|
+
config: silenced(globs.length ? { include: globs } : void 0, silent),
|
|
339
342
|
configPath
|
|
340
343
|
});
|
|
341
344
|
await debug(ctx, {
|
|
@@ -347,14 +350,14 @@ async function main() {
|
|
|
347
350
|
stopProfiling();
|
|
348
351
|
stream.end();
|
|
349
352
|
});
|
|
350
|
-
cli.command("ship [
|
|
353
|
+
cli.command("ship [...globs]", "Ship extract result from files in globs").option("--silent", "Don't print any logs").option("--o, --outfile [file]", "Output path for the build info file, default to './styled-system/bamboo.buildinfo.json'").option("-m, --minify", "Minify generated JSON file").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").action(async (globs, flags = {}) => {
|
|
351
354
|
const { silent, outfile: outfileFlag, minify, config: configPath, watch, poll } = flags;
|
|
352
355
|
const cwd = resolve(flags.cwd);
|
|
353
356
|
if (silent) logger.level = "silent";
|
|
354
357
|
let ctx = await loadConfigAndCreateContext({
|
|
355
358
|
cwd,
|
|
356
359
|
config: silenced(compact({
|
|
357
|
-
include:
|
|
360
|
+
include: globs.length ? globs : void 0,
|
|
358
361
|
minify
|
|
359
362
|
}), silent),
|
|
360
363
|
configPath
|
|
@@ -467,7 +470,7 @@ async function main() {
|
|
|
467
470
|
process.exitCode = 1;
|
|
468
471
|
});
|
|
469
472
|
cli.command("init-mcp", "Initialize MCP configuration for AI clients").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--client <clients>", "AI clients to configure (claude, cursor, vscode, windsurf, codex)").action(async (mcpInitFlags) => {
|
|
470
|
-
const { initMcpConfig } = await import("./mcp-init-
|
|
473
|
+
const { initMcpConfig } = await import("./mcp-init-BzBxbjHl.mjs");
|
|
471
474
|
const resolvedCwd = resolve(mcpInitFlags.cwd ?? cwd);
|
|
472
475
|
let clients;
|
|
473
476
|
if (mcpInitFlags.client) clients = (Array.isArray(mcpInitFlags.client) ? mcpInitFlags.client : [mcpInitFlags.client]).flatMap((c) => c.split(",")).map((c) => c.trim());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-wqSGP7f7.cjs");
|
|
3
3
|
let _clack_prompts = require("@clack/prompts");
|
|
4
4
|
_clack_prompts = require_chunk.__toESM(_clack_prompts);
|
|
5
5
|
//#region src/interactive.ts
|
package/dist/interactive.cjs
CHANGED
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
let _clack_prompts = require("@clack/prompts");
|
|
25
25
|
_clack_prompts = __toESM(_clack_prompts);
|
|
26
26
|
//#region package.json
|
|
27
|
-
var version = "1.60.
|
|
27
|
+
var version = "1.60.3";
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/interactive.ts
|
|
30
30
|
const interactive = async (_options = {}) => {
|
package/dist/interactive.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-CtQ3dbCL.mjs";
|
|
2
2
|
import { logger } from "@bamboocss/logger";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-wqSGP7f7.cjs");
|
|
3
3
|
let _bamboocss_logger = require("@bamboocss/logger");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
package/dist/types.d.cts
CHANGED
|
@@ -76,7 +76,8 @@ interface MainCommandFlags extends Pick<Config, 'cwd' | 'poll' | 'watch'> {
|
|
|
76
76
|
cwd: string;
|
|
77
77
|
preflight?: boolean;
|
|
78
78
|
silent?: boolean;
|
|
79
|
-
|
|
79
|
+
/** A string for one `-e`, a list for several: `cac` makes a list only of a flag given twice. */
|
|
80
|
+
exclude?: string | string[];
|
|
80
81
|
hash?: boolean;
|
|
81
82
|
emitTokensOnly?: boolean;
|
|
82
83
|
cpuProf?: boolean;
|
package/dist/types.d.mts
CHANGED
|
@@ -76,7 +76,8 @@ interface MainCommandFlags extends Pick<Config, 'cwd' | 'poll' | 'watch'> {
|
|
|
76
76
|
cwd: string;
|
|
77
77
|
preflight?: boolean;
|
|
78
78
|
silent?: boolean;
|
|
79
|
-
|
|
79
|
+
/** A string for one `-e`, a list for several: `cac` makes a list only of a flag given twice. */
|
|
80
|
+
exclude?: string | string[];
|
|
80
81
|
hash?: boolean;
|
|
81
82
|
emitTokensOnly?: boolean;
|
|
82
83
|
cpuProf?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/dev",
|
|
3
|
-
"version": "1.60.
|
|
3
|
+
"version": "1.60.3",
|
|
4
4
|
"description": "Build-time, type-safe, zero-runtime CSS-in-JS",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@clack/prompts": "0.11.0",
|
|
54
54
|
"cac": "6.7.14",
|
|
55
|
-
"@bamboocss/logger": "1.60.
|
|
56
|
-
"@bamboocss/node": "1.60.
|
|
57
|
-
"@bamboocss/preset-bamboo": "1.60.
|
|
58
|
-
"@bamboocss/preset-base": "1.60.
|
|
59
|
-
"@bamboocss/shared": "1.60.
|
|
60
|
-
"@bamboocss/token-dictionary": "1.60.
|
|
61
|
-
"@bamboocss/types": "1.60.
|
|
55
|
+
"@bamboocss/logger": "1.60.3",
|
|
56
|
+
"@bamboocss/node": "1.60.3",
|
|
57
|
+
"@bamboocss/preset-bamboo": "1.60.3",
|
|
58
|
+
"@bamboocss/preset-base": "1.60.3",
|
|
59
|
+
"@bamboocss/shared": "1.60.3",
|
|
60
|
+
"@bamboocss/token-dictionary": "1.60.3",
|
|
61
|
+
"@bamboocss/types": "1.60.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/update-notifier": "6.0.8",
|