@akterjs/cli 0.0.0-stage → 0.1.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.
Files changed (109) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +47 -2
  3. package/dist/Argument-D81dqizB.mjs +57 -0
  4. package/dist/Array-B4kuTQeW.mjs +2323 -0
  5. package/dist/Boolean-kILIvmhE.mjs +26 -0
  6. package/dist/ChildProcess-BCIwxPGc.mjs +577 -0
  7. package/dist/CliError-Cf5xqkkj.mjs +633 -0
  8. package/dist/Command-Dzq9KM-h.mjs +5135 -0
  9. package/dist/Config-B6OND9WR.mjs +854 -0
  10. package/dist/Console-BKHUkH6a.mjs +141 -0
  11. package/dist/Data-CeCULr0-.mjs +251 -0
  12. package/dist/Digest-CBd3uv5B.mjs +348 -0
  13. package/dist/Duration-EH9Vy4U6.mjs +791 -0
  14. package/dist/Effect-CKFpqbmw.mjs +12911 -0
  15. package/dist/FileSystem-4pPcEb_i.mjs +1366 -0
  16. package/dist/HttpClientError-BUeMWx70.mjs +303 -0
  17. package/dist/HttpClientResponse-D5ZKICVV.mjs +855 -0
  18. package/dist/Match-CGPLZYrV.mjs +434 -0
  19. package/dist/MutableHashMap-f8nW8AJR.mjs +376 -0
  20. package/dist/MutableHashSet-_HI572Ya.mjs +155 -0
  21. package/dist/MutableRef-D4Qv592C.mjs +107 -0
  22. package/dist/Number-BvkRkfc-.mjs +137 -0
  23. package/dist/Option-DkxSnBhp.mjs +3967 -0
  24. package/dist/Order-C1JC991I.mjs +481 -0
  25. package/dist/Path-Djdv_eF5.mjs +130 -0
  26. package/dist/Queue-CO5UQ6os.mjs +1394 -0
  27. package/dist/Redacted-RkJrG5Me.mjs +160 -0
  28. package/dist/Ref-BIPOxJNH.mjs +267 -0
  29. package/dist/Runtime-BInIAwK3.mjs +297 -0
  30. package/dist/Schema-MiKt5K1v.mjs +10999 -0
  31. package/dist/SecureRandom-B_U4ysO3.mjs +279 -0
  32. package/dist/Semaphore-DOVJ4ZGS.mjs +177 -0
  33. package/dist/Stdio-KylmOBX_.mjs +74 -0
  34. package/dist/Stream-bK9QIETN.mjs +4012 -0
  35. package/dist/String-q5dcsVe4.mjs +351 -0
  36. package/dist/TerminalCapabilities-w_44MAca.mjs +1769 -0
  37. package/dist/WebCrypto-ZI_GNVlw.mjs +33 -0
  38. package/dist/actor-call.service-CGM_vD9u.mjs +1269 -0
  39. package/dist/actor-client.adapter-Coem7gF1.mjs +3691 -0
  40. package/dist/akter-program.config-D8yb9xQP.mjs +7034 -0
  41. package/dist/akter.cli.mjs +5 -0
  42. package/dist/app-cli.config.mjs +49 -0
  43. package/dist/app-entry.pure.mjs +31 -0
  44. package/dist/archive/akter-archive.schema.mjs +65 -0
  45. package/dist/archive/akter-archive.service.mjs +309 -0
  46. package/dist/archive/archive-cli.config.mjs +45 -0
  47. package/dist/archive/archive-invalid.errors.mjs +5 -0
  48. package/dist/archive/archived-lineage.pure.mjs +13 -0
  49. package/dist/archive/tar.pure.mjs +291 -0
  50. package/dist/archive/zstd.adapter.mjs +46 -0
  51. package/dist/bench/bench-report.pure.mjs +120 -0
  52. package/dist/bench/bench-runner.pure.mjs +89 -0
  53. package/dist/bench/bench.service.mjs +301 -0
  54. package/dist/cli-runtime.layer-BqK2mmVL.mjs +1191 -0
  55. package/dist/cli-runtime.layer.mjs +1 -0
  56. package/dist/cloud-client.adapter-Cy1BjDbG.mjs +3186 -0
  57. package/dist/cloud-client.adapter-DOVMoYAj.mjs +304 -0
  58. package/dist/command/akter-commands.config.mjs +32 -0
  59. package/dist/command/akter-program.config.mjs +1 -0
  60. package/dist/credentials/credentials.service.mjs +226 -0
  61. package/dist/credentials/keychain.adapter.mjs +92 -0
  62. package/dist/credentials/login.config.mjs +251 -0
  63. package/dist/deploy/auth/api-attempt.service.mjs +30 -0
  64. package/dist/deploy/auth/token-refresh.errors.mjs +4 -0
  65. package/dist/deploy/build-bundle.adapter.mjs +133 -0
  66. package/dist/deploy/build-manifest.pure.mjs +44 -0
  67. package/dist/deploy/cloud-client.adapter.mjs +1 -0
  68. package/dist/deploy/cloud-url.pure.mjs +17 -0
  69. package/dist/deploy/deploy-failed.errors.mjs +17 -0
  70. package/dist/deploy/deploy.service.mjs +156 -0
  71. package/dist/deploy/request-failure.pure.mjs +87 -0
  72. package/dist/dev-runner.pure.mjs +30 -0
  73. package/dist/docs/doc-topics.pure.mjs +21 -0
  74. package/dist/docs/docs.config.mjs +1 -0
  75. package/dist/docs.config-D2amjsje.mjs +190 -0
  76. package/dist/docs.config-D3zzLzLR.mjs +190 -0
  77. package/dist/export/actor-export.service.mjs +267 -0
  78. package/dist/export/export-failed.errors.mjs +4 -0
  79. package/dist/export/export-failure.pure.mjs +18 -0
  80. package/dist/export/ordered-lines.pure.mjs +43 -0
  81. package/dist/export/ranged-download.pure.mjs +66 -0
  82. package/dist/export/snapshot-download.pure.mjs +86 -0
  83. package/dist/history-runner.pure.mjs +186 -0
  84. package/dist/history-since.pure.mjs +17 -0
  85. package/dist/hosted-runtime.layer-Cx3IPsEd.mjs +16358 -0
  86. package/dist/local/environment-cli.config.mjs +90 -0
  87. package/dist/local/environment-runner.pure.mjs +75 -0
  88. package/dist/local/local-cli.config.mjs +159 -0
  89. package/dist/logs/log-follow.config.mjs +21 -0
  90. package/dist/logs/log-follow.service.mjs +87 -0
  91. package/dist/logs/log-lines.pure.mjs +44 -0
  92. package/dist/migrate-runner.pure.mjs +28 -0
  93. package/dist/operation-input.pure-CS9iUhqK.mjs +1383 -0
  94. package/dist/operation-registry.pure-DVC8EDgj.mjs +283 -0
  95. package/dist/registry/actor-call.service.mjs +1 -0
  96. package/dist/registry/actor-commands.config.mjs +127 -0
  97. package/dist/registry/actor-refusal.pure.mjs +34 -0
  98. package/dist/registry/approval.service.mjs +80 -0
  99. package/dist/registry/cloud-commands.config.mjs +151 -0
  100. package/dist/registry/cloud-served.pure.mjs +31 -0
  101. package/dist/registry/operation-call.service.mjs +262 -0
  102. package/dist/registry/operation-input.pure.mjs +1 -0
  103. package/dist/registry/operation-output.pure.mjs +91 -0
  104. package/dist/registry/served-command.config.mjs +57 -0
  105. package/dist/runner-exited.errors.mjs +10 -0
  106. package/dist/terminal/cli-exit.errors.mjs +38 -0
  107. package/dist/terminal/cli-failure.pure.mjs +31 -0
  108. package/dist/terminal/confirm.adapter.mjs +27 -0
  109. 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 };