@kya-os/agentshield-nextjs 0.1.48 → 0.2.0
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/api-client.d.mts +4 -3
- package/dist/api-client.d.ts +4 -3
- package/dist/api-client.js +3 -2
- package/dist/api-client.js.map +1 -1
- package/dist/api-client.mjs +3 -2
- package/dist/api-client.mjs.map +1 -1
- package/dist/api-middleware.d.mts +5 -3
- package/dist/api-middleware.d.ts +5 -3
- package/dist/api-middleware.js +3 -2
- package/dist/api-middleware.js.map +1 -1
- package/dist/api-middleware.mjs +3 -2
- package/dist/api-middleware.mjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2003,7 +2003,7 @@ var AgentShieldClient = class {
|
|
|
2003
2003
|
throw new Error("AgentShield API key is required");
|
|
2004
2004
|
}
|
|
2005
2005
|
this.apiKey = config.apiKey;
|
|
2006
|
-
this.useEdge = config.useEdge
|
|
2006
|
+
this.useEdge = config.useEdge !== false;
|
|
2007
2007
|
this.baseUrl = config.baseUrl || (this.useEdge ? EDGE_DETECT_URL : DEFAULT_BASE_URL);
|
|
2008
2008
|
this.timeout = config.timeout || DEFAULT_TIMEOUT;
|
|
2009
2009
|
this.debug = config.debug || false;
|
|
@@ -2105,7 +2105,8 @@ function getAgentShieldClient(config) {
|
|
|
2105
2105
|
clientInstance = new AgentShieldClient({
|
|
2106
2106
|
apiKey,
|
|
2107
2107
|
baseUrl: config?.baseUrl || process.env.AGENTSHIELD_API_URL,
|
|
2108
|
-
|
|
2108
|
+
// Default to edge detection unless explicitly disabled
|
|
2109
|
+
useEdge: config?.useEdge ?? process.env.AGENTSHIELD_USE_EDGE !== "false",
|
|
2109
2110
|
timeout: config?.timeout,
|
|
2110
2111
|
debug: config?.debug || process.env.AGENTSHIELD_DEBUG === "true"
|
|
2111
2112
|
});
|