@shipstatic/ship 0.3.16 → 0.4.1

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _shipstatic_types from '@shipstatic/types';
2
- import { ProgressInfo, StaticFile, PingResponse, ConfigResponse, Deployment, DeploymentListResponse, Domain, DomainListResponse, DomainDnsResponse, DomainRecordsResponse, Account, TokenCreateResponse, TokenListResponse, PlatformConfig, ResolvedConfig, DeployInput, DeploymentResource, DomainResource, AccountResource, TokenResource, ValidatableFile, FileValidationResult, ShipError } from '@shipstatic/types';
2
+ import { ProgressInfo, StaticFile, Deployment, DeploymentListResponse, Domain, DomainListResponse, DomainDnsResponse, DomainRecordsResponse, TokenCreateResponse, TokenListResponse, Account, ConfigResponse, PingResponse, 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
 
@@ -168,53 +168,36 @@ declare class ApiHttp extends SimpleEvents {
168
168
  private readonly createDeployBody;
169
169
  constructor(options: ApiHttpOptions);
170
170
  /**
171
- * Transfer events to another client (clean intentional API)
171
+ * Transfer events to another client
172
172
  */
173
173
  transferEventsTo(target: ApiHttp): void;
174
174
  /**
175
- * Make authenticated HTTP request with events and timeout
175
+ * Execute HTTP request with timeout, events, and error handling
176
176
  */
177
- private request;
177
+ private executeRequest;
178
178
  /**
179
- * Combine multiple AbortSignals into one
179
+ * Simple request - returns data only
180
180
  */
181
- private combineSignals;
181
+ private request;
182
182
  /**
183
- * Make request and return both data and HTTP status code
184
- * Used when the caller needs to inspect the status (e.g., 201 vs 200)
183
+ * Request with status - returns data and HTTP status code
185
184
  */
186
185
  private requestWithStatus;
187
- /**
188
- * Generate auth headers from Ship instance callback
189
- */
190
- private getAuthHeaders;
191
- /**
192
- * Safely clone response for events
193
- */
186
+ private mergeHeaders;
187
+ private createTimeoutSignal;
194
188
  private safeClone;
195
- /**
196
- * Parse JSON response
197
- */
198
189
  private parseResponse;
199
- /**
200
- * Handle response errors
201
- */
202
190
  private handleResponseError;
203
- /**
204
- * Handle fetch errors
205
- */
206
191
  private handleFetchError;
207
- ping(): Promise<boolean>;
208
- getPingResponse(): Promise<PingResponse>;
209
- getConfig(): Promise<ConfigResponse>;
210
192
  deploy(files: StaticFile[], options?: ApiDeployOptions): Promise<Deployment>;
211
193
  listDeployments(): Promise<DeploymentListResponse>;
212
194
  getDeployment(id: string): Promise<Deployment>;
195
+ updateDeploymentTags(id: string, tags: string[]): Promise<Deployment>;
213
196
  removeDeployment(id: string): Promise<void>;
214
197
  setDomain(name: string, deployment?: string, tags?: string[]): Promise<Domain>;
198
+ listDomains(): Promise<DomainListResponse>;
215
199
  getDomain(name: string): Promise<Domain>;
216
200
  updateDomainTags(name: string, tags: string[]): Promise<Domain>;
217
- listDomains(): Promise<DomainListResponse>;
218
201
  removeDomain(name: string): Promise<void>;
219
202
  verifyDomain(name: string): Promise<{
220
203
  message: string;
@@ -225,10 +208,13 @@ declare class ApiHttp extends SimpleEvents {
225
208
  domain: string;
226
209
  hash: string;
227
210
  }>;
228
- getAccount(): Promise<Account>;
229
211
  createToken(ttl?: number, tags?: string[]): Promise<TokenCreateResponse>;
230
212
  listTokens(): Promise<TokenListResponse>;
231
213
  removeToken(token: string): Promise<void>;
214
+ getAccount(): Promise<Account>;
215
+ getConfig(): Promise<ConfigResponse>;
216
+ ping(): Promise<boolean>;
217
+ getPingResponse(): Promise<PingResponse>;
232
218
  checkSPA(files: StaticFile[]): Promise<boolean>;
233
219
  }
234
220