Skip to content

Commit

Permalink
feat: allow custom base url configuration for dev work, do not use re…
Browse files Browse the repository at this point in the history
…placeAll as it breaks the extension
  • Loading branch information
michelkaporin committed Aug 13, 2021
1 parent dd9e32f commit e52fea9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/snyk/common/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export class Configuration implements IConfiguration {
}

get baseURL(): string {
return this.isDevelopment ? 'https://deeproxy.dev.snyk.io' : this.defaultBaseURL;
if (this.isDevelopment) {
return process.env.SNYK_VSCE_DEVELOPMENT_SNYKCODE_BASE_URL ?? 'https://deeproxy.dev.snyk.io';
}

return this.defaultBaseURL;
}

get authHost(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/snyk/common/constants/general.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Changing this requires changing display name in package.json.
export const SNYK_NAME = 'Snyk Vulnerability Scanner';
export const SNYK_NAME_EXTENSION = SNYK_NAME.toLowerCase().replaceAll(' ', '-');
export const SNYK_PUBLISHER = 'snyk-security';
export const SNYK_NAME_EXTENSION = SNYK_NAME.toLowerCase().replace(/\s/g, '-');
export const MAX_CONNECTION_RETRIES = 5; // max number of automatic retries before showing an error
export const IDE_NAME = 'vscode';
export const COMMAND_DEBOUNCE_INTERVAL = 200; // 200 milliseconds
Expand Down

0 comments on commit e52fea9

Please sign in to comment.