@vibgrate/cli 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -953,9 +953,6 @@ function parseDsn(dsn) {
|
|
|
953
953
|
workspaceId: match[5]
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function computeHmac(body, secret) {
|
|
957
|
-
return crypto3.createHmac("sha256", secret).update(body).digest("base64");
|
|
958
|
-
}
|
|
959
956
|
var pushCommand = new Command2("push").description("Push scan results to Vibgrate API").option("--dsn <dsn>", "DSN token (or use VIBGRATE_DSN env)").option("--region <region>", "Override data residency region (us, eu)").option("--file <file>", "Scan artifact file", ".vibgrate/scan_result.json").option("--strict", "Fail on upload errors").action(async (opts) => {
|
|
960
957
|
const dsn = opts.dsn || process.env.VIBGRATE_DSN;
|
|
961
958
|
if (!dsn) {
|
|
@@ -980,7 +977,6 @@ var pushCommand = new Command2("push").description("Push scan results to Vibgrat
|
|
|
980
977
|
}
|
|
981
978
|
const body = await readTextFile(filePath);
|
|
982
979
|
const timestamp = String(Date.now());
|
|
983
|
-
const hmac = computeHmac(body, parsed.secret);
|
|
984
980
|
let host = parsed.host;
|
|
985
981
|
if (opts.region) {
|
|
986
982
|
try {
|
|
@@ -999,7 +995,7 @@ var pushCommand = new Command2("push").description("Push scan results to Vibgrat
|
|
|
999
995
|
headers: {
|
|
1000
996
|
"Content-Type": "application/json",
|
|
1001
997
|
"X-Vibgrate-Timestamp": timestamp,
|
|
1002
|
-
"Authorization": `VibgrateDSN ${parsed.keyId}:${
|
|
998
|
+
"Authorization": `VibgrateDSN ${parsed.keyId}:${parsed.secret}`
|
|
1003
999
|
},
|
|
1004
1000
|
body
|
|
1005
1001
|
});
|
|
@@ -4203,7 +4199,6 @@ async function autoPush(artifact, rootDir, opts) {
|
|
|
4203
4199
|
}
|
|
4204
4200
|
const body = JSON.stringify(artifact);
|
|
4205
4201
|
const timestamp = String(Date.now());
|
|
4206
|
-
const hmac = computeHmac(body, parsed.secret);
|
|
4207
4202
|
let host = parsed.host;
|
|
4208
4203
|
if (opts.region) {
|
|
4209
4204
|
try {
|
|
@@ -4222,7 +4217,7 @@ async function autoPush(artifact, rootDir, opts) {
|
|
|
4222
4217
|
headers: {
|
|
4223
4218
|
"Content-Type": "application/json",
|
|
4224
4219
|
"X-Vibgrate-Timestamp": timestamp,
|
|
4225
|
-
"Authorization": `VibgrateDSN ${parsed.keyId}:${
|
|
4220
|
+
"Authorization": `VibgrateDSN ${parsed.keyId}:${parsed.secret}`
|
|
4226
4221
|
},
|
|
4227
4222
|
body
|
|
4228
4223
|
});
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-VXZT34Y5.js";
|
|
5
5
|
import {
|
|
6
6
|
baselineCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OF2BMMSF.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION,
|
|
10
10
|
dsnCommand,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
readJsonFile,
|
|
16
16
|
scanCommand,
|
|
17
17
|
writeDefaultConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZOSHRPMY.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
21
21
|
import { Command as Command4 } from "commander";
|
|
@@ -38,7 +38,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
38
38
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
39
39
|
}
|
|
40
40
|
if (opts.baseline) {
|
|
41
|
-
const { runBaseline } = await import("./baseline-
|
|
41
|
+
const { runBaseline } = await import("./baseline-VFKPGNDX.js");
|
|
42
42
|
await runBaseline(rootDir);
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
package/dist/index.js
CHANGED