@shipstatic/drop 2.15.1-beta.0 → 2.15.1-beta.1
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/index.cjs +1 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -119
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +2 -120
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +2 -120
- package/dist/testing.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -9,89 +9,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var ignore__default = /*#__PURE__*/_interopDefault(ignore);
|
|
10
10
|
|
|
11
11
|
// src/process.ts
|
|
12
|
-
var ErrorType = {
|
|
13
|
-
/**
|
|
14
|
-
* Validation failed. Input shape is wrong.
|
|
15
|
-
*
|
|
16
|
-
* Carries 400 when an API judged it — including a client-side pre-check of a
|
|
17
|
-
* rule the server enforces too, which keeps the error identical wherever it
|
|
18
|
-
* was caught. **Statusless** when a client rejects something no API judges,
|
|
19
|
-
* such as a CLI's own command grammar: `status` is documented "(API
|
|
20
|
-
* contexts)" on `ErrorResponse`, so there is none to report.
|
|
21
|
-
*/
|
|
22
|
-
Validation: "validation_failed",
|
|
23
|
-
/** Resource not found (404). */
|
|
24
|
-
NotFound: "not_found",
|
|
25
|
-
/** Authenticated but not allowed (403). User lacks permission for this action. */
|
|
26
|
-
Forbidden: "forbidden",
|
|
27
|
-
/** Rate limit exceeded (429). */
|
|
28
|
-
RateLimit: "rate_limit_exceeded",
|
|
29
|
-
/** Authentication required or failed (401). Missing/invalid credentials. */
|
|
30
|
-
Authentication: "authentication_failed",
|
|
31
|
-
/** Business rule violation. Catch-all for 4xx state-rule errors that aren't more specific. */
|
|
32
|
-
Business: "business_logic_error",
|
|
33
|
-
/** API server error (500). Generic server-side fault. */
|
|
34
|
-
Api: "internal_server_error",
|
|
35
|
-
/**
|
|
36
|
-
* The platform is closed for maintenance (503). A deliberate operator
|
|
37
|
-
* state, not a fault — nothing errored; the API is refusing work on
|
|
38
|
-
* purpose, and deployed sites keep serving throughout.
|
|
39
|
-
*
|
|
40
|
-
* Distinct from `Api` at 503, which the platform already uses for a
|
|
41
|
-
* dependency that failed. A consumer has to tell
|
|
42
|
-
* "we closed the door" from "something broke": the two get opposite words
|
|
43
|
-
* and opposite retry behaviour.
|
|
44
|
-
*/
|
|
45
|
-
Maintenance: "maintenance",
|
|
46
|
-
/**
|
|
47
|
-
* The project could not be built as submitted (422). The platform ran the
|
|
48
|
-
* caller's own instructions, the dependency install and then the build
|
|
49
|
-
* script, and they failed. So the verdict is the caller's: deterministic,
|
|
50
|
-
* not worth a retry, and answered with the evidence. `details` is a
|
|
51
|
-
* `BuildFailureDetails`, and the message is the one sentence the builder
|
|
52
|
-
* authored for the person who will fix the project.
|
|
53
|
-
*
|
|
54
|
-
* Distinct from `Api` at 500, which is what the platform answers when it
|
|
55
|
-
* could not RUN the build at all (the sandbox failed to start, a host
|
|
56
|
-
* fault). A consumer has to tell "your project cannot be built" from "we
|
|
57
|
-
* could not build it": the two get opposite words, opposite retry
|
|
58
|
-
* behaviour, and only the second pages an operator.
|
|
59
|
-
*/
|
|
60
|
-
Build: "build_failed",
|
|
61
|
-
/** Network/connection error. Client-side only — set by HTTP clients on fetch failure; never produced server-side. */
|
|
62
|
-
Network: "network_error",
|
|
63
|
-
/**
|
|
64
|
-
* A deadline expired before the exchange completed. Client-side only — set
|
|
65
|
-
* by HTTP clients when a timeout signal fires; never produced server-side.
|
|
66
|
-
*
|
|
67
|
-
* A member of the NETWORK category rather than a sibling of it:
|
|
68
|
-
* `isNetworkError()` answers "nothing was exchanged", which is true of a
|
|
69
|
-
* deadline exactly as it is of a refused connection, so every consumer that
|
|
70
|
-
* retries, declines to report, or declines to relay a wire message on that
|
|
71
|
-
* category is already right about a timeout. The distinct TYPE exists for
|
|
72
|
-
* the one decision the category cannot make — what to SAY. "Check your
|
|
73
|
-
* internet connection" is the wrong sentence for a five-minute deploy
|
|
74
|
-
* ceiling, and a surface can only tell the two apart by type.
|
|
75
|
-
*
|
|
76
|
-
* The same relationship every comparable SDK ships:
|
|
77
|
-
* `APIConnectionTimeoutError extends APIConnectionError`.
|
|
78
|
-
*/
|
|
79
|
-
Timeout: "timeout_error",
|
|
80
|
-
/** Operation was cancelled. Client-side only — set on `AbortSignal` abort; never produced server-side. */
|
|
81
|
-
Cancelled: "operation_cancelled",
|
|
82
|
-
/** File operation error. Client-side only — set by SDK during local file processing; never produced server-side. */
|
|
83
|
-
File: "file_error",
|
|
84
|
-
/** Configuration error. Client-side only — set by SDK during config parsing/validation; never produced server-side. */
|
|
85
|
-
Config: "config_error"
|
|
86
|
-
};
|
|
87
|
-
var CLIENT_ONLY_ERROR_TYPES = /* @__PURE__ */ new Set([
|
|
88
|
-
ErrorType.Network,
|
|
89
|
-
ErrorType.Timeout,
|
|
90
|
-
ErrorType.Cancelled,
|
|
91
|
-
ErrorType.File,
|
|
92
|
-
ErrorType.Config
|
|
93
|
-
]);
|
|
94
|
-
new Set(Object.values(ErrorType).filter((t) => !CLIENT_ONLY_ERROR_TYPES.has(t)));
|
|
95
12
|
var WEB_FILE_EXTENSIONS = [
|
|
96
13
|
// Markup & documents
|
|
97
14
|
"html",
|
|
@@ -175,7 +92,7 @@ var WEB_FILE_EXTENSIONS = [
|
|
|
175
92
|
// Archive — a whole site in one file
|
|
176
93
|
"zip"
|
|
177
94
|
];
|
|
178
|
-
var WEB_FILE_ACCEPT = WEB_FILE_EXTENSIONS.map((ext) => `.${ext}`).join(",");
|
|
95
|
+
var WEB_FILE_ACCEPT = /* @__PURE__ */ (() => WEB_FILE_EXTENSIONS.map((ext) => `.${ext}`).join(","))();
|
|
179
96
|
var UNBUILT_PROJECT_MARKERS = /* @__PURE__ */ new Set([
|
|
180
97
|
"node_modules",
|
|
181
98
|
"package.json"
|
|
@@ -184,41 +101,6 @@ function hasUnbuiltMarker(filePath2) {
|
|
|
184
101
|
const segments2 = filePath2.replace(/\\/g, "/").split("/").filter(Boolean);
|
|
185
102
|
return segments2.some((s) => UNBUILT_PROJECT_MARKERS.has(s));
|
|
186
103
|
}
|
|
187
|
-
var BILLING_RETURNS = {
|
|
188
|
-
checkout: ["upgrading", "true"],
|
|
189
|
-
portal: ["billing", "returned"]
|
|
190
|
-
};
|
|
191
|
-
var marker = (kind) => BILLING_RETURNS[kind].join("=");
|
|
192
|
-
var withNext = (door, next) => next ? `${door}?next=${encodeURIComponent(next)}` : door;
|
|
193
|
-
function consolePaths(account) {
|
|
194
|
-
const base = "";
|
|
195
|
-
const at = (path) => `${base}${path}`;
|
|
196
|
-
return {
|
|
197
|
-
dashboard: () => "/",
|
|
198
|
-
newSite: () => at("/new"),
|
|
199
|
-
deployments: Object.assign(() => at("/deployments"), {
|
|
200
|
-
upload: () => at("/deployments/upload")
|
|
201
|
-
}),
|
|
202
|
-
domains: Object.assign(() => at("/domains"), {
|
|
203
|
-
connect: (domain) => at(`/domains/${domain}/connect`),
|
|
204
|
-
deployment: (domain) => at(`/domains/${domain}/deployment`)
|
|
205
|
-
}),
|
|
206
|
-
settings: (fragment) => at(fragment ? `/settings#${fragment}` : "/settings"),
|
|
207
|
-
/** The claim of an anonymous deployment into this account; the API mails the bare form. */
|
|
208
|
-
claim: (code) => at(`/claim/${code}`),
|
|
209
|
-
/** Settings, marked as the landing of a Stripe Customer Portal return. */
|
|
210
|
-
settingsAfterBilling: () => at(`/settings?${marker("portal")}`),
|
|
211
|
-
upgrade: (plan) => at(plan ? `/upgrade/${plan}` : "/upgrade"),
|
|
212
|
-
success: () => at("/success"),
|
|
213
|
-
/** The success page, marked as the landing of a Stripe Checkout return. */
|
|
214
|
-
successAfterCheckout: () => at(`/success?${marker("checkout")}`),
|
|
215
|
-
apiKey: () => at("/api-key")
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
Object.assign(({ next } = {}) => withNext("/login", next), {
|
|
219
|
-
link: ({ token, next }) => withNext(`/login/link/${token}`, next)
|
|
220
|
-
});
|
|
221
|
-
`https://my.shipstatic.com${consolePaths().apiKey()}`;
|
|
222
104
|
var FileValidationStatus = {
|
|
223
105
|
/** File is pending validation */
|
|
224
106
|
PENDING: "pending",
|