bigbrother-webpack-plugin
Advanced tools
Comparing version 1.5.0 to 1.6.1
1.5.0 / 2019-02-26 | ||
1.6.0 / 2019-02-26 | ||
================== | ||
@@ -4,0 +4,0 @@ |
@@ -5,3 +5,3 @@ import { ISatoriCreateBuild, IAdapter } from '../typings'; | ||
constructor(); | ||
postBuild(args: ISatoriCreateBuild, stats: object): Promise<void>; | ||
postBuild(args: ISatoriCreateBuild, _: object): Promise<void>; | ||
postDev(args: ISatoriCreateBuild, _: object): Promise<void>; | ||
@@ -12,3 +12,2 @@ uploadShameimaru(shameimaru: object): Promise<string>; | ||
private saveFile; | ||
private getStateFilePath; | ||
} |
@@ -8,3 +8,3 @@ "use strict"; | ||
var path_1 = require("path"); | ||
var utils_1 = require("../utils"); | ||
// import { generateStatsFile } from '../utils'; | ||
var log = debug('bigbrother-webpack-plugin:adapter'); | ||
@@ -16,28 +16,19 @@ var SatoriAdapter = /** @class */ (function () { | ||
} | ||
SatoriAdapter.prototype.postBuild = function (args, stats) { | ||
SatoriAdapter.prototype.postBuild = function (args, _) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var stateFilePath, _1; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
log('Post build args:'); | ||
log(JSON.stringify(args, null, 2)); | ||
if (this.ifSkipBuildReport(args)) { | ||
return [2 /*return*/]; | ||
} | ||
_a.label = 1; | ||
case 1: | ||
_a.trys.push([1, 3, , 4]); | ||
stateFilePath = this.getStateFilePath(); | ||
return [4 /*yield*/, utils_1.generateStatsFile(stateFilePath, stats)]; | ||
case 2: | ||
_a.sent(); | ||
this.saveFile(args); | ||
return [3 /*break*/, 4]; | ||
case 3: | ||
_1 = _a.sent(); | ||
log(_1); | ||
return [3 /*break*/, 4]; | ||
case 4: return [2 /*return*/]; | ||
log('Post build args:'); | ||
log(JSON.stringify(args, null, 2)); | ||
if (this.ifSkipBuildReport(args)) { | ||
return [2 /*return*/]; | ||
} | ||
try { | ||
// const stateFilePath = this.getStateFilePath(); | ||
// await generateStatsFile(stateFilePath, stats); | ||
this.saveFile(args); | ||
} | ||
catch (_) { | ||
log(_); | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
@@ -60,3 +51,3 @@ }); | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var url, _2; | ||
var url, _1; | ||
return tslib_1.__generator(this, function (_a) { | ||
@@ -71,4 +62,4 @@ switch (_a.label) { | ||
case 2: | ||
_2 = _a.sent(); | ||
log(_2); | ||
_1 = _a.sent(); | ||
log(_1); | ||
return [3 /*break*/, 3]; | ||
@@ -122,17 +113,4 @@ case 3: return [2 /*return*/, url]; | ||
}; | ||
SatoriAdapter.prototype.getStateFilePath = function () { | ||
var statsFilePath = ''; | ||
switch (process.env.PLATFORM_TYPE) { | ||
case 'BASEMENT': | ||
statsFilePath = path_1.join(process.env.HOME, 'stats.json'); | ||
break; | ||
case 'LINKE': | ||
statsFilePath = path_1.join(process.env.STATIC_BUILD_SRC, 'stats.json'); | ||
break; | ||
default: | ||
} | ||
return statsFilePath; | ||
}; | ||
return SatoriAdapter; | ||
}()); | ||
exports.default = SatoriAdapter; |
{ | ||
"name": "bigbrother-webpack-plugin", | ||
"version": "1.5.0", | ||
"version": "1.6.1", | ||
"description": "bigbrother client", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
19
31577
732