@vercel/oidc 3.0.3 → 3.0.5
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/CHANGELOG.md +12 -0
- package/dist/index-browser.test.js +2 -2
- package/dist/token-util.js +2 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/oidc
|
|
2
2
|
|
|
3
|
+
## 3.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix OIDC token expiry check ([#14306](https://github.com/vercel/vercel/pull/14306))
|
|
8
|
+
|
|
9
|
+
## 3.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix directory permissions so that files can be created under the OIDC data directory in linux ([#14214](https://github.com/vercel/vercel/pull/14214))
|
|
14
|
+
|
|
3
15
|
## 3.0.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -26,8 +26,8 @@ var DefaultImports = __toESM(require("./index"));
|
|
|
26
26
|
var BrowserImports = __toESM(require("./index-browser"));
|
|
27
27
|
(0, import_vitest.describe)("browser export", () => {
|
|
28
28
|
(0, import_vitest.test)("should match the default export", async () => {
|
|
29
|
-
(0, import_vitest.expect)(Object.keys(BrowserImports)).toStrictEqual(
|
|
30
|
-
Object.keys(DefaultImports)
|
|
29
|
+
(0, import_vitest.expect)(Object.keys(BrowserImports).sort()).toStrictEqual(
|
|
30
|
+
Object.keys(DefaultImports).sort()
|
|
31
31
|
);
|
|
32
32
|
});
|
|
33
33
|
});
|
package/dist/token-util.js
CHANGED
|
@@ -122,7 +122,7 @@ function saveToken(token, projectId) {
|
|
|
122
122
|
}
|
|
123
123
|
const tokenPath = path.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
124
124
|
const tokenJson = JSON.stringify(token);
|
|
125
|
-
fs.mkdirSync(path.dirname(tokenPath), { mode:
|
|
125
|
+
fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });
|
|
126
126
|
fs.writeFileSync(tokenPath, tokenJson);
|
|
127
127
|
fs.chmodSync(tokenPath, 432);
|
|
128
128
|
return;
|
|
@@ -159,9 +159,8 @@ function getTokenPayload(token) {
|
|
|
159
159
|
);
|
|
160
160
|
return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
|
|
161
161
|
}
|
|
162
|
-
const TIME_15_MINUTES_IN_MS = 15 * 60 * 1e3;
|
|
163
162
|
function isExpired(token) {
|
|
164
|
-
return token.exp * 1e3 < Date.now()
|
|
163
|
+
return token.exp * 1e3 < Date.now();
|
|
165
164
|
}
|
|
166
165
|
// Annotate the CommonJS export names for ESM import in node:
|
|
167
166
|
0 && (module.exports = {
|