@akterjs/cli 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/README.md +47 -2
- package/dist/Argument-D81dqizB.mjs +57 -0
- package/dist/Array-B4kuTQeW.mjs +2323 -0
- package/dist/Boolean-kILIvmhE.mjs +26 -0
- package/dist/ChildProcess-BCIwxPGc.mjs +577 -0
- package/dist/CliError-Cf5xqkkj.mjs +633 -0
- package/dist/Command-Dzq9KM-h.mjs +5135 -0
- package/dist/Config-B6OND9WR.mjs +854 -0
- package/dist/Console-BKHUkH6a.mjs +141 -0
- package/dist/Data-CeCULr0-.mjs +251 -0
- package/dist/Digest-CBd3uv5B.mjs +348 -0
- package/dist/Duration-EH9Vy4U6.mjs +791 -0
- package/dist/Effect-CKFpqbmw.mjs +12911 -0
- package/dist/FileSystem-4pPcEb_i.mjs +1366 -0
- package/dist/HttpClientError-BUeMWx70.mjs +303 -0
- package/dist/HttpClientResponse-D5ZKICVV.mjs +855 -0
- package/dist/Match-CGPLZYrV.mjs +434 -0
- package/dist/MutableHashMap-f8nW8AJR.mjs +376 -0
- package/dist/MutableHashSet-_HI572Ya.mjs +155 -0
- package/dist/MutableRef-D4Qv592C.mjs +107 -0
- package/dist/Number-BvkRkfc-.mjs +137 -0
- package/dist/Option-DkxSnBhp.mjs +3967 -0
- package/dist/Order-C1JC991I.mjs +481 -0
- package/dist/Path-Djdv_eF5.mjs +130 -0
- package/dist/Queue-CO5UQ6os.mjs +1394 -0
- package/dist/Redacted-RkJrG5Me.mjs +160 -0
- package/dist/Ref-BIPOxJNH.mjs +267 -0
- package/dist/Runtime-BInIAwK3.mjs +297 -0
- package/dist/Schema-MiKt5K1v.mjs +10999 -0
- package/dist/SecureRandom-B_U4ysO3.mjs +279 -0
- package/dist/Semaphore-DOVJ4ZGS.mjs +177 -0
- package/dist/Stdio-KylmOBX_.mjs +74 -0
- package/dist/Stream-bK9QIETN.mjs +4012 -0
- package/dist/String-q5dcsVe4.mjs +351 -0
- package/dist/TerminalCapabilities-w_44MAca.mjs +1769 -0
- package/dist/WebCrypto-ZI_GNVlw.mjs +33 -0
- package/dist/actor-call.service-CGM_vD9u.mjs +1269 -0
- package/dist/actor-client.adapter-Coem7gF1.mjs +3691 -0
- package/dist/akter-program.config-C4cXx4Fr.mjs +7034 -0
- package/dist/akter.cli.mjs +5 -0
- package/dist/app-cli.config.mjs +49 -0
- package/dist/app-entry.pure.mjs +31 -0
- package/dist/archive/akter-archive.schema.mjs +65 -0
- package/dist/archive/akter-archive.service.mjs +309 -0
- package/dist/archive/archive-cli.config.mjs +45 -0
- package/dist/archive/archive-invalid.errors.mjs +5 -0
- package/dist/archive/archived-lineage.pure.mjs +13 -0
- package/dist/archive/tar.pure.mjs +291 -0
- package/dist/archive/zstd.adapter.mjs +46 -0
- package/dist/bench/bench-report.pure.mjs +120 -0
- package/dist/bench/bench-runner.pure.mjs +89 -0
- package/dist/bench/bench.service.mjs +301 -0
- package/dist/cli-runtime.layer-BqK2mmVL.mjs +1191 -0
- package/dist/cli-runtime.layer.mjs +1 -0
- package/dist/cloud-client.adapter-Cy1BjDbG.mjs +3186 -0
- package/dist/cloud-client.adapter-DOVMoYAj.mjs +304 -0
- package/dist/command/akter-commands.config.mjs +32 -0
- package/dist/command/akter-program.config.mjs +1 -0
- package/dist/credentials/credentials.service.mjs +226 -0
- package/dist/credentials/keychain.adapter.mjs +92 -0
- package/dist/credentials/login.config.mjs +251 -0
- package/dist/deploy/auth/api-attempt.service.mjs +30 -0
- package/dist/deploy/auth/token-refresh.errors.mjs +4 -0
- package/dist/deploy/build-bundle.adapter.mjs +133 -0
- package/dist/deploy/build-manifest.pure.mjs +44 -0
- package/dist/deploy/cloud-client.adapter.mjs +1 -0
- package/dist/deploy/cloud-url.pure.mjs +17 -0
- package/dist/deploy/deploy-failed.errors.mjs +17 -0
- package/dist/deploy/deploy.service.mjs +156 -0
- package/dist/deploy/request-failure.pure.mjs +87 -0
- package/dist/dev-runner.pure.mjs +30 -0
- package/dist/docs/doc-topics.pure.mjs +21 -0
- package/dist/docs/docs.config.mjs +1 -0
- package/dist/docs.config-_21Xi6HU.mjs +190 -0
- package/dist/export/actor-export.service.mjs +267 -0
- package/dist/export/export-failed.errors.mjs +4 -0
- package/dist/export/export-failure.pure.mjs +18 -0
- package/dist/export/ordered-lines.pure.mjs +43 -0
- package/dist/export/ranged-download.pure.mjs +66 -0
- package/dist/export/snapshot-download.pure.mjs +86 -0
- package/dist/history-runner.pure.mjs +186 -0
- package/dist/history-since.pure.mjs +17 -0
- package/dist/hosted-runtime.layer-Cx3IPsEd.mjs +16358 -0
- package/dist/local/environment-cli.config.mjs +90 -0
- package/dist/local/environment-runner.pure.mjs +75 -0
- package/dist/local/local-cli.config.mjs +159 -0
- package/dist/logs/log-follow.config.mjs +21 -0
- package/dist/logs/log-follow.service.mjs +87 -0
- package/dist/logs/log-lines.pure.mjs +44 -0
- package/dist/migrate-runner.pure.mjs +28 -0
- package/dist/operation-input.pure-CS9iUhqK.mjs +1383 -0
- package/dist/operation-registry.pure-DVC8EDgj.mjs +283 -0
- package/dist/registry/actor-call.service.mjs +1 -0
- package/dist/registry/actor-commands.config.mjs +127 -0
- package/dist/registry/actor-refusal.pure.mjs +34 -0
- package/dist/registry/approval.service.mjs +80 -0
- package/dist/registry/cloud-commands.config.mjs +151 -0
- package/dist/registry/cloud-served.pure.mjs +31 -0
- package/dist/registry/operation-call.service.mjs +262 -0
- package/dist/registry/operation-input.pure.mjs +1 -0
- package/dist/registry/operation-output.pure.mjs +91 -0
- package/dist/registry/served-command.config.mjs +57 -0
- package/dist/runner-exited.errors.mjs +10 -0
- package/dist/terminal/cli-exit.errors.mjs +38 -0
- package/dist/terminal/cli-failure.pure.mjs +31 -0
- package/dist/terminal/confirm.adapter.mjs +27 -0
- package/package.json +61 -3
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { i as TaggedError } from "./Data-CeCULr0-.mjs";
|
|
2
|
+
import { qt as hasProperty } from "./Option-DkxSnBhp.mjs";
|
|
3
|
+
import { S as Literals, d as Defect, in as optional, p as Error, sn as tag, zn as redactUrl } from "./Schema-MiKt5K1v.mjs";
|
|
4
|
+
// ../../node_modules/.pnpm/effect@4.1.2_patch_hash=0e61176203bb1256381ce1c5b488d7951983ce38ff698647d3f4617383abbf07/node_modules/effect/dist/http/HttpClientError.js
|
|
5
|
+
/**
|
|
6
|
+
* Typed failure model for Effect HTTP client operations.
|
|
7
|
+
*
|
|
8
|
+
* HTTP clients wrap request construction, transport, status-code validation, and
|
|
9
|
+
* response decoding failures in `HttpClientError`. The wrapper keeps the failed
|
|
10
|
+
* request and the specific failure reason together, so callers can handle client
|
|
11
|
+
* failures uniformly while still matching on the reason `_tag` for retry
|
|
12
|
+
* policy, logging, metrics, and user-facing messages.
|
|
13
|
+
*
|
|
14
|
+
* @stability unstable
|
|
15
|
+
* @since 4.0.0
|
|
16
|
+
*/
|
|
17
|
+
const TypeId = "~effect/http/HttpClientError";
|
|
18
|
+
/**
|
|
19
|
+
* Returns `true` when a value is an `HttpClientError`.
|
|
20
|
+
*
|
|
21
|
+
* @stability unstable
|
|
22
|
+
* @category guards
|
|
23
|
+
* @since 4.0.0
|
|
24
|
+
*/
|
|
25
|
+
const isHttpClientError = (u) => hasProperty(u, TypeId);
|
|
26
|
+
/**
|
|
27
|
+
* Error wrapper for HTTP client failures, exposing the failed request and the optional response through its `reason`.
|
|
28
|
+
*
|
|
29
|
+
* @stability unstable
|
|
30
|
+
* @category errors
|
|
31
|
+
* @since 4.0.0
|
|
32
|
+
*/
|
|
33
|
+
var HttpClientError = class extends (/*#__PURE__*/ TaggedError("HttpClientError")) {
|
|
34
|
+
constructor(props) {
|
|
35
|
+
if ("cause" in props.reason) super({
|
|
36
|
+
...props,
|
|
37
|
+
cause: props.reason.cause
|
|
38
|
+
});
|
|
39
|
+
else super(props);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Marks this value as an HTTP client error for runtime guards.
|
|
43
|
+
*
|
|
44
|
+
* @stability unstable
|
|
45
|
+
* @since 4.0.0
|
|
46
|
+
*/
|
|
47
|
+
[TypeId] = TypeId;
|
|
48
|
+
/**
|
|
49
|
+
* HTTP request associated with the client failure.
|
|
50
|
+
*
|
|
51
|
+
* @stability unstable
|
|
52
|
+
* @since 4.0.0
|
|
53
|
+
*/
|
|
54
|
+
get request() {
|
|
55
|
+
return this.reason.request;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* HTTP response associated with the client failure, when one was received.
|
|
59
|
+
*
|
|
60
|
+
* @stability unstable
|
|
61
|
+
* @since 4.0.0
|
|
62
|
+
*/
|
|
63
|
+
get response() {
|
|
64
|
+
return "response" in this.reason ? this.reason.response : void 0;
|
|
65
|
+
}
|
|
66
|
+
get message() {
|
|
67
|
+
return this.reason.message;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const formatReason = (tag) => tag.endsWith("Error") ? tag.slice(0, -5) : tag;
|
|
71
|
+
const formatMessage = (reason, description, info) => description ? `${reason}: ${description} (${info})` : `${reason} error (${info})`;
|
|
72
|
+
const formatMethodAndUrl = (request) => `${request.method} ${redactUrl(request.url)}`;
|
|
73
|
+
const reasonToJSON = (reason, json) => ({
|
|
74
|
+
...json,
|
|
75
|
+
request: {
|
|
76
|
+
_id: "HttpClientRequest",
|
|
77
|
+
method: reason.request.method,
|
|
78
|
+
url: redactUrl(reason.request.url)
|
|
79
|
+
},
|
|
80
|
+
..."response" in reason ? { response: {
|
|
81
|
+
_id: "HttpClientResponse",
|
|
82
|
+
status: reason.response.status
|
|
83
|
+
} } : void 0
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* Error describing transport-level failures that occur while sending an HTTP request.
|
|
87
|
+
*
|
|
88
|
+
* @stability unstable
|
|
89
|
+
* @category errors
|
|
90
|
+
* @since 4.0.0
|
|
91
|
+
*/
|
|
92
|
+
var TransportError = class extends (/*#__PURE__*/ TaggedError("TransportError")) {
|
|
93
|
+
/**
|
|
94
|
+
* Formats the request method and URL for transport error messages.
|
|
95
|
+
*
|
|
96
|
+
* @stability unstable
|
|
97
|
+
* @since 4.0.0
|
|
98
|
+
*/
|
|
99
|
+
get methodAndUrl() {
|
|
100
|
+
return formatMethodAndUrl(this.request);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Builds the transport error message from the optional description and request details.
|
|
104
|
+
*
|
|
105
|
+
* @stability unstable
|
|
106
|
+
* @since 4.0.0
|
|
107
|
+
*/
|
|
108
|
+
get message() {
|
|
109
|
+
return formatMessage(formatReason(this._tag), this.description, this.methodAndUrl);
|
|
110
|
+
}
|
|
111
|
+
toJSON() {
|
|
112
|
+
return reasonToJSON(this, super.toJSON());
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Error describing failures while encoding an HTTP request body.
|
|
117
|
+
*
|
|
118
|
+
* @stability unstable
|
|
119
|
+
* @category errors
|
|
120
|
+
* @since 4.0.0
|
|
121
|
+
*/
|
|
122
|
+
var EncodeError = class extends (/*#__PURE__*/ TaggedError("EncodeError")) {
|
|
123
|
+
/**
|
|
124
|
+
* Formats the request method and URL for request encoding error messages.
|
|
125
|
+
*
|
|
126
|
+
* @stability unstable
|
|
127
|
+
* @since 4.0.0
|
|
128
|
+
*/
|
|
129
|
+
get methodAndUrl() {
|
|
130
|
+
return formatMethodAndUrl(this.request);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Builds the request encoding error message from the optional description and request details.
|
|
134
|
+
*
|
|
135
|
+
* @stability unstable
|
|
136
|
+
* @since 4.0.0
|
|
137
|
+
*/
|
|
138
|
+
get message() {
|
|
139
|
+
return formatMessage(formatReason(this._tag), this.description, this.methodAndUrl);
|
|
140
|
+
}
|
|
141
|
+
toJSON() {
|
|
142
|
+
return reasonToJSON(this, super.toJSON());
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Error describing failures while constructing a URL from an HTTP client request.
|
|
147
|
+
*
|
|
148
|
+
* @stability unstable
|
|
149
|
+
* @category errors
|
|
150
|
+
* @since 4.0.0
|
|
151
|
+
*/
|
|
152
|
+
var InvalidUrlError = class extends (/*#__PURE__*/ TaggedError("InvalidUrlError")) {
|
|
153
|
+
/**
|
|
154
|
+
* Formats the request method and URL for invalid URL error messages.
|
|
155
|
+
*
|
|
156
|
+
* @stability unstable
|
|
157
|
+
* @since 4.0.0
|
|
158
|
+
*/
|
|
159
|
+
get methodAndUrl() {
|
|
160
|
+
return formatMethodAndUrl(this.request);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Builds the invalid URL error message from the optional description and request details.
|
|
164
|
+
*
|
|
165
|
+
* @stability unstable
|
|
166
|
+
* @since 4.0.0
|
|
167
|
+
*/
|
|
168
|
+
get message() {
|
|
169
|
+
return formatMessage(formatReason(this._tag), this.description, this.methodAndUrl);
|
|
170
|
+
}
|
|
171
|
+
toJSON() {
|
|
172
|
+
return reasonToJSON(this, super.toJSON());
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Response error for HTTP responses rejected because of their status code.
|
|
177
|
+
*
|
|
178
|
+
* @stability unstable
|
|
179
|
+
* @category errors
|
|
180
|
+
* @since 4.0.0
|
|
181
|
+
*/
|
|
182
|
+
var StatusCodeError = class extends (/*#__PURE__*/ TaggedError("StatusCodeError")) {
|
|
183
|
+
/**
|
|
184
|
+
* Formats the request method and URL for status code error messages.
|
|
185
|
+
*
|
|
186
|
+
* @stability unstable
|
|
187
|
+
* @since 4.0.0
|
|
188
|
+
*/
|
|
189
|
+
get methodAndUrl() {
|
|
190
|
+
return formatMethodAndUrl(this.request);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Builds the status code error message from the response status, optional description, and request details.
|
|
194
|
+
*
|
|
195
|
+
* @stability unstable
|
|
196
|
+
* @since 4.0.0
|
|
197
|
+
*/
|
|
198
|
+
get message() {
|
|
199
|
+
const info = `${this.response.status} ${this.methodAndUrl}`;
|
|
200
|
+
return formatMessage(formatReason(this._tag), this.description, info);
|
|
201
|
+
}
|
|
202
|
+
toJSON() {
|
|
203
|
+
return reasonToJSON(this, super.toJSON());
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Response error for failures while decoding an HTTP response, including a
|
|
208
|
+
* response with an undeclared status.
|
|
209
|
+
*
|
|
210
|
+
* @stability unstable
|
|
211
|
+
* @category errors
|
|
212
|
+
* @since 4.0.0
|
|
213
|
+
*/
|
|
214
|
+
var DecodeError = class extends (/*#__PURE__*/ TaggedError("DecodeError")) {
|
|
215
|
+
/**
|
|
216
|
+
* Formats the request method and URL for response decoding error messages.
|
|
217
|
+
*
|
|
218
|
+
* @stability unstable
|
|
219
|
+
* @since 4.0.0
|
|
220
|
+
*/
|
|
221
|
+
get methodAndUrl() {
|
|
222
|
+
return formatMethodAndUrl(this.request);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Builds the response decoding error message from the response status, optional description, and request details.
|
|
226
|
+
*
|
|
227
|
+
* @stability unstable
|
|
228
|
+
* @since 4.0.0
|
|
229
|
+
*/
|
|
230
|
+
get message() {
|
|
231
|
+
const info = `${this.response.status} ${this.methodAndUrl}`;
|
|
232
|
+
return formatMessage(formatReason(this._tag), this.description, info);
|
|
233
|
+
}
|
|
234
|
+
toJSON() {
|
|
235
|
+
return reasonToJSON(this, super.toJSON());
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Response error for operations that expected a response body but received an empty body.
|
|
240
|
+
*
|
|
241
|
+
* @stability unstable
|
|
242
|
+
* @category errors
|
|
243
|
+
* @since 4.0.0
|
|
244
|
+
*/
|
|
245
|
+
var EmptyBodyError = class extends (/*#__PURE__*/ TaggedError("EmptyBodyError")) {
|
|
246
|
+
/**
|
|
247
|
+
* Formats the request method and URL for empty response body error messages.
|
|
248
|
+
*
|
|
249
|
+
* @stability unstable
|
|
250
|
+
* @since 4.0.0
|
|
251
|
+
*/
|
|
252
|
+
get methodAndUrl() {
|
|
253
|
+
return formatMethodAndUrl(this.request);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Builds the empty body error message from the response status, optional description, and request details.
|
|
257
|
+
*
|
|
258
|
+
* @stability unstable
|
|
259
|
+
* @since 4.0.0
|
|
260
|
+
*/
|
|
261
|
+
get message() {
|
|
262
|
+
const info = `${this.response.status} ${this.methodAndUrl}`;
|
|
263
|
+
return formatMessage(formatReason(this._tag), this.description, info);
|
|
264
|
+
}
|
|
265
|
+
toJSON() {
|
|
266
|
+
return reasonToJSON(this, super.toJSON());
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Schema for serializable HTTP client errors, preserving the specific error kind
|
|
271
|
+
* and cause.
|
|
272
|
+
*
|
|
273
|
+
* @stability unstable
|
|
274
|
+
* @category schemas
|
|
275
|
+
* @since 4.0.0
|
|
276
|
+
*/
|
|
277
|
+
var HttpClientErrorSchema = class HttpClientErrorSchema extends (/*#__PURE__*/ Error(TypeId)({
|
|
278
|
+
_tag: /*#__PURE__*/ tag("HttpError"),
|
|
279
|
+
kind: /*#__PURE__*/ Literals([
|
|
280
|
+
"EncodeError",
|
|
281
|
+
"DecodeError",
|
|
282
|
+
"TransportError",
|
|
283
|
+
"InvalidUrlError",
|
|
284
|
+
"StatusCodeError",
|
|
285
|
+
"EmptyBodyError"
|
|
286
|
+
]),
|
|
287
|
+
cause: /*#__PURE__*/ optional(/*#__PURE__*/ Defect())
|
|
288
|
+
})) {
|
|
289
|
+
/**
|
|
290
|
+
* Builds the serializable schema representation for an HTTP client error.
|
|
291
|
+
*
|
|
292
|
+
* @stability unstable
|
|
293
|
+
* @since 4.0.0
|
|
294
|
+
*/
|
|
295
|
+
static fromHttpClientError(error) {
|
|
296
|
+
return new HttpClientErrorSchema({
|
|
297
|
+
_tag: "HttpError",
|
|
298
|
+
kind: error.reason._tag,
|
|
299
|
+
cause: error.reason
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
export { HttpClientErrorSchema as a, TransportError as c, HttpClientError as i, isHttpClientError as l, EmptyBodyError as n, InvalidUrlError as o, EncodeError as r, StatusCodeError as s, DecodeError as t };
|