Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to match nhost/nhost example code #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
VITE_NHOST_URL=https://myapp.nhost.run
# Values taken from the 'Project Info' section of the 'Overview' screen in your Nhost project.
#
# Replace '[subdomain]' below with your Nhost -> Project Info -> Subdomain value.
# Example: 'dbhpclfdubxdyyifwbdf'
VITE_NHOST_SUBDOMAIN='[subdomain]'

# Replace '[region]' below with your Nhost -> Project Info -> Region value.
# Example: 'ap-southeast-1'
VITE_NHOST_REGION='[region]'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @nhost-examples/vue-quickstart

## 0.0.2

### Patch Changes

- b030eae9: chore(deps): update dependency @xstate/inspect to ^0.7.0
- Updated dependencies [b030eae9]
- @nhost/[email protected]
11 changes: 11 additions & 0 deletions auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ declare global {
const refDefault: typeof import('@vueuse/core')['refDefault']
const refThrottled: typeof import('@vueuse/core')['refThrottled']
const refWithControl: typeof import('@vueuse/core')['refWithControl']
const resolveRef: typeof import('@vueuse/core')['resolveRef']
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
const syncRef: typeof import('@vueuse/core')['syncRef']
const syncRefs: typeof import('@vueuse/core')['syncRefs']
const templateRef: typeof import('@vueuse/core')['templateRef']
Expand All @@ -65,6 +67,7 @@ declare global {
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useBase64: typeof import('@vueuse/core')['useBase64']
const useBattery: typeof import('@vueuse/core')['useBattery']
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
Expand All @@ -89,6 +92,7 @@ declare global {
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useDropZone: typeof import('@vueuse/core')['useDropZone']
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
const useElementHover: typeof import('@vueuse/core')['useElementHover']
Expand All @@ -100,6 +104,7 @@ declare global {
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
const useFavicon: typeof import('@vueuse/core')['useFavicon']
const useFetch: typeof import('@vueuse/core')['useFetch']
const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
const useFocus: typeof import('@vueuse/core')['useFocus']
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
Expand All @@ -108,6 +113,7 @@ declare global {
const useGamepad: typeof import('@vueuse/core')['useGamepad']
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
const useIdle: typeof import('@vueuse/core')['useIdle']
const useImage: typeof import('@vueuse/core')['useImage']
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
const useInterval: typeof import('@vueuse/core')['useInterval']
Expand All @@ -129,6 +135,7 @@ declare global {
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
const useNetwork: typeof import('@vueuse/core')['useNetwork']
const useNow: typeof import('@vueuse/core')['useNow']
const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
const useOnline: typeof import('@vueuse/core')['useOnline']
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
Expand All @@ -153,11 +160,13 @@ declare global {
const useShare: typeof import('@vueuse/core')['useShare']
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
const useStepper: typeof import('@vueuse/core')['useStepper']
const useStorage: typeof import('@vueuse/core')['useStorage']
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
const useThrottle: typeof import('@vueuse/core')['useThrottle']
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
Expand All @@ -184,12 +193,14 @@ declare global {
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
const watchArray: typeof import('@vueuse/core')['watchArray']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
const watchOnce: typeof import('@vueuse/core')['watchOnce']
const watchPausable: typeof import('@vueuse/core')['watchPausable']
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever']
}
Expand Down
3 changes: 1 addition & 2 deletions components.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/vue-next/pull/3399
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

declare module '@vue/runtime-core' {
export interface GlobalComponents {
Counter: typeof import('./src/components/Counter.vue')['default']
Footer: typeof import('./src/components/Footer.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Expand Down
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@nhost-examples/vue-quickstart",
"version": "0.0.2",
"private": true,
"scripts": {
"build": "vite build",
Expand All @@ -10,34 +11,34 @@
"test": "vitest"
},
"dependencies": {
"@apollo/client": "^3.6.2",
"@nhost/apollo": "^0.5.4",
"@apollo/client": "^3.6.9",
"@nhost/apollo": "*",
"@nhost/vue": "*",
"@vue/apollo-composable": "^4.0.0-alpha.17",
"@vueuse/core": "^8.4.2",
"graphql": "^15.7.2",
"@vue/apollo-composable": "4.0.0-alpha.18",
"@vueuse/core": "^8.9.4",
"graphql": "15.7.2",
"graphql-tag": "^2.12.6",
"vue": "^3.2.33",
"vue-router": "^4.0.15"
"vue": "^3.2.38",
"vue-router": "^4.1.5"
},
"devDependencies": {
"@antfu/eslint-config": "^0.23.0",
"@iconify-json/carbon": "^1.1.4",
"@types/node": "^17.0.32",
"@unocss/reset": "^0.33.2",
"@vitejs/plugin-vue": "^2.3.2",
"@vue/test-utils": "^2.0.0-rc.21",
"eslint": "^8.15.0",
"@antfu/eslint-config": "^0.23.1",
"@iconify-json/carbon": "^1.1.7",
"@types/node": "^17.0.45",
"@unocss/reset": "^0.33.5",
"@vitejs/plugin-vue": "^2.3.4",
"@vue/test-utils": "^2.0.2",
"eslint": "^8.23.0",
"jsdom": "^19.0.0",
"pnpm": "^7.0.1",
"typescript": "^4.6.4",
"unocss": "^0.33.2",
"unplugin-auto-import": "^0.7.1",
"unplugin-vue-components": "^0.19.5",
"vite": "^2.9.8",
"pnpm": "^7.9.1",
"typescript": "^4.8.2",
"unocss": "^0.33.5",
"unplugin-auto-import": "^0.7.2",
"unplugin-vue-components": "^0.19.9",
"vite": "^2.9.15",
"vite-plugin-pages": "^0.23.0",
"vitest": "^0.12.4",
"vue-tsc": "^0.34.12"
"vue-tsc": "^0.38.9"
},
"eslintConfig": {
"extends": "@antfu"
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import './styles/main.css'
import 'uno.css'

const nhost = new NhostClient({
backendUrl: import.meta.env.VITE_NHOST_URL
subdomain: import.meta.env.VITE_NHOST_SUBDOMAIN,
region: import.meta.env.VITE_NHOST_REGION
})

const app = createApp(App)
Expand Down
22 changes: 0 additions & 22 deletions test/component.test.ts

This file was deleted.