Browse Source

Fixed: Requirements uses local values instead of remote ones.

tags/v1.5.2-early
Ivan Bravo Bravo 2 months ago
parent
commit
bf0827cc8f

+ 0
- 1
src/.env-cmdrc.js View File

@@ -10,7 +10,6 @@ module.exports = {
},
"development": {
"NODE_ENV": "development",
"PUBLIC_URL": "http://45bbcde32f40.ngrok.io",
"ROLLBAR_ACCESS_TOKEN": "e62c909ec771492fa7f371dc61eea092",
"LOGROCKET_ACCESS_TOKEN": "5iqym0/dreamtime-development",
"DREAMTRACK_HOST": "localhost:3333",

+ 1
- 1
src/modules/services/dreamtrack.js View File

@@ -45,7 +45,7 @@ export class DreamTrackService extends BaseService {
* @type {string}
*/
get host() {
const host = process.env.DREAMTRACK_HOST || 'localhost:3000'
const host = process.env.DREAMTRACK_HOST || 'track.dreamnet.tech'
const protocol = host === 'track.dreamnet.tech' ? 'wss' : 'ws'

return `${protocol}://${host}`

+ 8
- 2
src/modules/system/requirements.js View File

@@ -143,8 +143,14 @@ export const requirements = {
version = await power.getVersion()
const currentVersion = `v${process.env.npm_package_version}`

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.7')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.7')
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.8')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.8')

console.log({
version,
minimum,
maximum,
})

if (compareVersions.compare(version, minimum, '<')) {
return false

+ 2
- 2
src/modules/updater/dreampower.js View File

@@ -73,8 +73,8 @@ class DreamPowerUpdater extends BaseUpdater {
_getLatestCompatible(releases) {
const currentVersion = `v${process.env.npm_package_version}`

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.7')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.7')
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.8')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.8')

if (!minimum) {
return null

+ 3
- 3
src/plugins/boot.js View File

@@ -26,9 +26,6 @@ localStorage.debug = 'none'
*
*/
async function setupRemote() {
// Analytics & Remote settings.
await dreamtrack.setup()

Promise.all([
rollbar.setup(),
logrocket.setup(),
@@ -49,6 +46,9 @@ async function setupRemote() {
*
*/
async function setup() {
// Analytics & Remote settings.
await dreamtrack.setup()

// Requirements check.
await requirements.setup()


Loading…
Cancel
Save