Search in sources :

Example 1 with NpmLockFileProjectIdTransformer

use of com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockFileProjectIdTransformer in project synopsys-detect by blackducksoftware.

the class NpmPeerExclusionTest method createPackager.

private NpmLockfilePackager createPackager(NpmDependencyType... excludedTypes) {
    ExternalIdFactory externalIdFactory = new ExternalIdFactory();
    Gson gson = new GsonBuilder().setPrettyPrinting().create();
    NpmLockfileGraphTransformer graphTransformer = new NpmLockfileGraphTransformer(EnumListFilter.fromExcluded(excludedTypes));
    NpmLockFileProjectIdTransformer projectIdTransformer = new NpmLockFileProjectIdTransformer(gson, externalIdFactory);
    return new NpmLockfilePackager(gson, externalIdFactory, projectIdTransformer, graphTransformer);
}
Also used : NpmLockfileGraphTransformer(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfileGraphTransformer) GsonBuilder(com.google.gson.GsonBuilder) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) NpmLockFileProjectIdTransformer(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockFileProjectIdTransformer) NpmLockfilePackager(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfilePackager) Gson(com.google.gson.Gson)

Example 2 with NpmLockFileProjectIdTransformer

use of com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockFileProjectIdTransformer in project synopsys-detect by blackducksoftware.

the class NpmDevExclusionTest method createPackager.

private NpmLockfilePackager createPackager(NpmDependencyType... excludedTypes) {
    ExternalIdFactory externalIdFactory = new ExternalIdFactory();
    Gson gson = new GsonBuilder().setPrettyPrinting().create();
    NpmLockfileGraphTransformer graphTransformer = new NpmLockfileGraphTransformer(EnumListFilter.fromExcluded(excludedTypes));
    NpmLockFileProjectIdTransformer projectIdTransformer = new NpmLockFileProjectIdTransformer(gson, externalIdFactory);
    return new NpmLockfilePackager(gson, externalIdFactory, projectIdTransformer, graphTransformer);
}
Also used : NpmLockfileGraphTransformer(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfileGraphTransformer) GsonBuilder(com.google.gson.GsonBuilder) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) NpmLockFileProjectIdTransformer(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockFileProjectIdTransformer) NpmLockfilePackager(com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfilePackager) Gson(com.google.gson.Gson)

Aggregations

Gson (com.google.gson.Gson)2 GsonBuilder (com.google.gson.GsonBuilder)2 ExternalIdFactory (com.synopsys.integration.bdio.model.externalid.ExternalIdFactory)2 NpmLockFileProjectIdTransformer (com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockFileProjectIdTransformer)2 NpmLockfileGraphTransformer (com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfileGraphTransformer)2 NpmLockfilePackager (com.synopsys.integration.detectable.detectables.npm.lockfile.parse.NpmLockfilePackager)2