Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bitgenics/fab-upload-cli

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitgenics/fab-upload-cli - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

lib/utils/environmentVariableUtils.d.ts

4

lib/handlers/handleBuildFailure.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const git_1 = require("../utils/git");
const utils_1 = require("../utils");
const log_1 = require("../utils/log");

@@ -9,3 +9,3 @@ const uploadMetadata_1 = require("../utils/uploadMetadata");

log_1.log("Uploading Build record to Linc");
const gitMetaData = await git_1.getGitData();
const gitMetaData = await utils_1.getGitMetaData();
log_1.log("Uploading commit data to Linc");

@@ -12,0 +12,0 @@ const response = await uploadMetadata_1.default({

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
const git_1 = require("../utils/git");
const utils_2 = require("../utils");
const log_1 = require("../utils/log");

@@ -9,3 +9,5 @@ const uploadMetadata_1 = require("../utils/uploadMetadata");

const duplicateBundle = async (sitename, api_key, bundle_info, buildInfo) => {
const gitMetaData = await git_1.getGitData();
log_1.log("Gathering commit data");
const gitMetaData = await utils_2.getGitMetaData();
log_1.log("Uploading commit data to Linc");
const response = await uploadMetadata_1.default({

@@ -12,0 +14,0 @@ sitename,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
const git_1 = require("../utils/git");
const utils_2 = require("../utils");
const log_1 = require("../utils/log");

@@ -15,3 +15,3 @@ const uploadMetadata_1 = require("../utils/uploadMetadata");

log_1.log("Gathering commit data");
const gitMetaData = await git_1.getGitData();
const gitMetaData = await utils_2.getGitMetaData();
log_1.log("Uploading commit data to Linc");

@@ -18,0 +18,0 @@ const response = await uploadMetadata_1.default({

@@ -5,1 +5,2 @@ export declare const doesFileExist: (filePath: string) => boolean | undefined;

export declare const composeLincCommitPageUrl: (sitename: string, commitHash: string) => void;
export declare const getGitMetaData: () => Promise<any>;

@@ -5,2 +5,5 @@ "use strict";

const crypto = require("crypto");
const git_1 = require("./git");
const environmentVariableUtils_1 = require("./environmentVariableUtils");
const log_1 = require("./log");
exports.doesFileExist = (filePath) => {

@@ -26,1 +29,24 @@ try {

exports.composeLincCommitPageUrl = (sitename, commitHash) => console.log(`https://app.linc.sh/sites/${sitename}/commit/${commitHash}`);
exports.getGitMetaData = async () => {
const platform = environmentVariableUtils_1.getCI();
console.log({ platform });
const supportedPlatform = platform !== "unknown";
console.log({ supportedPlatform });
if (supportedPlatform) {
// pull branch & repo from environment variables
// using provided CI platform
const branch = environmentVariableUtils_1.getBranch(platform);
const repository = environmentVariableUtils_1.getRepo(platform);
const lastCommit = await git_1.getLastCommit();
const commitMetadata = Object.assign(Object.assign({}, lastCommit), { branch,
repository });
console.log({ commitMetadata });
return commitMetadata;
}
else {
log_1.note("Note: Unsupported CI platform detected");
// fallback
const lastCommit = await git_1.getLastCommit();
return Object.assign(Object.assign({}, lastCommit), { branch: "unknown-branch", repository: "unkown-repository" });
}
};
{
"name": "@bitgenics/fab-upload-cli",
"version": "0.1.1",
"version": "0.1.2",
"author": "Tom Trinca @plexey",

@@ -5,0 +5,0 @@ "bin": {

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