create-m5kdev 0.36.0 → 0.37.4

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 (23) hide show
  1. package/package.json +3 -3
  2. package/templates/minimal-app/.dockerignore.tpl +6 -0
  3. package/templates/minimal-app/apps/e2e/playwright.config.ts.tpl +3 -0
  4. package/templates/minimal-app/apps/e2e/servers.ts.tpl +1 -0
  5. package/templates/minimal-app/apps/e2e/tests/mcp-helpers.ts.tpl +406 -0
  6. package/templates/minimal-app/apps/e2e/tests/mcp.spec.ts.tpl +108 -0
  7. package/templates/minimal-app/apps/server/AGENTS.md.tpl +10 -0
  8. package/templates/minimal-app/apps/server/db.e2e.ts.tpl +1 -0
  9. package/templates/minimal-app/apps/server/db.ts.tpl +1 -0
  10. package/templates/minimal-app/apps/server/drizzle/0006_lazy_blue_marvel.sql +159 -0
  11. package/templates/minimal-app/apps/server/drizzle/0007_abnormal_ultimo.sql +2 -0
  12. package/templates/minimal-app/apps/server/drizzle/0008_steady_nekra.sql +87 -0
  13. package/templates/minimal-app/apps/server/drizzle/meta/0006_snapshot.json.tpl +3603 -0
  14. package/templates/minimal-app/apps/server/drizzle/meta/0007_snapshot.json.tpl +3620 -0
  15. package/templates/minimal-app/apps/server/drizzle/meta/0008_snapshot.json.tpl +3620 -0
  16. package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +21 -0
  17. package/templates/minimal-app/apps/server/src/app.ts.tpl +8 -1
  18. package/templates/minimal-app/apps/server/src/modules/posts/posts.mcp.ts.tpl +17 -0
  19. package/templates/minimal-app/apps/server/src/modules/posts/posts.module.ts.tpl +11 -0
  20. package/templates/minimal-app/apps/server/src/modules/posts/posts.service.ts.tpl +13 -4
  21. package/templates/minimal-app/apps/server/src/schema.ts.tpl +13 -0
  22. package/templates/minimal-app/pnpm-workspace.yaml.tpl +14 -14
  23. package/templates/minimal-app/template.manifest.json +9 -0
@@ -0,0 +1,159 @@
1
+ CREATE TABLE `jwks` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `public_key` text NOT NULL,
4
+ `private_key` text NOT NULL,
5
+ `created_at` integer NOT NULL,
6
+ `expires_at` integer,
7
+ `alg` text,
8
+ `crv` text
9
+ );
10
+ --> statement-breakpoint
11
+ CREATE TABLE `mcp_allowlist_entries` (
12
+ `id` text PRIMARY KEY NOT NULL,
13
+ `oauth_client_id` text NOT NULL,
14
+ `user_id` text NOT NULL,
15
+ `organization_id` text NOT NULL,
16
+ `created_at` integer NOT NULL,
17
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
18
+ FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE cascade
19
+ );
20
+ --> statement-breakpoint
21
+ CREATE UNIQUE INDEX `mcp_allowlist_client_user_org_unique` ON `mcp_allowlist_entries` (`oauth_client_id`,`user_id`,`organization_id`);--> statement-breakpoint
22
+ CREATE TABLE `oauth_access_tokens` (
23
+ `id` text PRIMARY KEY NOT NULL,
24
+ `token` text,
25
+ `client_id` text NOT NULL,
26
+ `session_id` text,
27
+ `user_id` text,
28
+ `reference_id` text,
29
+ `authorization_code_id` text,
30
+ `resources` text,
31
+ `requested_user_info_claims` text,
32
+ `refresh_id` text,
33
+ `expires_at` integer NOT NULL,
34
+ `created_at` integer NOT NULL,
35
+ `revoked` integer,
36
+ `confirmation` text,
37
+ `scopes` text NOT NULL,
38
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`id`) ON UPDATE no action ON DELETE no action,
39
+ FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE set null,
40
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action,
41
+ FOREIGN KEY (`refresh_id`) REFERENCES `oauth_refresh_tokens`(`id`) ON UPDATE no action ON DELETE no action
42
+ );
43
+ --> statement-breakpoint
44
+ CREATE UNIQUE INDEX `oauth_access_tokens_token_unique` ON `oauth_access_tokens` (`token`);--> statement-breakpoint
45
+ CREATE TABLE `oauth_client_assertions` (
46
+ `id` text PRIMARY KEY NOT NULL,
47
+ `expires_at` integer NOT NULL
48
+ );
49
+ --> statement-breakpoint
50
+ CREATE TABLE `oauth_client_resources` (
51
+ `id` text PRIMARY KEY NOT NULL,
52
+ `client_id` text NOT NULL,
53
+ `resource_id` text NOT NULL,
54
+ `metadata` text,
55
+ `created_at` integer,
56
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`id`) ON UPDATE no action ON DELETE cascade,
57
+ FOREIGN KEY (`resource_id`) REFERENCES `oauth_resources`(`id`) ON UPDATE no action ON DELETE cascade
58
+ );
59
+ --> statement-breakpoint
60
+ CREATE UNIQUE INDEX `oauth_client_resources_client_resource_unique` ON `oauth_client_resources` (`client_id`,`resource_id`);--> statement-breakpoint
61
+ CREATE TABLE `oauth_clients` (
62
+ `id` text PRIMARY KEY NOT NULL,
63
+ `client_id` text NOT NULL,
64
+ `client_secret` text,
65
+ `client_discovery_id` text,
66
+ `disabled` integer DEFAULT false,
67
+ `skip_consent` integer,
68
+ `enable_end_session` integer,
69
+ `subject_type` text,
70
+ `scopes` text,
71
+ `client_credentials_scopes` text DEFAULT '[]',
72
+ `user_id` text,
73
+ `created_at` integer,
74
+ `updated_at` integer,
75
+ `name` text,
76
+ `uri` text,
77
+ `icon` text,
78
+ `contacts` text,
79
+ `tos` text,
80
+ `policy` text,
81
+ `software_id` text,
82
+ `software_version` text,
83
+ `software_statement` text,
84
+ `redirect_uris` text NOT NULL,
85
+ `post_logout_redirect_uris` text,
86
+ `backchannel_logout_uri` text,
87
+ `backchannel_logout_session_required` integer,
88
+ `token_endpoint_auth_method` text,
89
+ `application_type` text,
90
+ `jwks` text,
91
+ `jwks_uri` text,
92
+ `grant_types` text,
93
+ `response_types` text,
94
+ `require_pkce` integer,
95
+ `dpop_bound_access_tokens` integer DEFAULT false,
96
+ `reference_id` text,
97
+ `metadata` text,
98
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
99
+ );
100
+ --> statement-breakpoint
101
+ CREATE UNIQUE INDEX `oauth_clients_client_id_unique` ON `oauth_clients` (`client_id`);--> statement-breakpoint
102
+ CREATE TABLE `oauth_consents` (
103
+ `id` text PRIMARY KEY NOT NULL,
104
+ `client_id` text NOT NULL,
105
+ `user_id` text,
106
+ `reference_id` text,
107
+ `resources` text,
108
+ `requested_user_info_claims` text,
109
+ `scopes` text NOT NULL,
110
+ `created_at` integer NOT NULL,
111
+ `updated_at` integer NOT NULL,
112
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`id`) ON UPDATE no action ON DELETE no action,
113
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
114
+ );
115
+ --> statement-breakpoint
116
+ CREATE TABLE `oauth_refresh_tokens` (
117
+ `id` text PRIMARY KEY NOT NULL,
118
+ `token` text NOT NULL,
119
+ `client_id` text NOT NULL,
120
+ `session_id` text,
121
+ `user_id` text NOT NULL,
122
+ `reference_id` text,
123
+ `authorization_code_id` text,
124
+ `resources` text,
125
+ `requested_user_info_claims` text,
126
+ `expires_at` integer NOT NULL,
127
+ `created_at` integer NOT NULL,
128
+ `revoked` integer,
129
+ `rotated_at` integer,
130
+ `rotation_replay_response` text,
131
+ `rotation_replay_expires_at` integer,
132
+ `auth_time` integer,
133
+ `confirmation` text,
134
+ `scopes` text NOT NULL,
135
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`id`) ON UPDATE no action ON DELETE no action,
136
+ FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE set null,
137
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
138
+ );
139
+ --> statement-breakpoint
140
+ CREATE UNIQUE INDEX `oauth_refresh_tokens_token_unique` ON `oauth_refresh_tokens` (`token`);--> statement-breakpoint
141
+ CREATE TABLE `oauth_resources` (
142
+ `id` text PRIMARY KEY NOT NULL,
143
+ `identifier` text NOT NULL,
144
+ `name` text NOT NULL,
145
+ `access_token_ttl` integer,
146
+ `refresh_token_ttl` integer,
147
+ `signing_algorithm` text,
148
+ `signing_key_id` text,
149
+ `allowed_scopes` text,
150
+ `custom_claims` text,
151
+ `dpop_bound_access_tokens_required` integer DEFAULT false,
152
+ `disabled` integer DEFAULT false,
153
+ `created_at` integer,
154
+ `updated_at` integer,
155
+ `policy_version` integer DEFAULT 1,
156
+ `metadata` text
157
+ );
158
+ --> statement-breakpoint
159
+ CREATE UNIQUE INDEX `oauth_resources_identifier_unique` ON `oauth_resources` (`identifier`);
@@ -0,0 +1,2 @@
1
+ ALTER TABLE `accounts` ADD `issuer` text DEFAULT 'local:credential' NOT NULL;--> statement-breakpoint
2
+ CREATE UNIQUE INDEX `accounts_issuer_account_id_unique` ON `accounts` (`issuer`,`account_id`);
@@ -0,0 +1,87 @@
1
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
+ CREATE TABLE `__new_oauth_access_tokens` (
3
+ `id` text PRIMARY KEY NOT NULL,
4
+ `token` text,
5
+ `client_id` text NOT NULL,
6
+ `session_id` text,
7
+ `user_id` text,
8
+ `reference_id` text,
9
+ `authorization_code_id` text,
10
+ `resources` text,
11
+ `requested_user_info_claims` text,
12
+ `refresh_id` text,
13
+ `expires_at` integer NOT NULL,
14
+ `created_at` integer NOT NULL,
15
+ `revoked` integer,
16
+ `confirmation` text,
17
+ `scopes` text NOT NULL,
18
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`client_id`) ON UPDATE no action ON DELETE no action,
19
+ FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE set null,
20
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action,
21
+ FOREIGN KEY (`refresh_id`) REFERENCES `oauth_refresh_tokens`(`id`) ON UPDATE no action ON DELETE no action
22
+ );
23
+ --> statement-breakpoint
24
+ INSERT INTO `__new_oauth_access_tokens`("id", "token", "client_id", "session_id", "user_id", "reference_id", "authorization_code_id", "resources", "requested_user_info_claims", "refresh_id", "expires_at", "created_at", "revoked", "confirmation", "scopes") SELECT "id", "token", "client_id", "session_id", "user_id", "reference_id", "authorization_code_id", "resources", "requested_user_info_claims", "refresh_id", "expires_at", "created_at", "revoked", "confirmation", "scopes" FROM `oauth_access_tokens`;--> statement-breakpoint
25
+ DROP TABLE `oauth_access_tokens`;--> statement-breakpoint
26
+ ALTER TABLE `__new_oauth_access_tokens` RENAME TO `oauth_access_tokens`;--> statement-breakpoint
27
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
28
+ CREATE UNIQUE INDEX `oauth_access_tokens_token_unique` ON `oauth_access_tokens` (`token`);--> statement-breakpoint
29
+ CREATE TABLE `__new_oauth_client_resources` (
30
+ `id` text PRIMARY KEY NOT NULL,
31
+ `client_id` text NOT NULL,
32
+ `resource_id` text NOT NULL,
33
+ `metadata` text,
34
+ `created_at` integer,
35
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`client_id`) ON UPDATE no action ON DELETE cascade,
36
+ FOREIGN KEY (`resource_id`) REFERENCES `oauth_resources`(`identifier`) ON UPDATE no action ON DELETE cascade
37
+ );
38
+ --> statement-breakpoint
39
+ INSERT INTO `__new_oauth_client_resources`("id", "client_id", "resource_id", "metadata", "created_at") SELECT "id", "client_id", "resource_id", "metadata", "created_at" FROM `oauth_client_resources`;--> statement-breakpoint
40
+ DROP TABLE `oauth_client_resources`;--> statement-breakpoint
41
+ ALTER TABLE `__new_oauth_client_resources` RENAME TO `oauth_client_resources`;--> statement-breakpoint
42
+ CREATE UNIQUE INDEX `oauth_client_resources_client_resource_unique` ON `oauth_client_resources` (`client_id`,`resource_id`);--> statement-breakpoint
43
+ CREATE TABLE `__new_oauth_consents` (
44
+ `id` text PRIMARY KEY NOT NULL,
45
+ `client_id` text NOT NULL,
46
+ `user_id` text,
47
+ `reference_id` text,
48
+ `resources` text,
49
+ `requested_user_info_claims` text,
50
+ `scopes` text NOT NULL,
51
+ `created_at` integer NOT NULL,
52
+ `updated_at` integer NOT NULL,
53
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`client_id`) ON UPDATE no action ON DELETE no action,
54
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
55
+ );
56
+ --> statement-breakpoint
57
+ INSERT INTO `__new_oauth_consents`("id", "client_id", "user_id", "reference_id", "resources", "requested_user_info_claims", "scopes", "created_at", "updated_at") SELECT "id", "client_id", "user_id", "reference_id", "resources", "requested_user_info_claims", "scopes", "created_at", "updated_at" FROM `oauth_consents`;--> statement-breakpoint
58
+ DROP TABLE `oauth_consents`;--> statement-breakpoint
59
+ ALTER TABLE `__new_oauth_consents` RENAME TO `oauth_consents`;--> statement-breakpoint
60
+ CREATE TABLE `__new_oauth_refresh_tokens` (
61
+ `id` text PRIMARY KEY NOT NULL,
62
+ `token` text NOT NULL,
63
+ `client_id` text NOT NULL,
64
+ `session_id` text,
65
+ `user_id` text NOT NULL,
66
+ `reference_id` text,
67
+ `authorization_code_id` text,
68
+ `resources` text,
69
+ `requested_user_info_claims` text,
70
+ `expires_at` integer NOT NULL,
71
+ `created_at` integer NOT NULL,
72
+ `revoked` integer,
73
+ `rotated_at` integer,
74
+ `rotation_replay_response` text,
75
+ `rotation_replay_expires_at` integer,
76
+ `auth_time` integer,
77
+ `confirmation` text,
78
+ `scopes` text NOT NULL,
79
+ FOREIGN KEY (`client_id`) REFERENCES `oauth_clients`(`client_id`) ON UPDATE no action ON DELETE no action,
80
+ FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE set null,
81
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
82
+ );
83
+ --> statement-breakpoint
84
+ INSERT INTO `__new_oauth_refresh_tokens`("id", "token", "client_id", "session_id", "user_id", "reference_id", "authorization_code_id", "resources", "requested_user_info_claims", "expires_at", "created_at", "revoked", "rotated_at", "rotation_replay_response", "rotation_replay_expires_at", "auth_time", "confirmation", "scopes") SELECT "id", "token", "client_id", "session_id", "user_id", "reference_id", "authorization_code_id", "resources", "requested_user_info_claims", "expires_at", "created_at", "revoked", "rotated_at", "rotation_replay_response", "rotation_replay_expires_at", "auth_time", "confirmation", "scopes" FROM `oauth_refresh_tokens`;--> statement-breakpoint
85
+ DROP TABLE `oauth_refresh_tokens`;--> statement-breakpoint
86
+ ALTER TABLE `__new_oauth_refresh_tokens` RENAME TO `oauth_refresh_tokens`;--> statement-breakpoint
87
+ CREATE UNIQUE INDEX `oauth_refresh_tokens_token_unique` ON `oauth_refresh_tokens` (`token`);