@ngcorex/cli 0.1.7 → 0.2.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/README.md CHANGED
@@ -226,7 +226,6 @@ export default defineNgCorexConfig({
226
226
  });
227
227
  ```
228
228
 
229
-
230
229
  ## Configuration File
231
230
 
232
231
  The CLI expects a file named:
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import { resolveConfigPath } from '../config/resolve-path.js';
4
4
  import { loadConfig } from '../config/load-config.js';
5
5
  import { writeCss } from '../output/write-css.js';
6
- import { buildCssFromConfig, runValidations, printValidationResults, hasValidationResults, hasValidationErrors } from '@ngcorex/css';
6
+ import { buildCssFromConfig, runValidations, printValidationResults, hasValidationResults, hasValidationErrors, hasValidationWarnings } from '@ngcorex/css';
7
7
  import { resolve } from 'node:path';
8
8
  import { BuildSummary, success, info, warning, error, section } from '../utils/logger.js';
9
9
  let hasShownInlineTokenNotice = false;
@@ -34,7 +34,7 @@ export async function runBuild(options = {}) {
34
34
  if (fileTokens !== null) {
35
35
  if (typeof fileTokens !== 'object' || Array.isArray(fileTokens)) {
36
36
  error('Invalid tokens.json');
37
- console.log(' Details: The file must export a JSON object at the top level.');
37
+ console.log(' Details: The file must export a JSON object at top level.');
38
38
  process.exit(1);
39
39
  }
40
40
  }
@@ -255,13 +255,19 @@ export async function runBuild(options = {}) {
255
255
  if (hasValidationResults(validationReport)) {
256
256
  if (hasValidationErrors(validationReport)) {
257
257
  error('Blocking validation errors found');
258
- console.log(' Details: Please fix the errors below before proceeding.');
258
+ console.log(' Details: Please fix errors below before proceeding.');
259
259
  printValidationResults(validationReport);
260
260
  process.exit(1);
261
261
  }
262
- else {
262
+ else if (hasValidationWarnings(validationReport)) {
263
263
  warning('Non-blocking validation warnings found');
264
- console.log(' Details: Review the warnings below for potential improvements.');
264
+ console.log(' Details: Review warnings below for potential improvements.');
265
+ printValidationResults(validationReport);
266
+ }
267
+ else {
268
+ // Only info messages present
269
+ info('Validation info messages found');
270
+ console.log(' Details: Review info messages below for optional improvements.');
265
271
  printValidationResults(validationReport);
266
272
  }
267
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngcorex/cli",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "CLI for ngCorex - Angular-native design token engine",
5
5
  "keywords": [
6
6
  "design-tokens",
@@ -36,7 +36,7 @@
36
36
  "scripts": {
37
37
  "build": "tsc -p tsconfig.json"
38
38
  },
39
- "repository": {
39
+ "repository": {
40
40
  "type": "git",
41
41
  "url": "https://github.com/arkdezin/ngCorex.git",
42
42
  "directory": "packages/cli"