nuxt-gin-tools 0.2.4 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-gin-tools",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "This project is used as a dependency for [nuxt-gin-starter](https://github.com/RapboyGao/nuxt-gin-starter.git)",
5
5
  "bin": {
6
6
  "nuxt-gin": "index.js"
package/src/dev-go.js CHANGED
@@ -96,7 +96,7 @@ function loadWatchConfig() {
96
96
  parsedConfig = JSON.parse((0, fs_extra_1.readFileSync)(configPath, "utf-8"));
97
97
  }
98
98
  catch (_j) {
99
- console.warn(chalk_1.default.yellow(`[${LOG_TAG}] invalid watch config JSON, fallback to defaults: ${configPath}`));
99
+ console.warn(chalk_1.default.green(`[${LOG_TAG}] invalid watch config JSON, fallback to defaults: ${configPath}`));
100
100
  return defaultConfig;
101
101
  }
102
102
  const includeExt = toStringArray((_a = parsedConfig.includeExt) !== null && _a !== void 0 ? _a : parsedConfig.include_ext)
@@ -240,7 +240,7 @@ function startGoDev() {
240
240
  const watchRoots = watchConfig.includeDir.length
241
241
  ? watchConfig.includeDir.map((dir) => (0, path_1.join)(cwd, dir))
242
242
  : [cwd];
243
- console.log(chalk_1.default.cyan(`[${LOG_TAG}] watching: ${watchRoots.map((item) => toProjectRelative(item)).join(", ")}`));
243
+ console.log(chalk_1.default.green(`[${LOG_TAG}] watching: ${watchRoots.map((item) => toProjectRelative(item)).join(", ")}`));
244
244
  let restarting = false;
245
245
  let goProc = runGoProcess();
246
246
  let restartTimer = null;
@@ -265,7 +265,7 @@ function startGoDev() {
265
265
  return;
266
266
  }
267
267
  restarting = true;
268
- console.log(chalk_1.default.yellow(`[${LOG_TAG}] ${eventName}: ${relPath}, restarting...`));
268
+ console.log(chalk_1.default.green(`[${LOG_TAG}] ${eventName}: ${relPath}, restarting...`));
269
269
  yield stopGoProcess(goProc);
270
270
  goProc = runGoProcess();
271
271
  restarting = false;
@@ -276,7 +276,7 @@ function startGoDev() {
276
276
  .on("change", (filePath) => triggerRestart("change", filePath))
277
277
  .on("unlink", (filePath) => triggerRestart("unlink", filePath))
278
278
  .on("error", (error) => {
279
- console.error(chalk_1.default.red(`[${LOG_TAG}] watcher error: ${String(error)}`));
279
+ console.error(chalk_1.default.green(`[${LOG_TAG}] watcher error: ${String(error)}`));
280
280
  });
281
281
  const shutdown = () => __awaiter(this, void 0, void 0, function* () {
282
282
  if (restartTimer) {
@@ -299,7 +299,7 @@ function startGoDev() {
299
299
  if (require.main === module) {
300
300
  // 兼容直接执行该文件(例如 node src/dev-go.js)。
301
301
  startGoDev().catch((error) => {
302
- console.error(chalk_1.default.red(`[${LOG_TAG}] failed to start: ${String(error)}`));
302
+ console.error(chalk_1.default.green(`[${LOG_TAG}] failed to start: ${String(error)}`));
303
303
  process.exit(1);
304
304
  });
305
305
  }
package/src/update.js CHANGED
@@ -10,7 +10,7 @@ function update() {
10
10
  {
11
11
  command: "pnpm update --latest",
12
12
  name: "pnpm",
13
- prefixColor: "blue",
13
+ prefixColor: "magenta",
14
14
  },
15
15
  {
16
16
  command: "go get -u && go mod tidy",
package/src/utils.js CHANGED
@@ -34,7 +34,7 @@ function killPortUnix(port, options) {
34
34
  for (const pid of pids) {
35
35
  try {
36
36
  process.kill(pid, "SIGKILL");
37
- console.log(chalk_1.default.yellow(buildMessage(pid, port, "unix", options)));
37
+ console.log(chalk_1.default.green(buildMessage(pid, port, "unix", options)));
38
38
  }
39
39
  catch (_a) {
40
40
  // Best-effort: if the process is already gone, ignore.
@@ -81,7 +81,7 @@ function killPortWindows(port, options) {
81
81
  (0, child_process_1.execSync)(`taskkill /PID ${pid} /F`, {
82
82
  stdio: ["ignore", "ignore", "ignore"],
83
83
  });
84
- console.log(chalk_1.default.yellow(buildMessage(pid, port, "win32", options)));
84
+ console.log(chalk_1.default.green(buildMessage(pid, port, "win32", options)));
85
85
  }
86
86
  catch (_a) {
87
87
  // Best-effort: if the process is already gone, ignore.