Skip to content

Commit

Permalink
Merge pull request #379 from Hrdtr/378-appwrite-150-support
Browse files Browse the repository at this point in the history
feat: appwrite v1.5 support
  • Loading branch information
Hrdtr authored May 1, 2024
2 parents 5f519c3 + 5d3d05a commit e3d6c67
Show file tree
Hide file tree
Showing 13 changed files with 9,242 additions and 7,281 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
}
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @ts-check
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'

// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
export default createConfigForNuxt({
features: {
tooling: true,
stylistic: true,
},
dirs: {
src: ['./playground'],
},
})
.append({
ignores: [
'dist',
'node_modules',
],
})
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@nuxt/kit": "^3.9.1",
"appwrite": "^13.0.1"
"@nuxt/kit": "^3.11.2",
"appwrite": "^14.0.1"
},
"devDependencies": {
"@nuxt/module-builder": "^0.5.5",
"@nuxt/schema": "^3.9.1",
"@nuxt/test-utils": "^3.9.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxt/eslint": "^0.3.10",
"@nuxt/module-builder": "^0.6.0",
"@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "^3.12.1",
"changelogen": "^0.5.5",
"eslint": "^8.56.0",
"nuxt": "^3.9.1",
"release-it": "^17.0.1",
"typescript": "~5.2.2",
"vitest": "^1.1.3"
"eslint": "^9.1.1",
"nuxt": "^3.11.2",
"release-it": "^17.2.1",
"typescript": "~5.4.5",
"vitest": "^1.5.3"
},
"publishConfig": {
"access": "public"
Expand Down
29 changes: 23 additions & 6 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { account } = useAppwrite()
// return response
// })
const user = ref<any>()
const user = ref<unknown>()
const getAccount = async () => {
const response = await account.get()
user.value = response
Expand All @@ -19,7 +19,10 @@ onMounted(getAccount)
const email = ref('')
const password = ref('')
const login = async () => {
const res = await account.createEmailSession(email.value, password.value)
const res = await account.createEmailPasswordSession(
email.value,
password.value,
)
await getAccount()
console.log(res)
}
Expand All @@ -32,12 +35,26 @@ const logout = async () => {

<template>
<div>
<form v-if="!user" @submit.prevent="login">
<input v-model="email" placeholder="Email" type="email">
<input v-model="password" placeholder="Password" type="password">
<form
v-if="!user"
@submit.prevent="login"
>
<input
v-model="email"
placeholder="Email"
type="email"
>
<input
v-model="password"
placeholder="Password"
type="password"
>
<button>Login</button>
</form>
<button v-else @click="logout">
<button
v-else
@click="logout"
>
Logout
</button>

Expand Down
6 changes: 3 additions & 3 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default defineNuxtConfig({
modules: ['../src/module'],
appwrite: {
project: 'nuxt-playground'
project: 'nuxt-playground',
},
typescript: {
shim: false
}
shim: false,
},
})
Loading

0 comments on commit e3d6c67

Please sign in to comment.