Browse Source

🎉 v1.4.4

- Editor and Portable version fixes.
- Photo name fix.
- Release script improvements.
tags/v1.4.4
Ivan Bravo Bravo 4 months ago
parent
commit
e18d538e0b

+ 3
- 6
.github/workflows/ci.yml View File

@@ -2,9 +2,6 @@ name: CI/CD

on:
push:
branches:
- release/*
- hotfix/*
tags:
- v*

@@ -75,19 +72,19 @@ jobs:

- name: Lint
working-directory: src
run: yarn lint
run: yarn run lint

- name: Build (Installer)
working-directory: src
env:
GITHUB_SHA: ${{ github.sha }}
run: yarn build
run: yarn run build

- name: Build (Portable)
working-directory: src
env:
BUILD_PORTABLE: true
run: yarn build:electron
run: yarn run build

- name: Release
working-directory: src/scripts

+ 16
- 11
README.md View File

@@ -8,41 +8,46 @@
<p align="center">
<a href="https://github.com/dreamnettech/dreamtime/actions"><img src="https://github.com/dreamnettech/dreamtime/workflows/CI/CD/badge.svg" /></a>
<a href="https://github.com/dreamnettech/dreamtime/releases"><img src="https://img.shields.io/github/downloads/dreamnettech/dreamtime/total?logo=github&logoColor=white" /></a>
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime?ref=badge_shield" target="_blank"><img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime.svg?type=shield" /></a>
<a href="https://www.codacy.com/app/kolessios/dreamtime?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dreamnettech/dreamtime&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/0ecb8ba6eeae42e7bfd0d414d1bacee1" /></a>
<a href="https://codeclimate.com/github/dreamnettech/dreamtime/maintainability"><img src="https://api.codeclimate.com/v1/badges/8d325515768f221e235f/maintainability" /></a>
</p>

<p align="center">
<a href="https://time.dreamnet.tech"><img src="https://img.shields.io/website?url=https%3A%2F%2Ftime.dreamnet.tech" /></a>
<a href="https://chat.dreamnet.tech"><img src="https://img.shields.io/website?url=https%3A%2F%2Fchat.dreamnet.tech&label=chat" /></a>
<a href="CONTRIBUTING.md#pull-requests"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
<a href="https://discord.gg/6YXT5ZA"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
</p>

## Introduction

DreamTime is an open-source and super-improved version of DeepNude to make your dreams come true. 💖
🙈 With DreamTime you can nudify photos of people easily.

- **Free.** DreamTime is a free and open-source user interface to nudify photos.
- **Advanced UI.** DreamTime is a stable and easy to use UI. With several options and tools that will allow you to quickly nudify photos.
- **Multi platform.** DreamTime is available for Windows, Linux and macOS.
- **It is simply the best.** Install DreamTime and discover why it is better than DeepNude. [More information?](https://time.dreamnet.tech)
- **Totally free.** DreamTime is a free and open-source user interface to nudify photos.
- **Cool UI.** Nudify photos easily with a friendly design.
- **Multi platform.** Available for Windows, Linux and macOS.
- **It is simply the best.** Install DreamTime and discover why it is better than DeepNude. [Discover more!](https://time.dreamnet.tech)

## Installation

You can see how easy it is to install DreamTime on our [installation page](https://time.dreamnet.tech/docs/installation).
💻 Visit the [installation page](https://time.dreamnet.tech/docs/installation) to download and install DreamTime.

## Development

Start hacking DreamTime or create PR to improve it. Visit the [Getting Started](https://time.dreamnet.tech/docs/development/getting-started) page for more information.
👩‍💻 Start hacking DreamTime or create PR to improve it.

Visit the [Getting Started](https://time.dreamnet.tech/docs/development/getting-started) page for more information.

## Contact

Feel free to contact us and leave your [feedback](https://time.dreamnet.tech/docs/support/feedback).
📧 Stay in touch with the developers and other users:

- [Chat](https://chat.dreamnet.tech)
- [Forum](https://forum.dreamnet.tech)
- [Feedback](https://time.dreamnet.tech/docs/support/feedback)

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here and in the about section of our apps, with a link to your website. [[Become a sponsor](https://www.patreon.com/join/dreamnet/checkout?rid=4426478)]
🥰 Support this project by becoming a sponsor. Your logo will show up here and in the about section of our apps, with a link to your website. [[Become a sponsor](https://www.patreon.com/join/dreamnet/checkout?rid=4426478)]

## License


BIN
assets/preview.png View File


+ 4
- 0
src/components/Queue/QueuePhoto.vue View File

@@ -25,6 +25,8 @@
</template>

<script>
import normalize from 'normalize-path'

export default {
props: {
photo: {
@@ -45,6 +47,8 @@ export default {
}
}

photoPath = normalize(photoPath)

return {
backgroundImage: `url("${photoPath}")`,
}

+ 2
- 2
src/electron/src/modules/tools/index.js View File

@@ -11,7 +11,7 @@ import * as paths from './paths'
import * as shell from './shell'
import * as power from './power'
import * as fs from './fs'
import * as photo from './photo'
// import * as photo from './photo'
import * as instagram from './instagram'

// eslint-disable-next-line import/no-cycle
@@ -20,6 +20,6 @@ export { shell }
export { paths }
export { power }
export { instagram }
export { photo }
// export { photo }
export { system } from './system'
export utils from 'electron-util'

+ 8
- 2
src/modules/nudify/photo-run.js View File

@@ -1,3 +1,4 @@
/* eslint-disable no-control-regex */
// DreamTime.
// Copyright (C) DreamNet. All rights reserved.
//
@@ -13,6 +14,7 @@ import {
} from 'lodash'
import deferred from 'deferred'
import Swal from 'sweetalert2/dist/sweetalert2.js'
import emojiStrip from 'emoji-strip'
import { File } from '../file'
import { Timer } from '../timer'
import cliErrors from '../config/cli-errors'
@@ -94,9 +96,13 @@ export class PhotoRun {
const now = Date.now() + random(1, 100)
const { file } = this.photo

const originalName = trim(kebabCase(truncate(deburr(file.name), { length: 20, omission: '' })))
let name = deburr(file.name)
name = emojiStrip(name)
name = name.replace(/[^\x00-\x7F]/g, '')
name = kebabCase(trim(name))
name = truncate(name, { length: 20, omission: '' })

return `${originalName}-RUN${this.id}-${now}-dreamtime${file.extension}`
return `${name}-RUN${this.id}-${now}-dreamtime${file.extension}`
}

constructor(id, photo) {

+ 3
- 2
src/modules/nudify/photo.js View File

@@ -99,12 +99,12 @@ export class Photo {
isMaskfin = false

/**
* @type {require('cropperjs').default}
* @type {import('cropperjs').default}
*/
cropper

/**
* @type {require('tui-image-editor').default}
* @type {import('tui-image-editor')}
*/
editor

@@ -525,6 +525,7 @@ export class Photo {

await new Promise((resolve) => {
this.queue.on('finished', () => {
consola.track('DREAM_END')
resolve()
})
})

+ 4
- 0
src/modules/system/requirements.js View File

@@ -95,6 +95,10 @@ export const requirements = {
consola.info(this.values)
},

/**
*
* @param {string} path
*/
isValidFolder(path) {
const original = clone(path)


+ 38
- 40
src/package.json View File

@@ -4,7 +4,7 @@
"description": "An open-source and super-improved version of DeepNude.",
"author": "DreamNet",
"homepage": "https://time.dreamnet.tech",
"version": "1.4.3",
"version": "1.4.4",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",
"private": true,
@@ -27,7 +27,7 @@
"build:nuxt": "yarn production nuxt build",
"build:babel": "yarn production babel electron/src --out-dir electron/dist --minified",
"build:electron": "yarn production electron-builder --publish=never --x64",
"build": "yarn build:nuxt && yarn build:babel && modclean --run && yarn build:electron",
"build": "yarn build:nuxt && yarn build:babel && modclean --patterns default:safe,default:caution --run && yarn build:electron",
"preview:electron": "env-cmd -e default,production,preview --no-override electron .",
"preview:production": "yarn build:nuxt && yarn build:babel && yarn preview:electron"
},
@@ -55,31 +55,28 @@
"@adonisjs/websocket-client": "^1.0.9",
"@dreamnet/logplease": "^1.0.0",
"@dreamnet/queue": "^0.1.2",
"@fortawesome/fontawesome-svg-core": "^1.2.26",
"@fortawesome/free-brands-svg-icons": "^5.12.0",
"@fortawesome/free-regular-svg-icons": "^5.12.0",
"@fortawesome/free-solid-svg-icons": "^5.12.0",
"@fortawesome/fontawesome-svg-core": "^1.2.27",
"@fortawesome/free-brands-svg-icons": "^5.12.1",
"@fortawesome/free-regular-svg-icons": "^5.12.1",
"@fortawesome/free-solid-svg-icons": "^5.12.1",
"@fortawesome/vue-fontawesome": "^0.1.9",
"@sweetalert2/theme-dark": "^3.1.0",
"axios": "^0.19.2",
"better-queue-memory": "^1.0.4",
"caller-callsite": "^4.1.0",
"combokeys": "^3.0.1",
"compare-versions": "^3.5.1",
"compare-versions": "^3.6.0",
"cropperjs": "^1.5.6",
"cryptr": "^6.0.1",
"dayjs": "^1.8.18",
"dayjs": "^1.8.20",
"deferred": "^0.7.11",
"delay": "^4.3.0",
"electron-context-menu": "^0.15.2",
"electron-util": "^0.13.1",
"electron-context-menu": "^0.16.0",
"electron-util": "^0.14.0",
"emoji-strip": "^1.0.1",
"fabric": "^3.6.0",
"fabric": "^3.6.2",
"filesize": "^6.0.1",
"form-data": "^3.0.0",
"fs-extra": "^8.1.0",
"he": "^1.2.0",
"image-js": "^0.21.8",
"instagram-save": "^1.3.2",
"intro.js": "^2.9.3",
"is-online": "^8.2.1",
@@ -87,10 +84,10 @@
"lodash": "^4.17.15",
"logrocket": "^1.0.6",
"md5-file": "^4.0.0",
"melanke-watchjs": "^1.5.0",
"melanke-watchjs": "^1.5.2",
"mime-types": "^2.1.26",
"node-7z": "^2.0.5",
"nucleus-nodejs": "^3.0.3",
"node-7z": "^2.1.1",
"normalize-path": "^3.0.0",
"nuxt": "^2.11.0",
"patch-package": "^6.2.0",
"popmotion": "^8.7.1",
@@ -101,61 +98,62 @@
"semver-regex": "^3.1.1",
"slash": "^3.0.0",
"sourcemapped-stacktrace": "^1.1.11",
"sweetalert2": "^9.7.1",
"systeminformation": "^4.21.0",
"tippy.js": "^5.1.4",
"tui-image-editor": "^3.7.3",
"unzipper": "^0.10.7",
"sweetalert2": "^9.7.2",
"systeminformation": "^4.22.1",
"tippy.js": "^5.2.1",
"tui-image-editor": "3.8.0",
"unzipper": "^0.10.8",
"uuid": "^3.4.0",
"vue-slider-component": "^3.1.0"
"vue-slider-component": "^3.1.1"
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-export-default-from": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/plugin-transform-regenerator": "^7.8.3",
"@nuxtjs/eslint-config": "^2.0.0",
"@nuxtjs/eslint-config": "^2.0.2",
"@nuxtjs/eslint-module": "^1.1.0",
"@nuxtjs/tailwindcss": "^1.3.1",
"@octokit/rest": "^16.40.1",
"@nuxtjs/tailwindcss": "^1.3.2",
"@octokit/rest": "^16.43.1",
"babel-eslint": "^10.0.3",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"babel-watch": "^7.0.0",
"cross-env": "^7.0.0",
"electron": "^7.1.10",
"electron": "^8.0.1",
"electron-builder": "^22.3.2",
"electron-devtools-installer": "^2.2.4",
"env-cmd": "^10.0.1",
"env-cmd": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-standard": ">=14.1.0",
"eslint-import-resolver-node": "^0.3.3",
"eslint-import-resolver-nuxt": "^0.1.5",
"eslint-import-resolver-nuxt": "^1.0.0",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-plugin-import": ">=2.20.0",
"eslint-plugin-jest": ">=23.6.0",
"eslint-plugin-import": ">=2.20.1",
"eslint-plugin-jest": ">=23.7.0",
"eslint-plugin-lodash": "^6.0.0",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-node": ">=11.0.0",
"eslint-plugin-nuxt": ">=0.5.0",
"eslint-plugin-nuxt": ">=0.5.1",
"eslint-plugin-promise": ">=4.2.1",
"eslint-plugin-standard": ">=4.0.1",
"eslint-plugin-vue": "^6.1.2",
"eslint-plugin-vue": "^6.2.1",
"fibers": "^4.0.2",
"flow-bin": "^0.117.0",
"husky": "^4.2.1",
"lint-staged": "^10.0.4",
"flow-bin": "^0.118.0",
"husky": "^4.2.3",
"lint-staged": "^10.0.7",
"mocha": "^7.0.1",
"modclean": "^3.0.0-beta.1",
"ndjson-parse": "^1.0.4",
"ngrok": "^3.2.7",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"spectron": "^10.0.0",
"tailwindcss": "^1.1.4",
"spectron": "^10.0.1",
"tailwindcss": "^1.2.0",
"tailwindcss-alpha": "hacknug/tailwindcss-alpha#feature/tests",
"worker-loader": "^2.0.0"
}

+ 1
- 1
src/package.min.json View File

@@ -4,7 +4,7 @@
"description": "An open-source and super-improved version of DeepNude.",
"author": "DreamNet",
"homepage": "https://time.dreamnet.tech",
"version": "1.4.3",
"version": "1.4.4",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",
"private": true

+ 1
- 1
src/pages/about.vue View File

@@ -33,7 +33,7 @@

<p>
<span class="stats__value">{{ stats | stat('events.total.DREAM_COMPLETED') }}</span>
<span v-tooltip="{ content: 'Amount of photos that have been nudified.', placement: 'bottom' }" class="stats__label">nudifications.</span>
<span v-tooltip="{ content: 'Number of times a successful nudification has been completed.', placement: 'bottom' }" class="stats__label">nudifications.</span>
</p>
</div>


+ 21
- 11
src/pages/alerts.vue View File

@@ -1,15 +1,18 @@
<template>
<div class="alerts content__body">
<div class="wrapper">
<!-- Models Folder -->
<div v-if="!requirements.folders.models" class="notification notification--danger">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>The <strong>Models</strong> folder has <strong>invalid characters</strong>. Please change the location of the folder in the <nuxt-link to="/settings/folders">settings</nuxt-link>.</span>
<span v-if="!$dream.isPortable">The <strong>Models</strong> folder has <strong>invalid characters</strong>. Please change the location of the folder in the <nuxt-link to="/settings/folders">settings</nuxt-link>.</span>
<span v-else>The place where you have extracted {{ $dream.name }} has <strong>invalid characters</strong>. Please move the application to another place.</span>
</div>
<div v-else class="notification notification--success">
<span class="icon"><font-awesome-icon icon="check-circle" /></span>
<span>The <strong>Models</strong> folder is valid.</span>
<span>The <strong>Models</strong> folder is valid. There should be no problems saving the nudified photos.</span>
</div>

<!-- GPU -->
<div v-if="$settings.processing.device === 'GPU'">
<div v-if="!requirements.recommended.vram" class="notification notification--danger">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
@@ -17,26 +20,30 @@
</div>
<div v-else class="notification notification--success">
<span class="icon"><font-awesome-icon icon="check-circle" /></span>
<span>Your NVIDIA GPU meets the recommended amount of VRAM.</span>
<span>Your NVIDIA GPU meets the minimum amount of VRAM.</span>
</div>
</div>

<!-- RAM -->
<div v-if="!requirements.recommended.ram" class="notification notification--warning">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>Your system has less than <strong>8 GB</strong> of RAM. Please buy more RAM!</span>
</div>
<div v-else class="notification notification--success">
<span class="icon"><font-awesome-icon icon="check-circle" /></span>
<span>Your system meets the recommended amount of RAM.</span>
<span>Your system meets the minimum amount of RAM.</span>
</div>

<div v-if="!requirements.windows.media" class="notification notification--warning">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>The <strong>Windows Media Feature Pack</strong> is not installed. You can <a href="https://www.microsoft.com/en-us/software-download/mediafeaturepack" target="_blank">install it</a> or ignore this warning.</span>
</div>
<div v-else class="notification notification--success">
<span class="icon"><font-awesome-icon icon="check-circle" /></span>
<span>The Windows Media Feature Pack is installed.</span>
<!-- Windows Media Feature Pack -->
<div v-if="is.windows">
<div v-if="!requirements.windows.media" class="notification notification--warning">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>The <strong>Windows Media Feature Pack</strong> is not installed. You can <a href="https://www.microsoft.com/en-us/software-download/mediafeaturepack" target="_blank">install it</a> or ignore this warning.</span>
</div>
<div v-else class="notification notification--success">
<span class="icon"><font-awesome-icon icon="check-circle" /></span>
<span>The Windows Media Feature Pack is installed.</span>
</div>
</div>

<div v-if="hasAlerts" class="legend">
@@ -55,9 +62,12 @@
<script>
import { requirements } from '~/modules/system'

const { is } = $provider.util

export default {
data: () => ({
requirements,
is,
}),

computed: {

+ 1
- 1
src/pages/nudify/_id/editor.vue View File

@@ -2,7 +2,7 @@
<div class="nudify-editor">
<div v-if="photo.scaleMode === 'cropjs' || photo.scaleMode === 'overlay'" class="notification notification--warning">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>The changes you make in the editor will not be reflected in the nudification until you click on the <strong>Reload</strong> button of the Crop/Overlay tool.</span>
<span>The changes will not be reflected in the nudification until you click on the <strong>Reload</strong> button of the Crop/Overlay tool.</span>
</div>

<div ref="imageEditor" class="editor" data-private />

src/patches/tui-image-editor+3.8.0.patch
File diff suppressed because it is too large
View File


+ 101
- 63
src/scripts/release.js View File

@@ -9,14 +9,15 @@
//
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2020.

const Octokit = require('@octokit/rest')
const { Octokit } = require('@octokit/rest')
const mime = require('mime-types')
const { startsWith, truncate, isPlainObject } = require('lodash')
const { startsWith, truncate, get } = require('lodash')
const fs = require('fs')
const path = require('path')
const axios = require('axios')
const FormData = require('form-data')
const Cryptr = require('cryptr')
const ndjson = require('ndjson-parse')
const pkg = require('../package.json')

// Settings
@@ -30,17 +31,57 @@ const cryptr = new Cryptr(process.env.SECRET_KEY)
// Octokit
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })

// Releases list
const releases = []
// Dev Output
const output = {
responses: [],
commands: [],
urls: {
windows: [],
ubuntu: [],
macos: [],
},
}

/**
*
* @param {*} payload
*/
function addResponse(payload) {
output.responses.push(payload)
}

/**
*
* @param {string} platform
* @param {string} url
*/
function addUrl(url, fileName) {
let platform

if (fileName.includes('windows')) {
platform = 'windows'
}

if (fileName.includes('ubuntu')) {
platform = 'ubuntu'
}

function addRelease(payload) {
if (isPlainObject(payload)) {
payload = cryptr.encrypt(JSON.stringify(payload))
} else {
payload = cryptr.encrypt(payload)
if (fileName.includes('macos')) {
platform = 'macos'
}

releases.push(payload)
output.urls[platform].unshift(url)
}

/**
*
* @param {string} hash
* @param {string} fileName
*/
function addCommand(hash, fileName) {
output.commands.push(`ipfs files cp /ipfs/${hash} /DreamNet/Public/Projects/DreamTime/Releases/${VERSION}/${fileName}`)

addUrl(`https://link.dreamnet.tech/ipfs/CID/${fileName}`, fileName)
}

/**
@@ -121,7 +162,7 @@ function Release(extension) {
'content-type': mime.lookup(this.filePath),
},
name: this.fileName,
file: fs.createReadStream(this.filePath),
data: fs.createReadStream(this.filePath),
})

return response
@@ -131,7 +172,12 @@ function Release(extension) {
}
}

this.uploadTo = async (url, formData, headers = {}) => {
/**
* @param {string} url
* @param {FormData} formData
* @param {object} customHeaders
*/
this.uploadTo = async (url, formData, customHeaders = {}) => {
try {
if (!formData) {
formData = new FormData()
@@ -139,75 +185,71 @@ function Release(extension) {

formData.append('file', fs.createReadStream(this.filePath), { filename: this.fileName })

console.log(`Uploading to ${url}`)
const headers = formData.getHeaders(customHeaders)

console.log(`Uploading ${this.fileName} to ${url}`)

let response = await axios.post(url, formData, {
headers: {
...formData.getHeaders(),
...headers,
},
timeout: (10 * 60 * 1000),
headers,
timeout: (15 * 60 * 1000),
maxContentLength: Infinity,
maxBodyLength: Infinity,
})

response = response.data

addRelease(response)
addResponse(response)

return response
} catch (err) {
console.warn(`${url} error`, err)
console.warn(`${url} error`, {
code: err.code,
status: get(err, 'response.status'),
statusText: get(err, 'response.statusText'),
})

return null
}
}

this.uploadToAnonFile = () => this.uploadTo('https://api.anonfile.com/upload')

this.uploadToAnon = () => {
this.uploadToDreamLink = async () => {
const formData = new FormData()
formData.append('expires', '6m')
formData.append('pin', 'false')

return this.uploadTo('https://api.anonymousfiles.io', formData)
}

this.uploadToFileIo = () => {
const formData = new FormData()
formData.append('expires', '1y')
let response = await this.uploadTo('https://ipfs.valeria.dreamnet.tech/api/v0/add', formData, {
Authorization: `Basic ${process.env.DREAMLINK_TOKEN}`,
})

return this.uploadTo('https://file.io', formData)
if (response) {
response = ndjson(response)
addCommand(response[response.length - 1].Hash, this.fileName)
}
}

this.uploadToInfura = () => {
this.uploadToInfura = async () => {
const formData = new FormData()
formData.append('pin', 'true')

return this.uploadTo('https://ipfs.infura.io:5001/api/v0/add', formData)
}

this.uploadToDreamLink = () => this.uploadTo('http://api.link.dreamnet.tech/add', null, {
Authorization: `Basic ${process.env.DREAMLINK_TOKEN}`,
})

this.upload = async () => {
if (!fs.existsSync(this.filePath)) {
console.log('No release found!', {
filePath: this.filePath,
fileName: this.fileName,
})
let response = await this.uploadTo('https://ipfs.infura.io:5001/api/v0/add', formData)

return
if (response) {
response = ndjson(response)
addUrl(`https://ipfs.infura.io/ipfs/${response[response.length - 1].Hash}`, this.fileName)
}
}

if (!GitHub.isTagRelease) {
return
}
this.uploadToPinata = async () => {
const response = await this.uploadTo('https://api.pinata.cloud/pinning/pinFileToIPFS', null, {
pinata_api_key: process.env.PINATA_KEY,
pinata_secret_api_key: process.env.PINATA_SECRET,
})

await this.uploadToGithub()
await this.uploadToDreamLink()
if (response) {
addUrl(`https://gateway.pinata.cloud/ipfs/${response.IpfsHash}`, this.fileName)
}
}

this.uploadOthers = async () => {
this.upload = async () => {
if (!fs.existsSync(this.filePath)) {
console.log('No release found!', {
filePath: this.filePath,
@@ -217,14 +259,13 @@ function Release(extension) {
return
}

const workload = []

workload.push([
this.uploadToAnon(),
this.uploadToFileIo(),
])
if (GitHub.isTagRelease) {
await this.uploadToGithub()
}

await Promise.all(workload)
await this.uploadToDreamLink()
await this.uploadToPinata()
await this.uploadToInfura()
}
}

@@ -239,10 +280,7 @@ async function main() {
await installer.upload()
await portable.upload()

await installer.uploadOthers()
await portable.uploadOthers()

console.log(releases)
console.log(cryptr.encrypt(JSON.stringify(output)))
}

main()

Loading…
Cancel
Save