node_modules/snyk/dist/cli/293.index.js
// Payload to send to the Registry for scanning a remote package.
Payload to send to the Registry for scanning a remote package.
Payload to send to the Registry for scanning a remote package .
async function assembleRemotePayloads(root, options) {
    const pkg = snyk_module_1.parsePackageString(root);
    debug('testing remote: %s', pkg.name + '@' + pkg.version);
    addPackageAnalytics(pkg.name, pkg.version);
    const encodedName = encodeURIComponent(pkg.name + '@' + pkg.version);
    const url = `${config_1.default.API}${options.vulnEndpoint ||
        `/vuln/${options.packageManager}`}/${encodedName}`;
    return [
        {
            method: 'GET',
            url,
            qs: common.assembleQueryString(options),
            json: true,
            headers: {
                'x-is-ci': is_ci_1.isCI(),
                authorization: 'token ' + snyk.api,
            },
        },
    ];
}
async function assembleRemotePayloads ( root , options ) { const pkg = snyk_module_1 . parsePackageString ( root ) ; debug ( 'testing remote: %s' , pkg . name + '@' + pkg . version ) ; addPackageAnalytics ( pkg . name , pkg . version ) ; const encodedName = encodeURIComponent ( pkg . name + '@' + pkg . version ) ; const url = ` ${ config_1 . default . API } ${ options . vulnEndpoint || ` ${ options . packageManager } ` } ${ encodedName } ` ; return [ { method : 'GET' , url , qs : common . assembleQueryString ( options ) , json : true , headers : { 'x-is-ci' : is_ci_1 . isCI ( ) , authorization : 'token ' + snyk . api , } , } , ] ; }
Payload to send to the Registry for scanning a remote package.
Payload to send to the Registry for scanning a remote package .
// options.vulnEndpoint is only used by `snyk protect` (i.e. local filesystem tests)