@julien-lin/universal-pwa-core 1.2.1 → 1.2.2
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 +11 -1
- package/dist/index.js +11 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -580,9 +580,19 @@ var ManifestSchema = import_zod.z.object({
|
|
|
580
580
|
related_applications: import_zod.z.array(import_zod.z.unknown()).optional()
|
|
581
581
|
});
|
|
582
582
|
function generateManifest(options) {
|
|
583
|
+
let shortName = "PWA";
|
|
584
|
+
if (options.shortName && typeof options.shortName === "string" && options.shortName.trim().length > 0) {
|
|
585
|
+
shortName = options.shortName.trim().substring(0, 12);
|
|
586
|
+
} else if (options.name && typeof options.name === "string" && options.name.length > 0) {
|
|
587
|
+
shortName = options.name.substring(0, 12);
|
|
588
|
+
}
|
|
589
|
+
if (!shortName || shortName.trim().length === 0) {
|
|
590
|
+
shortName = "PWA";
|
|
591
|
+
}
|
|
592
|
+
shortName = String(shortName).trim().substring(0, 12) || "PWA";
|
|
583
593
|
const manifest = {
|
|
584
594
|
name: options.name,
|
|
585
|
-
short_name:
|
|
595
|
+
short_name: shortName,
|
|
586
596
|
start_url: options.startUrl ?? "/",
|
|
587
597
|
scope: options.scope ?? "/",
|
|
588
598
|
display: options.display ?? "standalone",
|
package/dist/index.js
CHANGED
|
@@ -514,9 +514,19 @@ var ManifestSchema = z.object({
|
|
|
514
514
|
related_applications: z.array(z.unknown()).optional()
|
|
515
515
|
});
|
|
516
516
|
function generateManifest(options) {
|
|
517
|
+
let shortName = "PWA";
|
|
518
|
+
if (options.shortName && typeof options.shortName === "string" && options.shortName.trim().length > 0) {
|
|
519
|
+
shortName = options.shortName.trim().substring(0, 12);
|
|
520
|
+
} else if (options.name && typeof options.name === "string" && options.name.length > 0) {
|
|
521
|
+
shortName = options.name.substring(0, 12);
|
|
522
|
+
}
|
|
523
|
+
if (!shortName || shortName.trim().length === 0) {
|
|
524
|
+
shortName = "PWA";
|
|
525
|
+
}
|
|
526
|
+
shortName = String(shortName).trim().substring(0, 12) || "PWA";
|
|
517
527
|
const manifest = {
|
|
518
528
|
name: options.name,
|
|
519
|
-
short_name:
|
|
529
|
+
short_name: shortName,
|
|
520
530
|
start_url: options.startUrl ?? "/",
|
|
521
531
|
scope: options.scope ?? "/",
|
|
522
532
|
display: options.display ?? "standalone",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julien-lin/universal-pwa-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Moteur de scan, génération et injection pour UniversalPWA",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"workbox-routing": "^7.4.0",
|
|
50
50
|
"workbox-strategies": "^7.4.0",
|
|
51
51
|
"zod": "^4.2.1",
|
|
52
|
-
"@julien-lin/universal-pwa-templates": "^1.2.
|
|
52
|
+
"@julien-lin/universal-pwa-templates": "^1.2.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@vitest/coverage-v8": "^2.1.4",
|