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
3
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.6 to 0.0.9

44

index.js

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

const AWS = require("aws-sdk");
const { v4: uuidv4 } = require("uuid");
const SERVER_URL = "http://localhost:5000";
const BUCKET_NAME = "source-maps-test";

@@ -29,3 +27,3 @@

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

@@ -45,3 +43,3 @@

fileList.map(({ path, name }) =>
uploadFile(organizationId, apiKey, path, name)
uploadFile(organizationId, apiKey, version, path, name)
)

@@ -57,6 +55,11 @@ );

})
.option("version", {
alias: "v",
type: "string",
describe: "The current version of your deploy",
})
.option("path", {
alias: "p",
type: "string",
default: "/build/static/js",
default: "/build",
describe: "Sets the directory of where the sourcemaps are",

@@ -100,10 +103,12 @@ })

async function uploadFile(organizationId, apiKey, filePath, fileName) {
const query = `query UploadSourceMap($apiKey: String!, $file: Upload!) {
uploadSourceMap(apiKey: $apiKey, file: $file)
}`;
async function uploadFile(organizationId, apiKey, version, filePath, fileName) {
const fileContent = readFileSync(filePath);
// Setting up S3 upload parameters
const bucketPath = `${organizationId}/${fileName}`;
var bucketPath;
if (version === null || version === undefined || version === "") {
bucketPath = `${organizationId}/${fileName}`;
} else {
bucketPath = `${organizationId}/${version}/${fileName}`;
}
const params = {

@@ -121,21 +126,2 @@ Bucket: BUCKET_NAME,

});
// fetch("/graphql", {
// method: "POST",
// headers: {
// "Content-Type": "application/json",
// Accept: "application/json",
// },
// body: JSON.stringify({
// query,
// variables: {
// apiKey,
// file,
// },
// }),
// });
}
function getS3Path() {
return ``;
}
{
"name": "@highlight-run/sourcemap-uploader",
"version": "0.0.6",
"version": "0.0.9",
"description": "Command line tool to upload source maps to Highlight",

@@ -19,5 +19,4 @@ "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