@bamboocss/dev 1.12.3 → 1.13.1
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/LICENSE.md +1 -0
- package/README.md +2 -2
- package/dist/cli-default.cjs +51 -34
- package/dist/cli-default.mjs +52 -35
- package/dist/cli-main.cjs +51 -34
- package/dist/cli-main.mjs +51 -34
- package/dist/interactive.cjs +2 -2
- package/dist/interactive.mjs +2 -2
- package/package.json +13 -13
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2023 Segun Adebayo
|
|
4
|
+
Copyright (c) 2026 Gajus Kuizinas
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
6
7
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Bamboo CLI
|
|
2
2
|
|
|
3
|
-
[Bamboo](https://
|
|
3
|
+
[Bamboo](https://bamboocss.com/) is a CSS-in-JS tool with build time generated styles, RSC compatible, multi-variant
|
|
4
4
|
support, and best-in-class developer experience.
|
|
5
5
|
|
|
6
|
-
This package is the CLI - documentation can be found at https://
|
|
6
|
+
This package is the CLI - documentation can be found at https://bamboocss.com/docs/installation/cli.
|
package/dist/cli-default.cjs
CHANGED
|
@@ -7627,7 +7627,7 @@ function isLocError(error) {
|
|
|
7627
7627
|
//#endregion
|
|
7628
7628
|
//#region package.json
|
|
7629
7629
|
var name = "@bamboocss/dev";
|
|
7630
|
-
var version = "1.
|
|
7630
|
+
var version = "1.13.1";
|
|
7631
7631
|
//#endregion
|
|
7632
7632
|
//#region src/interactive.ts
|
|
7633
7633
|
const interactive = async () => {
|
|
@@ -7727,7 +7727,7 @@ const interactive = async () => {
|
|
|
7727
7727
|
_clack_prompts.cancel("Operation cancelled.");
|
|
7728
7728
|
process.exit(0);
|
|
7729
7729
|
} });
|
|
7730
|
-
_clack_prompts.outro("Let's get started!
|
|
7730
|
+
_clack_prompts.outro("Let's get started! 🎋");
|
|
7731
7731
|
return {
|
|
7732
7732
|
postcss: initFlags.usePostcss === "yes",
|
|
7733
7733
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
|
@@ -7868,10 +7868,10 @@ async function main() {
|
|
|
7868
7868
|
ctx.watchFiles(async (event, file) => {
|
|
7869
7869
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7870
7870
|
else if (event === "change") {
|
|
7871
|
-
ctx.project.reloadSourceFile(file);
|
|
7871
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7872
7872
|
await (0, _bamboocss_node.cssgen)(ctx, options);
|
|
7873
7873
|
} else if (event === "add") {
|
|
7874
|
-
ctx.project.createSourceFile(file);
|
|
7874
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7875
7875
|
await (0, _bamboocss_node.cssgen)(ctx, options);
|
|
7876
7876
|
}
|
|
7877
7877
|
});
|
|
@@ -8021,10 +8021,10 @@ async function main() {
|
|
|
8021
8021
|
ctx.watchFiles(async (event, file) => {
|
|
8022
8022
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8023
8023
|
else if (event === "change") {
|
|
8024
|
-
ctx.project.reloadSourceFile(file);
|
|
8024
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8025
8025
|
await (0, _bamboocss_node.buildInfo)(ctx, outfile);
|
|
8026
8026
|
} else if (event === "add") {
|
|
8027
|
-
ctx.project.createSourceFile(file);
|
|
8027
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8028
8028
|
await (0, _bamboocss_node.buildInfo)(ctx, outfile);
|
|
8029
8029
|
}
|
|
8030
8030
|
});
|
|
@@ -8059,34 +8059,51 @@ async function main() {
|
|
|
8059
8059
|
if (!ctx.patterns.isEmpty()) exports.push(["./jsx", createEntry("jsx")]);
|
|
8060
8060
|
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
8061
8061
|
const stylesDir = createDir("styles.css");
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8062
|
+
const identity = {
|
|
8063
|
+
name: outdir,
|
|
8064
|
+
description: "This package is auto-generated by Bamboo CSS",
|
|
8065
|
+
version: "0.1.0",
|
|
8066
|
+
type: "module",
|
|
8067
|
+
keywords: [
|
|
8068
|
+
"bamboocss",
|
|
8069
|
+
"styled-system",
|
|
8070
|
+
"codegen"
|
|
8071
|
+
],
|
|
8072
|
+
license: "ISC",
|
|
8073
|
+
scripts: { prepare: "bamboo codegen --clean" }
|
|
8074
|
+
};
|
|
8075
|
+
const existing = exists ? JSON.parse(ctx.runtime.fs.readFileSync(pkgPath)) : {};
|
|
8076
|
+
/**
|
|
8077
|
+
* Codegen writes a package.json of its own into the outdir so that bundlers get a
|
|
8078
|
+
* `sideEffects` hint, and marks it `private` because a generated directory is not
|
|
8079
|
+
* something to publish. This command is what turns it into a real package: it
|
|
8080
|
+
* supplies the identity the file lacks and lifts that flag.
|
|
8081
|
+
*
|
|
8082
|
+
* This used to key on a missing `name`. Codegen now emits one — a nameless
|
|
8083
|
+
* package.json is what pnpm, npm and changesets refuse to scan rather than skip —
|
|
8084
|
+
* so its absence no longer distinguishes anything.
|
|
8085
|
+
*
|
|
8086
|
+
* `private` alone will not do either: a consumer can own a private *named* package
|
|
8087
|
+
* here, which is the `@acme/styled-system` workspace layout the component-library
|
|
8088
|
+
* guide recommends. What separates the two is `version`. Ours never carries one, and
|
|
8089
|
+
* a file that is private with no version is by definition not publishable and holds
|
|
8090
|
+
* no identity worth preserving, so supplying one is the whole point of the command.
|
|
8091
|
+
*
|
|
8092
|
+
* `existing` is spread last, so anything already declared wins and a second run
|
|
8093
|
+
* only refreshes `exports`.
|
|
8094
|
+
*/
|
|
8095
|
+
const isGenerated = existing.private === true && existing.version === void 0;
|
|
8096
|
+
const content = isGenerated ? {
|
|
8097
|
+
...identity,
|
|
8098
|
+
...existing
|
|
8099
|
+
} : existing;
|
|
8100
|
+
if (isGenerated) delete content.private;
|
|
8101
|
+
content.exports = {
|
|
8102
|
+
...content.exports,
|
|
8103
|
+
...Object.fromEntries(exports),
|
|
8104
|
+
"./styles.css": stylesDir
|
|
8105
|
+
};
|
|
8106
|
+
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
8090
8107
|
_bamboocss_logger.logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
8091
8108
|
});
|
|
8092
8109
|
cli.command("mcp", "Start MCP server for AI assistants").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (mcpFlags) => {
|
package/dist/cli-default.mjs
CHANGED
|
@@ -4174,7 +4174,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4174
4174
|
__exportStar(require_ca_file(), exports);
|
|
4175
4175
|
}));
|
|
4176
4176
|
//#endregion
|
|
4177
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.0_oxc-resolver@11.19.1_@emnapi+core@1.10.0_@emnapi+runtime@1.
|
|
4177
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.0_oxc-resolver@11.19.1_@emnapi+core@1.10.0_@emnapi+runtime@1.11.3__tsx@4.20.6_typescript@6.0.2/node_modules/tsdown/esm-shims.js
|
|
4178
4178
|
var getFilename, getDirname, __dirname$2;
|
|
4179
4179
|
var init_esm_shims = __esmMin((() => {
|
|
4180
4180
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -7631,7 +7631,7 @@ function isLocError(error) {
|
|
|
7631
7631
|
//#endregion
|
|
7632
7632
|
//#region package.json
|
|
7633
7633
|
var name = "@bamboocss/dev";
|
|
7634
|
-
var version = "1.
|
|
7634
|
+
var version = "1.13.1";
|
|
7635
7635
|
//#endregion
|
|
7636
7636
|
//#region src/interactive.ts
|
|
7637
7637
|
const interactive = async () => {
|
|
@@ -7731,7 +7731,7 @@ const interactive = async () => {
|
|
|
7731
7731
|
p.cancel("Operation cancelled.");
|
|
7732
7732
|
process.exit(0);
|
|
7733
7733
|
} });
|
|
7734
|
-
p.outro("Let's get started!
|
|
7734
|
+
p.outro("Let's get started! 🎋");
|
|
7735
7735
|
return {
|
|
7736
7736
|
postcss: initFlags.usePostcss === "yes",
|
|
7737
7737
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
|
@@ -7872,10 +7872,10 @@ async function main() {
|
|
|
7872
7872
|
ctx.watchFiles(async (event, file) => {
|
|
7873
7873
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7874
7874
|
else if (event === "change") {
|
|
7875
|
-
ctx.project.reloadSourceFile(file);
|
|
7875
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7876
7876
|
await cssgen(ctx, options);
|
|
7877
7877
|
} else if (event === "add") {
|
|
7878
|
-
ctx.project.createSourceFile(file);
|
|
7878
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
7879
7879
|
await cssgen(ctx, options);
|
|
7880
7880
|
}
|
|
7881
7881
|
});
|
|
@@ -8024,10 +8024,10 @@ async function main() {
|
|
|
8024
8024
|
ctx.watchFiles(async (event, file) => {
|
|
8025
8025
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8026
8026
|
else if (event === "change") {
|
|
8027
|
-
ctx.project.reloadSourceFile(file);
|
|
8027
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8028
8028
|
await buildInfo(ctx, outfile);
|
|
8029
8029
|
} else if (event === "add") {
|
|
8030
|
-
ctx.project.createSourceFile(file);
|
|
8030
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
8031
8031
|
await buildInfo(ctx, outfile);
|
|
8032
8032
|
}
|
|
8033
8033
|
});
|
|
@@ -8062,34 +8062,51 @@ async function main() {
|
|
|
8062
8062
|
if (!ctx.patterns.isEmpty()) exports.push(["./jsx", createEntry("jsx")]);
|
|
8063
8063
|
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
8064
8064
|
const stylesDir = createDir("styles.css");
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8065
|
+
const identity = {
|
|
8066
|
+
name: outdir,
|
|
8067
|
+
description: "This package is auto-generated by Bamboo CSS",
|
|
8068
|
+
version: "0.1.0",
|
|
8069
|
+
type: "module",
|
|
8070
|
+
keywords: [
|
|
8071
|
+
"bamboocss",
|
|
8072
|
+
"styled-system",
|
|
8073
|
+
"codegen"
|
|
8074
|
+
],
|
|
8075
|
+
license: "ISC",
|
|
8076
|
+
scripts: { prepare: "bamboo codegen --clean" }
|
|
8077
|
+
};
|
|
8078
|
+
const existing = exists ? JSON.parse(ctx.runtime.fs.readFileSync(pkgPath)) : {};
|
|
8079
|
+
/**
|
|
8080
|
+
* Codegen writes a package.json of its own into the outdir so that bundlers get a
|
|
8081
|
+
* `sideEffects` hint, and marks it `private` because a generated directory is not
|
|
8082
|
+
* something to publish. This command is what turns it into a real package: it
|
|
8083
|
+
* supplies the identity the file lacks and lifts that flag.
|
|
8084
|
+
*
|
|
8085
|
+
* This used to key on a missing `name`. Codegen now emits one — a nameless
|
|
8086
|
+
* package.json is what pnpm, npm and changesets refuse to scan rather than skip —
|
|
8087
|
+
* so its absence no longer distinguishes anything.
|
|
8088
|
+
*
|
|
8089
|
+
* `private` alone will not do either: a consumer can own a private *named* package
|
|
8090
|
+
* here, which is the `@acme/styled-system` workspace layout the component-library
|
|
8091
|
+
* guide recommends. What separates the two is `version`. Ours never carries one, and
|
|
8092
|
+
* a file that is private with no version is by definition not publishable and holds
|
|
8093
|
+
* no identity worth preserving, so supplying one is the whole point of the command.
|
|
8094
|
+
*
|
|
8095
|
+
* `existing` is spread last, so anything already declared wins and a second run
|
|
8096
|
+
* only refreshes `exports`.
|
|
8097
|
+
*/
|
|
8098
|
+
const isGenerated = existing.private === true && existing.version === void 0;
|
|
8099
|
+
const content = isGenerated ? {
|
|
8100
|
+
...identity,
|
|
8101
|
+
...existing
|
|
8102
|
+
} : existing;
|
|
8103
|
+
if (isGenerated) delete content.private;
|
|
8104
|
+
content.exports = {
|
|
8105
|
+
...content.exports,
|
|
8106
|
+
...Object.fromEntries(exports),
|
|
8107
|
+
"./styles.css": stylesDir
|
|
8108
|
+
};
|
|
8109
|
+
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
8093
8110
|
logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
8094
8111
|
});
|
|
8095
8112
|
cli.command("mcp", "Start MCP server for AI assistants").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (mcpFlags) => {
|
package/dist/cli-main.cjs
CHANGED
|
@@ -30,7 +30,7 @@ let path = require("path");
|
|
|
30
30
|
let _clack_prompts = require("@clack/prompts");
|
|
31
31
|
_clack_prompts = __toESM(_clack_prompts);
|
|
32
32
|
//#region package.json
|
|
33
|
-
var version = "1.
|
|
33
|
+
var version = "1.13.1";
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/interactive.ts
|
|
36
36
|
const interactive = async () => {
|
|
@@ -130,7 +130,7 @@ const interactive = async () => {
|
|
|
130
130
|
_clack_prompts.cancel("Operation cancelled.");
|
|
131
131
|
process.exit(0);
|
|
132
132
|
} });
|
|
133
|
-
_clack_prompts.outro("Let's get started!
|
|
133
|
+
_clack_prompts.outro("Let's get started! 🎋");
|
|
134
134
|
return {
|
|
135
135
|
postcss: initFlags.usePostcss === "yes",
|
|
136
136
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
|
@@ -271,10 +271,10 @@ async function main() {
|
|
|
271
271
|
ctx.watchFiles(async (event, file) => {
|
|
272
272
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
273
273
|
else if (event === "change") {
|
|
274
|
-
ctx.project.reloadSourceFile(file);
|
|
274
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
275
275
|
await (0, _bamboocss_node.cssgen)(ctx, options);
|
|
276
276
|
} else if (event === "add") {
|
|
277
|
-
ctx.project.createSourceFile(file);
|
|
277
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
278
278
|
await (0, _bamboocss_node.cssgen)(ctx, options);
|
|
279
279
|
}
|
|
280
280
|
});
|
|
@@ -424,10 +424,10 @@ async function main() {
|
|
|
424
424
|
ctx.watchFiles(async (event, file) => {
|
|
425
425
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
426
426
|
else if (event === "change") {
|
|
427
|
-
ctx.project.reloadSourceFile(file);
|
|
427
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
428
428
|
await (0, _bamboocss_node.buildInfo)(ctx, outfile);
|
|
429
429
|
} else if (event === "add") {
|
|
430
|
-
ctx.project.createSourceFile(file);
|
|
430
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
431
431
|
await (0, _bamboocss_node.buildInfo)(ctx, outfile);
|
|
432
432
|
}
|
|
433
433
|
});
|
|
@@ -462,34 +462,51 @@ async function main() {
|
|
|
462
462
|
if (!ctx.patterns.isEmpty()) exports.push(["./jsx", createEntry("jsx")]);
|
|
463
463
|
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
464
464
|
const stylesDir = createDir("styles.css");
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
465
|
+
const identity = {
|
|
466
|
+
name: outdir,
|
|
467
|
+
description: "This package is auto-generated by Bamboo CSS",
|
|
468
|
+
version: "0.1.0",
|
|
469
|
+
type: "module",
|
|
470
|
+
keywords: [
|
|
471
|
+
"bamboocss",
|
|
472
|
+
"styled-system",
|
|
473
|
+
"codegen"
|
|
474
|
+
],
|
|
475
|
+
license: "ISC",
|
|
476
|
+
scripts: { prepare: "bamboo codegen --clean" }
|
|
477
|
+
};
|
|
478
|
+
const existing = exists ? JSON.parse(ctx.runtime.fs.readFileSync(pkgPath)) : {};
|
|
479
|
+
/**
|
|
480
|
+
* Codegen writes a package.json of its own into the outdir so that bundlers get a
|
|
481
|
+
* `sideEffects` hint, and marks it `private` because a generated directory is not
|
|
482
|
+
* something to publish. This command is what turns it into a real package: it
|
|
483
|
+
* supplies the identity the file lacks and lifts that flag.
|
|
484
|
+
*
|
|
485
|
+
* This used to key on a missing `name`. Codegen now emits one — a nameless
|
|
486
|
+
* package.json is what pnpm, npm and changesets refuse to scan rather than skip —
|
|
487
|
+
* so its absence no longer distinguishes anything.
|
|
488
|
+
*
|
|
489
|
+
* `private` alone will not do either: a consumer can own a private *named* package
|
|
490
|
+
* here, which is the `@acme/styled-system` workspace layout the component-library
|
|
491
|
+
* guide recommends. What separates the two is `version`. Ours never carries one, and
|
|
492
|
+
* a file that is private with no version is by definition not publishable and holds
|
|
493
|
+
* no identity worth preserving, so supplying one is the whole point of the command.
|
|
494
|
+
*
|
|
495
|
+
* `existing` is spread last, so anything already declared wins and a second run
|
|
496
|
+
* only refreshes `exports`.
|
|
497
|
+
*/
|
|
498
|
+
const isGenerated = existing.private === true && existing.version === void 0;
|
|
499
|
+
const content = isGenerated ? {
|
|
500
|
+
...identity,
|
|
501
|
+
...existing
|
|
502
|
+
} : existing;
|
|
503
|
+
if (isGenerated) delete content.private;
|
|
504
|
+
content.exports = {
|
|
505
|
+
...content.exports,
|
|
506
|
+
...Object.fromEntries(exports),
|
|
507
|
+
"./styles.css": stylesDir
|
|
508
|
+
};
|
|
509
|
+
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
493
510
|
_bamboocss_logger.logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
494
511
|
});
|
|
495
512
|
cli.command("mcp", "Start MCP server for AI assistants").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (mcpFlags) => {
|
package/dist/cli-main.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import * as p from "@clack/prompts";
|
|
|
10
10
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "1.
|
|
13
|
+
var version = "1.13.1";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/interactive.ts
|
|
16
16
|
const interactive = async () => {
|
|
@@ -110,7 +110,7 @@ const interactive = async () => {
|
|
|
110
110
|
p.cancel("Operation cancelled.");
|
|
111
111
|
process.exit(0);
|
|
112
112
|
} });
|
|
113
|
-
p.outro("Let's get started!
|
|
113
|
+
p.outro("Let's get started! 🎋");
|
|
114
114
|
return {
|
|
115
115
|
postcss: initFlags.usePostcss === "yes",
|
|
116
116
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
|
@@ -251,10 +251,10 @@ async function main() {
|
|
|
251
251
|
ctx.watchFiles(async (event, file) => {
|
|
252
252
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
253
253
|
else if (event === "change") {
|
|
254
|
-
ctx.project.reloadSourceFile(file);
|
|
254
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
255
255
|
await cssgen(ctx, options);
|
|
256
256
|
} else if (event === "add") {
|
|
257
|
-
ctx.project.createSourceFile(file);
|
|
257
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
258
258
|
await cssgen(ctx, options);
|
|
259
259
|
}
|
|
260
260
|
});
|
|
@@ -403,10 +403,10 @@ async function main() {
|
|
|
403
403
|
ctx.watchFiles(async (event, file) => {
|
|
404
404
|
if (event === "unlink") ctx.project.removeSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
405
405
|
else if (event === "change") {
|
|
406
|
-
ctx.project.reloadSourceFile(file);
|
|
406
|
+
ctx.project.reloadSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
407
407
|
await buildInfo(ctx, outfile);
|
|
408
408
|
} else if (event === "add") {
|
|
409
|
-
ctx.project.createSourceFile(file);
|
|
409
|
+
ctx.project.createSourceFile(ctx.runtime.path.abs(cwd, file));
|
|
410
410
|
await buildInfo(ctx, outfile);
|
|
411
411
|
}
|
|
412
412
|
});
|
|
@@ -441,34 +441,51 @@ async function main() {
|
|
|
441
441
|
if (!ctx.patterns.isEmpty()) exports.push(["./jsx", createEntry("jsx")]);
|
|
442
442
|
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
443
443
|
const stylesDir = createDir("styles.css");
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
444
|
+
const identity = {
|
|
445
|
+
name: outdir,
|
|
446
|
+
description: "This package is auto-generated by Bamboo CSS",
|
|
447
|
+
version: "0.1.0",
|
|
448
|
+
type: "module",
|
|
449
|
+
keywords: [
|
|
450
|
+
"bamboocss",
|
|
451
|
+
"styled-system",
|
|
452
|
+
"codegen"
|
|
453
|
+
],
|
|
454
|
+
license: "ISC",
|
|
455
|
+
scripts: { prepare: "bamboo codegen --clean" }
|
|
456
|
+
};
|
|
457
|
+
const existing = exists ? JSON.parse(ctx.runtime.fs.readFileSync(pkgPath)) : {};
|
|
458
|
+
/**
|
|
459
|
+
* Codegen writes a package.json of its own into the outdir so that bundlers get a
|
|
460
|
+
* `sideEffects` hint, and marks it `private` because a generated directory is not
|
|
461
|
+
* something to publish. This command is what turns it into a real package: it
|
|
462
|
+
* supplies the identity the file lacks and lifts that flag.
|
|
463
|
+
*
|
|
464
|
+
* This used to key on a missing `name`. Codegen now emits one — a nameless
|
|
465
|
+
* package.json is what pnpm, npm and changesets refuse to scan rather than skip —
|
|
466
|
+
* so its absence no longer distinguishes anything.
|
|
467
|
+
*
|
|
468
|
+
* `private` alone will not do either: a consumer can own a private *named* package
|
|
469
|
+
* here, which is the `@acme/styled-system` workspace layout the component-library
|
|
470
|
+
* guide recommends. What separates the two is `version`. Ours never carries one, and
|
|
471
|
+
* a file that is private with no version is by definition not publishable and holds
|
|
472
|
+
* no identity worth preserving, so supplying one is the whole point of the command.
|
|
473
|
+
*
|
|
474
|
+
* `existing` is spread last, so anything already declared wins and a second run
|
|
475
|
+
* only refreshes `exports`.
|
|
476
|
+
*/
|
|
477
|
+
const isGenerated = existing.private === true && existing.version === void 0;
|
|
478
|
+
const content = isGenerated ? {
|
|
479
|
+
...identity,
|
|
480
|
+
...existing
|
|
481
|
+
} : existing;
|
|
482
|
+
if (isGenerated) delete content.private;
|
|
483
|
+
content.exports = {
|
|
484
|
+
...content.exports,
|
|
485
|
+
...Object.fromEntries(exports),
|
|
486
|
+
"./styles.css": stylesDir
|
|
487
|
+
};
|
|
488
|
+
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
472
489
|
logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
473
490
|
});
|
|
474
491
|
cli.command("mcp", "Start MCP server for AI assistants").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).action(async (mcpFlags) => {
|
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.
|
|
27
|
+
var version = "1.13.1";
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/interactive.ts
|
|
30
30
|
const interactive = async () => {
|
|
@@ -124,7 +124,7 @@ const interactive = async () => {
|
|
|
124
124
|
_clack_prompts.cancel("Operation cancelled.");
|
|
125
125
|
process.exit(0);
|
|
126
126
|
} });
|
|
127
|
-
_clack_prompts.outro("Let's get started!
|
|
127
|
+
_clack_prompts.outro("Let's get started! 🎋");
|
|
128
128
|
return {
|
|
129
129
|
postcss: initFlags.usePostcss === "yes",
|
|
130
130
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
package/dist/interactive.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
2
|
//#region package.json
|
|
3
|
-
var version = "1.
|
|
3
|
+
var version = "1.13.1";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/interactive.ts
|
|
6
6
|
const interactive = async () => {
|
|
@@ -100,7 +100,7 @@ const interactive = async () => {
|
|
|
100
100
|
p.cancel("Operation cancelled.");
|
|
101
101
|
process.exit(0);
|
|
102
102
|
} });
|
|
103
|
-
p.outro("Let's get started!
|
|
103
|
+
p.outro("Let's get started! 🎋");
|
|
104
104
|
return {
|
|
105
105
|
postcss: initFlags.usePostcss === "yes",
|
|
106
106
|
outExtension: initFlags.useMjsExtension === "yes" ? "mjs" : "js",
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "The user facing package for bamboo css",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author": "
|
|
7
|
+
"author": "Gajus Kuizinas <gajus@gajus.com>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/bamboocss/bamboo.git",
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@clack/prompts": "0.11.0",
|
|
56
56
|
"cac": "6.7.14",
|
|
57
|
-
"@bamboocss/config": "1.
|
|
58
|
-
"@bamboocss/
|
|
59
|
-
"@bamboocss/
|
|
60
|
-
"@bamboocss/
|
|
61
|
-
"@bamboocss/
|
|
62
|
-
"@bamboocss/
|
|
63
|
-
"@bamboocss/preset-
|
|
64
|
-
"@bamboocss/
|
|
65
|
-
"@bamboocss/
|
|
66
|
-
"@bamboocss/
|
|
57
|
+
"@bamboocss/config": "1.13.1",
|
|
58
|
+
"@bamboocss/logger": "1.13.1",
|
|
59
|
+
"@bamboocss/mcp": "1.13.1",
|
|
60
|
+
"@bamboocss/node": "1.13.1",
|
|
61
|
+
"@bamboocss/postcss": "1.13.1",
|
|
62
|
+
"@bamboocss/preset-bamboo": "1.13.1",
|
|
63
|
+
"@bamboocss/preset-base": "1.13.1",
|
|
64
|
+
"@bamboocss/shared": "1.13.1",
|
|
65
|
+
"@bamboocss/token-dictionary": "1.13.1",
|
|
66
|
+
"@bamboocss/types": "1.13.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/update-notifier": "6.0.8",
|