rulesync 7.19.0 → 7.20.0

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.
@@ -41,85 +41,91 @@ var CLIError = class extends Error {
41
41
  }
42
42
  };
43
43
 
44
- // src/utils/logger.ts
45
- import { consola } from "consola";
46
-
47
44
  // src/utils/vitest.ts
48
45
  function isEnvTest() {
49
46
  return process.env.NODE_ENV === "test";
50
47
  }
51
48
 
52
49
  // src/utils/logger.ts
53
- var Logger = class {
54
- /**
55
- * Create a new Logger instance
56
- */
57
- constructor(_version = "0.0.0") {
58
- this._version = _version;
59
- }
50
+ var BaseLogger = class {
60
51
  _verbose = false;
61
52
  _silent = false;
62
- _jsonMode = false;
63
- _jsonOutputDone = false;
64
- _commandName = "";
65
- _jsonData = {};
66
- console = consola.withDefaults({
67
- tag: "rulesync"
68
- });
69
- /**
70
- * Configure logger with verbose and silent mode settings.
71
- * Handles conflicting flags where silent takes precedence.
72
- */
53
+ get verbose() {
54
+ return this._verbose;
55
+ }
56
+ get silent() {
57
+ return this._silent;
58
+ }
73
59
  configure({ verbose, silent }) {
74
60
  if (verbose && silent) {
75
61
  this._silent = false;
76
- this.warn("Both --verbose and --silent specified; --silent takes precedence");
62
+ if (!isEnvTest()) {
63
+ console.warn("Both --verbose and --silent specified; --silent takes precedence");
64
+ }
77
65
  }
78
66
  this._silent = silent;
79
67
  this._verbose = verbose && !silent;
80
68
  }
81
- get verbose() {
82
- return this._verbose;
69
+ };
70
+ var ConsoleLogger = class extends BaseLogger {
71
+ isSuppressed() {
72
+ return isEnvTest() || this._silent;
83
73
  }
84
- get silent() {
85
- return this._silent;
74
+ get jsonMode() {
75
+ return false;
86
76
  }
87
- /**
88
- * Enable JSON output mode
89
- */
90
- setJsonMode(enabled, command) {
91
- this._jsonMode = enabled;
92
- this._jsonOutputDone = false;
93
- this._commandName = command;
94
- if (enabled) {
95
- this._jsonData = {};
77
+ captureData(_key, _value) {
78
+ }
79
+ getJsonData() {
80
+ return {};
81
+ }
82
+ outputJson(_success, _error) {
83
+ }
84
+ info(message, ...args) {
85
+ if (this.isSuppressed()) return;
86
+ console.log(message, ...args);
87
+ }
88
+ success(message, ...args) {
89
+ if (this.isSuppressed()) return;
90
+ console.log(message, ...args);
91
+ }
92
+ warn(message, ...args) {
93
+ if (this.isSuppressed()) return;
94
+ console.warn(message, ...args);
95
+ }
96
+ error(message, _code, ...args) {
97
+ if (isEnvTest()) return;
98
+ const errorMessage = message instanceof Error ? message.message : message;
99
+ console.error(errorMessage, ...args);
100
+ }
101
+ debug(message, ...args) {
102
+ if (this.isSuppressed()) return;
103
+ if (this._verbose) {
104
+ console.log(message, ...args);
96
105
  }
97
106
  }
98
- /**
99
- * Check if JSON mode is enabled
100
- */
107
+ };
108
+ var JsonLogger = class extends BaseLogger {
109
+ _jsonOutputDone = false;
110
+ _jsonData = {};
111
+ _commandName;
112
+ _version;
113
+ constructor({ command, version }) {
114
+ super();
115
+ this._commandName = command;
116
+ this._version = version;
117
+ }
101
118
  get jsonMode() {
102
- return this._jsonMode;
119
+ return true;
103
120
  }
104
- /**
105
- * Capture data for JSON output
106
- */
107
121
  captureData(key, value) {
108
- if (this._jsonMode) {
109
- this._jsonData[key] = value;
110
- }
122
+ this._jsonData[key] = value;
111
123
  }
112
- /**
113
- * Get captured JSON data
114
- */
115
124
  getJsonData() {
116
125
  return { ...this._jsonData };
117
126
  }
118
- /**
119
- * Output final JSON result
120
- */
121
127
  outputJson(success, error) {
122
- if (!this._jsonMode || this._jsonOutputDone) return;
128
+ if (this._jsonOutputDone) return;
123
129
  this._jsonOutputDone = true;
124
130
  const output = {
125
131
  success,
@@ -148,56 +154,28 @@ var Logger = class {
148
154
  console.error(jsonStr);
149
155
  }
150
156
  }
151
- info(message, ...args) {
152
- if (isEnvTest() || this._silent) return;
153
- if (this._jsonMode) return;
154
- this.console.info(message, ...args);
157
+ info(_message, ..._args) {
155
158
  }
156
- success(message, ...args) {
157
- if (isEnvTest() || this._silent) return;
158
- if (this._jsonMode) return;
159
- this.console.success(message, ...args);
159
+ success(_message, ..._args) {
160
160
  }
161
- warn(message, ...args) {
162
- if (isEnvTest() || this._silent) return;
163
- if (this._jsonMode) return;
164
- this.console.warn(message, ...args);
161
+ warn(_message, ..._args) {
165
162
  }
166
- error(message, code, ...args) {
163
+ error(message, code, ..._args) {
167
164
  if (isEnvTest()) return;
168
165
  const errorMessage = message instanceof Error ? message.message : message;
169
- if (this._jsonMode) {
170
- const errorInfo = {
171
- code: code || ErrorCodes.UNKNOWN_ERROR,
172
- message: errorMessage
173
- };
174
- if (this._verbose && message instanceof Error && message.stack) {
175
- errorInfo.stack = message.stack;
176
- }
177
- this.outputJson(false, errorInfo);
178
- } else {
179
- this.console.error(errorMessage, ...args);
180
- }
181
- }
182
- debug(message, ...args) {
183
- if (isEnvTest() || this._silent) return;
184
- if (this._jsonMode) return;
185
- if (this._verbose) {
186
- this.console.info(message, ...args);
166
+ const errorInfo = {
167
+ code: code || ErrorCodes.UNKNOWN_ERROR,
168
+ message: errorMessage
169
+ };
170
+ if (this._verbose && message instanceof Error && message.stack) {
171
+ errorInfo.stack = message.stack;
187
172
  }
173
+ this.outputJson(false, errorInfo);
188
174
  }
189
- /**
190
- * Get the internal console instance (for testing only)
191
- * @internal
192
- */
193
- _getConsole() {
194
- return this.console;
175
+ debug(_message, ..._args) {
195
176
  }
196
177
  };
197
- function createLogger(version) {
198
- return new Logger(version);
199
- }
200
- var logger = new Logger("0.0.0");
178
+ var logger = new ConsoleLogger();
201
179
 
202
180
  // src/types/features.ts
203
181
  import { z } from "zod/mini";
@@ -17289,7 +17267,8 @@ export {
17289
17267
  formatError,
17290
17268
  ErrorCodes,
17291
17269
  CLIError,
17292
- createLogger,
17270
+ ConsoleLogger,
17271
+ JsonLogger,
17293
17272
  logger,
17294
17273
  ensureDir,
17295
17274
  checkPathTraversal,
@@ -88,85 +88,91 @@ function formatError(error) {
88
88
  return String(error);
89
89
  }
90
90
 
91
- // src/utils/logger.ts
92
- var import_consola = require("consola");
93
-
94
91
  // src/utils/vitest.ts
95
92
  function isEnvTest() {
96
93
  return process.env.NODE_ENV === "test";
97
94
  }
98
95
 
99
96
  // src/utils/logger.ts
100
- var Logger = class {
101
- /**
102
- * Create a new Logger instance
103
- */
104
- constructor(_version = "0.0.0") {
105
- this._version = _version;
106
- }
97
+ var BaseLogger = class {
107
98
  _verbose = false;
108
99
  _silent = false;
109
- _jsonMode = false;
110
- _jsonOutputDone = false;
111
- _commandName = "";
112
- _jsonData = {};
113
- console = import_consola.consola.withDefaults({
114
- tag: "rulesync"
115
- });
116
- /**
117
- * Configure logger with verbose and silent mode settings.
118
- * Handles conflicting flags where silent takes precedence.
119
- */
100
+ get verbose() {
101
+ return this._verbose;
102
+ }
103
+ get silent() {
104
+ return this._silent;
105
+ }
120
106
  configure({ verbose, silent }) {
121
107
  if (verbose && silent) {
122
108
  this._silent = false;
123
- this.warn("Both --verbose and --silent specified; --silent takes precedence");
109
+ if (!isEnvTest()) {
110
+ console.warn("Both --verbose and --silent specified; --silent takes precedence");
111
+ }
124
112
  }
125
113
  this._silent = silent;
126
114
  this._verbose = verbose && !silent;
127
115
  }
128
- get verbose() {
129
- return this._verbose;
116
+ };
117
+ var ConsoleLogger = class extends BaseLogger {
118
+ isSuppressed() {
119
+ return isEnvTest() || this._silent;
130
120
  }
131
- get silent() {
132
- return this._silent;
121
+ get jsonMode() {
122
+ return false;
133
123
  }
134
- /**
135
- * Enable JSON output mode
136
- */
137
- setJsonMode(enabled, command) {
138
- this._jsonMode = enabled;
139
- this._jsonOutputDone = false;
140
- this._commandName = command;
141
- if (enabled) {
142
- this._jsonData = {};
124
+ captureData(_key, _value) {
125
+ }
126
+ getJsonData() {
127
+ return {};
128
+ }
129
+ outputJson(_success, _error) {
130
+ }
131
+ info(message, ...args) {
132
+ if (this.isSuppressed()) return;
133
+ console.log(message, ...args);
134
+ }
135
+ success(message, ...args) {
136
+ if (this.isSuppressed()) return;
137
+ console.log(message, ...args);
138
+ }
139
+ warn(message, ...args) {
140
+ if (this.isSuppressed()) return;
141
+ console.warn(message, ...args);
142
+ }
143
+ error(message, _code, ...args) {
144
+ if (isEnvTest()) return;
145
+ const errorMessage = message instanceof Error ? message.message : message;
146
+ console.error(errorMessage, ...args);
147
+ }
148
+ debug(message, ...args) {
149
+ if (this.isSuppressed()) return;
150
+ if (this._verbose) {
151
+ console.log(message, ...args);
143
152
  }
144
153
  }
145
- /**
146
- * Check if JSON mode is enabled
147
- */
154
+ };
155
+ var JsonLogger = class extends BaseLogger {
156
+ _jsonOutputDone = false;
157
+ _jsonData = {};
158
+ _commandName;
159
+ _version;
160
+ constructor({ command, version }) {
161
+ super();
162
+ this._commandName = command;
163
+ this._version = version;
164
+ }
148
165
  get jsonMode() {
149
- return this._jsonMode;
166
+ return true;
150
167
  }
151
- /**
152
- * Capture data for JSON output
153
- */
154
168
  captureData(key, value) {
155
- if (this._jsonMode) {
156
- this._jsonData[key] = value;
157
- }
169
+ this._jsonData[key] = value;
158
170
  }
159
- /**
160
- * Get captured JSON data
161
- */
162
171
  getJsonData() {
163
172
  return { ...this._jsonData };
164
173
  }
165
- /**
166
- * Output final JSON result
167
- */
168
174
  outputJson(success, error) {
169
- if (!this._jsonMode || this._jsonOutputDone) return;
175
+ if (this._jsonOutputDone) return;
170
176
  this._jsonOutputDone = true;
171
177
  const output = {
172
178
  success,
@@ -195,56 +201,28 @@ var Logger = class {
195
201
  console.error(jsonStr);
196
202
  }
197
203
  }
198
- info(message, ...args) {
199
- if (isEnvTest() || this._silent) return;
200
- if (this._jsonMode) return;
201
- this.console.info(message, ...args);
204
+ info(_message, ..._args) {
202
205
  }
203
- success(message, ...args) {
204
- if (isEnvTest() || this._silent) return;
205
- if (this._jsonMode) return;
206
- this.console.success(message, ...args);
206
+ success(_message, ..._args) {
207
207
  }
208
- warn(message, ...args) {
209
- if (isEnvTest() || this._silent) return;
210
- if (this._jsonMode) return;
211
- this.console.warn(message, ...args);
208
+ warn(_message, ..._args) {
212
209
  }
213
- error(message, code, ...args) {
210
+ error(message, code, ..._args) {
214
211
  if (isEnvTest()) return;
215
212
  const errorMessage = message instanceof Error ? message.message : message;
216
- if (this._jsonMode) {
217
- const errorInfo = {
218
- code: code || ErrorCodes.UNKNOWN_ERROR,
219
- message: errorMessage
220
- };
221
- if (this._verbose && message instanceof Error && message.stack) {
222
- errorInfo.stack = message.stack;
223
- }
224
- this.outputJson(false, errorInfo);
225
- } else {
226
- this.console.error(errorMessage, ...args);
213
+ const errorInfo = {
214
+ code: code || ErrorCodes.UNKNOWN_ERROR,
215
+ message: errorMessage
216
+ };
217
+ if (this._verbose && message instanceof Error && message.stack) {
218
+ errorInfo.stack = message.stack;
227
219
  }
220
+ this.outputJson(false, errorInfo);
228
221
  }
229
- debug(message, ...args) {
230
- if (isEnvTest() || this._silent) return;
231
- if (this._jsonMode) return;
232
- if (this._verbose) {
233
- this.console.info(message, ...args);
234
- }
235
- }
236
- /**
237
- * Get the internal console instance (for testing only)
238
- * @internal
239
- */
240
- _getConsole() {
241
- return this.console;
222
+ debug(_message, ..._args) {
242
223
  }
243
224
  };
244
- function createLogger(version) {
245
- return new Logger(version);
246
- }
247
- var logger = new Logger("0.0.0");
225
+ var logger = new ConsoleLogger();
248
226
 
249
227
  // src/lib/fetch.ts
250
228
  var import_node_path117 = require("path");
@@ -21486,24 +21464,21 @@ async function updateCommand(logger2, currentVersion, options) {
21486
21464
  }
21487
21465
 
21488
21466
  // src/cli/index.ts
21489
- var getVersion = () => "7.19.0";
21467
+ var getVersion = () => "7.20.0";
21490
21468
  function wrapCommand(name, errorCode, handler) {
21491
21469
  return async (...args) => {
21492
21470
  const command = args[args.length - 1];
21493
21471
  const options = args[args.length - 2];
21494
21472
  const positionalArgs = args.slice(0, -2);
21495
21473
  const globalOpts = command.parent?.opts() ?? {};
21496
- const logger2 = createLogger(getVersion());
21497
- logger2.setJsonMode(Boolean(globalOpts.json), name);
21474
+ const logger2 = globalOpts.json ? new JsonLogger({ command: name, version: getVersion() }) : new ConsoleLogger();
21498
21475
  logger2.configure({
21499
21476
  verbose: Boolean(globalOpts.verbose) || Boolean(options.verbose),
21500
21477
  silent: Boolean(globalOpts.silent) || Boolean(options.silent)
21501
21478
  });
21502
21479
  try {
21503
21480
  await handler(logger2, options, globalOpts, positionalArgs);
21504
- if (globalOpts.json) {
21505
- logger2.outputJson(true);
21506
- }
21481
+ logger2.outputJson(true);
21507
21482
  } catch (error) {
21508
21483
  const code = error instanceof CLIError ? error.code : errorCode;
21509
21484
  const errorArg = error instanceof Error ? error : formatError(error);
package/dist/cli/index.js CHANGED
@@ -7,10 +7,12 @@ import {
7
7
  CLIError,
8
8
  CommandsProcessor,
9
9
  ConfigResolver,
10
+ ConsoleLogger,
10
11
  ErrorCodes,
11
12
  FETCH_CONCURRENCY_LIMIT,
12
13
  HooksProcessor,
13
14
  IgnoreProcessor,
15
+ JsonLogger,
14
16
  MAX_FILE_SIZE,
15
17
  McpProcessor,
16
18
  RULESYNC_AIIGNORE_FILE_NAME,
@@ -48,7 +50,6 @@ import {
48
50
  SubagentsProcessor,
49
51
  checkPathTraversal,
50
52
  checkRulesyncDirExists,
51
- createLogger,
52
53
  createTempDirectory,
53
54
  directoryExists,
54
55
  ensureDir,
@@ -69,7 +70,7 @@ import {
69
70
  removeTempDirectory,
70
71
  stringifyFrontmatter,
71
72
  writeFileContent
72
- } from "../chunk-J2ZF4SHC.js";
73
+ } from "../chunk-5OPNV62F.js";
73
74
 
74
75
  // src/cli/index.ts
75
76
  import { Command } from "commander";
@@ -4269,24 +4270,21 @@ async function updateCommand(logger2, currentVersion, options) {
4269
4270
  }
4270
4271
 
4271
4272
  // src/cli/index.ts
4272
- var getVersion = () => "7.19.0";
4273
+ var getVersion = () => "7.20.0";
4273
4274
  function wrapCommand(name, errorCode, handler) {
4274
4275
  return async (...args) => {
4275
4276
  const command = args[args.length - 1];
4276
4277
  const options = args[args.length - 2];
4277
4278
  const positionalArgs = args.slice(0, -2);
4278
4279
  const globalOpts = command.parent?.opts() ?? {};
4279
- const logger2 = createLogger(getVersion());
4280
- logger2.setJsonMode(Boolean(globalOpts.json), name);
4280
+ const logger2 = globalOpts.json ? new JsonLogger({ command: name, version: getVersion() }) : new ConsoleLogger();
4281
4281
  logger2.configure({
4282
4282
  verbose: Boolean(globalOpts.verbose) || Boolean(options.verbose),
4283
4283
  silent: Boolean(globalOpts.silent) || Boolean(options.silent)
4284
4284
  });
4285
4285
  try {
4286
4286
  await handler(logger2, options, globalOpts, positionalArgs);
4287
- if (globalOpts.json) {
4288
- logger2.outputJson(true);
4289
- }
4287
+ logger2.outputJson(true);
4290
4288
  } catch (error) {
4291
4289
  const code = error instanceof CLIError ? error.code : errorCode;
4292
4290
  const errorArg = error instanceof Error ? error : formatError(error);
package/dist/index.cjs CHANGED
@@ -88,178 +88,71 @@ var import_node_path2 = require("path");
88
88
  var import_es_toolkit = require("es-toolkit");
89
89
  var import_globby = require("globby");
90
90
 
91
- // src/utils/logger.ts
92
- var import_consola = require("consola");
93
-
94
- // src/types/json-output.ts
95
- var ErrorCodes = {
96
- CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND",
97
- RULESYNC_DIR_NOT_FOUND: "RULESYNC_DIR_NOT_FOUND",
98
- INVALID_TARGET: "INVALID_TARGET",
99
- FETCH_FAILED: "FETCH_FAILED",
100
- WRITE_FAILED: "WRITE_FAILED",
101
- VALIDATION_FAILED: "VALIDATION_FAILED",
102
- GENERATION_FAILED: "GENERATION_FAILED",
103
- IMPORT_FAILED: "IMPORT_FAILED",
104
- INSTALL_FAILED: "INSTALL_FAILED",
105
- UPDATE_FAILED: "UPDATE_FAILED",
106
- GITIGNORE_FAILED: "GITIGNORE_FAILED",
107
- INIT_FAILED: "INIT_FAILED",
108
- MCP_FAILED: "MCP_FAILED",
109
- UNKNOWN_ERROR: "UNKNOWN_ERROR"
110
- };
111
-
112
91
  // src/utils/vitest.ts
113
92
  function isEnvTest() {
114
93
  return process.env.NODE_ENV === "test";
115
94
  }
116
95
 
117
96
  // src/utils/logger.ts
118
- var Logger = class {
119
- /**
120
- * Create a new Logger instance
121
- */
122
- constructor(_version = "0.0.0") {
123
- this._version = _version;
124
- }
97
+ var BaseLogger = class {
125
98
  _verbose = false;
126
99
  _silent = false;
127
- _jsonMode = false;
128
- _jsonOutputDone = false;
129
- _commandName = "";
130
- _jsonData = {};
131
- console = import_consola.consola.withDefaults({
132
- tag: "rulesync"
133
- });
134
- /**
135
- * Configure logger with verbose and silent mode settings.
136
- * Handles conflicting flags where silent takes precedence.
137
- */
138
- configure({ verbose, silent }) {
139
- if (verbose && silent) {
140
- this._silent = false;
141
- this.warn("Both --verbose and --silent specified; --silent takes precedence");
142
- }
143
- this._silent = silent;
144
- this._verbose = verbose && !silent;
145
- }
146
100
  get verbose() {
147
101
  return this._verbose;
148
102
  }
149
103
  get silent() {
150
104
  return this._silent;
151
105
  }
152
- /**
153
- * Enable JSON output mode
154
- */
155
- setJsonMode(enabled, command) {
156
- this._jsonMode = enabled;
157
- this._jsonOutputDone = false;
158
- this._commandName = command;
159
- if (enabled) {
160
- this._jsonData = {};
106
+ configure({ verbose, silent }) {
107
+ if (verbose && silent) {
108
+ this._silent = false;
109
+ if (!isEnvTest()) {
110
+ console.warn("Both --verbose and --silent specified; --silent takes precedence");
111
+ }
161
112
  }
113
+ this._silent = silent;
114
+ this._verbose = verbose && !silent;
115
+ }
116
+ };
117
+ var ConsoleLogger = class extends BaseLogger {
118
+ isSuppressed() {
119
+ return isEnvTest() || this._silent;
162
120
  }
163
- /**
164
- * Check if JSON mode is enabled
165
- */
166
121
  get jsonMode() {
167
- return this._jsonMode;
122
+ return false;
168
123
  }
169
- /**
170
- * Capture data for JSON output
171
- */
172
- captureData(key, value) {
173
- if (this._jsonMode) {
174
- this._jsonData[key] = value;
175
- }
124
+ captureData(_key, _value) {
176
125
  }
177
- /**
178
- * Get captured JSON data
179
- */
180
126
  getJsonData() {
181
- return { ...this._jsonData };
127
+ return {};
182
128
  }
183
- /**
184
- * Output final JSON result
185
- */
186
- outputJson(success, error) {
187
- if (!this._jsonMode || this._jsonOutputDone) return;
188
- this._jsonOutputDone = true;
189
- const output = {
190
- success,
191
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
192
- command: this._commandName,
193
- version: this._version
194
- };
195
- if (success) {
196
- output.data = this._jsonData;
197
- } else if (error) {
198
- output.error = {
199
- code: error.code,
200
- message: error.message
201
- };
202
- if (error.details) {
203
- output.error.details = error.details;
204
- }
205
- if (error.stack) {
206
- output.error.stack = error.stack;
207
- }
208
- }
209
- const jsonStr = JSON.stringify(output, null, 2);
210
- if (success) {
211
- console.log(jsonStr);
212
- } else {
213
- console.error(jsonStr);
214
- }
129
+ outputJson(_success, _error) {
215
130
  }
216
131
  info(message, ...args) {
217
- if (isEnvTest() || this._silent) return;
218
- if (this._jsonMode) return;
219
- this.console.info(message, ...args);
132
+ if (this.isSuppressed()) return;
133
+ console.log(message, ...args);
220
134
  }
221
135
  success(message, ...args) {
222
- if (isEnvTest() || this._silent) return;
223
- if (this._jsonMode) return;
224
- this.console.success(message, ...args);
136
+ if (this.isSuppressed()) return;
137
+ console.log(message, ...args);
225
138
  }
226
139
  warn(message, ...args) {
227
- if (isEnvTest() || this._silent) return;
228
- if (this._jsonMode) return;
229
- this.console.warn(message, ...args);
140
+ if (this.isSuppressed()) return;
141
+ console.warn(message, ...args);
230
142
  }
231
- error(message, code, ...args) {
143
+ error(message, _code, ...args) {
232
144
  if (isEnvTest()) return;
233
145
  const errorMessage = message instanceof Error ? message.message : message;
234
- if (this._jsonMode) {
235
- const errorInfo = {
236
- code: code || ErrorCodes.UNKNOWN_ERROR,
237
- message: errorMessage
238
- };
239
- if (this._verbose && message instanceof Error && message.stack) {
240
- errorInfo.stack = message.stack;
241
- }
242
- this.outputJson(false, errorInfo);
243
- } else {
244
- this.console.error(errorMessage, ...args);
245
- }
146
+ console.error(errorMessage, ...args);
246
147
  }
247
148
  debug(message, ...args) {
248
- if (isEnvTest() || this._silent) return;
249
- if (this._jsonMode) return;
149
+ if (this.isSuppressed()) return;
250
150
  if (this._verbose) {
251
- this.console.info(message, ...args);
151
+ console.log(message, ...args);
252
152
  }
253
153
  }
254
- /**
255
- * Get the internal console instance (for testing only)
256
- * @internal
257
- */
258
- _getConsole() {
259
- return this.console;
260
- }
261
154
  };
262
- var logger = new Logger("0.0.0");
155
+ var logger = new ConsoleLogger();
263
156
 
264
157
  // src/utils/file.ts
265
158
  async function ensureDir(dirPath) {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  generate,
7
7
  importFromTool,
8
8
  logger
9
- } from "./chunk-J2ZF4SHC.js";
9
+ } from "./chunk-5OPNV62F.js";
10
10
 
11
11
  // src/index.ts
12
12
  async function generate2(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "7.19.0",
3
+ "version": "7.20.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",
@@ -54,7 +54,6 @@
54
54
  "@toon-format/toon": "2.1.0",
55
55
  "@valibot/to-json-schema": "1.5.0",
56
56
  "commander": "14.0.3",
57
- "consola": "3.4.2",
58
57
  "effect": "3.19.19",
59
58
  "es-toolkit": "1.45.1",
60
59
  "fastmcp": "3.34.0",
@@ -115,7 +114,7 @@
115
114
  "dev": "tsx src/cli/index.ts",
116
115
  "docs:build": "vitepress build docs",
117
116
  "docs:dev": "vitepress dev docs",
118
- "docs:preview": "vitepress serve docs",
117
+ "docs:preview": "vitepress preview docs",
119
118
  "eslint": "eslint . --max-warnings 0 --cache",
120
119
  "eslint:fix": "eslint . --fix --max-warnings 0 --cache",
121
120
  "fix": "pnpm run fmt && pnpm run oxlint:fix && pnpm run eslint:fix",