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.19.1 to 4.20.0

24

dist/analysis.js

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

// Ensure requestId is set.
requestId: (_a = connectionOptions.requestId) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
requestId: (_a = connectionOptions.requestId) !== null && _a !== void 0 ? _a : uuid_1.v4(),
};

@@ -38,3 +38,3 @@ }

while (true) {
analysisResponse = await (0, http_1.getAnalysis)(options);
analysisResponse = await http_1.getAnalysis(options);
if (analysisResponse.type === 'error') {

@@ -77,3 +77,3 @@ return analysisResponse;

return Object.entries(files).reduce((obj, [path, positions]) => {
const filePath = (0, files_1.resolveBundleFilePath)(baseDir, path);
const filePath = files_1.resolveBundleFilePath(baseDir, path);
obj[filePath] = positions;

@@ -91,3 +91,3 @@ return obj;

const analysisContext = getAnalysisContext(options.analysisContext);
const fileBundle = await (0, bundles_1.createBundleFromFolders)({
const fileBundle = await bundles_1.createBundleFromFolders({
...connectionOptions,

@@ -103,3 +103,3 @@ ...options.fileOptions,

...options.analysisOptions,
shard: (0, files_1.calcHash)(fileBundle.baseDir),
shard: files_1.calcHash(fileBundle.baseDir),
...analysisContext,

@@ -113,3 +113,3 @@ };

// Analyze and upload bundle results.
const reportRes = await (0, report_1.reportBundle)({
const reportRes = await report_1.reportBundle({
...config,

@@ -222,5 +222,5 @@ report: options.reportOptions,

// expand relative file names to absolute ones only for legacy results
const changedFiles = [...limitToFiles, ...removedFiles].map(path => (0, files_1.resolveBundleFilePath)(baseDir, path));
const changedFiles = [...limitToFiles, ...removedFiles].map(path => files_1.resolveBundleFilePath(baseDir, path));
const files = {
...(0, lodash_omit_1.default)(oldAnalysisResults.files, changedFiles),
...lodash_omit_1.default(oldAnalysisResults.files, changedFiles),
...newFiles,

@@ -235,3 +235,3 @@ };

async function extendAnalysis(options) {
const { files, removedFiles } = await (0, files_1.prepareExtendingBundle)(options.fileBundle.baseDir, options.fileBundle.supportedFiles, options.fileBundle.fileIgnores, options.files, options.fileOptions.symlinksEnabled);
const { files, removedFiles } = await files_1.prepareExtendingBundle(options.fileBundle.baseDir, options.fileBundle.supportedFiles, options.fileBundle.fileIgnores, options.files, options.fileOptions.symlinksEnabled);
if (!files.length && !removedFiles.length) {

@@ -241,3 +241,3 @@ return null; // nothing to extend, just return null

// Extend remote bundle
const remoteBundle = await (0, bundles_1.remoteBundleFactory)({
const remoteBundle = await bundles_1.remoteBundleFactory({
...options.connection,

@@ -260,3 +260,3 @@ bundleHash: options.fileBundle.bundleHash,

...options.analysisOptions,
shard: (0, files_1.calcHash)(fileBundle.baseDir),
shard: files_1.calcHash(fileBundle.baseDir),
limitToFiles,

@@ -275,3 +275,3 @@ });

const analysisContext = getAnalysisContext(options.analysisContext);
const { analysisResult: analysisResults, uploadResult: reportResults } = await (0, report_1.reportScm)({
const { analysisResult: analysisResults, uploadResult: reportResults } = await report_1.reportScm({
...connectionOptions,

@@ -278,0 +278,0 @@ ...options.analysisOptions,

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

emitter_1.emitter.createBundleProgress(cumulativeProgress, options.files.length);
for (const chunkedFiles of (0, files_1.composeFilePayloads)(options.files)) {
for (const chunkedFiles of files_1.composeFilePayloads(options.files)) {
const apiParams = {
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'extraHeaders', 'removedFiles', 'requestId', 'org']),
...lodash_pick_1.default(options, ['baseURL', 'sessionToken', 'source', 'extraHeaders', 'removedFiles', 'requestId', 'org']),
files: chunkedFiles.reduce((d, f) => {

@@ -32,7 +32,7 @@ // deepcode ignore PrototypePollution: FP this is an internal code

// eslint-disable-next-line no-await-in-loop
response = await (0, http_1.createBundle)(apiParams);
response = await http_1.createBundle(apiParams);
}
else {
// eslint-disable-next-line no-await-in-loop
response = await (0, http_1.extendBundle)({ bundleHash, ...apiParams });
response = await http_1.extendBundle({ bundleHash, ...apiParams });
}

@@ -59,3 +59,3 @@ cumulativeProgress += chunkedFiles.length;

emitter_1.emitter.uploadBundleProgress(0, options.files.length);
const apiParams = (0, lodash_pick_1.default)(options, [
const apiParams = lodash_pick_1.default(options, [
'baseURL',

@@ -71,6 +71,6 @@ 'sessionToken',

// Note: we specifically create __new__ isolated bundles here to faster files upload
const resp = await (0, http_1.createBundle)({
const resp = await http_1.createBundle({
...apiParams,
files: bucketFiles.reduce((d, f) => {
d[f.bundlePath] = (0, lodash_pick_1.default)(f, ['hash', 'content']);
d[f.bundlePath] = lodash_pick_1.default(f, ['hash', 'content']);
return d;

@@ -85,6 +85,6 @@ }, {}),

const files = [];
for (const bucketFiles of (0, files_1.composeFilePayloads)(options.files)) {
for (const bucketFiles of files_1.composeFilePayloads(options.files)) {
files.push(bucketFiles);
}
await (0, p_map_1.default)(files, async (task) => await uploadFileChunks(task), {
await p_map_1.default(files, async (task) => await uploadFileChunks(task), {
concurrency: constants_1.UPLOAD_CONCURRENCY,

@@ -99,5 +99,5 @@ });

let { remoteBundle } = options;
const connectionOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']);
const connectionOptions = lodash_pick_1.default(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']);
while (remoteBundle.missingFiles.length && attempts < (options.maxAttempts || constants_1.MAX_UPLOAD_ATTEMPTS)) {
const missingFiles = await (0, files_1.resolveBundleFiles)(options.baseDir, remoteBundle.missingFiles);
const missingFiles = await files_1.resolveBundleFiles(options.baseDir, remoteBundle.missingFiles);
await uploadRemoteBundle({

@@ -108,3 +108,3 @@ ...connectionOptions,

});
const bundleResponse = await (0, http_1.checkBundle)({ ...connectionOptions, bundleHash: remoteBundle.bundleHash });
const bundleResponse = await http_1.checkBundle({ ...connectionOptions, bundleHash: remoteBundle.bundleHash });
if (bundleResponse.type === 'error') {

@@ -121,3 +121,3 @@ throw new Error('Failed to get remote bundle');

let remoteBundle = null;
const baseOptions = (0, lodash_pick_1.default)(options, [
const baseOptions = lodash_pick_1.default(options, [
'baseURL',

@@ -131,3 +131,3 @@ 'sessionToken',

]);
const bundleFactory = prepareRemoteBundle((0, lodash_omit_1.default)(options, ['baseDir']));
const bundleFactory = prepareRemoteBundle(lodash_omit_1.default(options, ['baseDir']));
for await (const response of bundleFactory) {

@@ -154,3 +154,3 @@ if (response.type === 'error') {

emitter_1.emitter.supportedFilesLoaded(null);
const resp = await (0, http_1.getFilters)(baseURL, source, undefined, requestId);
const resp = await http_1.getFilters(baseURL, source, undefined, requestId);
if (resp.type === 'error') {

@@ -200,4 +200,4 @@ throw resp.error;

// Scan for custom ignore rules
const fileIgnores = await (0, files_1.collectIgnoreRules)(options.paths, options.symlinksEnabled, options.defaultFileIgnores);
const baseDir = (0, files_1.determineBaseDir)(options.paths);
const fileIgnores = await files_1.collectIgnoreRules(options.paths, options.symlinksEnabled, options.defaultFileIgnores);
const baseDir = files_1.determineBaseDir(options.paths);
emitter_1.emitter.scanFilesProgress(0);

@@ -207,4 +207,4 @@ const bundleFiles = [];

let totalFiles = 0;
const bundleFileCollector = (0, files_1.collectBundleFiles)({
...(0, lodash_pick_1.default)(options, ['paths', 'symlinksEnabled']),
const bundleFileCollector = files_1.collectBundleFiles({
...lodash_pick_1.default(options, ['paths', 'symlinksEnabled']),
baseDir,

@@ -220,3 +220,3 @@ fileIgnores,

const bundleOptions = {
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']),
...lodash_pick_1.default(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']),
baseDir,

@@ -223,0 +223,0 @@ files: bundleFiles,

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

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

@@ -44,6 +44,6 @@ }

if ((_b = options.patterns) === null || _b === void 0 ? void 0 : _b.length) {
bundle = await (0, bundles_1.createBundleWithCustomFiles)(opts, { configFiles: [], extensions: (_c = options.patterns) !== null && _c !== void 0 ? _c : [] });
bundle = await bundles_1.createBundleWithCustomFiles(opts, { configFiles: [], extensions: (_c = options.patterns) !== null && _c !== void 0 ? _c : [] });
}
else {
bundle = await (0, bundles_1.createBundleFromFolders)(opts);
bundle = await bundles_1.createBundleFromFolders(opts);
}

@@ -65,3 +65,3 @@ if (bundle === null) {

};
const bundle = await (0, http_1.checkBundle)(opts);
const bundle = await http_1.checkBundle(opts);
if (bundle.type === 'error') {

@@ -77,3 +77,3 @@ process.exitCode = 1;

};
const bundle = await (0, analysis_1.analyzeBundle)(opts);
const bundle = await analysis_1.analyzeBundle(opts);
console.log(JSON.stringify(bundle, null, 2));

@@ -80,0 +80,0 @@ }

@@ -46,2 +46,2 @@ export declare const MAX_PAYLOAD: number;

};
export type GenericErrorTypes = ErrorCodes.serverError | ErrorCodes.badGateway | ErrorCodes.serviceUnavailable | ErrorCodes.timeout | ErrorCodes.connectionRefused | ErrorCodes.dnsNotFound;
export declare type GenericErrorTypes = ErrorCodes.serverError | ErrorCodes.badGateway | ErrorCodes.serviceUnavailable | ErrorCodes.timeout | ErrorCodes.connectionRefused | ErrorCodes.dnsNotFound;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {

@@ -74,3 +70,3 @@ if (k2 === undefined) k2 = k;

const patters = getGlobPatterns(supportedFiles);
return (0, multimatch_1.default)(files, patters, multiMatchOptions);
return multimatch_1.default(files, patters, multiMatchOptions);
}

@@ -125,3 +121,3 @@ function parseIgnoreRulesToGlobs(rules, baseDir) {

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const parsed = (0, yaml_1.parse)(f);
const parsed = yaml_1.parse(f);
const codeIgnoredPaths = parsed.exclude.code || [];

@@ -187,3 +183,3 @@ const globalIgnoredPaths = parsed.exclude.global || [];

// Find ignore files inside this directory
const localIgnoreFiles = await (0, fast_glob_1.default)(constants_1.IGNORE_FILES_NAMES.map(i => `*${i}`), {
const localIgnoreFiles = await fast_glob_1.default(constants_1.IGNORE_FILES_NAMES.map(i => `*${i}`), {
...fgOptions,

@@ -194,6 +190,6 @@ cwd: folder,

// Read ignore files and merge new patterns
return (0, lodash_union_1.default)(...localIgnoreFiles.map(parseFileIgnores));
return lodash_union_1.default(...localIgnoreFiles.map(parseFileIgnores));
});
const customRules = await Promise.all(tasks);
return (0, lodash_union_1.default)(fileIgnores, ...customRules);
return lodash_union_1.default(fileIgnores, ...customRules);
}

@@ -312,3 +308,3 @@ exports.collectIgnoreRules = collectIgnoreRules;

}
const entries = await (0, fast_glob_1.default)(processingFiles, {
const entries = await fast_glob_1.default(processingFiles, {
...fgOptions,

@@ -454,5 +450,5 @@ cwd: baseDir,

function isMatch(filePath, rules) {
return !!(0, multimatch_1.default)([filePath], rules, { ...multiMatchOptions, matchBase: false }).length;
return !!multimatch_1.default([filePath], rules, { ...multiMatchOptions, matchBase: false }).length;
}
exports.isMatch = isMatch;
//# sourceMappingURL=files.js.map

@@ -6,7 +6,7 @@ /// <reference types="node" />

import { AnalysisOptions, AnalysisContext, ReportOptions, ScmReportOptions } from './interfaces/analysis-options.interface';
type ResultSuccess<T> = {
declare type ResultSuccess<T> = {
type: 'success';
value: T;
};
type ResultError<E> = {
declare type ResultError<E> = {
type: 'error';

@@ -19,3 +19,3 @@ error: {

};
export type Result<T, E> = ResultSuccess<T> | ResultError<E>;
export declare type Result<T, E> = ResultSuccess<T> | ResultError<E>;
export interface ConnectionOptions {

@@ -31,3 +31,3 @@ baseURL: string;

}
type StartSessionResponseDto = {
declare type StartSessionResponseDto = {
readonly draftToken: string;

@@ -43,3 +43,3 @@ readonly loginURL: string;

export declare function getVerifyCallbackUrl(authHost: string): string;
export type IpFamily = 6 | undefined;
export declare type IpFamily = 6 | undefined;
/**

@@ -51,3 +51,3 @@ * Dispatches a FORCED IPv6 request to test client's ISP and network capability.

export declare function getIpFamily(authHost: string): Promise<IpFamily>;
type CheckSessionErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.loginInProgress;
declare type CheckSessionErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.loginInProgress;
interface CheckSessionOptions {

@@ -60,7 +60,7 @@ readonly authHost: string;

export declare function getFilters(baseURL: string, source: string, attempts?: number, requestId?: string): Promise<Result<SupportedFiles, GenericErrorTypes>>;
export type RemoteBundle = {
export declare type RemoteBundle = {
readonly bundleHash: string;
readonly missingFiles: string[];
};
export type CreateBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.bigPayload | ErrorCodes.badRequest | ErrorCodes.notFound;
export declare type CreateBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.bigPayload | ErrorCodes.badRequest | ErrorCodes.notFound;
interface CreateBundleOptions extends ConnectionOptions {

@@ -70,3 +70,3 @@ files: BundleFiles;

export declare function createBundle(options: CreateBundleOptions): Promise<Result<RemoteBundle, CreateBundleErrorCodes>>;
export type CheckBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.notFound;
export declare type CheckBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.notFound;
interface CheckBundleOptions extends ConnectionOptions {

@@ -76,3 +76,3 @@ bundleHash: string;

export declare function checkBundle(options: CheckBundleOptions): Promise<Result<RemoteBundle, CheckBundleErrorCodes>>;
export type ExtendBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.badRequest | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.bigPayload | ErrorCodes.notFound;
export declare type ExtendBundleErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.badRequest | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.bigPayload | ErrorCodes.notFound;
interface ExtendBundleOptions extends ConnectionOptions {

@@ -92,11 +92,11 @@ readonly bundleHash: string;

}
export type AnalysisResponseProgress = {
export declare type AnalysisResponseProgress = {
readonly status: AnalysisStatus.waiting | AnalysisStatus.fetching | AnalysisStatus.analyzing | AnalysisStatus.done;
readonly progress: number;
};
export type AnalysisFailedResponse = {
export declare type AnalysisFailedResponse = {
readonly status: AnalysisStatus.failed;
};
export type GetAnalysisResponseDto = AnalysisResult | AnalysisFailedResponse | AnalysisResponseProgress;
export type GetAnalysisErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.badRequest | ErrorCodes.notFound;
export declare type GetAnalysisResponseDto = AnalysisResult | AnalysisFailedResponse | AnalysisResponseProgress;
export declare type GetAnalysisErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.badRequest | ErrorCodes.notFound;
export interface GetAnalysisOptions extends ConnectionOptions, AnalysisOptions, AnalysisContext {

@@ -106,3 +106,3 @@ bundleHash: string;

export declare function getAnalysis(options: GetAnalysisOptions): Promise<Result<GetAnalysisResponseDto, GetAnalysisErrorCodes>>;
export type ReportErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.badRequest | ErrorCodes.notFound;
export declare type ReportErrorCodes = GenericErrorTypes | ErrorCodes.unauthorizedUser | ErrorCodes.unauthorizedBundleAccess | ErrorCodes.badRequest | ErrorCodes.notFound;
export interface UploadReportOptions extends GetAnalysisOptions {

@@ -116,9 +116,9 @@ report: ReportOptions;

}
export type InitUploadResponseDto = {
export declare type InitUploadResponseDto = {
reportId: string;
};
export type InitScmUploadResponseDto = {
export declare type InitScmUploadResponseDto = {
testId: string;
};
export type UploadReportResponseDto = ReportResult | AnalysisFailedResponse | AnalysisResponseProgress;
export declare type UploadReportResponseDto = ReportResult | AnalysisFailedResponse | AnalysisResponseProgress;
/**

@@ -125,0 +125,0 @@ * Trigger a file-based test with reporting.

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

// encode payload and compress;
const deflate = (0, util_1.promisify)(zlib_1.gzip);
const deflate = util_1.promisify(zlib_1.gzip);
const compressedPayload = await deflate(Buffer.from(JSON.stringify(payload)).toString('base64'));

@@ -54,3 +54,3 @@ return compressedPayload;

const { source, authHost } = options;
const draftToken = (0, uuid_1.v4)();
const draftToken = uuid_1.v4();
return {

@@ -74,3 +74,3 @@ draftToken,

// Dispatch a FORCED IPv6 request to test client's ISP and network capability
const res = await (0, needle_1.makeRequest)({
const res = await needle_1.makeRequest({
url: getVerifyCallbackUrl(authHost),

@@ -94,3 +94,3 @@ method: 'post',

};
const res = await (0, needle_1.makeRequest)({
const res = await needle_1.makeRequest({
url: getVerifyCallbackUrl(options.authHost),

@@ -114,3 +114,3 @@ body: {

const apiName = 'filters';
const res = await (0, needle_1.makeRequest)({
const res = await needle_1.makeRequest({
headers: { source, ...(requestId && { 'snyk-request-id': requestId }) },

@@ -156,3 +156,3 @@ url: `${baseURL}/${apiName}`,

};
const res = await (0, needle_1.makeRequest)(payload);
const res = await needle_1.makeRequest(payload);
if (res.success) {

@@ -171,3 +171,3 @@ return { type: 'success', value: res.body };

async function checkBundle(options) {
const res = await (0, needle_1.makeRequest)({
const res = await needle_1.makeRequest({
headers: {

@@ -193,4 +193,4 @@ ...commonHttpHeaders(options),

async function extendBundle(options) {
const payloadBody = await compressAndEncode((0, lodash_pick_1.default)(options, ['files', 'removedFiles']));
const res = await (0, needle_1.makeRequest)({
const payloadBody = await compressAndEncode(lodash_pick_1.default(options, ['files', 'removedFiles']));
const res = await needle_1.makeRequest({
headers: {

@@ -243,6 +243,6 @@ 'content-type': 'application/octet-stream',

},
...(0, lodash_pick_1.default)(options, ['severity', 'prioritized', 'legacy', 'analysisContext']),
...lodash_pick_1.default(options, ['severity', 'prioritized', 'legacy', 'analysisContext']),
},
};
const res = await (0, needle_1.makeRequest)(config);
const res = await needle_1.makeRequest(config);
if (res.success)

@@ -284,6 +284,6 @@ return { type: 'success', value: res.body };

},
...(0, lodash_pick_1.default)(options, ['severity', 'prioritized', 'legacy', 'analysisContext']),
...lodash_pick_1.default(options, ['severity', 'prioritized', 'legacy', 'analysisContext']),
},
};
const res = await (0, needle_1.makeRequest)(config);
const res = await needle_1.makeRequest(config);
if (res.success)

@@ -306,3 +306,3 @@ return { type: 'success', value: res.body.reportId };

};
const res = await (0, needle_1.makeRequest)(config);
const res = await needle_1.makeRequest(config);
if (res.success)

@@ -328,6 +328,6 @@ return { type: 'success', value: res.body };

},
...(0, lodash_pick_1.default)(options, ['severity', 'prioritized', 'analysisContext']),
...lodash_pick_1.default(options, ['severity', 'prioritized', 'analysisContext']),
},
};
const res = await (0, needle_1.makeRequest)(config);
const res = await needle_1.makeRequest(config);
if (res.success)

@@ -350,3 +350,3 @@ return { type: 'success', value: res.body.testId };

};
const res = await (0, needle_1.makeRequest)(config);
const res = await needle_1.makeRequest(config);
if (res.success)

@@ -353,0 +353,0 @@ return { type: 'success', value: res.body };

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {

@@ -10,0 +6,0 @@ if (k2 === undefined) k2 = k;

@@ -28,3 +28,3 @@ import { Log } from 'sarif';

}
export type Point = [number, number];
export declare type Point = [number, number];
export interface Marker {

@@ -85,3 +85,3 @@ msg: Point;

}
export type AnalysisResult = AnalysisResultSarif | AnalysisResultLegacy;
export declare type AnalysisResult = AnalysisResultSarif | AnalysisResultLegacy;
export interface ScmAnalysis {

@@ -88,0 +88,0 @@ analysisResults: AnalysisResultSarif;

@@ -9,3 +9,3 @@ import { AnalysisResult } from '..';

}
export type BundleFiles = {
export declare type BundleFiles = {
[filePath: string]: string | File;

@@ -20,3 +20,3 @@ };

}
export type SupportedFiles = {
export declare type SupportedFiles = {
configFiles: string[];

@@ -23,0 +23,0 @@ extensions: string[];

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { OutgoingHttpHeaders } from 'http';

@@ -26,3 +22,3 @@ import needle from 'needle';

}
export type FailedResponse = {
export declare type FailedResponse = {
success: false;

@@ -29,0 +25,0 @@ errorCode: number;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {

@@ -87,3 +83,3 @@ if (k2 === undefined) k2 = k;

try {
response = await (0, needle_1.default)(method, url, data, options);
response = await needle_1.default(method, url, data, options);
emitter_1.emitter.apiRequestLog(`<= Response: ${response.statusCode} ${JSON.stringify(response.body)}`);

@@ -90,0 +86,0 @@ const success = !!(response.statusCode && response.statusCode >= 200 && response.statusCode < 300);

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {

@@ -53,3 +49,3 @@ if (k2 === undefined) k2 = k;

apiResponse = await getReportFunc({
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org']),
...lodash_pick_1.default(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org']),
pollId,

@@ -56,0 +52,0 @@ });

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

},
"version": "4.19.1"
"version": "4.20.0"
}

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

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

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