create-zenbu-app 0.0.29 → 0.0.30

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.
Files changed (2) hide show
  1. package/dist/index.mjs +12 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -866,6 +866,16 @@ function parseDependsOn(raw) {
866
866
  };
867
867
  }
868
868
  const ZENBU_LOCAL_CORE = process.env.ZENBU_LOCAL_CORE;
869
+ const TRIM_AGENTS_MD = process.env.TRIM_AGENTS_MD === "1";
870
+ const AGENTS_MD_MAX_CHARS = 4e4;
871
+ function trimAgentsMdIfRequested(projectDir) {
872
+ if (!TRIM_AGENTS_MD) return;
873
+ const target = path.join(projectDir, "AGENTS.md");
874
+ if (!fs.existsSync(target)) return;
875
+ const original = fs.readFileSync(target, "utf8");
876
+ if (original.length <= AGENTS_MD_MAX_CHARS) return;
877
+ fs.writeFileSync(target, original.slice(0, AGENTS_MD_MAX_CHARS));
878
+ }
869
879
  const CONFIG_OPTIONS = [{
870
880
  id: "tailwind",
871
881
  default: true,
@@ -1321,6 +1331,7 @@ async function runDesktopMode() {
1321
1331
  const gi = path.join(appsDir, "_gitignore");
1322
1332
  if (fs.existsSync(gi)) fs.renameSync(gi, path.join(appsDir, ".gitignore"));
1323
1333
  seedPackageManager(appsDir, pm);
1334
+ trimAgentsMdIfRequested(appsDir);
1324
1335
  if (ZENBU_LOCAL_CORE) {
1325
1336
  const corePath = path.resolve(ZENBU_LOCAL_CORE);
1326
1337
  rewireToLocalCore(appsDir, corePath, false);
@@ -1429,6 +1440,7 @@ async function main() {
1429
1440
  const gi = path.join(projectDir, "_gitignore");
1430
1441
  if (fs.existsSync(gi)) fs.renameSync(gi, path.join(projectDir, ".gitignore"));
1431
1442
  if (!pluginMode) seedPackageManager(projectDir, pm);
1443
+ trimAgentsMdIfRequested(projectDir);
1432
1444
  if (ZENBU_LOCAL_CORE) {
1433
1445
  const corePath = path.resolve(ZENBU_LOCAL_CORE);
1434
1446
  rewireToLocalCore(projectDir, corePath, pluginMode);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zenbu-app",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Scaffold a new Zenbu app",
5
5
  "type": "module",
6
6
  "publishConfig": {