@clerk/backend 3.4.2-snapshot.v20260429150611 → 3.4.2
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/{chunk-TYMAXIGL.mjs → chunk-EFHKSFRG.mjs} +25 -3
- package/dist/chunk-EFHKSFRG.mjs.map +1 -0
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +24 -2
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +1 -2
- package/dist/proxy.js.map +1 -1
- package/dist/proxy.mjs +1 -2
- package/dist/proxy.mjs.map +1 -1
- package/dist/tokens/authenticateContext.d.ts.map +1 -1
- package/dist/tokens/clerkRequest.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-TYMAXIGL.mjs.map +0 -1
package/dist/index.mjs
CHANGED
package/dist/internal.js
CHANGED
|
@@ -230,7 +230,7 @@ module.exports = __toCommonJS(internal_exports);
|
|
|
230
230
|
// src/constants.ts
|
|
231
231
|
var API_URL = "https://api.clerk.com";
|
|
232
232
|
var API_VERSION = "v1";
|
|
233
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2
|
|
233
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2"}`;
|
|
234
234
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
235
235
|
var SUPPORTED_BAPI_VERSION = "2025-11-10";
|
|
236
236
|
var Attributes = {
|
|
@@ -887,6 +887,7 @@ function assertValidPublishableKey(val) {
|
|
|
887
887
|
|
|
888
888
|
// src/tokens/authenticateContext.ts
|
|
889
889
|
var import_buildAccountsBaseUrl2 = require("@clerk/shared/buildAccountsBaseUrl");
|
|
890
|
+
var import_proxy = require("@clerk/shared/proxy");
|
|
890
891
|
var import_url2 = require("@clerk/shared/url");
|
|
891
892
|
|
|
892
893
|
// src/tokens/tokenTypes.ts
|
|
@@ -907,6 +908,14 @@ var AuthenticateContext = class {
|
|
|
907
908
|
* Used for backend operations like token validation and issuer checking.
|
|
908
909
|
*/
|
|
909
910
|
this.originalFrontendApi = "";
|
|
911
|
+
const autoProxyPath = (0, import_proxy.getAutoProxyUrlFromEnvironment)({
|
|
912
|
+
publishableKey: options.publishableKey ?? "",
|
|
913
|
+
hasProxyUrl: !!options.proxyUrl,
|
|
914
|
+
hasDomain: !!options.domain
|
|
915
|
+
});
|
|
916
|
+
if (autoProxyPath) {
|
|
917
|
+
options = { ...options, proxyUrl: `${clerkRequest.clerkUrl.origin}${autoProxyPath}` };
|
|
918
|
+
}
|
|
910
919
|
if (options.acceptsToken === TokenType.M2MToken || options.acceptsToken === TokenType.ApiKey) {
|
|
911
920
|
this.initHeaderValues();
|
|
912
921
|
} else {
|
|
@@ -5623,7 +5632,20 @@ var createClerkUrl = (...args) => {
|
|
|
5623
5632
|
var ClerkRequest = class extends Request {
|
|
5624
5633
|
constructor(input, init) {
|
|
5625
5634
|
const url = typeof input !== "string" && "url" in input ? input.url : String(input);
|
|
5626
|
-
|
|
5635
|
+
let cloneInit;
|
|
5636
|
+
if (init) {
|
|
5637
|
+
cloneInit = init;
|
|
5638
|
+
} else if (typeof input !== "string") {
|
|
5639
|
+
cloneInit = new Proxy(input, {
|
|
5640
|
+
get(target, prop) {
|
|
5641
|
+
if (prop === "signal") {
|
|
5642
|
+
return void 0;
|
|
5643
|
+
}
|
|
5644
|
+
return Reflect.get(target, prop, target);
|
|
5645
|
+
}
|
|
5646
|
+
});
|
|
5647
|
+
}
|
|
5648
|
+
super(url, cloneInit);
|
|
5627
5649
|
this.clerkUrl = this.deriveUrlFromHeaders(this);
|
|
5628
5650
|
this.cookies = this.parseCookies(this);
|
|
5629
5651
|
}
|