mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 14:57:42 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
"name": "@manacore/shared-auth-stores",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"files": [
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"type-check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@manacore/shared-types": "workspace:*"
|
||||
}
|
||||
"name": "@manacore/shared-auth-stores",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"files": [
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"type-check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@manacore/shared-types": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,6 +181,6 @@ export function createAuthStore<TUser extends BaseUser>(authService: AuthService
|
|||
*/
|
||||
clearError() {
|
||||
error = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,12 +77,12 @@ export function createSupabaseAuthStore(
|
|||
async function getUserFromSession(): Promise<SupabaseUser | null> {
|
||||
const supabase = getSupabaseClient();
|
||||
const {
|
||||
data: { session }
|
||||
data: { session },
|
||||
} = await supabase.auth.getSession();
|
||||
if (!session?.user) return null;
|
||||
return {
|
||||
id: session.user.id,
|
||||
email: session.user.email || ''
|
||||
email: session.user.email || '',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ export function createSupabaseAuthStore(
|
|||
const supabase = getSupabaseClient();
|
||||
const { error: authError } = await supabase.auth.signInWithPassword({
|
||||
email,
|
||||
password
|
||||
password,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -165,7 +165,7 @@ export function createSupabaseAuthStore(
|
|||
const supabase = getSupabaseClient();
|
||||
const { data, error: authError } = await supabase.auth.signUp({
|
||||
email,
|
||||
password
|
||||
password,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -183,7 +183,7 @@ export function createSupabaseAuthStore(
|
|||
return {
|
||||
success: true,
|
||||
needsVerification,
|
||||
user: user || undefined
|
||||
user: user || undefined,
|
||||
};
|
||||
} catch (e) {
|
||||
const errorMessage = e instanceof Error ? e.message : 'Sign up failed';
|
||||
|
|
@ -206,7 +206,7 @@ export function createSupabaseAuthStore(
|
|||
options.passwordResetRedirectUrl || `${window.location.origin}/reset-password`;
|
||||
|
||||
const { error: authError } = await supabase.auth.resetPasswordForEmail(email, {
|
||||
redirectTo
|
||||
redirectTo,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -266,6 +266,6 @@ export function createSupabaseAuthStore(
|
|||
*/
|
||||
clearError() {
|
||||
error = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@
|
|||
// Factory functions
|
||||
export { createAuthStore } from './createAuthStore.svelte';
|
||||
export { createSupabaseAuthStore } from './createSupabaseAuthStore.svelte';
|
||||
export type { CreateSupabaseAuthStoreOptions, SupabaseUser } from './createSupabaseAuthStore.svelte';
|
||||
export type {
|
||||
CreateSupabaseAuthStoreOptions,
|
||||
SupabaseUser,
|
||||
} from './createSupabaseAuthStore.svelte';
|
||||
|
||||
// Types
|
||||
export type {
|
||||
|
|
@ -38,5 +41,5 @@ export type {
|
|||
AuthServiceAdapter,
|
||||
AuthStoreState,
|
||||
AuthStoreActions,
|
||||
AuthStore
|
||||
AuthStore,
|
||||
} from './types';
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
"types": ["svelte"]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
"types": ["svelte"]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue