File tree Expand file tree Collapse file tree 7 files changed +771
-114
lines changed Expand file tree Collapse file tree 7 files changed +771
-114
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ parserOptions : {
3
+ ecmaVersion : 2017 ,
4
+ sourceType : "module" ,
5
+ } ,
6
+ env : {
7
+ es6 : true ,
8
+ } ,
9
+ extends : [ "prettier" ] ,
10
+ plugins : [ "prettier" ] ,
11
+ rules : {
12
+ "prettier/prettier" : [ "error" ] ,
13
+ } ,
14
+ } ;
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ trailingComma : "es5" ,
3
+ arrowParens : "avoid" ,
4
+ } ;
Original file line number Diff line number Diff line change 1
- import { SupabaseClient } from '@supabase/supabase-js'
1
+ import {
2
+ SupabaseClient ,
3
+ SupabaseClientOptions ,
4
+ Session ,
5
+ User ,
6
+ useSupabase ,
7
+ useSupabaseAuth ,
8
+ useSupabaseStorage ,
9
+ } from "vue-supabase" ;
2
10
3
- declare module 'vue/types/vue' {
4
- interface Vue {
5
- $supabase : SupabaseClient
6
- }
7
- }
8
-
9
- declare module '@nuxt/types' {
11
+ declare module "@nuxt/types" {
10
12
interface Context {
11
- $supabase : SupabaseClient
13
+ $supabase : SupabaseClient ;
12
14
}
13
15
}
14
16
15
- declare module ' vuex' {
16
- interface Store < S > {
17
- $supabase : SupabaseClient
17
+ declare module " vuex" {
18
+ interface Store {
19
+ $supabase : SupabaseClient ;
18
20
}
19
21
}
22
+
23
+ export {
24
+ SupabaseClient ,
25
+ SupabaseClientOptions ,
26
+ Session ,
27
+ User ,
28
+ useSupabase ,
29
+ useSupabaseAuth ,
30
+ useSupabaseStorage ,
31
+ } ;
Original file line number Diff line number Diff line change 1
- const path = require ( ' path' )
1
+ const path = require ( " path" ) ;
2
2
3
3
export default function ( options ) {
4
4
this . addPlugin ( {
5
- src : path . resolve ( __dirname , ' plugin.js' ) ,
6
- fileName : ' supabase.js' ,
5
+ src : path . resolve ( __dirname , " plugin.js" ) ,
6
+ fileName : " supabase.js" ,
7
7
options,
8
- } )
8
+ } ) ;
9
9
}
10
10
11
- module . exports . meta = require ( ' ./package.json' )
11
+ module . exports . meta = require ( " ./package.json" ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nuxt-supabase" ,
3
- "version" : " 2.1 .0" ,
3
+ "version" : " 2.2 .0" ,
4
4
"description" : " A supa simple Nuxt Module for Supabase" ,
5
5
"main" : " index.js" ,
6
6
"author" : " Scott Robertson" ,
25
25
},
26
26
"homepage" : " https://github.com/scottrobertson/nuxt-supabase#readme" ,
27
27
"dependencies" : {
28
- "@supabase/supabase-js" : " ^1.21.1" ,
29
28
"@vue/composition-api" : " ^1.0.4" ,
30
- "vue-supabase" : " ^2.2.1"
29
+ "vue-supabase" : " ^2.2.3"
30
+ },
31
+ "devDependencies" : {
32
+ "eslint" : " ^8.1.0" ,
33
+ "eslint-config-prettier" : " ^8.3.0" ,
34
+ "eslint-plugin-prettier" : " ^4.0.0" ,
35
+ "prettier" : " ^2.4.1"
31
36
}
32
37
}
Original file line number Diff line number Diff line change 1
- import Vue from 'vue'
2
- import VueSupabase from 'vue-supabase'
1
+ import Vue from "vue" ;
2
+ import { createVueSupabase } from "vue-supabase" ;
3
+ const supabase = createVueSupabase ( {
4
+ supabaseUrl : "<%= options.supabaseUrl %>" ,
5
+ supabaseKey : "<%= options.supabaseKey %>" ,
6
+ } ) ;
3
7
4
- Vue . use ( VueSupabase , {
5
- supabaseUrl : '<%= options.supabaseUrl %>' ,
6
- supabaseKey : '<%= options.supabaseKey %>'
7
- } )
8
+ Vue . use ( supabase ) ;
8
9
9
10
// Inject Supabase into Nuxt Context
10
11
export default ( ctx , inject ) => {
11
- inject ( 'supabase' , Vue . supabase )
12
- }
12
+ ctx . $supabase = supabase ;
13
+ inject ( "supabase" , supabase ) ;
14
+ } ;
You can’t perform that action at this time.
0 commit comments