@geexcode/geex-angular 0.0.21 → 0.0.23
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/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -153,8 +153,12 @@ function createAuthModule(injector) {
|
|
|
153
153
|
const user = (0, import_core.signal)(null);
|
|
154
154
|
const module2 = {
|
|
155
155
|
init: async () => {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
try {
|
|
157
|
+
let userData = await module2.loadUserData();
|
|
158
|
+
user.set(userData ?? null);
|
|
159
|
+
} catch (err) {
|
|
160
|
+
console.error(err);
|
|
161
|
+
}
|
|
158
162
|
},
|
|
159
163
|
user,
|
|
160
164
|
async loadUserData() {
|
|
@@ -172,7 +176,7 @@ function createAuthModule(injector) {
|
|
|
172
176
|
code: oAuthService.getAccessToken(),
|
|
173
177
|
loginProvider: profile.login_provider
|
|
174
178
|
}
|
|
175
|
-
}).pipe((0, import_rxjs.map)((res) => res?.data?.federateAuthenticate)));
|
|
179
|
+
}).pipe((0, import_rxjs.map)((res) => res?.data?.federateAuthenticate.user)));
|
|
176
180
|
return result;
|
|
177
181
|
}
|
|
178
182
|
} catch (err) {
|
|
@@ -258,7 +262,11 @@ function configGeex(injector, overrides) {
|
|
|
258
262
|
entries.map(async ([, mod]) => {
|
|
259
263
|
const maybeInit = mod.init;
|
|
260
264
|
if (typeof maybeInit === "function") {
|
|
261
|
-
|
|
265
|
+
try {
|
|
266
|
+
await maybeInit();
|
|
267
|
+
} catch (err) {
|
|
268
|
+
console.error(err);
|
|
269
|
+
}
|
|
262
270
|
}
|
|
263
271
|
})
|
|
264
272
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -108,8 +108,12 @@ function createAuthModule(injector) {
|
|
|
108
108
|
const user = signal(null);
|
|
109
109
|
const module = {
|
|
110
110
|
init: async () => {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
try {
|
|
112
|
+
let userData = await module.loadUserData();
|
|
113
|
+
user.set(userData ?? null);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
console.error(err);
|
|
116
|
+
}
|
|
113
117
|
},
|
|
114
118
|
user,
|
|
115
119
|
async loadUserData() {
|
|
@@ -127,7 +131,7 @@ function createAuthModule(injector) {
|
|
|
127
131
|
code: oAuthService.getAccessToken(),
|
|
128
132
|
loginProvider: profile.login_provider
|
|
129
133
|
}
|
|
130
|
-
}).pipe(map((res) => res?.data?.federateAuthenticate)));
|
|
134
|
+
}).pipe(map((res) => res?.data?.federateAuthenticate.user)));
|
|
131
135
|
return result;
|
|
132
136
|
}
|
|
133
137
|
} catch (err) {
|
|
@@ -213,7 +217,11 @@ function configGeex(injector, overrides) {
|
|
|
213
217
|
entries.map(async ([, mod]) => {
|
|
214
218
|
const maybeInit = mod.init;
|
|
215
219
|
if (typeof maybeInit === "function") {
|
|
216
|
-
|
|
220
|
+
try {
|
|
221
|
+
await maybeInit();
|
|
222
|
+
} catch (err) {
|
|
223
|
+
console.error(err);
|
|
224
|
+
}
|
|
217
225
|
}
|
|
218
226
|
})
|
|
219
227
|
);
|