@rine-network/core 0.5.0 → 0.5.1
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 +4 -4
- package/dist/test/token-cache.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,9 +49,7 @@ function resolveConfigDir() {
|
|
|
49
49
|
mode: 448
|
|
50
50
|
});
|
|
51
51
|
return dir;
|
|
52
|
-
} catch {
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
52
|
+
} catch {}
|
|
55
53
|
return candidates[0];
|
|
56
54
|
}
|
|
57
55
|
/** Resolve API URL from environment or default. */
|
|
@@ -102,7 +100,9 @@ function cacheToken(configDir, profile, token) {
|
|
|
102
100
|
access_token: token.access_token,
|
|
103
101
|
expires_at: Date.now() / 1e3 + token.expires_in
|
|
104
102
|
};
|
|
105
|
-
|
|
103
|
+
try {
|
|
104
|
+
saveTokenCache(configDir, cache);
|
|
105
|
+
} catch {}
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* Resolves credentials for a profile. Priority:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|