@shipstatic/ship 0.3.13 → 0.3.14
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 +22 -2
- package/dist/browser.js +2 -2
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +11 -11
- 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 +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _shipstatic_types from '@shipstatic/types';
|
|
2
|
-
import { ProgressInfo, PingResponse, ConfigResponse, StaticFile, Deployment, DeploymentListResponse, Domain, DomainListResponse, DomainDnsResponse, DomainRecordsResponse, Account, TokenCreateResponse, TokenListResponse, PlatformConfig, ResolvedConfig, DeployInput, DeploymentResource, DomainResource, AccountResource, TokenResource, ValidatableFile, FileValidationResult } from '@shipstatic/types';
|
|
2
|
+
import { ProgressInfo, PingResponse, ConfigResponse, StaticFile, Deployment, DeploymentListResponse, Domain, DomainListResponse, DomainDnsResponse, DomainRecordsResponse, Account, TokenCreateResponse, TokenListResponse, PlatformConfig, ResolvedConfig, DeployInput, DeploymentResource, DomainResource, AccountResource, TokenResource, ValidatableFile, FileValidationResult, ShipError } from '@shipstatic/types';
|
|
3
3
|
export * from '@shipstatic/types';
|
|
4
4
|
export { Account, AccountResource, DEFAULT_API, DeployInput, Deployment, DeploymentResource, Domain, DomainResource, ErrorType, FileValidationStatus as FILE_VALIDATION_STATUS, PingResponse, ResolvedConfig, ShipError, StaticFile, TokenResource } from '@shipstatic/types';
|
|
5
5
|
|
|
@@ -535,6 +535,26 @@ declare function getValidFiles<T extends ValidatableFile>(files: T[]): T[];
|
|
|
535
535
|
*/
|
|
536
536
|
declare function allValidFilesReady<T extends ValidatableFile>(files: T[]): boolean;
|
|
537
537
|
|
|
538
|
+
/**
|
|
539
|
+
* @file Error utilities for consistent error handling across SDK consumers.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Ensure any error is wrapped as a ShipError.
|
|
544
|
+
* Useful for catch blocks where the error type is unknown.
|
|
545
|
+
*
|
|
546
|
+
* @example
|
|
547
|
+
* ```ts
|
|
548
|
+
* try {
|
|
549
|
+
* await someOperation();
|
|
550
|
+
* } catch (err) {
|
|
551
|
+
* const shipError = ensureShipError(err);
|
|
552
|
+
* // Now you can safely use shipError.message, shipError.type, etc.
|
|
553
|
+
* }
|
|
554
|
+
* ```
|
|
555
|
+
*/
|
|
556
|
+
declare function ensureShipError(err: unknown): ShipError;
|
|
557
|
+
|
|
538
558
|
/**
|
|
539
559
|
* @file Browser configuration implementation - no file system access.
|
|
540
560
|
* Browser environment receives all config through constructor options.
|
|
@@ -608,4 +628,4 @@ declare class Ship extends Ship$1 {
|
|
|
608
628
|
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
609
629
|
}
|
|
610
630
|
|
|
611
|
-
export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, Ship, type ShipClientOptions, type ShipEvents, __setTestEnvironment, allValidFilesReady, calculateMD5, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, filterJunk, formatFileSize, getCurrentConfig, getENV, getValidFiles, loadConfig, mergeDeployOptions, optimizeDeployPaths, pluralize, processFilesForBrowser, resolveConfig, setConfig as setPlatformConfig, validateFiles };
|
|
631
|
+
export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, Ship, type ShipClientOptions, type ShipEvents, __setTestEnvironment, allValidFilesReady, calculateMD5, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, ensureShipError, filterJunk, formatFileSize, getCurrentConfig, getENV, getValidFiles, loadConfig, mergeDeployOptions, optimizeDeployPaths, pluralize, processFilesForBrowser, resolveConfig, setConfig as setPlatformConfig, validateFiles };
|