Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should return the deployments path', () => {
const expected = path.join(ospath.data(), 'polkadot-deployer', 'deployments');
const subject = new Files();
subject.deploymentsPath().should.equal(expected);
});
});
getProjectDataDirectory() {
const dataPath = ospath.data();
const projectDataPath = path.join(dataPath, 'Glicky');
if (!fs.existsSync(projectDataPath)) {
fs.mkdirSync(projectDataPath);
}
return projectDataPath;
}
constructor(config={}) {
this.config = JSON.parse(JSON.stringify(config));
if(!this.config.dataPath) {
this.config.dataPath = ospath.data();
} else {
this.config.dataPath = path.normalize(this.config.dataPath);
if (this.config.dataPath === '.') {
this.config.dataPath = process.cwd();
}
}
}
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const os = require('os')
const path = require('path')
const ospath = require('ospath')
const Promise = require('bluebird')
const la = require('lazy-ass')
const check = require('check-more-types')
const log = require('debug')('cypress:server:appdata')
const pkg = require('@packages/root')
const fs = require('../util/fs')
const cwd = require('../cwd')
const PRODUCT_NAME = pkg.productName || pkg.name
const OS_DATA_PATH = ospath.data()
const ELECTRON_APP_DATA_PATH = path.join(OS_DATA_PATH, PRODUCT_NAME)
if (!PRODUCT_NAME) {
throw new Error('Root package is missing name')
}
const getSymlinkType = function () {
if (os.platform() === 'win32') {
return 'junction'
}
return 'dir'
}
const isProduction = () => {
'use strict';
const APP_NAME = 'KongDash';
const VERSION = '0.3.0';
const electron = require('electron');
const path = require('path');
const ospath = require('ospath');
const jsonfile = require('jsonfile');
let absPath = path.dirname(__dirname), configFile = ospath.data() + '/' + APP_NAME + '/config.json';
let {app, ipcMain, BrowserWindow, Menu} = electron;
let mainWindow, appConfig = {kong: {}, app: {enableAnimation: true}};
let startMainWindow = function () {
mainWindow = new BrowserWindow({
backgroundColor: '#1A242D',
width: 1100,
height: 580,
center: true,
title: app.getName(),
minHeight: 500,
minWidth: 900,
icon: absPath + '/kongdash-256x256.png'
});
mainWindow.loadURL('file://' + absPath + '/src/initialize.html');