zotero-plugin 1.4.24 → 1.4.26
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/continuous-integration.d.ts +1 -0
- package/continuous-integration.js +3 -0
- package/debug-log.js +1 -8
- package/package.json +7 -7
- package/version.js +2 -1
|
@@ -5,11 +5,13 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const child_process = tslib_1.__importStar(require("child_process"));
|
|
6
6
|
class ContinuousIntegrationSingleton {
|
|
7
7
|
constructor() {
|
|
8
|
+
var _a;
|
|
8
9
|
this.service = '';
|
|
9
10
|
this.tag = '';
|
|
10
11
|
this.commit_message = '';
|
|
11
12
|
this.branch = '';
|
|
12
13
|
this.pull_request = false;
|
|
14
|
+
this.issue = '';
|
|
13
15
|
for (const [id, name] of Object.entries({ CIRCLECI: 'Circle', TRAVIS: 'Travis', SEMAPHORE: 'Semaphore', GITHUB_ACTIONS: 'GitHub' })) {
|
|
14
16
|
if (process.env[id] === 'true')
|
|
15
17
|
this.service = name;
|
|
@@ -42,6 +44,7 @@ class ContinuousIntegrationSingleton {
|
|
|
42
44
|
this.branch = process.env.GITHUB_REF.split('/').pop();
|
|
43
45
|
}
|
|
44
46
|
this.branch = this.branch || '';
|
|
47
|
+
this.issue = ((_a = this.branch.match(/^gh-([0-9]+)$/)) === null || _a === void 0 ? void 0 : _a[1]) || '';
|
|
45
48
|
break;
|
|
46
49
|
default:
|
|
47
50
|
if (process.env.CI === 'true')
|
package/debug-log.js
CHANGED
|
@@ -12,14 +12,7 @@ class DebugLogSender {
|
|
|
12
12
|
register(plugin, preferences) {
|
|
13
13
|
this.plugins[plugin] = preferences;
|
|
14
14
|
this.enabled = true;
|
|
15
|
-
|
|
16
|
-
const enumerator = Services.wm.getEnumerator('navigator:browser'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
17
|
-
while (enumerator.hasMoreElements()) { // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
18
|
-
const win = enumerator.getNext(); // eslint-disable-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
19
|
-
if (!win.ZoteroPane)
|
|
20
|
-
continue;
|
|
21
|
-
doc = win.document;
|
|
22
|
-
}
|
|
15
|
+
const doc = Zotero.getMainWindow().document;
|
|
23
16
|
if (!doc.querySelector('menuitem#debug-log-menu')) {
|
|
24
17
|
const help = doc.querySelector('menupopup#menu_HelpPopup');
|
|
25
18
|
const menuitem = help.appendChild(doc.createElement('menuitem'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.26",
|
|
4
4
|
"description": "Zotero plugin builder",
|
|
5
5
|
"homepage": "https://github.com/retorquere/zotero-plugin/wiki",
|
|
6
6
|
"bin": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"fs-extra": "^11.1.1",
|
|
30
|
-
"@octokit/rest": "^
|
|
30
|
+
"@octokit/rest": "^20.0.1",
|
|
31
31
|
"@rgrove/parse-xml": "^4.1.0",
|
|
32
|
-
"@types/node": "^20.4.
|
|
32
|
+
"@types/node": "^20.4.2",
|
|
33
33
|
"@types/pako": "^2.0.0",
|
|
34
34
|
"@types/tar-js": "^0.3.2",
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
36
|
-
"@typescript-eslint/parser": "^
|
|
37
|
-
"@xmldom/xmldom": "^0.8.
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
36
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
37
|
+
"@xmldom/xmldom": "^0.8.9",
|
|
38
38
|
"ajv": "^8.12.0",
|
|
39
39
|
"ajv-keywords": "^5.1.0",
|
|
40
40
|
"archiver": "^5.3.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint": "^8.44.0",
|
|
46
46
|
"eslint-plugin-import": "^2.27.5",
|
|
47
47
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
48
|
-
"glob": "^10.3.
|
|
48
|
+
"glob": "^10.3.3",
|
|
49
49
|
"jsesc": "^3.0.2",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"moment": "^2.29.4",
|
package/version.js
CHANGED
|
@@ -17,7 +17,8 @@ else {
|
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
18
18
|
version = require(path.join(root_1.default, 'package.json')).version;
|
|
19
19
|
if (continuous_integration_1.ContinuousIntegration.service && !continuous_integration_1.ContinuousIntegration.tag) {
|
|
20
|
-
|
|
20
|
+
const issue = continuous_integration_1.ContinuousIntegration.issue ? `.${continuous_integration_1.ContinuousIntegration.issue}` : '';
|
|
21
|
+
version = `${version}${issue}.${continuous_integration_1.ContinuousIntegration.build_number}`;
|
|
21
22
|
}
|
|
22
23
|
else if (!continuous_integration_1.ContinuousIntegration.service) {
|
|
23
24
|
version = `${version}.${os.userInfo().username}.${os.hostname()}`;
|