@hadoku/resume-bot 3.15.89 → 3.15.91
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/worker.js +8 -2
- package/package.json +3 -3
package/dist/worker.js
CHANGED
|
@@ -14863,12 +14863,18 @@ function requireMinTier(minTier, options = {}) {
|
|
|
14863
14863
|
errorStatus = 403
|
|
14864
14864
|
} = options;
|
|
14865
14865
|
return async (c, next) => {
|
|
14866
|
-
|
|
14867
|
-
|
|
14866
|
+
const auth = getAuthContext(c, contextKey);
|
|
14867
|
+
if (!tierAtLeast(auth, minTier)) {
|
|
14868
|
+
const code = needsVerification(auth?.userType, minTier) ? MEMBER_NOT_VERIFIED : void 0;
|
|
14869
|
+
return c.json({ error: errorMessage, ...code ? { code } : {} }, errorStatus);
|
|
14868
14870
|
}
|
|
14869
14871
|
await next();
|
|
14870
14872
|
};
|
|
14871
14873
|
}
|
|
14874
|
+
var MEMBER_NOT_VERIFIED = "MEMBER_NOT_VERIFIED";
|
|
14875
|
+
function needsVerification(callerTier, required2) {
|
|
14876
|
+
return callerTier === "guest" && required2 === "member";
|
|
14877
|
+
}
|
|
14872
14878
|
var TIERS = new Set(Object.keys(TIER_RANK));
|
|
14873
14879
|
function timingSafeEqual(a, b) {
|
|
14874
14880
|
if (a.length !== b.length) return false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/resume-bot",
|
|
3
|
-
"version": "3.15.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "3.15.91",
|
|
4
|
+
"gitHead": "d856e889dcce7388247a4c0f3c52aa969f210c4d",
|
|
5
5
|
"description": "AI-powered conversational interface for interactive resume exploration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.30",
|
|
38
|
-
"@wolffm/worker-utils": "npm:@hadoku/worker-utils@^1.7.
|
|
38
|
+
"@wolffm/worker-utils": "npm:@hadoku/worker-utils@^1.7.28",
|
|
39
39
|
"hono": "^4.11.4",
|
|
40
40
|
"openai": "^6.21.0",
|
|
41
41
|
"pdf-lib": "^1.17.1",
|