@flareapp/flare-webpack-plugin-sourcemap
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,42 +0,16 @@ | ||
define("util", ["require", "exports", "child_process"], function (require, exports, child_process_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function clCommand(command) { | ||
try { | ||
return child_process_1.execSync(command, { cwd: __dirname, encoding: 'utf8' }).replace('\n', ''); | ||
} | ||
catch (error) { | ||
return ''; | ||
} | ||
(function (factory) { | ||
if (typeof module === "object" && typeof module.exports === "object") { | ||
var v = factory(require, exports); | ||
if (v !== undefined) module.exports = v; | ||
} | ||
function getGitInfo(path) { | ||
return { | ||
hash: clCommand(`git -C ${path} log --pretty=format:'%H' -n 1`), | ||
message: clCommand(`git -C ${path} log --pretty=format:'%s' -n 1`), | ||
tag: clCommand(`git -C ${path} describe --tags --abbrev=0`), | ||
remote: clCommand(`git -C ${path} config --get remote.origin.url`), | ||
isDirty: !!clCommand(`git -C ${path} status -s`), | ||
}; | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "webpack", "zlib", "axios", "./util"], factory); | ||
} | ||
exports.getGitInfo = getGitInfo; | ||
function flareLog(message, isError = false) { | ||
const formattedMessage = '@flareapp/flare-webpack-plugin-sourcemap: ' + message; | ||
if (isError) { | ||
console.error('\n' + formattedMessage + '\n'); | ||
return; | ||
} | ||
console.log('\n' + formattedMessage + '\n'); | ||
} | ||
exports.flareLog = flareLog; | ||
function uuidv4() { | ||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { | ||
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8; | ||
return v.toString(16); | ||
}); | ||
} | ||
exports.uuidv4 = uuidv4; | ||
}); | ||
define("index", ["require", "exports", "webpack", "zlib", "axios", "util"], function (require, exports, webpack_1, zlib_1, axios_1, util_1) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const webpack_1 = require("webpack"); | ||
const zlib_1 = require("zlib"); | ||
const axios_1 = require("axios"); | ||
const util_1 = require("./util"); | ||
class FlareWebpackPluginSourcemap { | ||
@@ -43,0 +17,0 @@ constructor({ key, apiEndpoint = 'https://flareapp.io/api/sourcemaps', runInDevelopment = false, versionId = util_1.uuidv4(), collectGitInformation = false, }) { |
{ | ||
"name": "@flareapp/flare-webpack-plugin-sourcemap", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -5,3 +5,3 @@ { | ||
"lib": ["es2017"], | ||
"module": "amd", | ||
"module": "umd", | ||
"moduleResolution": "node", | ||
@@ -14,3 +14,3 @@ "noUnusedLocals": true, | ||
"target": "esnext", | ||
"outFile": "dist/index.js" | ||
"outDir": "dist" | ||
}, | ||
@@ -17,0 +17,0 @@ "include": ["src/**/*"], |
12900
295