create-better-t-stack 2.32.0 → 2.32.2
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.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/{src-BEEshIQf.js → src-DVlkWMko.js} +6 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ type CreateInput = {
|
|
|
125
125
|
webDeploy?: WebDeploy;
|
|
126
126
|
directoryConflict?: DirectoryConflict;
|
|
127
127
|
renderTitle?: boolean;
|
|
128
|
+
disableAnalytics?: boolean;
|
|
128
129
|
};
|
|
129
130
|
type AddInput = {
|
|
130
131
|
addons?: Addons[];
|
|
@@ -207,6 +208,7 @@ declare const router: trpcServer.TRPCBuiltRouter<{
|
|
|
207
208
|
webDeploy?: "none" | "workers" | undefined;
|
|
208
209
|
directoryConflict?: "error" | "merge" | "overwrite" | "increment" | undefined;
|
|
209
210
|
renderTitle?: boolean | undefined;
|
|
211
|
+
disableAnalytics?: boolean | undefined;
|
|
210
212
|
}];
|
|
211
213
|
output: InitResult | undefined;
|
|
212
214
|
meta: object;
|
|
@@ -262,6 +264,7 @@ declare function createBtsCli(): trpc_cli0.TrpcCli;
|
|
|
262
264
|
* packageManager: "bun",
|
|
263
265
|
* install: false,
|
|
264
266
|
* directoryConflict: "increment", // auto-handle conflicts
|
|
267
|
+
* disableAnalytics: true, // disable analytics
|
|
265
268
|
* });
|
|
266
269
|
*
|
|
267
270
|
* if (result.success) {
|
package/dist/index.js
CHANGED
|
@@ -1212,8 +1212,8 @@ function isTelemetryEnabled() {
|
|
|
1212
1212
|
//#region src/utils/analytics.ts
|
|
1213
1213
|
const POSTHOG_API_KEY = "phc_8ZUxEwwfKMajJLvxz1daGd931dYbQrwKNficBmsdIrs";
|
|
1214
1214
|
const POSTHOG_HOST = "https://us.i.posthog.com";
|
|
1215
|
-
async function trackProjectCreation(config) {
|
|
1216
|
-
if (!isTelemetryEnabled()) return;
|
|
1215
|
+
async function trackProjectCreation(config, disableAnalytics = false) {
|
|
1216
|
+
if (!isTelemetryEnabled() || disableAnalytics) return;
|
|
1217
1217
|
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
|
|
1218
1218
|
const { projectName, projectDir, relativePath,...safeConfig } = config;
|
|
1219
1219
|
const payload = {
|
|
@@ -2539,9 +2539,6 @@ async function setupExamplesTemplate(projectDir, context) {
|
|
|
2539
2539
|
const exampleDbSchemaSrc = path.join(exampleServerSrc, context.orm, context.database);
|
|
2540
2540
|
if (await fs.pathExists(exampleDbSchemaSrc)) await processAndCopyFiles("**/*", exampleDbSchemaSrc, serverAppDir, context, false);
|
|
2541
2541
|
}
|
|
2542
|
-
const ignorePatterns = [`${context.orm}/**`];
|
|
2543
|
-
if (example === "ai" && context.backend === "next") ignorePatterns.push("next/**");
|
|
2544
|
-
await processAndCopyFiles(["**/*.ts", "**/*.hbs"], exampleServerSrc, serverAppDir, context, false, ignorePatterns);
|
|
2545
2542
|
}
|
|
2546
2543
|
if (webAppDirExists) {
|
|
2547
2544
|
if (hasReactWeb) {
|
|
@@ -5229,7 +5226,7 @@ async function createProjectHandler(input) {
|
|
|
5229
5226
|
await createProject(config);
|
|
5230
5227
|
const reproducibleCommand = generateReproducibleCommand(config);
|
|
5231
5228
|
log.success(pc.blue(`You can reproduce this setup with the following command:\n${reproducibleCommand}`));
|
|
5232
|
-
await trackProjectCreation(config);
|
|
5229
|
+
await trackProjectCreation(config, input.disableAnalytics);
|
|
5233
5230
|
const elapsedTimeMs = Date.now() - startTime;
|
|
5234
5231
|
const elapsedTimeInSeconds = (elapsedTimeMs / 1e3).toFixed(2);
|
|
5235
5232
|
outro(pc.magenta(`Project created successfully in ${pc.bold(elapsedTimeInSeconds)} seconds!`));
|
|
@@ -5418,7 +5415,8 @@ const router = t.router({
|
|
|
5418
5415
|
api: APISchema.optional(),
|
|
5419
5416
|
webDeploy: WebDeploySchema.optional(),
|
|
5420
5417
|
directoryConflict: DirectoryConflictSchema.optional(),
|
|
5421
|
-
renderTitle: z.boolean().optional()
|
|
5418
|
+
renderTitle: z.boolean().optional(),
|
|
5419
|
+
disableAnalytics: z.boolean().optional().default(false).describe("Disable analytics")
|
|
5422
5420
|
})])).mutation(async ({ input }) => {
|
|
5423
5421
|
const [projectName, options] = input;
|
|
5424
5422
|
const combinedInput = {
|
|
@@ -5498,6 +5496,7 @@ function createBtsCli() {
|
|
|
5498
5496
|
* packageManager: "bun",
|
|
5499
5497
|
* install: false,
|
|
5500
5498
|
* directoryConflict: "increment", // auto-handle conflicts
|
|
5499
|
+
* disableAnalytics: true, // disable analytics
|
|
5501
5500
|
* });
|
|
5502
5501
|
*
|
|
5503
5502
|
* if (result.success) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.2",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|