Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function publishFiles(filelist) {
var CancellationToken = require('electron-builder-http/out/CancellationToken').CancellationToken;
var GitHubPublisher = require('electron-publish/out/gitHubPublisher').GitHubPublisher;
var publishConfig = replacePublishEnvironmentVars(require('./scripts/config/publish.json'));
const context = {
cancellationToken: new CancellationToken(),
progress: null
};
const publisher = new GitHubPublisher(
context,
publishConfig,
pjson.version, {
publish: "always",
draft: true,
prerelease: false
});
const errorlist = [];
const uploads = filelist.map(file => {
return publisher.upload({ file })
.catch((err) => {
errorlist.push(err.response ? `Failed to upload ${file}, http status code ${err.response.statusCode}` : err);
function publishFiles(filelist) {
var CancellationToken = require('electron-builder-http/out/CancellationToken').CancellationToken;
var GitHubPublisher = require('electron-publish/out/gitHubPublisher').GitHubPublisher;
var publishConfig = replacePublishEnvironmentVars(require('./scripts/config/publish.json'));
const context = {
cancellationToken: new CancellationToken(),
progress: null
};
const publisher = new GitHubPublisher(
context,
publishConfig,
pjson.version, {
publish: "always",
draft: true,
prerelease: false
});
const errorlist = [];
const uploads = filelist.map(file => {
return publisher.upload({ file })
.catch((err) => {
errorlist.push(err.response ? `Failed to upload ${file}, http status code ${err.response.statusCode}` : err);