@shipstatic/ship 0.4.25 → 0.5.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/README.md CHANGED
@@ -18,26 +18,26 @@ npm install @shipstatic/ship
18
18
  # Deploy a directory
19
19
  ship ./dist
20
20
 
21
- # Deploy with tags
22
- ship ./dist --tag production --tag v1.0.0
21
+ # Deploy with labels
22
+ ship ./dist --label production --label v1.0.0
23
23
 
24
24
  # Deployments
25
25
  ship deployments list
26
26
  ship deployments get <id>
27
- ship deployments set <id> --tag production # Update tags
27
+ ship deployments set <id> --label production # Update labels
28
28
  ship deployments remove <id>
29
29
 
30
30
  # Domains
31
31
  ship domains list
32
- ship domains set staging <deployment-id> # Point domain to deployment
33
- ship domains set staging --tag production # Update domain tags
32
+ ship domains set staging <deployment-id> # Link domain to deployment
33
+ ship domains set staging --label production # Update domain labels
34
34
  ship domains get staging
35
35
  ship domains verify www.example.com
36
36
  ship domains remove staging
37
37
 
38
38
  # Tokens
39
39
  ship tokens list
40
- ship tokens create --ttl 3600 --tag ci
40
+ ship tokens create --ttl 3600 --label ci
41
41
  ship tokens remove <token>
42
42
 
43
43
  # Account
@@ -64,9 +64,9 @@ console.log(`Deployed: ${result.url}`);
64
64
  await ship.domains.set('staging', { deployment: result.deployment });
65
65
  await ship.domains.list();
66
66
 
67
- // Update tags
68
- await ship.deployments.set(result.deployment, { tags: ['production', 'v1.0'] });
69
- await ship.domains.set('staging', { tags: ['live'] });
67
+ // Update labels
68
+ await ship.deployments.set(result.deployment, { labels: ['production', 'v1.0'] });
69
+ await ship.domains.set('staging', { labels: ['live'] });
70
70
  ```
71
71
 
72
72
  ## Browser Usage
@@ -123,18 +123,18 @@ SHIP_API_KEY=ship-your-api-key
123
123
  ship.deployments.create(input, options?) // Create new deployment
124
124
  ship.deployments.list() // List all deployments
125
125
  ship.deployments.get(id) // Get deployment details
126
- ship.deployments.set(id, { tags }) // Update deployment tags
126
+ ship.deployments.set(id, { labels }) // Update deployment labels
127
127
  ship.deployments.remove(id) // Delete deployment
128
128
 
129
129
  // Domains
130
- ship.domains.set(name, { deployment?, tags? }) // Create/update domain (see below)
130
+ ship.domains.set(name, { deployment?, labels? }) // Create/update domain (see below)
131
131
  ship.domains.get(name) // Get domain details
132
132
  ship.domains.list() // List all domains
133
133
  ship.domains.remove(name) // Delete domain
134
134
  ship.domains.verify(name) // Trigger DNS verification
135
135
 
136
136
  // Tokens
137
- ship.tokens.create({ ttl?, tags? }) // Create deploy token
137
+ ship.tokens.create({ ttl?, labels? }) // Create deploy token
138
138
  ship.tokens.list() // List all tokens
139
139
  ship.tokens.remove(token) // Revoke token
140
140
 
@@ -148,17 +148,14 @@ ship.ping() // Check API connectivity
148
148
  ### domains.set() Behavior
149
149
 
150
150
  ```typescript
151
- // Point domain to deployment
151
+ // Link domain to deployment
152
152
  ship.domains.set('staging', { deployment: 'abc123' });
153
153
 
154
- // Point domain to deployment with tags
155
- ship.domains.set('staging', { deployment: 'abc123', tags: ['prod'] });
154
+ // Link domain to deployment with labels
155
+ ship.domains.set('staging', { deployment: 'abc123', labels: ['prod'] });
156
156
 
157
- // Update tags only (domain must exist)
158
- ship.domains.set('staging', { tags: ['prod', 'v2'] });
159
-
160
- // Error: must provide deployment or tags
161
- ship.domains.set('staging', {}); // throws validation error
157
+ // Update labels only (domain must exist)
158
+ ship.domains.set('staging', { labels: ['prod', 'v2'] });
162
159
  ```
163
160
 
164
161
  **Domain format:** Domain names are FQDNs (Fully Qualified Domain Names). The SDK accepts any format (case-insensitive, Unicode) - the API handles normalization.
package/dist/browser.d.ts CHANGED
@@ -33,8 +33,8 @@ interface DeploymentOptions {
33
33
  pathDetect?: boolean;
34
34
  /** Whether to auto-detect SPAs and generate ship.json configuration. Defaults to true. */
35
35
  spaDetect?: boolean;
36
- /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators). */
37
- tags?: string[];
36
+ /** Optional array of labels for categorization and filtering (lowercase, alphanumeric with separators). */
37
+ labels?: string[];
38
38
  /** Callback for deploy progress with detailed statistics. */
39
39
  onProgress?: (info: ProgressInfo) => void;
40
40
  /** Client/tool identifier for this deployment (e.g., 'sdk', 'cli', 'web'). Alphanumeric only. */
@@ -55,7 +55,7 @@ interface DeployBody {
55
55
  * Function that creates a deploy request body from files.
56
56
  * Implemented differently for Node.js and Browser.
57
57
  */
58
- type DeployBodyCreator = (files: StaticFile[], tags?: string[], via?: string) => Promise<DeployBody>;
58
+ type DeployBodyCreator = (files: StaticFile[], labels?: string[], via?: string) => Promise<DeployBody>;
59
59
  /**
60
60
  * Options for configuring a `Ship` instance.
61
61
  * Sets default API host, authentication credentials, progress callbacks, concurrency, and timeouts for the client.
@@ -192,12 +192,12 @@ declare class ApiHttp extends SimpleEvents {
192
192
  deploy(files: StaticFile[], options?: ApiDeployOptions): Promise<Deployment>;
193
193
  listDeployments(): Promise<DeploymentListResponse>;
194
194
  getDeployment(id: string): Promise<Deployment>;
195
- updateDeploymentTags(id: string, tags: string[]): Promise<Deployment>;
195
+ updateDeploymentLabels(id: string, labels: string[]): Promise<Deployment>;
196
196
  removeDeployment(id: string): Promise<void>;
197
- setDomain(name: string, deployment?: string, tags?: string[]): Promise<Domain>;
197
+ setDomain(name: string, deployment?: string, labels?: string[]): Promise<Domain>;
198
198
  listDomains(): Promise<DomainListResponse>;
199
199
  getDomain(name: string): Promise<Domain>;
200
- updateDomainTags(name: string, tags: string[]): Promise<Domain>;
200
+ updateDomainLabels(name: string, labels: string[]): Promise<Domain>;
201
201
  removeDomain(name: string): Promise<void>;
202
202
  verifyDomain(name: string): Promise<{
203
203
  message: string;
@@ -209,7 +209,7 @@ declare class ApiHttp extends SimpleEvents {
209
209
  hash: string;
210
210
  }>;
211
211
  validateDomain(name: string): Promise<DomainValidateResponse>;
212
- createToken(ttl?: number, tags?: string[]): Promise<TokenCreateResponse>;
212
+ createToken(ttl?: number, labels?: string[]): Promise<TokenCreateResponse>;
213
213
  listTokens(): Promise<TokenListResponse>;
214
214
  removeToken(token: string): Promise<void>;
215
215
  getAccount(): Promise<Account>;