zotero-plugin 5.0.13 → 5.0.14
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/README.md +2 -2
- package/bin/release.js +5 -5
- package/debug-log.js +11 -8
- package/package.json +5 -5
- package/rdf.js +1 -1
package/README.md
CHANGED
|
@@ -82,9 +82,9 @@ DebugLog.register('your plugin name', ['extensions.zotero.<your plugin extension
|
|
|
82
82
|
|
|
83
83
|
the array is a list of either full names of preferences you want to know about, or a name ending in `.` which means "all keys directly under this".
|
|
84
84
|
|
|
85
|
-
The Help menu will now have an entry "send debug log to
|
|
85
|
+
The Help menu will now have an entry "send debug log to bashupload.com"; when your user selects that, the error log and the selected settings will be sent to bashupload.com; if any items are selected, when that is clicked, a copy of those items will be included in RDF format.
|
|
86
86
|
|
|
87
|
-
The user will get an ID that looks like `C3WvhYgA8RDM-
|
|
87
|
+
The user will get an ID that looks like `C3WvhYgA8RDM-buc-2XZGa`; the last part is the bashupload ID, so you would go to `https://bashupload.com/2XZGa/C3WvhYgA8RDM.zip` to retrieve the download; the zipfile you get there will be `C3WvhYgA8RDM.zip`.
|
|
88
88
|
|
|
89
89
|
# Starting Zotero with your plugin loaded
|
|
90
90
|
|
package/bin/release.js
CHANGED
|
@@ -8248,7 +8248,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8248
8248
|
"package.json"(exports, module) {
|
|
8249
8249
|
module.exports = {
|
|
8250
8250
|
name: "zotero-plugin",
|
|
8251
|
-
version: "5.0.
|
|
8251
|
+
version: "5.0.14",
|
|
8252
8252
|
description: "Zotero plugin builder",
|
|
8253
8253
|
homepage: "https://github.com/retorquere/zotero-plugin/wiki",
|
|
8254
8254
|
bin: {
|
|
@@ -8278,7 +8278,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8278
8278
|
dependencies: {
|
|
8279
8279
|
"@octokit/rest": "^21.1.1",
|
|
8280
8280
|
"@rgrove/parse-xml": "^4.2.0",
|
|
8281
|
-
"@types/node": "^22.13.
|
|
8281
|
+
"@types/node": "^22.13.14",
|
|
8282
8282
|
"@xmldom/xmldom": "^0.9.8",
|
|
8283
8283
|
ajv: "^8.17.1",
|
|
8284
8284
|
"ajv-keywords": "^5.1.0",
|
|
@@ -8297,7 +8297,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8297
8297
|
pug: "^3.0.3",
|
|
8298
8298
|
rimraf: "^6.0.1",
|
|
8299
8299
|
"shell-quote": "^1.8.2",
|
|
8300
|
-
shelljs: "^0.
|
|
8300
|
+
shelljs: "^0.9.2",
|
|
8301
8301
|
"string-to-arraybuffer": "^1.0.2",
|
|
8302
8302
|
"ts-node": "^10.9.2",
|
|
8303
8303
|
tslib: "^2.8.1",
|
|
@@ -8357,8 +8357,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8357
8357
|
url: "https://github.com/retorquere/zotero-plugin/issues"
|
|
8358
8358
|
},
|
|
8359
8359
|
devDependencies: {
|
|
8360
|
-
dprint: "^0.49.
|
|
8361
|
-
esbuild: "^0.25.
|
|
8360
|
+
dprint: "^0.49.1",
|
|
8361
|
+
esbuild: "^0.25.1"
|
|
8362
8362
|
}
|
|
8363
8363
|
};
|
|
8364
8364
|
}
|
package/debug-log.js
CHANGED
|
@@ -58,12 +58,16 @@ class DebugLogSender {
|
|
|
58
58
|
register(plugin, preferences = []) {
|
|
59
59
|
var _a, _b;
|
|
60
60
|
this.convertLegacy();
|
|
61
|
+
const label = 'Send debug log to bashupload.com';
|
|
61
62
|
const doc = (_a = this.zotero.getMainWindow()) === null || _a === void 0 ? void 0 : _a.document;
|
|
62
63
|
if (doc) {
|
|
63
64
|
let menupopup = doc.querySelector(`#${this.id.menupopup}`);
|
|
64
|
-
if (
|
|
65
|
+
if (menupopup) {
|
|
66
|
+
menupopup.setAttribute('label', label);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
65
69
|
menupopup = doc.querySelector('menupopup#menu_HelpPopup')
|
|
66
|
-
.appendChild(this.element('menu', { id: this.id.menu, label
|
|
70
|
+
.appendChild(this.element('menu', { id: this.id.menu, label }))
|
|
67
71
|
.appendChild(this.element('menupopup', { id: this.id.menupopup }));
|
|
68
72
|
}
|
|
69
73
|
(_b = doc.querySelector(`.${this.id.menuitem}[label=${JSON.stringify(plugin)}]`)) === null || _b === void 0 ? void 0 : _b.remove();
|
|
@@ -127,20 +131,19 @@ class DebugLogSender {
|
|
|
127
131
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
128
132
|
const formData = new FormData();
|
|
129
133
|
formData.append('file', blob, `${key}.zip`);
|
|
130
|
-
let url = 'https://0x0.st';
|
|
131
134
|
try {
|
|
132
|
-
const response = await fetch(
|
|
135
|
+
const response = await fetch(`https://bashupload.com/${key}.zip`, {
|
|
133
136
|
method: 'POST',
|
|
134
137
|
body: formData,
|
|
135
138
|
headers: {
|
|
136
139
|
'User-Agent': 'curl/8.7.1',
|
|
137
140
|
},
|
|
138
141
|
});
|
|
139
|
-
const body =
|
|
140
|
-
|
|
141
|
-
if (!
|
|
142
|
+
const body = await response.text();
|
|
143
|
+
const id = body.match(/https:[/][/]bashupload.com[/]([A-Z0-9]+)[/][A-Z0-9]+[.]zip/i);
|
|
144
|
+
if (!id)
|
|
142
145
|
throw new Error(body);
|
|
143
|
-
this.alert(`Debug log ID for ${plugin}`, `${key}-
|
|
146
|
+
this.alert(`Debug log ID for ${plugin}`, `${key}-buc-${id[1]}. If you sent this log in error, visit ${id[0]} and it will be automatically removed.`);
|
|
144
147
|
}
|
|
145
148
|
catch (err) {
|
|
146
149
|
this.alert(`Could not post debug log for ${plugin}`, err.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.14",
|
|
4
4
|
"description": "Zotero plugin builder",
|
|
5
5
|
"homepage": "https://github.com/retorquere/zotero-plugin/wiki",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@octokit/rest": "^21.1.1",
|
|
32
32
|
"@rgrove/parse-xml": "^4.2.0",
|
|
33
|
-
"@types/node": "^22.13.
|
|
33
|
+
"@types/node": "^22.13.14",
|
|
34
34
|
"@xmldom/xmldom": "^0.9.8",
|
|
35
35
|
"ajv": "^8.17.1",
|
|
36
36
|
"ajv-keywords": "^5.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"pug": "^3.0.3",
|
|
50
50
|
"rimraf": "^6.0.1",
|
|
51
51
|
"shell-quote": "^1.8.2",
|
|
52
|
-
"shelljs": "^0.
|
|
52
|
+
"shelljs": "^0.9.2",
|
|
53
53
|
"string-to-arraybuffer": "^1.0.2",
|
|
54
54
|
"ts-node": "^10.9.2",
|
|
55
55
|
"tslib": "^2.8.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"url": "https://github.com/retorquere/zotero-plugin/issues"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
|
-
"dprint": "^0.49.
|
|
113
|
-
"esbuild": "^0.25.
|
|
112
|
+
"dprint": "^0.49.1",
|
|
113
|
+
"esbuild": "^0.25.1"
|
|
114
114
|
}
|
|
115
115
|
}
|
package/rdf.js
CHANGED
|
@@ -64,7 +64,7 @@ if (options_and_vars.maxVersion.match(/^7/)) {
|
|
|
64
64
|
update_link: options_and_vars.updateLink,
|
|
65
65
|
applications: {
|
|
66
66
|
zotero: {
|
|
67
|
-
strict_min_version: '6.999',
|
|
67
|
+
strict_min_version: options_and_vars.minVersion.match(/^7/) ? options_and_vars.minVersion : '6.999',
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
},
|