@julien-lin/universal-pwa-cli 1.1.2 → 1.1.3
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 +10 -1
- package/dist/index.js +10 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -96,7 +96,16 @@ async function initCommand(options = {}) {
|
|
|
96
96
|
const finalOutputDir = outputDir ?? (result.framework === "WordPress" ? (0, import_path.join)(result.projectPath, "public") : (0, import_path.join)(result.projectPath, "public"));
|
|
97
97
|
console.log(import_chalk.default.blue("\u{1F4DD} Generating manifest.json..."));
|
|
98
98
|
const appName = name ?? (result.framework ? `${result.framework} App` : "My PWA");
|
|
99
|
-
|
|
99
|
+
let appShortName;
|
|
100
|
+
if (shortName && shortName.length > 0 && shortName.length <= 12) {
|
|
101
|
+
appShortName = shortName;
|
|
102
|
+
} else {
|
|
103
|
+
const fallbackName = appName && appName.length > 0 ? appName : "My PWA";
|
|
104
|
+
appShortName = fallbackName.substring(0, 12);
|
|
105
|
+
}
|
|
106
|
+
if (!appShortName || appShortName.length === 0) {
|
|
107
|
+
appShortName = "PWA";
|
|
108
|
+
}
|
|
100
109
|
let iconPaths = [];
|
|
101
110
|
if (!skipIcons && iconSource) {
|
|
102
111
|
const iconSourcePath = (0, import_fs.existsSync)(iconSource) ? iconSource : (0, import_path.join)(result.projectPath, iconSource);
|
package/dist/index.js
CHANGED
|
@@ -73,7 +73,16 @@ async function initCommand(options = {}) {
|
|
|
73
73
|
const finalOutputDir = outputDir ?? (result.framework === "WordPress" ? join(result.projectPath, "public") : join(result.projectPath, "public"));
|
|
74
74
|
console.log(chalk.blue("\u{1F4DD} Generating manifest.json..."));
|
|
75
75
|
const appName = name ?? (result.framework ? `${result.framework} App` : "My PWA");
|
|
76
|
-
|
|
76
|
+
let appShortName;
|
|
77
|
+
if (shortName && shortName.length > 0 && shortName.length <= 12) {
|
|
78
|
+
appShortName = shortName;
|
|
79
|
+
} else {
|
|
80
|
+
const fallbackName = appName && appName.length > 0 ? appName : "My PWA";
|
|
81
|
+
appShortName = fallbackName.substring(0, 12);
|
|
82
|
+
}
|
|
83
|
+
if (!appShortName || appShortName.length === 0) {
|
|
84
|
+
appShortName = "PWA";
|
|
85
|
+
}
|
|
77
86
|
let iconPaths = [];
|
|
78
87
|
if (!skipIcons && iconSource) {
|
|
79
88
|
const iconSourcePath = existsSync(iconSource) ? iconSource : join(result.projectPath, iconSource);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julien-lin/universal-pwa-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "CLI pour transformer n'importe quel projet web en PWA",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"glob": "^13.0.0",
|
|
45
45
|
"pino": "^9.14.0",
|
|
46
46
|
"zod": "^4.2.1",
|
|
47
|
-
"@julien-lin/universal-pwa-core": "^1.1.
|
|
47
|
+
"@julien-lin/universal-pwa-core": "^1.1.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@vitest/coverage-v8": "^2.1.4",
|