@viibestack/ui 0.6.1 → 0.6.3
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/package.json +2 -2
- package/src/auth.ts +3 -2
- package/src/data.ts +12 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viibestack/ui",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Dependency-free React UI kit -- icons, core components (Button, Card, Input, Modal, etc.), a real per-app data client (listRows/upsertRow/deleteRow/
|
|
3
|
+
"version": "0.6.3",
|
|
4
|
+
"description": "Dependency-free React UI kit -- icons, core components (Button, Card, Input, Modal, etc.), a real per-app data client (listRows/upsertRow/deleteRow/captureClientError), and a real per-app end-user auth client (signUp/logIn/logOut/getCurrentUser/reportError) backed by ViibeStack's own platform-managed data store.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"types": "./src/index.ts",
|
package/src/auth.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
export interface AppUser {
|
|
13
13
|
id: string;
|
|
14
14
|
email: string;
|
|
15
|
+
displayName?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export type AuthActionResult = { ok: true; user: AppUser } | { ok: false; error: string };
|
|
@@ -149,8 +150,8 @@ async function callAppAuth<T>(path: string, init?: RequestInit): Promise<{ ok: t
|
|
|
149
150
|
|
|
150
151
|
type SessionResponse = { jwt: string; sessionId: string; user: AppUser };
|
|
151
152
|
|
|
152
|
-
export async function signUp(email: string, password: string): Promise<AuthActionResult> {
|
|
153
|
-
const result = await callAppAuth<SessionResponse>("/signup", { method: "POST", body: JSON.stringify({ email, password }) });
|
|
153
|
+
export async function signUp(email: string, password: string, name?: string): Promise<AuthActionResult> {
|
|
154
|
+
const result = await callAppAuth<SessionResponse>("/signup", { method: "POST", body: JSON.stringify({ email, password, name }) });
|
|
154
155
|
if (!result.ok) return { ok: false, error: result.error };
|
|
155
156
|
saveStoredSession(result.body);
|
|
156
157
|
return { ok: true, user: result.body.user };
|
package/src/data.ts
CHANGED
|
@@ -107,7 +107,18 @@ export async function deleteRow(table: string, id: string): Promise<void> {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
// Renamed from reportError in 0.6.3 -- it collided with auth.ts's own
|
|
111
|
+
// reportError(message, details?, reporterEmail?) (the DOCUMENTED public
|
|
112
|
+
// helper for integrationRequirements() item 3b, referenced by name in
|
|
113
|
+
// mcp-agent.ts's generation prompt and ai-edit.ts's edit prompt). Both
|
|
114
|
+
// symbols surviving index.ts's `export * from "./data"; export * from
|
|
115
|
+
// "./auth";` produced a TypeScript "already exported a member" build
|
|
116
|
+
// error for every consumer on 0.6.2 (see agent report a7b39641). This one
|
|
117
|
+
// was never itself part of the documented public API -- item 3a's own
|
|
118
|
+
// instructions always described a raw fetch to .../errors, not a
|
|
119
|
+
// packages/ui helper call -- so renaming it doesn't break any documented
|
|
120
|
+
// usage pattern.
|
|
121
|
+
export async function captureClientError(message: string, stack?: string): Promise<void> {
|
|
111
122
|
const appId = await resolveAppId();
|
|
112
123
|
if (!appId) return;
|
|
113
124
|
try {
|