@shipstatic/ship 0.4.22 → 0.4.24
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/browser.d.ts +13 -10
- package/dist/browser.js +6 -6
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +14 -14
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.ts
CHANGED
|
@@ -535,27 +535,30 @@ declare function getENV(): ExecutionEnvironment;
|
|
|
535
535
|
*/
|
|
536
536
|
declare function formatFileSize(bytes: number, decimals?: number): string;
|
|
537
537
|
/**
|
|
538
|
-
* Validate files against configuration limits
|
|
538
|
+
* Validate files against configuration limits with severity-based reporting
|
|
539
539
|
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
540
|
+
* Validation categorizes issues by severity:
|
|
541
|
+
* - **Errors**: Block deployment (file too large, invalid type, etc.)
|
|
542
|
+
* - **Warnings**: Exclude files but allow deployment (empty files, etc.)
|
|
542
543
|
*
|
|
543
544
|
* @param files - Array of files to validate
|
|
544
545
|
* @param config - Validation configuration from ship.getConfig()
|
|
545
|
-
* @returns Validation result with
|
|
546
|
+
* @returns Validation result with errors and warnings
|
|
546
547
|
*
|
|
547
548
|
* @example
|
|
548
549
|
* ```typescript
|
|
549
550
|
* const config = await ship.getConfig();
|
|
550
551
|
* const result = validateFiles(files, config);
|
|
551
552
|
*
|
|
552
|
-
* if (result.
|
|
553
|
-
* //
|
|
554
|
-
* console.error(result.
|
|
555
|
-
*
|
|
556
|
-
*
|
|
553
|
+
* if (!result.canDeploy) {
|
|
554
|
+
* // Has errors - deployment blocked
|
|
555
|
+
* console.error('Deployment blocked:', result.errors);
|
|
556
|
+
* } else if (result.warnings.length > 0) {
|
|
557
|
+
* // Has warnings - deployment proceeds, some files excluded
|
|
558
|
+
* console.warn('Files excluded:', result.warnings);
|
|
559
|
+
* await ship.deploy(result.validFiles);
|
|
557
560
|
* } else {
|
|
558
|
-
* // All files valid
|
|
561
|
+
* // All files valid
|
|
559
562
|
* await ship.deploy(result.validFiles);
|
|
560
563
|
* }
|
|
561
564
|
* ```
|