zotero-plugin-scaffold 0.0.11 → 0.0.13
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 +1 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import 'chokidar';
|
|
|
23
23
|
import 'process';
|
|
24
24
|
|
|
25
25
|
const name = "zotero-plugin-scaffold";
|
|
26
|
-
const version = "0.0.
|
|
26
|
+
const version = "0.0.13";
|
|
27
27
|
const description = "A scaffold for Zotero plugin development.";
|
|
28
28
|
const scripts = {
|
|
29
29
|
dev: "unbuild --stub",
|
|
@@ -184,7 +184,6 @@ async function main() {
|
|
|
184
184
|
consola.error("The create not yet implemented");
|
|
185
185
|
});
|
|
186
186
|
cli.command("release").description("Release.").action(async (options) => {
|
|
187
|
-
consola.error("The release not yet implemented");
|
|
188
187
|
process.env.NODE_ENV = "production";
|
|
189
188
|
const config = await Config.loadConfig({});
|
|
190
189
|
new Release(config).run();
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -462,25 +462,29 @@ class Release extends Base {
|
|
|
462
462
|
* then, create or update release (tag is "release"), update `update.json`.
|
|
463
463
|
*/
|
|
464
464
|
async run() {
|
|
465
|
+
const t = /* @__PURE__ */ new Date();
|
|
465
466
|
if (!this.isCI) {
|
|
466
|
-
this.bump();
|
|
467
|
+
await this.bump();
|
|
467
468
|
} else {
|
|
468
469
|
if (glob.globSync(`${this.dist}/*.xpi`).length == 0) {
|
|
469
470
|
this.logger.error(
|
|
470
471
|
"No xpi file found, are you sure you have run the build?"
|
|
471
472
|
);
|
|
472
473
|
}
|
|
473
|
-
this.uploadXPI();
|
|
474
|
-
this.uploadUpdateJSON();
|
|
474
|
+
await this.uploadXPI();
|
|
475
|
+
await this.uploadUpdateJSON();
|
|
475
476
|
}
|
|
477
|
+
this.logger.success(
|
|
478
|
+
`Done in ${(( new Date()).getTime() - t.getTime()) / 1e3} s.`
|
|
479
|
+
);
|
|
476
480
|
}
|
|
477
481
|
/**
|
|
478
482
|
* Bumps release
|
|
479
483
|
*
|
|
480
484
|
* release: bump version, run build, git add, git commit, git tag, git push
|
|
481
485
|
*/
|
|
482
|
-
bump() {
|
|
483
|
-
versionBump(this.ctx.release.bumpp);
|
|
486
|
+
async bump() {
|
|
487
|
+
await versionBump(this.ctx.release.bumpp);
|
|
484
488
|
}
|
|
485
489
|
/**
|
|
486
490
|
* Create new release and upload XPI to asset
|