@shipstatic/ship 3.4.0-beta.1 → 3.4.0-beta.10
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 +3 -2
- package/SKILL.md +1 -1
- package/THIRD-PARTY-LICENSES.md +1 -1
- package/dist/browser.d.ts +113 -57
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +40 -40
- 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 +114 -57
- package/dist/index.d.ts +114 -57
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -724,7 +724,7 @@ type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
724
724
|
* than the 403 uses.
|
|
725
725
|
*
|
|
726
726
|
* All three are counts plans SELL, and every plan publishes a number for each.
|
|
727
|
-
* A platform
|
|
727
|
+
* A platform domain (`my-app.shipstatic.com`) is among them: the namespace
|
|
728
728
|
* is the platform's, so every plan bounds how many names one account may take
|
|
729
729
|
* from it — which is not the address every deployment gets by construction
|
|
730
730
|
* (`happy-cat-abc1234.shipstatic.com`), one per deployment and bounded by
|
|
@@ -734,8 +734,9 @@ type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
734
734
|
* "unlimited" — so no consumer needs an "is it bounded?" branch. A cap of `0`
|
|
735
735
|
* means the plan does not have the feature at all; a cap of `N` bounds
|
|
736
736
|
* creation, and what an account already holds above a cap stays until a plan
|
|
737
|
-
* TRANSITION fits it
|
|
738
|
-
*
|
|
737
|
+
* TRANSITION fits it: excess domains are paused, newest first, and members
|
|
738
|
+
* are paused together while the account holds more than its cap. Deployments
|
|
739
|
+
* never pause; above their cap they only block creation.
|
|
739
740
|
*
|
|
740
741
|
* A count is an aggregate over a collection, so it lives on the summary
|
|
741
742
|
* resource that owns the collection: `GET /account` for one caller, `GET
|
|
@@ -1266,11 +1267,12 @@ interface ErrorResponse {
|
|
|
1266
1267
|
/**
|
|
1267
1268
|
* `details` of an `ErrorType.Build` error: the evidence behind the verdict.
|
|
1268
1269
|
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
* as
|
|
1270
|
+
* Named, like {@link PlanChangeRefusalDetails}, because a surface reads it:
|
|
1271
|
+
* `ErrorResponse.details` stays `unknown`, and a shape a client narrows to is
|
|
1272
|
+
* owned here rather than restated at its read site. The sentence in
|
|
1273
|
+
* `message` says what went wrong; the log is how the person fixing the
|
|
1274
|
+
* project sees where. A surface that builds shows both, the log as a block
|
|
1275
|
+
* rather than as prose.
|
|
1274
1276
|
*/
|
|
1275
1277
|
interface BuildFailureDetails {
|
|
1276
1278
|
/**
|
|
@@ -1476,7 +1478,27 @@ interface PlatformLimits {
|
|
|
1476
1478
|
* retire with it (tracked in root `backlog.md`).
|
|
1477
1479
|
*/
|
|
1478
1480
|
readonly blockedExtensions?: readonly string[];
|
|
1481
|
+
/**
|
|
1482
|
+
* The way forward past each limit, in the API's own words, for the account
|
|
1483
|
+
* that asked: `"Upgrade to Pro for more."` where a sold plan allows more,
|
|
1484
|
+
* `"Please contact support if you need more."` where none does. The API
|
|
1485
|
+
* writes it with the same function its own refusals use, so a client that
|
|
1486
|
+
* refuses a file before uploading it appends this sentence to its refusal
|
|
1487
|
+
* verbatim and says exactly what the server would have said. Which plans
|
|
1488
|
+
* exist, which are sold and what an account's grant raises are the server's
|
|
1489
|
+
* to know; a client never learns a plan name from this field, only a
|
|
1490
|
+
* sentence. An anonymous caller is answered the free plan's sentence, as it
|
|
1491
|
+
* is the free plan's numbers.
|
|
1492
|
+
*
|
|
1493
|
+
* **Optional, and the absence is load-bearing**, as `blockedExtensions`
|
|
1494
|
+
* above: an API deployed before this field existed sends nothing, and a
|
|
1495
|
+
* client then appends nothing. It hardens to required at the entity's next
|
|
1496
|
+
* natural break, with the blocklist.
|
|
1497
|
+
*/
|
|
1498
|
+
readonly suggestions?: Readonly<Record<PlatformLimitKey, string>>;
|
|
1479
1499
|
}
|
|
1500
|
+
/** The three request limits, named as `PlatformLimits` names them. */
|
|
1501
|
+
type PlatformLimitKey = 'maxFileSize' | 'maxFilesCount' | 'maxTotalSize';
|
|
1480
1502
|
/**
|
|
1481
1503
|
* Whether a file is one the platform refuses to host.
|
|
1482
1504
|
*
|
|
@@ -2014,10 +2036,12 @@ interface StaticFile {
|
|
|
2014
2036
|
* console: under `/<account>/` and at the root.
|
|
2015
2037
|
*
|
|
2016
2038
|
* `owner` marks a section that means the person's OWN account: a bare path
|
|
2017
|
-
* into it opens the person's own account rather than the one entered last
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
* owner
|
|
2039
|
+
* into it opens the person's own account rather than the one entered last.
|
|
2040
|
+
* A pricing link's `/upgrade/pro` and the published API-key link speak about
|
|
2041
|
+
* the reader's plan and key, and `/success` is where a purchase lands: only
|
|
2042
|
+
* an owner buys, and a person owns exactly one account. Modals inside a
|
|
2043
|
+
* section carry their own owner rule in the console; this flag is the
|
|
2044
|
+
* section's alone.
|
|
2021
2045
|
*/
|
|
2022
2046
|
declare const SECTIONS: {
|
|
2023
2047
|
readonly new: {
|
|
@@ -2036,7 +2060,7 @@ declare const SECTIONS: {
|
|
|
2036
2060
|
readonly owner: true;
|
|
2037
2061
|
};
|
|
2038
2062
|
readonly success: {
|
|
2039
|
-
readonly owner:
|
|
2063
|
+
readonly owner: true;
|
|
2040
2064
|
};
|
|
2041
2065
|
readonly 'api-key': {
|
|
2042
2066
|
readonly owner: true;
|
|
@@ -2484,11 +2508,29 @@ interface PlansResponse {
|
|
|
2484
2508
|
* consent), and a billed account moving down gets a Stripe Subscription
|
|
2485
2509
|
* Schedule that applies the change at period end. The answer says which
|
|
2486
2510
|
* happened ({@link PlanChangeResponse}).
|
|
2511
|
+
*
|
|
2512
|
+
* A move down a tier is booked only by an account that fits it: until it
|
|
2513
|
+
* does, the door refuses (400) with a sentence naming what to remove, and
|
|
2514
|
+
* the same counts as {@link PlanChangeRefusalDetails}.
|
|
2487
2515
|
*/
|
|
2488
2516
|
interface PlanChangeRequest {
|
|
2489
2517
|
readonly plan: AccountPlanType;
|
|
2490
2518
|
readonly interval: BillingInterval;
|
|
2491
2519
|
}
|
|
2520
|
+
/**
|
|
2521
|
+
* `details` of the change door's refusal of a move down a tier the account
|
|
2522
|
+
* does not fit: the account holds more members, custom domains or platform
|
|
2523
|
+
* domains than the destination allows.
|
|
2524
|
+
*
|
|
2525
|
+
* `excess` counts what to REMOVE before asking again, per kind, keyed like
|
|
2526
|
+
* {@link Caps}; only the kinds over the destination's caps appear. The
|
|
2527
|
+
* door's `message` names the same counts in a sentence, and that sentence is
|
|
2528
|
+
* what a surface shows; the counts are for a client that acts on the
|
|
2529
|
+
* refusal.
|
|
2530
|
+
*/
|
|
2531
|
+
interface PlanChangeRefusalDetails {
|
|
2532
|
+
readonly excess: Partial<Caps>;
|
|
2533
|
+
}
|
|
2492
2534
|
/**
|
|
2493
2535
|
* The pending plan change — a Stripe Subscription Schedule, mirrored onto the
|
|
2494
2536
|
* account. `at` is when it applies (the current period's end, Unix seconds).
|
|
@@ -2755,7 +2797,7 @@ interface UploadedFile {
|
|
|
2755
2797
|
*/
|
|
2756
2798
|
declare function isPlatformDomain(domain: string, platformDomain: string): boolean;
|
|
2757
2799
|
/**
|
|
2758
|
-
* Check if a domain is a custom domain (not a platform
|
|
2800
|
+
* Check if a domain is a custom domain (not a platform domain).
|
|
2759
2801
|
* Custom domains are billable and require DNS verification.
|
|
2760
2802
|
*
|
|
2761
2803
|
* @example isCustomDomain("example.com", "shipstatic.com") → true
|
|
@@ -2901,8 +2943,11 @@ declare function validatePassword(value: unknown): string | undefined;
|
|
|
2901
2943
|
interface DeploymentOptions extends DeploymentUploadOptions {
|
|
2902
2944
|
/**
|
|
2903
2945
|
* An AbortSignal to allow cancellation of the deploy operation. The one
|
|
2904
|
-
* cancellation mechanism
|
|
2905
|
-
*
|
|
2946
|
+
* cancellation mechanism: it reaches every request the deploy makes (the
|
|
2947
|
+
* limits it validates against, the SPA question and the upload itself),
|
|
2948
|
+
* and aborting it rejects the deploy with a typed `Cancelled` error
|
|
2949
|
+
* wherever it stands. A deploy the server had already committed stays
|
|
2950
|
+
* committed. Request timeouts are a client concern
|
|
2906
2951
|
* (`ShipClientOptions.timeout`), not a per-deploy one.
|
|
2907
2952
|
*/
|
|
2908
2953
|
signal?: AbortSignal;
|
|
@@ -3366,17 +3411,9 @@ declare abstract class Ship$1 {
|
|
|
3366
3411
|
readonly tokens: TokenResource;
|
|
3367
3412
|
private readonly http;
|
|
3368
3413
|
private readonly clientOptions;
|
|
3369
|
-
private initPromise;
|
|
3370
|
-
protected platformLimits: PlatformLimits | null;
|
|
3371
3414
|
private credential;
|
|
3372
3415
|
constructor(options?: ShipClientOptions);
|
|
3373
|
-
protected abstract processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
3374
|
-
/**
|
|
3375
|
-
* Lazy initialization — fetches platform limits (file size / count caps) once,
|
|
3376
|
-
* on the first API call. Subsequent calls reuse the resolved promise.
|
|
3377
|
-
*/
|
|
3378
|
-
protected ensureInitialized(): Promise<void>;
|
|
3379
|
-
private fetchPlatformLimits;
|
|
3416
|
+
protected abstract processInput(input: DeployInput, options: DeploymentOptions, limits: PlatformLimits): Promise<StaticFile[]>;
|
|
3380
3417
|
/**
|
|
3381
3418
|
* Ping the API server, resolving its answer: `{ success, timestamp }`, where
|
|
3382
3419
|
* `timestamp` is the server clock in unix SECONDS.
|
|
@@ -3397,11 +3434,14 @@ declare abstract class Ship$1 {
|
|
|
3397
3434
|
*/
|
|
3398
3435
|
whoami(): Promise<Account>;
|
|
3399
3436
|
/**
|
|
3400
|
-
* Get platform limits (max file size, file count,
|
|
3401
|
-
*
|
|
3402
|
-
*
|
|
3437
|
+
* Get the platform limits the server states now (max file size, file count,
|
|
3438
|
+
* total size, and the blocked extensions). Asked every time and never held,
|
|
3439
|
+
* since a plan move or an operator's grant changes them. A `signal` aborts
|
|
3440
|
+
* the request, rejecting with the typed `Cancelled` error.
|
|
3403
3441
|
*/
|
|
3404
|
-
getLimits(
|
|
3442
|
+
getLimits(options?: {
|
|
3443
|
+
signal?: AbortSignal;
|
|
3444
|
+
}): Promise<PlatformLimits>;
|
|
3405
3445
|
on<K extends keyof ShipEvents>(event: K, handler: (...args: ShipEvents[K]) => void): void;
|
|
3406
3446
|
off<K extends keyof ShipEvents>(event: K, handler: (...args: ShipEvents[K]) => void): void;
|
|
3407
3447
|
/**
|
|
@@ -3508,6 +3548,9 @@ declare function getENV(): ExecutionEnvironment;
|
|
|
3508
3548
|
* Everything else is allowed — browser percent-encodes, Worker decodes, R2 matches.
|
|
3509
3549
|
*
|
|
3510
3550
|
* Additional checks: path traversal, reserved names, leading/trailing dots or spaces.
|
|
3551
|
+
*
|
|
3552
|
+
* The reason is a complete sentence naming the file, so every surface shows it
|
|
3553
|
+
* as it is (`file-rules.ts` on why).
|
|
3511
3554
|
*/
|
|
3512
3555
|
declare function validateFileName(filename: string): {
|
|
3513
3556
|
valid: boolean;
|
|
@@ -3636,35 +3679,40 @@ declare function calculateMD5(input: Blob | Buffer | string): Promise<MD5Result>
|
|
|
3636
3679
|
* @file One ordered table of deploy-file rules, and the single evaluation two
|
|
3637
3680
|
* renderers share.
|
|
3638
3681
|
*
|
|
3639
|
-
* **The defect this closes:** one rule was rendering as three sentences. A
|
|
3640
|
-
* file over the size cap said `File x is too large. Maximum allowed size is
|
|
3641
|
-
* 20MB.` from the deploy pipelines, `File size (21 MB) exceeds limit of 20 MB`
|
|
3642
|
-
* from `validateFiles`, and `File too large. Maximum 20971520 bytes allowed`
|
|
3643
|
-
* from the API — against the dual-validation doctrine that an error reads the
|
|
3644
|
-
* same wherever it was caught (root `CLAUDE.md`). Both pipelines also restated
|
|
3645
|
-
* the whole ordered check, so node/browser parity was a comment.
|
|
3646
|
-
*
|
|
3647
3682
|
* **A rule states a predicate and a sentence; a renderer chooses only how to
|
|
3648
3683
|
* DELIVER it.** That is the `SHAPES`-table move (`cli/formatters.ts`) applied
|
|
3649
3684
|
* to validation: the throwing renderer raises the first broken rule, the
|
|
3650
3685
|
* collecting renderer records it, and neither authors prose. Adding a rule is
|
|
3651
|
-
* a row, and both surfaces get it in the same position by construction.
|
|
3652
|
-
*
|
|
3653
|
-
*
|
|
3654
|
-
*
|
|
3655
|
-
*
|
|
3656
|
-
*
|
|
3657
|
-
*
|
|
3658
|
-
*
|
|
3659
|
-
*
|
|
3660
|
-
*
|
|
3661
|
-
*
|
|
3662
|
-
*
|
|
3686
|
+
* a row, and both surfaces get it in the same position by construction. One
|
|
3687
|
+
* table is also what keeps a rule from reading three ways: the deploy
|
|
3688
|
+
* pipelines, `validateFiles` and the API once each worded the size cap
|
|
3689
|
+
* differently, against the dual-validation doctrine that an error reads the
|
|
3690
|
+
* same wherever it is caught (root `CLAUDE.md`).
|
|
3691
|
+
*
|
|
3692
|
+
* **Every sentence is complete on its own.** The SDK is where a refusal is
|
|
3693
|
+
* worded; drop, the console, the CLI and the MCPs show the sentence verbatim
|
|
3694
|
+
* and add nothing, so a sentence names its file exactly once and states the
|
|
3695
|
+
* limit, and reads without a prefix. The family is subject first: `File
|
|
3696
|
+
* "<path>" <verdict>. Maximum <limit> allowed.`, and `File name "<path>" …`
|
|
3697
|
+
* where the name is the subject. The two rules about the SET, the count and
|
|
3698
|
+
* the total, name no path. A limit's sentence ends with the suggestion the
|
|
3699
|
+
* API delivered for it (`withSuggestion`), so the whole reads `File "x" is
|
|
3700
|
+
* too large. Maximum 20 MB allowed. Upgrade to Pro for more.`
|
|
3701
|
+
*
|
|
3702
|
+
* **The API words the same rules the same way, in the same order**
|
|
3703
|
+
* (`cloudflare/api/src/lib/validation.ts`), so a refusal reads alike whether
|
|
3704
|
+
* the SDK made it before uploading or the boundary made it after. Sizes are
|
|
3705
|
+
* formatted on both sides, and the path is named on both. That is a
|
|
3706
|
+
* restatement, and it is fenced from the API's side: a test there imports
|
|
3707
|
+
* this package's `validateFiles` and compares every shared rule's sentence to
|
|
3708
|
+
* `validateUpload`'s. The fence dies the day the table is promoted to
|
|
3709
|
+
* `@shipstatic/types` and the API imports it (Phase B, `CLAUDE.md`).
|
|
3663
3710
|
*
|
|
3664
3711
|
* Out of scope, and left where they are: `validateDeployPath` (a rule about
|
|
3665
3712
|
* the deploy PATH rather than the file, and pipelines-only), and
|
|
3666
|
-
* `validateFiles`' UI-tier pre-checks
|
|
3667
|
-
*
|
|
3713
|
+
* `validateFiles`' UI-tier pre-checks (empty, negative, unbuilt marker,
|
|
3714
|
+
* processing error), which have one holder each and no drift, and word their
|
|
3715
|
+
* sentences by the same family.
|
|
3668
3716
|
*/
|
|
3669
3717
|
|
|
3670
3718
|
/** What a rule is asked about: one file, and the deploy so far. */
|
|
@@ -3716,6 +3764,15 @@ declare function validateDeployPath(deployPath: string, sourceIdentifier: string
|
|
|
3716
3764
|
* @throws {ShipError} The first broken rule's sentence
|
|
3717
3765
|
*/
|
|
3718
3766
|
declare function validateDeployFile(input: FileRuleInput, limits: PlatformLimits): void;
|
|
3767
|
+
/**
|
|
3768
|
+
* The throwing renderer of `COUNT_RULE`: the deploy's file count, judged over
|
|
3769
|
+
* the files the pipeline will send.
|
|
3770
|
+
*
|
|
3771
|
+
* @param count - How many files the deploy carries
|
|
3772
|
+
* @param limits - The platform's limits, from `/limits`
|
|
3773
|
+
* @throws {ShipError} The count rule's sentence
|
|
3774
|
+
*/
|
|
3775
|
+
declare function validateDeployCount(count: number, limits: PlatformLimits): void;
|
|
3719
3776
|
|
|
3720
3777
|
/**
|
|
3721
3778
|
* Utility functions for string manipulation.
|
|
@@ -3747,10 +3804,10 @@ declare function pluralize(count: number, singular: string, plural: string, incl
|
|
|
3747
3804
|
*
|
|
3748
3805
|
* @param paths - File or directory paths to scan and process.
|
|
3749
3806
|
* @param options - Processing options (pathDetect, etc.).
|
|
3750
|
-
* @param platformLimits -
|
|
3751
|
-
* total-size caps
|
|
3752
|
-
*
|
|
3753
|
-
*
|
|
3807
|
+
* @param platformLimits - The platform limits (file-size / count /
|
|
3808
|
+
* total-size caps and the blocked extensions) the deploy read from
|
|
3809
|
+
* `GET /limits` at its start. Passed in, never held, so a validation always
|
|
3810
|
+
* meets the limits the server states now.
|
|
3754
3811
|
* @returns Promise resolving to an array of StaticFile objects.
|
|
3755
3812
|
* @throws {ShipError} If called outside Node.js or if fs/path modules fail.
|
|
3756
3813
|
*/
|
|
@@ -3801,10 +3858,10 @@ declare class Ship extends Ship$1 {
|
|
|
3801
3858
|
* contract stays platform-neutral.
|
|
3802
3859
|
*/
|
|
3803
3860
|
deploy(input: string | string[], options?: DeploymentOptions): Promise<DeploymentCreateResponse>;
|
|
3804
|
-
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
3861
|
+
protected processInput(input: DeployInput, options: DeploymentOptions, limits: PlatformLimits): Promise<StaticFile[]>;
|
|
3805
3862
|
}
|
|
3806
3863
|
|
|
3807
3864
|
declare namespace Ship {
|
|
3808
|
-
export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountAccess, AccountDeleteResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountRefusal, AccountRefusalType, AccountResource, AccountRole, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BUILD_SETTINGS, BillingInterval, BillingPortalSession, BillingSyncResponse, BuildFailureDetails, CALLER, Caps, ConsoleErrand, ConsolePaths, ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, DeployBodyContext, DeployFile, DeployFileEncoding, DeployFileSpec, DeployInput, DeployTransport, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DeploymentVia, DeploymentViaType, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerification, DomainVerificationType, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, PingResponse, Plan, PlanChangeRequest, PlanChangeResponse, PlanDestination, PlansResponse, PlatformLimits, RequestResult, ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SIGN_IN_RETURN_PARAM, SPACheckDebug, SPACheckRequest, SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, ScheduledChange, SettingsFragment, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, ShipRequestInit, StaticFile, TTL_CONSTRAINTS, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USER_VISIBLE_EVENTS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, doors, errandOf, extractSubdomain, filterJunk, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isInvitationPath, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
|
|
3865
|
+
export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountAccess, AccountDeleteResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountRefusal, AccountRefusalType, AccountResource, AccountRole, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BUILD_SETTINGS, BillingInterval, BillingPortalSession, BillingSyncResponse, BuildFailureDetails, CALLER, Caps, ConsoleErrand, ConsolePaths, ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, DeployBodyContext, DeployFile, DeployFileEncoding, DeployFileSpec, DeployInput, DeployTransport, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DeploymentVia, DeploymentViaType, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerification, DomainVerificationType, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, PingResponse, Plan, PlanChangeRefusalDetails, PlanChangeRequest, PlanChangeResponse, PlanDestination, PlansResponse, PlatformLimitKey, PlatformLimits, RequestResult, ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SIGN_IN_RETURN_PARAM, SPACheckDebug, SPACheckRequest, SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, ScheduledChange, SettingsFragment, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, ShipRequestInit, StaticFile, TTL_CONSTRAINTS, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USER_VISIBLE_EVENTS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, doors, errandOf, extractSubdomain, filterJunk, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isInvitationPath, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployCount, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
|
|
3809
3866
|
}
|
|
3810
3867
|
export = Ship;
|
package/dist/index.d.ts
CHANGED
|
@@ -724,7 +724,7 @@ type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
724
724
|
* than the 403 uses.
|
|
725
725
|
*
|
|
726
726
|
* All three are counts plans SELL, and every plan publishes a number for each.
|
|
727
|
-
* A platform
|
|
727
|
+
* A platform domain (`my-app.shipstatic.com`) is among them: the namespace
|
|
728
728
|
* is the platform's, so every plan bounds how many names one account may take
|
|
729
729
|
* from it — which is not the address every deployment gets by construction
|
|
730
730
|
* (`happy-cat-abc1234.shipstatic.com`), one per deployment and bounded by
|
|
@@ -734,8 +734,9 @@ type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
734
734
|
* "unlimited" — so no consumer needs an "is it bounded?" branch. A cap of `0`
|
|
735
735
|
* means the plan does not have the feature at all; a cap of `N` bounds
|
|
736
736
|
* creation, and what an account already holds above a cap stays until a plan
|
|
737
|
-
* TRANSITION fits it
|
|
738
|
-
*
|
|
737
|
+
* TRANSITION fits it: excess domains are paused, newest first, and members
|
|
738
|
+
* are paused together while the account holds more than its cap. Deployments
|
|
739
|
+
* never pause; above their cap they only block creation.
|
|
739
740
|
*
|
|
740
741
|
* A count is an aggregate over a collection, so it lives on the summary
|
|
741
742
|
* resource that owns the collection: `GET /account` for one caller, `GET
|
|
@@ -1266,11 +1267,12 @@ interface ErrorResponse {
|
|
|
1266
1267
|
/**
|
|
1267
1268
|
* `details` of an `ErrorType.Build` error: the evidence behind the verdict.
|
|
1268
1269
|
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
* as
|
|
1270
|
+
* Named, like {@link PlanChangeRefusalDetails}, because a surface reads it:
|
|
1271
|
+
* `ErrorResponse.details` stays `unknown`, and a shape a client narrows to is
|
|
1272
|
+
* owned here rather than restated at its read site. The sentence in
|
|
1273
|
+
* `message` says what went wrong; the log is how the person fixing the
|
|
1274
|
+
* project sees where. A surface that builds shows both, the log as a block
|
|
1275
|
+
* rather than as prose.
|
|
1274
1276
|
*/
|
|
1275
1277
|
interface BuildFailureDetails {
|
|
1276
1278
|
/**
|
|
@@ -1476,7 +1478,27 @@ interface PlatformLimits {
|
|
|
1476
1478
|
* retire with it (tracked in root `backlog.md`).
|
|
1477
1479
|
*/
|
|
1478
1480
|
readonly blockedExtensions?: readonly string[];
|
|
1481
|
+
/**
|
|
1482
|
+
* The way forward past each limit, in the API's own words, for the account
|
|
1483
|
+
* that asked: `"Upgrade to Pro for more."` where a sold plan allows more,
|
|
1484
|
+
* `"Please contact support if you need more."` where none does. The API
|
|
1485
|
+
* writes it with the same function its own refusals use, so a client that
|
|
1486
|
+
* refuses a file before uploading it appends this sentence to its refusal
|
|
1487
|
+
* verbatim and says exactly what the server would have said. Which plans
|
|
1488
|
+
* exist, which are sold and what an account's grant raises are the server's
|
|
1489
|
+
* to know; a client never learns a plan name from this field, only a
|
|
1490
|
+
* sentence. An anonymous caller is answered the free plan's sentence, as it
|
|
1491
|
+
* is the free plan's numbers.
|
|
1492
|
+
*
|
|
1493
|
+
* **Optional, and the absence is load-bearing**, as `blockedExtensions`
|
|
1494
|
+
* above: an API deployed before this field existed sends nothing, and a
|
|
1495
|
+
* client then appends nothing. It hardens to required at the entity's next
|
|
1496
|
+
* natural break, with the blocklist.
|
|
1497
|
+
*/
|
|
1498
|
+
readonly suggestions?: Readonly<Record<PlatformLimitKey, string>>;
|
|
1479
1499
|
}
|
|
1500
|
+
/** The three request limits, named as `PlatformLimits` names them. */
|
|
1501
|
+
type PlatformLimitKey = 'maxFileSize' | 'maxFilesCount' | 'maxTotalSize';
|
|
1480
1502
|
/**
|
|
1481
1503
|
* Whether a file is one the platform refuses to host.
|
|
1482
1504
|
*
|
|
@@ -2014,10 +2036,12 @@ interface StaticFile {
|
|
|
2014
2036
|
* console: under `/<account>/` and at the root.
|
|
2015
2037
|
*
|
|
2016
2038
|
* `owner` marks a section that means the person's OWN account: a bare path
|
|
2017
|
-
* into it opens the person's own account rather than the one entered last
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
* owner
|
|
2039
|
+
* into it opens the person's own account rather than the one entered last.
|
|
2040
|
+
* A pricing link's `/upgrade/pro` and the published API-key link speak about
|
|
2041
|
+
* the reader's plan and key, and `/success` is where a purchase lands: only
|
|
2042
|
+
* an owner buys, and a person owns exactly one account. Modals inside a
|
|
2043
|
+
* section carry their own owner rule in the console; this flag is the
|
|
2044
|
+
* section's alone.
|
|
2021
2045
|
*/
|
|
2022
2046
|
declare const SECTIONS: {
|
|
2023
2047
|
readonly new: {
|
|
@@ -2036,7 +2060,7 @@ declare const SECTIONS: {
|
|
|
2036
2060
|
readonly owner: true;
|
|
2037
2061
|
};
|
|
2038
2062
|
readonly success: {
|
|
2039
|
-
readonly owner:
|
|
2063
|
+
readonly owner: true;
|
|
2040
2064
|
};
|
|
2041
2065
|
readonly 'api-key': {
|
|
2042
2066
|
readonly owner: true;
|
|
@@ -2484,11 +2508,29 @@ interface PlansResponse {
|
|
|
2484
2508
|
* consent), and a billed account moving down gets a Stripe Subscription
|
|
2485
2509
|
* Schedule that applies the change at period end. The answer says which
|
|
2486
2510
|
* happened ({@link PlanChangeResponse}).
|
|
2511
|
+
*
|
|
2512
|
+
* A move down a tier is booked only by an account that fits it: until it
|
|
2513
|
+
* does, the door refuses (400) with a sentence naming what to remove, and
|
|
2514
|
+
* the same counts as {@link PlanChangeRefusalDetails}.
|
|
2487
2515
|
*/
|
|
2488
2516
|
interface PlanChangeRequest {
|
|
2489
2517
|
readonly plan: AccountPlanType;
|
|
2490
2518
|
readonly interval: BillingInterval;
|
|
2491
2519
|
}
|
|
2520
|
+
/**
|
|
2521
|
+
* `details` of the change door's refusal of a move down a tier the account
|
|
2522
|
+
* does not fit: the account holds more members, custom domains or platform
|
|
2523
|
+
* domains than the destination allows.
|
|
2524
|
+
*
|
|
2525
|
+
* `excess` counts what to REMOVE before asking again, per kind, keyed like
|
|
2526
|
+
* {@link Caps}; only the kinds over the destination's caps appear. The
|
|
2527
|
+
* door's `message` names the same counts in a sentence, and that sentence is
|
|
2528
|
+
* what a surface shows; the counts are for a client that acts on the
|
|
2529
|
+
* refusal.
|
|
2530
|
+
*/
|
|
2531
|
+
interface PlanChangeRefusalDetails {
|
|
2532
|
+
readonly excess: Partial<Caps>;
|
|
2533
|
+
}
|
|
2492
2534
|
/**
|
|
2493
2535
|
* The pending plan change — a Stripe Subscription Schedule, mirrored onto the
|
|
2494
2536
|
* account. `at` is when it applies (the current period's end, Unix seconds).
|
|
@@ -2755,7 +2797,7 @@ interface UploadedFile {
|
|
|
2755
2797
|
*/
|
|
2756
2798
|
declare function isPlatformDomain(domain: string, platformDomain: string): boolean;
|
|
2757
2799
|
/**
|
|
2758
|
-
* Check if a domain is a custom domain (not a platform
|
|
2800
|
+
* Check if a domain is a custom domain (not a platform domain).
|
|
2759
2801
|
* Custom domains are billable and require DNS verification.
|
|
2760
2802
|
*
|
|
2761
2803
|
* @example isCustomDomain("example.com", "shipstatic.com") → true
|
|
@@ -2901,8 +2943,11 @@ declare function validatePassword(value: unknown): string | undefined;
|
|
|
2901
2943
|
interface DeploymentOptions extends DeploymentUploadOptions {
|
|
2902
2944
|
/**
|
|
2903
2945
|
* An AbortSignal to allow cancellation of the deploy operation. The one
|
|
2904
|
-
* cancellation mechanism
|
|
2905
|
-
*
|
|
2946
|
+
* cancellation mechanism: it reaches every request the deploy makes (the
|
|
2947
|
+
* limits it validates against, the SPA question and the upload itself),
|
|
2948
|
+
* and aborting it rejects the deploy with a typed `Cancelled` error
|
|
2949
|
+
* wherever it stands. A deploy the server had already committed stays
|
|
2950
|
+
* committed. Request timeouts are a client concern
|
|
2906
2951
|
* (`ShipClientOptions.timeout`), not a per-deploy one.
|
|
2907
2952
|
*/
|
|
2908
2953
|
signal?: AbortSignal;
|
|
@@ -3366,17 +3411,9 @@ declare abstract class Ship$1 {
|
|
|
3366
3411
|
readonly tokens: TokenResource;
|
|
3367
3412
|
private readonly http;
|
|
3368
3413
|
private readonly clientOptions;
|
|
3369
|
-
private initPromise;
|
|
3370
|
-
protected platformLimits: PlatformLimits | null;
|
|
3371
3414
|
private credential;
|
|
3372
3415
|
constructor(options?: ShipClientOptions);
|
|
3373
|
-
protected abstract processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
3374
|
-
/**
|
|
3375
|
-
* Lazy initialization — fetches platform limits (file size / count caps) once,
|
|
3376
|
-
* on the first API call. Subsequent calls reuse the resolved promise.
|
|
3377
|
-
*/
|
|
3378
|
-
protected ensureInitialized(): Promise<void>;
|
|
3379
|
-
private fetchPlatformLimits;
|
|
3416
|
+
protected abstract processInput(input: DeployInput, options: DeploymentOptions, limits: PlatformLimits): Promise<StaticFile[]>;
|
|
3380
3417
|
/**
|
|
3381
3418
|
* Ping the API server, resolving its answer: `{ success, timestamp }`, where
|
|
3382
3419
|
* `timestamp` is the server clock in unix SECONDS.
|
|
@@ -3397,11 +3434,14 @@ declare abstract class Ship$1 {
|
|
|
3397
3434
|
*/
|
|
3398
3435
|
whoami(): Promise<Account>;
|
|
3399
3436
|
/**
|
|
3400
|
-
* Get platform limits (max file size, file count,
|
|
3401
|
-
*
|
|
3402
|
-
*
|
|
3437
|
+
* Get the platform limits the server states now (max file size, file count,
|
|
3438
|
+
* total size, and the blocked extensions). Asked every time and never held,
|
|
3439
|
+
* since a plan move or an operator's grant changes them. A `signal` aborts
|
|
3440
|
+
* the request, rejecting with the typed `Cancelled` error.
|
|
3403
3441
|
*/
|
|
3404
|
-
getLimits(
|
|
3442
|
+
getLimits(options?: {
|
|
3443
|
+
signal?: AbortSignal;
|
|
3444
|
+
}): Promise<PlatformLimits>;
|
|
3405
3445
|
on<K extends keyof ShipEvents>(event: K, handler: (...args: ShipEvents[K]) => void): void;
|
|
3406
3446
|
off<K extends keyof ShipEvents>(event: K, handler: (...args: ShipEvents[K]) => void): void;
|
|
3407
3447
|
/**
|
|
@@ -3508,6 +3548,9 @@ declare function getENV(): ExecutionEnvironment;
|
|
|
3508
3548
|
* Everything else is allowed — browser percent-encodes, Worker decodes, R2 matches.
|
|
3509
3549
|
*
|
|
3510
3550
|
* Additional checks: path traversal, reserved names, leading/trailing dots or spaces.
|
|
3551
|
+
*
|
|
3552
|
+
* The reason is a complete sentence naming the file, so every surface shows it
|
|
3553
|
+
* as it is (`file-rules.ts` on why).
|
|
3511
3554
|
*/
|
|
3512
3555
|
declare function validateFileName(filename: string): {
|
|
3513
3556
|
valid: boolean;
|
|
@@ -3636,35 +3679,40 @@ declare function calculateMD5(input: Blob | Buffer | string): Promise<MD5Result>
|
|
|
3636
3679
|
* @file One ordered table of deploy-file rules, and the single evaluation two
|
|
3637
3680
|
* renderers share.
|
|
3638
3681
|
*
|
|
3639
|
-
* **The defect this closes:** one rule was rendering as three sentences. A
|
|
3640
|
-
* file over the size cap said `File x is too large. Maximum allowed size is
|
|
3641
|
-
* 20MB.` from the deploy pipelines, `File size (21 MB) exceeds limit of 20 MB`
|
|
3642
|
-
* from `validateFiles`, and `File too large. Maximum 20971520 bytes allowed`
|
|
3643
|
-
* from the API — against the dual-validation doctrine that an error reads the
|
|
3644
|
-
* same wherever it was caught (root `CLAUDE.md`). Both pipelines also restated
|
|
3645
|
-
* the whole ordered check, so node/browser parity was a comment.
|
|
3646
|
-
*
|
|
3647
3682
|
* **A rule states a predicate and a sentence; a renderer chooses only how to
|
|
3648
3683
|
* DELIVER it.** That is the `SHAPES`-table move (`cli/formatters.ts`) applied
|
|
3649
3684
|
* to validation: the throwing renderer raises the first broken rule, the
|
|
3650
3685
|
* collecting renderer records it, and neither authors prose. Adding a rule is
|
|
3651
|
-
* a row, and both surfaces get it in the same position by construction.
|
|
3652
|
-
*
|
|
3653
|
-
*
|
|
3654
|
-
*
|
|
3655
|
-
*
|
|
3656
|
-
*
|
|
3657
|
-
*
|
|
3658
|
-
*
|
|
3659
|
-
*
|
|
3660
|
-
*
|
|
3661
|
-
*
|
|
3662
|
-
*
|
|
3686
|
+
* a row, and both surfaces get it in the same position by construction. One
|
|
3687
|
+
* table is also what keeps a rule from reading three ways: the deploy
|
|
3688
|
+
* pipelines, `validateFiles` and the API once each worded the size cap
|
|
3689
|
+
* differently, against the dual-validation doctrine that an error reads the
|
|
3690
|
+
* same wherever it is caught (root `CLAUDE.md`).
|
|
3691
|
+
*
|
|
3692
|
+
* **Every sentence is complete on its own.** The SDK is where a refusal is
|
|
3693
|
+
* worded; drop, the console, the CLI and the MCPs show the sentence verbatim
|
|
3694
|
+
* and add nothing, so a sentence names its file exactly once and states the
|
|
3695
|
+
* limit, and reads without a prefix. The family is subject first: `File
|
|
3696
|
+
* "<path>" <verdict>. Maximum <limit> allowed.`, and `File name "<path>" …`
|
|
3697
|
+
* where the name is the subject. The two rules about the SET, the count and
|
|
3698
|
+
* the total, name no path. A limit's sentence ends with the suggestion the
|
|
3699
|
+
* API delivered for it (`withSuggestion`), so the whole reads `File "x" is
|
|
3700
|
+
* too large. Maximum 20 MB allowed. Upgrade to Pro for more.`
|
|
3701
|
+
*
|
|
3702
|
+
* **The API words the same rules the same way, in the same order**
|
|
3703
|
+
* (`cloudflare/api/src/lib/validation.ts`), so a refusal reads alike whether
|
|
3704
|
+
* the SDK made it before uploading or the boundary made it after. Sizes are
|
|
3705
|
+
* formatted on both sides, and the path is named on both. That is a
|
|
3706
|
+
* restatement, and it is fenced from the API's side: a test there imports
|
|
3707
|
+
* this package's `validateFiles` and compares every shared rule's sentence to
|
|
3708
|
+
* `validateUpload`'s. The fence dies the day the table is promoted to
|
|
3709
|
+
* `@shipstatic/types` and the API imports it (Phase B, `CLAUDE.md`).
|
|
3663
3710
|
*
|
|
3664
3711
|
* Out of scope, and left where they are: `validateDeployPath` (a rule about
|
|
3665
3712
|
* the deploy PATH rather than the file, and pipelines-only), and
|
|
3666
|
-
* `validateFiles`' UI-tier pre-checks
|
|
3667
|
-
*
|
|
3713
|
+
* `validateFiles`' UI-tier pre-checks (empty, negative, unbuilt marker,
|
|
3714
|
+
* processing error), which have one holder each and no drift, and word their
|
|
3715
|
+
* sentences by the same family.
|
|
3668
3716
|
*/
|
|
3669
3717
|
|
|
3670
3718
|
/** What a rule is asked about: one file, and the deploy so far. */
|
|
@@ -3716,6 +3764,15 @@ declare function validateDeployPath(deployPath: string, sourceIdentifier: string
|
|
|
3716
3764
|
* @throws {ShipError} The first broken rule's sentence
|
|
3717
3765
|
*/
|
|
3718
3766
|
declare function validateDeployFile(input: FileRuleInput, limits: PlatformLimits): void;
|
|
3767
|
+
/**
|
|
3768
|
+
* The throwing renderer of `COUNT_RULE`: the deploy's file count, judged over
|
|
3769
|
+
* the files the pipeline will send.
|
|
3770
|
+
*
|
|
3771
|
+
* @param count - How many files the deploy carries
|
|
3772
|
+
* @param limits - The platform's limits, from `/limits`
|
|
3773
|
+
* @throws {ShipError} The count rule's sentence
|
|
3774
|
+
*/
|
|
3775
|
+
declare function validateDeployCount(count: number, limits: PlatformLimits): void;
|
|
3719
3776
|
|
|
3720
3777
|
/**
|
|
3721
3778
|
* Utility functions for string manipulation.
|
|
@@ -3747,10 +3804,10 @@ declare function pluralize(count: number, singular: string, plural: string, incl
|
|
|
3747
3804
|
*
|
|
3748
3805
|
* @param paths - File or directory paths to scan and process.
|
|
3749
3806
|
* @param options - Processing options (pathDetect, etc.).
|
|
3750
|
-
* @param platformLimits -
|
|
3751
|
-
* total-size caps
|
|
3752
|
-
*
|
|
3753
|
-
*
|
|
3807
|
+
* @param platformLimits - The platform limits (file-size / count /
|
|
3808
|
+
* total-size caps and the blocked extensions) the deploy read from
|
|
3809
|
+
* `GET /limits` at its start. Passed in, never held, so a validation always
|
|
3810
|
+
* meets the limits the server states now.
|
|
3754
3811
|
* @returns Promise resolving to an array of StaticFile objects.
|
|
3755
3812
|
* @throws {ShipError} If called outside Node.js or if fs/path modules fail.
|
|
3756
3813
|
*/
|
|
@@ -3801,7 +3858,7 @@ declare class Ship extends Ship$1 {
|
|
|
3801
3858
|
* contract stays platform-neutral.
|
|
3802
3859
|
*/
|
|
3803
3860
|
deploy(input: string | string[], options?: DeploymentOptions): Promise<DeploymentCreateResponse>;
|
|
3804
|
-
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
3861
|
+
protected processInput(input: DeployInput, options: DeploymentOptions, limits: PlatformLimits): Promise<StaticFile[]>;
|
|
3805
3862
|
}
|
|
3806
3863
|
|
|
3807
|
-
export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountAccess, type AccountDeleteResponse, type AccountKeyResponse, AccountPlan, type AccountPlanType, AccountRefusal, type AccountRefusalType, type AccountResource, type AccountRole, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, BUILD_SETTINGS, type BillingInterval, type BillingPortalSession, type BillingSyncResponse, type BuildFailureDetails, CALLER, type Caps, type ConsoleErrand, type ConsolePaths, type ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, type DeployBodyContext, type DeployFile, type DeployFileEncoding, type DeployFileSpec, type DeployInput, type DeployTransport, type Deployment, type DeploymentCreateResponse, type DeploymentDeleteResponse, type DeploymentListResponse, type DeploymentOptions, type DeploymentResource, type DeploymentResourceContext, type DeploymentSetOptions, DeploymentStatus, type DeploymentStatusType, type DeploymentUploadOptions, DeploymentVia, type DeploymentViaType, type DnsLookup, type DnsProvider, type DnsRecord, type DnsRecordType, type Domain, type DomainDeleteResponse, type DomainDnsResponse, type DomainListResponse, type DomainRecordsResponse, type DomainResource, type DomainSetOptions, type DomainSetResult, type DomainShareResponse, DomainStatus, type DomainStatusType, type DomainValidateResponse, DomainVerification, type DomainVerificationType, type DomainVerifyResponse, type ErrorResponse, ErrorType, type ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, type Fetch, type FileValidationResult, FileValidationStatus, type FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, type LabelsResponse, type ListOptions, type ListResponse, type MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, type OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, type PingResponse, type Plan, type PlanChangeRequest, type PlanChangeResponse, type PlanDestination, type PlansResponse, type PlatformLimits, type RequestResult, type ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SIGN_IN_RETURN_PARAM, type SPACheckDebug, type SPACheckRequest, type SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, type ScheduledChange, type SettingsFragment, type SetupInstructionsResponse, Ship, type ShipClientOptions, ShipError, type ShipEvents, type ShipRequestInit, type StaticFile, TTL_CONSTRAINTS, type Token, type TokenCreateOptions, type TokenCreateResponse, type TokenDeleteResponse, TokenKind, type TokenKindType, type TokenListResponse, type TokenProvider, type TokenResource, type Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USER_VISIBLE_EVENTS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, doors, errandOf, extractSubdomain, filterJunk, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isInvitationPath, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
|
|
3864
|
+
export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountAccess, type AccountDeleteResponse, type AccountKeyResponse, AccountPlan, type AccountPlanType, AccountRefusal, type AccountRefusalType, type AccountResource, type AccountRole, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, BUILD_SETTINGS, type BillingInterval, type BillingPortalSession, type BillingSyncResponse, type BuildFailureDetails, CALLER, type Caps, type ConsoleErrand, type ConsolePaths, type ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, type DeployBodyContext, type DeployFile, type DeployFileEncoding, type DeployFileSpec, type DeployInput, type DeployTransport, type Deployment, type DeploymentCreateResponse, type DeploymentDeleteResponse, type DeploymentListResponse, type DeploymentOptions, type DeploymentResource, type DeploymentResourceContext, type DeploymentSetOptions, DeploymentStatus, type DeploymentStatusType, type DeploymentUploadOptions, DeploymentVia, type DeploymentViaType, type DnsLookup, type DnsProvider, type DnsRecord, type DnsRecordType, type Domain, type DomainDeleteResponse, type DomainDnsResponse, type DomainListResponse, type DomainRecordsResponse, type DomainResource, type DomainSetOptions, type DomainSetResult, type DomainShareResponse, DomainStatus, type DomainStatusType, type DomainValidateResponse, DomainVerification, type DomainVerificationType, type DomainVerifyResponse, type ErrorResponse, ErrorType, type ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, type Fetch, type FileValidationResult, FileValidationStatus, type FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, type LabelsResponse, type ListOptions, type ListResponse, type MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, type OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, type PingResponse, type Plan, type PlanChangeRefusalDetails, type PlanChangeRequest, type PlanChangeResponse, type PlanDestination, type PlansResponse, type PlatformLimitKey, type PlatformLimits, type RequestResult, type ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SIGN_IN_RETURN_PARAM, type SPACheckDebug, type SPACheckRequest, type SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, type ScheduledChange, type SettingsFragment, type SetupInstructionsResponse, Ship, type ShipClientOptions, ShipError, type ShipEvents, type ShipRequestInit, type StaticFile, TTL_CONSTRAINTS, type Token, type TokenCreateOptions, type TokenCreateResponse, type TokenDeleteResponse, TokenKind, type TokenKindType, type TokenListResponse, type TokenProvider, type TokenResource, type Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USER_VISIBLE_EVENTS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, doors, errandOf, extractSubdomain, filterJunk, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isInvitationPath, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployCount, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
|