Skip to content

Commit

Permalink
fix: passing gradle metadata on monitor.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthogez committed Feb 23, 2020
1 parent aabe1ef commit 742f568
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lib/monitor/index.ts
@@ -1,6 +1,5 @@
import * as Debug from 'debug';
import * as depGraphLib from '@snyk/dep-graph';
import * as cliInterface from '@snyk/cli-interface';
import * as snyk from '..';
import { apiTokenExists } from '../api-token';
import request = require('../request');
Expand All @@ -11,7 +10,7 @@ import { isCI } from '../is-ci';
import * as analytics from '../analytics';
import { DepTree, MonitorMeta, MonitorResult } from '../types';
import * as projectMetadata from '../project-metadata';
import * as path from 'path';

import {
MonitorError,
ConnectionTimeoutError,
Expand All @@ -26,6 +25,7 @@ import { dropEmptyDeps } from './drop-empty-deps';
import { pruneTree } from './prune-dep-tree';
import { pluckPolicies } from '../policy';
import { PluginMetadata } from '@snyk/cli-interface/legacy/plugin';
import { ScannedProject } from '@snyk/cli-interface/legacy/common';

const debug = Debug('snyk');

Expand Down Expand Up @@ -62,7 +62,7 @@ interface Meta {
export async function monitor(
root: string,
meta: MonitorMeta,
scannedProject: cliInterface.legacyCommon.ScannedProject,
scannedProject: ScannedProject,
options,
pluginMeta: PluginMetadata,
targetFileRelativePath?: string,
Expand Down Expand Up @@ -166,6 +166,9 @@ export async function monitor(
projectName: meta['project-name'],
prePruneDepCount, // undefined unless 'prune' is used,
monitorGraph: false,
versionBuildInfo: JSON.stringify(
scannedProject.meta?.versionBuildInfo,
),
},
policy: policy ? policy.toString() : undefined,
package: pkg,
Expand Down Expand Up @@ -210,7 +213,7 @@ export async function monitor(
export async function monitorGraph(
root: string,
meta: MonitorMeta,
scannedProject: cliInterface.legacyCommon.ScannedProject,
scannedProject: ScannedProject,
pluginMeta: PluginMetadata,
targetFileRelativePath?: string,
): Promise<MonitorResult> {
Expand Down

0 comments on commit 742f568

Please sign in to comment.