@julien-lin/universal-pwa-cli 1.2.0 → 1.2.1

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
@@ -137,7 +137,16 @@ async function initCommand(options = {}) {
137
137
  result.warnings.push(`Icon source not found: ${iconSourcePath}`);
138
138
  }
139
139
  }
140
- const finalShortName = appShortName && typeof appShortName === "string" && appShortName.trim().length > 0 ? appShortName.trim().substring(0, 12) : appName && appName.length > 0 ? appName.substring(0, 12) : "PWA";
140
+ let finalShortName = "PWA";
141
+ if (appShortName && typeof appShortName === "string" && appShortName.trim().length > 0) {
142
+ finalShortName = appShortName.trim().substring(0, 12);
143
+ } else if (appName && typeof appName === "string" && appName.length > 0) {
144
+ finalShortName = appName.substring(0, 12);
145
+ }
146
+ if (!finalShortName || finalShortName.trim().length === 0) {
147
+ finalShortName = "PWA";
148
+ }
149
+ finalShortName = String(finalShortName).trim().substring(0, 12) || "PWA";
141
150
  let manifestPath;
142
151
  if (iconPaths.length > 0) {
143
152
  const manifestWithIcons = (0, import_universal_pwa_core2.generateManifest)({
package/dist/index.js CHANGED
@@ -114,7 +114,16 @@ async function initCommand(options = {}) {
114
114
  result.warnings.push(`Icon source not found: ${iconSourcePath}`);
115
115
  }
116
116
  }
117
- const finalShortName = appShortName && typeof appShortName === "string" && appShortName.trim().length > 0 ? appShortName.trim().substring(0, 12) : appName && appName.length > 0 ? appName.substring(0, 12) : "PWA";
117
+ let finalShortName = "PWA";
118
+ if (appShortName && typeof appShortName === "string" && appShortName.trim().length > 0) {
119
+ finalShortName = appShortName.trim().substring(0, 12);
120
+ } else if (appName && typeof appName === "string" && appName.length > 0) {
121
+ finalShortName = appName.substring(0, 12);
122
+ }
123
+ if (!finalShortName || finalShortName.trim().length === 0) {
124
+ finalShortName = "PWA";
125
+ }
126
+ finalShortName = String(finalShortName).trim().substring(0, 12) || "PWA";
118
127
  let manifestPath;
119
128
  if (iconPaths.length > 0) {
120
129
  const manifestWithIcons = generateManifest({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julien-lin/universal-pwa-cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI pour transformer n'importe quel projet web en PWA",
5
5
  "keywords": [
6
6
  "pwa",
@@ -45,7 +45,7 @@
45
45
  "inquirer": "^12.0.0",
46
46
  "pino": "^9.14.0",
47
47
  "zod": "^4.2.1",
48
- "@julien-lin/universal-pwa-core": "^1.2.0"
48
+ "@julien-lin/universal-pwa-core": "^1.2.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@vitest/coverage-v8": "^2.1.4",