hkcc 0.1.0
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/README.md +768 -0
- package/bunfig.toml +2 -0
- package/dist/hkcc.js +860 -0
- package/dist/index.js +855 -0
- package/dist/public/index.css +1 -0
- package/dist/public/index.html +13 -0
- package/dist/public/index.js +256 -0
- package/migrations/0000_damp_the_hood.sql +31 -0
- package/migrations/0001_high_ulik.sql +12 -0
- package/migrations/meta/0000_snapshot.json +207 -0
- package/migrations/meta/0001_snapshot.json +283 -0
- package/migrations/meta/_journal.json +20 -0
- package/package.json +100 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
CREATE TABLE `oauth_credentials` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`user_id` integer NOT NULL,
|
|
4
|
+
`provider` text NOT NULL,
|
|
5
|
+
`access_token` text NOT NULL,
|
|
6
|
+
`refresh_token` text NOT NULL,
|
|
7
|
+
`expires_at` integer NOT NULL,
|
|
8
|
+
`metadata` text,
|
|
9
|
+
`updated_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
10
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
|
11
|
+
);
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
CREATE UNIQUE INDEX `oauth_credentials_user_id_provider_unique` ON `oauth_credentials` (`user_id`,`provider`);--> statement-breakpoint
|
|
14
|
+
CREATE TABLE `sessions` (
|
|
15
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
16
|
+
`user_id` integer NOT NULL,
|
|
17
|
+
`expires_at` integer NOT NULL,
|
|
18
|
+
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
19
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
|
20
|
+
);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
CREATE TABLE `users` (
|
|
23
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
24
|
+
`email` text NOT NULL,
|
|
25
|
+
`username` text,
|
|
26
|
+
`password_hash` text NOT NULL,
|
|
27
|
+
`created_at` integer DEFAULT (unixepoch()) NOT NULL
|
|
28
|
+
);
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint
|
|
31
|
+
CREATE UNIQUE INDEX `users_username_unique` ON `users` (`username`);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CREATE TABLE `api_keys` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`user_id` integer NOT NULL,
|
|
4
|
+
`key_hash` text NOT NULL,
|
|
5
|
+
`key_prefix` text NOT NULL,
|
|
6
|
+
`name` text,
|
|
7
|
+
`last_used_at` integer,
|
|
8
|
+
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
9
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE UNIQUE INDEX `api_keys_key_hash_unique` ON `api_keys` (`key_hash`);
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "c1ef93bf-0a43-4b4f-99a3-cc90d8162d0c",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"oauth_credentials": {
|
|
8
|
+
"name": "oauth_credentials",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": true
|
|
16
|
+
},
|
|
17
|
+
"user_id": {
|
|
18
|
+
"name": "user_id",
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"provider": {
|
|
25
|
+
"name": "provider",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"access_token": {
|
|
32
|
+
"name": "access_token",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"refresh_token": {
|
|
39
|
+
"name": "refresh_token",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": true,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"expires_at": {
|
|
46
|
+
"name": "expires_at",
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"metadata": {
|
|
53
|
+
"name": "metadata",
|
|
54
|
+
"type": "text",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": false,
|
|
57
|
+
"autoincrement": false
|
|
58
|
+
},
|
|
59
|
+
"updated_at": {
|
|
60
|
+
"name": "updated_at",
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"primaryKey": false,
|
|
63
|
+
"notNull": true,
|
|
64
|
+
"autoincrement": false,
|
|
65
|
+
"default": "(unixepoch())"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"indexes": {
|
|
69
|
+
"oauth_credentials_user_id_provider_unique": {
|
|
70
|
+
"name": "oauth_credentials_user_id_provider_unique",
|
|
71
|
+
"columns": ["user_id", "provider"],
|
|
72
|
+
"isUnique": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"foreignKeys": {
|
|
76
|
+
"oauth_credentials_user_id_users_id_fk": {
|
|
77
|
+
"name": "oauth_credentials_user_id_users_id_fk",
|
|
78
|
+
"tableFrom": "oauth_credentials",
|
|
79
|
+
"tableTo": "users",
|
|
80
|
+
"columnsFrom": ["user_id"],
|
|
81
|
+
"columnsTo": ["id"],
|
|
82
|
+
"onDelete": "cascade",
|
|
83
|
+
"onUpdate": "no action"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"compositePrimaryKeys": {},
|
|
87
|
+
"uniqueConstraints": {},
|
|
88
|
+
"checkConstraints": {}
|
|
89
|
+
},
|
|
90
|
+
"sessions": {
|
|
91
|
+
"name": "sessions",
|
|
92
|
+
"columns": {
|
|
93
|
+
"id": {
|
|
94
|
+
"name": "id",
|
|
95
|
+
"type": "text",
|
|
96
|
+
"primaryKey": true,
|
|
97
|
+
"notNull": true,
|
|
98
|
+
"autoincrement": false
|
|
99
|
+
},
|
|
100
|
+
"user_id": {
|
|
101
|
+
"name": "user_id",
|
|
102
|
+
"type": "integer",
|
|
103
|
+
"primaryKey": false,
|
|
104
|
+
"notNull": true,
|
|
105
|
+
"autoincrement": false
|
|
106
|
+
},
|
|
107
|
+
"expires_at": {
|
|
108
|
+
"name": "expires_at",
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"primaryKey": false,
|
|
111
|
+
"notNull": true,
|
|
112
|
+
"autoincrement": false
|
|
113
|
+
},
|
|
114
|
+
"created_at": {
|
|
115
|
+
"name": "created_at",
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"primaryKey": false,
|
|
118
|
+
"notNull": true,
|
|
119
|
+
"autoincrement": false,
|
|
120
|
+
"default": "(unixepoch())"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"indexes": {},
|
|
124
|
+
"foreignKeys": {
|
|
125
|
+
"sessions_user_id_users_id_fk": {
|
|
126
|
+
"name": "sessions_user_id_users_id_fk",
|
|
127
|
+
"tableFrom": "sessions",
|
|
128
|
+
"tableTo": "users",
|
|
129
|
+
"columnsFrom": ["user_id"],
|
|
130
|
+
"columnsTo": ["id"],
|
|
131
|
+
"onDelete": "cascade",
|
|
132
|
+
"onUpdate": "no action"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"compositePrimaryKeys": {},
|
|
136
|
+
"uniqueConstraints": {},
|
|
137
|
+
"checkConstraints": {}
|
|
138
|
+
},
|
|
139
|
+
"users": {
|
|
140
|
+
"name": "users",
|
|
141
|
+
"columns": {
|
|
142
|
+
"id": {
|
|
143
|
+
"name": "id",
|
|
144
|
+
"type": "integer",
|
|
145
|
+
"primaryKey": true,
|
|
146
|
+
"notNull": true,
|
|
147
|
+
"autoincrement": true
|
|
148
|
+
},
|
|
149
|
+
"email": {
|
|
150
|
+
"name": "email",
|
|
151
|
+
"type": "text",
|
|
152
|
+
"primaryKey": false,
|
|
153
|
+
"notNull": true,
|
|
154
|
+
"autoincrement": false
|
|
155
|
+
},
|
|
156
|
+
"username": {
|
|
157
|
+
"name": "username",
|
|
158
|
+
"type": "text",
|
|
159
|
+
"primaryKey": false,
|
|
160
|
+
"notNull": false,
|
|
161
|
+
"autoincrement": false
|
|
162
|
+
},
|
|
163
|
+
"password_hash": {
|
|
164
|
+
"name": "password_hash",
|
|
165
|
+
"type": "text",
|
|
166
|
+
"primaryKey": false,
|
|
167
|
+
"notNull": true,
|
|
168
|
+
"autoincrement": false
|
|
169
|
+
},
|
|
170
|
+
"created_at": {
|
|
171
|
+
"name": "created_at",
|
|
172
|
+
"type": "integer",
|
|
173
|
+
"primaryKey": false,
|
|
174
|
+
"notNull": true,
|
|
175
|
+
"autoincrement": false,
|
|
176
|
+
"default": "(unixepoch())"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"indexes": {
|
|
180
|
+
"users_email_unique": {
|
|
181
|
+
"name": "users_email_unique",
|
|
182
|
+
"columns": ["email"],
|
|
183
|
+
"isUnique": true
|
|
184
|
+
},
|
|
185
|
+
"users_username_unique": {
|
|
186
|
+
"name": "users_username_unique",
|
|
187
|
+
"columns": ["username"],
|
|
188
|
+
"isUnique": true
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"foreignKeys": {},
|
|
192
|
+
"compositePrimaryKeys": {},
|
|
193
|
+
"uniqueConstraints": {},
|
|
194
|
+
"checkConstraints": {}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"views": {},
|
|
198
|
+
"enums": {},
|
|
199
|
+
"_meta": {
|
|
200
|
+
"schemas": {},
|
|
201
|
+
"tables": {},
|
|
202
|
+
"columns": {}
|
|
203
|
+
},
|
|
204
|
+
"internal": {
|
|
205
|
+
"indexes": {}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "fa26db9e-48b3-4037-b40b-f9261e1be0b3",
|
|
5
|
+
"prevId": "c1ef93bf-0a43-4b4f-99a3-cc90d8162d0c",
|
|
6
|
+
"tables": {
|
|
7
|
+
"api_keys": {
|
|
8
|
+
"name": "api_keys",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": true
|
|
16
|
+
},
|
|
17
|
+
"user_id": {
|
|
18
|
+
"name": "user_id",
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"key_hash": {
|
|
25
|
+
"name": "key_hash",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"key_prefix": {
|
|
32
|
+
"name": "key_prefix",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"name": {
|
|
39
|
+
"name": "name",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": false,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"last_used_at": {
|
|
46
|
+
"name": "last_used_at",
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": false,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"created_at": {
|
|
53
|
+
"name": "created_at",
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": true,
|
|
57
|
+
"autoincrement": false,
|
|
58
|
+
"default": "(unixepoch())"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"indexes": {
|
|
62
|
+
"api_keys_key_hash_unique": {
|
|
63
|
+
"name": "api_keys_key_hash_unique",
|
|
64
|
+
"columns": ["key_hash"],
|
|
65
|
+
"isUnique": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"foreignKeys": {
|
|
69
|
+
"api_keys_user_id_users_id_fk": {
|
|
70
|
+
"name": "api_keys_user_id_users_id_fk",
|
|
71
|
+
"tableFrom": "api_keys",
|
|
72
|
+
"tableTo": "users",
|
|
73
|
+
"columnsFrom": ["user_id"],
|
|
74
|
+
"columnsTo": ["id"],
|
|
75
|
+
"onDelete": "cascade",
|
|
76
|
+
"onUpdate": "no action"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"compositePrimaryKeys": {},
|
|
80
|
+
"uniqueConstraints": {},
|
|
81
|
+
"checkConstraints": {}
|
|
82
|
+
},
|
|
83
|
+
"oauth_credentials": {
|
|
84
|
+
"name": "oauth_credentials",
|
|
85
|
+
"columns": {
|
|
86
|
+
"id": {
|
|
87
|
+
"name": "id",
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"primaryKey": true,
|
|
90
|
+
"notNull": true,
|
|
91
|
+
"autoincrement": true
|
|
92
|
+
},
|
|
93
|
+
"user_id": {
|
|
94
|
+
"name": "user_id",
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"primaryKey": false,
|
|
97
|
+
"notNull": true,
|
|
98
|
+
"autoincrement": false
|
|
99
|
+
},
|
|
100
|
+
"provider": {
|
|
101
|
+
"name": "provider",
|
|
102
|
+
"type": "text",
|
|
103
|
+
"primaryKey": false,
|
|
104
|
+
"notNull": true,
|
|
105
|
+
"autoincrement": false
|
|
106
|
+
},
|
|
107
|
+
"access_token": {
|
|
108
|
+
"name": "access_token",
|
|
109
|
+
"type": "text",
|
|
110
|
+
"primaryKey": false,
|
|
111
|
+
"notNull": true,
|
|
112
|
+
"autoincrement": false
|
|
113
|
+
},
|
|
114
|
+
"refresh_token": {
|
|
115
|
+
"name": "refresh_token",
|
|
116
|
+
"type": "text",
|
|
117
|
+
"primaryKey": false,
|
|
118
|
+
"notNull": true,
|
|
119
|
+
"autoincrement": false
|
|
120
|
+
},
|
|
121
|
+
"expires_at": {
|
|
122
|
+
"name": "expires_at",
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"primaryKey": false,
|
|
125
|
+
"notNull": true,
|
|
126
|
+
"autoincrement": false
|
|
127
|
+
},
|
|
128
|
+
"metadata": {
|
|
129
|
+
"name": "metadata",
|
|
130
|
+
"type": "text",
|
|
131
|
+
"primaryKey": false,
|
|
132
|
+
"notNull": false,
|
|
133
|
+
"autoincrement": false
|
|
134
|
+
},
|
|
135
|
+
"updated_at": {
|
|
136
|
+
"name": "updated_at",
|
|
137
|
+
"type": "integer",
|
|
138
|
+
"primaryKey": false,
|
|
139
|
+
"notNull": true,
|
|
140
|
+
"autoincrement": false,
|
|
141
|
+
"default": "(unixepoch())"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"indexes": {
|
|
145
|
+
"oauth_credentials_user_id_provider_unique": {
|
|
146
|
+
"name": "oauth_credentials_user_id_provider_unique",
|
|
147
|
+
"columns": ["user_id", "provider"],
|
|
148
|
+
"isUnique": true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"foreignKeys": {
|
|
152
|
+
"oauth_credentials_user_id_users_id_fk": {
|
|
153
|
+
"name": "oauth_credentials_user_id_users_id_fk",
|
|
154
|
+
"tableFrom": "oauth_credentials",
|
|
155
|
+
"tableTo": "users",
|
|
156
|
+
"columnsFrom": ["user_id"],
|
|
157
|
+
"columnsTo": ["id"],
|
|
158
|
+
"onDelete": "cascade",
|
|
159
|
+
"onUpdate": "no action"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"compositePrimaryKeys": {},
|
|
163
|
+
"uniqueConstraints": {},
|
|
164
|
+
"checkConstraints": {}
|
|
165
|
+
},
|
|
166
|
+
"sessions": {
|
|
167
|
+
"name": "sessions",
|
|
168
|
+
"columns": {
|
|
169
|
+
"id": {
|
|
170
|
+
"name": "id",
|
|
171
|
+
"type": "text",
|
|
172
|
+
"primaryKey": true,
|
|
173
|
+
"notNull": true,
|
|
174
|
+
"autoincrement": false
|
|
175
|
+
},
|
|
176
|
+
"user_id": {
|
|
177
|
+
"name": "user_id",
|
|
178
|
+
"type": "integer",
|
|
179
|
+
"primaryKey": false,
|
|
180
|
+
"notNull": true,
|
|
181
|
+
"autoincrement": false
|
|
182
|
+
},
|
|
183
|
+
"expires_at": {
|
|
184
|
+
"name": "expires_at",
|
|
185
|
+
"type": "integer",
|
|
186
|
+
"primaryKey": false,
|
|
187
|
+
"notNull": true,
|
|
188
|
+
"autoincrement": false
|
|
189
|
+
},
|
|
190
|
+
"created_at": {
|
|
191
|
+
"name": "created_at",
|
|
192
|
+
"type": "integer",
|
|
193
|
+
"primaryKey": false,
|
|
194
|
+
"notNull": true,
|
|
195
|
+
"autoincrement": false,
|
|
196
|
+
"default": "(unixepoch())"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"indexes": {},
|
|
200
|
+
"foreignKeys": {
|
|
201
|
+
"sessions_user_id_users_id_fk": {
|
|
202
|
+
"name": "sessions_user_id_users_id_fk",
|
|
203
|
+
"tableFrom": "sessions",
|
|
204
|
+
"tableTo": "users",
|
|
205
|
+
"columnsFrom": ["user_id"],
|
|
206
|
+
"columnsTo": ["id"],
|
|
207
|
+
"onDelete": "cascade",
|
|
208
|
+
"onUpdate": "no action"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"compositePrimaryKeys": {},
|
|
212
|
+
"uniqueConstraints": {},
|
|
213
|
+
"checkConstraints": {}
|
|
214
|
+
},
|
|
215
|
+
"users": {
|
|
216
|
+
"name": "users",
|
|
217
|
+
"columns": {
|
|
218
|
+
"id": {
|
|
219
|
+
"name": "id",
|
|
220
|
+
"type": "integer",
|
|
221
|
+
"primaryKey": true,
|
|
222
|
+
"notNull": true,
|
|
223
|
+
"autoincrement": true
|
|
224
|
+
},
|
|
225
|
+
"email": {
|
|
226
|
+
"name": "email",
|
|
227
|
+
"type": "text",
|
|
228
|
+
"primaryKey": false,
|
|
229
|
+
"notNull": true,
|
|
230
|
+
"autoincrement": false
|
|
231
|
+
},
|
|
232
|
+
"username": {
|
|
233
|
+
"name": "username",
|
|
234
|
+
"type": "text",
|
|
235
|
+
"primaryKey": false,
|
|
236
|
+
"notNull": false,
|
|
237
|
+
"autoincrement": false
|
|
238
|
+
},
|
|
239
|
+
"password_hash": {
|
|
240
|
+
"name": "password_hash",
|
|
241
|
+
"type": "text",
|
|
242
|
+
"primaryKey": false,
|
|
243
|
+
"notNull": true,
|
|
244
|
+
"autoincrement": false
|
|
245
|
+
},
|
|
246
|
+
"created_at": {
|
|
247
|
+
"name": "created_at",
|
|
248
|
+
"type": "integer",
|
|
249
|
+
"primaryKey": false,
|
|
250
|
+
"notNull": true,
|
|
251
|
+
"autoincrement": false,
|
|
252
|
+
"default": "(unixepoch())"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"indexes": {
|
|
256
|
+
"users_email_unique": {
|
|
257
|
+
"name": "users_email_unique",
|
|
258
|
+
"columns": ["email"],
|
|
259
|
+
"isUnique": true
|
|
260
|
+
},
|
|
261
|
+
"users_username_unique": {
|
|
262
|
+
"name": "users_username_unique",
|
|
263
|
+
"columns": ["username"],
|
|
264
|
+
"isUnique": true
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"foreignKeys": {},
|
|
268
|
+
"compositePrimaryKeys": {},
|
|
269
|
+
"uniqueConstraints": {},
|
|
270
|
+
"checkConstraints": {}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"views": {},
|
|
274
|
+
"enums": {},
|
|
275
|
+
"_meta": {
|
|
276
|
+
"schemas": {},
|
|
277
|
+
"tables": {},
|
|
278
|
+
"columns": {}
|
|
279
|
+
},
|
|
280
|
+
"internal": {
|
|
281
|
+
"indexes": {}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1769642428089,
|
|
9
|
+
"tag": "0000_damp_the_hood",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1769644282344,
|
|
16
|
+
"tag": "0001_high_ulik",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hkcc",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Claude proxy server with Agent SDK and OAuth modes",
|
|
5
|
+
"author": "hk",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/HuakunShen/hkcc"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"claude",
|
|
13
|
+
"anthropic",
|
|
14
|
+
"proxy",
|
|
15
|
+
"openai",
|
|
16
|
+
"agent-sdk",
|
|
17
|
+
"mcp",
|
|
18
|
+
"cli"
|
|
19
|
+
],
|
|
20
|
+
"module": "src/index.ts",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"bin": {
|
|
23
|
+
"hkcc": "./dist/hkcc.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"migrations",
|
|
28
|
+
"bunfig.toml"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"bun": ">=1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "bun run --hot src/index.ts",
|
|
35
|
+
"test": "bun test src/__tests__",
|
|
36
|
+
"start": "bun run bin/hkcc.ts",
|
|
37
|
+
"build": "bun run build.ts",
|
|
38
|
+
"prepublishOnly": "bun run build",
|
|
39
|
+
"format": "prettier -w .",
|
|
40
|
+
"check-types": "tsc --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/bun": "latest",
|
|
44
|
+
"@types/react": "^19.2.5",
|
|
45
|
+
"@types/react-dom": "^19.2.3",
|
|
46
|
+
"drizzle-kit": "^0.31.8"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"typescript": "^5"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@ai-sdk/anthropic": "^3.0.23",
|
|
53
|
+
"@ai-sdk/openai": "^3.0.18",
|
|
54
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.19",
|
|
55
|
+
"@anthropic-ai/sdk": "^0.71.2",
|
|
56
|
+
"@elysiajs/cron": "^1.4.1",
|
|
57
|
+
"@elysiajs/eden": "^1.4.6",
|
|
58
|
+
"@elysiajs/openapi": "^1.4.14",
|
|
59
|
+
"@elysiajs/opentelemetry": "^1.4.10",
|
|
60
|
+
"@elysiajs/static": "^1.4.7",
|
|
61
|
+
"@libsql/client": "^0.17.0",
|
|
62
|
+
"@openauthjs/openauth": "^0.4.3",
|
|
63
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
64
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
65
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
66
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
67
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
68
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
69
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
70
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
71
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
72
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
73
|
+
"@tanstack/react-query": "^5.90.20",
|
|
74
|
+
"@tanstack/react-router": "^1.157.9",
|
|
75
|
+
"@tanstack/react-router-devtools": "^1.141.2",
|
|
76
|
+
"@tanstack/router-plugin": "^1.141.2",
|
|
77
|
+
"ai": "^6.0.49",
|
|
78
|
+
"bun-plugin-tailwind": "^0.1.2",
|
|
79
|
+
"citty": "^0.2.0",
|
|
80
|
+
"class-variance-authority": "^0.7.1",
|
|
81
|
+
"clsx": "^2.1.1",
|
|
82
|
+
"dotenv": "^17.2.3",
|
|
83
|
+
"drizzle-orm": "^0.45.1",
|
|
84
|
+
"effect": "^3.19.15",
|
|
85
|
+
"elysia": "^1.4.22",
|
|
86
|
+
"lightweight-charts": "^5.0.9",
|
|
87
|
+
"lucide-react": "^0.563.0",
|
|
88
|
+
"motion": "^12.29.2",
|
|
89
|
+
"next-themes": "^0.4.6",
|
|
90
|
+
"openai": "^6.16.0",
|
|
91
|
+
"prettier": "^3.8.1",
|
|
92
|
+
"react": "^19.2.3",
|
|
93
|
+
"react-dom": "^19.2.3",
|
|
94
|
+
"sonner": "^2.0.7",
|
|
95
|
+
"tailwind-merge": "^3.4.0",
|
|
96
|
+
"tailwindcss": "^4.1.18",
|
|
97
|
+
"tw-animate-css": "^1.4.0",
|
|
98
|
+
"zod": "^4.3.6"
|
|
99
|
+
}
|
|
100
|
+
}
|