@julien-lin/universal-pwa-core 1.2.3 → 1.2.4

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.fr.md CHANGED
@@ -177,7 +177,11 @@ pnpm lint
177
177
 
178
178
  ## Liens
179
179
 
180
- - **Page d'accueil** : https://github.com/julien-lin/UniversalPWA
181
- - **Support** : Pour les problèmes et questions, utilisez [GitHub Discussions](https://github.com/julien-lin/UniversalPWA/discussions)
182
- - **Sponsor** : https://github.com/sponsors/julien-lin
180
+ - **Repository** : [https://github.com/julien-lin/UniversalPWA](https://github.com/julien-lin/UniversalPWA)
181
+ - **Issues** : [https://github.com/julien-lin/UniversalPWA/issues](https://github.com/julien-lin/UniversalPWA/issues)
182
+ - **Discussions** : [https://github.com/julien-lin/UniversalPWA/discussions](https://github.com/julien-lin/UniversalPWA/discussions)
183
+ - **Contribution** : [https://github.com/julien-lin/UniversalPWA/blob/main/CONTRIBUTING.md](https://github.com/julien-lin/UniversalPWA/blob/main/CONTRIBUTING.md)
184
+ - **Releases** : [https://github.com/julien-lin/UniversalPWA/releases](https://github.com/julien-lin/UniversalPWA/releases)
185
+ - **Sponsor** : [https://github.com/sponsors/julien-lin](https://github.com/sponsors/julien-lin)
186
+ - **Package npm** : [https://www.npmjs.com/package/@julien-lin/universal-pwa-core](https://www.npmjs.com/package/@julien-lin/universal-pwa-core)
183
187
 
package/README.md CHANGED
@@ -179,6 +179,10 @@ pnpm lint
179
179
 
180
180
  ## Links
181
181
 
182
- - **Homepage**: https://github.com/julien-lin/UniversalPWA
183
- - **Support**: For issues and questions, please use [GitHub Discussions](https://github.com/julien-lin/UniversalPWA/discussions)
184
- - **Sponsor**: https://github.com/sponsors/julien-lin
182
+ - **Repository**: [https://github.com/julien-lin/UniversalPWA](https://github.com/julien-lin/UniversalPWA)
183
+ - **Issues**: [https://github.com/julien-lin/UniversalPWA/issues](https://github.com/julien-lin/UniversalPWA/issues)
184
+ - **Discussions**: [https://github.com/julien-lin/UniversalPWA/discussions](https://github.com/julien-lin/UniversalPWA/discussions)
185
+ - **Contributing**: [https://github.com/julien-lin/UniversalPWA/blob/main/CONTRIBUTING.md](https://github.com/julien-lin/UniversalPWA/blob/main/CONTRIBUTING.md)
186
+ - **Releases**: [https://github.com/julien-lin/UniversalPWA/releases](https://github.com/julien-lin/UniversalPWA/releases)
187
+ - **Sponsor**: [https://github.com/sponsors/julien-lin](https://github.com/sponsors/julien-lin)
188
+ - **npm Package**: [https://www.npmjs.com/package/@julien-lin/universal-pwa-core](https://www.npmjs.com/package/@julien-lin/universal-pwa-core)
package/dist/index.cjs CHANGED
@@ -843,7 +843,7 @@ async function generateServiceWorker(options) {
843
843
  globPatterns,
844
844
  swDest: swDestPath,
845
845
  swSrc: swSrcPath,
846
- // Injection du manifest dans le template
846
+ // Inject manifest into template
847
847
  injectionPoint: "self.__WB_MANIFEST"
848
848
  };
849
849
  if (offlinePage) {
package/dist/index.d.cts CHANGED
@@ -51,16 +51,16 @@ interface ScannerOptions {
51
51
  includeArchitecture?: boolean;
52
52
  }
53
53
  /**
54
- * Orchestrateur principal du scanner
55
- * Combine les résultats de détection framework, assets et architecture
54
+ * Main scanner orchestrator
55
+ * Combines framework, assets, and architecture detection results
56
56
  */
57
57
  declare function scanProject(options: ScannerOptions): Promise<ScannerResult>;
58
58
  /**
59
- * Génère un rapport JSON du scan
59
+ * Generates a JSON report of the scan
60
60
  */
61
61
  declare function generateReport(result: ScannerResult): string;
62
62
  /**
63
- * Valide qu'un chemin de projet existe
63
+ * Validates that a project path exists
64
64
  */
65
65
  declare function validateProjectPath(projectPath: string): boolean;
66
66
 
@@ -137,15 +137,15 @@ interface ManifestGeneratorOptions {
137
137
  relatedApplications?: unknown[];
138
138
  }
139
139
  /**
140
- * Génère un manifest.json pour PWA
140
+ * Generates a manifest.json for PWA
141
141
  */
142
142
  declare function generateManifest(options: ManifestGeneratorOptions): Manifest;
143
143
  /**
144
- * Écrit le manifest.json dans le répertoire de sortie
144
+ * Writes manifest.json to the output directory
145
145
  */
146
146
  declare function writeManifest(manifest: Manifest, outputDir: string): string;
147
147
  /**
148
- * Génère et écrit le manifest.json
148
+ * Generates and writes manifest.json
149
149
  */
150
150
  declare function generateAndWriteManifest(options: ManifestGeneratorOptions, outputDir: string): string;
151
151
 
@@ -175,29 +175,29 @@ interface IconGenerationResult {
175
175
  generatedFiles: string[];
176
176
  }
177
177
  /**
178
- * Génère toutes les icônes PWA à partir d'une image source
178
+ * Generates all PWA icons from a source image
179
179
  */
180
180
  declare function generateIcons(options: IconGeneratorOptions): Promise<IconGenerationResult>;
181
181
  /**
182
- * Génère uniquement les icônes (sans splash screens)
182
+ * Generates only icons (without splash screens)
183
183
  */
184
184
  declare function generateIconsOnly(options: IconGeneratorOptions): Promise<{
185
185
  icons: ManifestIcon[];
186
186
  generatedFiles: string[];
187
187
  }>;
188
188
  /**
189
- * Génère uniquement les splash screens (sans icônes)
189
+ * Generates only splash screens (without icons)
190
190
  */
191
191
  declare function generateSplashScreensOnly(options: IconGeneratorOptions): Promise<{
192
192
  splashScreens: ManifestSplashScreen[];
193
193
  generatedFiles: string[];
194
194
  }>;
195
195
  /**
196
- * Génère une favicon.ico à partir de l'image source
196
+ * Generates a favicon.ico from the source image
197
197
  */
198
198
  declare function generateFavicon(sourceImage: string, outputDir: string): Promise<string>;
199
199
  /**
200
- * Génère un apple-touch-icon (180x180)
200
+ * Generates an apple-touch-icon (180x180)
201
201
  */
202
202
  declare function generateAppleTouchIcon(sourceImage: string, outputDir: string): Promise<string>;
203
203
 
@@ -234,15 +234,15 @@ interface ServiceWorkerGenerationResult {
234
234
  filePaths: string[];
235
235
  }
236
236
  /**
237
- * Génère un service worker avec Workbox
237
+ * Generates a service worker with Workbox
238
238
  */
239
239
  declare function generateServiceWorker(options: ServiceWorkerGeneratorOptions): Promise<ServiceWorkerGenerationResult>;
240
240
  /**
241
- * Génère un service worker simple sans template (utilise generateSW)
241
+ * Generates a simple service worker without template (uses generateSW)
242
242
  */
243
243
  declare function generateSimpleServiceWorker(options: Omit<ServiceWorkerGeneratorOptions, 'templateType' | 'swSrc'>): Promise<ServiceWorkerGenerationResult>;
244
244
  /**
245
- * Génère et écrit le service worker avec template
245
+ * Generates and writes service worker with template
246
246
  */
247
247
  declare function generateAndWriteServiceWorker(options: ServiceWorkerGeneratorOptions): Promise<ServiceWorkerGenerationResult>;
248
248
 
@@ -265,11 +265,11 @@ interface HttpsCheckerOptions {
265
265
  */
266
266
  declare function checkHttps(url: string, allowHttpLocalhost?: boolean): HttpsCheckResult;
267
267
  /**
268
- * Détecte l'URL du projet à partir de fichiers de configuration
268
+ * Detects project URL from configuration files
269
269
  */
270
270
  declare function detectProjectUrl(projectPath: string): string | null;
271
271
  /**
272
- * Vérifie HTTPS pour un projet
272
+ * Checks HTTPS for a project
273
273
  */
274
274
  declare function checkProjectHttps(options?: HttpsCheckerOptions): HttpsCheckResult;
275
275
 
@@ -285,36 +285,36 @@ interface HTMLParserOptions {
285
285
  lowerCaseAttributeNames?: boolean;
286
286
  }
287
287
  /**
288
- * Parse un fichier HTML et retourne la structure du document
288
+ * Parses an HTML file and returns the document structure
289
289
  */
290
290
  declare function parseHTMLFile(filePath: string, options?: HTMLParserOptions): ParsedHTML;
291
291
  /**
292
- * Parse une chaîne HTML et retourne la structure du document
292
+ * Parses an HTML string and returns the document structure
293
293
  */
294
294
  declare function parseHTML(htmlContent: string, options?: HTMLParserOptions): ParsedHTML;
295
295
  /**
296
- * Trouve un élément dans le document par tag name
296
+ * Finds an element in the document by tag name
297
297
  */
298
298
  declare function findElement(parsed: ParsedHTML, tagName: string, attribute?: {
299
299
  name: string;
300
300
  value: string;
301
301
  }): Element | null;
302
302
  /**
303
- * Trouve tous les éléments correspondant à un tag name
303
+ * Finds all elements matching a tag name
304
304
  */
305
305
  declare function findAllElements(parsed: ParsedHTML, tagName: string, attribute?: {
306
306
  name: string;
307
307
  value?: string;
308
308
  }): Element[];
309
309
  /**
310
- * Vérifie si un élément existe déjà dans le document
310
+ * Checks if an element already exists in the document
311
311
  */
312
312
  declare function elementExists(parsed: ParsedHTML, tagName: string, attribute: {
313
313
  name: string;
314
314
  value: string;
315
315
  }): boolean;
316
316
  /**
317
- * Convertit un document parsé en HTML string
317
+ * Converts a parsed document to HTML string
318
318
  */
319
319
  declare function serializeHTML(parsed: ParsedHTML): string;
320
320
 
@@ -334,14 +334,14 @@ interface InjectionResult {
334
334
  warnings: string[];
335
335
  }
336
336
  /**
337
- * Injecte les meta-tags PWA dans le HTML
337
+ * Injects PWA meta-tags into HTML
338
338
  */
339
339
  declare function injectMetaTags(htmlContent: string, options?: MetaInjectorOptions): {
340
340
  html: string;
341
341
  result: InjectionResult;
342
342
  };
343
343
  /**
344
- * Injecte les meta-tags dans un fichier HTML
344
+ * Injects meta-tags into an HTML file
345
345
  */
346
346
  declare function injectMetaTagsInFile(filePath: string, options?: MetaInjectorOptions): InjectionResult;
347
347
 
package/dist/index.d.ts CHANGED
@@ -51,16 +51,16 @@ interface ScannerOptions {
51
51
  includeArchitecture?: boolean;
52
52
  }
53
53
  /**
54
- * Orchestrateur principal du scanner
55
- * Combine les résultats de détection framework, assets et architecture
54
+ * Main scanner orchestrator
55
+ * Combines framework, assets, and architecture detection results
56
56
  */
57
57
  declare function scanProject(options: ScannerOptions): Promise<ScannerResult>;
58
58
  /**
59
- * Génère un rapport JSON du scan
59
+ * Generates a JSON report of the scan
60
60
  */
61
61
  declare function generateReport(result: ScannerResult): string;
62
62
  /**
63
- * Valide qu'un chemin de projet existe
63
+ * Validates that a project path exists
64
64
  */
65
65
  declare function validateProjectPath(projectPath: string): boolean;
66
66
 
@@ -137,15 +137,15 @@ interface ManifestGeneratorOptions {
137
137
  relatedApplications?: unknown[];
138
138
  }
139
139
  /**
140
- * Génère un manifest.json pour PWA
140
+ * Generates a manifest.json for PWA
141
141
  */
142
142
  declare function generateManifest(options: ManifestGeneratorOptions): Manifest;
143
143
  /**
144
- * Écrit le manifest.json dans le répertoire de sortie
144
+ * Writes manifest.json to the output directory
145
145
  */
146
146
  declare function writeManifest(manifest: Manifest, outputDir: string): string;
147
147
  /**
148
- * Génère et écrit le manifest.json
148
+ * Generates and writes manifest.json
149
149
  */
150
150
  declare function generateAndWriteManifest(options: ManifestGeneratorOptions, outputDir: string): string;
151
151
 
@@ -175,29 +175,29 @@ interface IconGenerationResult {
175
175
  generatedFiles: string[];
176
176
  }
177
177
  /**
178
- * Génère toutes les icônes PWA à partir d'une image source
178
+ * Generates all PWA icons from a source image
179
179
  */
180
180
  declare function generateIcons(options: IconGeneratorOptions): Promise<IconGenerationResult>;
181
181
  /**
182
- * Génère uniquement les icônes (sans splash screens)
182
+ * Generates only icons (without splash screens)
183
183
  */
184
184
  declare function generateIconsOnly(options: IconGeneratorOptions): Promise<{
185
185
  icons: ManifestIcon[];
186
186
  generatedFiles: string[];
187
187
  }>;
188
188
  /**
189
- * Génère uniquement les splash screens (sans icônes)
189
+ * Generates only splash screens (without icons)
190
190
  */
191
191
  declare function generateSplashScreensOnly(options: IconGeneratorOptions): Promise<{
192
192
  splashScreens: ManifestSplashScreen[];
193
193
  generatedFiles: string[];
194
194
  }>;
195
195
  /**
196
- * Génère une favicon.ico à partir de l'image source
196
+ * Generates a favicon.ico from the source image
197
197
  */
198
198
  declare function generateFavicon(sourceImage: string, outputDir: string): Promise<string>;
199
199
  /**
200
- * Génère un apple-touch-icon (180x180)
200
+ * Generates an apple-touch-icon (180x180)
201
201
  */
202
202
  declare function generateAppleTouchIcon(sourceImage: string, outputDir: string): Promise<string>;
203
203
 
@@ -234,15 +234,15 @@ interface ServiceWorkerGenerationResult {
234
234
  filePaths: string[];
235
235
  }
236
236
  /**
237
- * Génère un service worker avec Workbox
237
+ * Generates a service worker with Workbox
238
238
  */
239
239
  declare function generateServiceWorker(options: ServiceWorkerGeneratorOptions): Promise<ServiceWorkerGenerationResult>;
240
240
  /**
241
- * Génère un service worker simple sans template (utilise generateSW)
241
+ * Generates a simple service worker without template (uses generateSW)
242
242
  */
243
243
  declare function generateSimpleServiceWorker(options: Omit<ServiceWorkerGeneratorOptions, 'templateType' | 'swSrc'>): Promise<ServiceWorkerGenerationResult>;
244
244
  /**
245
- * Génère et écrit le service worker avec template
245
+ * Generates and writes service worker with template
246
246
  */
247
247
  declare function generateAndWriteServiceWorker(options: ServiceWorkerGeneratorOptions): Promise<ServiceWorkerGenerationResult>;
248
248
 
@@ -265,11 +265,11 @@ interface HttpsCheckerOptions {
265
265
  */
266
266
  declare function checkHttps(url: string, allowHttpLocalhost?: boolean): HttpsCheckResult;
267
267
  /**
268
- * Détecte l'URL du projet à partir de fichiers de configuration
268
+ * Detects project URL from configuration files
269
269
  */
270
270
  declare function detectProjectUrl(projectPath: string): string | null;
271
271
  /**
272
- * Vérifie HTTPS pour un projet
272
+ * Checks HTTPS for a project
273
273
  */
274
274
  declare function checkProjectHttps(options?: HttpsCheckerOptions): HttpsCheckResult;
275
275
 
@@ -285,36 +285,36 @@ interface HTMLParserOptions {
285
285
  lowerCaseAttributeNames?: boolean;
286
286
  }
287
287
  /**
288
- * Parse un fichier HTML et retourne la structure du document
288
+ * Parses an HTML file and returns the document structure
289
289
  */
290
290
  declare function parseHTMLFile(filePath: string, options?: HTMLParserOptions): ParsedHTML;
291
291
  /**
292
- * Parse une chaîne HTML et retourne la structure du document
292
+ * Parses an HTML string and returns the document structure
293
293
  */
294
294
  declare function parseHTML(htmlContent: string, options?: HTMLParserOptions): ParsedHTML;
295
295
  /**
296
- * Trouve un élément dans le document par tag name
296
+ * Finds an element in the document by tag name
297
297
  */
298
298
  declare function findElement(parsed: ParsedHTML, tagName: string, attribute?: {
299
299
  name: string;
300
300
  value: string;
301
301
  }): Element | null;
302
302
  /**
303
- * Trouve tous les éléments correspondant à un tag name
303
+ * Finds all elements matching a tag name
304
304
  */
305
305
  declare function findAllElements(parsed: ParsedHTML, tagName: string, attribute?: {
306
306
  name: string;
307
307
  value?: string;
308
308
  }): Element[];
309
309
  /**
310
- * Vérifie si un élément existe déjà dans le document
310
+ * Checks if an element already exists in the document
311
311
  */
312
312
  declare function elementExists(parsed: ParsedHTML, tagName: string, attribute: {
313
313
  name: string;
314
314
  value: string;
315
315
  }): boolean;
316
316
  /**
317
- * Convertit un document parsé en HTML string
317
+ * Converts a parsed document to HTML string
318
318
  */
319
319
  declare function serializeHTML(parsed: ParsedHTML): string;
320
320
 
@@ -334,14 +334,14 @@ interface InjectionResult {
334
334
  warnings: string[];
335
335
  }
336
336
  /**
337
- * Injecte les meta-tags PWA dans le HTML
337
+ * Injects PWA meta-tags into HTML
338
338
  */
339
339
  declare function injectMetaTags(htmlContent: string, options?: MetaInjectorOptions): {
340
340
  html: string;
341
341
  result: InjectionResult;
342
342
  };
343
343
  /**
344
- * Injecte les meta-tags dans un fichier HTML
344
+ * Injects meta-tags into an HTML file
345
345
  */
346
346
  declare function injectMetaTagsInFile(filePath: string, options?: MetaInjectorOptions): InjectionResult;
347
347
 
package/dist/index.js CHANGED
@@ -777,7 +777,7 @@ async function generateServiceWorker(options) {
777
777
  globPatterns,
778
778
  swDest: swDestPath,
779
779
  swSrc: swSrcPath,
780
- // Injection du manifest dans le template
780
+ // Inject manifest into template
781
781
  injectionPoint: "self.__WB_MANIFEST"
782
782
  };
783
783
  if (offlinePage) {
package/package.json CHANGED
@@ -1,13 +1,23 @@
1
1
  {
2
2
  "name": "@julien-lin/universal-pwa-core",
3
- "version": "1.2.3",
4
- "description": "Moteur de scan, génération et injection pour UniversalPWA",
3
+ "version": "1.2.4",
4
+ "description": "Core engine for scanning, generation, and injection for UniversalPWA",
5
5
  "keywords": [
6
6
  "pwa",
7
7
  "progressive-web-app",
8
+ "universal-pwa",
9
+ "pwa-generator",
10
+ "pwa-scanner",
11
+ "pwa-injector",
8
12
  "workbox",
9
13
  "service-worker",
10
- "manifest"
14
+ "manifest",
15
+ "web-manifest",
16
+ "pwa-manifest",
17
+ "auto-detect",
18
+ "framework-detection",
19
+ "zero-config",
20
+ "multi-framework"
11
21
  ],
12
22
  "author": "julien-lin",
13
23
  "license": "MIT",
@@ -51,7 +61,7 @@
51
61
  "workbox-routing": "^7.4.0",
52
62
  "workbox-strategies": "^7.4.0",
53
63
  "zod": "^4.2.1",
54
- "@julien-lin/universal-pwa-templates": "^1.2.3"
64
+ "@julien-lin/universal-pwa-templates": "^1.2.4"
55
65
  },
56
66
  "devDependencies": {
57
67
  "@vitest/coverage-v8": "^2.1.4",