mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
api: lint **everything**
This commit is contained in:
parent
216451d1aa
commit
60c004eea9
22 changed files with 764 additions and 550 deletions
|
@ -1,25 +1,25 @@
|
|||
// Globals are things the user shouldn't change in config, but is good to not use inline constants for
|
||||
const is_docker = require("is-docker")
|
||||
const fs = require("fs")
|
||||
const platform = `${is_docker() ? "docker" : "baremetal"}-${
|
||||
fs.read_file_sync("/etc/os-release")
|
||||
const is_docker = require('is-docker');
|
||||
const fss = require('fs');
|
||||
const platform = `${is_docker() ? 'docker' : 'baremetal'}-${
|
||||
fss.read_file_sync('/etc/os-release')
|
||||
.toString()
|
||||
.split("\n")
|
||||
.find(x=>x.startsWith("ID"))
|
||||
.replace("ID=","")
|
||||
}`
|
||||
.split('\n')
|
||||
.find(x=>x.startsWith('ID'))
|
||||
.replace('ID=','')
|
||||
}`;
|
||||
|
||||
module.exports = {
|
||||
data_directories: {
|
||||
cache: "cache",
|
||||
packages: "packages",
|
||||
runtimes: "runtimes",
|
||||
jobs: "jobs"
|
||||
cache: 'cache',
|
||||
packages: 'packages',
|
||||
runtimes: 'runtimes',
|
||||
jobs: 'jobs'
|
||||
},
|
||||
data_files:{
|
||||
state: "state.json"
|
||||
state: 'state.json'
|
||||
},
|
||||
version: require("../package.json").version,
|
||||
version: require('../package.json').version,
|
||||
platform,
|
||||
pkg_installed_file: ".ppman-installed" //Used as indication for if a package was installed
|
||||
}
|
||||
pkg_installed_file: '.ppman-installed' //Used as indication for if a package was installed
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue