zotero-plugin-scaffold 0.0.23 → 0.0.24

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 CHANGED
@@ -24,7 +24,7 @@ import 'chokidar';
24
24
  import 'process';
25
25
 
26
26
  const name = "zotero-plugin-scaffold";
27
- const version = "0.0.23";
27
+ const version = "0.0.24";
28
28
  const description = "A scaffold for Zotero plugin development.";
29
29
  const scripts = {
30
30
  dev: "unbuild --stub",
package/dist/index.mjs CHANGED
@@ -755,7 +755,12 @@ class Serve extends Base {
755
755
  if (path2.endsWith(".ts")) {
756
756
  this.builder.esbuild();
757
757
  } else {
758
- this.builder.run();
758
+ await this.builder.run();
759
+ }
760
+ if (this.ctx.server.asProxy) {
761
+ this.reload();
762
+ this.logger.info("Reloaded done.");
763
+ await this.ctx.hooks.callHook("serve:onReloaded", this.ctx);
759
764
  }
760
765
  } catch (err) {
761
766
  this.logger.error(err);
@@ -767,18 +772,12 @@ class Serve extends Base {
767
772
  this.logger.ready("Server Ready! \n");
768
773
  }).on("change", async (path2) => {
769
774
  if (this.ctx.server.asProxy) {
770
- this.logger.log(`
771
- ${path2} changed`);
775
+ console.clear();
776
+ this.logger.log(`${path2} changed`);
772
777
  } else {
773
778
  console.log("");
774
779
  }
775
- onChange.cancel();
776
780
  onChange(path2);
777
- if (this.ctx.server.asProxy) {
778
- this.reload();
779
- this.logger.info("Reloaded done.");
780
- await this.ctx.hooks.callHook("serve:onReloaded", this.ctx);
781
- }
782
781
  }).on("error", (err) => {
783
782
  this.logger.error("Server start failed!", err);
784
783
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "A scaffold for Zotero plugin development.",
5
5
  "type": "module",
6
6
  "exports": {