zotero-plugin-scaffold 0.0.33 → 0.0.34
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 +11 -7
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +5 -3
- package/dist/tools/index.d.mts +2 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.mjs +2 -0
- package/package.json +10 -6
package/dist/cli.mjs
CHANGED
|
@@ -25,8 +25,8 @@ import 'chokidar';
|
|
|
25
25
|
|
|
26
26
|
const name = "zotero-plugin-scaffold";
|
|
27
27
|
const type = "module";
|
|
28
|
-
const version = "0.0.
|
|
29
|
-
const packageManager = "pnpm@9.
|
|
28
|
+
const version = "0.0.34";
|
|
29
|
+
const packageManager = "pnpm@9.6.0";
|
|
30
30
|
const description = "A scaffold for Zotero plugin development.";
|
|
31
31
|
const author = "northword";
|
|
32
32
|
const license = "AGPL-3.0-or-later";
|
|
@@ -49,6 +49,10 @@ const exports = {
|
|
|
49
49
|
".": {
|
|
50
50
|
types: "./dist/index.d.ts",
|
|
51
51
|
"import": "./dist/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./tools": {
|
|
54
|
+
types: "./dist/tools/index.d.ts",
|
|
55
|
+
"import": "./dist/tools/index.mjs"
|
|
52
56
|
}
|
|
53
57
|
};
|
|
54
58
|
const main$1 = "./dist/index.mjs";
|
|
@@ -81,7 +85,7 @@ const directories = {
|
|
|
81
85
|
doc: "docs"
|
|
82
86
|
};
|
|
83
87
|
const dependencies = {
|
|
84
|
-
"@inquirer/prompts": "5.
|
|
88
|
+
"@inquirer/prompts": "5.3.6",
|
|
85
89
|
bumpp: "9.4.1",
|
|
86
90
|
c12: "1.11.1",
|
|
87
91
|
chalk: "5.3.0",
|
|
@@ -98,17 +102,17 @@ const dependencies = {
|
|
|
98
102
|
radash: "12.1.0",
|
|
99
103
|
"replace-in-file": "8.1.0",
|
|
100
104
|
"std-env": "3.7.0",
|
|
101
|
-
"update-notifier": "7.
|
|
105
|
+
"update-notifier": "7.2.0",
|
|
102
106
|
"web-ext": "8.2.0"
|
|
103
107
|
};
|
|
104
108
|
const devDependencies = {
|
|
105
109
|
"@antfu/eslint-config": "^2.23.0",
|
|
106
110
|
"@types/fs-extra": "11.0.4",
|
|
107
|
-
"@types/node": "20.14.
|
|
111
|
+
"@types/node": "20.14.13",
|
|
108
112
|
"@types/update-notifier": "6.0.8",
|
|
109
|
-
eslint: "9.
|
|
113
|
+
eslint: "9.8.0",
|
|
110
114
|
"eslint-plugin-format": "^0.1.2",
|
|
111
|
-
typescript: "5.5.
|
|
115
|
+
typescript: "5.5.4",
|
|
112
116
|
unbuild: "2.0.0"
|
|
113
117
|
};
|
|
114
118
|
const pnpm = {
|
package/dist/index.d.mts
CHANGED
|
@@ -110,6 +110,12 @@ interface Config$1 {
|
|
|
110
110
|
* @default _.dash(name)
|
|
111
111
|
*/
|
|
112
112
|
namespace: string;
|
|
113
|
+
/**
|
|
114
|
+
* XPI filename
|
|
115
|
+
*
|
|
116
|
+
* @default _.dash(name)
|
|
117
|
+
*/
|
|
118
|
+
xpiName: string;
|
|
113
119
|
/**
|
|
114
120
|
* XPI 文件的地址
|
|
115
121
|
*
|
|
@@ -338,7 +344,6 @@ interface UserConfig extends RecursivePartial<Config$1> {
|
|
|
338
344
|
}
|
|
339
345
|
interface Context extends Config$1 {
|
|
340
346
|
pkgUser: any;
|
|
341
|
-
xpiName: string;
|
|
342
347
|
version: string;
|
|
343
348
|
hooks: Hookable<Hooks>;
|
|
344
349
|
templateDate: {
|
package/dist/index.d.ts
CHANGED
|
@@ -110,6 +110,12 @@ interface Config$1 {
|
|
|
110
110
|
* @default _.dash(name)
|
|
111
111
|
*/
|
|
112
112
|
namespace: string;
|
|
113
|
+
/**
|
|
114
|
+
* XPI filename
|
|
115
|
+
*
|
|
116
|
+
* @default _.dash(name)
|
|
117
|
+
*/
|
|
118
|
+
xpiName: string;
|
|
113
119
|
/**
|
|
114
120
|
* XPI 文件的地址
|
|
115
121
|
*
|
|
@@ -338,7 +344,6 @@ interface UserConfig extends RecursivePartial<Config$1> {
|
|
|
338
344
|
}
|
|
339
345
|
interface Context extends Config$1 {
|
|
340
346
|
pkgUser: any;
|
|
341
|
-
xpiName: string;
|
|
342
347
|
version: string;
|
|
343
348
|
hooks: Hookable<Hooks>;
|
|
344
349
|
templateDate: {
|
package/dist/index.mjs
CHANGED
|
@@ -101,12 +101,14 @@ function resolveConfig(config) {
|
|
|
101
101
|
const [, owner, repo] = (pkg.repository?.url ?? "").match(
|
|
102
102
|
/:\/\/.+com\/([^/]+)\/([^.]+)\.git$/
|
|
103
103
|
);
|
|
104
|
+
if (!config.xpiName)
|
|
105
|
+
config.xpiName = dash(config.name);
|
|
104
106
|
const data = {
|
|
105
107
|
owner,
|
|
106
108
|
repo,
|
|
107
109
|
version: pkg.version,
|
|
108
110
|
isPreRelease: pkg.version.includes("-"),
|
|
109
|
-
xpiName:
|
|
111
|
+
xpiName: config.xpiName,
|
|
110
112
|
buildTime: dateFormat("YYYY-mm-dd HH:MM:SS", /* @__PURE__ */ new Date())
|
|
111
113
|
};
|
|
112
114
|
config.updateURL = template(config.updateURL, data);
|
|
@@ -114,7 +116,6 @@ function resolveConfig(config) {
|
|
|
114
116
|
const ctx = {
|
|
115
117
|
...config,
|
|
116
118
|
pkgUser: pkg,
|
|
117
|
-
xpiName: dash(config.name),
|
|
118
119
|
version: pkg.version,
|
|
119
120
|
hooks: createHooks(),
|
|
120
121
|
templateDate: data
|
|
@@ -133,6 +134,7 @@ const defaultConfig = {
|
|
|
133
134
|
name: "",
|
|
134
135
|
id: "",
|
|
135
136
|
namespace: "",
|
|
137
|
+
xpiName: "",
|
|
136
138
|
xpiDownloadLink: "https://github.com/{{owner}}/{{repo}}/releases/download/v{{version}}/{{xpiName}}.xpi",
|
|
137
139
|
updateURL: "https://github.com/{{owner}}/{{repo}}/releases/download/release/update.json",
|
|
138
140
|
build: {
|
|
@@ -339,7 +341,7 @@ class Build extends Base {
|
|
|
339
341
|
);
|
|
340
342
|
const template2 = {
|
|
341
343
|
...userData,
|
|
342
|
-
|
|
344
|
+
...!userData.name && this.name && { name: this.name },
|
|
343
345
|
...this.version && { version: this.version },
|
|
344
346
|
manifest_version: 2,
|
|
345
347
|
applications: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin-scaffold",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.34",
|
|
5
5
|
"description": "A scaffold for Zotero plugin development.",
|
|
6
6
|
"author": "northword",
|
|
7
7
|
"license": "AGPL-3.0-or-later",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"import": "./dist/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./tools": {
|
|
29
|
+
"types": "./dist/tools/index.d.ts",
|
|
30
|
+
"import": "./dist/tools/index.mjs"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
"main": "./dist/index.mjs",
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
"doc": "docs"
|
|
48
52
|
},
|
|
49
53
|
"dependencies": {
|
|
50
|
-
"@inquirer/prompts": "5.
|
|
54
|
+
"@inquirer/prompts": "5.3.6",
|
|
51
55
|
"bumpp": "9.4.1",
|
|
52
56
|
"c12": "1.11.1",
|
|
53
57
|
"chalk": "5.3.0",
|
|
@@ -64,17 +68,17 @@
|
|
|
64
68
|
"radash": "12.1.0",
|
|
65
69
|
"replace-in-file": "8.1.0",
|
|
66
70
|
"std-env": "3.7.0",
|
|
67
|
-
"update-notifier": "7.
|
|
71
|
+
"update-notifier": "7.2.0",
|
|
68
72
|
"web-ext": "8.2.0"
|
|
69
73
|
},
|
|
70
74
|
"devDependencies": {
|
|
71
75
|
"@antfu/eslint-config": "^2.23.0",
|
|
72
76
|
"@types/fs-extra": "11.0.4",
|
|
73
|
-
"@types/node": "20.14.
|
|
77
|
+
"@types/node": "20.14.13",
|
|
74
78
|
"@types/update-notifier": "6.0.8",
|
|
75
|
-
"eslint": "9.
|
|
79
|
+
"eslint": "9.8.0",
|
|
76
80
|
"eslint-plugin-format": "^0.1.2",
|
|
77
|
-
"typescript": "5.5.
|
|
81
|
+
"typescript": "5.5.4",
|
|
78
82
|
"unbuild": "2.0.0"
|
|
79
83
|
},
|
|
80
84
|
"scripts": {
|