create-better-fullstack 2.1.6 → 2.1.8
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/{add-handler-CuPmSJRM.mjs → add-handler-ztNjzoMN.mjs} +43 -5
- package/dist/addons-setup-DnLjAzTw.mjs +7 -0
- package/dist/{addons-setup-C_lxdJqU.mjs → addons-setup-LaAj43NP.mjs} +3 -24
- package/dist/analytics-DVltG11u.mjs +170 -0
- package/dist/{bts-config-BceXPcpI.mjs → bts-config-DQVWvPDs.mjs} +70 -66
- package/dist/cli.mjs +2 -2
- package/dist/{config-processing-B_1wTe3g.mjs → config-processing-D9-F2Us9.mjs} +1 -1
- package/dist/{doctor-DucDyWfl.mjs → doctor-a4ca3SMd.mjs} +2 -2
- package/dist/{file-formatter-XU6ti05V.mjs → file-formatter-gvmrpd-g.mjs} +13 -1
- package/dist/{gen-DWx3Xu_K.mjs → gen-CCClL7Ve.mjs} +1 -1
- package/dist/{generated-checks-Dt4Xqp1x.mjs → generated-checks-BV9jol5h.mjs} +1 -1
- package/dist/index.d.mts +27 -21
- package/dist/index.mjs +10 -8
- package/dist/{install-dependencies-DHoYa3P-.mjs → install-dependencies-RoUyaE8o.mjs} +7 -2
- package/dist/mcp-492OkjcS.mjs +11 -0
- package/dist/mcp-entry.mjs +56 -18
- package/dist/prompt-environment-BR0Kkw2W.mjs +26 -0
- package/dist/{registry-CxeEOPot.mjs → registry-DSf2CEaU.mjs} +27 -13
- package/dist/run-CD8f7PHh.mjs +15 -0
- package/dist/{run-D80ZtSO8.mjs → run-T6g1jkfy.mjs} +1810 -444
- package/dist/scaffold-manifest-DGRyepdb.mjs +4 -0
- package/dist/{scaffold-manifest-GV1fbhpD.mjs → scaffold-manifest-Dyi0voqE.mjs} +13 -1
- package/dist/{update-C9_x2yBF.mjs → update-DJ8CI5KW.mjs} +3 -3
- package/package.json +3 -3
- package/dist/addons-setup-DEPfsn6z.mjs +0 -6
- package/dist/mcp-D9O5zgAA.mjs +0 -8
- package/dist/run-3AkXloH1.mjs +0 -13
- /package/dist/{update-deps-DLZAuT3V.mjs → update-deps-aD-iQw4U.mjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -23,6 +23,10 @@ interface SetupStepResult {
|
|
|
23
23
|
errorMessage?: string;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
+
//#region src/utils/analytics.d.ts
|
|
27
|
+
|
|
28
|
+
type TelemetrySource = "cli-interactive" | "cli-flags" | "mcp" | "programmatic";
|
|
29
|
+
//#endregion
|
|
26
30
|
//#region src/helpers/core/add-handler.d.ts
|
|
27
31
|
interface AddResult {
|
|
28
32
|
success: boolean;
|
|
@@ -37,11 +41,11 @@ declare const router: {
|
|
|
37
41
|
create: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodTuple<[z.ZodOptional<z.ZodString>, z.ZodObject<{
|
|
38
42
|
template: z.ZodOptional<z.ZodEnum<{
|
|
39
43
|
none: "none";
|
|
44
|
+
uniwind: "uniwind";
|
|
40
45
|
mern: "mern";
|
|
41
46
|
pern: "pern";
|
|
42
47
|
t3: "t3";
|
|
43
48
|
saas: "saas";
|
|
44
|
-
uniwind: "uniwind";
|
|
45
49
|
}>>;
|
|
46
50
|
fromHistory: z.ZodOptional<z.ZodNumber>;
|
|
47
51
|
config: z.ZodOptional<z.ZodString>;
|
|
@@ -289,9 +293,9 @@ declare const router: {
|
|
|
289
293
|
}>>;
|
|
290
294
|
mobileUI: z.ZodOptional<z.ZodEnum<{
|
|
291
295
|
none: "none";
|
|
292
|
-
uniwind: "uniwind";
|
|
293
296
|
tamagui: "tamagui";
|
|
294
297
|
"gluestack-ui": "gluestack-ui";
|
|
298
|
+
uniwind: "uniwind";
|
|
295
299
|
unistyles: "unistyles";
|
|
296
300
|
}>>;
|
|
297
301
|
mobileStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -449,7 +453,6 @@ declare const router: {
|
|
|
449
453
|
"postcss-only": "postcss-only";
|
|
450
454
|
}>>;
|
|
451
455
|
uiLibrary: z.ZodOptional<z.ZodEnum<{
|
|
452
|
-
mui: "mui";
|
|
453
456
|
none: "none";
|
|
454
457
|
"shadcn-ui": "shadcn-ui";
|
|
455
458
|
"shadcn-svelte": "shadcn-svelte";
|
|
@@ -460,6 +463,7 @@ declare const router: {
|
|
|
460
463
|
"chakra-ui": "chakra-ui";
|
|
461
464
|
nextui: "nextui";
|
|
462
465
|
mantine: "mantine";
|
|
466
|
+
mui: "mui";
|
|
463
467
|
antd: "antd";
|
|
464
468
|
"base-ui": "base-ui";
|
|
465
469
|
"ark-ui": "ark-ui";
|
|
@@ -531,8 +535,8 @@ declare const router: {
|
|
|
531
535
|
"geist-mono": "geist-mono";
|
|
532
536
|
}>>;
|
|
533
537
|
shadcnRadius: z.ZodOptional<z.ZodEnum<{
|
|
534
|
-
none: "none";
|
|
535
538
|
default: "default";
|
|
539
|
+
none: "none";
|
|
536
540
|
small: "small";
|
|
537
541
|
medium: "medium";
|
|
538
542
|
large: "large";
|
|
@@ -560,10 +564,10 @@ declare const router: {
|
|
|
560
564
|
vercel: "vercel";
|
|
561
565
|
}>>;
|
|
562
566
|
directoryConflict: z.ZodOptional<z.ZodEnum<{
|
|
567
|
+
error: "error";
|
|
563
568
|
merge: "merge";
|
|
564
569
|
overwrite: "overwrite";
|
|
565
570
|
increment: "increment";
|
|
566
|
-
error: "error";
|
|
567
571
|
}>>;
|
|
568
572
|
renderTitle: z.ZodOptional<z.ZodBoolean>;
|
|
569
573
|
disableAnalytics: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -598,12 +602,12 @@ declare const router: {
|
|
|
598
602
|
ratatui: "ratatui";
|
|
599
603
|
}>>;
|
|
600
604
|
rustLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
605
|
+
config: "config";
|
|
601
606
|
none: "none";
|
|
602
607
|
serde: "serde";
|
|
603
608
|
uuid: "uuid";
|
|
604
609
|
chrono: "chrono";
|
|
605
610
|
reqwest: "reqwest";
|
|
606
|
-
config: "config";
|
|
607
611
|
dashmap: "dashmap";
|
|
608
612
|
"parking-lot": "parking-lot";
|
|
609
613
|
secrecy: "secrecy";
|
|
@@ -750,9 +754,9 @@ declare const router: {
|
|
|
750
754
|
stdlib: "stdlib";
|
|
751
755
|
}>>;
|
|
752
756
|
goOrm: z.ZodOptional<z.ZodEnum<{
|
|
753
|
-
gorm: "gorm";
|
|
754
757
|
none: "none";
|
|
755
758
|
bun: "bun";
|
|
759
|
+
gorm: "gorm";
|
|
756
760
|
sqlc: "sqlc";
|
|
757
761
|
ent: "ent";
|
|
758
762
|
}>>;
|
|
@@ -1068,7 +1072,7 @@ declare const router: {
|
|
|
1068
1072
|
testing: "none" | "vitest" | "playwright" | "vitest-playwright" | "jest" | "cypress";
|
|
1069
1073
|
email: "none" | "react-email" | "resend" | "nodemailer" | "postmark" | "sendgrid" | "aws-ses" | "mailgun" | "plunk";
|
|
1070
1074
|
cssFramework: "none" | "tailwind" | "scss" | "less" | "postcss-only";
|
|
1071
|
-
uiLibrary: "none" | "
|
|
1075
|
+
uiLibrary: "none" | "shadcn-ui" | "shadcn-svelte" | "daisyui" | "radix-ui" | "headless-ui" | "park-ui" | "chakra-ui" | "nextui" | "mantine" | "mui" | "antd" | "base-ui" | "ark-ui" | "react-aria";
|
|
1072
1076
|
validation: "none" | "zod" | "valibot" | "arktype" | "typebox" | "typia" | "runtypes" | "effect-schema";
|
|
1073
1077
|
realtime: "none" | "socket-io" | "partykit" | "ably" | "pusher" | "liveblocks" | "yjs";
|
|
1074
1078
|
jobQueue: "none" | "bullmq" | "trigger-dev" | "inngest" | "temporal";
|
|
@@ -1180,7 +1184,7 @@ declare const router: {
|
|
|
1180
1184
|
javaLanguage?: "java" | "kotlin" | undefined;
|
|
1181
1185
|
stackParts?: {
|
|
1182
1186
|
id: string;
|
|
1183
|
-
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "
|
|
1187
|
+
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "push" | "mobile" | "graphql" | "deploy" | "navigation" | "ui" | "css" | "storage" | "ota" | "deepLinking" | "appPlatform" | "dataFetching" | "workspaceTooling" | "language" | "buildTool" | "cli" | "errorHandling" | "httpClient" | "libraries" | "templating";
|
|
1184
1188
|
toolId: string;
|
|
1185
1189
|
ecosystem: "typescript" | "react-native" | "rust" | "python" | "go" | "java" | "elixir" | "dotnet" | "universal";
|
|
1186
1190
|
source: "selected" | "defaulted" | "provided" | "legacy" | "adjusted";
|
|
@@ -1232,7 +1236,7 @@ declare const router: {
|
|
|
1232
1236
|
testing: "none" | "vitest" | "playwright" | "vitest-playwright" | "jest" | "cypress";
|
|
1233
1237
|
email: "none" | "react-email" | "resend" | "nodemailer" | "postmark" | "sendgrid" | "aws-ses" | "mailgun" | "plunk";
|
|
1234
1238
|
cssFramework: "none" | "tailwind" | "scss" | "less" | "postcss-only";
|
|
1235
|
-
uiLibrary: "none" | "
|
|
1239
|
+
uiLibrary: "none" | "shadcn-ui" | "shadcn-svelte" | "daisyui" | "radix-ui" | "headless-ui" | "park-ui" | "chakra-ui" | "nextui" | "mantine" | "mui" | "antd" | "base-ui" | "ark-ui" | "react-aria";
|
|
1236
1240
|
validation: "none" | "zod" | "valibot" | "arktype" | "typebox" | "typia" | "runtypes" | "effect-schema";
|
|
1237
1241
|
realtime: "none" | "socket-io" | "partykit" | "ably" | "pusher" | "liveblocks" | "yjs";
|
|
1238
1242
|
jobQueue: "none" | "bullmq" | "trigger-dev" | "inngest" | "temporal";
|
|
@@ -1344,7 +1348,7 @@ declare const router: {
|
|
|
1344
1348
|
javaLanguage?: "java" | "kotlin" | undefined;
|
|
1345
1349
|
stackParts?: {
|
|
1346
1350
|
id: string;
|
|
1347
|
-
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "
|
|
1351
|
+
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "push" | "mobile" | "graphql" | "deploy" | "navigation" | "ui" | "css" | "storage" | "ota" | "deepLinking" | "appPlatform" | "dataFetching" | "workspaceTooling" | "language" | "buildTool" | "cli" | "errorHandling" | "httpClient" | "libraries" | "templating";
|
|
1348
1352
|
toolId: string;
|
|
1349
1353
|
ecosystem: "typescript" | "react-native" | "rust" | "python" | "go" | "java" | "elixir" | "dotnet" | "universal";
|
|
1350
1354
|
source: "selected" | "defaulted" | "provided" | "legacy" | "adjusted";
|
|
@@ -1410,7 +1414,7 @@ declare const router: {
|
|
|
1410
1414
|
testing: "none" | "vitest" | "playwright" | "vitest-playwright" | "jest" | "cypress";
|
|
1411
1415
|
email: "none" | "react-email" | "resend" | "nodemailer" | "postmark" | "sendgrid" | "aws-ses" | "mailgun" | "plunk";
|
|
1412
1416
|
cssFramework: "none" | "tailwind" | "scss" | "less" | "postcss-only";
|
|
1413
|
-
uiLibrary: "none" | "
|
|
1417
|
+
uiLibrary: "none" | "shadcn-ui" | "shadcn-svelte" | "daisyui" | "radix-ui" | "headless-ui" | "park-ui" | "chakra-ui" | "nextui" | "mantine" | "mui" | "antd" | "base-ui" | "ark-ui" | "react-aria";
|
|
1414
1418
|
validation: "none" | "zod" | "valibot" | "arktype" | "typebox" | "typia" | "runtypes" | "effect-schema";
|
|
1415
1419
|
realtime: "none" | "socket-io" | "partykit" | "ably" | "pusher" | "liveblocks" | "yjs";
|
|
1416
1420
|
jobQueue: "none" | "bullmq" | "trigger-dev" | "inngest" | "temporal";
|
|
@@ -1522,7 +1526,7 @@ declare const router: {
|
|
|
1522
1526
|
javaLanguage?: "java" | "kotlin" | undefined;
|
|
1523
1527
|
stackParts?: {
|
|
1524
1528
|
id: string;
|
|
1525
|
-
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "
|
|
1529
|
+
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "push" | "mobile" | "graphql" | "deploy" | "navigation" | "ui" | "css" | "storage" | "ota" | "deepLinking" | "appPlatform" | "dataFetching" | "workspaceTooling" | "language" | "buildTool" | "cli" | "errorHandling" | "httpClient" | "libraries" | "templating";
|
|
1526
1530
|
toolId: string;
|
|
1527
1531
|
ecosystem: "typescript" | "react-native" | "rust" | "python" | "go" | "java" | "elixir" | "dotnet" | "universal";
|
|
1528
1532
|
source: "selected" | "defaulted" | "provided" | "legacy" | "adjusted";
|
|
@@ -1574,7 +1578,7 @@ declare const router: {
|
|
|
1574
1578
|
testing: "none" | "vitest" | "playwright" | "vitest-playwright" | "jest" | "cypress";
|
|
1575
1579
|
email: "none" | "react-email" | "resend" | "nodemailer" | "postmark" | "sendgrid" | "aws-ses" | "mailgun" | "plunk";
|
|
1576
1580
|
cssFramework: "none" | "tailwind" | "scss" | "less" | "postcss-only";
|
|
1577
|
-
uiLibrary: "none" | "
|
|
1581
|
+
uiLibrary: "none" | "shadcn-ui" | "shadcn-svelte" | "daisyui" | "radix-ui" | "headless-ui" | "park-ui" | "chakra-ui" | "nextui" | "mantine" | "mui" | "antd" | "base-ui" | "ark-ui" | "react-aria";
|
|
1578
1582
|
validation: "none" | "zod" | "valibot" | "arktype" | "typebox" | "typia" | "runtypes" | "effect-schema";
|
|
1579
1583
|
realtime: "none" | "socket-io" | "partykit" | "ably" | "pusher" | "liveblocks" | "yjs";
|
|
1580
1584
|
jobQueue: "none" | "bullmq" | "trigger-dev" | "inngest" | "temporal";
|
|
@@ -1686,7 +1690,7 @@ declare const router: {
|
|
|
1686
1690
|
javaLanguage?: "java" | "kotlin" | undefined;
|
|
1687
1691
|
stackParts?: {
|
|
1688
1692
|
id: string;
|
|
1689
|
-
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "
|
|
1693
|
+
role: "api" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "auth" | "payments" | "email" | "fileUpload" | "logging" | "observability" | "stateManagement" | "forms" | "validation" | "testing" | "realtime" | "jobQueue" | "caching" | "rateLimit" | "i18n" | "search" | "vectorDb" | "fileStorage" | "animation" | "cms" | "featureFlags" | "analytics" | "codeQuality" | "documentation" | "examples" | "ai" | "effect" | "config" | "frontend" | "push" | "mobile" | "graphql" | "deploy" | "navigation" | "ui" | "css" | "storage" | "ota" | "deepLinking" | "appPlatform" | "dataFetching" | "workspaceTooling" | "language" | "buildTool" | "cli" | "errorHandling" | "httpClient" | "libraries" | "templating";
|
|
1690
1694
|
toolId: string;
|
|
1691
1695
|
ecosystem: "typescript" | "react-native" | "rust" | "python" | "go" | "java" | "elixir" | "dotnet" | "universal";
|
|
1692
1696
|
source: "selected" | "defaulted" | "provided" | "legacy" | "adjusted";
|
|
@@ -1985,7 +1989,6 @@ declare const router: {
|
|
|
1985
1989
|
"postcss-only": "postcss-only";
|
|
1986
1990
|
}>>;
|
|
1987
1991
|
uiLibrary: z.ZodOptional<z.ZodEnum<{
|
|
1988
|
-
mui: "mui";
|
|
1989
1992
|
none: "none";
|
|
1990
1993
|
"shadcn-ui": "shadcn-ui";
|
|
1991
1994
|
"shadcn-svelte": "shadcn-svelte";
|
|
@@ -1996,6 +1999,7 @@ declare const router: {
|
|
|
1996
1999
|
"chakra-ui": "chakra-ui";
|
|
1997
2000
|
nextui: "nextui";
|
|
1998
2001
|
mantine: "mantine";
|
|
2002
|
+
mui: "mui";
|
|
1999
2003
|
antd: "antd";
|
|
2000
2004
|
"base-ui": "base-ui";
|
|
2001
2005
|
"ark-ui": "ark-ui";
|
|
@@ -2031,9 +2035,9 @@ declare const router: {
|
|
|
2031
2035
|
}>>;
|
|
2032
2036
|
mobileUI: z.ZodOptional<z.ZodEnum<{
|
|
2033
2037
|
none: "none";
|
|
2034
|
-
uniwind: "uniwind";
|
|
2035
2038
|
tamagui: "tamagui";
|
|
2036
2039
|
"gluestack-ui": "gluestack-ui";
|
|
2040
|
+
uniwind: "uniwind";
|
|
2037
2041
|
unistyles: "unistyles";
|
|
2038
2042
|
}>>;
|
|
2039
2043
|
mobileStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2167,8 +2171,8 @@ declare const router: {
|
|
|
2167
2171
|
"geist-mono": "geist-mono";
|
|
2168
2172
|
}>>;
|
|
2169
2173
|
shadcnRadius: z.ZodOptional<z.ZodEnum<{
|
|
2170
|
-
none: "none";
|
|
2171
2174
|
default: "default";
|
|
2175
|
+
none: "none";
|
|
2172
2176
|
small: "small";
|
|
2173
2177
|
medium: "medium";
|
|
2174
2178
|
large: "large";
|
|
@@ -2203,12 +2207,12 @@ declare const router: {
|
|
|
2203
2207
|
ratatui: "ratatui";
|
|
2204
2208
|
}>>;
|
|
2205
2209
|
rustLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2210
|
+
config: "config";
|
|
2206
2211
|
none: "none";
|
|
2207
2212
|
serde: "serde";
|
|
2208
2213
|
uuid: "uuid";
|
|
2209
2214
|
chrono: "chrono";
|
|
2210
2215
|
reqwest: "reqwest";
|
|
2211
|
-
config: "config";
|
|
2212
2216
|
dashmap: "dashmap";
|
|
2213
2217
|
"parking-lot": "parking-lot";
|
|
2214
2218
|
secrecy: "secrecy";
|
|
@@ -2355,9 +2359,9 @@ declare const router: {
|
|
|
2355
2359
|
stdlib: "stdlib";
|
|
2356
2360
|
}>>;
|
|
2357
2361
|
goOrm: z.ZodOptional<z.ZodEnum<{
|
|
2358
|
-
gorm: "gorm";
|
|
2359
2362
|
none: "none";
|
|
2360
2363
|
bun: "bun";
|
|
2364
|
+
gorm: "gorm";
|
|
2361
2365
|
sqlc: "sqlc";
|
|
2362
2366
|
ent: "ent";
|
|
2363
2367
|
}>>;
|
|
@@ -2785,7 +2789,9 @@ declare function create(projectName?: string, options?: Partial<types_d_exports.
|
|
|
2785
2789
|
declare function sponsors(): Promise<void>;
|
|
2786
2790
|
declare function docs(): Promise<void>;
|
|
2787
2791
|
declare function builder(): Promise<void>;
|
|
2788
|
-
declare function add(input: types_d_exports.AddInput
|
|
2792
|
+
declare function add(input: types_d_exports.AddInput, options?: {
|
|
2793
|
+
telemetrySource?: TelemetrySource;
|
|
2794
|
+
}): Promise<AddResult | undefined>;
|
|
2789
2795
|
declare function history(options?: {
|
|
2790
2796
|
limit?: number;
|
|
2791
2797
|
clear?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./bts-config-
|
|
3
|
-
import { a as createBtsCli, c as history, d as telemetry, f as update, i as create, l as router, n as builder, o as docs, r as check, s as doctor, t as add, u as sponsors } from "./run-
|
|
2
|
+
import "./bts-config-DQVWvPDs.mjs";
|
|
3
|
+
import { a as createBtsCli, c as history, d as telemetry, f as update, i as create, l as router, n as builder, o as docs, r as check, s as doctor, t as add, u as sponsors } from "./run-T6g1jkfy.mjs";
|
|
4
4
|
import "./render-title-zvyKC1ej.mjs";
|
|
5
5
|
import "./errors-ns_o2OKg.mjs";
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import "./
|
|
6
|
+
import "./prompt-environment-BR0Kkw2W.mjs";
|
|
7
|
+
import "./analytics-DVltG11u.mjs";
|
|
8
|
+
import "./file-formatter-gvmrpd-g.mjs";
|
|
9
|
+
import "./install-dependencies-RoUyaE8o.mjs";
|
|
10
|
+
import "./generated-checks-BV9jol5h.mjs";
|
|
11
|
+
import { t as applyEffectBackendDefaults } from "./config-processing-D9-F2Us9.mjs";
|
|
12
|
+
import "./scaffold-manifest-Dyi0voqE.mjs";
|
|
13
|
+
import "./addons-setup-LaAj43NP.mjs";
|
|
12
14
|
import { EMBEDDED_TEMPLATES, TEMPLATE_COUNT, VirtualFileSystem, generateVirtualProject } from "@better-fullstack/template-generator";
|
|
13
15
|
|
|
14
16
|
//#region src/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { b as types_exports, g as DEFAULT_CONFIG } from "./bts-config-DQVWvPDs.mjs";
|
|
3
3
|
import { d as setLastPromptShownUI, r as exitCancelled, s as isFirstPrompt, u as setIsFirstPrompt$1 } from "./errors-ns_o2OKg.mjs";
|
|
4
|
-
import { g as validateAddonCompatibility, o as getCompatibleAddons } from "./file-formatter-
|
|
4
|
+
import { g as validateAddonCompatibility, o as getCompatibleAddons } from "./file-formatter-gvmrpd-g.mjs";
|
|
5
5
|
import { log, spinner } from "@clack/prompts";
|
|
6
6
|
import pc from "picocolors";
|
|
7
7
|
import fs from "fs-extra";
|
|
@@ -576,6 +576,10 @@ function getVersionPrefix(version) {
|
|
|
576
576
|
function applyVersionPrefix(currentVersion, resolvedVersion) {
|
|
577
577
|
return `${getVersionPrefix(currentVersion)}${resolvedVersion}`;
|
|
578
578
|
}
|
|
579
|
+
function shouldApplyResolvedVersion(currentVersion, resolvedVersion, channel) {
|
|
580
|
+
if (channel !== "beta") return true;
|
|
581
|
+
return compareVersions(resolvedVersion, currentVersion) >= 0;
|
|
582
|
+
}
|
|
579
583
|
function isRegistrySemverSpec(version) {
|
|
580
584
|
return /^[~^]?\d/.test(version);
|
|
581
585
|
}
|
|
@@ -688,6 +692,7 @@ async function applyDependencyVersionChannel(projectDir, channel) {
|
|
|
688
692
|
if (!isRegistrySemverSpec(currentVersion)) continue;
|
|
689
693
|
const resolvedVersion = resolvedVersions.get(packageName);
|
|
690
694
|
if (!resolvedVersion) continue;
|
|
695
|
+
if (!shouldApplyResolvedVersion(currentVersion, resolvedVersion, channel)) continue;
|
|
691
696
|
const nextVersion = applyVersionPrefix(currentVersion, resolvedVersion);
|
|
692
697
|
if (nextVersion !== currentVersion) {
|
|
693
698
|
section[packageName] = nextVersion;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./bts-config-DQVWvPDs.mjs";
|
|
3
|
+
import "./errors-ns_o2OKg.mjs";
|
|
4
|
+
import "./prompt-environment-BR0Kkw2W.mjs";
|
|
5
|
+
import "./analytics-DVltG11u.mjs";
|
|
6
|
+
import "./file-formatter-gvmrpd-g.mjs";
|
|
7
|
+
import "./config-processing-D9-F2Us9.mjs";
|
|
8
|
+
import "./scaffold-manifest-Dyi0voqE.mjs";
|
|
9
|
+
import { a as startMcpServer, i as recommendStackFromBrief, n as MCP_STACK_UPDATE_SCHEMA, r as getMcpGraphPreview, t as MCP_PLAN_CREATE_SCHEMA } from "./mcp-entry.mjs";
|
|
10
|
+
|
|
11
|
+
export { recommendStackFromBrief, startMcpServer };
|
package/dist/mcp-entry.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { b as types_exports, d as getGraphSummary, m as getLatestCLIVersion, n as previewBtsConfigUpdate, o as writeBtsConfig, r as readBtsConfig, s as getEffectiveStack, t as buildBtsConfigForPersistence, v as getDefaultConfig } from "./bts-config-DQVWvPDs.mjs";
|
|
3
3
|
import "./errors-ns_o2OKg.mjs";
|
|
4
|
-
import
|
|
5
|
-
import { a as
|
|
4
|
+
import "./prompt-environment-BR0Kkw2W.mjs";
|
|
5
|
+
import { a as trackProjectCreation, i as trackEvent } from "./analytics-DVltG11u.mjs";
|
|
6
|
+
import { r as validateConfigForProgrammaticUse, t as formatCode, v as CreateCommandOptionsSchema } from "./file-formatter-gvmrpd-g.mjs";
|
|
7
|
+
import { a as getTemplateConfig, o as getTemplateDescription, s as generateReproducibleCommand, t as applyEffectBackendDefaults } from "./config-processing-D9-F2Us9.mjs";
|
|
8
|
+
import { o as refreshScaffoldManifestFiles } from "./scaffold-manifest-Dyi0voqE.mjs";
|
|
6
9
|
import z from "zod";
|
|
7
10
|
import fs from "fs-extra";
|
|
8
11
|
import path from "node:path";
|
|
@@ -1196,6 +1199,7 @@ async function applyStackUpdate(projectDirInput, input) {
|
|
|
1196
1199
|
version: plan.proposedConfig.version,
|
|
1197
1200
|
createdAt: plan.proposedConfig.createdAt
|
|
1198
1201
|
});
|
|
1202
|
+
await refreshScaffoldManifestFiles(plan.projectDir, plan.operations.map((operation) => operation.path));
|
|
1199
1203
|
await writeMigrationChecklist(plan.projectDir, plan);
|
|
1200
1204
|
return plan;
|
|
1201
1205
|
}
|
|
@@ -2502,6 +2506,7 @@ async function startMcpServer() {
|
|
|
2502
2506
|
openWorldHint: false
|
|
2503
2507
|
}
|
|
2504
2508
|
}, async (input) => {
|
|
2509
|
+
const startTime = Date.now();
|
|
2505
2510
|
try {
|
|
2506
2511
|
const { generateVirtualProject: generateVirtualProject$1, EMBEDDED_TEMPLATES: EMBEDDED_TEMPLATES$1 } = await import("@better-fullstack/template-generator");
|
|
2507
2512
|
const { writeTreeToFilesystem: writeTreeToFilesystem$1 } = await import("@better-fullstack/template-generator/fs-writer");
|
|
@@ -2515,25 +2520,41 @@ async function startMcpServer() {
|
|
|
2515
2520
|
config,
|
|
2516
2521
|
templates: EMBEDDED_TEMPLATES$1
|
|
2517
2522
|
});
|
|
2518
|
-
if (!result.success || !result.tree)
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2523
|
+
if (!result.success || !result.tree) {
|
|
2524
|
+
await trackProjectCreation(config, false, {
|
|
2525
|
+
source: "mcp",
|
|
2526
|
+
success: false,
|
|
2527
|
+
errorName: "GenerationFailed",
|
|
2528
|
+
durationMs: Date.now() - startTime
|
|
2529
|
+
});
|
|
2530
|
+
return {
|
|
2531
|
+
content: [{
|
|
2532
|
+
type: "text",
|
|
2533
|
+
text: JSON.stringify({
|
|
2534
|
+
success: false,
|
|
2535
|
+
error: result.error ?? "Generation failed"
|
|
2536
|
+
})
|
|
2537
|
+
}],
|
|
2538
|
+
isError: true
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2528
2541
|
await writeTreeToFilesystem$1(result.tree, projectDir);
|
|
2529
2542
|
await writeBtsConfig(config);
|
|
2530
2543
|
const graphPreview = getMcpGraphPreview(config);
|
|
2531
2544
|
let addonWarnings = [];
|
|
2532
2545
|
if (config.addons.length > 0 && config.addons[0] !== "none") {
|
|
2533
|
-
const { setupAddons } = await import("./addons-setup-
|
|
2546
|
+
const { setupAddons } = await import("./addons-setup-DnLjAzTw.mjs");
|
|
2534
2547
|
addonWarnings = await setupAddons(config);
|
|
2535
2548
|
}
|
|
2549
|
+
const { recordScaffoldManifest } = await import("./scaffold-manifest-DGRyepdb.mjs");
|
|
2550
|
+
await recordScaffoldManifest(projectDir);
|
|
2536
2551
|
const installCmd = getInstallCommand(input.ecosystem ?? "typescript", projectName, input.packageManager, input.javaBuildTool, input.javaWebFramework);
|
|
2552
|
+
await trackProjectCreation(config, false, {
|
|
2553
|
+
source: "mcp",
|
|
2554
|
+
success: true,
|
|
2555
|
+
fileCount: result.tree.fileCount,
|
|
2556
|
+
durationMs: Date.now() - startTime
|
|
2557
|
+
});
|
|
2537
2558
|
const payload = {
|
|
2538
2559
|
success: true,
|
|
2539
2560
|
projectDirectory: projectDir,
|
|
@@ -2550,6 +2571,12 @@ async function startMcpServer() {
|
|
|
2550
2571
|
structuredContent: payload
|
|
2551
2572
|
};
|
|
2552
2573
|
} catch (error) {
|
|
2574
|
+
await trackEvent("project_created", {}, {
|
|
2575
|
+
source: "mcp",
|
|
2576
|
+
success: false,
|
|
2577
|
+
errorName: error instanceof Error ? error.name : "UnknownError",
|
|
2578
|
+
durationMs: Date.now() - startTime
|
|
2579
|
+
});
|
|
2553
2580
|
return {
|
|
2554
2581
|
content: [{
|
|
2555
2582
|
type: "text",
|
|
@@ -2629,10 +2656,15 @@ async function startMcpServer() {
|
|
|
2629
2656
|
openWorldHint: false
|
|
2630
2657
|
}
|
|
2631
2658
|
}, async (input) => {
|
|
2659
|
+
const startTime = Date.now();
|
|
2660
|
+
const { projectDir: _projectDir, projectName: _projectName, ...requestedChanges } = input;
|
|
2632
2661
|
try {
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2635
|
-
|
|
2662
|
+
const result = await applyStackUpdate(sanitizePath(input.projectDir), requestedChanges);
|
|
2663
|
+
await trackEvent("stack_updated", requestedChanges, {
|
|
2664
|
+
source: "mcp",
|
|
2665
|
+
success: result.success,
|
|
2666
|
+
durationMs: Date.now() - startTime
|
|
2667
|
+
});
|
|
2636
2668
|
if (!result.success) return {
|
|
2637
2669
|
content: [{
|
|
2638
2670
|
type: "text",
|
|
@@ -2657,6 +2689,12 @@ async function startMcpServer() {
|
|
|
2657
2689
|
structuredContent: payload
|
|
2658
2690
|
};
|
|
2659
2691
|
} catch (error) {
|
|
2692
|
+
await trackEvent("stack_updated", requestedChanges, {
|
|
2693
|
+
source: "mcp",
|
|
2694
|
+
success: false,
|
|
2695
|
+
errorName: error instanceof Error ? error.name : "UnknownError",
|
|
2696
|
+
durationMs: Date.now() - startTime
|
|
2697
|
+
});
|
|
2660
2698
|
const payload = {
|
|
2661
2699
|
success: false,
|
|
2662
2700
|
projectDir: input.projectDir,
|
|
@@ -2785,7 +2823,7 @@ async function startMcpServer() {
|
|
|
2785
2823
|
projectDir: safePath,
|
|
2786
2824
|
install: false,
|
|
2787
2825
|
packageManager: input.packageManager
|
|
2788
|
-
});
|
|
2826
|
+
}, { telemetrySource: "mcp" });
|
|
2789
2827
|
if (result?.success) {
|
|
2790
2828
|
const existingConfig = await readBtsConfig(safePath);
|
|
2791
2829
|
const graphPreview = existingConfig ? getMcpGraphPreview(existingConfig) : void 0;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { c as isSilent } from "./errors-ns_o2OKg.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/prompt-environment.ts
|
|
5
|
+
function hasOwnProperty(value, property) {
|
|
6
|
+
return Object.prototype.hasOwnProperty.call(value, property);
|
|
7
|
+
}
|
|
8
|
+
function resolveCiValue(environment) {
|
|
9
|
+
if (environment && hasOwnProperty(environment, "ci")) return environment.ci;
|
|
10
|
+
return process.env.CI;
|
|
11
|
+
}
|
|
12
|
+
function isCiEnvironment(value) {
|
|
13
|
+
if (!value) return false;
|
|
14
|
+
const normalizedValue = value.trim().toLowerCase();
|
|
15
|
+
return normalizedValue !== "" && normalizedValue !== "0" && normalizedValue !== "false";
|
|
16
|
+
}
|
|
17
|
+
function canPromptInteractively(environment = {}) {
|
|
18
|
+
const silent = environment.silent ?? isSilent();
|
|
19
|
+
const stdinIsTTY = environment.stdinIsTTY ?? process.stdin.isTTY === true;
|
|
20
|
+
const stdoutIsTTY = environment.stdoutIsTTY ?? process.stdout.isTTY === true;
|
|
21
|
+
const ci = resolveCiValue(environment);
|
|
22
|
+
return !silent && stdinIsTTY && stdoutIsTTY && !isCiEnvironment(ci);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { canPromptInteractively as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { b as types_exports, r as readBtsConfig } from "./bts-config-DQVWvPDs.mjs";
|
|
3
3
|
import { t as renderTitle } from "./render-title-zvyKC1ej.mjs";
|
|
4
4
|
import { t as CLIError } from "./errors-ns_o2OKg.mjs";
|
|
5
5
|
import { intro, log, outro } from "@clack/prompts";
|
|
@@ -168,9 +168,26 @@ async function resolveEnvExamplePath(projectDir) {
|
|
|
168
168
|
* manifest). Applied to both file writes and dependency-map target dirs so a
|
|
169
169
|
* pack can never write outside / mutate sibling projects.
|
|
170
170
|
*/
|
|
171
|
-
function
|
|
171
|
+
function isPathInside(rootDir, candidate) {
|
|
172
|
+
const rel = path.relative(rootDir, candidate);
|
|
173
|
+
return rel === "" || !rel.startsWith("..") && !path.isAbsolute(rel);
|
|
174
|
+
}
|
|
175
|
+
async function assertPathInsideProject(projectDir, targetAbs, label) {
|
|
172
176
|
const rel = path.relative(projectDir, targetAbs);
|
|
173
177
|
if (rel === "" || rel.startsWith("..") || path.isAbsolute(rel)) throw new CLIError(`Capability pack ${label} escapes the project directory and was rejected: ${targetAbs}`);
|
|
178
|
+
const realProjectDir = await fs.realpath(projectDir);
|
|
179
|
+
let current = projectDir;
|
|
180
|
+
for (const segment of rel.split(path.sep)) {
|
|
181
|
+
current = path.join(current, segment);
|
|
182
|
+
if (!await fs.lstat(current).catch(() => null)) break;
|
|
183
|
+
let realCurrent;
|
|
184
|
+
try {
|
|
185
|
+
realCurrent = await fs.realpath(current);
|
|
186
|
+
} catch {
|
|
187
|
+
throw new CLIError(`Capability pack ${label} resolves through an invalid symlink and was rejected: ${current}`);
|
|
188
|
+
}
|
|
189
|
+
if (!isPathInside(realProjectDir, realCurrent)) throw new CLIError(`Capability pack ${label} escapes the project directory through a symlink and was rejected: ${targetAbs}`);
|
|
190
|
+
}
|
|
174
191
|
}
|
|
175
192
|
/**
|
|
176
193
|
* Merges a pack's dependencies/devDependencies into the target package.json
|
|
@@ -194,7 +211,7 @@ async function planDependencyChanges(projectDir, manifest) {
|
|
|
194
211
|
if (Object.keys(deps).length === 0) continue;
|
|
195
212
|
const pkgRelPath = path.join(dir === "." ? "" : dir, "package.json");
|
|
196
213
|
const pkgAbsPath = path.join(projectDir, pkgRelPath);
|
|
197
|
-
assertPathInsideProject(projectDir, pkgAbsPath, `dependency target "${dir}"`);
|
|
214
|
+
await assertPathInsideProject(projectDir, pkgAbsPath, `dependency target "${dir}"`);
|
|
198
215
|
if (!await fs.pathExists(pkgAbsPath)) throw new CLIError(`Pack targets ${pkgRelPath} which does not exist in this project. Cannot merge dependencies.`);
|
|
199
216
|
const pkgJson = writes.get(pkgAbsPath) ?? await fs.readJson(pkgAbsPath);
|
|
200
217
|
const field = dev ? "devDependencies" : "dependencies";
|
|
@@ -238,7 +255,7 @@ async function addPack(options) {
|
|
|
238
255
|
for (const file of manifest.files) {
|
|
239
256
|
const normalized = file.path.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
240
257
|
const targetAbs = path.join(projectDir, normalized);
|
|
241
|
-
assertPathInsideProject(projectDir, targetAbs, `file path "${file.path}"`);
|
|
258
|
+
await assertPathInsideProject(projectDir, targetAbs, `file path "${file.path}"`);
|
|
242
259
|
if (!file.overwrite && await fs.pathExists(targetAbs)) {
|
|
243
260
|
filesSkipped.push(normalized);
|
|
244
261
|
continue;
|
|
@@ -254,6 +271,7 @@ async function addPack(options) {
|
|
|
254
271
|
if (manifest.env.length > 0) {
|
|
255
272
|
envFile = await resolveEnvExamplePath(projectDir);
|
|
256
273
|
const envAbs = path.join(projectDir, envFile);
|
|
274
|
+
await assertPathInsideProject(projectDir, envAbs, `environment target "${envFile}"`);
|
|
257
275
|
const merged = appendEnvVars(await fs.pathExists(envAbs) ? await fs.readFile(envAbs, "utf-8") : "", manifest.env);
|
|
258
276
|
envKeys = merged.keys;
|
|
259
277
|
if (merged.keys.length > 0) envContent = merged.content;
|
|
@@ -272,6 +290,8 @@ async function addPack(options) {
|
|
|
272
290
|
envFile,
|
|
273
291
|
dryRun: true
|
|
274
292
|
};
|
|
293
|
+
await assertPathInsideProject(projectDir, path.join(projectDir, LOCK_DIR, LOCK_FILE), "registry lock target");
|
|
294
|
+
await assertPathInsideProject(projectDir, path.join(projectDir, "bts.jsonc"), "config target");
|
|
275
295
|
if (filesWritten.length > 0) await writeTreeToFilesystem({
|
|
276
296
|
root: vfs.toTree(manifest.name),
|
|
277
297
|
fileCount: vfs.getFileCount(),
|
|
@@ -336,7 +356,7 @@ function reportJsonError(error) {
|
|
|
336
356
|
ok: false,
|
|
337
357
|
error: errorMessage(error)
|
|
338
358
|
}, null, 2));
|
|
339
|
-
process.
|
|
359
|
+
process.exit(1);
|
|
340
360
|
}
|
|
341
361
|
async function registryHandler(input) {
|
|
342
362
|
const projectDir = path.resolve(input.projectDir || process.cwd());
|
|
@@ -359,10 +379,7 @@ async function registryHandler(input) {
|
|
|
359
379
|
}
|
|
360
380
|
if (!input.source) {
|
|
361
381
|
const error = new CLIError("registry add requires a <source> (a local path or file:// URL to a capability pack).");
|
|
362
|
-
if (input.json)
|
|
363
|
-
reportJsonError(error);
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
382
|
+
if (input.json) reportJsonError(error);
|
|
366
383
|
throw error;
|
|
367
384
|
}
|
|
368
385
|
const dryRun = input.dryRun ?? false;
|
|
@@ -374,10 +391,7 @@ async function registryHandler(input) {
|
|
|
374
391
|
dryRun
|
|
375
392
|
});
|
|
376
393
|
} catch (error) {
|
|
377
|
-
if (input.json)
|
|
378
|
-
reportJsonError(error);
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
394
|
+
if (input.json) reportJsonError(error);
|
|
381
395
|
throw error;
|
|
382
396
|
}
|
|
383
397
|
if (input.json) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./bts-config-DQVWvPDs.mjs";
|
|
3
|
+
import { a as createBtsCli, c as history, d as telemetry, f as update, i as create, l as router, n as builder, o as docs, r as check, s as doctor, t as add, u as sponsors } from "./run-T6g1jkfy.mjs";
|
|
4
|
+
import "./render-title-zvyKC1ej.mjs";
|
|
5
|
+
import "./errors-ns_o2OKg.mjs";
|
|
6
|
+
import "./prompt-environment-BR0Kkw2W.mjs";
|
|
7
|
+
import "./analytics-DVltG11u.mjs";
|
|
8
|
+
import "./file-formatter-gvmrpd-g.mjs";
|
|
9
|
+
import "./install-dependencies-RoUyaE8o.mjs";
|
|
10
|
+
import "./generated-checks-BV9jol5h.mjs";
|
|
11
|
+
import "./config-processing-D9-F2Us9.mjs";
|
|
12
|
+
import "./scaffold-manifest-Dyi0voqE.mjs";
|
|
13
|
+
import "./addons-setup-LaAj43NP.mjs";
|
|
14
|
+
|
|
15
|
+
export { createBtsCli };
|