文件
chen 301194963b
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
feat: Initial clean release of CHM
2026-11-04 11:29:39 +08:00

37 行
1.1 KiB
TypeScript

/* eslint-disable multiline-comment-style */
import Plugin from '../Plugin';
import Joplin from './Joplin';
import BasePlatformImplementation from '../BasePlatformImplementation';
import type { Store } from 'redux';
/**
* @ignore
*/
// const builtinModules = require('builtin-modules');
/**
* @ignore
*/
export default class Global {
private joplin_: Joplin;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Redux store is parametrised per-app (AppState differs across cli/desktop/mobile); see PluginStore
public constructor(implementation: BasePlatformImplementation, plugin: Plugin, store: Store<any>) {
this.joplin_ = new Joplin(implementation, plugin, store);
}
public get joplin(): Joplin {
return this.joplin_;
}
// To get webpack to work with Node module we need to set the parameter `target: "node"`, however
// when setting this, the code generated by webpack will try to access the `process` global variable,
// which won't be defined in the sandbox. So here we simply forward the variable, which makes it all work.
public get process(): NodeJS.Process {
return process;
}
}