@nocios/crudify-ui 1.2.34 → 1.2.36
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 +6 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3699,12 +3699,18 @@ var useCrudifyInstance = () => {
|
|
|
3699
3699
|
}
|
|
3700
3700
|
}, [isReady, waitForReady]);
|
|
3701
3701
|
const ensureTokenSync = (0, import_react15.useCallback)(async () => {
|
|
3702
|
+
console.log("\u{1F504} useCrudifyInstance - ensureTokenSync: Starting token sync check");
|
|
3702
3703
|
const { tokenManager: tokenManager2 } = await Promise.resolve().then(() => (init_TokenManager(), TokenManager_exports));
|
|
3703
3704
|
const tmToken = tokenManager2.getToken();
|
|
3704
3705
|
const crudifyToken = import_crudify_browser7.default.getToken?.();
|
|
3706
|
+
console.log(" - TokenManager token in sync check:", tmToken ? `${tmToken.substring(0, 20)}...` : "null");
|
|
3707
|
+
console.log(" - crudify token in sync check:", crudifyToken ? `${crudifyToken.substring(0, 20)}...` : "null");
|
|
3705
3708
|
if (tmToken && tmToken !== crudifyToken) {
|
|
3706
3709
|
console.log("\u{1F504} useCrudifyInstance - Forcing token sync for authenticated operation");
|
|
3707
3710
|
import_crudify_browser7.default.setToken(tmToken);
|
|
3711
|
+
console.log(" - crudify token after sync:", import_crudify_browser7.default.getToken?.() ? `${import_crudify_browser7.default.getToken?.()?.substring(0, 20)}...` : "null");
|
|
3712
|
+
} else {
|
|
3713
|
+
console.log("\u{1F504} useCrudifyInstance - No token sync needed, tokens match or no token");
|
|
3708
3714
|
}
|
|
3709
3715
|
}, []);
|
|
3710
3716
|
const getStructure = (0, import_react15.useCallback)(async (options) => {
|
package/dist/index.mjs
CHANGED
|
@@ -2411,12 +2411,18 @@ var useCrudifyInstance = () => {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
}, [isReady, waitForReady]);
|
|
2413
2413
|
const ensureTokenSync = useCallback4(async () => {
|
|
2414
|
+
console.log("\u{1F504} useCrudifyInstance - ensureTokenSync: Starting token sync check");
|
|
2414
2415
|
const { tokenManager: tokenManager2 } = await import("./TokenManager-AYUNIXQU.mjs");
|
|
2415
2416
|
const tmToken = tokenManager2.getToken();
|
|
2416
2417
|
const crudifyToken = crudify5.getToken?.();
|
|
2418
|
+
console.log(" - TokenManager token in sync check:", tmToken ? `${tmToken.substring(0, 20)}...` : "null");
|
|
2419
|
+
console.log(" - crudify token in sync check:", crudifyToken ? `${crudifyToken.substring(0, 20)}...` : "null");
|
|
2417
2420
|
if (tmToken && tmToken !== crudifyToken) {
|
|
2418
2421
|
console.log("\u{1F504} useCrudifyInstance - Forcing token sync for authenticated operation");
|
|
2419
2422
|
crudify5.setToken(tmToken);
|
|
2423
|
+
console.log(" - crudify token after sync:", crudify5.getToken?.() ? `${crudify5.getToken?.()?.substring(0, 20)}...` : "null");
|
|
2424
|
+
} else {
|
|
2425
|
+
console.log("\u{1F504} useCrudifyInstance - No token sync needed, tokens match or no token");
|
|
2420
2426
|
}
|
|
2421
2427
|
}, []);
|
|
2422
2428
|
const getStructure = useCallback4(async (options) => {
|