Skip to content

Commit d60ffba

Browse files
committed
update bridge zip file to bridge-cli-bundle
1 parent e65248a commit d60ffba

File tree

9 files changed

+1273
-1275
lines changed

9 files changed

+1273
-1275
lines changed

blackduck-security-task/dist/index.js

+1,249-1,250
Large diffs are not rendered by default.

blackduck-security-task/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{
2-
"messages": {
3-
"TOOL_LIB_CachingTool": "Caching tool: %s %s %s",
4-
"_TOOL_LIB_CachingTool.comment": "This informational log message indicates that a tool, that was just downloaded, is being copied into the cache directory. %s %s %s represent the tool name, version information, and processor architecture.",
5-
"TOOL_LIB_Downloading": "Downloading: %s",
6-
"_TOOL_LIB_Downloading.comment": "This information log message indicates that a file is being downloaded. %s represents the URL being downloaded.",
7-
"TOOL_LIB_ExtractingArchive": "Extracting archive",
8-
"_TOOL_LIB_ExtractingArchive.comment": "This informational log message indicates that an archive file is being extracted. For example, a .zip file, .7z file, or .tar.gz file.",
9-
"TOOL_LIB_FoundInCache": "Found tool in cache: %s %s %s",
10-
"_TOOL_LIB_FoundInCache.comment": "This informational log message indicates that the request tool is already cached, and does not need to be downloaded again. %s %s %s represent the tool name, version information, and processor architecture.",
11-
"TOOL_LIB_PrependPath": "Prepending PATH environment variable with directory: %s",
12-
"_TOOL_LIB_PrependPath.comment": "This informational log message indicates that a directory is being prepended to the front of the PATH environment variable. The directories specified by the PATH environment variable are used to resolve the location of command line tools."
13-
}
1+
{
2+
"messages": {
3+
"TOOL_LIB_CachingTool": "Caching tool: %s %s %s",
4+
"_TOOL_LIB_CachingTool.comment": "This informational log message indicates that a tool, that was just downloaded, is being copied into the cache directory. %s %s %s represent the tool name, version information, and processor architecture.",
5+
"TOOL_LIB_Downloading": "Downloading: %s",
6+
"_TOOL_LIB_Downloading.comment": "This information log message indicates that a file is being downloaded. %s represents the URL being downloaded.",
7+
"TOOL_LIB_ExtractingArchive": "Extracting archive",
8+
"_TOOL_LIB_ExtractingArchive.comment": "This informational log message indicates that an archive file is being extracted. For example, a .zip file, .7z file, or .tar.gz file.",
9+
"TOOL_LIB_FoundInCache": "Found tool in cache: %s %s %s",
10+
"_TOOL_LIB_FoundInCache.comment": "This informational log message indicates that the request tool is already cached, and does not need to be downloaded again. %s %s %s represent the tool name, version information, and processor architecture.",
11+
"TOOL_LIB_PrependPath": "Prepending PATH environment variable with directory: %s",
12+
"_TOOL_LIB_PrependPath.comment": "This informational log message indicates that a directory is being prepended to the front of the PATH environment variable. The directories specified by the PATH environment variable are used to resolve the location of command line tools."
13+
}
1414
}

blackduck-security-task/src/blackduck-security-task/application-constant.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide.
22

33
import { ErrorCode } from "./enum/ErrorCodes";
4-
export const BRIDGE_CLI_DEFAULT_PATH_MAC = "/bridge-cli"; //Path will be in home
5-
export const BRIDGE_CLI_DEFAULT_PATH_WINDOWS = "\\bridge-cli";
6-
export const BRIDGE_CLI_DEFAULT_PATH_LINUX = "/bridge-cli";
4+
export const BRIDGE_CLI_DEFAULT_PATH_MAC = "/bridge-cli-bundle"; //Path will be in home
5+
export const BRIDGE_CLI_DEFAULT_PATH_WINDOWS = "\\bridge-cli-bundle";
6+
export const BRIDGE_CLI_DEFAULT_PATH_LINUX = "/bridge-cli-bundle";
77
export const BRIDGE_CLI_EXECUTABLE_WINDOWS = "bridge-cli.exe";
88
export const BRIDGE_CLI_EXECUTABLE_MAC_LINUX = "bridge-cli";
99
export const BRIDGE_CLI_ZIP_FILE_NAME = "bridge-cli-bundle.zip";
1010

11-
export const APPLICATION_NAME = "blackduck-extension";
1211
export const AZURE_TOKEN_KEY = "azure_token";
1312
export const POLARIS_AZURE_TOKEN_KEY_CLASSIC_EDITOR = "polarisAzureToken";
1413
export const BLACKDUCKSCA_AZURE_TOKEN_KEY_CLASSIC_EDITOR =

blackduck-security-task/src/blackduck-security-task/bridge.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export class Bridge {
485485
): Promise<boolean> {
486486
try {
487487
const contents = readFileSync(bridgeVersionFilePath, "utf-8");
488-
return contents.includes("Bridge CLI Package: ".concat(bridgeVersion));
488+
return contents.includes("bridge-cli-bundle: ".concat(bridgeVersion));
489489
} catch (e) {
490490
console.info(ERROR_READING_VERSION_FILE.concat((e as Error).message));
491491
}

blackduck-security-task/test/unit/blackduck-security-task/bridge-cli-bundle.zip

Whitespace-only changes.

blackduck-security-task/test/unit/blackduck-security-task/bridge.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ describe("Download Bridge", () => {
835835

836836
it("Check If Version Exists - success", async () => {
837837

838-
sandbox.stub(fs, "readFileSync").returns('Bridge CLI Package: 0.1.1');
838+
sandbox.stub(fs, "readFileSync").returns('bridge-cli-bundle: 0.1.1');
839839

840840
const result = await bridge.checkIfVersionExists('0.1.1', bridgeDefaultPath);
841841
assert.equal(result, true);
@@ -887,7 +887,7 @@ describe("Download Bridge", () => {
887887
it('Test getBridgeVersionFromLatestURL -status 200', async () => {
888888
const incomingMessage: IncomingMessage = new IncomingMessage(new Socket())
889889
incomingMessage.statusCode = 200
890-
const responseBody = "Bridge CLI Package:0.2.35\nbridge-cli: 0.2.35"
890+
const responseBody = "Bridge CLI Package:0.2.35\nbridge-cli-bundle: 0.2.35"
891891

892892
const response: ifm.IHttpClientResponse = {
893893
message: incomingMessage,
@@ -906,7 +906,7 @@ describe("Download Bridge", () => {
906906
it('Test getBridgeVersionFromLatestURL exception', async () => {
907907
const incomingMessage: IncomingMessage = new IncomingMessage(new Socket())
908908
incomingMessage.statusCode = 200
909-
const responseBody = "Bridge CLI Package:0.2.35\nbridge-cli: 0.2.35"
909+
const responseBody = "bridge-cli-bundle: 0.2.35\nbridge-cli-bundle: 0.2.35"
910910

911911
const response: ifm.IHttpClientResponse = {
912912
message: incomingMessage,

blackduck-security-task/test/unit/blackduck-security-task/toolTests.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import * as constants from "../../../src/blackduck-security-task/application-con
1515
let tempPath = path.join(process.cwd(), 'TEMP');
1616

1717
describe('Tool Tests', function () {
18-
const fileName = "bridge-cli.zip"
18+
const fileName = "bridge-cli-bundle.zip"
1919
let sandbox: sinon.SinonSandbox;
2020
before(function () {
2121
sandbox = sinon.createSandbox();

blackduck-security-task/test/unit/blackduck-security-task/utiltity.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ describe("Utilities", () => {
101101
context('getRemoteFile', async function () {
102102

103103
it('getRemoteFile - success', async function () {
104-
const downloadFileResponse = {filePath: "/", fileName: "bridge-cli.zip"} as DownloadFileResponse
104+
const downloadFileResponse = {filePath: "/", fileName: "bridge-cli-bundle.zip"} as DownloadFileResponse
105105
sandbox.stub(toolLibLocal, "downloadTool").returns(Promise.resolve("/"));
106-
const result = await utility.getRemoteFile("/", "https://blackduck.com/bridge-cli.zip");
106+
const result = await utility.getRemoteFile("/", "https://blackduck.com/bridge-cli-bundle.zip");
107107
expect(result.fileName).equals(downloadFileResponse.fileName)
108108
expect(result.filePath).equals(downloadFileResponse.filePath)
109109
});

0 commit comments

Comments
 (0)