You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
725 B

const process = require("process")
const Modules = require("../../index.js")
const {
app
} = require("renderer")
const env = process.env
let DiscordNative = {
app,
isRenderer: true,
nativeModules: {
ensureModule: (name) => {return true /* TODO: ensure stuff */},
requireModule: (name) => {if (Modules[name]) return Modules[name]; else throw `Error: Cannot find module '${name}'`;}
},
'process': {
platform: process.platform,
arch: process.arch,
env: {
LOCALAPPDATA: env['LOCALAPPDATA'],
'PROGRAMFILES(X86)': env['PROGRAMFILES(X86)'],
PROGRAMFILES: env['PROGRAMFILES'],
PROGRAMW6432: env['PROGRAMW6432'],
PROGRAMDATA: env['PROGRAMDATA']
}
}
}
module.exports = DiscordNative