@shipstatic/ship 0.2.8 → 0.3.0

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.md CHANGED
@@ -99,13 +99,13 @@ ship list # List deployments
99
99
  ship get abc123 # Get deployment details
100
100
  ship remove abc123 # Remove deployment
101
101
 
102
- # Manage aliases
103
- ship aliases list # List aliases
104
- ship aliases set staging abc123 # Set alias to deployment
105
- ship aliases set prod abc123 --tag production # Set alias with tag
106
- ship aliases set prod abc123 --tag prod --tag v1 # Set alias with multiple tags
107
- ship aliases confirm www.example.com # Trigger DNS confirmation
108
- ship aliases remove staging # Remove alias
102
+ # Manage domains
103
+ ship domains list # List domains
104
+ ship domains set staging abc123 # Set domain to deployment
105
+ ship domains set prod abc123 --tag production # Set domain with tag
106
+ ship domains set prod abc123 --tag prod --tag v1 # Set domain with multiple tags
107
+ ship domains confirm www.example.com # Trigger DNS confirmation
108
+ ship domains remove staging # Remove domain
109
109
 
110
110
  # Account
111
111
  ship account # Get account details
@@ -157,7 +157,7 @@ interface ShipOptions {
157
157
 
158
158
  - `ship.ping()` - Check API connectivity
159
159
  - `ship.deployments` - Access deployment resource
160
- - `ship.aliases` - Access alias resource
160
+ - `ship.domains` - Access domain resource
161
161
  - `ship.account` - Access account resource
162
162
  - `ship.on(event, handler)` - Add event listener for API observability
163
163
  - `ship.off(event, handler)` - Remove event listener
@@ -209,35 +209,35 @@ interface DeployOptions {
209
209
  }
210
210
  ```
211
211
 
212
- ### Aliases Resource
212
+ ### Domains Resource
213
213
 
214
214
  ```typescript
215
- // Set or update an alias (with optional tags)
216
- await ship.aliases.set(aliasName, deploymentId, tags?)
215
+ // Set or update a domain (with optional tags)
216
+ await ship.domains.set(domainName, deploymentId, tags?)
217
217
 
218
- // Get alias details
219
- await ship.aliases.get(aliasName)
218
+ // Get domain details
219
+ await ship.domains.get(domainName)
220
220
 
221
- // List all aliases
222
- await ship.aliases.list()
221
+ // List all domains
222
+ await ship.domains.list()
223
223
 
224
- // Remove alias
225
- await ship.aliases.remove(aliasName)
224
+ // Remove domain
225
+ await ship.domains.remove(domainName)
226
226
 
227
- // Trigger DNS confirmation for external alias
228
- await ship.aliases.confirm(aliasName)
227
+ // Trigger DNS confirmation for external domain
228
+ await ship.domains.confirm(domainName)
229
229
  ```
230
230
 
231
231
  **Examples:**
232
232
  ```javascript
233
- // Set alias without tags
234
- await ship.aliases.set('staging', 'dep_abc123');
233
+ // Set domain without tags
234
+ await ship.domains.set('staging', 'dep_abc123');
235
235
 
236
- // Set alias with tags
237
- await ship.aliases.set('production', 'dep_xyz789', ['prod', 'v1.0.0']);
236
+ // Set domain with tags
237
+ await ship.domains.set('production', 'dep_xyz789', ['prod', 'v1.0.0']);
238
238
 
239
- // Confirm DNS for external alias
240
- await ship.aliases.confirm('www.example.com');
239
+ // Confirm DNS for external domain
240
+ await ship.domains.confirm('www.example.com');
241
241
  ```
242
242
 
243
243
  ### Environment-Specific Examples
@@ -586,11 +586,11 @@ ship get abc123 # Get deployment details
586
586
  ship remove abc123 # Remove deployment
587
587
  ```
588
588
 
589
- ### Alias Commands
589
+ ### Domain Commands
590
590
 
591
591
  ```bash
592
- ship aliases # List aliases
593
- ship alias staging abc123 # Set alias to deployment
592
+ ship domains # List domains
593
+ ship domains set staging abc123 # Set domain to deployment
594
594
  ```
595
595
 
596
596
  ### Account Commands
@@ -705,7 +705,7 @@ File Objects → Path Extraction → Junk Filtering → Content Processing → S
705
705
  Ship SDK provides comprehensive deployment functionality:
706
706
 
707
707
  - **Deployment Resource**: Complete operations (create, list, get, remove)
708
- - **Alias Resource**: Complete operations (set, get, list, remove)
708
+ - **Domain Resource**: Complete operations (set, get, list, remove)
709
709
  - **Account Resource**: Account information retrieval
710
710
  - **Event System**: Comprehensive observability with request, response, error events
711
711
  - **Unified Error System**: Single `ShipError` class with factory methods
package/dist/browser.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _shipstatic_types from '@shipstatic/types';
2
- import { PingResponse, ConfigResponse, StaticFile, Deployment, DeploymentListResponse, Alias, AliasListResponse, Account, TokenCreateResponse, TokenListResponse, DeployInput, DeploymentResource, AliasResource, AccountResource, TokenResource, PlatformConfig } from '@shipstatic/types';
2
+ import { PingResponse, ConfigResponse, StaticFile, Deployment, DeploymentListResponse, Domain, DomainListResponse, Account, TokenCreateResponse, TokenListResponse, DeployInput, DeploymentResource, DomainResource, AccountResource, TokenResource, PlatformConfig } from '@shipstatic/types';
3
3
  export * from '@shipstatic/types';
4
- export { Account, Alias, DEFAULT_API, DeployInput, Deployment, PingResponse, ShipError, ShipErrorType } from '@shipstatic/types';
4
+ export { Account, DEFAULT_API, DeployInput, Deployment, Domain, PingResponse, ShipError, ShipErrorType } from '@shipstatic/types';
5
5
 
6
6
  /**
7
7
  * @file SDK-specific type definitions
@@ -201,23 +201,23 @@ declare class ApiHttp extends SimpleEvents {
201
201
  listDeployments(): Promise<DeploymentListResponse>;
202
202
  getDeployment(id: string): Promise<Deployment>;
203
203
  removeDeployment(id: string): Promise<void>;
204
- setAlias(name: string, deployment: string, tags?: string[]): Promise<Alias>;
205
- getAlias(name: string): Promise<Alias>;
206
- listAliases(): Promise<AliasListResponse>;
207
- removeAlias(name: string): Promise<void>;
208
- confirmAlias(name: string): Promise<{
204
+ setDomain(name: string, deployment: string, tags?: string[]): Promise<Domain>;
205
+ getDomain(name: string): Promise<Domain>;
206
+ listDomains(): Promise<DomainListResponse>;
207
+ removeDomain(name: string): Promise<void>;
208
+ confirmDomain(name: string): Promise<{
209
209
  message: string;
210
210
  }>;
211
- getAliasDns(name: string): Promise<{
212
- alias: string;
211
+ getDomainDns(name: string): Promise<{
212
+ domain: string;
213
213
  dns: any;
214
214
  }>;
215
- getAliasRecords(name: string): Promise<{
216
- alias: string;
215
+ getDomainRecords(name: string): Promise<{
216
+ domain: string;
217
217
  records: any[];
218
218
  }>;
219
- getAliasShare(name: string): Promise<{
220
- alias: string;
219
+ getDomainShare(name: string): Promise<{
220
+ domain: string;
221
221
  hash: string;
222
222
  }>;
223
223
  getAccount(): Promise<Account>;
@@ -233,11 +233,11 @@ declare class ApiHttp extends SimpleEvents {
233
233
  }
234
234
 
235
235
  /**
236
- * @file Ship SDK resource implementations for deployments, aliases, and accounts.
236
+ * @file Ship SDK resource implementations for deployments, domains, and accounts.
237
237
  */
238
238
 
239
239
  declare function createDeploymentResource(getApi: () => ApiHttp, clientDefaults?: ShipClientOptions, ensureInit?: () => Promise<void>, processInput?: (input: DeployInput, options: DeploymentOptions) => Promise<StaticFile[]>): DeploymentResource;
240
- declare function createAliasResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): AliasResource;
240
+ declare function createDomainResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): DomainResource;
241
241
  declare function createAccountResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): AccountResource;
242
242
  declare function createTokenResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): TokenResource;
243
243
 
@@ -252,7 +252,7 @@ declare abstract class Ship$1 {
252
252
  protected readonly clientOptions: ShipClientOptions;
253
253
  protected initPromise: Promise<void> | null;
254
254
  protected _deployments: DeploymentResource;
255
- protected _aliases: AliasResource;
255
+ protected _domains: DomainResource;
256
256
  protected _account: AccountResource;
257
257
  protected _tokens: TokenResource;
258
258
  constructor(options?: ShipClientOptions);
@@ -280,9 +280,9 @@ declare abstract class Ship$1 {
280
280
  */
281
281
  get deployments(): DeploymentResource;
282
282
  /**
283
- * Get aliases resource
283
+ * Get domains resource
284
284
  */
285
- get aliases(): AliasResource;
285
+ get domains(): DomainResource;
286
286
  /**
287
287
  * Get account resource
288
288
  */
@@ -506,4 +506,4 @@ declare class Ship extends Ship$1 {
506
506
  protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
507
507
  }
508
508
 
509
- export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, type ProgressStats, Ship, type ShipClientOptions, type ShipEvents, __setTestEnvironment, calculateMD5, createAccountResource, createAliasResource, createDeploymentResource, createTokenResource, Ship as default, filterJunk, getCurrentConfig, getENV, loadConfig, mergeDeployOptions, optimizeDeployPaths, pluralize, processFilesForBrowser, resolveConfig, setConfig as setPlatformConfig };
509
+ export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, type ProgressStats, Ship, type ShipClientOptions, type ShipEvents, __setTestEnvironment, calculateMD5, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, filterJunk, getCurrentConfig, getENV, loadConfig, mergeDeployOptions, optimizeDeployPaths, pluralize, processFilesForBrowser, resolveConfig, setConfig as setPlatformConfig };