@shipstatic/ship 0.4.6 → 0.4.8
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 +7 -0
- package/dist/browser.d.ts +19 -1
- package/dist/browser.js +13 -13
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +18 -18
- 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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -161,6 +161,13 @@ ship.domains.set('staging', { tags: ['prod', 'v2'] });
|
|
|
161
161
|
ship.domains.set('staging', {}); // throws validation error
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
**Domain format:** Domain names are FQDNs (Fully Qualified Domain Names). The SDK accepts any format (case-insensitive, Unicode) - the API handles normalization.
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
ship.domains.set('Example.COM', { deployment: 'abc' }); // → normalized to 'example.com'
|
|
168
|
+
ship.domains.set('münchen.de', { deployment: 'abc' }); // → Unicode supported
|
|
169
|
+
```
|
|
170
|
+
|
|
164
171
|
### Events
|
|
165
172
|
|
|
166
173
|
```javascript
|
package/dist/browser.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ interface ShipClientOptions {
|
|
|
104
104
|
* Event map for Ship SDK events
|
|
105
105
|
* Core events for observability: request, response, error
|
|
106
106
|
*/
|
|
107
|
-
interface ShipEvents
|
|
107
|
+
interface ShipEvents {
|
|
108
108
|
/** Emitted before each API request */
|
|
109
109
|
request: [url: string, init: RequestInit];
|
|
110
110
|
/** Emitted after successful API response */
|
|
@@ -264,9 +264,25 @@ interface DeploymentResourceContext extends ResourceContext {
|
|
|
264
264
|
clientDefaults?: ShipClientOptions;
|
|
265
265
|
hasAuth?: () => boolean;
|
|
266
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Create deployment resource with all CRUD operations.
|
|
269
|
+
*/
|
|
267
270
|
declare function createDeploymentResource(ctx: DeploymentResourceContext): DeploymentResource;
|
|
271
|
+
/**
|
|
272
|
+
* Create domain resource with all CRUD operations.
|
|
273
|
+
*
|
|
274
|
+
* @remarks
|
|
275
|
+
* The `name` parameter in all methods is an FQDN (Fully Qualified Domain Name).
|
|
276
|
+
* The SDK does not validate or normalize domain names - the API handles all domain semantics.
|
|
277
|
+
*/
|
|
268
278
|
declare function createDomainResource(ctx: ResourceContext): DomainResource;
|
|
279
|
+
/**
|
|
280
|
+
* Create account resource (whoami functionality).
|
|
281
|
+
*/
|
|
269
282
|
declare function createAccountResource(ctx: ResourceContext): AccountResource;
|
|
283
|
+
/**
|
|
284
|
+
* Create token resource for managing deploy tokens.
|
|
285
|
+
*/
|
|
270
286
|
declare function createTokenResource(ctx: ResourceContext): TokenResource;
|
|
271
287
|
|
|
272
288
|
/**
|
|
@@ -628,6 +644,8 @@ declare class Ship extends Ship$1 {
|
|
|
628
644
|
protected resolveInitialConfig(options: ShipClientOptions): ResolvedConfig;
|
|
629
645
|
protected loadFullConfig(): Promise<void>;
|
|
630
646
|
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
647
|
+
/** Type guard that validates all elements are File objects */
|
|
648
|
+
private isFileArray;
|
|
631
649
|
protected getDeployBodyCreator(): DeployBodyCreator;
|
|
632
650
|
}
|
|
633
651
|
|