Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into yarn1-hoisting
Browse files Browse the repository at this point in the history
  • Loading branch information
noyshabtay committed Nov 19, 2023
2 parents 3e2dbca + 432db7c commit 6c7a62a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion release/pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pipelines:
- jf gradlec --use-wrapper --repo-resolve ecosys-maven-remote --repo-deploy ecosys-oss-release-local --deploy-maven-desc

# Run audit
- jf audit
- jf audit --gradle --use-wrapper

# Update version
- sed -i "s/\(version=\).*\$/\1${NEXT_VERSION}/" gradle.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public SSLContext getSslContext() {
}

@Override
public ProxyConfiguration getProxyConfForTargetUrl(String xrayUrl) {
public ProxyConfiguration getProxyConfForTargetUrl(String targetUrl) {
return null;
}

Expand All @@ -101,6 +101,11 @@ public int getConnectionTimeout() {
return 0;
}

@Override
public String getExternalResourcesRepo() {
return null;
}

private String getValueFromJson(String fieldName) {
return serverConfig.get(fieldName) != null ? serverConfig.get(fieldName).asText() : "";
}
Expand Down
15 changes: 11 additions & 4 deletions src/main/java/com/jfrog/ide/common/configuration/ServerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ enum PolicyType {VULNERABILITIES, PROJECT, WATCHES}
SSLContext getSslContext();

/**
* Reads the http proxy configuration set in IDE configuration and returns the proxy configuration for the Xray URL.
* Reads the HTTP proxy configuration set in IDE configuration and returns the proxy configuration for the target URL.
*
* @param xrayUrl - Xray url.
* @return proxy config for the Xray URL.
* @param targetUrl The target URL.
* @return Proxy configuration for the target URL.
*/
ProxyConfiguration getProxyConfForTargetUrl(String xrayUrl);
ProxyConfiguration getProxyConfForTargetUrl(String targetUrl);

/**
* @return connection retries.
Expand All @@ -70,6 +70,13 @@ enum PolicyType {VULNERABILITIES, PROJECT, WATCHES}
*/
int getConnectionTimeout();

/**
* Returns external resources repository name. If it's not configured, null is returned.
*
* @return External resources repository name, if configured.
*/
String getExternalResourcesRepo();

@SuppressWarnings("unused")
default boolean areCredentialsSet() {
return isNoneBlank(getUsername(), getPassword()) && !isAllBlank(getUrl(), getXrayUrl(), getArtifactoryUrl());
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/jfrog/ide/common/utils/PackageFileFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public PackageFileFinder(Set<Path> projectPaths, Path basePath, String excludedP
this.exclusions = FileSystems.getDefault().getPathMatcher("glob:" + excludedPaths);
this.basePath = basePath;

for (Path projectPath : Utils.consolidatePaths(projectPaths)) {
for (Path projectPath : projectPaths) {
Files.walkFileTree(projectPath, this);
}
if (!excludedDirectories.isEmpty()) {
Expand All @@ -50,7 +50,7 @@ public PackageFileFinder(Set<Path> projectPaths, Path basePath, String excludedP
/**
* Get package.json directories and their directories.
*
* @return List of package.json's parent directories.
* @return Set of package.json's parent directories.
*/
public Set<String> getNpmPackagesFilePairs() {
Set<String> packageJsonDirectoriesSet = Sets.newHashSet(packageJsonDirectories);
Expand All @@ -62,7 +62,7 @@ public Set<String> getNpmPackagesFilePairs() {
/**
* Get package.json directories and their directories.
*
* @return List of yarn.lock's parent directories.
* @return Set of yarn.lock's parent directories.
*/
public Set<String> getYarnPackagesFilePairs() {
return Sets.newHashSet(yarnLockDirectories);
Expand All @@ -71,7 +71,7 @@ public Set<String> getYarnPackagesFilePairs() {
/**
* Get build.gradle and build.gradle.kts directories and their directories.
*
* @return List of build.gradle and build.gradle.kts's parent directories.
* @return Set of build.gradle and build.gradle.kts's parent directories.
*/
public Set<String> getBuildGradlePackagesFilePairs() {
return Sets.newHashSet(buildGradleDirectories);
Expand All @@ -80,7 +80,7 @@ public Set<String> getBuildGradlePackagesFilePairs() {
/**
* Get go.mod directories and their directories.
*
* @return List of go.mod's parent directories.
* @return Set of go.mod's parent directories.
*/
public Set<String> getGoPackagesFilePairs() {
return Sets.newHashSet(goModDirectories);
Expand Down

0 comments on commit 6c7a62a

Please sign in to comment.