@shipstatic/ship 3.4.0-beta.9 → 3.5.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 +1 -1
- package/SKILL.md +1 -1
- package/THIRD-PARTY-LICENSES.md +1 -1
- package/dist/browser.d.ts +191 -107
- 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 +191 -107
- package/dist/index.d.ts +191 -107
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -433,7 +433,7 @@ This package includes a [SKILL.md](./SKILL.md) file, a portable skill definition
|
|
|
433
433
|
| **[VS Code](https://marketplace.visualstudio.com/items?itemName=shipstatic.shipstatic)** | Search "ShipStatic" in the Marketplace |
|
|
434
434
|
| **[Gemini CLI](https://github.com/shipstatic/plugin)** | `gemini extensions install https://github.com/shipstatic/plugin` |
|
|
435
435
|
| **[n8n](https://www.npmjs.com/package/n8n-nodes-shipstatic)** | Search "ShipStatic" in n8n's node panel |
|
|
436
|
-
| **[GitHub Action](https://github.com/shipstatic/action)** | `shipstatic/action@
|
|
436
|
+
| **[GitHub Action](https://github.com/shipstatic/action)** | `shipstatic/action@v3` |
|
|
437
437
|
| **[Agent Skill](https://www.shipstatic.com/SKILL.md)** | One file, for any skills-aware tool |
|
|
438
438
|
|
|
439
439
|
## License
|
package/SKILL.md
CHANGED
|
@@ -116,7 +116,7 @@ Visitors get an unlock page until they enter the password. Length: 6–128 chara
|
|
|
116
116
|
|
|
117
117
|
### SPA routing
|
|
118
118
|
|
|
119
|
-
Ship auto-detects single-page apps from `index.html` content and configures client-side routing rewrites — all paths serve `index.html`.
|
|
119
|
+
Ship auto-detects single-page apps from `index.html` content and configures client-side routing rewrites — all paths serve `index.html`. Usually no action needed. If the app's routes return 404 on reload, add `{ "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] }` as `ship.json` in the deployed folder. Skipped if a `ship.json` config is already included in the deployment. Disable with `--no-spa-detect`.
|
|
120
120
|
|
|
121
121
|
## Authentication
|
|
122
122
|
|
package/THIRD-PARTY-LICENSES.md
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -511,8 +511,7 @@ interface DomainShareResponse {
|
|
|
511
511
|
* the console sends a stuck reader to it rather than to the general docs. If
|
|
512
512
|
* the spellings ever diverged, nothing would fail: the link would open the page
|
|
513
513
|
* at its top and nobody would be told, the silent-drift class this
|
|
514
|
-
* constitution exists to delete
|
|
515
|
-
* one domain over).
|
|
514
|
+
* constitution exists to delete.
|
|
516
515
|
*/
|
|
517
516
|
declare const SETUP_TROUBLESHOOTING_ANCHOR = "troubleshooting";
|
|
518
517
|
/**
|
|
@@ -717,13 +716,13 @@ declare const AccountPlan: {
|
|
|
717
716
|
};
|
|
718
717
|
type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
719
718
|
/**
|
|
720
|
-
* The
|
|
719
|
+
* The four things an account ACCUMULATES, and therefore the four things a
|
|
721
720
|
* plan caps. One word for the count and for the ceiling: `Account.usage` and
|
|
722
721
|
* `Account.caps` are the same shape, so a surface renders "2 of 3" by
|
|
723
722
|
* dividing one by the other and can never divide by a different denominator
|
|
724
723
|
* than the 403 uses.
|
|
725
724
|
*
|
|
726
|
-
* All
|
|
725
|
+
* All four are counts plans SELL, and every plan publishes a number for each.
|
|
727
726
|
* A platform domain (`my-app.shipstatic.com`) is among them: the namespace
|
|
728
727
|
* is the platform's, so every plan bounds how many names one account may take
|
|
729
728
|
* from it — which is not the address every deployment gets by construction
|
|
@@ -763,12 +762,81 @@ interface Caps {
|
|
|
763
762
|
*/
|
|
764
763
|
readonly customDomains: number;
|
|
765
764
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
765
|
+
* Member places. As `caps` it is how many people the plan allows in the
|
|
766
|
+
* account, the owner included. As `usage` it is the members the account
|
|
767
|
+
* has: one membership row each. A pending invitation holds a place too,
|
|
768
|
+
* counted beside it as {@link AccountUsage.invitations}, so what stands
|
|
769
|
+
* against this cap is {@link placesTaken}, members and invitations
|
|
770
|
+
* together.
|
|
769
771
|
*/
|
|
770
772
|
readonly members: number;
|
|
771
773
|
}
|
|
774
|
+
/**
|
|
775
|
+
* What the account holds: every cap's count, and the pending invitations.
|
|
776
|
+
*
|
|
777
|
+
* A member place is taken by a member or by a pending invitation, and an
|
|
778
|
+
* account never holds more of the two together than its plan's `members`
|
|
779
|
+
* cap: the invite door refuses a new invitation when the places are taken,
|
|
780
|
+
* and a move down a tier is booked only when the places fit the destination.
|
|
781
|
+
* The count has no cap of its own, which is why it is a field of the usage
|
|
782
|
+
* and not of {@link Caps}: the place it takes is a member's.
|
|
783
|
+
*
|
|
784
|
+
* Only a member pauses, though. An account over its members cap pauses every
|
|
785
|
+
* member while it does not fit; a pending invitation pauses nobody and
|
|
786
|
+
* counts toward no pause.
|
|
787
|
+
*/
|
|
788
|
+
interface AccountUsage extends Caps {
|
|
789
|
+
/**
|
|
790
|
+
* Invitations still open: pending, and not yet expired. An expired one
|
|
791
|
+
* holds nothing, whether or not a sweep has removed its row.
|
|
792
|
+
*/
|
|
793
|
+
readonly invitations: number;
|
|
794
|
+
}
|
|
795
|
+
/** The member places an account has taken: its members, and its pending invitations. */
|
|
796
|
+
declare function placesTaken(usage: Pick<AccountUsage, 'members' | 'invitations'>): number;
|
|
797
|
+
/**
|
|
798
|
+
* The kind each count of {@link AccountUsage} names, as a person reads it:
|
|
799
|
+
* one and many. The one vocabulary every surface that says a count uses, the
|
|
800
|
+
* api's cap refusals and the console's room notes alike, so "custom domain"
|
|
801
|
+
* is one word wherever it is met. A person reads "ShipStatic domain" where
|
|
802
|
+
* the code says platform domain; the code's word never reaches them.
|
|
803
|
+
*/
|
|
804
|
+
declare const USAGE_KIND: Record<keyof AccountUsage, {
|
|
805
|
+
readonly one: string;
|
|
806
|
+
readonly many: string;
|
|
807
|
+
}>;
|
|
808
|
+
/**
|
|
809
|
+
* What an account holds beyond a set of caps, per kind, only the kinds that
|
|
810
|
+
* are over: what a move down a tier must shed before it is booked, and what
|
|
811
|
+
* the console notes on a cheaper card.
|
|
812
|
+
*
|
|
813
|
+
* Member places are read against `caps.members`: the places over the cap are
|
|
814
|
+
* counted once ({@link placesTaken} less the cap), members are named first,
|
|
815
|
+
* because a member over the cap has to go whatever else the account holds,
|
|
816
|
+
* and what is over after them is the invitations to cancel. So two members
|
|
817
|
+
* and one invitation against a cap of one is one member and one invitation,
|
|
818
|
+
* and five members against the same cap is four members and no invitation.
|
|
819
|
+
* The two domain kinds are read against their own caps. Deployments are not
|
|
820
|
+
* read at all: nothing pauses them, and above their cap they only block
|
|
821
|
+
* creation (see {@link Caps}).
|
|
822
|
+
*/
|
|
823
|
+
declare function excessOver(usage: AccountUsage, caps: Caps): Partial<AccountUsage>;
|
|
824
|
+
/**
|
|
825
|
+
* Counts of kinds in words, people first: "4 members and 2 custom domains",
|
|
826
|
+
* or nothing. The order is {@link USAGE_KIND}'s minus the two kinds a count never
|
|
827
|
+
* names here, deployments and invitations, which have their own sentence
|
|
828
|
+
* ({@link fitPhrase}).
|
|
829
|
+
*/
|
|
830
|
+
declare function countPhrase(excess: Partial<AccountUsage>): string;
|
|
831
|
+
/**
|
|
832
|
+
* What to do before an account fits a set of caps, in words: "remove 1
|
|
833
|
+
* member and cancel 1 invitation", "remove 2 custom domains", "cancel 2
|
|
834
|
+
* invitations", or nothing when it fits. Two verbs, because a member place is
|
|
835
|
+
* freed two ways: a member is removed, a pending invitation is cancelled. The
|
|
836
|
+
* api's change door and the console's room notes say this one phrase, so a
|
|
837
|
+
* refusal and the note that preceded it cannot differ.
|
|
838
|
+
*/
|
|
839
|
+
declare function fitPhrase(excess: Partial<AccountUsage>): string;
|
|
772
840
|
/**
|
|
773
841
|
* A person's standing in an account. `owner` founded it and alone manages
|
|
774
842
|
* billing, credentials, members and deletion; `member` uses its resources
|
|
@@ -836,13 +904,17 @@ interface Account {
|
|
|
836
904
|
* still work, every write is refused. The plan is unchanged underneath.
|
|
837
905
|
*/
|
|
838
906
|
readonly suspended: boolean;
|
|
839
|
-
/** What the account currently holds — see {@link Caps}. */
|
|
840
|
-
readonly usage: Caps;
|
|
841
907
|
/**
|
|
842
|
-
* What the account
|
|
843
|
-
* {@link
|
|
844
|
-
|
|
845
|
-
|
|
908
|
+
* What the account currently holds: every cap's count, and the pending
|
|
909
|
+
* invitations beside them — see {@link AccountUsage}.
|
|
910
|
+
*/
|
|
911
|
+
readonly usage: AccountUsage;
|
|
912
|
+
/**
|
|
913
|
+
* What the account is allowed to hold, under {@link usage}'s cap keys, so
|
|
914
|
+
* the pair divides. These are the account's EFFECTIVE caps: its plan's
|
|
915
|
+
* numbers, plus whatever the operator granted it individually. The one key
|
|
916
|
+
* of `usage` absent here is `invitations`, which has no cap of its own: a
|
|
917
|
+
* pending invitation takes a member place, so it counts against `members`.
|
|
846
918
|
*/
|
|
847
919
|
readonly caps: Caps;
|
|
848
920
|
/**
|
|
@@ -862,15 +934,16 @@ interface Account {
|
|
|
862
934
|
*/
|
|
863
935
|
readonly access?: AccountAccess;
|
|
864
936
|
/**
|
|
865
|
-
*
|
|
866
|
-
*
|
|
867
|
-
* members
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
937
|
+
* The account's own standing, beside the credential's ({@link access}):
|
|
938
|
+
* whether its MEMBERS are admitted today, `paused` while it holds more
|
|
939
|
+
* members than its plan allows, until the owner upgrades or removes
|
|
940
|
+
* members. It is {@link access} for everyone who is not the owner,
|
|
941
|
+
* published for the account so the one person it never pauses can be told;
|
|
942
|
+
* the API derives both from one rule, so a console reads the pause here
|
|
943
|
+
* rather than re-deriving it from the member counts. Optional by the
|
|
944
|
+
* additive-evolution law: a response that predates it is `active`.
|
|
872
945
|
*/
|
|
873
|
-
readonly
|
|
946
|
+
readonly membership?: AccountAccess;
|
|
874
947
|
/** Unix timestamp (seconds) when account was created */
|
|
875
948
|
readonly created: number;
|
|
876
949
|
/** Unix timestamp (seconds) when account was activated (first deployment), null if not yet activated */
|
|
@@ -1613,20 +1686,6 @@ interface PingResponse {
|
|
|
1613
1686
|
* already share the credential prefixes below.
|
|
1614
1687
|
*/
|
|
1615
1688
|
declare const AUTH_BASE_PATH = "/auth";
|
|
1616
|
-
/**
|
|
1617
|
-
* The query marker a completed sign-in LANDS with.
|
|
1618
|
-
*
|
|
1619
|
-
* The API's magic-link verify leg stamps `?signing-in=1` onto its success
|
|
1620
|
-
* redirect, and the console boots into its wait screen on seeing it — two
|
|
1621
|
-
* repos, one spelling, which is why it lives here. Success is marked and the
|
|
1622
|
-
* error leg deliberately is NOT: the console gives the marker precedence, so
|
|
1623
|
-
* a marked error would render a wait that resolves to bare doors with the
|
|
1624
|
-
* error's sentence lost. If the spellings ever diverged the failure would be
|
|
1625
|
-
* invisible to every suite — email landings would flash the doors for one
|
|
1626
|
-
* round trip instead of waiting — which is exactly the silent-drift class
|
|
1627
|
-
* this constitution exists to delete.
|
|
1628
|
-
*/
|
|
1629
|
-
declare const SIGN_IN_RETURN_PARAM = "signing-in";
|
|
1630
1689
|
/**
|
|
1631
1690
|
* How a request (or recorded activity) was authorized.
|
|
1632
1691
|
*
|
|
@@ -1846,15 +1905,17 @@ declare const SPA_DEFAULT_CONFIG: {
|
|
|
1846
1905
|
* "100KB". `INDEX_FILE` is the selection rule (the file whose content rides
|
|
1847
1906
|
* `SPACheckRequest.index`), restated by every client that builds the request.
|
|
1848
1907
|
*
|
|
1849
|
-
* Neither member is a validation boundary: a client over the cap
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
1908
|
+
* Neither member is a validation boundary: a client over the cap skips the
|
|
1909
|
+
* pre-flight and answers "no" itself, which is the answer the server gives an
|
|
1910
|
+
* oversized index. Every client holds the cap, in bytes: the server's own
|
|
1911
|
+
* route refuses a body over the JSON intake cap, so a client that asked about
|
|
1912
|
+
* any index would fail a deploy whose upload succeeds. The n8n node, which
|
|
1913
|
+
* cannot import this, restates the number under its contract fence.
|
|
1853
1914
|
*/
|
|
1854
1915
|
declare const SPA_CHECK_CONSTRAINTS: {
|
|
1855
1916
|
/** The file whose content is the check's subject. */
|
|
1856
1917
|
readonly INDEX_FILE: "index.html";
|
|
1857
|
-
/** Skip the pre-flight above this
|
|
1918
|
+
/** Skip the pre-flight above this many UTF-8 bytes: the server answers no. */
|
|
1858
1919
|
readonly MAX_INDEX_BYTES: number;
|
|
1859
1920
|
};
|
|
1860
1921
|
/**
|
|
@@ -1979,28 +2040,19 @@ interface SPACheckRequest {
|
|
|
1979
2040
|
index: string;
|
|
1980
2041
|
}
|
|
1981
2042
|
/**
|
|
1982
|
-
*
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
*
|
|
1986
|
-
*
|
|
1987
|
-
*
|
|
1988
|
-
|
|
1989
|
-
interface SPACheckDebug {
|
|
1990
|
-
/** Which tier made the detection */
|
|
1991
|
-
tier: 'exclusions' | 'inclusions' | 'scoring' | 'ai' | 'fallback';
|
|
1992
|
-
/** The reason for the detection result */
|
|
1993
|
-
reason: string;
|
|
1994
|
-
}
|
|
1995
|
-
/**
|
|
1996
|
-
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
1997
|
-
* "A report answers a question").
|
|
2043
|
+
* The `/spa-check` answer: whether the upload is a single-page app, and the
|
|
2044
|
+
* one sentence saying why it was or was not detected.
|
|
2045
|
+
*
|
|
2046
|
+
* `reason` is there so anyone can ask the open route about an upload and
|
|
2047
|
+
* read the answer. It is human-readable text under the message authoring law:
|
|
2048
|
+
* clients branch on `isSPA`, never on the sentence, so its wording is not a
|
|
2049
|
+
* contract.
|
|
1998
2050
|
*/
|
|
1999
2051
|
interface SPACheckResponse {
|
|
2000
|
-
/** Whether the
|
|
2052
|
+
/** Whether the upload is detected as a single-page app */
|
|
2001
2053
|
isSPA: boolean;
|
|
2002
|
-
/**
|
|
2003
|
-
|
|
2054
|
+
/** Why it was or was not detected, for a person to read */
|
|
2055
|
+
reason: string;
|
|
2004
2056
|
}
|
|
2005
2057
|
/**
|
|
2006
2058
|
* Represents a file that has been processed and is ready for deploy.
|
|
@@ -2056,6 +2108,9 @@ declare const SECTIONS: {
|
|
|
2056
2108
|
readonly settings: {
|
|
2057
2109
|
readonly owner: false;
|
|
2058
2110
|
};
|
|
2111
|
+
readonly claim: {
|
|
2112
|
+
readonly owner: false;
|
|
2113
|
+
};
|
|
2059
2114
|
readonly upgrade: {
|
|
2060
2115
|
readonly owner: true;
|
|
2061
2116
|
};
|
|
@@ -2068,6 +2123,10 @@ declare const SECTIONS: {
|
|
|
2068
2123
|
};
|
|
2069
2124
|
/** A section's first segment. */
|
|
2070
2125
|
type ConsoleSection = keyof typeof SECTIONS;
|
|
2126
|
+
/** The pages that exist before an account is known, by first segment. */
|
|
2127
|
+
declare const DOOR_SEGMENTS: readonly ["login", "register", "logout", "invitation", "consent"];
|
|
2128
|
+
/** A door's first segment. */
|
|
2129
|
+
type DoorSegment = (typeof DOOR_SEGMENTS)[number];
|
|
2071
2130
|
/** The two fragments of the settings page a link may name. */
|
|
2072
2131
|
type SettingsFragment = 'members' | 'api-key';
|
|
2073
2132
|
/**
|
|
@@ -2101,6 +2160,8 @@ declare function consolePaths(account?: string): {
|
|
|
2101
2160
|
deployment: (domain: string) => string;
|
|
2102
2161
|
};
|
|
2103
2162
|
settings: (fragment?: SettingsFragment) => string;
|
|
2163
|
+
/** The claim of an anonymous deployment into this account; the API mails the bare form. */
|
|
2164
|
+
claim: (code: string) => string;
|
|
2104
2165
|
/** Settings, marked as the landing of a Stripe Customer Portal return. */
|
|
2105
2166
|
settingsAfterBilling: () => string;
|
|
2106
2167
|
upgrade: (plan?: AccountPlanType) => string;
|
|
@@ -2111,13 +2172,31 @@ declare function consolePaths(account?: string): {
|
|
|
2111
2172
|
};
|
|
2112
2173
|
/** The builders `consolePaths` returns. */
|
|
2113
2174
|
type ConsolePaths = ReturnType<typeof consolePaths>;
|
|
2114
|
-
/**
|
|
2175
|
+
/** Where a sign-in door's journey goes on: the console path a `?next` carries. */
|
|
2176
|
+
interface Journey {
|
|
2177
|
+
readonly next?: string;
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* The doors: the pages a PERSON stands on before an account is known, one
|
|
2181
|
+
* builder per door segment and named for it: signing in and out, joining an
|
|
2182
|
+
* account, granting an app access. A door's object rides its path (the
|
|
2183
|
+
* sign-in link's token, the invitation's id), and the journey rides the
|
|
2184
|
+
* query, so the three doors a sign-in moves through take it by name. What a
|
|
2185
|
+
* person does IN an account is a section (`consolePaths`), the claim among
|
|
2186
|
+
* them.
|
|
2187
|
+
*
|
|
2188
|
+
* ```ts
|
|
2189
|
+
* doors.login({ token, next: '/claim/abc' })
|
|
2190
|
+
* // '/login/<token>?next=%2Fclaim%2Fabc'
|
|
2191
|
+
* ```
|
|
2192
|
+
*/
|
|
2115
2193
|
declare const doors: {
|
|
2116
|
-
readonly login: (next?:
|
|
2117
|
-
|
|
2118
|
-
|
|
2194
|
+
readonly login: ({ token, next }?: Journey & {
|
|
2195
|
+
readonly token?: string;
|
|
2196
|
+
}) => string;
|
|
2197
|
+
readonly register: ({ next }?: Journey) => string;
|
|
2198
|
+
readonly logout: ({ next }?: Journey) => string;
|
|
2119
2199
|
readonly invitation: (invitation: string) => string;
|
|
2120
|
-
readonly claim: (code: string) => string;
|
|
2121
2200
|
readonly consent: () => string;
|
|
2122
2201
|
};
|
|
2123
2202
|
/**
|
|
@@ -2132,10 +2211,21 @@ declare function billingReturnOf(search: string): BillingReturn | null;
|
|
|
2132
2211
|
* the account exists is the server's answer, never the path's.
|
|
2133
2212
|
*/
|
|
2134
2213
|
declare function accountOfPath(path: string): string | null;
|
|
2135
|
-
/**
|
|
2214
|
+
/**
|
|
2215
|
+
* The door a path names, or null for an account place or the operator
|
|
2216
|
+
* partition. Every question about doors reads this one answer: which page is
|
|
2217
|
+
* an auth page, which errand a destination carries, what a vendor must not
|
|
2218
|
+
* see. `/login/<token>` is the login door, as `/invitation/<id>` is the
|
|
2219
|
+
* invitation door: a door's object is the rest of its path.
|
|
2220
|
+
*/
|
|
2221
|
+
declare function doorOf(path: string): DoorSegment | null;
|
|
2222
|
+
/**
|
|
2223
|
+
* Whether a path names the claim section, in either form: `/claim/:code`, and
|
|
2224
|
+
* the same under `/<account>/`. The code is a bearer credential, which is why
|
|
2225
|
+
* a reader asks about this section by name: the doors title their visitor by
|
|
2226
|
+
* it, and analytics elides it.
|
|
2227
|
+
*/
|
|
2136
2228
|
declare const isClaimPath: (path: string) => boolean;
|
|
2137
|
-
/** Whether a path names an invitation (`/invitations/:invitation`). */
|
|
2138
|
-
declare const isInvitationPath: (path: string) => boolean;
|
|
2139
2229
|
/**
|
|
2140
2230
|
* Whether a path names the upgrade section, in either form: `/upgrade`,
|
|
2141
2231
|
* `/upgrade/:plan`, and the same under `/<account>/`.
|
|
@@ -2468,20 +2558,6 @@ interface Plan {
|
|
|
2468
2558
|
* nothing (a plan sold by conversation publishes no numbers).
|
|
2469
2559
|
*/
|
|
2470
2560
|
readonly caps: Caps | null;
|
|
2471
|
-
/**
|
|
2472
|
-
* Why this row cannot be ordered right now — the closed door's own sentence,
|
|
2473
|
-
* verbatim — or absent when the way is open. A menu lists what can be
|
|
2474
|
-
* ordered, and a row that is sold but not yet orderable (its door is closed:
|
|
2475
|
-
* checkout unbuilt, a feature unfinished) SAYS SO on the menu instead of
|
|
2476
|
-
* only at the order.
|
|
2477
|
-
*
|
|
2478
|
-
* Clients branch on PRESENCE and render the sentence unchanged — they know
|
|
2479
|
-
* *that* the row is closed, never *which* door or *when it lifts*; the
|
|
2480
|
-
* vocabulary of doors stays server-side. The same rule the refusal follows:
|
|
2481
|
-
* `POST /billing/change` onto a closed row answers 400 with
|
|
2482
|
-
* `details.closed`, and its `message` is this sentence.
|
|
2483
|
-
*/
|
|
2484
|
-
readonly closed?: string;
|
|
2485
2561
|
}
|
|
2486
2562
|
/**
|
|
2487
2563
|
* Response for `GET /plans` — the whole public menu, in display order.
|
|
@@ -2519,17 +2595,18 @@ interface PlanChangeRequest {
|
|
|
2519
2595
|
}
|
|
2520
2596
|
/**
|
|
2521
2597
|
* `details` of the change door's refusal of a move down a tier the account
|
|
2522
|
-
* does not fit: the account holds more members,
|
|
2523
|
-
* domains than the destination allows.
|
|
2598
|
+
* does not fit: the account holds more members, pending invitations, custom
|
|
2599
|
+
* domains or platform domains than the destination allows.
|
|
2524
2600
|
*
|
|
2525
2601
|
* `excess` counts what to REMOVE before asking again, per kind, keyed like
|
|
2526
|
-
* {@link
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
*
|
|
2602
|
+
* {@link AccountUsage}; only the kinds over the destination's caps appear
|
|
2603
|
+
* ({@link excessOver}). Members and invitations are counted apart, since one
|
|
2604
|
+
* is removed and the other cancelled. The door's `message` names the same
|
|
2605
|
+
* counts in a sentence, and that sentence is what a surface shows; the
|
|
2606
|
+
* counts are for a client that acts on the refusal.
|
|
2530
2607
|
*/
|
|
2531
2608
|
interface PlanChangeRefusalDetails {
|
|
2532
|
-
readonly excess: Partial<
|
|
2609
|
+
readonly excess: Partial<AccountUsage>;
|
|
2533
2610
|
}
|
|
2534
2611
|
/**
|
|
2535
2612
|
* The pending plan change — a Stripe Subscription Schedule, mirrored onto the
|
|
@@ -3694,27 +3771,25 @@ declare function calculateMD5(input: Blob | Buffer | string): Promise<MD5Result>
|
|
|
3694
3771
|
* and add nothing, so a sentence names its file exactly once and states the
|
|
3695
3772
|
* limit, and reads without a prefix. The family is subject first: `File
|
|
3696
3773
|
* "<path>" <verdict>. Maximum <limit> allowed.`, and `File name "<path>" …`
|
|
3697
|
-
* where the name is the subject. The
|
|
3698
|
-
*
|
|
3699
|
-
*
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
* **
|
|
3703
|
-
* (
|
|
3704
|
-
*
|
|
3705
|
-
*
|
|
3706
|
-
*
|
|
3707
|
-
*
|
|
3708
|
-
*
|
|
3709
|
-
*
|
|
3710
|
-
* has nothing BUT the message, so dropping it would leave a CLI user asking
|
|
3711
|
-
* which file.
|
|
3774
|
+
* where the name is the subject. The two rules about the SET, the count and
|
|
3775
|
+
* the total, name no path. A limit's sentence ends with the suggestion the
|
|
3776
|
+
* API delivered for it (`withSuggestion`), so the whole reads `File "x" is
|
|
3777
|
+
* too large. Maximum 20 MB allowed. Upgrade to Pro for more.`
|
|
3778
|
+
*
|
|
3779
|
+
* **The API words the same rules the same way, in the same order**
|
|
3780
|
+
* (`cloudflare/api/src/lib/validation.ts`), so a refusal reads alike whether
|
|
3781
|
+
* the SDK made it before uploading or the boundary made it after. Sizes are
|
|
3782
|
+
* formatted on both sides, and the path is named on both. That is a
|
|
3783
|
+
* restatement, and it is fenced from the API's side: a test there imports
|
|
3784
|
+
* this package's `validateFiles` and compares every shared rule's sentence to
|
|
3785
|
+
* `validateUpload`'s. The fence dies the day the table is promoted to
|
|
3786
|
+
* `@shipstatic/types` and the API imports it (Phase B, `CLAUDE.md`).
|
|
3712
3787
|
*
|
|
3713
3788
|
* Out of scope, and left where they are: `validateDeployPath` (a rule about
|
|
3714
3789
|
* the deploy PATH rather than the file, and pipelines-only), and
|
|
3715
|
-
* `validateFiles`' UI-tier pre-checks (empty, negative,
|
|
3716
|
-
*
|
|
3717
|
-
*
|
|
3790
|
+
* `validateFiles`' UI-tier pre-checks (empty, negative, unbuilt marker,
|
|
3791
|
+
* processing error), which have one holder each and no drift, and word their
|
|
3792
|
+
* sentences by the same family.
|
|
3718
3793
|
*/
|
|
3719
3794
|
|
|
3720
3795
|
/** What a rule is asked about: one file, and the deploy so far. */
|
|
@@ -3766,6 +3841,15 @@ declare function validateDeployPath(deployPath: string, sourceIdentifier: string
|
|
|
3766
3841
|
* @throws {ShipError} The first broken rule's sentence
|
|
3767
3842
|
*/
|
|
3768
3843
|
declare function validateDeployFile(input: FileRuleInput, limits: PlatformLimits): void;
|
|
3844
|
+
/**
|
|
3845
|
+
* The throwing renderer of `COUNT_RULE`: the deploy's file count, judged over
|
|
3846
|
+
* the files the pipeline will send.
|
|
3847
|
+
*
|
|
3848
|
+
* @param count - How many files the deploy carries
|
|
3849
|
+
* @param limits - The platform's limits, from `/limits`
|
|
3850
|
+
* @throws {ShipError} The count rule's sentence
|
|
3851
|
+
*/
|
|
3852
|
+
declare function validateDeployCount(count: number, limits: PlatformLimits): void;
|
|
3769
3853
|
|
|
3770
3854
|
/**
|
|
3771
3855
|
* Utility functions for string manipulation.
|
|
@@ -3850,4 +3934,4 @@ declare class Ship extends Ship$1 {
|
|
|
3850
3934
|
protected processInput(input: DeployInput, options: DeploymentOptions, limits: PlatformLimits): Promise<StaticFile[]>;
|
|
3851
3935
|
}
|
|
3852
3936
|
|
|
3853
|
-
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,
|
|
3937
|
+
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 AccountUsage, 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 DoorSegment, 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, 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, USAGE_KIND, USER_VISIBLE_EVENTS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, countPhrase, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, doorOf, doors, errandOf, excessOver, extractSubdomain, filterJunk, fitPhrase, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, placesTaken, pluralize, processFilesForBrowser, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployCount, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
|