@thzero/library_client_firebase 0.16.5 → 0.16.7

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/README.md CHANGED
@@ -4,16 +4,15 @@
4
4
 
5
5
  # library_client_firebase
6
6
 
7
- ## Installation
7
+ ## Requirements
8
8
 
9
- [![NPM](https://nodei.co/npm/@thzero/library_client_firebase.png?compact=true)](https://npmjs.org/package/@thzero/library_client_firebase)
9
+ ### NodeJs
10
10
 
11
- ### Requirements
11
+ [NodeJs](https://nodejs.org) version 18+
12
12
 
13
- #### Packages
13
+ ## Installation
14
14
 
15
- * [![NPM](https://nodei.co/npm/@thzero/library_common.png?compact=true)](https://npmjs.org/package/@thzero/library_common)
16
- * [![NPM](https://nodei.co/npm/@thzero/library_client.png?compact=true)](https://npmjs.org/package/@thzero/library_client)
15
+ [![NPM](https://nodei.co/npm/@thzero/library_client_firebase.png?compact=true)](https://npmjs.org/package/@thzero/library_client_firebase)
17
16
 
18
17
  ## Configuration
19
18
 
package/boot/starter.js CHANGED
@@ -10,7 +10,7 @@ import config from 'local-config';
10
10
 
11
11
  // export default async ({
12
12
  export default ({
13
- router
13
+ setup
14
14
  }) => {
15
15
  const configExternal = config.external;
16
16
  if (!configExternal)
@@ -90,67 +90,68 @@ export default ({
90
90
  // }
91
91
  // })
92
92
 
93
- router.beforeResolve((to, from, next) => {
94
- const auth = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_AUTH);
95
- const logger = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_LOGGER);
96
- logger.debug('router.beforeResolve', to);
97
- if (to.matched.some(record => record.meta.requiresAuth)) {
98
- const isLoggedIn = auth.isAuthenticated;
99
- if (!isLoggedIn) {
100
- // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
101
- // logger.debug('auth-refresh', user)
102
- // next()
103
- // })
104
- // return
105
- GlobalUtility.$navRouter.push('/', null, () => {
106
- // GlobalUtility.$navRouter.push('/')
107
- // window.location.href = '/'
108
- });
109
- return;
110
- }
111
-
112
- next();
113
-
114
- // eslint-disable-next-line no-unused-vars
115
- // auth.isAuthenticated().then(async (data) => {
116
- // logger.debug('router.beforeResolve.matched')
117
-
118
- // //const isLoggedIn = GlobalUtility.$store.state.user.isLoggedIn
119
- // const isLoggedIn = await auth.isAuthenticated()
120
- // if (!isLoggedIn) {
121
- // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
122
- // logger.debug('auth-refresh', user)
123
- // next()
124
- // })
125
- // return
126
- // }
127
-
128
- // // if (GlobalUtility.$store.state.user.token) {
129
- // // next()
130
- // // return
131
- // // }
132
-
133
- // // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
134
- // // logger.debug('auth-refresh', user)
135
- // // next()
136
- // // })
137
-
138
- // next()
139
- // }).catch((e) => {
140
- // logger.error('router.beforeResolve.error', e)
141
- // logger.error('to', to)
142
- // logger.error('from', from)
143
- // if (to.name == 'auth') {
144
- // next()
145
- // return
146
- // }
147
- // next({ path: '/auth' })
148
- // })
149
-
150
- return;
151
- }
152
- next();
153
- });
93
+ setup();
94
+ // router.beforeResolve((to, from, next) => {
95
+ // const auth = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_AUTH);
96
+ // const logger = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_LOGGER);
97
+ // logger.debug('router.beforeResolve', to);
98
+ // if (to.matched.some(record => record.meta.requiresAuth)) {
99
+ // const isLoggedIn = auth.isAuthenticated;
100
+ // if (!isLoggedIn) {
101
+ // // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
102
+ // // logger.debug('auth-refresh', user)
103
+ // // next()
104
+ // // })
105
+ // // return
106
+ // GlobalUtility.$navRouter.push('/', null, () => {
107
+ // // GlobalUtility.$navRouter.push('/')
108
+ // // window.location.href = '/'
109
+ // });
110
+ // return;
111
+ // }
112
+
113
+ // next();
114
+
115
+ // // eslint-disable-next-line no-unused-vars
116
+ // // auth.isAuthenticated().then(async (data) => {
117
+ // // logger.debug('router.beforeResolve.matched')
118
+
119
+ // // //const isLoggedIn = GlobalUtility.$store.state.user.isLoggedIn
120
+ // // const isLoggedIn = await auth.isAuthenticated()
121
+ // // if (!isLoggedIn) {
122
+ // // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
123
+ // // logger.debug('auth-refresh', user)
124
+ // // next()
125
+ // // })
126
+ // // return
127
+ // // }
128
+
129
+ // // // if (GlobalUtility.$store.state.user.token) {
130
+ // // // next()
131
+ // // // return
132
+ // // // }
133
+
134
+ // // // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
135
+ // // // logger.debug('auth-refresh', user)
136
+ // // // next()
137
+ // // // })
138
+
139
+ // // next()
140
+ // // }).catch((e) => {
141
+ // // logger.error('router.beforeResolve.error', e)
142
+ // // logger.error('to', to)
143
+ // // logger.error('from', from)
144
+ // // if (to.name == 'auth') {
145
+ // // next()
146
+ // // return
147
+ // // }
148
+ // // next({ path: '/auth' })
149
+ // // })
150
+
151
+ // return;
152
+ // }
153
+ // next();
154
+ // });
154
155
 
155
156
  return promiseAuth;
156
157
  };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@thzero/library_client_firebase",
3
- "version": "0.16.5",
3
+ "version": "0.16.7",
4
4
  "version_major": 0,
5
5
  "version_minor": 16,
6
- "version_patch": 5,
7
- "version_date": "11/25/2022",
6
+ "version_patch": 7,
7
+ "version_date": "12/06/2022",
8
8
  "author": "thZero",
9
9
  "license": "MIT",
10
10
  "repository": {