@theholocron/holocron-plugin-clerk 5.0.0-alpha.560 → 5.0.0-alpha.561

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.d.mts CHANGED
@@ -68,6 +68,7 @@ export declare function createPlugin(options?: ClerkPluginOptions): {
68
68
  probes: {
69
69
  connection: import("@theholocron/cli").Probe;
70
70
  };
71
+ whoami: import("@theholocron/cli").ProviderAction;
71
72
  capabilities: {
72
73
  auth: () => Auth;
73
74
  };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { AuthError, ProviderApiError, WebhookVerificationError, connectionProbe, createResolveToken } from "@theholocron/cli";
1
+ import { AuthError, ProviderApiError, WebhookVerificationError, connectionProbe, createResolveToken, whoamiAction } from "@theholocron/cli";
2
2
  import { createClerkClient } from "@theholocron/clerk-client";
3
3
  import { errorMessage } from "@theholocron/misc-utils";
4
4
  import { createHmac, timingSafeEqual } from "node:crypto";
@@ -229,6 +229,15 @@ function createPlugin(options = {}) {
229
229
  fetch: options.fetch
230
230
  })
231
231
  }) },
232
+ whoami: whoamiAction({
233
+ provider: "clerk",
234
+ token: () => resolveToken(options),
235
+ verify: (token) => verifyToken(token, {
236
+ baseUrl: options.baseUrl,
237
+ fetch: options.fetch
238
+ }),
239
+ tokens
240
+ }),
232
241
  capabilities: { auth: () => auth(ctx) }
233
242
  };
234
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-clerk",
3
- "version": "5.0.0-alpha.560",
3
+ "version": "5.0.0-alpha.561",
4
4
  "description": "Holocron plugin for Clerk. Implements the auth capability against Clerk's Backend REST API.",
5
5
  "keywords": [
6
6
  "auth",
@@ -40,10 +40,10 @@
40
40
  "tsx": "4.23.15",
41
41
  "typescript": "^6.0.3",
42
42
  "vitest": "^5.1.1",
43
- "@theholocron/clerk-client": "^1.58.0-alpha.61",
44
- "@theholocron/cli": "5.0.0-alpha.560",
43
+ "@theholocron/clerk-client": "^1.58.0-alpha.62",
44
+ "@theholocron/cli": "5.0.0-alpha.561",
45
45
  "@theholocron/eslint-config": "^8.9.0-alpha.24",
46
- "@theholocron/http-client": "^1.58.0-alpha.61",
46
+ "@theholocron/http-client": "^1.58.0-alpha.62",
47
47
  "@theholocron/misc-utils": "^1.17.0-alpha.8",
48
48
  "@theholocron/tsconfig": "^8.9.0-alpha.24",
49
49
  "@theholocron/tsdown-config": "^8.9.0-alpha.24",
@@ -52,7 +52,7 @@
52
52
  "peerDependencies": {
53
53
  "@theholocron/clerk-client": "^1.43.1",
54
54
  "@theholocron/misc-utils": "^1.16.0",
55
- "@theholocron/cli": "5.0.0-alpha.560"
55
+ "@theholocron/cli": "5.0.0-alpha.561"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=22"