silgi 0.30.4 → 0.30.5

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/build.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { watch } from 'chokidar';
2
2
  import consola from 'consola';
3
3
  import { join, basename } from 'pathe';
4
+ import { debounce } from 'perfect-debounce';
4
5
  import { u as useSilgiCLI, a as silgiCLIIClose } from './_chunks/silgiApp.mjs';
5
6
  import { r as reloadScan } from './cli/devServer.mjs';
6
7
  import { c as createSilgiCLI, b as build } from './cli/build.mjs';
@@ -54,10 +55,14 @@ async function prepareBuild(config) {
54
55
  }
55
56
 
56
57
  async function watchDev() {
57
- await prepareBuild({
58
- commandType: "prepare",
59
- activeEnvironment: ".env"
60
- });
58
+ let watcher;
59
+ async function load() {
60
+ await prepareBuild({
61
+ commandType: "prepare",
62
+ activeEnvironment: ".env"
63
+ });
64
+ }
65
+ const reload = debounce(load);
61
66
  const silgi = useSilgiCLI();
62
67
  silgi.options.watchOptions.ignored ??= [];
63
68
  silgi.options.watchOptions.ignoreInitial = true;
@@ -76,7 +81,6 @@ async function watchDev() {
76
81
  join(silgi.options.rootDir, "silgi.config.ts")
77
82
  );
78
83
  const watchReloadEvents = /* @__PURE__ */ new Set(["add", "addDir", "unlink", "unlinkDir", "change"]);
79
- let watcher;
80
84
  if (silgi.options.devServer.watch.length > 0) {
81
85
  silgi.options.devServer.watch = [...new Set(silgi.options.devServer.watch)];
82
86
  watcher = watch(silgi.options.devServer.watch, silgi.options.watchOptions);
@@ -88,10 +92,7 @@ async function watchDev() {
88
92
  silgi.errors = [];
89
93
  try {
90
94
  await reloadScan(path, stats);
91
- await prepareBuild({
92
- commandType: "prepare",
93
- activeEnvironment: ".env"
94
- });
95
+ await reload();
95
96
  } catch (error) {
96
97
  consola.withTag("silgi").error(error);
97
98
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.30.4";
4
+ const version = "0.30.5";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.30.4",
4
+ "version": "0.30.5",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -98,7 +98,7 @@
98
98
  "exsolve": "^1.0.5",
99
99
  "globby": "^14.1.0",
100
100
  "hookable": "^5.5.3",
101
- "ignore": "^7.0.3",
101
+ "ignore": "^7.0.4",
102
102
  "klona": "^2.0.6",
103
103
  "knitwork": "^1.2.0",
104
104
  "magicast": "^0.3.5",
@@ -106,6 +106,7 @@
106
106
  "ofetch": "^1.4.1",
107
107
  "ohash": "^2.0.11",
108
108
  "pathe": "^2.0.3",
109
+ "perfect-debounce": "^1.0.0",
109
110
  "picocolors": "^1.1.1",
110
111
  "pkg-types": "^2.1.0",
111
112
  "rfc6902": "^5.1.2",
@@ -123,8 +124,8 @@
123
124
  "@antfu/eslint-config": "^4.12.0",
124
125
  "@nuxt/kit": "^3.16.2",
125
126
  "@nuxt/schema": "^3.16.2",
126
- "@silgi/ecosystem": "^0.5.0",
127
- "@types/node": "^22.14.1",
127
+ "@silgi/ecosystem": "^0.6.0",
128
+ "@types/node": "^22.15.2",
128
129
  "@types/semver": "^7.7.0",
129
130
  "@vitest/coverage-v8": "3.0.5",
130
131
  "eslint": "^9.25.1",