mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
add shim, basic stubs
This commit is contained in:
22
shims/process.js
Normal file
22
shims/process.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// Shim for window.process
|
||||
// Obsidian checks process.platform, process.versions.electron, etc.
|
||||
|
||||
export const processShim = {
|
||||
platform: 'linux',
|
||||
versions: {
|
||||
electron: '28.0.0',
|
||||
node: '18.18.0',
|
||||
chrome: '120.0.0.0',
|
||||
},
|
||||
env: {},
|
||||
cwd: () => '/',
|
||||
nextTick: (fn, ...args) => setTimeout(() => fn(...args), 0),
|
||||
argv: [],
|
||||
type: 'renderer',
|
||||
resourcesPath: '/',
|
||||
stdout: { write: (s) => console.log(s) },
|
||||
stderr: { write: (s) => console.error(s) },
|
||||
on: () => {},
|
||||
once: () => {},
|
||||
removeListener: () => {},
|
||||
};
|
||||
Reference in New Issue
Block a user