@qpjoy/electron-plugin-sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +31 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -55,6 +55,37 @@ export interface PluginHostBridge {
55
55
  app: import('electron').App;
56
56
  ipcMain: import('electron').IpcMain;
57
57
  session: import('electron').Session;
58
+ /**
59
+ * Shared marketplace SQLite facade. First-party plugins and games can
60
+ * extend this database with their own tables so local behavior remains
61
+ * queryable alongside `installed_plugins`, `marketplace_entries`, and logs.
62
+ *
63
+ * Kept structural on purpose: plugin authors should not need to depend on
64
+ * `@qpjoy/marketplace-db` just to compile against the SDK.
65
+ */
66
+ marketplaceDb?: {
67
+ raw(): unknown;
68
+ getMeta?(key: string): string | null;
69
+ setMeta?(key: string, value: string): void;
70
+ getActiveSession?(): {
71
+ accessToken: string | null;
72
+ refreshToken: string | null;
73
+ expiresAt: string | null;
74
+ user: Record<string, unknown> | null;
75
+ } | null;
76
+ setSession?(session: {
77
+ accessToken: string | null;
78
+ refreshToken: string | null;
79
+ expiresAt: string | null;
80
+ user: Record<string, unknown> | null;
81
+ }): void;
82
+ };
83
+ /**
84
+ * Resolved marketplace server URL from the host, or null when the host is
85
+ * intentionally offline. Plugins should prefer this over hard-coded
86
+ * endpoints so packaged apps do not accidentally talk to dev defaults.
87
+ */
88
+ serverBaseUrl?: string | null;
58
89
  /** Ask the host to re-apply session proxy. Requires `system:proxy`. */
59
90
  applyProxy(): Promise<void>;
60
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qpjoy/electron-plugin-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Types and helpers for authoring QPJoy electron plugins (definePlugin, Permission catalog, PluginContext).",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",