@shipstatic/ship 0.3.10 → 0.3.12
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 +4 -29
- package/dist/browser.js +3 -3
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +12 -12
- 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 +4 -29
- package/dist/index.d.ts +4 -29
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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, Domain, DomainListResponse, Account, TokenCreateResponse, TokenListResponse,
|
|
2
|
+
import { PingResponse, ConfigResponse, StaticFile, Deployment, DeploymentListResponse, Domain, DomainListResponse, Account, TokenCreateResponse, TokenListResponse, DeployInput, DeploymentResource, DomainResource, AccountResource, TokenResource, PlatformConfig, ValidatableFile, FileValidationResult } from '@shipstatic/types';
|
|
3
3
|
export * from '@shipstatic/types';
|
|
4
|
-
export { Account, DEFAULT_API, DeployInput, Deployment, Domain, FileValidationStatus as FILE_VALIDATION_STATUS, PingResponse, ShipError, ShipErrorType } from '@shipstatic/types';
|
|
4
|
+
export { Account, AccountResource, DEFAULT_API, DeployInput, Deployment, DeploymentResource, Domain, DomainResource, FileValidationStatus as FILE_VALIDATION_STATUS, PingResponse, ShipError, ShipErrorType, StaticFile, TokenResource } from '@shipstatic/types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @file SDK-specific type definitions
|
|
@@ -201,7 +201,7 @@ 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
|
-
setDomain(name: string, deployment
|
|
204
|
+
setDomain(name: string, deployment?: string, tags?: string[]): Promise<Domain>;
|
|
205
205
|
getDomain(name: string): Promise<Domain>;
|
|
206
206
|
listDomains(): Promise<DomainListResponse>;
|
|
207
207
|
removeDomain(name: string): Promise<void>;
|
|
@@ -224,21 +224,6 @@ declare class ApiHttp extends SimpleEvents {
|
|
|
224
224
|
createToken(ttl?: number, tags?: string[]): Promise<TokenCreateResponse>;
|
|
225
225
|
listTokens(): Promise<TokenListResponse>;
|
|
226
226
|
removeToken(token: string): Promise<void>;
|
|
227
|
-
/**
|
|
228
|
-
* Create a Creem checkout session for subscription
|
|
229
|
-
* POST /subscriptions/checkout
|
|
230
|
-
*/
|
|
231
|
-
createCheckout(): Promise<CheckoutSession>;
|
|
232
|
-
/**
|
|
233
|
-
* Get current subscription status and usage
|
|
234
|
-
* GET /subscriptions/status
|
|
235
|
-
*/
|
|
236
|
-
getSubscriptionStatus(): Promise<SubscriptionStatus>;
|
|
237
|
-
/**
|
|
238
|
-
* IMPOSSIBLE SIMPLICITY: No sync endpoint needed!
|
|
239
|
-
* Webhooks are the single source of truth.
|
|
240
|
-
* Frontend just polls getSubscriptionStatus() after checkout redirect.
|
|
241
|
-
*/
|
|
242
227
|
checkSPA(files: StaticFile[]): Promise<boolean>;
|
|
243
228
|
private validateFiles;
|
|
244
229
|
private prepareRequestPayload;
|
|
@@ -255,11 +240,6 @@ declare function createDeploymentResource(getApi: () => ApiHttp, clientDefaults?
|
|
|
255
240
|
declare function createDomainResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): DomainResource;
|
|
256
241
|
declare function createAccountResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): AccountResource;
|
|
257
242
|
declare function createTokenResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): TokenResource;
|
|
258
|
-
/**
|
|
259
|
-
* IMPOSSIBLE SIMPLICITY: No sync() method needed!
|
|
260
|
-
* Webhooks are the single source of truth. Frontend just polls status().
|
|
261
|
-
*/
|
|
262
|
-
declare function createSubscriptionResource(getApi: () => ApiHttp, ensureInit?: () => Promise<void>): SubscriptionResource;
|
|
263
243
|
|
|
264
244
|
/**
|
|
265
245
|
* Abstract base class for Ship SDK implementations.
|
|
@@ -278,7 +258,6 @@ declare abstract class Ship$1 {
|
|
|
278
258
|
protected _domains: DomainResource;
|
|
279
259
|
protected _account: AccountResource;
|
|
280
260
|
protected _tokens: TokenResource;
|
|
281
|
-
protected _subscriptions: SubscriptionResource;
|
|
282
261
|
constructor(options?: ShipClientOptions);
|
|
283
262
|
protected abstract resolveInitialConfig(options: ShipClientOptions): any;
|
|
284
263
|
protected abstract loadFullConfig(): Promise<void>;
|
|
@@ -315,10 +294,6 @@ declare abstract class Ship$1 {
|
|
|
315
294
|
* Get tokens resource
|
|
316
295
|
*/
|
|
317
296
|
get tokens(): TokenResource;
|
|
318
|
-
/**
|
|
319
|
-
* Get subscriptions resource
|
|
320
|
-
*/
|
|
321
|
-
get subscriptions(): SubscriptionResource;
|
|
322
297
|
/**
|
|
323
298
|
* Get API configuration (file upload limits, etc.)
|
|
324
299
|
* Reuses platform config fetched during initialization, then caches the result
|
|
@@ -638,4 +613,4 @@ declare class Ship extends Ship$1 {
|
|
|
638
613
|
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
639
614
|
}
|
|
640
615
|
|
|
641
|
-
export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, type ProgressInfo, Ship, type ShipClientOptions, type ShipEvents, __setTestEnvironment, allValidFilesReady, calculateMD5, createAccountResource, createDeploymentResource, createDomainResource,
|
|
616
|
+
export { type ApiDeployOptions, ApiHttp, type Config, type DeployFile, type DeploymentOptions, type ExecutionEnvironment, JUNK_DIRECTORIES, type MD5Result, type ProgressInfo, 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 };
|