New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@highlight-run/sourcemap-uploader

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highlight-run/sourcemap-uploader - npm Package Compare versions

Comparing version 0.0.2 to 0.0.4

README.md

32

index.js

@@ -9,2 +9,3 @@ #!/usr/bin/env node

const AWS = require("aws-sdk");
const { v4: uuidv4 } = require("uuid");

@@ -25,3 +26,3 @@ const SERVER_URL = "http://localhost:5000";

() => {},
async ({ apiKey, path }) => {
async ({ organizationId, apiKey, path, version }) => {
console.info(`Starting to upload source maps from ${path}`);

@@ -39,7 +40,22 @@

if (!version) {
version = uuidv4();
console.info(
`The version was not provided, Highlight will generate a hash for you: ${version}`
);
}
await Promise.all(
fileList.map(({ path, name }) => uploadFile(apiKey, path, name))
fileList.map(({ path, name }) =>
uploadFile(organizationId, apiKey, path, name, version)
)
);
}
)
.option("organizationId", {
alias: "id",
type: "string",
describe: "The Highlight organization ID",
default: "113",
})
.option("apiKey", {

@@ -59,2 +75,9 @@ alias: "k",

})
.option("version", {
alias: "v",
type: "string",
default: "",
describe:
"The version of this build. This is typically a semantic version or Git hash.",
})
.help("help").argv;

@@ -96,3 +119,3 @@

async function uploadFile(apiKey, filePath, fileName) {
async function uploadFile(organizationId, apiKey, filePath, fileName, version) {
const query = `query UploadSourceMap($apiKey: String!, $file: Upload!) {

@@ -104,5 +127,6 @@ uploadSourceMap(apiKey: $apiKey, file: $file)

// Setting up S3 upload parameters
const bucketPath = `${organizationId}/${version}/${fileName}`;
const params = {
Bucket: BUCKET_NAME,
Key: `${fileName}`,
Key: bucketPath,
Body: fileContent,

@@ -109,0 +133,0 @@ };

3

package.json
{
"name": "@highlight-run/sourcemap-uploader",
"version": "0.0.2",
"version": "0.0.4",
"description": "Command line tool to upload source maps to Highlight",

@@ -19,4 +19,5 @@ "main": "index.js",

"glob": "^7.1.7",
"uuid": "^8.3.2",
"yargs": "^17.0.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc