zotero-plugin-scaffold 0.2.0-beta.18 → 0.2.0-beta.20
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/chunks/github.mjs
CHANGED
|
@@ -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.
|
|
7
|
+
import { B as Base } from '../shared/zotero-plugin-scaffold.BpkBwlbe.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.
|
|
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.BpkBwlbe.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.
|
|
33
|
+
const version = "0.2.0-beta.20";
|
|
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.
|
|
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.BpkBwlbe.mjs';
|
|
2
2
|
import 'c12';
|
|
3
3
|
import 'es-toolkit';
|
|
4
4
|
import 'fs-extra/esm';
|
package/dist/shared/{zotero-plugin-scaffold.BRIcU6PR.mjs → zotero-plugin-scaffold.BpkBwlbe.mjs}
RENAMED
|
@@ -345,8 +345,7 @@ class PrefsManager {
|
|
|
345
345
|
if (value === null || value === void 0) {
|
|
346
346
|
if (key in this.prefs)
|
|
347
347
|
delete this.prefs[key];
|
|
348
|
-
|
|
349
|
-
return;
|
|
348
|
+
return;
|
|
350
349
|
}
|
|
351
350
|
this.prefs[key] = value;
|
|
352
351
|
}
|
|
@@ -382,28 +381,23 @@ class PrefsManager {
|
|
|
382
381
|
return _prefs;
|
|
383
382
|
}
|
|
384
383
|
}
|
|
385
|
-
function renderPluginPrefsDts(prefs
|
|
386
|
-
|
|
384
|
+
function renderPluginPrefsDts(prefs) {
|
|
385
|
+
return `// Generated by zotero-plugin-scaffold
|
|
387
386
|
/* prettier-ignore */
|
|
388
387
|
/* eslint-disable */
|
|
389
388
|
// @ts-nocheck
|
|
390
389
|
|
|
391
390
|
// prettier-ignore
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
declare namespace _ZoteroTypes {
|
|
392
|
+
interface Prefs {
|
|
393
|
+
PluginPrefsMap: {
|
|
394
|
+
${Object.entries(prefs).map(([key, value]) => {
|
|
394
395
|
return `"${key}": ${typeof value};`;
|
|
395
|
-
}).join("\n
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
|
|
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
|
-
};
|
|
396
|
+
}).join("\n ")}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
}
|
|
405
400
|
`;
|
|
406
|
-
return dtsContent;
|
|
407
401
|
}
|
|
408
402
|
|
|
409
403
|
class Base {
|
|
@@ -589,7 +583,7 @@ class Build extends Base {
|
|
|
589
583
|
const prefsWithPrefix = prefsManager.getPrefsWithPrefix(prefix);
|
|
590
584
|
const prefsWithoutPrefix = prefsManager.getPrefsWithoutPrefix(prefix);
|
|
591
585
|
if (dts) {
|
|
592
|
-
const dtsContent = renderPluginPrefsDts(prefsWithoutPrefix
|
|
586
|
+
const dtsContent = renderPluginPrefsDts(prefsWithoutPrefix);
|
|
593
587
|
await outputFile(dts, dtsContent, "utf-8");
|
|
594
588
|
}
|
|
595
589
|
if (prefixPrefKeys) {
|
package/package.json
CHANGED