Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: snyk-test types + use SupportedProjectTypes
- Loading branch information
Showing
6 changed files
with
57 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export type SupportedCloudConfigs = 'k8sconfig' | 'helmconfig'; | ||
|
||
export const TEST_SUPPORTED_CLOUD_CONFIG_PROJECTS: SupportedCloudConfigs[] = [ | ||
'k8sconfig', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import * as depGraphLib from '@snyk/dep-graph'; | ||
import { GitTarget, ContainerTarget } from '../project-metadata/types'; | ||
import { DepTree } from '../types'; | ||
|
||
interface PayloadBody { | ||
depGraph?: depGraphLib.DepGraph; // missing for legacy endpoint (options.vulnEndpoint) | ||
callGraph?: any; | ||
policy?: string; | ||
targetFile?: string; | ||
targetFileRelativePath?: string; | ||
projectNameOverride?: string; | ||
hasDevDependencies?: boolean; | ||
originalProjectName?: string; // used only for display | ||
foundProjectCount?: number; // used only for display | ||
docker?: any; | ||
displayTargetFile?: string; | ||
target?: GitTarget | ContainerTarget | null; | ||
} | ||
|
||
export interface DepTreeFromResolveDeps extends DepTree { | ||
numDependencies: number; | ||
pluck: any; | ||
} | ||
|
||
export interface Payload { | ||
method: string; | ||
url: string; | ||
json: boolean; | ||
headers: { | ||
'x-is-ci': boolean; | ||
authorization: string; | ||
}; | ||
body?: PayloadBody | CloudConfigPayloadBody; | ||
qs?: object | null; | ||
modules?: DepTreeFromResolveDeps; | ||
} | ||
|
||
export interface CloudConfigPayloadBody { | ||
policy: string; | ||
targetFile?: string; | ||
targetFileRelativePath?: string; | ||
originalProjectName?: string; // used only for display | ||
foundProjectCount?: number; // used only for display | ||
displayTargetFile?: string; | ||
target?: GitTarget | ContainerTarget | null; | ||
fileContent: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters