@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.js
CHANGED
|
@@ -1344,7 +1344,7 @@ var M2MToken = class _M2MToken {
|
|
|
1344
1344
|
// src/constants.ts
|
|
1345
1345
|
var API_URL = "https://api.clerk.com";
|
|
1346
1346
|
var API_VERSION = "v1";
|
|
1347
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2
|
|
1347
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2"}`;
|
|
1348
1348
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
1349
1349
|
var SUPPORTED_BAPI_VERSION = "2025-11-10";
|
|
1350
1350
|
var Attributes = {
|
|
@@ -4885,6 +4885,7 @@ function mergePreDefinedOptions(preDefinedOptions, options) {
|
|
|
4885
4885
|
|
|
4886
4886
|
// src/tokens/authenticateContext.ts
|
|
4887
4887
|
var import_buildAccountsBaseUrl = require("@clerk/shared/buildAccountsBaseUrl");
|
|
4888
|
+
var import_proxy = require("@clerk/shared/proxy");
|
|
4888
4889
|
var import_url2 = require("@clerk/shared/url");
|
|
4889
4890
|
var AuthenticateContext = class {
|
|
4890
4891
|
constructor(cookieSuffix, clerkRequest, options) {
|
|
@@ -4895,6 +4896,14 @@ var AuthenticateContext = class {
|
|
|
4895
4896
|
* Used for backend operations like token validation and issuer checking.
|
|
4896
4897
|
*/
|
|
4897
4898
|
this.originalFrontendApi = "";
|
|
4899
|
+
const autoProxyPath = (0, import_proxy.getAutoProxyUrlFromEnvironment)({
|
|
4900
|
+
publishableKey: options.publishableKey ?? "",
|
|
4901
|
+
hasProxyUrl: !!options.proxyUrl,
|
|
4902
|
+
hasDomain: !!options.domain
|
|
4903
|
+
});
|
|
4904
|
+
if (autoProxyPath) {
|
|
4905
|
+
options = { ...options, proxyUrl: `${clerkRequest.clerkUrl.origin}${autoProxyPath}` };
|
|
4906
|
+
}
|
|
4898
4907
|
if (options.acceptsToken === TokenType.M2MToken || options.acceptsToken === TokenType.ApiKey) {
|
|
4899
4908
|
this.initHeaderValues();
|
|
4900
4909
|
} else {
|
|
@@ -5134,7 +5143,20 @@ var createClerkUrl = (...args) => {
|
|
|
5134
5143
|
var ClerkRequest = class extends Request {
|
|
5135
5144
|
constructor(input, init) {
|
|
5136
5145
|
const url = typeof input !== "string" && "url" in input ? input.url : String(input);
|
|
5137
|
-
|
|
5146
|
+
let cloneInit;
|
|
5147
|
+
if (init) {
|
|
5148
|
+
cloneInit = init;
|
|
5149
|
+
} else if (typeof input !== "string") {
|
|
5150
|
+
cloneInit = new Proxy(input, {
|
|
5151
|
+
get(target, prop) {
|
|
5152
|
+
if (prop === "signal") {
|
|
5153
|
+
return void 0;
|
|
5154
|
+
}
|
|
5155
|
+
return Reflect.get(target, prop, target);
|
|
5156
|
+
}
|
|
5157
|
+
});
|
|
5158
|
+
}
|
|
5159
|
+
super(url, cloneInit);
|
|
5138
5160
|
this.clerkUrl = this.deriveUrlFromHeaders(this);
|
|
5139
5161
|
this.cookies = this.parseCookies(this);
|
|
5140
5162
|
}
|