@julien-lin/universal-pwa-cli 1.3.5 → 1.3.6

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/index.cjs CHANGED
@@ -1554,8 +1554,32 @@ async function initCommand(options = {}) {
1554
1554
  try {
1555
1555
  const iconResult = await (0, import_universal_pwa_core3.generateIcons)({
1556
1556
  sourceImage: iconSourcePath,
1557
- outputDir: finalOutputDir
1557
+ outputDir: finalOutputDir,
1558
+ validate: true,
1559
+ // Enable validation
1560
+ strictValidation: false
1561
+ // Don't block on warnings, only errors
1558
1562
  });
1563
+ if (iconResult.validation) {
1564
+ const { validation } = iconResult;
1565
+ if (validation.errors.length > 0) {
1566
+ validation.errors.forEach((error) => {
1567
+ result.errors.push(`Icon validation: ${error}`);
1568
+ console.log(import_chalk2.default.red(`\u2717 ${error}`));
1569
+ });
1570
+ }
1571
+ if (validation.warnings.length > 0) {
1572
+ validation.warnings.forEach((warning) => {
1573
+ result.warnings.push(`Icon validation: ${warning}`);
1574
+ console.log(import_chalk2.default.yellow(`\u26A0 ${warning}`));
1575
+ });
1576
+ }
1577
+ if (validation.suggestions.length > 0) {
1578
+ validation.suggestions.forEach((suggestion) => {
1579
+ console.log(import_chalk2.default.blue(`\u{1F4A1} ${suggestion}`));
1580
+ });
1581
+ }
1582
+ }
1559
1583
  iconPaths = iconResult.icons.map((icon) => icon.src);
1560
1584
  result.iconsGenerated = iconResult.icons.length;
1561
1585
  const appleTouchIconPath = (0, import_path2.join)(finalOutputDir, "apple-touch-icon.png");
@@ -2768,7 +2792,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
2768
2792
  // package.json
2769
2793
  var package_default = {
2770
2794
  name: "@julien-lin/universal-pwa-cli",
2771
- version: "1.3.5",
2795
+ version: "1.3.6",
2772
2796
  description: "CLI to transform any web project into a PWA",
2773
2797
  keywords: [
2774
2798
  "pwa",
package/dist/index.js CHANGED
@@ -569,8 +569,32 @@ async function initCommand(options = {}) {
569
569
  try {
570
570
  const iconResult = await generateIcons({
571
571
  sourceImage: iconSourcePath,
572
- outputDir: finalOutputDir
572
+ outputDir: finalOutputDir,
573
+ validate: true,
574
+ // Enable validation
575
+ strictValidation: false
576
+ // Don't block on warnings, only errors
573
577
  });
578
+ if (iconResult.validation) {
579
+ const { validation } = iconResult;
580
+ if (validation.errors.length > 0) {
581
+ validation.errors.forEach((error) => {
582
+ result.errors.push(`Icon validation: ${error}`);
583
+ console.log(chalk2.red(`\u2717 ${error}`));
584
+ });
585
+ }
586
+ if (validation.warnings.length > 0) {
587
+ validation.warnings.forEach((warning) => {
588
+ result.warnings.push(`Icon validation: ${warning}`);
589
+ console.log(chalk2.yellow(`\u26A0 ${warning}`));
590
+ });
591
+ }
592
+ if (validation.suggestions.length > 0) {
593
+ validation.suggestions.forEach((suggestion) => {
594
+ console.log(chalk2.blue(`\u{1F4A1} ${suggestion}`));
595
+ });
596
+ }
597
+ }
574
598
  iconPaths = iconResult.icons.map((icon) => icon.src);
575
599
  result.iconsGenerated = iconResult.icons.length;
576
600
  const appleTouchIconPath = join2(finalOutputDir, "apple-touch-icon.png");
@@ -1781,7 +1805,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
1781
1805
  // package.json
1782
1806
  var package_default = {
1783
1807
  name: "@julien-lin/universal-pwa-cli",
1784
- version: "1.3.5",
1808
+ version: "1.3.6",
1785
1809
  description: "CLI to transform any web project into a PWA",
1786
1810
  keywords: [
1787
1811
  "pwa",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julien-lin/universal-pwa-cli",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "CLI to transform any web project into a PWA",
5
5
  "keywords": [
6
6
  "pwa",
@@ -62,7 +62,7 @@
62
62
  "inquirer": "^12.0.0",
63
63
  "pino": "^9.14.0",
64
64
  "zod": "^4.2.1",
65
- "@julien-lin/universal-pwa-core": "^1.3.5"
65
+ "@julien-lin/universal-pwa-core": "^1.3.6"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@vitest/coverage-v8": "^2.1.4",