create-better-t-stack 3.41.0 → 3.41.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/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { A as setProcessMode, S as getLatestCLIVersion, b as scrubReason, i as SchemaNameSchema, l as create, m as getSchemaResult, s as add, u as createBtsCli, v as durationBucket, x as types_exports, y as reportDiagnostic } from "./src-NAkPN6DN.mjs";
2
+ import { A as setProcessMode, S as getLatestCLIVersion, b as scrubReason, i as SchemaNameSchema, l as create, m as getSchemaResult, s as add, u as createBtsCli, v as durationBucket, x as types_exports, y as reportDiagnostic } from "./src-pRksmzD7.mjs";
3
3
  import z from "zod";
4
4
  import { McpServer } from "@modelcontextprotocol/server";
5
5
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { C as CLIError, D as ProjectCreationError, E as DirectoryConflictError, O as UserCancelledError, T as DatabaseSetupError, _ as ProjectLauncherSchema, a as TEMPLATE_COUNT, c as builder, d as createVirtual, f as docs, g as sponsors, h as router, i as SchemaNameSchema, k as ValidationError, l as create, m as getSchemaResult, n as GeneratorError, o as VirtualFileSystem, p as generate, r as Result, s as add, t as EMBEDDED_TEMPLATES, u as createBtsCli, w as CompatibilityError } from "./src-NAkPN6DN.mjs";
2
+ import { C as CLIError, D as ProjectCreationError, E as DirectoryConflictError, O as UserCancelledError, T as DatabaseSetupError, _ as ProjectLauncherSchema, a as TEMPLATE_COUNT, c as builder, d as createVirtual, f as docs, g as sponsors, h as router, i as SchemaNameSchema, k as ValidationError, l as create, m as getSchemaResult, n as GeneratorError, o as VirtualFileSystem, p as generate, r as Result, s as add, t as EMBEDDED_TEMPLATES, u as createBtsCli, w as CompatibilityError } from "./src-pRksmzD7.mjs";
3
3
  export { CLIError, CompatibilityError, DatabaseSetupError, DirectoryConflictError, EMBEDDED_TEMPLATES, GeneratorError, ProjectCreationError, ProjectLauncherSchema, Result, SchemaNameSchema, TEMPLATE_COUNT, UserCancelledError, ValidationError, VirtualFileSystem, add, builder, create, createBtsCli, createVirtual, docs, generate, getSchemaResult, router, sponsors };
@@ -8964,6 +8964,7 @@ async function createProject(options, cliInput) {
8964
8964
  return Result.gen(async function* () {
8965
8965
  const projectDir = options.projectDir;
8966
8966
  const isConvex = options.backend === "convex";
8967
+ const scaffoldStartTime = Date.now();
8967
8968
  yield* Result.await(Result.tryPromise({
8968
8969
  try: () => fs.ensureDir(projectDir),
8969
8970
  catch: (e) => new ProjectCreationError({
@@ -9005,6 +9006,7 @@ async function createProject(options, cliInput) {
9005
9006
  }));
9006
9007
  yield* Result.await(formatProject(projectDir));
9007
9008
  if (!isSilent()) log.success("Project scaffolded");
9009
+ await reportSlowStage("create", "scaffold", Date.now() - scaffoldStartTime, options.packageManager);
9008
9010
  if (options.install) {
9009
9011
  const installStartTime = Date.now();
9010
9012
  yield* Result.await(installDependencies({
@@ -9084,7 +9086,7 @@ async function executeCreateProjectHandler(input, options) {
9084
9086
  const startTime = Date.now();
9085
9087
  const timeScaffolded = (/* @__PURE__ */ new Date()).toISOString();
9086
9088
  const result = await createProjectHandlerInternal(input, startTime, timeScaffolded);
9087
- await reportCreateOutcome(input, result, Date.now() - startTime);
9089
+ await reportCreateOutcome(input, result);
9088
9090
  return {
9089
9091
  result,
9090
9092
  startTime,
@@ -9093,12 +9095,9 @@ async function executeCreateProjectHandler(input, options) {
9093
9095
  });
9094
9096
  }
9095
9097
  /** Diagnostics for what the success-only project event cannot show; awaited so it beats process.exit. */
9096
- async function reportCreateOutcome(input, result, elapsedMs) {
9098
+ async function reportCreateOutcome(input, result) {
9097
9099
  const mode = resolveInvocationMode(input.yes);
9098
- if (result.isOk()) {
9099
- if (!input.dryRun) await reportSlowStage("create", "create", elapsedMs, input.packageManager ?? "unknown");
9100
- return;
9101
- }
9100
+ if (result.isOk()) return;
9102
9101
  const error = result.error;
9103
9102
  if (UserCancelledError.is(error)) {
9104
9103
  await reportDiagnostic("cli_cancelled", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.41.0",
3
+ "version": "3.41.1",
4
4
  "description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5
5
  "keywords": [
6
6
  "better-auth",
@@ -69,8 +69,8 @@
69
69
  "prepublishOnly": "npm run build"
70
70
  },
71
71
  "dependencies": {
72
- "@better-t-stack/template-generator": "^3.41.0",
73
- "@better-t-stack/types": "^3.41.0",
72
+ "@better-t-stack/template-generator": "^3.41.1",
73
+ "@better-t-stack/types": "^3.41.1",
74
74
  "@clack/core": "^1.4.3",
75
75
  "@clack/prompts": "^1.7.0",
76
76
  "@modelcontextprotocol/server": "2.0.0",