@batijs/cli 0.0.243 → 0.0.244
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/boilerplates/@batijs/drizzle/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/drizzle/files/database/{db.ts → drizzleDb.ts} +1 -2
- package/dist/boilerplates/@batijs/drizzle/files/database/seed.ts +4 -3
- package/dist/boilerplates/@batijs/drizzle/files/drizzle.config.ts +1 -1
- package/dist/boilerplates/@batijs/drizzle/types/database/drizzleDb.d.ts +1 -0
- package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -0
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +20 -0
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +1 -0
- package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +20 -0
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +1 -0
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +20 -0
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -0
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +20 -0
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -0
- package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +20 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/$.env.js +23 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/$README.md.js +29 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/$package.json.js +133 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/database/auth-actions.ts +54 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/database/schema/auth.ts +41 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/database/sqliteDb.ts +30 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/lib/lucia-auth.ts +96 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/pages/login/+guard.ts +11 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/pages/login/style.css +94 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/server/lucia-auth-handlers.ts +344 -0
- package/dist/boilerplates/@batijs/lucia-auth/files/vike.d.ts +11 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/database/auth-actions.d.ts +9 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/database/schema/auth.d.ts +167 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/database/sqliteDb.d.ts +2 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/lib/lucia-auth.d.ts +43 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/pages/login/+guard.d.ts +3 -0
- package/dist/boilerplates/@batijs/lucia-auth/types/server/lucia-auth-handlers.d.ts +46 -0
- package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +1 -0
- package/dist/boilerplates/@batijs/react/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/react-lucia-auth/files/pages/login/+Page.tsx +96 -0
- package/dist/boilerplates/@batijs/react-lucia-auth/types/pages/login/+Page.d.ts +2 -0
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +3 -3
- package/dist/boilerplates/@batijs/shared-todo/files/pages/todo/+data.ts +3 -3
- package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +1 -0
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/solid-lucia-auth/files/pages/login/+Page.tsx +96 -0
- package/dist/boilerplates/@batijs/solid-lucia-auth/types/pages/login/+Page.d.ts +2 -0
- package/dist/boilerplates/@batijs/telefunc/files/pages/todo/TodoList.telefunc.ts +3 -3
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +3 -3
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +3 -3
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +2 -0
- package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/vue-lucia-auth/files/pages/login/+Page.vue +87 -0
- package/dist/boilerplates/boilerplates.json +59 -0
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/dist/boilerplates/@batijs/drizzle/types/database/db.d.ts +0 -2
- /package/dist/boilerplates/@batijs/drizzle/files/database/{schema.ts → schema/todos.ts} +0 -0
- /package/dist/boilerplates/@batijs/drizzle/types/database/{schema.d.ts → schema/todos.d.ts} +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form">
|
|
3
|
+
<div class="form-content">
|
|
4
|
+
<header>Login / Sign Up</header>
|
|
5
|
+
<form>
|
|
6
|
+
<div class="field">
|
|
7
|
+
<input
|
|
8
|
+
id="username"
|
|
9
|
+
v-model="formData.username"
|
|
10
|
+
type="text"
|
|
11
|
+
name="username"
|
|
12
|
+
placeholder="Username"
|
|
13
|
+
autocomplete="username"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
<span v-if="error.username" class="field-error">{{ error.username }}</span>
|
|
17
|
+
|
|
18
|
+
<div class="field">
|
|
19
|
+
<input id="password" v-model="formData.password" type="password" name="password" placeholder="Password" />
|
|
20
|
+
</div>
|
|
21
|
+
<span v-if="error.password" class="field-error">{{ error.password }}</span>
|
|
22
|
+
<span v-if="error.invalid" class="field-error">{{ error.invalid }}</span>
|
|
23
|
+
|
|
24
|
+
<div class="field button-group">
|
|
25
|
+
<button type="button" class="button-field signup-button" @click.prevent="handleOnSubmit('signup')">
|
|
26
|
+
Sign Up
|
|
27
|
+
</button>
|
|
28
|
+
<button type="submit" class="button-field login-button" @click.prevent="handleOnSubmit('login')">
|
|
29
|
+
Login
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
</form>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="media-options">
|
|
36
|
+
<a href="/api/login/github" class="field github">
|
|
37
|
+
<img
|
|
38
|
+
src="data:image/svg+xml;base64,PHN2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|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts" setup>
|
|
49
|
+
import "./style.css";
|
|
50
|
+
import { navigate } from "vike/client/router";
|
|
51
|
+
import { ref } from "vue";
|
|
52
|
+
|
|
53
|
+
type ValidationError = {
|
|
54
|
+
username: string | null;
|
|
55
|
+
password: string | null;
|
|
56
|
+
invalid?: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const formData = ref({
|
|
60
|
+
username: "",
|
|
61
|
+
password: "",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
let error = ref<ValidationError>({
|
|
65
|
+
username: null,
|
|
66
|
+
password: null,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
async function handleOnSubmit(action: "login" | "signup") {
|
|
70
|
+
try {
|
|
71
|
+
const response = await fetch(`/api/${action}`, {
|
|
72
|
+
method: "POST",
|
|
73
|
+
body: JSON.stringify(formData.value),
|
|
74
|
+
headers: { "Content-Type": "application/json" },
|
|
75
|
+
});
|
|
76
|
+
const result = await response.json();
|
|
77
|
+
if ("error" in result) {
|
|
78
|
+
console.error("A validation error has occurred :", result.error);
|
|
79
|
+
error.value = { ...result.error };
|
|
80
|
+
} else {
|
|
81
|
+
await navigate("/");
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error("An unknown error has occurred :", err);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
@@ -169,6 +169,17 @@
|
|
|
169
169
|
"files"
|
|
170
170
|
]
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
"config": {
|
|
174
|
+
"if": {
|
|
175
|
+
"flag": "lucia-auth"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"folder": "@batijs/lucia-auth",
|
|
179
|
+
"subfolders": [
|
|
180
|
+
"files"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
172
183
|
{
|
|
173
184
|
"config": {
|
|
174
185
|
"if": {
|
|
@@ -218,6 +229,22 @@
|
|
|
218
229
|
"files"
|
|
219
230
|
]
|
|
220
231
|
},
|
|
232
|
+
{
|
|
233
|
+
"config": {
|
|
234
|
+
"if": {
|
|
235
|
+
"flag": {
|
|
236
|
+
"$all": [
|
|
237
|
+
"react",
|
|
238
|
+
"lucia-auth"
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"folder": "@batijs/react-lucia-auth",
|
|
244
|
+
"subfolders": [
|
|
245
|
+
"files"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
221
248
|
{
|
|
222
249
|
"config": {
|
|
223
250
|
"enforce": "pre"
|
|
@@ -321,6 +348,22 @@
|
|
|
321
348
|
"files"
|
|
322
349
|
]
|
|
323
350
|
},
|
|
351
|
+
{
|
|
352
|
+
"config": {
|
|
353
|
+
"if": {
|
|
354
|
+
"flag": {
|
|
355
|
+
"$all": [
|
|
356
|
+
"solid",
|
|
357
|
+
"lucia-auth"
|
|
358
|
+
]
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"folder": "@batijs/solid-lucia-auth",
|
|
363
|
+
"subfolders": [
|
|
364
|
+
"files"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
324
367
|
{
|
|
325
368
|
"config": {
|
|
326
369
|
"if": {
|
|
@@ -402,5 +445,21 @@
|
|
|
402
445
|
"subfolders": [
|
|
403
446
|
"files"
|
|
404
447
|
]
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"config": {
|
|
451
|
+
"if": {
|
|
452
|
+
"flag": {
|
|
453
|
+
"$all": [
|
|
454
|
+
"vue",
|
|
455
|
+
"lucia-auth"
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"folder": "@batijs/vue-lucia-auth",
|
|
461
|
+
"subfolders": [
|
|
462
|
+
"files"
|
|
463
|
+
]
|
|
405
464
|
}
|
|
406
465
|
]
|
package/dist/index.js
CHANGED
|
@@ -1591,7 +1591,7 @@ var createDefaultQueryTester = function(query, options) {
|
|
|
1591
1591
|
// package.json
|
|
1592
1592
|
var package_default = {
|
|
1593
1593
|
name: "@batijs/cli",
|
|
1594
|
-
version: "0.0.
|
|
1594
|
+
version: "0.0.244",
|
|
1595
1595
|
type: "module",
|
|
1596
1596
|
scripts: {
|
|
1597
1597
|
"check-types": "tsc --noEmit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.244",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"typescript": "^5.5.4",
|
|
21
21
|
"unplugin-purge-polyfills": "^0.0.4",
|
|
22
22
|
"vite": "^5.4.0",
|
|
23
|
-
"@batijs/build": "0.0.
|
|
24
|
-
"@batijs/compile": "0.0.
|
|
23
|
+
"@batijs/build": "0.0.244",
|
|
24
|
+
"@batijs/compile": "0.0.244"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@batijs/
|
|
28
|
-
"@batijs/
|
|
27
|
+
"@batijs/features": "0.0.244",
|
|
28
|
+
"@batijs/core": "0.0.244"
|
|
29
29
|
},
|
|
30
30
|
"bin": "./dist/index.js",
|
|
31
31
|
"exports": {
|
|
File without changes
|
|
File without changes
|