zotero-plugin-scaffold 0.2.0-beta.18 → 0.2.0-beta.19

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.
@@ -4,7 +4,7 @@ import process from 'node:process';
4
4
  import { Octokit } from 'octokit';
5
5
  import { globSync, glob } from 'tinyglobby';
6
6
  import { isCI } from 'std-env';
7
- import { B as Base } from '../shared/zotero-plugin-scaffold.BRIcU6PR.mjs';
7
+ import { B as Base } from '../shared/zotero-plugin-scaffold.Bp11r5bw.mjs';
8
8
  import 'c12';
9
9
  import 'es-toolkit';
10
10
  import 'fs-extra/esm';
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import process from 'node:process';
2
2
  import { Command } from '@commander-js/extra-typings';
3
- import { E as ExitSignals, l as logger, C as Config, a as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.BRIcU6PR.mjs';
3
+ import { E as ExitSignals, l as logger, C as Config, a as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.Bp11r5bw.mjs';
4
4
  import { readFile, writeFile } from 'node:fs/promises';
5
5
  import { pathExists, ensureFile } from 'fs-extra';
6
6
  import tinyUpdateNotifier from 'tiny-update-notifier';
@@ -30,7 +30,7 @@ import 'xvfb-ts';
30
30
 
31
31
  const name = "zotero-plugin-scaffold";
32
32
  const type = "module";
33
- const version = "0.2.0-beta.18";
33
+ const version = "0.2.0-beta.19";
34
34
  const packageManager = "pnpm@9.15.2";
35
35
  const description = "A scaffold for Zotero plugin development.";
36
36
  const author = "northword";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { a as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.BRIcU6PR.mjs';
1
+ export { a as Build, C as Config, R as Release, S as Serve, T as Test, d as defineConfig } from './shared/zotero-plugin-scaffold.Bp11r5bw.mjs';
2
2
  import 'c12';
3
3
  import 'es-toolkit';
4
4
  import 'fs-extra/esm';
@@ -382,28 +382,23 @@ class PrefsManager {
382
382
  return _prefs;
383
383
  }
384
384
  }
385
- function renderPluginPrefsDts(prefs, prefix) {
386
- const dtsContent = `// Generated by zotero-plugin-scaffold
385
+ function renderPluginPrefsDts(prefs) {
386
+ return `// Generated by zotero-plugin-scaffold
387
387
  /* prettier-ignore */
388
388
  /* eslint-disable */
389
389
  // @ts-nocheck
390
390
 
391
391
  // prettier-ignore
392
- type _PluginPrefsMap = {
393
- ${Object.entries(prefs).map(([key, value]) => {
392
+ declare namespace _ZoteroTypes {
393
+ interface Prefs {
394
+ PluginPrefsMap: {
395
+ ${Object.entries(prefs).map(([key, value]) => {
394
396
  return `"${key}": ${typeof value};`;
395
- }).join("\n ")}
396
- };
397
-
398
- // prettier-ignore
399
- type PluginPrefKey<K extends keyof _PluginPrefsMap> = \`${prefix}.\${K}\`;
400
-
401
- // prettier-ignore
402
- type PluginPrefsMap = {
403
- [K in keyof _PluginPrefsMap as PluginPrefKey<K>]: _PluginPrefsMap[K]
404
- };
397
+ }).join("\n ")}
398
+ };
399
+ }
400
+ }
405
401
  `;
406
- return dtsContent;
407
402
  }
408
403
 
409
404
  class Base {
@@ -589,7 +584,7 @@ class Build extends Base {
589
584
  const prefsWithPrefix = prefsManager.getPrefsWithPrefix(prefix);
590
585
  const prefsWithoutPrefix = prefsManager.getPrefsWithoutPrefix(prefix);
591
586
  if (dts) {
592
- const dtsContent = renderPluginPrefsDts(prefsWithoutPrefix, prefix);
587
+ const dtsContent = renderPluginPrefsDts(prefsWithoutPrefix);
593
588
  await outputFile(dts, dtsContent, "utf-8");
594
589
  }
595
590
  if (prefixPrefKeys) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
3
  "type": "module",
4
- "version": "0.2.0-beta.18",
4
+ "version": "0.2.0-beta.19",
5
5
  "description": "A scaffold for Zotero plugin development.",
6
6
  "author": "northword",
7
7
  "license": "AGPL-3.0-or-later",