@trazum/cli 1.59.0 → 1.60.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.
package/dist/i18n/en.js CHANGED
@@ -709,7 +709,7 @@ ${bold('CONFIG FILE')}
709
709
  ${bold('trazum.config.json')}, found by walking up from the working directory and
710
710
  stopping at the repository root. Every key is optional:
711
711
 
712
- level, locale, disable, maxGrowth, extensions
712
+ level, locale, disable, maxGrowth, extensions, ignore
713
713
  usage { model, callsPerMonth, avgOutputTokens, cacheHitRate, batchEligible }
714
714
  budgets { "prompts/**": 2000, "prompts/system.txt": 4000 }
715
715
  baseline { "path": "trazum.baseline.json", "maxGrowthTokens": 0, "maxGrowthPct": 5 }
package/dist/i18n/es.js CHANGED
@@ -731,7 +731,7 @@ ${bold('FICHERO DE CONFIGURACIÓN')}
731
731
  ${bold('trazum.config.json')}, que se busca subiendo desde el directorio de trabajo
732
732
  y parando en la raíz del repositorio. Todas las claves son opcionales:
733
733
 
734
- level, locale, disable, maxGrowth, extensions
734
+ level, locale, disable, maxGrowth, extensions, ignore
735
735
  usage { model, callsPerMonth, avgOutputTokens, cacheHitRate, batchEligible }
736
736
  budgets { "prompts/**": 2000, "prompts/system.txt": 4000 }
737
737
  baseline { "path": "trazum.baseline.json", "maxGrowthTokens": 0, "maxGrowthPct": 5 }
package/dist/index.js CHANGED
@@ -1287,6 +1287,7 @@ async function commandInit(args, config, pricing, t) {
1287
1287
  const host = detectHost();
1288
1288
  const prompts = await walkPrompts(root, {
1289
1289
  extensions: config.extensions ?? DEFAULT_EXTENSIONS,
1290
+ ignore: config.ignore,
1290
1291
  });
1291
1292
  /**
1292
1293
  * Source files, read only to be asked which provider they call.
@@ -1300,6 +1301,7 @@ async function commandInit(args, config, pricing, t) {
1300
1301
  const sourceWalk = await walkPrompts(root, {
1301
1302
  extensions: SOURCE_EXTENSIONS,
1302
1303
  maxFiles: INIT_MAX_SOURCE_FILES,
1304
+ ignore: config.ignore,
1303
1305
  });
1304
1306
  const sightings = [];
1305
1307
  for (const relative of sourceWalk.files) {
@@ -2842,7 +2844,7 @@ async function commandRulesMeasure(args, config, pricing, t) {
2842
2844
  if (level !== 'safe' && level !== 'aggressive')
2843
2845
  throw new Error(t.errors.badLevel(level));
2844
2846
  const extensions = config.extensions ?? [...DEFAULT_EXTENSIONS, ...SOURCE_EXTENSIONS];
2845
- const { files, truncated } = await walkPrompts(root, { extensions });
2847
+ const { files, truncated } = await walkPrompts(root, { extensions, ignore: config.ignore });
2846
2848
  if (files.length === 0)
2847
2849
  throw new Error(t.errors.noPromptsFound(root, extensions.join(' ')));
2848
2850
  const prompts = [];
@@ -6856,7 +6858,7 @@ async function scanPrompts(root, args, flagBudget, config, counter, level, t, lo
6856
6858
  // to be fully implemented and completely undiscoverable; an unmarked source
6857
6859
  // file costs one `includes()` and is dropped.
6858
6860
  const extensions = config.extensions ?? [...DEFAULT_EXTENSIONS, ...SOURCE_EXTENSIONS];
6859
- const { files, truncated } = await walkPrompts(root, { extensions });
6861
+ const { files, truncated } = await walkPrompts(root, { extensions, ignore: config.ignore });
6860
6862
  if (files.length === 0) {
6861
6863
  throw new Error(t.errors.noPromptsFound(root, extensions.join(' ')));
6862
6864
  }
@@ -7650,7 +7652,7 @@ async function commandRank(args, config, pricing, t, locale) {
7650
7652
  const level = levelFlag(args, config, t);
7651
7653
  const usage = usageFrom(args, config, t);
7652
7654
  const extensions = config.extensions ?? [...DEFAULT_EXTENSIONS, ...SOURCE_EXTENSIONS];
7653
- const { files, truncated } = await walkPrompts(root, { extensions });
7655
+ const { files, truncated } = await walkPrompts(root, { extensions, ignore: config.ignore });
7654
7656
  if (files.length === 0) {
7655
7657
  throw new Error(t.errors.noPromptsFound(root, extensions.join(' ')));
7656
7658
  }
@@ -8040,7 +8042,7 @@ async function commandDoctor(args, config, pricing, t, locale) {
8040
8042
  const level = levelFlag(args, config, t);
8041
8043
  const usage = usageFrom(args, config, t);
8042
8044
  const extensions = config.extensions ?? [...DEFAULT_EXTENSIONS, ...SOURCE_EXTENSIONS];
8043
- const { files, truncated } = await walkPrompts(root, { extensions });
8045
+ const { files, truncated } = await walkPrompts(root, { extensions, ignore: config.ignore });
8044
8046
  if (files.length === 0) {
8045
8047
  throw new Error(t.errors.noPromptsFound(root, extensions.join(' ')));
8046
8048
  }
@@ -8264,8 +8266,8 @@ async function diffDirectories(beforeRoot, afterRoot, args, config, pricing, t,
8264
8266
  const optimizeBoth = boolFlag(args, 'optimized');
8265
8267
  const extensions = config.extensions ?? [...DEFAULT_EXTENSIONS, ...SOURCE_EXTENSIONS];
8266
8268
  const [beforeWalk, afterWalk] = await Promise.all([
8267
- walkPrompts(beforeRoot, { extensions }),
8268
- walkPrompts(afterRoot, { extensions }),
8269
+ walkPrompts(beforeRoot, { extensions, ignore: config.ignore }),
8270
+ walkPrompts(afterRoot, { extensions, ignore: config.ignore }),
8269
8271
  ]);
8270
8272
  if (beforeWalk.files.length === 0 && afterWalk.files.length === 0) {
8271
8273
  throw new Error(t.errors.noPromptsFound(`${beforeRoot}, ${afterRoot}`, extensions.join(' ')));