create-nexwire 4.2.4 → 4.3.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 +20 -8
- package/express/.env +1 -1
- package/express/.vscode/extensions.json +6 -0
- package/express/.vscode/settings.json +37 -26
- package/express/biome.json +99 -66
- package/express/package.json +31 -29
- package/express/src/config/database.ts +48 -29
- package/express/src/config/index.ts +83 -83
- package/express/src/config/openapi.ts +6 -24
- package/express/src/config/queue.ts +30 -30
- package/express/src/config/validate.ts +50 -40
- package/express/src/database/migrations/sqlite/0000_init.sql +47 -47
- package/express/src/database/migrations/sqlite/meta/0000_snapshot.json +1 -1
- package/express/src/database/migrations/sqlite/meta/_journal.json +1 -1
- package/express/src/database/schema.ts +2 -2
- package/express/src/framework/cache/cache.ts +40 -8
- package/express/src/framework/circuit-breaker/cb.ts +88 -60
- package/express/src/framework/database/connection.ts +52 -27
- package/express/src/framework/events/dispatcher.ts +61 -49
- package/express/src/framework/facade.ts +46 -3
- package/express/src/framework/http/app.ts +28 -22
- package/express/src/framework/http/logger.ts +27 -16
- package/express/src/framework/http/openapi.ts +9 -11
- package/express/src/framework/modules/routes.ts +26 -21
- package/express/src/framework/notification/channels/broadcast.ts +15 -0
- package/express/src/framework/notification/channels/mail.ts +40 -0
- package/express/src/framework/notification/contracts.ts +29 -0
- package/express/src/framework/notification/index.ts +19 -94
- package/express/src/framework/notification/registry.ts +15 -0
- package/express/src/framework/providers/adapter.ts +27 -17
- package/express/src/framework/queue/queue.ts +43 -44
- package/express/src/framework/realtime/broadcast.ts +29 -5
- package/express/src/framework/realtime/socket.ts +149 -119
- package/express/src/framework/redis/client.ts +148 -151
- package/express/src/framework/runtime/server-adapter.ts +39 -34
- package/express/src/framework/scheduler/lock.ts +128 -116
- package/express/src/framework/server.ts +33 -49
- package/express/src/framework/session/session.ts +69 -14
- package/express/src/framework/storage/storage.ts +744 -785
- package/express/src/framework/support/mail.ts +15 -7
- package/express/src/providers/notification.ts +4 -0
- package/express/src/resources/src/components/Checkbox.vue +32 -29
- package/express/src/resources/src/components/Input.vue +243 -223
- package/express/src/resources/src/components/InputGroup.vue +147 -145
- package/express/src/resources/src/components/InputPasswordToggle.vue +229 -213
- package/express/src/resources/src/components/Modal.vue +71 -55
- package/express/src/resources/src/components/Refresh.vue +19 -0
- package/express/src/resources/src/helpers/assets.ts +51 -0
- package/express/src/resources/src/layouts/Layout/Header.vue +124 -105
- package/express/src/resources/src/main.ts +3 -1
- package/express/src/resources/src/plugins/gum.ts +1 -1
- package/express/src/resources/src/plugins/pulse.ts +157 -147
- package/express/src/resources/src/stores/auth.ts +184 -164
- package/express/src/resources/vite.config.ts +54 -36
- package/express/src/storage/database/nexwire.sqlite +0 -0
- package/express/src/storage/logs/app.log +0 -0
- package/express/src/storage/logs/fatal.log +0 -0
- package/express/src/types/global.d.ts +32 -26
- package/hono/.env +1 -1
- package/hono/.vscode/extensions.json +6 -0
- package/hono/.vscode/settings.json +37 -26
- package/hono/biome.json +25 -2
- package/hono/package.json +25 -23
- package/hono/src/config/database.ts +48 -29
- package/hono/src/config/index.ts +83 -83
- package/hono/src/config/openapi.ts +6 -24
- package/hono/src/config/queue.ts +30 -30
- package/hono/src/config/validate.ts +50 -40
- package/hono/src/database/migrations/sqlite/0000_init.sql +47 -47
- package/hono/src/database/migrations/sqlite/meta/0000_snapshot.json +1 -1
- package/hono/src/database/migrations/sqlite/meta/_journal.json +1 -1
- package/hono/src/database/schema.ts +2 -2
- package/hono/src/framework/cache/cache.ts +40 -8
- package/hono/src/framework/circuit-breaker/cb.ts +88 -60
- package/hono/src/framework/database/connection.ts +52 -27
- package/hono/src/framework/events/dispatcher.ts +61 -49
- package/hono/src/framework/facade.ts +38 -1
- package/hono/src/framework/http/openapi.ts +7 -9
- package/hono/src/framework/notification/channels/broadcast.ts +15 -0
- package/hono/src/framework/notification/channels/mail.ts +40 -0
- package/hono/src/framework/notification/contracts.ts +29 -0
- package/hono/src/framework/notification/index.ts +19 -94
- package/hono/src/framework/notification/registry.ts +15 -0
- package/hono/src/framework/providers/adapter.ts +27 -17
- package/hono/src/framework/queue/queue.ts +43 -44
- package/hono/src/framework/realtime/broadcast.ts +29 -5
- package/hono/src/framework/realtime/socket.ts +217 -196
- package/hono/src/framework/redis/client.ts +148 -151
- package/hono/src/framework/scheduler/lock.ts +128 -116
- package/hono/src/framework/server.ts +27 -29
- package/hono/src/framework/session/session.ts +62 -14
- package/hono/src/framework/storage/storage.ts +744 -785
- package/hono/src/framework/support/mail.ts +56 -48
- package/hono/src/providers/notification.ts +4 -0
- package/hono/src/resources/src/components/Checkbox.vue +32 -29
- package/hono/src/resources/src/components/Input.vue +243 -234
- package/hono/src/resources/src/components/InputGroup.vue +147 -149
- package/hono/src/resources/src/components/InputPasswordToggle.vue +229 -222
- package/hono/src/resources/src/components/Modal.vue +71 -55
- package/hono/src/resources/src/components/Refresh.vue +19 -0
- package/hono/src/resources/src/helpers/assets.ts +51 -0
- package/hono/src/resources/src/layouts/Layout/Header.vue +124 -105
- package/hono/src/resources/src/main.ts +3 -1
- package/hono/src/resources/src/plugins/gum.ts +1 -1
- package/hono/src/resources/src/plugins/pulse.ts +157 -147
- package/hono/src/resources/src/stores/auth.ts +184 -164
- package/hono/src/resources/vite.config.ts +54 -36
- package/hono/src/storage/database/nexwire.sqlite +0 -0
- package/hono/src/storage/logs/app.log +0 -0
- package/hono/src/storage/logs/fatal.log +0 -0
- package/hono/src/types/global.d.ts +32 -26
- package/package.json +2 -2
- package/src/index.js +139 -14
|
@@ -1,164 +1,184 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import { defineStore } from "pinia";
|
|
3
|
-
import { ref } from "vue";
|
|
4
|
-
import { type AuthUser, clearUser, setUser } from "@/composables/useAuth";
|
|
5
|
-
|
|
6
|
-
type LoginPayload = { email
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return data.message || "
|
|
125
|
-
} finally {
|
|
126
|
-
processing.value = false;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
processing.value = true;
|
|
132
|
-
try {
|
|
133
|
-
const data = await request<unknown>("POST", "/
|
|
134
|
-
return data.message || "
|
|
135
|
-
} finally {
|
|
136
|
-
processing.value = false;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
processing.value = true;
|
|
142
|
-
try {
|
|
143
|
-
await request<unknown>("POST", "/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
processing.value = false;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { defineStore } from "pinia";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
import { type AuthUser, clearUser, setUser } from "@/composables/useAuth";
|
|
5
|
+
|
|
6
|
+
type LoginPayload = { email?: string; phone?: string; password: string; remember?: boolean };
|
|
7
|
+
type VerifyEmailPayload = { email: string; token: string };
|
|
8
|
+
type ForgotPayload = { email: string };
|
|
9
|
+
|
|
10
|
+
type RegisterPayload = {
|
|
11
|
+
name: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
password: string;
|
|
15
|
+
password_confirmation: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type ResetPayload = {
|
|
19
|
+
email: string;
|
|
20
|
+
token: string;
|
|
21
|
+
password: string;
|
|
22
|
+
password_confirmation: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type ApiResponse<T> = { message: string; data?: T };
|
|
26
|
+
type AuthData = { user: AuthUser };
|
|
27
|
+
|
|
28
|
+
async function request<T>(method: "GET" | "POST", path: string, payload?: unknown): Promise<ApiResponse<T>> {
|
|
29
|
+
try {
|
|
30
|
+
const response = await axios.request<ApiResponse<T>>({
|
|
31
|
+
method,
|
|
32
|
+
url: `/api/auth${path}`,
|
|
33
|
+
data: payload
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return response.data;
|
|
37
|
+
} catch (error: unknown) {
|
|
38
|
+
if (axios.isAxiosError(error)) {
|
|
39
|
+
throw new Error(String(error.response?.data?.message || error.message || "Request failed"));
|
|
40
|
+
}
|
|
41
|
+
throw new Error("Request failed");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const MAX_BOOTSTRAP_ATTEMPTS = 5;
|
|
46
|
+
const BOOTSTRAP_BACKOFF_MS = 500;
|
|
47
|
+
|
|
48
|
+
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
49
|
+
|
|
50
|
+
export const useAuthStore = defineStore("auth", () => {
|
|
51
|
+
const user = ref<AuthUser | null>(null);
|
|
52
|
+
const isAuthenticated = ref(false);
|
|
53
|
+
const processing = ref(false);
|
|
54
|
+
const initialized = ref(false);
|
|
55
|
+
|
|
56
|
+
const syncUser = (value: AuthUser | null) => {
|
|
57
|
+
user.value = value;
|
|
58
|
+
isAuthenticated.value = !!value;
|
|
59
|
+
if (value) setUser(value);
|
|
60
|
+
else clearUser();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
let bootstrapPromise: Promise<void> | null = null;
|
|
64
|
+
const bootstrap = async () => {
|
|
65
|
+
if (initialized.value) return;
|
|
66
|
+
|
|
67
|
+
// Reuse the same request if multiple navigations call bootstrap.
|
|
68
|
+
if (bootstrapPromise) {
|
|
69
|
+
return bootstrapPromise;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
bootstrapPromise = (async () => {
|
|
73
|
+
for (let attempt = 1; attempt <= MAX_BOOTSTRAP_ATTEMPTS; attempt++) {
|
|
74
|
+
try {
|
|
75
|
+
const response = await axios.get<ApiResponse<AuthUser>>("/api/auth/me");
|
|
76
|
+
|
|
77
|
+
syncUser((response.data?.data || null) as AuthUser | null);
|
|
78
|
+
initialized.value = true;
|
|
79
|
+
return;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
const backendUnreachable = axios.isAxiosError(error) && !error.response;
|
|
82
|
+
|
|
83
|
+
if (!backendUnreachable || attempt === MAX_BOOTSTRAP_ATTEMPTS) {
|
|
84
|
+
syncUser(null);
|
|
85
|
+
initialized.value = true;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
await sleep(BOOTSTRAP_BACKOFF_MS * 2 ** (attempt - 1));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
})();
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
await bootstrapPromise;
|
|
96
|
+
} finally {
|
|
97
|
+
bootstrapPromise = null;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const login = async (payload: LoginPayload) => {
|
|
102
|
+
processing.value = true;
|
|
103
|
+
try {
|
|
104
|
+
const data = await request<AuthData>("POST", "/login", payload);
|
|
105
|
+
syncUser((data?.data?.user || null) as AuthUser | null);
|
|
106
|
+
initialized.value = true;
|
|
107
|
+
return data.message || "Login successful";
|
|
108
|
+
} finally {
|
|
109
|
+
processing.value = false;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const register = async (payload: RegisterPayload) => {
|
|
114
|
+
processing.value = true;
|
|
115
|
+
try {
|
|
116
|
+
const data = await request<AuthData>("POST", "/register", payload);
|
|
117
|
+
const createdUser = (data?.data?.user || null) as AuthUser | null;
|
|
118
|
+
if (createdUser) {
|
|
119
|
+
syncUser(createdUser);
|
|
120
|
+
initialized.value = true;
|
|
121
|
+
} else {
|
|
122
|
+
syncUser(null);
|
|
123
|
+
}
|
|
124
|
+
return data.message || "Registration successful";
|
|
125
|
+
} finally {
|
|
126
|
+
processing.value = false;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const verifyEmail = async (payload: VerifyEmailPayload) => {
|
|
131
|
+
processing.value = true;
|
|
132
|
+
try {
|
|
133
|
+
const data = await request<unknown>("POST", "/verify-email", payload);
|
|
134
|
+
return data.message || "Email verified successfully";
|
|
135
|
+
} finally {
|
|
136
|
+
processing.value = false;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const forgotPassword = async (payload: ForgotPayload) => {
|
|
141
|
+
processing.value = true;
|
|
142
|
+
try {
|
|
143
|
+
const data = await request<unknown>("POST", "/forgot-password", payload);
|
|
144
|
+
return data.message || "If this email exists, a reset link has been sent";
|
|
145
|
+
} finally {
|
|
146
|
+
processing.value = false;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const resetPassword = async (payload: ResetPayload) => {
|
|
151
|
+
processing.value = true;
|
|
152
|
+
try {
|
|
153
|
+
const data = await request<unknown>("POST", "/reset-password", payload);
|
|
154
|
+
return data.message || "Password reset successfully";
|
|
155
|
+
} finally {
|
|
156
|
+
processing.value = false;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const logout = async () => {
|
|
161
|
+
processing.value = true;
|
|
162
|
+
try {
|
|
163
|
+
await request<unknown>("POST", "/logout");
|
|
164
|
+
} finally {
|
|
165
|
+
syncUser(null);
|
|
166
|
+
processing.value = false;
|
|
167
|
+
initialized.value = true;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return {
|
|
172
|
+
user,
|
|
173
|
+
isAuthenticated,
|
|
174
|
+
processing,
|
|
175
|
+
initialized,
|
|
176
|
+
bootstrap,
|
|
177
|
+
register,
|
|
178
|
+
login,
|
|
179
|
+
forgotPassword,
|
|
180
|
+
resetPassword,
|
|
181
|
+
verifyEmail,
|
|
182
|
+
logout
|
|
183
|
+
};
|
|
184
|
+
});
|
|
@@ -1,46 +1,64 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath, URL } from "node:url";
|
|
3
3
|
import vue from "@vitejs/plugin-vue";
|
|
4
|
-
import { defineConfig } from "vite";
|
|
4
|
+
import { defineConfig, loadEnv } from "vite";
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const socketEnabled = process.env.SOCKET !== "false";
|
|
6
|
+
const configDir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const projectRoot = path.resolve(configDir, "../..");
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
9
|
+
export default defineConfig(({ mode }) => {
|
|
10
|
+
// 1. Load the .env file just like the backend does. Resolve it from the
|
|
11
|
+
// config file so a different process cwd cannot point Vite at the wrong .env.
|
|
12
|
+
const env = loadEnv(mode, projectRoot, "");
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
const cacheBase = process.env.LOCALAPPDATA || process.env.TEMP || ".";
|
|
15
|
+
const apiUrl = env.APP_URL || "http://localhost:3000";
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
// Match the backend default: Socket.IO is off unless SOCKET=true
|
|
18
|
+
const socketEnabled = env.SOCKET === "true";
|
|
19
|
+
|
|
20
|
+
const proxy: Record<string, any> = {
|
|
21
|
+
"/api": { target: apiUrl, changeOrigin: true },
|
|
22
|
+
"/health": { target: apiUrl, changeOrigin: true },
|
|
23
|
+
"/storage": { target: apiUrl, changeOrigin: true }
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
if (socketEnabled) {
|
|
27
|
+
proxy["/socket.io"] = { target: apiUrl, changeOrigin: true, ws: true, timeout: 10000 };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
define: {
|
|
32
|
+
// 3. ALWAYS stringify the value when using Vite define
|
|
33
|
+
// `import.meta.env.*` is inlined into every module in dev as well as in
|
|
34
|
+
// the production bundle, so the UI never depends on a stale global.
|
|
35
|
+
"import.meta.env.VITE_SOCKET_ENABLED": JSON.stringify(socketEnabled),
|
|
36
|
+
__SOCKET_ENABLED__: JSON.stringify(socketEnabled),
|
|
37
|
+
__API_URL__: JSON.stringify(apiUrl)
|
|
38
|
+
},
|
|
39
|
+
root: fileURLToPath(new URL(".", import.meta.url)),
|
|
40
|
+
cacheDir: path.join(cacheBase, "nexwire", "vite-cache", "resources"),
|
|
41
|
+
plugins: [vue()],
|
|
42
|
+
css: {
|
|
43
|
+
preprocessorOptions: {
|
|
44
|
+
scss: {
|
|
45
|
+
quietDeps: true,
|
|
46
|
+
silenceDeprecations: ["import", "if-function", "global-builtin", "color-functions", "slash-div"]
|
|
47
|
+
}
|
|
30
48
|
}
|
|
49
|
+
},
|
|
50
|
+
resolve: {
|
|
51
|
+
alias: {
|
|
52
|
+
"@": fileURLToPath(new URL("./src", import.meta.url))
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
build: {
|
|
56
|
+
outDir: "../../public",
|
|
57
|
+
emptyOutDir: true
|
|
58
|
+
},
|
|
59
|
+
server: {
|
|
60
|
+
port: 5173,
|
|
61
|
+
proxy // /socket.io is only proxied when SOCKET=true
|
|
31
62
|
}
|
|
32
|
-
}
|
|
33
|
-
resolve: {
|
|
34
|
-
alias: {
|
|
35
|
-
"@": fileURLToPath(new URL("./src", import.meta.url))
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
build: {
|
|
39
|
-
outDir: "../../public",
|
|
40
|
-
emptyOutDir: true
|
|
41
|
-
},
|
|
42
|
-
server: {
|
|
43
|
-
port: 5173,
|
|
44
|
-
proxy
|
|
45
|
-
}
|
|
63
|
+
};
|
|
46
64
|
});
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
declare module "*.vue" {
|
|
2
|
-
import type { DefineComponent } from "vue";
|
|
3
|
-
|
|
4
|
-
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
|
|
5
|
-
export default component;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare module "bootstrap/js/dist/modal.js" {
|
|
9
|
-
export default class Modal {
|
|
10
|
-
constructor(element: Element, options?: { backdrop?: boolean | "static"; keyboard?: boolean });
|
|
11
|
-
show(): void;
|
|
12
|
-
hide(): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare module "bootstrap/js/dist/toast.js" {
|
|
18
|
-
export default class Toast {
|
|
19
|
-
static getOrCreateInstance(element: Element): Toast;
|
|
20
|
-
show(): void;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module "luxon";
|
|
25
|
-
declare module "nodemailer";
|
|
26
|
-
declare module "vue-select";
|
|
1
|
+
declare module "*.vue" {
|
|
2
|
+
import type { DefineComponent } from "vue";
|
|
3
|
+
|
|
4
|
+
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
|
|
5
|
+
export default component;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "bootstrap/js/dist/modal.js" {
|
|
9
|
+
export default class Modal {
|
|
10
|
+
constructor(element: Element, options?: { backdrop?: boolean | "static"; keyboard?: boolean });
|
|
11
|
+
show(): void;
|
|
12
|
+
hide(): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module "bootstrap/js/dist/toast.js" {
|
|
18
|
+
export default class Toast {
|
|
19
|
+
static getOrCreateInstance(element: Element): Toast;
|
|
20
|
+
show(): void;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module "luxon";
|
|
25
|
+
declare module "nodemailer";
|
|
26
|
+
declare module "vue-select";
|
|
27
|
+
|
|
28
|
+
interface ImportMetaEnv {
|
|
29
|
+
readonly VITE_API_URL?: string;
|
|
30
|
+
readonly VITE_SOCKET_URL?: string;
|
|
31
|
+
readonly VITE_SOCKET_ENABLED?: boolean;
|
|
32
|
+
}
|
package/hono/.env
CHANGED
|
@@ -37,7 +37,7 @@ UI=true
|
|
|
37
37
|
# Set true to enable OpenAPI / Scalar docs at /api-docs
|
|
38
38
|
OPEN_API=true
|
|
39
39
|
# Set false to disable Socket.IO realtime server
|
|
40
|
-
SOCKET=
|
|
40
|
+
SOCKET=false
|
|
41
41
|
# Set false to disable browser security headers (CSP, HSTS, X-Frame)
|
|
42
42
|
SECURITY_HEADERS=true
|
|
43
43
|
|
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"editor.defaultFormatter": "biomejs.biome",
|
|
3
|
-
"[typescript]": {
|
|
4
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
5
|
-
},
|
|
6
|
-
"[typescriptreact]": {
|
|
7
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
8
|
-
},
|
|
9
|
-
"[javascript]": {
|
|
10
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
11
|
-
},
|
|
12
|
-
"[javascriptreact]": {
|
|
13
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
14
|
-
},
|
|
15
|
-
"[json]": {
|
|
16
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
17
|
-
},
|
|
18
|
-
"[jsonc]": {
|
|
19
|
-
"editor.defaultFormatter": "biomejs.biome"
|
|
20
|
-
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
3
|
+
"[typescript]": {
|
|
4
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
5
|
+
},
|
|
6
|
+
"[typescriptreact]": {
|
|
7
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
8
|
+
},
|
|
9
|
+
"[javascript]": {
|
|
10
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
11
|
+
},
|
|
12
|
+
"[javascriptreact]": {
|
|
13
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
14
|
+
},
|
|
15
|
+
"[json]": {
|
|
16
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
17
|
+
},
|
|
18
|
+
"[jsonc]": {
|
|
19
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
20
|
+
},
|
|
21
|
+
"[vue]": {
|
|
22
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
23
|
+
},
|
|
24
|
+
"[css]": {
|
|
25
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
26
|
+
},
|
|
27
|
+
"[scss]": {
|
|
28
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
29
|
+
},
|
|
30
|
+
"editor.codeActionsOnSave": {
|
|
31
|
+
"source.organizeImports.biome": "explicit",
|
|
32
|
+
"source.fixAll.biome": "explicit"
|
|
33
|
+
},
|
|
34
|
+
"files.eol": "\n",
|
|
35
|
+
"files.trimTrailingWhitespace": true,
|
|
36
|
+
"files.insertFinalNewline": true
|
|
37
|
+
}
|
package/hono/biome.json
CHANGED
|
@@ -5,22 +5,45 @@
|
|
|
5
5
|
"clientKind": "git",
|
|
6
6
|
"useIgnoreFile": true
|
|
7
7
|
},
|
|
8
|
+
"html": {
|
|
9
|
+
"experimentalFullSupportEnabled": true,
|
|
10
|
+
"formatter": {
|
|
11
|
+
"enabled": true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"formatter": {
|
|
9
15
|
"indentStyle": "space",
|
|
10
16
|
"indentWidth": 2,
|
|
11
17
|
"lineWidth": 140,
|
|
12
|
-
"bracketSameLine":
|
|
18
|
+
"bracketSameLine": false
|
|
19
|
+
},
|
|
20
|
+
"files": {
|
|
21
|
+
"includes": [
|
|
22
|
+
"**",
|
|
23
|
+
"!**/node_modules"
|
|
24
|
+
]
|
|
13
25
|
},
|
|
14
26
|
"linter": {
|
|
15
27
|
"rules": {
|
|
16
28
|
"preset": "recommended",
|
|
29
|
+
"a11y": {
|
|
30
|
+
"noLabelWithoutControl": "off",
|
|
31
|
+
"useButtonType": "off",
|
|
32
|
+
"useSemanticElements": "off",
|
|
33
|
+
"noStaticElementInteractions": "off",
|
|
34
|
+
"useKeyWithClickEvents": "off",
|
|
35
|
+
"useValidAnchor": "off",
|
|
36
|
+
"useAnchorContent": "off",
|
|
37
|
+
"noDistractingElements": "off"
|
|
38
|
+
},
|
|
17
39
|
"correctness": {
|
|
18
40
|
"noUnusedVariables": "off",
|
|
19
41
|
"useVueValidTemplateRoot": "off",
|
|
20
42
|
"noUnusedImports": "off"
|
|
21
43
|
},
|
|
22
44
|
"complexity": {
|
|
23
|
-
"noUselessEscapeInRegex": "off"
|
|
45
|
+
"noUselessEscapeInRegex": "off",
|
|
46
|
+
"noImportantStyles": "off"
|
|
24
47
|
},
|
|
25
48
|
"style": {
|
|
26
49
|
"noNonNullAssertion": "off",
|