zotero-plugin-scaffold 0.8.5 → 0.8.7
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.d.ts +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -2
- package/dist/shared/{scaffold-base-DINIqpGc.d.mts → scaffold-base-Bcp4xrkr.d.mts} +1 -1
- package/dist/shared/{scaffold-replace-BTU0g6CT.mjs → scaffold-replace-Dn0wBA9W.mjs} +12 -12
- package/dist/shared/{scaffold-src-BF5nY3YC.mjs → scaffold-src-CVBxl6Yv.mjs} +30 -22
- package/dist/vendor.js +1 -1
- package/package.json +25 -26
- /package/dist/shared/{scaffold-index-BAX-e18l.d.mts → scaffold-index-BPYcwmhN.d.mts} +0 -0
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as OverrideConfig, t as Context } from "./shared/scaffold-index-
|
|
2
|
-
import { t as Base } from "./shared/scaffold-base-
|
|
1
|
+
import { n as OverrideConfig, t as Context } from "./shared/scaffold-index-BPYcwmhN.mjs";
|
|
2
|
+
import { t as Base } from "./shared/scaffold-base-Bcp4xrkr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/cli.d.ts
|
|
5
5
|
type Constructor<T> = new (ctx: Context) => T;
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as logger } from "./shared/scaffold-replace-
|
|
2
|
-
import { a as Release, i as ExitSignals, n as Test, o as Build, r as Serve, t as Config } from "./shared/scaffold-src-
|
|
1
|
+
import { l as logger } from "./shared/scaffold-replace-Dn0wBA9W.mjs";
|
|
2
|
+
import { a as Release, i as ExitSignals, n as Test, o as Build, r as Serve, t as Config } from "./shared/scaffold-src-CVBxl6Yv.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import { Command } from "commander";
|
|
@@ -7,7 +7,7 @@ import { pathExists } from "fs-extra";
|
|
|
7
7
|
import tinyUpdateNotifier from "tiny-update-notifier";
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "zotero-plugin-scaffold";
|
|
10
|
-
var version = "0.8.
|
|
10
|
+
var version = "0.8.7";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/utils/gitignore.ts
|
|
13
13
|
async function checkGitIgnore() {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as OverrideConfig, r as UserConfig, t as Context } from "./shared/scaffold-index-
|
|
2
|
-
import { t as Base } from "./shared/scaffold-base-
|
|
1
|
+
import { n as OverrideConfig, r as UserConfig, t as Context } from "./shared/scaffold-index-BPYcwmhN.mjs";
|
|
2
|
+
import { t as Base } from "./shared/scaffold-base-Bcp4xrkr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/config.d.ts
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "./shared/scaffold-
|
|
2
|
-
import { a as Release, n as Test, o as Build, r as Serve, s as defineConfig, t as Config } from "./shared/scaffold-src-BF5nY3YC.mjs";
|
|
1
|
+
import { a as Release, n as Test, o as Build, r as Serve, s as defineConfig, t as Config } from "./shared/scaffold-src-CVBxl6Yv.mjs";
|
|
3
2
|
export { Build, Config, Release, Serve, Test, defineConfig };
|
|
@@ -29,7 +29,7 @@ const SYMBOLS = {
|
|
|
29
29
|
};
|
|
30
30
|
const DEFAULT_OPTIONS = {
|
|
31
31
|
SPACE: 0,
|
|
32
|
-
LEVEL:
|
|
32
|
+
LEVEL: 2,
|
|
33
33
|
SYMBOL: "",
|
|
34
34
|
NEW_LINE: false
|
|
35
35
|
};
|
|
@@ -38,42 +38,42 @@ const DEFAULT_OPTIONS = {
|
|
|
38
38
|
*/
|
|
39
39
|
const LOG_METHODS_CONFIG = {
|
|
40
40
|
error: {
|
|
41
|
-
level:
|
|
41
|
+
level: 4,
|
|
42
42
|
symbol: SYMBOLS.ERROR,
|
|
43
43
|
wrapNewLine: true
|
|
44
44
|
},
|
|
45
45
|
warn: {
|
|
46
|
-
level:
|
|
46
|
+
level: 3,
|
|
47
47
|
symbol: SYMBOLS.WARN,
|
|
48
48
|
wrapNewLine: true
|
|
49
49
|
},
|
|
50
50
|
tip: {
|
|
51
|
-
level:
|
|
51
|
+
level: 2,
|
|
52
52
|
symbol: SYMBOLS.TIP
|
|
53
53
|
},
|
|
54
54
|
info: {
|
|
55
|
-
level:
|
|
55
|
+
level: 2,
|
|
56
56
|
symbol: SYMBOLS.INFO
|
|
57
57
|
},
|
|
58
58
|
debug: {
|
|
59
|
-
level:
|
|
59
|
+
level: 1,
|
|
60
60
|
symbol: SYMBOLS.DEBUG
|
|
61
61
|
},
|
|
62
62
|
success: {
|
|
63
|
-
level:
|
|
63
|
+
level: 2,
|
|
64
64
|
symbol: SYMBOLS.SUCCESS
|
|
65
65
|
},
|
|
66
66
|
ready: {
|
|
67
|
-
level:
|
|
67
|
+
level: 2,
|
|
68
68
|
symbol: SYMBOLS.SUCCESS,
|
|
69
69
|
wrapNewLine: true
|
|
70
70
|
},
|
|
71
71
|
fail: {
|
|
72
|
-
level:
|
|
72
|
+
level: 4,
|
|
73
73
|
symbol: SYMBOLS.FAIL
|
|
74
74
|
},
|
|
75
75
|
log: {
|
|
76
|
-
level:
|
|
76
|
+
level: 2,
|
|
77
77
|
symbol: SYMBOLS.NONE
|
|
78
78
|
}
|
|
79
79
|
};
|
|
@@ -87,9 +87,9 @@ const logger = class Logger {
|
|
|
87
87
|
* Determine the appropriate log level
|
|
88
88
|
*/
|
|
89
89
|
determineLogLevel(level) {
|
|
90
|
-
if (isDebug) return
|
|
90
|
+
if (isDebug) return 0;
|
|
91
91
|
const envLevel = process.env.ZOTERO_PLUGIN_LOG_LEVEL;
|
|
92
|
-
return envLevel ? LOG_LEVEL[envLevel] : level ??
|
|
92
|
+
return envLevel ? LOG_LEVEL[envLevel] : level ?? 2;
|
|
93
93
|
}
|
|
94
94
|
static getInstance() {
|
|
95
95
|
if (!Logger.instance) Logger.instance = new Logger();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseRepoUrl,
|
|
1
|
+
import { a as parseRepoUrl, i as dateFormat, l as logger, n as replaceDefine, o as template, s as toArray } from "./scaffold-replace-Dn0wBA9W.mjs";
|
|
2
2
|
import { loadConfig, setupDotenv } from "c12";
|
|
3
3
|
import { debounce, delay, escapeRegExp, kebabCase, mapValues, toMerged } from "es-toolkit";
|
|
4
4
|
import { copy, emptyDir, ensureDir, move, outputFile, outputJSON, pathExists, readJSON, readJsonSync, remove, writeJson } from "fs-extra/esm";
|
|
@@ -21,7 +21,7 @@ import "node:os";
|
|
|
21
21
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
22
22
|
import assert from "node:assert";
|
|
23
23
|
import v8 from "node:v8";
|
|
24
|
-
import { Octokit } from "octokit";
|
|
24
|
+
import { Octokit } from "@octokit/rest";
|
|
25
25
|
import chokidar from "chokidar";
|
|
26
26
|
import net from "node:net";
|
|
27
27
|
import { Buffer } from "node:buffer";
|
|
@@ -296,6 +296,7 @@ var FluentManager = class {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
var FluentTransformer = class extends Transformer {
|
|
299
|
+
prefix;
|
|
299
300
|
constructor(prefix) {
|
|
300
301
|
super();
|
|
301
302
|
this.prefix = prefix;
|
|
@@ -1072,6 +1073,12 @@ function a$1(e, n, r) {
|
|
|
1072
1073
|
});
|
|
1073
1074
|
}
|
|
1074
1075
|
//#endregion
|
|
1076
|
+
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
|
|
1077
|
+
function n$1(t, n) {
|
|
1078
|
+
let r = JSON.parse(t, n?.reviver);
|
|
1079
|
+
return a$1(t, r, n), r;
|
|
1080
|
+
}
|
|
1081
|
+
//#endregion
|
|
1075
1082
|
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs
|
|
1076
1083
|
function e(e, i = !1) {
|
|
1077
1084
|
let a = e.length, o = 0, s = ``, c = 0, l = 16, u = 0, d = 0, f = 0, p = 0, m = 0;
|
|
@@ -1155,7 +1162,7 @@ function e(e, i = !1) {
|
|
|
1155
1162
|
r = o;
|
|
1156
1163
|
continue;
|
|
1157
1164
|
}
|
|
1158
|
-
if (i >= 0 && i <= 31) if (n
|
|
1165
|
+
if (i >= 0 && i <= 31) if (n(i)) {
|
|
1159
1166
|
t += e.substring(r, o), m = 2;
|
|
1160
1167
|
break;
|
|
1161
1168
|
} else m = 6;
|
|
@@ -1172,7 +1179,7 @@ function e(e, i = !1) {
|
|
|
1172
1179
|
while (t(i));
|
|
1173
1180
|
return l = 15;
|
|
1174
1181
|
}
|
|
1175
|
-
if (n
|
|
1182
|
+
if (n(i)) return o++, s += String.fromCharCode(i), i === 13 && e.charCodeAt(o) === 10 && (o++, s += `
|
|
1176
1183
|
`), u++, f = o, l = 14;
|
|
1177
1184
|
switch (i) {
|
|
1178
1185
|
case 123: return o++, l = 1;
|
|
@@ -1185,7 +1192,7 @@ function e(e, i = !1) {
|
|
|
1185
1192
|
case 47:
|
|
1186
1193
|
let t = o - 1;
|
|
1187
1194
|
if (e.charCodeAt(o + 1) === 47) {
|
|
1188
|
-
for (o += 2; o < a && !n
|
|
1195
|
+
for (o += 2; o < a && !n(e.charCodeAt(o));) o++;
|
|
1189
1196
|
return s = e.substring(t, o), l = 12;
|
|
1190
1197
|
}
|
|
1191
1198
|
if (e.charCodeAt(o + 1) === 42) {
|
|
@@ -1197,7 +1204,7 @@ function e(e, i = !1) {
|
|
|
1197
1204
|
o += 2, i = !0;
|
|
1198
1205
|
break;
|
|
1199
1206
|
}
|
|
1200
|
-
o++, n
|
|
1207
|
+
o++, n(t) && (t === 13 && e.charCodeAt(o) === 10 && o++, u++, f = o);
|
|
1201
1208
|
}
|
|
1202
1209
|
return i || (o++, m = 1), s = e.substring(t, o), l = 13;
|
|
1203
1210
|
}
|
|
@@ -1227,7 +1234,7 @@ function e(e, i = !1) {
|
|
|
1227
1234
|
}
|
|
1228
1235
|
}
|
|
1229
1236
|
function b(e) {
|
|
1230
|
-
if (t(e) || n
|
|
1237
|
+
if (t(e) || n(e)) return !1;
|
|
1231
1238
|
switch (e) {
|
|
1232
1239
|
case 125:
|
|
1233
1240
|
case 93:
|
|
@@ -1263,7 +1270,7 @@ function e(e, i = !1) {
|
|
|
1263
1270
|
function t(e) {
|
|
1264
1271
|
return e === 32 || e === 9;
|
|
1265
1272
|
}
|
|
1266
|
-
function n
|
|
1273
|
+
function n(e) {
|
|
1267
1274
|
return e === 10 || e === 13;
|
|
1268
1275
|
}
|
|
1269
1276
|
function r$1(e) {
|
|
@@ -1457,12 +1464,6 @@ var h;
|
|
|
1457
1464
|
e[e.InvalidSymbol = 1] = `InvalidSymbol`, e[e.InvalidNumberFormat = 2] = `InvalidNumberFormat`, e[e.PropertyNameExpected = 3] = `PropertyNameExpected`, e[e.ValueExpected = 4] = `ValueExpected`, e[e.ColonExpected = 5] = `ColonExpected`, e[e.CommaExpected = 6] = `CommaExpected`, e[e.CloseBraceExpected = 7] = `CloseBraceExpected`, e[e.CloseBracketExpected = 8] = `CloseBracketExpected`, e[e.EndOfFileExpected = 9] = `EndOfFileExpected`, e[e.InvalidCommentToken = 10] = `InvalidCommentToken`, e[e.UnexpectedEndOfComment = 11] = `UnexpectedEndOfComment`, e[e.UnexpectedEndOfString = 12] = `UnexpectedEndOfString`, e[e.UnexpectedEndOfNumber = 13] = `UnexpectedEndOfNumber`, e[e.InvalidUnicode = 14] = `InvalidUnicode`, e[e.InvalidEscapeCharacter = 15] = `InvalidEscapeCharacter`, e[e.InvalidCharacter = 16] = `InvalidCharacter`;
|
|
1458
1465
|
})(h ||= {});
|
|
1459
1466
|
//#endregion
|
|
1460
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
|
|
1461
|
-
function n(t, n) {
|
|
1462
|
-
let r = JSON.parse(t, n?.reviver);
|
|
1463
|
-
return a$1(t, r, n), r;
|
|
1464
|
-
}
|
|
1465
|
-
//#endregion
|
|
1466
1467
|
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs
|
|
1467
1468
|
function r(n, r) {
|
|
1468
1469
|
let i = m(n, r?.errors, r);
|
|
@@ -1542,7 +1543,7 @@ const nodeBuiltins = [
|
|
|
1542
1543
|
];
|
|
1543
1544
|
const own$1 = {}.hasOwnProperty;
|
|
1544
1545
|
const classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
1545
|
-
const kTypes = new Set([
|
|
1546
|
+
const kTypes = /* @__PURE__ */ new Set([
|
|
1546
1547
|
"string",
|
|
1547
1548
|
"function",
|
|
1548
1549
|
"number",
|
|
@@ -2302,8 +2303,8 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
2302
2303
|
return finalizeResolution(resolved, base, preserveSymlinks);
|
|
2303
2304
|
}
|
|
2304
2305
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
|
|
2305
|
-
const isWindows$1 = process.platform === "win32";
|
|
2306
|
-
const globalCache = globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map();
|
|
2306
|
+
const isWindows$1 = /* @__PURE__ */ (() => process.platform === "win32")();
|
|
2307
|
+
const globalCache = /* @__PURE__ */ (() => globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map())();
|
|
2307
2308
|
/**
|
|
2308
2309
|
* Synchronously resolves a module url based on the options provided.
|
|
2309
2310
|
*
|
|
@@ -2519,7 +2520,7 @@ async function readPackageJSON(id, options = {}) {
|
|
|
2519
2520
|
const blob = await promises.readFile(resolvedPath, "utf8");
|
|
2520
2521
|
let parsed;
|
|
2521
2522
|
try {
|
|
2522
|
-
parsed = n(blob);
|
|
2523
|
+
parsed = n$1(blob);
|
|
2523
2524
|
} catch {
|
|
2524
2525
|
parsed = r(blob);
|
|
2525
2526
|
}
|
|
@@ -3241,7 +3242,7 @@ const prefs = {
|
|
|
3241
3242
|
};
|
|
3242
3243
|
//#endregion
|
|
3243
3244
|
//#region src/utils/zotero/rdp-client.ts
|
|
3244
|
-
const UNSOLICITED_EVENTS = new Set([
|
|
3245
|
+
const UNSOLICITED_EVENTS = /* @__PURE__ */ new Set([
|
|
3245
3246
|
"tabNavigated",
|
|
3246
3247
|
"styleApplied",
|
|
3247
3248
|
"propertyChange",
|
|
@@ -3884,7 +3885,7 @@ function isPackageInstalled(packageName) {
|
|
|
3884
3885
|
}
|
|
3885
3886
|
}
|
|
3886
3887
|
function installPackage(packageName) {
|
|
3887
|
-
const debug = isDebug || logger.level <=
|
|
3888
|
+
const debug = isDebug || logger.level <= 1;
|
|
3888
3889
|
try {
|
|
3889
3890
|
logger.debug(`Installing ${packageName}...`);
|
|
3890
3891
|
execSync(`sudo apt update && sudo apt install -y ${packageName}`, { stdio: debug ? "inherit" : "pipe" });
|
|
@@ -4024,6 +4025,10 @@ var TestHttpReporter = class {
|
|
|
4024
4025
|
if (this.failed === 0) logger.success(`Test run completed - ${this.passed} passed`);
|
|
4025
4026
|
else logger.fail(`Test run completed - ${this.passed} passed, ${this.failed} failed`);
|
|
4026
4027
|
break;
|
|
4028
|
+
case "error":
|
|
4029
|
+
logger.error(body.data?.title);
|
|
4030
|
+
this.failed++;
|
|
4031
|
+
break;
|
|
4027
4032
|
default:
|
|
4028
4033
|
logger.log(data);
|
|
4029
4034
|
break;
|
|
@@ -4040,7 +4045,7 @@ async function saveResource(url, path) {
|
|
|
4040
4045
|
}
|
|
4041
4046
|
//#endregion
|
|
4042
4047
|
//#region src/core/tester/test-bundler-template/raw/bootstrap.js?raw
|
|
4043
|
-
var bootstrap_default = "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// Code generated by the zotero-plugin-scaffold tester\nvar chromeHandle;\n\nfunction install(data, reason) {}\n\nasync function startup({ id, version, resourceURI, rootURI }, reason) {\n await Zotero.initializationPromise;\n const aomStartup = Components.classes[\n \"@mozilla.org/addons/addon-manager-startup;1\"\n ].getService(Components.interfaces.amIAddonManagerStartup);\n const manifestURI = Services.io.newURI(rootURI + \"manifest.json\");\n chromeHandle = aomStartup.registerChrome(manifestURI, [\n [\"content\", \"__TESTER_PLUGIN_REF__\", rootURI + \"content/\"],\n ]);\n\n launchTests().catch((error) => {\n Zotero.debug(error);\n Zotero.HTTP.request(\n \"POST\",\n \"http://localhost:__PORT__/update\",\n {\n body: JSON.stringify({\n type: \"
|
|
4048
|
+
var bootstrap_default = "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// Code generated by the zotero-plugin-scaffold tester\nvar chromeHandle;\n\nfunction install(data, reason) {}\n\nasync function startup({ id, version, resourceURI, rootURI }, reason) {\n await Zotero.initializationPromise;\n const aomStartup = Components.classes[\n \"@mozilla.org/addons/addon-manager-startup;1\"\n ].getService(Components.interfaces.amIAddonManagerStartup);\n const manifestURI = Services.io.newURI(rootURI + \"manifest.json\");\n chromeHandle = aomStartup.registerChrome(manifestURI, [\n [\"content\", \"__TESTER_PLUGIN_REF__\", rootURI + \"content/\"],\n ]);\n\n launchTests().catch((error) => {\n Zotero.debug(error);\n Zotero.HTTP.request(\n \"POST\",\n \"http://localhost:__PORT__/update\",\n {\n body: JSON.stringify({\n type: \"error\",\n data: {\n title: error.message,\n },\n }),\n }\n );\n // Although this is an exception, we still need to use the status code 0, \n // because status code 1 will cause Zotero to auto-restart.\n Zotero.Utilities.Internal.quit(0);\n });\n}\n\nfunction onMainWindowLoad({ window: win }) {}\n\nfunction onMainWindowUnload({ window: win }) {}\n\nfunction shutdown({ id, version, resourceURI, rootURI }, reason) {\n if (reason === APP_SHUTDOWN) {\n return;\n }\n\n if (chromeHandle) {\n chromeHandle.destruct();\n chromeHandle = null;\n }\n}\n\nfunction uninstall(data, reason) {}\n\nasync function launchTests() {\n // Delay to allow plugin to fully load before opening the test page\n if (__STARTUP_DELAY__) {\n await Zotero.Promise.delay(__STARTUP_DELAY__);\n }\n\n const waitForPlugin = \"__WAIT_FOR_PLUGIN__\";\n if (waitForPlugin) {\n // Wait for a plugin to be installed\n await waitUtilAsync(() => {\n try {\n return !!eval(waitForPlugin)();\n } catch (error) {\n return false;\n }\n }).catch(() => {\n throw new Error(\"Internal: Plugin awaiting timeout\");\n });\n }\n\n Services.ww.openWindow(\n null,\n \"chrome://__TESTER_PLUGIN_REF__/content/index.xhtml\",\n \"Zotero Plugin Scaffold Test Runnner\",\n \"chrome,centerscreen,resizable=yes\",\n {}\n );\n}\n\nfunction waitUtilAsync(condition, interval = 100, timeout = 1e4) {\n return new Promise((resolve, reject) => {\n const start = Date.now();\n const intervalId = setInterval(() => {\n if (condition()) {\n clearInterval(intervalId);\n resolve();\n } else if (Date.now() - start > timeout) {\n clearInterval(intervalId);\n reject();\n }\n }, interval);\n });\n}\n";
|
|
4044
4049
|
//#endregion
|
|
4045
4050
|
//#region src/core/tester/test-bundler-template/raw/index.html?raw
|
|
4046
4051
|
var raw_default = "<!-- Generated by zotero-plugin-scaffold -->\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Zotero Plugin Test</title>\n <style>\n html {\n min-width: 400px;\n min-height: 600px;\n }\n body {\n font-family: Arial, sans-serif;\n }\n </style>\n </head>\n <body>\n <div id=\"mocha\"></div>\n\n <!-- Include Zotero Vars -->\n <script src=\"chrome://zotero/content/include.js\"><\/script>\n\n <!-- Mocha and Chai Libraries -->\n <script src=\"mocha.js\"><\/script>\n <script src=\"chai.js\"><\/script>\n\n <!-- Setup Mocha -->\n <script>\n __SETUP_CODE__;\n <\/script>\n\n <!-- Unit tests -->\n __TEST_FILES__\n\n <!-- Run Mocha -->\n <script class=\"mocha-exec\">\n mocha.run();\n <\/script>\n </body>\n</html>\n";
|
|
@@ -4069,6 +4074,8 @@ function generateMochaSetup(options) {
|
|
|
4069
4074
|
//#endregion
|
|
4070
4075
|
//#region src/core/tester/test-bundler.ts
|
|
4071
4076
|
var TestBundler = class {
|
|
4077
|
+
ctx;
|
|
4078
|
+
port;
|
|
4072
4079
|
esbuildContext;
|
|
4073
4080
|
constructor(ctx, port) {
|
|
4074
4081
|
this.ctx = ctx;
|
|
@@ -4123,8 +4130,9 @@ var TestBundler = class {
|
|
|
4123
4130
|
}
|
|
4124
4131
|
async bundleTests() {
|
|
4125
4132
|
const testDirs = toArray(this.ctx.test.entries);
|
|
4133
|
+
const entryPoints = (await Promise.all(testDirs.map((dir) => glob(`${dir}/**/*.{spec,test}.[jt]s`)))).flat();
|
|
4126
4134
|
this.esbuildContext = await context({
|
|
4127
|
-
entryPoints
|
|
4135
|
+
entryPoints,
|
|
4128
4136
|
outdir: `${TESTER_PLUGIN_DIR}/content/units`,
|
|
4129
4137
|
bundle: true,
|
|
4130
4138
|
target: "firefox115",
|
package/dist/vendor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as replaceInFile, t as replace } from "./shared/scaffold-replace-
|
|
1
|
+
import { r as replaceInFile, t as replace } from "./shared/scaffold-replace-Dn0wBA9W.mjs";
|
|
2
2
|
import * as esToolkit from "es-toolkit";
|
|
3
3
|
import * as fse from "fs-extra/esm";
|
|
4
4
|
export { esToolkit, fse, replace, replaceInFile };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin-scaffold",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.7",
|
|
5
5
|
"description": "A scaffold for Zotero plugin development.",
|
|
6
6
|
"author": "northword",
|
|
7
7
|
"license": "AGPL-3.0-or-later",
|
|
@@ -55,40 +55,39 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@fluent/syntax": "^0.19.0",
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
58
|
+
"@octokit/rest": "^22.0.1",
|
|
59
|
+
"@swc/core": "^1.15.43",
|
|
60
|
+
"adm-zip": "^0.5.18",
|
|
61
|
+
"bumpp": "^11.1.0",
|
|
62
|
+
"c12": "4.0.0-beta.5",
|
|
62
63
|
"chokidar": "^5.0.0",
|
|
63
|
-
"commander": "^
|
|
64
|
-
"es-toolkit": "^1.
|
|
65
|
-
"esbuild": "^0.
|
|
66
|
-
"fs-extra": "^11.3.
|
|
67
|
-
"hookable": "^6.
|
|
68
|
-
"
|
|
69
|
-
"std-env": "^4.0.0",
|
|
64
|
+
"commander": "^15.0.0",
|
|
65
|
+
"es-toolkit": "^1.49.0",
|
|
66
|
+
"esbuild": "^0.28.1",
|
|
67
|
+
"fs-extra": "^11.3.6",
|
|
68
|
+
"hookable": "^6.1.1",
|
|
69
|
+
"std-env": "^4.1.0",
|
|
70
70
|
"tiny-update-notifier": "^2.0.2",
|
|
71
|
-
"tinyglobby": "^0.2.
|
|
71
|
+
"tinyglobby": "^0.2.17",
|
|
72
72
|
"xvfb-ts": "^1.1.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@antfu/eslint-config": "^
|
|
76
|
-
"@commander-js/extra-typings": "^
|
|
77
|
-
"@types/adm-zip": "^0.5.
|
|
75
|
+
"@antfu/eslint-config": "^9.1.0",
|
|
76
|
+
"@commander-js/extra-typings": "^15.0.0",
|
|
77
|
+
"@types/adm-zip": "^0.5.8",
|
|
78
78
|
"@types/fs-extra": "^11.0.4",
|
|
79
|
-
"@types/node": "^25.
|
|
80
|
-
"bumpp": "^
|
|
79
|
+
"@types/node": "^25.9.4",
|
|
80
|
+
"bumpp": "^11.1.0",
|
|
81
81
|
"changelogen": "^0.6.2",
|
|
82
|
-
"eslint": "^10.0
|
|
82
|
+
"eslint": "^10.6.0",
|
|
83
83
|
"eslint-plugin-format": "^2.0.1",
|
|
84
84
|
"husky": "^9.1.7",
|
|
85
|
-
"lint-staged": "^
|
|
86
|
-
"tsdown": "^0.
|
|
87
|
-
"tsx": "^4.
|
|
88
|
-
"typescript": "^
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"vitest": "^4.1.0"
|
|
85
|
+
"lint-staged": "^17.0.8",
|
|
86
|
+
"tsdown": "^0.22.3",
|
|
87
|
+
"tsx": "^4.22.4",
|
|
88
|
+
"typescript": "^6.0.3",
|
|
89
|
+
"unplugin-raw": "^0.7.0",
|
|
90
|
+
"vitest": "^4.1.9"
|
|
92
91
|
},
|
|
93
92
|
"workspaces": [
|
|
94
93
|
"src",
|
|
File without changes
|