sprint-es 0.0.107 → 0.0.108

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/cjs/cli.cjs CHANGED
@@ -400,30 +400,56 @@ async function main() {
400
400
  case "build": {
401
401
  console.log("🚀 Building for production...");
402
402
  const isTS = fs.existsSync(path.join(projectRoot, "sprint.config.ts"));
403
+ console.log(`[Sprint] Project type: ${isTS ? "TypeScript" : "JavaScript"}`);
404
+ console.log(`[Sprint] Project root: ${projectRoot}`);
403
405
  if (isTS) {
404
406
  const tsconfigPath = path.join(projectRoot, "tsconfig.json");
407
+ console.log(`[Sprint] tsconfig path: ${tsconfigPath}`);
408
+ console.log(`[Sprint] tsconfig exists: ${fs.existsSync(tsconfigPath)}`);
405
409
  const tsconfig = JSON.parse(stripJsonComments(fs.readFileSync(tsconfigPath, "utf-8")));
410
+ console.log(`[Sprint] tsconfig include: ${JSON.stringify(tsconfig.include)}`);
406
411
  const originalInclude = tsconfig.include ?? [];
407
412
  const patched = originalInclude.filter((p) => !p.includes("sprint.config"));
413
+ console.log(`[Sprint] patched include: ${JSON.stringify(patched)}`);
414
+ console.log(`[Sprint] needs patching: ${patched.length !== originalInclude.length}`);
408
415
  if (patched.length !== originalInclude.length) {
416
+ console.log("[Sprint] Patching tsconfig temporarily...");
409
417
  fs.writeFileSync(tsconfigPath, JSON.stringify({ ...tsconfig, include: patched }, null, 4));
418
+ console.log("[Sprint] tsconfig patched ✓");
410
419
  try {
420
+ console.log("[Sprint] Running tsc...");
411
421
  await runCommand("tsc", { NODE_ENV: "production" });
422
+ console.log("[Sprint] tsc completed ✓");
423
+ console.log("[Sprint] Running tsc-alias...");
412
424
  await runCommand("tsc-alias", { NODE_ENV: "production" });
425
+ console.log("[Sprint] tsc-alias completed ✓");
413
426
  } finally {
427
+ console.log("[Sprint] Restoring tsconfig...");
414
428
  fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 4));
429
+ console.log("[Sprint] tsconfig restored ✓");
415
430
  }
416
431
  } else {
432
+ console.log("[Sprint] No patching needed");
433
+ console.log("[Sprint] Running tsc...");
417
434
  await runCommand("tsc", { NODE_ENV: "production" });
435
+ console.log("[Sprint] tsc completed ✓");
436
+ console.log("[Sprint] Running tsc-alias...");
418
437
  await runCommand("tsc-alias", { NODE_ENV: "production" });
438
+ console.log("[Sprint] tsc-alias completed ✓");
419
439
  }
440
+ console.log("[Sprint] Compiling sprint.config.ts with esbuild...");
420
441
  await runCommand(
421
442
  "esbuild sprint.config.ts --outfile=dist/sprint.config.js --platform=node --format=esm --bundle=false",
422
443
  { NODE_ENV: "production" }
423
444
  );
445
+ console.log("[Sprint] sprint.config.js generated ✓");
424
446
  } else {
447
+ console.log("[Sprint] Running tsc...");
425
448
  await runCommand("tsc", { NODE_ENV: "production" });
449
+ console.log("[Sprint] tsc completed ✓");
450
+ console.log("[Sprint] Running tsc-alias...");
426
451
  await runCommand("tsc-alias", { NODE_ENV: "production" });
452
+ console.log("[Sprint] tsc-alias completed ✓");
427
453
  }
428
454
  break;
429
455
  }
package/dist/esm/cli.js CHANGED
@@ -381,30 +381,56 @@ async function main() {
381
381
  case "build": {
382
382
  console.log("🚀 Building for production...");
383
383
  const isTS = existsSync(join(projectRoot, "sprint.config.ts"));
384
+ console.log(`[Sprint] Project type: ${isTS ? "TypeScript" : "JavaScript"}`);
385
+ console.log(`[Sprint] Project root: ${projectRoot}`);
384
386
  if (isTS) {
385
387
  const tsconfigPath = join(projectRoot, "tsconfig.json");
388
+ console.log(`[Sprint] tsconfig path: ${tsconfigPath}`);
389
+ console.log(`[Sprint] tsconfig exists: ${existsSync(tsconfigPath)}`);
386
390
  const tsconfig = JSON.parse(stripJsonComments(readFileSync(tsconfigPath, "utf-8")));
391
+ console.log(`[Sprint] tsconfig include: ${JSON.stringify(tsconfig.include)}`);
387
392
  const originalInclude = tsconfig.include ?? [];
388
393
  const patched = originalInclude.filter((p) => !p.includes("sprint.config"));
394
+ console.log(`[Sprint] patched include: ${JSON.stringify(patched)}`);
395
+ console.log(`[Sprint] needs patching: ${patched.length !== originalInclude.length}`);
389
396
  if (patched.length !== originalInclude.length) {
397
+ console.log("[Sprint] Patching tsconfig temporarily...");
390
398
  writeFileSync(tsconfigPath, JSON.stringify({ ...tsconfig, include: patched }, null, 4));
399
+ console.log("[Sprint] tsconfig patched ✓");
391
400
  try {
401
+ console.log("[Sprint] Running tsc...");
392
402
  await runCommand("tsc", { NODE_ENV: "production" });
403
+ console.log("[Sprint] tsc completed ✓");
404
+ console.log("[Sprint] Running tsc-alias...");
393
405
  await runCommand("tsc-alias", { NODE_ENV: "production" });
406
+ console.log("[Sprint] tsc-alias completed ✓");
394
407
  } finally {
408
+ console.log("[Sprint] Restoring tsconfig...");
395
409
  writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 4));
410
+ console.log("[Sprint] tsconfig restored ✓");
396
411
  }
397
412
  } else {
413
+ console.log("[Sprint] No patching needed");
414
+ console.log("[Sprint] Running tsc...");
398
415
  await runCommand("tsc", { NODE_ENV: "production" });
416
+ console.log("[Sprint] tsc completed ✓");
417
+ console.log("[Sprint] Running tsc-alias...");
399
418
  await runCommand("tsc-alias", { NODE_ENV: "production" });
419
+ console.log("[Sprint] tsc-alias completed ✓");
400
420
  }
421
+ console.log("[Sprint] Compiling sprint.config.ts with esbuild...");
401
422
  await runCommand(
402
423
  "esbuild sprint.config.ts --outfile=dist/sprint.config.js --platform=node --format=esm --bundle=false",
403
424
  { NODE_ENV: "production" }
404
425
  );
426
+ console.log("[Sprint] sprint.config.js generated ✓");
405
427
  } else {
428
+ console.log("[Sprint] Running tsc...");
406
429
  await runCommand("tsc", { NODE_ENV: "production" });
430
+ console.log("[Sprint] tsc completed ✓");
431
+ console.log("[Sprint] Running tsc-alias...");
407
432
  await runCommand("tsc-alias", { NODE_ENV: "production" });
433
+ console.log("[Sprint] tsc-alias completed ✓");
408
434
  }
409
435
  break;
410
436
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "Sprint - Quickly API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",