create-zenbu-app 0.0.28 → 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 +13 -2
  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,
@@ -1308,7 +1318,6 @@ async function runDesktopMode() {
1308
1318
  log.info(`appsDir=${appsDir}`);
1309
1319
  log.info(`logFile=${log.file}`);
1310
1320
  try {
1311
- p.log.step(`Scaffolding ${displayName}`);
1312
1321
  if (desktopDryRun) log.info(`[dry-run] would scaffold template into ${appsDir}`);
1313
1322
  else {
1314
1323
  fs.mkdirSync(appsDir, { recursive: true });
@@ -1322,6 +1331,7 @@ async function runDesktopMode() {
1322
1331
  const gi = path.join(appsDir, "_gitignore");
1323
1332
  if (fs.existsSync(gi)) fs.renameSync(gi, path.join(appsDir, ".gitignore"));
1324
1333
  seedPackageManager(appsDir, pm);
1334
+ trimAgentsMdIfRequested(appsDir);
1325
1335
  if (ZENBU_LOCAL_CORE) {
1326
1336
  const corePath = path.resolve(ZENBU_LOCAL_CORE);
1327
1337
  rewireToLocalCore(appsDir, corePath, false);
@@ -1330,7 +1340,7 @@ async function runDesktopMode() {
1330
1340
  }
1331
1341
  let installed = false;
1332
1342
  if (!noInstall && !desktopDryRun) {
1333
- p.log.step(`Installing dependencies (this can take a minute)`);
1343
+ p.log.step(`Installing dependencies`);
1334
1344
  log.info(`running ${pm.type} install in ${appsDir}`);
1335
1345
  installed = runInstallSilent(appsDir, pm, log);
1336
1346
  if (!installed) {
@@ -1430,6 +1440,7 @@ async function main() {
1430
1440
  const gi = path.join(projectDir, "_gitignore");
1431
1441
  if (fs.existsSync(gi)) fs.renameSync(gi, path.join(projectDir, ".gitignore"));
1432
1442
  if (!pluginMode) seedPackageManager(projectDir, pm);
1443
+ trimAgentsMdIfRequested(projectDir);
1433
1444
  if (ZENBU_LOCAL_CORE) {
1434
1445
  const corePath = path.resolve(ZENBU_LOCAL_CORE);
1435
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.28",
3
+ "version": "0.0.30",
4
4
  "description": "Scaffold a new Zenbu app",
5
5
  "type": "module",
6
6
  "publishConfig": {