Skip to content

Commit d2943ac

Browse files
hiskudinclaude
andcommitted
feat: warn when defender config is omitted at construction time
SDK defaults will override project-level defender settings when no explicit defender config is passed. A console.warn nudges users to either pass an explicit config or opt into useProjectSettings: true. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f3f21e9 commit d2943ac

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/toolsets.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@ export class StackOneToolSet {
346346
}
347347
}
348348
this.defenderConfig = defenderInput === undefined ? DEFAULT_DEFENDER_CONFIG : defenderInput;
349+
if (defenderInput === undefined) {
350+
console.warn(
351+
'[StackOneToolSet] No defender config provided. SDK defaults are active and will override any ' +
352+
'project-level defender settings. To use your project settings, pass ' +
353+
'`defender: { useProjectSettings: true }`. To suppress this warning, pass an explicit ' +
354+
'`defender` config.',
355+
);
356+
}
349357

350358
// Set Authentication headers if provided
351359
if (this.authentication) {

0 commit comments

Comments
 (0)