zotero-plugin-scaffold 0.2.0-beta.5 → 0.2.0-beta.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/chunks/github.mjs +8 -4
- package/dist/cli.mjs +19 -15
- package/dist/index.d.mts +20 -19
- package/dist/index.d.ts +20 -19
- package/dist/index.mjs +9 -5
- package/dist/shared/{zotero-plugin-scaffold.619ed490.mjs → zotero-plugin-scaffold.014fe844.mjs} +829 -396
- package/dist/vendor/index.mjs +2 -2
- package/package.json +10 -10
package/dist/chunks/github.mjs
CHANGED
|
@@ -5,23 +5,27 @@ import { globbySync } from 'globby';
|
|
|
5
5
|
import mime from 'mime';
|
|
6
6
|
import { Octokit } from 'octokit';
|
|
7
7
|
import { isCI } from 'std-env';
|
|
8
|
-
import { a as Base } from '../shared/zotero-plugin-scaffold.
|
|
8
|
+
import { a as Base } from '../shared/zotero-plugin-scaffold.014fe844.mjs';
|
|
9
9
|
import 'c12';
|
|
10
10
|
import 'es-toolkit';
|
|
11
11
|
import 'hookable';
|
|
12
12
|
import 'node:readline';
|
|
13
13
|
import 'chalk';
|
|
14
|
+
import 'adm-zip';
|
|
14
15
|
import 'esbuild';
|
|
15
16
|
import 'replace-in-file';
|
|
16
|
-
import 'web-ext';
|
|
17
17
|
import 'node:crypto';
|
|
18
18
|
import 'node:child_process';
|
|
19
19
|
import 'bumpp';
|
|
20
|
-
import 'chokidar';
|
|
21
20
|
import 'node:fs';
|
|
21
|
+
import 'chokidar';
|
|
22
|
+
import 'fs-extra/esm';
|
|
23
|
+
import 'node:net';
|
|
24
|
+
import 'node:buffer';
|
|
25
|
+
import 'node:domain';
|
|
26
|
+
import 'node:events';
|
|
22
27
|
import 'node:fs/promises';
|
|
23
28
|
import 'node:http';
|
|
24
|
-
import 'fs-extra/esm';
|
|
25
29
|
import 'xvfb-ts';
|
|
26
30
|
|
|
27
31
|
var __defProp$1 = Object.defineProperty;
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import process, { exit, env } from 'node:process';
|
|
3
3
|
import { Command } from '@commander-js/extra-typings';
|
|
4
4
|
import updateNotifier from 'update-notifier';
|
|
5
|
-
import { L as Log, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.
|
|
5
|
+
import { L as Log, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.014fe844.mjs';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'c12';
|
|
8
8
|
import 'es-toolkit';
|
|
@@ -11,24 +11,28 @@ import 'hookable';
|
|
|
11
11
|
import 'node:readline';
|
|
12
12
|
import 'chalk';
|
|
13
13
|
import 'std-env';
|
|
14
|
+
import 'adm-zip';
|
|
14
15
|
import 'esbuild';
|
|
15
16
|
import 'globby';
|
|
16
17
|
import 'replace-in-file';
|
|
17
|
-
import 'web-ext';
|
|
18
18
|
import 'node:crypto';
|
|
19
19
|
import 'node:child_process';
|
|
20
20
|
import 'bumpp';
|
|
21
|
-
import 'chokidar';
|
|
22
21
|
import 'node:fs';
|
|
22
|
+
import 'chokidar';
|
|
23
|
+
import 'fs-extra/esm';
|
|
24
|
+
import 'node:net';
|
|
25
|
+
import 'node:buffer';
|
|
26
|
+
import 'node:domain';
|
|
27
|
+
import 'node:events';
|
|
23
28
|
import 'node:fs/promises';
|
|
24
29
|
import 'node:http';
|
|
25
|
-
import 'fs-extra/esm';
|
|
26
30
|
import 'xvfb-ts';
|
|
27
31
|
|
|
28
32
|
const name = "zotero-plugin-scaffold";
|
|
29
33
|
const type = "module";
|
|
30
|
-
const version = "0.2.0-beta.
|
|
31
|
-
const packageManager = "pnpm@9.
|
|
34
|
+
const version = "0.2.0-beta.7";
|
|
35
|
+
const packageManager = "pnpm@9.15.0";
|
|
32
36
|
const description = "A scaffold for Zotero plugin development.";
|
|
33
37
|
const author = "northword";
|
|
34
38
|
const license = "AGPL-3.0-or-later";
|
|
@@ -96,13 +100,13 @@ const peerDependenciesMeta = {
|
|
|
96
100
|
};
|
|
97
101
|
const dependencies = {
|
|
98
102
|
"@commander-js/extra-typings": "^12.1.0",
|
|
99
|
-
"
|
|
100
|
-
bumpp: "9.
|
|
103
|
+
"adm-zip": "^0.5.16",
|
|
104
|
+
bumpp: "^9.9.1",
|
|
101
105
|
c12: "^2.0.1",
|
|
102
106
|
chalk: "^5.3.0",
|
|
103
107
|
chokidar: "^4.0.1",
|
|
104
108
|
commander: "^12.1.0",
|
|
105
|
-
"es-toolkit": "^1.
|
|
109
|
+
"es-toolkit": "^1.29.0",
|
|
106
110
|
esbuild: "^0.24.0",
|
|
107
111
|
"fs-extra": "^11.2.0",
|
|
108
112
|
globby: "^14.0.2",
|
|
@@ -110,18 +114,18 @@ const dependencies = {
|
|
|
110
114
|
mime: "^4.0.4",
|
|
111
115
|
octokit: "^4.0.2",
|
|
112
116
|
"replace-in-file": "^8.2.0",
|
|
113
|
-
"std-env": "^3.
|
|
117
|
+
"std-env": "^3.8.0",
|
|
114
118
|
"update-notifier": "^7.3.1",
|
|
115
|
-
"web-ext": "^8.3.0",
|
|
116
119
|
"xvfb-ts": "^1.1.0"
|
|
117
120
|
};
|
|
118
121
|
const devDependencies = {
|
|
119
|
-
"@antfu/eslint-config": "^3.
|
|
122
|
+
"@antfu/eslint-config": "^3.11.2",
|
|
123
|
+
"@types/adm-zip": "^0.5.7",
|
|
120
124
|
"@types/fs-extra": "^11.0.4",
|
|
121
|
-
"@types/node": "^22.
|
|
125
|
+
"@types/node": "^22.10.2",
|
|
122
126
|
"@types/update-notifier": "^6.0.8",
|
|
123
|
-
eslint: "^9.
|
|
124
|
-
"eslint-plugin-format": "^0.1.
|
|
127
|
+
eslint: "^9.16.0",
|
|
128
|
+
"eslint-plugin-format": "^0.1.3",
|
|
125
129
|
typescript: "^5.7.2",
|
|
126
130
|
unbuild: "^2.0.0"
|
|
127
131
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Hookable } from 'hookable';
|
|
2
2
|
import * as esbuild from 'esbuild';
|
|
3
3
|
import { BuildOptions } from 'esbuild';
|
|
4
|
-
import * as child_process from 'child_process';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Logger
|
|
@@ -616,7 +615,7 @@ interface TestConfig {
|
|
|
616
615
|
* 这些目录中的所有 `*.spec.js` 文件将被执行。
|
|
617
616
|
* 文件将按字母顺序排序。
|
|
618
617
|
*
|
|
619
|
-
* @default "test
|
|
618
|
+
* @default "test"
|
|
620
619
|
*/
|
|
621
620
|
entries: string | string[];
|
|
622
621
|
/**
|
|
@@ -692,7 +691,7 @@ interface TestConfig {
|
|
|
692
691
|
*
|
|
693
692
|
* 如果设置,测试将等待函数返回 true 后再运行测试。
|
|
694
693
|
*
|
|
695
|
-
* @default "()=>true"
|
|
694
|
+
* @default "() => true"
|
|
696
695
|
*
|
|
697
696
|
* @example
|
|
698
697
|
* ```js
|
|
@@ -706,11 +705,10 @@ interface TestHooks {
|
|
|
706
705
|
"test:init": (ctx: Context) => void | Promise<void>;
|
|
707
706
|
"test:prebuild": (ctx: Context) => void | Promise<void>;
|
|
708
707
|
"test:listen": (ctx: Context) => void | Promise<void>;
|
|
709
|
-
"test:mkdir": (ctx: Context) => void | Promise<void>;
|
|
710
708
|
"test:copyAssets": (ctx: Context) => void | Promise<void>;
|
|
711
709
|
"test:bundleTests": (ctx: Context) => void | Promise<void>;
|
|
712
710
|
"test:run": (ctx: Context) => void | Promise<void>;
|
|
713
|
-
"test:
|
|
711
|
+
"test:exit": (ctx: Context) => void;
|
|
714
712
|
}
|
|
715
713
|
interface Hooks extends BuildHooks, ServeHooks, ReleaseHooks, TestHooks {
|
|
716
714
|
}
|
|
@@ -813,6 +811,8 @@ declare class Release extends Base {
|
|
|
813
811
|
declare class Serve extends Base {
|
|
814
812
|
private builder;
|
|
815
813
|
private runner?;
|
|
814
|
+
private _zoteroBinPath?;
|
|
815
|
+
private _profilePath?;
|
|
816
816
|
constructor(ctx: Context);
|
|
817
817
|
run(): Promise<void>;
|
|
818
818
|
/**
|
|
@@ -822,22 +822,18 @@ declare class Serve extends Base {
|
|
|
822
822
|
onChange(path: string): Promise<void>;
|
|
823
823
|
reload(): Promise<void>;
|
|
824
824
|
exit: () => never;
|
|
825
|
+
private onZoteroExit;
|
|
826
|
+
get zoteroBinPath(): string;
|
|
827
|
+
get profilePath(): string;
|
|
828
|
+
get dataDir(): string;
|
|
825
829
|
}
|
|
826
830
|
|
|
827
831
|
declare class Test extends Base {
|
|
828
832
|
private builder;
|
|
829
|
-
private
|
|
830
|
-
private _dataDir?;
|
|
831
|
-
private _testPluginDir?;
|
|
832
|
-
private _testPluginRef;
|
|
833
|
-
private _testPluginID;
|
|
834
|
-
private _testBuildDir?;
|
|
833
|
+
private runner?;
|
|
835
834
|
private _server?;
|
|
836
|
-
private _process?;
|
|
837
|
-
get startArgs(): string[];
|
|
838
835
|
constructor(ctx: Context);
|
|
839
836
|
run(): Promise<void>;
|
|
840
|
-
prepareDir(): Promise<void>;
|
|
841
837
|
createManifest(): Promise<void>;
|
|
842
838
|
createBootstrap(): Promise<void>;
|
|
843
839
|
createTestResources(): Promise<void>;
|
|
@@ -852,12 +848,17 @@ declare class Test extends Base {
|
|
|
852
848
|
stack?: string;
|
|
853
849
|
};
|
|
854
850
|
}): Promise<void>;
|
|
855
|
-
prepareHeadless(): Promise<void>;
|
|
856
|
-
installXvfb(): Promise<void>;
|
|
857
|
-
installZoteroLinux(): Promise<void>;
|
|
858
851
|
startZoteroHeadless(): Promise<void>;
|
|
859
|
-
startZotero(): Promise<
|
|
860
|
-
exit(
|
|
852
|
+
startZotero(): Promise<void>;
|
|
853
|
+
exit: (code?: string | number) => never;
|
|
854
|
+
private get zoteroBinPath();
|
|
855
|
+
private get profilePath();
|
|
856
|
+
private get dataDir();
|
|
857
|
+
private get testBuildDir();
|
|
858
|
+
private get testPluginDir();
|
|
859
|
+
private get testPluginRef();
|
|
860
|
+
private get testPluginID();
|
|
861
|
+
private get prefs();
|
|
861
862
|
}
|
|
862
863
|
|
|
863
864
|
declare const Config: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Hookable } from 'hookable';
|
|
2
2
|
import * as esbuild from 'esbuild';
|
|
3
3
|
import { BuildOptions } from 'esbuild';
|
|
4
|
-
import * as child_process from 'child_process';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Logger
|
|
@@ -616,7 +615,7 @@ interface TestConfig {
|
|
|
616
615
|
* 这些目录中的所有 `*.spec.js` 文件将被执行。
|
|
617
616
|
* 文件将按字母顺序排序。
|
|
618
617
|
*
|
|
619
|
-
* @default "test
|
|
618
|
+
* @default "test"
|
|
620
619
|
*/
|
|
621
620
|
entries: string | string[];
|
|
622
621
|
/**
|
|
@@ -692,7 +691,7 @@ interface TestConfig {
|
|
|
692
691
|
*
|
|
693
692
|
* 如果设置,测试将等待函数返回 true 后再运行测试。
|
|
694
693
|
*
|
|
695
|
-
* @default "()=>true"
|
|
694
|
+
* @default "() => true"
|
|
696
695
|
*
|
|
697
696
|
* @example
|
|
698
697
|
* ```js
|
|
@@ -706,11 +705,10 @@ interface TestHooks {
|
|
|
706
705
|
"test:init": (ctx: Context) => void | Promise<void>;
|
|
707
706
|
"test:prebuild": (ctx: Context) => void | Promise<void>;
|
|
708
707
|
"test:listen": (ctx: Context) => void | Promise<void>;
|
|
709
|
-
"test:mkdir": (ctx: Context) => void | Promise<void>;
|
|
710
708
|
"test:copyAssets": (ctx: Context) => void | Promise<void>;
|
|
711
709
|
"test:bundleTests": (ctx: Context) => void | Promise<void>;
|
|
712
710
|
"test:run": (ctx: Context) => void | Promise<void>;
|
|
713
|
-
"test:
|
|
711
|
+
"test:exit": (ctx: Context) => void;
|
|
714
712
|
}
|
|
715
713
|
interface Hooks extends BuildHooks, ServeHooks, ReleaseHooks, TestHooks {
|
|
716
714
|
}
|
|
@@ -813,6 +811,8 @@ declare class Release extends Base {
|
|
|
813
811
|
declare class Serve extends Base {
|
|
814
812
|
private builder;
|
|
815
813
|
private runner?;
|
|
814
|
+
private _zoteroBinPath?;
|
|
815
|
+
private _profilePath?;
|
|
816
816
|
constructor(ctx: Context);
|
|
817
817
|
run(): Promise<void>;
|
|
818
818
|
/**
|
|
@@ -822,22 +822,18 @@ declare class Serve extends Base {
|
|
|
822
822
|
onChange(path: string): Promise<void>;
|
|
823
823
|
reload(): Promise<void>;
|
|
824
824
|
exit: () => never;
|
|
825
|
+
private onZoteroExit;
|
|
826
|
+
get zoteroBinPath(): string;
|
|
827
|
+
get profilePath(): string;
|
|
828
|
+
get dataDir(): string;
|
|
825
829
|
}
|
|
826
830
|
|
|
827
831
|
declare class Test extends Base {
|
|
828
832
|
private builder;
|
|
829
|
-
private
|
|
830
|
-
private _dataDir?;
|
|
831
|
-
private _testPluginDir?;
|
|
832
|
-
private _testPluginRef;
|
|
833
|
-
private _testPluginID;
|
|
834
|
-
private _testBuildDir?;
|
|
833
|
+
private runner?;
|
|
835
834
|
private _server?;
|
|
836
|
-
private _process?;
|
|
837
|
-
get startArgs(): string[];
|
|
838
835
|
constructor(ctx: Context);
|
|
839
836
|
run(): Promise<void>;
|
|
840
|
-
prepareDir(): Promise<void>;
|
|
841
837
|
createManifest(): Promise<void>;
|
|
842
838
|
createBootstrap(): Promise<void>;
|
|
843
839
|
createTestResources(): Promise<void>;
|
|
@@ -852,12 +848,17 @@ declare class Test extends Base {
|
|
|
852
848
|
stack?: string;
|
|
853
849
|
};
|
|
854
850
|
}): Promise<void>;
|
|
855
|
-
prepareHeadless(): Promise<void>;
|
|
856
|
-
installXvfb(): Promise<void>;
|
|
857
|
-
installZoteroLinux(): Promise<void>;
|
|
858
851
|
startZoteroHeadless(): Promise<void>;
|
|
859
|
-
startZotero(): Promise<
|
|
860
|
-
exit(
|
|
852
|
+
startZotero(): Promise<void>;
|
|
853
|
+
exit: (code?: string | number) => never;
|
|
854
|
+
private get zoteroBinPath();
|
|
855
|
+
private get profilePath();
|
|
856
|
+
private get dataDir();
|
|
857
|
+
private get testBuildDir();
|
|
858
|
+
private get testPluginDir();
|
|
859
|
+
private get testPluginRef();
|
|
860
|
+
private get testPluginID();
|
|
861
|
+
private get prefs();
|
|
861
862
|
}
|
|
862
863
|
|
|
863
864
|
declare const Config: {
|
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
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.014fe844.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
|
+
import 'node:process';
|
|
3
4
|
import 'c12';
|
|
4
5
|
import 'es-toolkit';
|
|
5
6
|
import 'fs-extra';
|
|
6
7
|
import 'hookable';
|
|
7
|
-
import 'node:process';
|
|
8
8
|
import 'node:readline';
|
|
9
9
|
import 'chalk';
|
|
10
10
|
import 'std-env';
|
|
11
|
+
import 'adm-zip';
|
|
11
12
|
import 'esbuild';
|
|
12
13
|
import 'globby';
|
|
13
14
|
import 'replace-in-file';
|
|
14
|
-
import 'web-ext';
|
|
15
15
|
import 'node:crypto';
|
|
16
16
|
import 'node:child_process';
|
|
17
17
|
import 'bumpp';
|
|
18
|
-
import 'chokidar';
|
|
19
18
|
import 'node:fs';
|
|
19
|
+
import 'chokidar';
|
|
20
|
+
import 'fs-extra/esm';
|
|
21
|
+
import 'node:net';
|
|
22
|
+
import 'node:buffer';
|
|
23
|
+
import 'node:domain';
|
|
24
|
+
import 'node:events';
|
|
20
25
|
import 'node:fs/promises';
|
|
21
26
|
import 'node:http';
|
|
22
|
-
import 'fs-extra/esm';
|
|
23
27
|
import 'xvfb-ts';
|