Socket
Socket
Sign inDemoInstall

@snyk/code-client

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snyk/code-client - npm Package Compare versions

Comparing version 4.22.1 to 4.22.2

2

dist/bundles.d.ts

@@ -31,3 +31,3 @@ import { FileInfo, SupportedFiles } from './interfaces/files.interface';

*/
export declare function getSupportedFiles(baseURL: string, source: string, requestId?: string, languages?: string[]): Promise<SupportedFiles>;
export declare function getSupportedFiles(baseURL: string, source: string, requestId?: string, languages?: string[], orgId?: string): Promise<SupportedFiles>;
export interface FileBundle extends RemoteBundle {

@@ -34,0 +34,0 @@ baseDir: string;

@@ -143,5 +143,5 @@ "use strict";

*/
async function getSupportedFiles(baseURL, source, requestId, languages) {
async function getSupportedFiles(baseURL, source, requestId, languages, orgId) {
emitter_1.emitter.supportedFilesLoaded(null);
const resp = await http_1.getFilters(baseURL, source, undefined, requestId);
const resp = await http_1.getFilters(baseURL, source, constants_1.MAX_RETRY_ATTEMPTS, requestId, orgId);
if (resp.type === 'error') {

@@ -176,3 +176,3 @@ throw resp.error;

// Fetch supported files to save network traffic
const supportedFiles = await getSupportedFiles(options.baseURL, options.source, options.requestId, options.languages);
const supportedFiles = await getSupportedFiles(options.baseURL, options.source, options.requestId, options.languages, options.orgId);
// Collect files and create a remote bundle

@@ -179,0 +179,0 @@ return await createBundleWithCustomFiles(options, supportedFiles);

@@ -31,3 +31,3 @@ "use strict";

async function filtersAction(options) {
const response = await bundles_1.getSupportedFiles(options.url, options.source);
const response = await bundles_1.getSupportedFiles(options.url, options.source, undefined, [], options.orgId);
console.log(JSON.stringify(response, null, 2));

@@ -34,0 +34,0 @@ }

@@ -25,2 +25,3 @@ /// <reference types="node" />

org?: string;
orgId?: string;
extraHeaders?: {

@@ -55,3 +56,3 @@ [key: string]: string;

export declare function checkSession(options: CheckSessionOptions): Promise<Result<string, CheckSessionErrorCodes>>;
export declare function getFilters(baseURL: string, source: string, attempts?: number, requestId?: string): Promise<Result<SupportedFiles, GenericErrorTypes>>;
export declare function getFilters(baseURL: string, source: string, attempts?: number, requestId?: string, orgId?: string): Promise<Result<SupportedFiles, GenericErrorTypes>>;
export declare type RemoteBundle = {

@@ -58,0 +59,0 @@ readonly bundleHash: string;

@@ -109,7 +109,7 @@ "use strict";

exports.checkSession = checkSession;
async function getFilters(baseURL, source, attempts = constants_1.MAX_RETRY_ATTEMPTS, requestId) {
async function getFilters(baseURL, source, attempts = constants_1.MAX_RETRY_ATTEMPTS, requestId, orgId) {
const apiName = 'filters';
let url;
try {
url = httpUtils_1.getURL(baseURL, '/' + apiName, '00000000-0000-0000-0000-00000000');
url = httpUtils_1.getURL(baseURL, '/' + apiName, orgId);
}

@@ -151,3 +151,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, '/bundle', options.org);
url = httpUtils_1.getURL(options.baseURL, '/bundle', options.orgId);
}

@@ -184,3 +184,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/bundle/${options.bundleHash}`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/bundle/${options.bundleHash}`, options.orgId);
}

@@ -214,3 +214,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/bundle/${options.bundleHash}`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/bundle/${options.bundleHash}`, options.orgId);
}

@@ -257,3 +257,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, '/analysis', options.org);
url = httpUtils_1.getURL(options.baseURL, '/analysis', options.orgId);
}

@@ -299,3 +299,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/report`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/report`, options.orgId);
}

@@ -340,3 +340,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/report/${options.pollId}`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/report/${options.pollId}`, options.orgId);
}

@@ -365,3 +365,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/test`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/test`, options.orgId);
}

@@ -398,3 +398,3 @@ catch (err) {

try {
url = httpUtils_1.getURL(options.baseURL, `/test/${options.pollId}`, options.org);
url = httpUtils_1.getURL(options.baseURL, `/test/${options.pollId}`, options.orgId);
}

@@ -401,0 +401,0 @@ catch (err) {

@@ -94,3 +94,3 @@ {

},
"version": "4.22.1"
"version": "4.22.2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc