@beignet/cli 0.0.51 → 0.0.52

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 (87) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +51 -18
  3. package/dist/analysis/layers.d.ts.map +1 -1
  4. package/dist/analysis/layers.js +4 -2
  5. package/dist/analysis/layers.js.map +1 -1
  6. package/dist/analysis/port-wiring.d.ts.map +1 -1
  7. package/dist/analysis/port-wiring.js +2 -1
  8. package/dist/analysis/port-wiring.js.map +1 -1
  9. package/dist/analysis/source-files.d.ts +15 -0
  10. package/dist/analysis/source-files.d.ts.map +1 -0
  11. package/dist/analysis/source-files.js +52 -0
  12. package/dist/analysis/source-files.js.map +1 -0
  13. package/dist/analysis/workspace.d.ts.map +1 -1
  14. package/dist/analysis/workspace.js +21 -25
  15. package/dist/analysis/workspace.js.map +1 -1
  16. package/dist/app-map-changes.d.ts.map +1 -1
  17. package/dist/app-map-changes.js +5 -7
  18. package/dist/app-map-changes.js.map +1 -1
  19. package/dist/app-map.d.ts.map +1 -1
  20. package/dist/app-map.js +33 -30
  21. package/dist/app-map.js.map +1 -1
  22. package/dist/check.d.ts +12 -0
  23. package/dist/check.d.ts.map +1 -1
  24. package/dist/check.js +92 -25
  25. package/dist/check.js.map +1 -1
  26. package/dist/git-changes.d.ts +17 -1
  27. package/dist/git-changes.d.ts.map +1 -1
  28. package/dist/git-changes.js +118 -84
  29. package/dist/git-changes.js.map +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +3 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/inspect.d.ts.map +1 -1
  34. package/dist/inspect.js +339 -112
  35. package/dist/inspect.js.map +1 -1
  36. package/dist/lint.d.ts.map +1 -1
  37. package/dist/lint.js +3 -6
  38. package/dist/lint.js.map +1 -1
  39. package/dist/mcp.js +1 -1
  40. package/dist/mcp.js.map +1 -1
  41. package/dist/templates/agents.d.ts.map +1 -1
  42. package/dist/templates/agents.js +36 -13
  43. package/dist/templates/agents.js.map +1 -1
  44. package/dist/templates/base.js +5 -5
  45. package/dist/templates/db/mysql.d.ts.map +1 -1
  46. package/dist/templates/db/mysql.js +51 -22
  47. package/dist/templates/db/mysql.js.map +1 -1
  48. package/dist/templates/db/postgres.d.ts.map +1 -1
  49. package/dist/templates/db/postgres.js +60 -20
  50. package/dist/templates/db/postgres.js.map +1 -1
  51. package/dist/templates/db/sqlite.d.ts.map +1 -1
  52. package/dist/templates/db/sqlite.js +51 -23
  53. package/dist/templates/db/sqlite.js.map +1 -1
  54. package/dist/templates/shadcn.js +1 -1
  55. package/dist/templates/shadcn.js.map +1 -1
  56. package/dist/templates/shared.js +4 -4
  57. package/dist/templates/shared.js.map +1 -1
  58. package/dist/templates/testing.d.ts.map +1 -1
  59. package/dist/templates/testing.js +7 -19
  60. package/dist/templates/testing.js.map +1 -1
  61. package/dist/test-discovery.d.ts +9 -0
  62. package/dist/test-discovery.d.ts.map +1 -0
  63. package/dist/test-discovery.js +40 -0
  64. package/dist/test-discovery.js.map +1 -0
  65. package/package.json +7 -5
  66. package/skills/app-structure/SKILL.md +32 -7
  67. package/src/analysis/layers.ts +4 -2
  68. package/src/analysis/port-wiring.ts +2 -1
  69. package/src/analysis/source-files.ts +61 -0
  70. package/src/analysis/workspace.ts +27 -31
  71. package/src/app-map-changes.ts +10 -8
  72. package/src/app-map.ts +43 -32
  73. package/src/check.ts +115 -25
  74. package/src/git-changes.ts +218 -86
  75. package/src/index.ts +8 -5
  76. package/src/inspect.ts +486 -141
  77. package/src/lint.ts +6 -5
  78. package/src/mcp.ts +1 -1
  79. package/src/templates/agents.ts +36 -13
  80. package/src/templates/base.ts +5 -5
  81. package/src/templates/db/mysql.ts +51 -22
  82. package/src/templates/db/postgres.ts +60 -20
  83. package/src/templates/db/sqlite.ts +51 -23
  84. package/src/templates/shadcn.ts +1 -1
  85. package/src/templates/shared.ts +4 -4
  86. package/src/templates/testing.ts +12 -19
  87. package/src/test-discovery.ts +53 -0
@@ -15,7 +15,7 @@
15
15
  // lives outside the app schema, so `db generate` never diffs against it.
16
16
  //
17
17
  // The Better Auth tables were generated with
18
- // `bunx @better-auth/cli generate` against a scratch app configured with
18
+ // `bunx auth generate` against a scratch app configured with
19
19
  // drizzleAdapter(db, { provider: "pg" }), then normalized to the starter's
20
20
  // conventions (tabs, no relations, no extra indexes, no column defaults).
21
21
  import { databaseLocalUrl } from "../../choices.js";
@@ -47,7 +47,7 @@ export function closeDatabaseClient(): Promise<void> {
47
47
  return closePromise;
48
48
  }
49
49
  `,
50
- dbSchema: `import { boolean, index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
50
+ dbSchema: `import { boolean, index, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
51
51
 
52
52
  export const user = pgTable("user", {
53
53
  id: text("id").primaryKey(),
@@ -72,23 +72,33 @@ export const session = pgTable("session", {
72
72
  .references(() => user.id, { onDelete: "cascade" }),
73
73
  });
74
74
 
75
- export const account = pgTable("account", {
76
- id: text("id").primaryKey(),
77
- accountId: text("account_id").notNull(),
78
- providerId: text("provider_id").notNull(),
79
- userId: text("user_id")
80
- .notNull()
81
- .references(() => user.id, { onDelete: "cascade" }),
82
- accessToken: text("access_token"),
83
- refreshToken: text("refresh_token"),
84
- idToken: text("id_token"),
85
- accessTokenExpiresAt: timestamp("access_token_expires_at"),
86
- refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
87
- scope: text("scope"),
88
- password: text("password"),
89
- createdAt: timestamp("created_at").notNull(),
90
- updatedAt: timestamp("updated_at").notNull(),
91
- });
75
+ export const account = pgTable(
76
+ "account",
77
+ {
78
+ id: text("id").primaryKey(),
79
+ issuer: text("issuer").notNull(),
80
+ accountId: text("account_id").notNull(),
81
+ providerId: text("provider_id").notNull(),
82
+ userId: text("user_id")
83
+ .notNull()
84
+ .references(() => user.id, { onDelete: "cascade" }),
85
+ accessToken: text("access_token"),
86
+ refreshToken: text("refresh_token"),
87
+ idToken: text("id_token"),
88
+ accessTokenExpiresAt: timestamp("access_token_expires_at"),
89
+ refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
90
+ scope: text("scope"),
91
+ password: text("password"),
92
+ createdAt: timestamp("created_at").notNull(),
93
+ updatedAt: timestamp("updated_at").notNull(),
94
+ },
95
+ (table) => [
96
+ uniqueIndex("account_issuer_accountId_uidx").on(
97
+ table.issuer,
98
+ table.accountId,
99
+ ),
100
+ ],
101
+ );
92
102
 
93
103
  export const verification = pgTable("verification", {
94
104
  id: text("id").primaryKey(),
@@ -408,6 +418,7 @@ const postgresStarterMigration = {
408
418
  // above, with the provider idempotency setup statements appended.
409
419
  starterMigrationSql: `CREATE TABLE "account" (
410
420
  "id" text PRIMARY KEY NOT NULL,
421
+ "issuer" text NOT NULL,
411
422
  "account_id" text NOT NULL,
412
423
  "provider_id" text NOT NULL,
413
424
  "user_id" text NOT NULL,
@@ -465,6 +476,7 @@ CREATE TABLE "verification" (
465
476
  ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
466
477
  ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
467
478
  ALTER TABLE "todos" ADD CONSTRAINT "todos_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
479
+ CREATE UNIQUE INDEX "account_issuer_accountId_uidx" ON "account" USING btree ("issuer","account_id");--> statement-breakpoint
468
480
  CREATE INDEX "todos_user_idx" ON "todos" USING btree ("user_id","created_at");
469
481
  --> statement-breakpoint
470
482
  CREATE TABLE IF NOT EXISTS "idempotency_records" (
@@ -512,6 +524,12 @@ CREATE INDEX IF NOT EXISTS "idempotency_records_expires_idx" ON "idempotency_rec
512
524
  "primaryKey": true,
513
525
  "notNull": true
514
526
  },
527
+ "issuer": {
528
+ "name": "issuer",
529
+ "type": "text",
530
+ "primaryKey": false,
531
+ "notNull": true
532
+ },
515
533
  "account_id": {
516
534
  "name": "account_id",
517
535
  "type": "text",
@@ -585,7 +603,29 @@ CREATE INDEX IF NOT EXISTS "idempotency_records_expires_idx" ON "idempotency_rec
585
603
  "notNull": true
586
604
  }
587
605
  },
588
- "indexes": {},
606
+ "indexes": {
607
+ "account_issuer_accountId_uidx": {
608
+ "name": "account_issuer_accountId_uidx",
609
+ "columns": [
610
+ {
611
+ "expression": "issuer",
612
+ "isExpression": false,
613
+ "asc": true,
614
+ "nulls": "last"
615
+ },
616
+ {
617
+ "expression": "account_id",
618
+ "isExpression": false,
619
+ "asc": true,
620
+ "nulls": "last"
621
+ }
622
+ ],
623
+ "isUnique": true,
624
+ "concurrently": false,
625
+ "method": "btree",
626
+ "with": {}
627
+ }
628
+ },
589
629
  "foreignKeys": {
590
630
  "account_user_id_user_id_fk": {
591
631
  "name": "account_user_id_user_id_fk",
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../../src/templates/db/postgres.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,sEAAsE;AACtE,uEAAuE;AACvE,EAAE;AACF,2DAA2D;AAC3D,0EAA0E;AAC1E,+EAA+E;AAC/E,yEAAyE;AACzE,8DAA8D;AAC9D,4EAA4E;AAC5E,sCAAsC;AACtC,yDAAyD;AACzD,2EAA2E;AAC3E,0EAA0E;AAC1E,yEAAyE;AACzE,EAAE;AACF,6CAA6C;AAC7C,yEAAyE;AACzE,2EAA2E;AAC3E,0EAA0E;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,OAAO;QACL,aAAa,EAAE;;;;;yCAKsB,g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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2a1B;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../src/templates/db/sqlite.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA26BlD,wBAAgB,aAAa,IAAI,eAAe,CAE/C"}
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../src/templates/db/sqlite.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAu8BlD,wBAAgB,aAAa,IAAI,eAAe,CAE/C"}
@@ -39,7 +39,7 @@ export function closeDatabaseClient(): Promise<void> {
39
39
  return closePromise;
40
40
  }
41
41
  `,
42
- dbSchema: `import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
42
+ dbSchema: `import { index, integer, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
43
43
 
44
44
  export const user = sqliteTable("user", {
45
45
  id: text("id").primaryKey(),
@@ -66,27 +66,37 @@ export const session = sqliteTable("session", {
66
66
  .references(() => user.id, { onDelete: "cascade" }),
67
67
  });
68
68
 
69
- export const account = sqliteTable("account", {
70
- id: text("id").primaryKey(),
71
- accountId: text("account_id").notNull(),
72
- providerId: text("provider_id").notNull(),
73
- userId: text("user_id")
74
- .notNull()
75
- .references(() => user.id, { onDelete: "cascade" }),
76
- accessToken: text("access_token"),
77
- refreshToken: text("refresh_token"),
78
- idToken: text("id_token"),
79
- accessTokenExpiresAt: integer("access_token_expires_at", {
80
- mode: "timestamp",
81
- }),
82
- refreshTokenExpiresAt: integer("refresh_token_expires_at", {
83
- mode: "timestamp",
84
- }),
85
- scope: text("scope"),
86
- password: text("password"),
87
- createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
88
- updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
89
- });
69
+ export const account = sqliteTable(
70
+ "account",
71
+ {
72
+ id: text("id").primaryKey(),
73
+ issuer: text("issuer").notNull(),
74
+ accountId: text("account_id").notNull(),
75
+ providerId: text("provider_id").notNull(),
76
+ userId: text("user_id")
77
+ .notNull()
78
+ .references(() => user.id, { onDelete: "cascade" }),
79
+ accessToken: text("access_token"),
80
+ refreshToken: text("refresh_token"),
81
+ idToken: text("id_token"),
82
+ accessTokenExpiresAt: integer("access_token_expires_at", {
83
+ mode: "timestamp",
84
+ }),
85
+ refreshTokenExpiresAt: integer("refresh_token_expires_at", {
86
+ mode: "timestamp",
87
+ }),
88
+ scope: text("scope"),
89
+ password: text("password"),
90
+ createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
91
+ updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
92
+ },
93
+ (table) => [
94
+ uniqueIndex("account_issuer_accountId_uidx").on(
95
+ table.issuer,
96
+ table.accountId,
97
+ ),
98
+ ],
99
+ );
90
100
 
91
101
  export const verification = sqliteTable("verification", {
92
102
  id: text("id").primaryKey(),
@@ -449,6 +459,7 @@ export async function createTestDatabase(): Promise<TestDatabase> {
449
459
  // above, with the provider idempotency setup statements appended.
450
460
  starterMigrationSql: `CREATE TABLE \`account\` (
451
461
  \`id\` text PRIMARY KEY NOT NULL,
462
+ \`issuer\` text NOT NULL,
452
463
  \`account_id\` text NOT NULL,
453
464
  \`provider_id\` text NOT NULL,
454
465
  \`user_id\` text NOT NULL,
@@ -464,6 +475,7 @@ export async function createTestDatabase(): Promise<TestDatabase> {
464
475
  FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON UPDATE no action ON DELETE cascade
465
476
  );
466
477
  --> statement-breakpoint
478
+ CREATE UNIQUE INDEX \`account_issuer_accountId_uidx\` ON \`account\` (\`issuer\`,\`account_id\`);--> statement-breakpoint
467
479
  CREATE TABLE \`session\` (
468
480
  \`id\` text PRIMARY KEY NOT NULL,
469
481
  \`expires_at\` integer NOT NULL,
@@ -552,6 +564,13 @@ CREATE INDEX IF NOT EXISTS "idempotency_records_expires_idx" ON "idempotency_rec
552
564
  "notNull": true,
553
565
  "autoincrement": false
554
566
  },
567
+ "issuer": {
568
+ "name": "issuer",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": true,
572
+ "autoincrement": false
573
+ },
555
574
  "account_id": {
556
575
  "name": "account_id",
557
576
  "type": "text",
@@ -637,7 +656,16 @@ CREATE INDEX IF NOT EXISTS "idempotency_records_expires_idx" ON "idempotency_rec
637
656
  "autoincrement": false
638
657
  }
639
658
  },
640
- "indexes": {},
659
+ "indexes": {
660
+ "account_issuer_accountId_uidx": {
661
+ "name": "account_issuer_accountId_uidx",
662
+ "columns": [
663
+ "issuer",
664
+ "account_id"
665
+ ],
666
+ "isUnique": true
667
+ }
668
+ },
641
669
  "foreignKeys": {
642
670
  "account_user_id_user_id_fk": {
643
671
  "name": "account_user_id_user_id_fk",
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.js","sourceRoot":"","sources":["../../../src/templates/db/sqlite.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,sEAAsE;AACtE,uEAAuE;AACvE,EAAE;AACF,2DAA2D;AAC3D,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,0EAA0E;AAC1E,iEAAiE;AACjE,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AAGzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,KAAK,GAAG;IACZ,aAAa,EAAE;;;;;;;;;CAShB;IACC,QAAQ,EAAE;;;;;;;;;;;;;;;CAeX;IACC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EX;IACC,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CV;IACC,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCjB;IACC,oEAAoE;IACpE,kEAAkE;IAClE,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EtB;IACC,uBAAuB,EAAE;;;;;;;;;;;;EAYzB;IACA,wBAAwB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAya1B;CACD,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -546,7 +546,7 @@ export const shadcnDependencies = {
546
546
  clsx: "^2.1.1",
547
547
  "lucide-react": "^1.16.0",
548
548
  "radix-ui": "^1.4.3",
549
- shadcn: "^4.7.0",
549
+ shadcn: "^4.19.0",
550
550
  "tailwind-merge": "^3.6.0",
551
551
  "tw-animate-css": "^1.4.0",
552
552
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shadcn.js","sourceRoot":"","sources":["../../src/templates/shadcn.ts"],"names":[],"mappings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OAAO,EAAE,UAAU,EAAE;QAC3D,EAAE,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,cAAc,EAAE;QACpE,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAO,EAAE;QACrD,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAO,EAAE;QACrD,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,WAAW,EAAE;KAC9D,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,0BAA0B,EAAE,QAAQ;IACpC,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,SAAS;IACzB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,QAAQ;IAC1B,gBAAgB,EAAE,QAAQ;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAA2B;IAC3D,sBAAsB,EAAE,QAAQ;IAChC,WAAW,EAAE,QAAQ;CACtB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export const externalVersions = {
2
2
  biome: "^2.4.14",
3
- next: "^16.2.10",
3
+ next: "^16.3.2",
4
4
  react: "^19.2.5",
5
5
  reactDom: "^19.2.5",
6
6
  tsx: "^4.22.4",
@@ -12,13 +12,13 @@ export const externalVersions = {
12
12
  tanstackReactQuery: "^5.100.7",
13
13
  hookformResolvers: "^5.0.0",
14
14
  reactHookForm: "^7.74.0",
15
- betterAuth: "1.6.25",
15
+ betterAuth: "1.7.1",
16
16
  bullmq: "^5.0.0",
17
17
  drizzleKit: "^0.31.10",
18
18
  drizzleOrm: "^0.45.2",
19
- inngest: "^4.12.1",
19
+ inngest: "^4.18.1",
20
20
  libsqlClient: "^0.14.0",
21
- vercelBlob: "^2.5.0",
21
+ vercelBlob: "^2.8.0",
22
22
  mysql2: "^3.12.0",
23
23
  pg: "^8.13.0",
24
24
  pglite: "^0.5.2",
@@ -1 +1 @@
1
- {"version":3,"file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ED,MAAM,CAAC,MAAM,mBAAmB,GAG5B;IACF,cAAc,EAAE;QACd,gCAAgC,EAAE,EAAE;QACpC,OAAO,EAAE,gBAAgB,CAAC,OAAO;KAClC;IACD,aAAa,EAAE;QACb,+BAA+B,EAAE,EAAE;QACnC,MAAM,EAAE,gBAAgB,CAAC,MAAM;KAChC;IACD,oBAAoB,EAAE;QACpB,sCAAsC,EAAE,EAAE;QAC1C,oBAAoB,EAAE,gBAAgB,CAAC,gBAAgB;QACvD,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;KAChD;CACF,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAChC,GAAoB,EACpB,QAA6B;IAE7B,OAAO,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAc;IACjC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;AAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/templates/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,sBAAsB,EAAE,YA+YpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAqKpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,YAAY,EAGlD,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/templates/testing.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,sBAAsB,EAAE,YA+YpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAwJpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,YAAY,EAGlD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { appTestFilePattern, configuredTestDirectoryPathKeys, configuredTestFilePathKeys, defaultAppTestRoots, } from "../test-discovery.js";
1
2
  export const testHelperTemplateFile = {
2
3
  path: "lib/beignet-test.ts",
3
4
  content: `import assert from "node:assert/strict";
@@ -405,16 +406,9 @@ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
405
406
  import path from "node:path";
406
407
  import { pathToFileURL } from "node:url";
407
408
 
408
- const defaultTestRoots = [
409
- "app",
410
- "features",
411
- "infra",
412
- "lib",
413
- "ports",
414
- "server",
415
- "tests",
416
- "src/tests",
417
- ];
409
+ const defaultTestRoots = ${JSON.stringify(defaultAppTestRoots, null, 2)};
410
+ const configuredTestDirectoryPathKeys = ${JSON.stringify(configuredTestDirectoryPathKeys)};
411
+ const configuredTestFilePathKeys = ${JSON.stringify(configuredTestFilePathKeys)};
418
412
  const ignoredDirectories = new Set([
419
413
  ".beignet-local",
420
414
  ".git",
@@ -424,7 +418,7 @@ const ignoredDirectories = new Set([
424
418
  "dist",
425
419
  "node_modules",
426
420
  ]);
427
- const testFilePattern = /\\.(test|spec)\\.[cm]?[tj]sx?$/;
421
+ const testFilePattern = /${appTestFilePattern.source}/;
428
422
 
429
423
  const configFileNames = [
430
424
  "beignet.config.ts",
@@ -529,14 +523,8 @@ async function configuredRoots(cwd: string): Promise<string[]> {
529
523
  }
530
524
  const paths = isObjectRecord(config.paths) ? config.paths : {};
531
525
  return [
532
- paths.tests,
533
- paths.features,
534
- parentPath(paths.routes),
535
- parentPath(paths.server),
536
- parentPath(paths.portWiring),
537
- parentPath(paths.ports),
538
- parentPath(paths.useCaseBuilder),
539
- parentPath(paths.routesBuilder),
526
+ ...configuredTestDirectoryPathKeys.map((key) => paths[key]),
527
+ ...configuredTestFilePathKeys.map((key) => parentPath(paths[key])),
540
528
  ].filter((root): root is string => Boolean(root) && root !== ".");
541
529
  }
542
530
 
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../src/templates/testing.ts"],"names":[],"mappings":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4YV;CACA,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAiB;IAClD,IAAI,EAAE,4BAA4B;IAClC,OAAO,EAAE;;;;;2BAKgB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC;0CAC7B,IAAI,CAAC,SAAS,CAAC,+BAA+B,CAAC;qCACpD,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;;;;;;;2BAUpD,kBAAkB,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoInD;CACA,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAmB;IACtD,sBAAsB;IACtB,sBAAsB;CACvB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type BeignetPaths } from "./config.js";
2
+ export declare const defaultAppTestRoots: readonly ["app", "features", "infra", "lib", "ports", "server", "tests", "src/tests"];
3
+ export declare const configuredTestDirectoryPathKeys: readonly ["tests", "features"];
4
+ export declare const configuredTestFilePathKeys: readonly ["routes", "server", "portWiring", "ports", "useCaseBuilder", "routesBuilder"];
5
+ export declare const appTestFilePattern: RegExp;
6
+ export declare function appTestRoots(paths: BeignetPaths): string[];
7
+ export declare function isAppTestFile(file: string): boolean;
8
+ export declare function isWithinAppTestRoots(file: string, roots: readonly string[]): boolean;
9
+ //# sourceMappingURL=test-discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-discovery.d.ts","sourceRoot":"","sources":["../src/test-discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,mBAAmB,uFAStB,CAAC;AAEX,eAAO,MAAM,+BAA+B,gCAGQ,CAAC;AAErD,eAAO,MAAM,0BAA0B,yFAOa,CAAC;AAErD,eAAO,MAAM,kBAAkB,QAAiC,CAAC;AAEjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,EAAE,CAW1D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,OAAO,CAET"}
@@ -0,0 +1,40 @@
1
+ import path from "node:path";
2
+ import { directoryPath } from "./config.js";
3
+ export const defaultAppTestRoots = [
4
+ "app",
5
+ "features",
6
+ "infra",
7
+ "lib",
8
+ "ports",
9
+ "server",
10
+ "tests",
11
+ "src/tests",
12
+ ];
13
+ export const configuredTestDirectoryPathKeys = [
14
+ "tests",
15
+ "features",
16
+ ];
17
+ export const configuredTestFilePathKeys = [
18
+ "routes",
19
+ "server",
20
+ "portWiring",
21
+ "ports",
22
+ "useCaseBuilder",
23
+ "routesBuilder",
24
+ ];
25
+ export const appTestFilePattern = /\.(test|spec)\.[cm]?[jt]sx?$/;
26
+ export function appTestRoots(paths) {
27
+ const roots = [
28
+ ...defaultAppTestRoots,
29
+ ...configuredTestDirectoryPathKeys.map((key) => paths[key]),
30
+ ...configuredTestFilePathKeys.map((key) => directoryPath(path.posix.dirname(paths[key]))),
31
+ ];
32
+ return Array.from(new Set(roots.map(directoryPath).filter((root) => root && root !== ".")));
33
+ }
34
+ export function isAppTestFile(file) {
35
+ return appTestFilePattern.test(file);
36
+ }
37
+ export function isWithinAppTestRoots(file, roots) {
38
+ return roots.some((root) => file.startsWith(`${root}/`));
39
+ }
40
+ //# sourceMappingURL=test-discovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-discovery.js","sourceRoot":"","sources":["../src/test-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAqB,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK;IACL,UAAU;IACV,OAAO;IACP,KAAK;IACL,OAAO;IACP,QAAQ;IACR,OAAO;IACP,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,OAAO;IACP,UAAU;CACwC,CAAC;AAErD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,gBAAgB;IAChB,eAAe;CACmC,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;AAEjE,MAAM,UAAU,YAAY,CAAC,KAAmB;IAC9C,MAAM,KAAK,GAAG;QACZ,GAAG,mBAAmB;QACtB,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3D,GAAG,0BAA0B,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACxC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAC9C;KACF,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,KAAwB;IAExB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;AAC3D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beignet/cli",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "type": "module",
5
5
  "description": "CLI for creating and maintaining Beignet apps.",
6
6
  "main": "./dist/lib.js",
@@ -33,8 +33,8 @@
33
33
  "prepack": "bun run build",
34
34
  "dev": "tsc --watch",
35
35
  "clean": "rm -rf dist coverage .turbo",
36
- "test": "bun test",
37
- "test:coverage": "bun test --coverage",
36
+ "test": "bun test --parallel=2",
37
+ "test:coverage": "bun test --parallel=2 --coverage",
38
38
  "lint": "biome check ."
39
39
  },
40
40
  "keywords": [
@@ -64,18 +64,20 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@modelcontextprotocol/client": "^2.0.0",
67
- "@types/bun": "^1.3.13",
67
+ "@types/bun": "^1.4.0",
68
68
  "@types/node": "^22.0.0",
69
+ "@types/semver": "^7.8.0",
69
70
  "next-themes": "^0.4.6",
70
71
  "tsx": "^4.22.4"
71
72
  },
72
73
  "dependencies": {
73
- "@beignet/core": "^0.0.51",
74
+ "@beignet/core": "^0.0.52",
74
75
  "@clack/prompts": "^1.5.1",
75
76
  "@modelcontextprotocol/server": "^2.0.0",
76
77
  "@stricli/core": "^1.2.7",
77
78
  "diff": "^8.0.4",
78
79
  "jiti": "^2.7.0",
80
+ "semver": "^7.8.5",
79
81
  "typescript": "^5.3.0",
80
82
  "zod": "^4.2.0"
81
83
  }
@@ -8,8 +8,8 @@ description: "Maintain Beignet app structure with @beignet/cli: deterministic ap
8
8
  Use this skill when working with Beignet apps through `@beignet/cli`. Prefer
9
9
  generators and validation commands before hand-editing framework wiring.
10
10
 
11
- Beignet apps require Node.js 22.12 or newer. Bun 1.3.14 or newer is supported
12
- for Beignet commands.
11
+ Beignet apps require Node.js 22.12 or newer. Bun is optional; npm, pnpm, Yarn,
12
+ and Bun can run Beignet commands.
13
13
 
14
14
  ## Starter Sources
15
15
 
@@ -53,6 +53,12 @@ beignet make upload issues.attachment --ui
53
53
  Generators place files under the owning feature, update central registries
54
54
  when possible, and keep `doctor` clean.
55
55
 
56
+ Event schemas must output canonical JSON transport data. Use null, strings,
57
+ finite numbers, booleans, arrays, and plain objects. Keep validation
58
+ deterministic and side-effect-free, keep transforms idempotent, and represent
59
+ timestamps as strings or numbers rather than `Date` objects.
60
+ Beignet rejects payloads that would change when decoded and validated again.
61
+
56
62
  Use `make upload --ui` in full-stack apps when the upload should include a
57
63
  shared client/server constraint manifest, typed React upload client, uploader,
58
64
  and component test. Omit `--ui` for API-only or backend-only workflows.
@@ -174,6 +180,15 @@ Start unfamiliar app work with `beignet map`. Its human output summarizes each
174
180
  feature; `beignet map --json` returns the versioned graph with source evidence,
175
181
  registration status, doctor/lint findings, and unresolved references. Use
176
182
  `--feature <name>` or `--kind route,use-case,event` to bound agent context.
183
+ The graph analyzes TypeScript (`.ts`, `.tsx`, `.mts`, and `.cts`) and
184
+ JavaScript (`.js`, `.jsx`, `.mjs`, and `.cjs`) source. Statically recognizable
185
+ Beignet declarations using ES module exports become normal concept nodes, and
186
+ CommonJS `require()` calls contribute dependency evidence. Test/spec files
187
+ under canonical and configured app test roots become test nodes.
188
+ Feature tests keep feature ownership; adjacent app, infra, server, and
189
+ top-level tests remain app-level nodes and can surface as reverse-import
190
+ consumers in changed mode. Treat those links as impact evidence, not proof of
191
+ behavioral coverage.
177
192
  After editing inside a Git worktree, use `beignet map --changed` to inspect
178
193
  directly changed concepts, reverse imports, one-hop semantic consumers, feature
179
194
  context, and unresolved evidence before running `beignet check`. The report
@@ -184,8 +199,16 @@ and does not prove correctness. Recognized guide files and root
184
199
  documentation-directory content stay non-impacting; other `.mdx` and `.txt`
185
200
  paths remain application changes. Changed files with no mapped concept appear
186
201
  as explicit gaps.
187
- The graph resolves local modules with the full TypeScript `baseUrl` and `paths`
188
- configuration. Treat `local_import_unresolved` and
202
+
203
+ `beignet check` fingerprints Git source before and after the full validation
204
+ loop. Treat `provenance.status: "stale"` as a failed result even when every
205
+ individual step passed, and rerun against the resulting source. Outside Git,
206
+ the same checks run with provenance marked unavailable; report that limitation
207
+ instead of describing the result as source-current.
208
+
209
+ The graph resolves local modules with the full `baseUrl` and `paths`
210
+ configuration from `tsconfig.json`, or `jsconfig.json` when no TypeScript
211
+ config exists. Treat `local_import_unresolved` and
189
212
  `contract_declaration_unresolved` as real blind spots to fix, not absent
190
213
  relationships. This includes direct and contract-group declarations whose
191
214
  method, path, or group prefix is dynamic. Local fluent-builder aliases and
@@ -208,8 +231,8 @@ the declaration without parsing the diagnostic message.
208
231
  and feature-root helpers must not depend back on agent adapters
209
232
  - seeds should compose factories and context ports rather than concrete infra,
210
233
  providers, UI, or runtime composition
211
- - TypeScript imports, re-exports, `require()`, import assignments, and literal
212
- dynamic imports all participate in the same graph
234
+ - JavaScript and TypeScript imports, re-exports, `require()`, import
235
+ assignments, and literal dynamic imports all participate in the same graph
213
236
  - feature-root helpers are classified and followed transitively, so they cannot
214
237
  hide a forbidden dependency; computed module references in constrained layers
215
238
  fail when lint cannot verify their destination
@@ -274,7 +297,9 @@ names, source selectors, and applicable aliases. `check` accepts optional
274
297
  `{ preflight?: boolean, preflightConnect?: boolean, connectTimeoutMs?: number, timeoutMs?: number }`.
275
298
  Connected preflight adds migration status and dependency health checks. Check
276
299
  bounds failure output, cancels the active script with the MCP request, and
277
- returns the same versioned result as `beignet check --json`. It does not apply
300
+ returns the same versioned result as `beignet check --json`, including
301
+ starting and ending source provenance. An ending fingerprint that differs from
302
+ the baseline makes the result stale and unsuccessful. It does not apply
278
303
  Beignet fixes, but app package scripts retain their normal side effects. The
279
304
  target package must declare `@beignet/core`, `@beignet/next`, or `@beignet/web`
280
305
  as a runtime dependency. The root must also contain `app-context.ts` or
@@ -5,6 +5,8 @@ import {
5
5
  normalizePath,
6
6
  type ResolvedBeignetConfig,
7
7
  } from "../config.js";
8
+ import { isAppTestFile } from "../test-discovery.js";
9
+ import { stripSourceFileExtension } from "./source-files.js";
8
10
 
9
11
  export type SourceLayer =
10
12
  | "app"
@@ -190,7 +192,7 @@ export function canonicalFeatureLayerPath(
190
192
 
191
193
  function isTestSourceFile(segment: string, rest: string[]): boolean {
192
194
  const fileName = rest.at(-1) ?? segment;
193
- return /\.(?:test|spec)\.(?:ts|tsx|mts|cts)$/.test(fileName);
195
+ return isAppTestFile(fileName);
194
196
  }
195
197
 
196
198
  function featureDirectoryConvention(
@@ -233,7 +235,7 @@ function normalizeLayerSegment(segment: string): string {
233
235
  }
234
236
 
235
237
  function stripKnownExtension(filePath: string): string {
236
- return filePath.replace(/\.(c|m)?tsx?$/, "");
238
+ return stripSourceFileExtension(filePath);
237
239
  }
238
240
 
239
241
  function isTestPath(filePath: string): boolean {
@@ -2,6 +2,7 @@ import { readFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import ts from "typescript";
4
4
  import type { ResolvedBeignetConfig } from "../config.js";
5
+ import { sourceFileScriptKind } from "./source-files.js";
5
6
  import type { AnalysisWorkspace } from "./workspace.js";
6
7
 
7
8
  type PortAnalysisWorkspace = Pick<
@@ -241,7 +242,7 @@ export async function analyzePortWiringFiles(options: {
241
242
  await readFile(path.join(options.targetDir, file), "utf8"),
242
243
  ts.ScriptTarget.Latest,
243
244
  true,
244
- file.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS,
245
+ sourceFileScriptKind(file),
245
246
  );
246
247
  sourceFiles.set(file, sourceFile);
247
248
  return sourceFile;