zotero-plugin-scaffold 0.8.1 → 0.8.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.
package/dist/cli.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as Base, C as Context, O as OverrideConfig } from './shared/zotero-plugin-scaffold.fkuivpCE.mjs';
1
+ import { B as Base, C as Context, O as OverrideConfig } from './shared/zotero-plugin-scaffold.D0-KTF5z.mjs';
2
2
  import 'hookable';
3
3
  import 'esbuild';
4
4
 
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import process from 'node:process';
2
2
  import { Command } from 'commander';
3
- import { E as ExitSignals, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.5VjiPpN8.mjs';
3
+ import { E as ExitSignals, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.DQYuTa0n.mjs';
4
4
  import { readFile } from 'node:fs/promises';
5
5
  import { pathExists } from 'fs-extra';
6
6
  import { l as logger } from './shared/zotero-plugin-scaffold.qsx_2VJx.mjs';
@@ -36,7 +36,7 @@ import 'node:http';
36
36
  import 'node:readline';
37
37
 
38
38
  const name = "zotero-plugin-scaffold";
39
- const version = "0.8.1";
39
+ const version = "0.8.2";
40
40
  const pkg = {
41
41
  name: name,
42
42
  version: version};
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { U as UserConfig, O as OverrideConfig, C as Context, B as Base } from './shared/zotero-plugin-scaffold.fkuivpCE.mjs';
1
+ import { U as UserConfig, O as OverrideConfig, C as Context, B as Base } from './shared/zotero-plugin-scaffold.D0-KTF5z.mjs';
2
2
  import 'hookable';
3
3
  import 'esbuild';
4
4
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { B as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.5VjiPpN8.mjs';
1
+ export { B as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.DQYuTa0n.mjs';
2
2
  import 'c12';
3
3
  import 'es-toolkit';
4
4
  import 'fs-extra/esm';
@@ -525,6 +525,14 @@ interface ServerConfig {
525
525
  * @default []
526
526
  */
527
527
  startArgs: string[];
528
+ /**
529
+ * The default preferences for the dev server.
530
+ * These preferences will be set before Zotero starts.
531
+ *
532
+ * 开发服务器的默认首选项。
533
+ * 这些首选项将在 Zotero 启动前设置。
534
+ */
535
+ prefs: Record<string, string | number | boolean>;
528
536
  /**
529
537
  * Install the plugin as a Proxy File mode.
530
538
  *
@@ -133,6 +133,7 @@ const defaultConfig = {
133
133
  server: {
134
134
  devtools: true,
135
135
  startArgs: [],
136
+ prefs: {},
136
137
  asProxy: false,
137
138
  prebuild: true,
138
139
  // keepProfileChanges: true,
@@ -3919,9 +3920,9 @@ class ZoteroRunner {
3919
3920
  const prefsPath = join$1(this.options.profile.path, "prefs.js");
3920
3921
  const prefsManager = new PrefsManager("user_pref");
3921
3922
  prefsManager.setPrefs(prefs);
3922
- prefsManager.setPrefs(this.options.profile.customPrefs);
3923
3923
  if (await pathExists(prefsPath))
3924
3924
  await prefsManager.read(prefsPath);
3925
+ prefsManager.setPrefs(this.options.profile.customPrefs);
3925
3926
  prefsManager.setPrefs({
3926
3927
  "extensions.lastAppBuildId": null,
3927
3928
  "extensions.lastAppVersion": null
@@ -4136,7 +4137,8 @@ class Serve extends Base {
4136
4137
  path: this.profilePath,
4137
4138
  dataDir: this.dataDir,
4138
4139
  // keepChanges: this.ctx.server.keepProfileChanges,
4139
- createIfMissing: this.ctx.server.createProfileIfMissing
4140
+ createIfMissing: this.ctx.server.createProfileIfMissing,
4141
+ customPrefs: this.ctx.server.prefs
4140
4142
  },
4141
4143
  plugins: {
4142
4144
  list: [{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
3
  "type": "module",
4
- "version": "0.8.1",
4
+ "version": "0.8.2",
5
5
  "description": "A scaffold for Zotero plugin development.",
6
6
  "author": "northword",
7
7
  "license": "AGPL-3.0-or-later",