zotero-plugin-scaffold 0.2.8 → 0.2.9
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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
-
import { E as ExitSignals, l as logger, C as Config, B 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, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.CBp9PBY_.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';
|
|
@@ -31,124 +31,10 @@ import 'node:http';
|
|
|
31
31
|
import 'xvfb-ts';
|
|
32
32
|
|
|
33
33
|
const name = "zotero-plugin-scaffold";
|
|
34
|
-
const
|
|
35
|
-
const version = "0.2.8";
|
|
36
|
-
const packageManager = "pnpm@10.2.0";
|
|
37
|
-
const description = "A scaffold for Zotero plugin development.";
|
|
38
|
-
const author = "northword";
|
|
39
|
-
const license = "AGPL-3.0-or-later";
|
|
40
|
-
const homepage = "https://github.com/northword/zotero-plugin-scaffold#readme";
|
|
41
|
-
const repository = {
|
|
42
|
-
type: "git",
|
|
43
|
-
url: "https://github.com/northword/zotero-plugin-scaffold.git",
|
|
44
|
-
directory: "packages/scaffold"
|
|
45
|
-
};
|
|
46
|
-
const bugs = {
|
|
47
|
-
url: "https://github.com/northword/zotero-plugin-scaffold/issues"
|
|
48
|
-
};
|
|
49
|
-
const keywords = [
|
|
50
|
-
"zotero",
|
|
51
|
-
"plugin",
|
|
52
|
-
"developer",
|
|
53
|
-
"scaffold",
|
|
54
|
-
"web-ext"
|
|
55
|
-
];
|
|
56
|
-
const exports = {
|
|
57
|
-
".": {
|
|
58
|
-
types: "./dist/index.d.ts",
|
|
59
|
-
"import": "./dist/index.mjs"
|
|
60
|
-
},
|
|
61
|
-
"./cli": {
|
|
62
|
-
"import": "./dist/cli.mjs"
|
|
63
|
-
},
|
|
64
|
-
"./vendor": {
|
|
65
|
-
types: "./dist/vendor/index.d.ts",
|
|
66
|
-
"import": "./dist/vendor/index.mjs"
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const main$1 = "./dist/index.mjs";
|
|
70
|
-
const module = "./dist/index.mjs";
|
|
71
|
-
const types = "./dist/index.d.ts";
|
|
72
|
-
const bin = {
|
|
73
|
-
"zotero-plugin": "./bin/zotero-plugin.mjs"
|
|
74
|
-
};
|
|
75
|
-
const files = [
|
|
76
|
-
"bin",
|
|
77
|
-
"dist"
|
|
78
|
-
];
|
|
79
|
-
const engines = {
|
|
80
|
-
node: ">=18"
|
|
81
|
-
};
|
|
82
|
-
const scripts = {
|
|
83
|
-
dev: "unbuild --stub",
|
|
84
|
-
build: "tsc --noEmit && unbuild",
|
|
85
|
-
test: "echo \"Error: no test specified\" && exit 1"
|
|
86
|
-
};
|
|
87
|
-
const publishConfig = {
|
|
88
|
-
access: "public",
|
|
89
|
-
registry: "https://registry.npmjs.org"
|
|
90
|
-
};
|
|
91
|
-
const directories = {
|
|
92
|
-
lib: "dist"
|
|
93
|
-
};
|
|
94
|
-
const peerDependencies = {
|
|
95
|
-
"conventional-changelog": "^6.0.0"
|
|
96
|
-
};
|
|
97
|
-
const peerDependenciesMeta = {
|
|
98
|
-
"conventional-changelog": {
|
|
99
|
-
optional: true
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const dependencies = {
|
|
103
|
-
"@swc/core": "^1.10.14",
|
|
104
|
-
"adm-zip": "^0.5.16",
|
|
105
|
-
bumpp: "^10.0.1",
|
|
106
|
-
c12: "^2.0.1",
|
|
107
|
-
chalk: "^5.4.1",
|
|
108
|
-
chokidar: "^4.0.3",
|
|
109
|
-
commander: "^13.1.0",
|
|
110
|
-
"es-toolkit": "^1.32.0",
|
|
111
|
-
esbuild: "^0.24.2",
|
|
112
|
-
"fs-extra": "^11.3.0",
|
|
113
|
-
hookable: "^5.5.3",
|
|
114
|
-
octokit: "^4.1.0",
|
|
115
|
-
"std-env": "^3.8.0",
|
|
116
|
-
"tiny-update-notifier": "^2.0.0",
|
|
117
|
-
tinyglobby: "^0.2.10",
|
|
118
|
-
"xvfb-ts": "^1.1.0"
|
|
119
|
-
};
|
|
120
|
-
const devDependencies = {
|
|
121
|
-
"@commander-js/extra-typings": "^13.1.0",
|
|
122
|
-
"@types/adm-zip": "^0.5.7",
|
|
123
|
-
"@types/fs-extra": "^11.0.4"
|
|
124
|
-
};
|
|
34
|
+
const version = "0.2.9";
|
|
125
35
|
const pkg = {
|
|
126
36
|
name: name,
|
|
127
|
-
|
|
128
|
-
version: version,
|
|
129
|
-
packageManager: packageManager,
|
|
130
|
-
description: description,
|
|
131
|
-
author: author,
|
|
132
|
-
license: license,
|
|
133
|
-
homepage: homepage,
|
|
134
|
-
repository: repository,
|
|
135
|
-
bugs: bugs,
|
|
136
|
-
keywords: keywords,
|
|
137
|
-
exports: exports,
|
|
138
|
-
main: main$1,
|
|
139
|
-
module: module,
|
|
140
|
-
types: types,
|
|
141
|
-
bin: bin,
|
|
142
|
-
files: files,
|
|
143
|
-
engines: engines,
|
|
144
|
-
scripts: scripts,
|
|
145
|
-
publishConfig: publishConfig,
|
|
146
|
-
directories: directories,
|
|
147
|
-
peerDependencies: peerDependencies,
|
|
148
|
-
peerDependenciesMeta: peerDependenciesMeta,
|
|
149
|
-
dependencies: dependencies,
|
|
150
|
-
devDependencies: devDependencies
|
|
151
|
-
};
|
|
37
|
+
version: version};
|
|
152
38
|
|
|
153
39
|
async function checkGitIgnore() {
|
|
154
40
|
if (!pathExists(".git"))
|
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.
|
|
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.CBp9PBY_.mjs';
|
|
2
2
|
import 'c12';
|
|
3
3
|
import 'es-toolkit';
|
|
4
4
|
import 'fs-extra/esm';
|
package/dist/shared/{zotero-plugin-scaffold.BfbnPYjV.mjs → zotero-plugin-scaffold.CBp9PBY_.mjs}
RENAMED
|
@@ -41,13 +41,9 @@ const SYMBOLS = {
|
|
|
41
41
|
TIP: chalk.blue("\u2192"),
|
|
42
42
|
ERROR: chalk.bgRed(" ERROR "),
|
|
43
43
|
WARN: chalk.bgYellow(" WARN "),
|
|
44
|
-
DEBUG: chalk.grey("\u2699")
|
|
45
|
-
NONE: ""
|
|
46
|
-
};
|
|
44
|
+
DEBUG: chalk.grey("\u2699")};
|
|
47
45
|
const DEFAULT_OPTIONS = {
|
|
48
46
|
SPACE: 0,
|
|
49
|
-
LEVEL: 2 /* INFO */,
|
|
50
|
-
SYMBOL: "",
|
|
51
47
|
NEW_LINE: false
|
|
52
48
|
};
|
|
53
49
|
const LOG_METHODS_CONFIG = {
|
|
@@ -77,11 +73,6 @@ const LOG_METHODS_CONFIG = {
|
|
|
77
73
|
level: 2 /* INFO */,
|
|
78
74
|
symbol: SYMBOLS.SUCCESS
|
|
79
75
|
},
|
|
80
|
-
ready: {
|
|
81
|
-
level: 2 /* INFO */,
|
|
82
|
-
symbol: SYMBOLS.SUCCESS,
|
|
83
|
-
wrapNewLine: true
|
|
84
|
-
},
|
|
85
76
|
fail: {
|
|
86
77
|
level: 4 /* ERROR */,
|
|
87
78
|
symbol: SYMBOLS.FAIL
|
|
@@ -464,7 +455,7 @@ class PrefsManager {
|
|
|
464
455
|
logger.debug("The prefs.js has been modified.");
|
|
465
456
|
}
|
|
466
457
|
setPref(key, value) {
|
|
467
|
-
if (value === null || value ===
|
|
458
|
+
if (value === null || value === void 0) {
|
|
468
459
|
if (key in this.prefs)
|
|
469
460
|
delete this.prefs[key];
|
|
470
461
|
return;
|
|
@@ -477,7 +468,7 @@ class PrefsManager {
|
|
|
477
468
|
});
|
|
478
469
|
}
|
|
479
470
|
getPref(key) {
|
|
480
|
-
return this.prefs[key] ??
|
|
471
|
+
return this.prefs[key] ?? void 0;
|
|
481
472
|
}
|
|
482
473
|
getPrefs() {
|
|
483
474
|
return this.prefs;
|
|
@@ -873,7 +864,7 @@ function getMimeTypeByFileName(filename) {
|
|
|
873
864
|
if (ext === `.${type}`)
|
|
874
865
|
return mimeTypes[type];
|
|
875
866
|
}
|
|
876
|
-
return
|
|
867
|
+
return void 0;
|
|
877
868
|
}
|
|
878
869
|
|
|
879
870
|
class ReleaseBase extends Base {
|
|
@@ -928,7 +919,7 @@ class GitHub extends ReleaseBase {
|
|
|
928
919
|
tag
|
|
929
920
|
}).catch((e) => {
|
|
930
921
|
this.logger.debug(`Release with tag ${tag} not found. ${e}`);
|
|
931
|
-
return
|
|
922
|
+
return void 0;
|
|
932
923
|
}).then((res) => {
|
|
933
924
|
if (res && res.status === 200) {
|
|
934
925
|
this.logger.debug(`Found release with tag "${tag}", id=${res.data.id}.`);
|
|
@@ -1798,7 +1789,7 @@ class ZoteroRunner {
|
|
|
1798
1789
|
reloadError: error
|
|
1799
1790
|
};
|
|
1800
1791
|
}
|
|
1801
|
-
return { sourceDir, reloadError:
|
|
1792
|
+
return { sourceDir, reloadError: void 0 };
|
|
1802
1793
|
}
|
|
1803
1794
|
async reloadAllTemporaryPlugins() {
|
|
1804
1795
|
for (const { sourceDir } of this.options.plugins.list) {
|
|
@@ -2241,14 +2232,14 @@ class Test extends Base {
|
|
|
2241
2232
|
for (const dir of testDirs) {
|
|
2242
2233
|
let tsconfigPath = resolve(`${dir}/tsconfig.json`);
|
|
2243
2234
|
if (!await pathExists(tsconfigPath)) {
|
|
2244
|
-
tsconfigPath =
|
|
2235
|
+
tsconfigPath = void 0;
|
|
2245
2236
|
}
|
|
2246
2237
|
await build({
|
|
2247
2238
|
entryPoints: await glob(`${dir}/**/*.spec.{js,ts}`),
|
|
2248
2239
|
outdir: `${this.testPluginDir}/content/units`,
|
|
2249
2240
|
bundle: true,
|
|
2250
2241
|
target: "firefox115",
|
|
2251
|
-
tsconfig: tsconfigPath ||
|
|
2242
|
+
tsconfig: tsconfigPath || void 0
|
|
2252
2243
|
});
|
|
2253
2244
|
}
|
|
2254
2245
|
const testFiles = (await glob(`**/*.spec.js`, { cwd: `${this.testPluginDir}/content` })).sort();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin-scaffold",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"description": "A scaffold for Zotero plugin development.",
|
|
6
6
|
"author": "northword",
|
|
7
7
|
"license": "AGPL-3.0-or-later",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=18"
|
|
48
|
+
"node": ">=18.20.7"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public",
|
|
@@ -63,21 +63,21 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@swc/core": "^1.
|
|
66
|
+
"@swc/core": "^1.11.5",
|
|
67
67
|
"adm-zip": "^0.5.16",
|
|
68
|
-
"bumpp": "^10.0.
|
|
69
|
-
"c12": "^
|
|
68
|
+
"bumpp": "^10.0.3",
|
|
69
|
+
"c12": "^3.0.2",
|
|
70
70
|
"chalk": "^5.4.1",
|
|
71
71
|
"chokidar": "^4.0.3",
|
|
72
72
|
"commander": "^13.1.0",
|
|
73
73
|
"es-toolkit": "^1.32.0",
|
|
74
|
-
"esbuild": "^0.
|
|
74
|
+
"esbuild": "^0.25.0",
|
|
75
75
|
"fs-extra": "^11.3.0",
|
|
76
76
|
"hookable": "^5.5.3",
|
|
77
|
-
"octokit": "^4.1.
|
|
77
|
+
"octokit": "^4.1.2",
|
|
78
78
|
"std-env": "^3.8.0",
|
|
79
79
|
"tiny-update-notifier": "^2.0.0",
|
|
80
|
-
"tinyglobby": "^0.2.
|
|
80
|
+
"tinyglobby": "^0.2.12",
|
|
81
81
|
"xvfb-ts": "^1.1.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|