@shipstatic/types 2.21.0 → 2.21.2
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/LICENSE +1 -1
- package/README.md +17 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +15 -5
- package/src/index.ts +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -7,16 +7,16 @@ Single source of truth for types used across API, SDK, CLI, and web applications
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
# Included with
|
|
10
|
+
# Included with the ShipStatic SDK
|
|
11
11
|
npm install @shipstatic/ship
|
|
12
12
|
|
|
13
13
|
# Direct installation
|
|
14
14
|
npm install @shipstatic/types
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
## What's
|
|
17
|
+
## What's included
|
|
18
18
|
|
|
19
|
-
### Core
|
|
19
|
+
### Core entities
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
import type {
|
|
@@ -38,7 +38,7 @@ survives, otherwise the `*DeleteResponse` shape: the resource noun carrying
|
|
|
38
38
|
the canonical key, plus the resource's own state field where the resource is
|
|
39
39
|
mid-transition. No `message`, no `success`, no constant flags.
|
|
40
40
|
|
|
41
|
-
### Error
|
|
41
|
+
### Error system
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
44
|
import { ShipError, ErrorType, isShipError } from '@shipstatic/types';
|
|
@@ -84,7 +84,7 @@ catch (cause) { throw ShipError.fromFetchError(cause, 'Get account'); }
|
|
|
84
84
|
|
|
85
85
|
Both helpers accept an optional operation-name string for contextual messages (`"Get account was cancelled"`, `"Get account failed: ..."`).
|
|
86
86
|
|
|
87
|
-
### Status
|
|
87
|
+
### Status constants
|
|
88
88
|
|
|
89
89
|
```typescript
|
|
90
90
|
import {
|
|
@@ -109,7 +109,7 @@ import type {
|
|
|
109
109
|
} from '@shipstatic/types';
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
### Resource
|
|
112
|
+
### Resource contracts
|
|
113
113
|
|
|
114
114
|
SDK interface definitions:
|
|
115
115
|
|
|
@@ -122,7 +122,7 @@ import type {
|
|
|
122
122
|
} from '@shipstatic/types';
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
### Validation
|
|
125
|
+
### Validation utilities
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
128
|
import {
|
|
@@ -146,7 +146,7 @@ const limits = await ship.getLimits();
|
|
|
146
146
|
isBlockedExtension('virus.exe', limits.blockedExtensions ?? []);
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
### File
|
|
149
|
+
### File upload types
|
|
150
150
|
|
|
151
151
|
```typescript
|
|
152
152
|
import type {
|
|
@@ -157,7 +157,7 @@ import type {
|
|
|
157
157
|
} from '@shipstatic/types';
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
### Domain
|
|
160
|
+
### Domain utilities
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
import {
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
} from '@shipstatic/types';
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
### Label
|
|
172
|
+
### Label utilities
|
|
173
173
|
|
|
174
174
|
```typescript
|
|
175
175
|
import {
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
} from '@shipstatic/types';
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
### Password
|
|
183
|
+
### Password utilities
|
|
184
184
|
|
|
185
185
|
```typescript
|
|
186
186
|
import {
|
|
@@ -212,6 +212,12 @@ function processDeployment(deployment: Deployment) {
|
|
|
212
212
|
}
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
+
## Also available
|
|
216
|
+
|
|
217
|
+
Part of [ShipStatic](https://shipstatic.com). This package is a building
|
|
218
|
+
block; the ways to actually deploy something are listed at
|
|
219
|
+
[shipstatic.com](https://shipstatic.com).
|
|
220
|
+
|
|
215
221
|
## License
|
|
216
222
|
|
|
217
223
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -877,7 +877,7 @@ export declare const ErrorType: {
|
|
|
877
877
|
* purpose, and deployed sites keep serving throughout.
|
|
878
878
|
*
|
|
879
879
|
* Distinct from `Api` at 503, which the platform already uses for a
|
|
880
|
-
* dependency that failed
|
|
880
|
+
* dependency that failed. A consumer has to tell
|
|
881
881
|
* "we closed the door" from "something broke": the two get opposite words
|
|
882
882
|
* and opposite retry behaviour.
|
|
883
883
|
*/
|
package/dist/index.js
CHANGED
|
@@ -354,7 +354,7 @@ export const ErrorType = {
|
|
|
354
354
|
* purpose, and deployed sites keep serving throughout.
|
|
355
355
|
*
|
|
356
356
|
* Distinct from `Api` at 503, which the platform already uses for a
|
|
357
|
-
* dependency that failed
|
|
357
|
+
* dependency that failed. A consumer has to tell
|
|
358
358
|
* "we closed the door" from "something broke": the two get opposite words
|
|
359
359
|
* and opposite retry behaviour.
|
|
360
360
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipstatic/types",
|
|
3
|
-
"version": "2.21.
|
|
4
|
-
"description": "Shared types for ShipStatic platform",
|
|
3
|
+
"version": "2.21.2",
|
|
4
|
+
"description": "Shared TypeScript types for the ShipStatic platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"lint": "biome check .",
|
|
20
20
|
"format": "biome format --write .",
|
|
21
21
|
"prepare": "git config core.hooksPath scripts/githooks",
|
|
22
|
-
"typecheck": "tsc -p tsconfig.check.json --noEmit"
|
|
22
|
+
"typecheck": "tsc -p tsconfig.check.json --noEmit",
|
|
23
|
+
"check:package": "publint && attw --pack . --ignore-rules cjs-resolves-to-esm"
|
|
23
24
|
},
|
|
24
25
|
"packageManager": "pnpm@10.12.4",
|
|
25
26
|
"files": [
|
|
@@ -27,12 +28,19 @@
|
|
|
27
28
|
"src"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
31
|
+
"shipstatic",
|
|
32
|
+
"deploy",
|
|
33
|
+
"hosting",
|
|
34
|
+
"static-site",
|
|
35
|
+
"static-hosting",
|
|
36
|
+
"web-hosting",
|
|
37
|
+
"website",
|
|
30
38
|
"types",
|
|
31
|
-
"
|
|
39
|
+
"typescript"
|
|
32
40
|
],
|
|
33
41
|
"author": "ShipStatic",
|
|
34
42
|
"license": "MIT",
|
|
35
|
-
"homepage": "https://
|
|
43
|
+
"homepage": "https://shipstatic.com",
|
|
36
44
|
"repository": {
|
|
37
45
|
"type": "git",
|
|
38
46
|
"url": "git+https://github.com/shipstatic/types.git"
|
|
@@ -44,8 +52,10 @@
|
|
|
44
52
|
"node": ">=20.19.0"
|
|
45
53
|
},
|
|
46
54
|
"devDependencies": {
|
|
55
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
47
56
|
"@biomejs/biome": "2.5.5",
|
|
48
57
|
"@types/node": "^24.13.3",
|
|
58
|
+
"publint": "^0.3.24",
|
|
49
59
|
"typescript": "^5.9.3",
|
|
50
60
|
"vitest": "^2.1.9"
|
|
51
61
|
},
|
package/src/index.ts
CHANGED
|
@@ -966,7 +966,7 @@ export const ErrorType = {
|
|
|
966
966
|
* purpose, and deployed sites keep serving throughout.
|
|
967
967
|
*
|
|
968
968
|
* Distinct from `Api` at 503, which the platform already uses for a
|
|
969
|
-
* dependency that failed
|
|
969
|
+
* dependency that failed. A consumer has to tell
|
|
970
970
|
* "we closed the door" from "something broke": the two get opposite words
|
|
971
971
|
* and opposite retry behaviour.
|
|
972
972
|
*/
|