@akterjs/cli 0.1.1 → 0.1.3
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 +2 -2
- package/dist/{Argument-D81dqizB.mjs → Argument-BKjmk8CZ.mjs} +1 -1
- package/dist/{ChildProcess-BCIwxPGc.mjs → ChildProcess-UWPy-kPn.mjs} +2 -2
- package/dist/{CliError-Cf5xqkkj.mjs → CliError-CphGZMfO.mjs} +2 -2
- package/dist/{Command-Dzq9KM-h.mjs → Command-D3hF_i6F.mjs} +8 -8
- package/dist/{Config-B6OND9WR.mjs → Config-DEUiBxw4.mjs} +2 -2
- package/dist/{Console-BKHUkH6a.mjs → Console-DY7H086H.mjs} +1 -1
- package/dist/{Digest-CBd3uv5B.mjs → Digest-CnBYV3Oh.mjs} +2 -2
- package/dist/{Effect-CKFpqbmw.mjs → Effect-CFIPV2Jg.mjs} +44 -4
- package/dist/{FileSystem-4pPcEb_i.mjs → FileSystem-iEC-kUB-.mjs} +2 -2
- package/dist/{HttpClientError-BUeMWx70.mjs → HttpClientError-BVd83gxQ.mjs} +1 -1
- package/dist/{HttpClientResponse-D5ZKICVV.mjs → HttpClientResponse-CifutXCF.mjs} +4 -4
- package/dist/{Path-Djdv_eF5.mjs → Path-BRnAx8py.mjs} +1 -1
- package/dist/{Queue-CO5UQ6os.mjs → Queue-CyWN-MDp.mjs} +1 -1
- package/dist/{Ref-BIPOxJNH.mjs → Ref-CX3ghLq6.mjs} +1 -1
- package/dist/{Runtime-BInIAwK3.mjs → Runtime-CyqeMpLX.mjs} +1 -1
- package/dist/{Schema-MiKt5K1v.mjs → Schema-O3QUdX3B.mjs} +1 -1
- package/dist/{SecureRandom-B_U4ysO3.mjs → SecureRandom-DYpl-YDn.mjs} +2 -2
- package/dist/{Semaphore-DOVJ4ZGS.mjs → Semaphore-DHYKAQSv.mjs} +1 -1
- package/dist/{Stdio-KylmOBX_.mjs → Stdio-7l23nD6W.mjs} +1 -1
- package/dist/{Stream-bK9QIETN.mjs → Stream-BeqiANg7.mjs} +3 -3
- package/dist/{TerminalCapabilities-w_44MAca.mjs → TerminalCapabilities-R2LPyCNs.mjs} +3 -3
- package/dist/{WebCrypto-ZI_GNVlw.mjs → WebCrypto-C_95GMdw.mjs} +1 -1
- package/dist/{actor-call.service-CGM_vD9u.mjs → actor-call.service-vJm8gKjI.mjs} +15 -15
- package/dist/{actor-client.adapter-Coem7gF1.mjs → actor-client.adapter-CfKUj7Gi.mjs} +32 -16
- package/dist/{akter-program.config-D8yb9xQP.mjs → akter-program.config-BqHoPt6H.mjs} +252 -39
- package/dist/akter.cli.mjs +1 -1
- package/dist/app-cli.config.mjs +4 -3
- package/dist/archive/akter-archive.schema.mjs +1 -1
- package/dist/archive/akter-archive.service.mjs +7 -7
- package/dist/archive/archive-cli.config.mjs +6 -6
- package/dist/archive/archive-invalid.errors.mjs +1 -1
- package/dist/archive/tar.pure.mjs +1 -1
- package/dist/archive/zstd.adapter.mjs +2 -2
- package/dist/bench/bench-report.pure.mjs +7 -2
- package/dist/bench/bench-runner.pure.mjs +40 -3
- package/dist/bench/bench.service.mjs +17 -14
- package/dist/{cli-runtime.layer-BqK2mmVL.mjs → cli-runtime.layer-Bwuqll8h.mjs} +13 -13
- package/dist/cli-runtime.layer.mjs +1 -1
- package/dist/{cloud-client.adapter-Cy1BjDbG.mjs → cloud-client.adapter-Ce4oyGNh.mjs} +94 -17
- package/dist/{cloud-client.adapter-DOVMoYAj.mjs → cloud-client.adapter-Dln8NW-9.mjs} +9 -9
- package/dist/command/akter-commands.config.mjs +2 -2
- package/dist/command/akter-program.config.mjs +1 -1
- package/dist/credentials/credentials.service.mjs +5 -5
- package/dist/credentials/keychain.adapter.mjs +3 -3
- package/dist/credentials/login.config.mjs +9 -9
- package/dist/deploy/auth/api-attempt.service.mjs +4 -4
- package/dist/deploy/auth/token-refresh.errors.mjs +1 -1
- package/dist/deploy/build-bundle.adapter.mjs +8 -8
- package/dist/deploy/cloud-client.adapter.mjs +1 -1
- package/dist/deploy/cloud-url.pure.mjs +2 -2
- package/dist/deploy/deploy-failed.errors.mjs +2 -2
- package/dist/deploy/deploy.service.mjs +6 -6
- package/dist/deploy/request-failure.pure.mjs +3 -3
- package/dist/docs/docs.config.mjs +1 -1
- package/dist/{docs.config-D2amjsje.mjs → docs.config-Dy0MFrKd.mjs} +10 -42
- package/dist/export/actor-export.service.mjs +8 -8
- package/dist/export/export-failed.errors.mjs +1 -1
- package/dist/export/export-failure.pure.mjs +2 -2
- package/dist/export/ordered-lines.pure.mjs +3 -3
- package/dist/export/ranged-download.pure.mjs +3 -3
- package/dist/export/snapshot-download.pure.mjs +3 -3
- package/dist/{hosted-runtime.layer-Cx3IPsEd.mjs → hosted-runtime.layer-BDXPqzSp.mjs} +128 -99
- package/dist/local/environment-cli.config.mjs +4 -4
- package/dist/local/local-cli.config.mjs +9 -9
- package/dist/logs/log-follow.config.mjs +2 -2
- package/dist/logs/log-follow.service.mjs +7 -7
- package/dist/logs/log-lines.pure.mjs +4 -4
- package/dist/{operation-input.pure-CS9iUhqK.mjs → operation-input.pure-B72BbxCG.mjs} +2 -2
- package/dist/operation-output.pure-ChUlePFj.mjs +120 -0
- package/dist/{operation-registry.pure-DVC8EDgj.mjs → operation-registry.pure-DeoTbR3J.mjs} +2 -2
- package/dist/registry/actor-call.service.mjs +1 -1
- package/dist/registry/actor-commands.config.mjs +6 -6
- package/dist/registry/approval.service.mjs +5 -5
- package/dist/registry/cloud-commands.config.mjs +3 -3
- package/dist/registry/cloud-served.pure.mjs +1 -1
- package/dist/registry/operation-call.service.mjs +42 -23
- package/dist/registry/operation-input.pure.mjs +1 -1
- package/dist/registry/operation-output.pure.mjs +1 -91
- package/dist/registry/served-command.config.mjs +6 -6
- package/dist/runner-exited.errors.mjs +2 -2
- package/dist/terminal/cli-exit.errors.mjs +2 -2
- package/dist/terminal/cli-failure.pure.mjs +7 -7
- package/dist/terminal/confirm.adapter.mjs +2 -2
- package/package.json +3 -3
- package/dist/docs.config-D3zzLzLR.mjs +0 -190
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { F as PipeInspectableProto, On as pipeArguments, S as none$1, Sn as identity, _ as isSome, _n as constUndefined, b as map, bn as dual, bt as setStackTraceLimit, gn as constTrue, gt as assignProperty, h as isNone, hn as constFalse, qt as hasProperty, un as isTagged, vn as constVoid, w as some, x as match, yt as getStackTraceLimit } from "./Option-DkxSnBhp.mjs";
|
|
2
|
-
import { $
|
|
2
|
+
import { $n as addFinalizerExit, $t as suspend$1, An as setInputType, Ar as isSuccess, At as provideContext, B as flatMap, Br as combine, C as catch_, Cr as fail$1, Ct as onExitPrimitive, Dr as interrupt$1, E as contextWith, En as exponential, Et as orDie, Fn as upTo, Gn as effectDiscard, Gt as scoped, In as while_, J as forkChild, Jr as hasInterrupts, Jt as serviceOption, K as forEach, Kr as fromReasons, Lt as retry, M as fail, N as failCause, Nr as succeed$1, Nt as raceFirst, O as die$1, On as min, Pr as void_$1, Q as fromOption, Qn as addFinalizer$1, R as filterOrFail, Rr as StackTrace, Rt as runFork, Sn as yieldNow, Sr as die$2, St as onExit, T as context, Un as effect, Ut as sandbox, Vr as die, W as fnUntraced, Wn as effectContext, Wr as filterInterruptors, Wt as scope, X as forkScoped, Xn as succeed$2, Xr as interruptors, Xt as succeed, Y as forkIn, Yr as hasInterruptsOnly, Yt as sleep, Zn as Scope, _a as merge, aa as toPredicate, ar as makeUnsafe$3, at as isEffect, ba as Prototype, bn as withParentSpan, bt as never, ca as add, dr as doneUnsafe, dt as map$1, en as sync, er as close, et as gen, fa as getOrUndefined, fn as uninterruptible, ga as makeUnsafe$2, gn as void_, gr as isDoneUnsafe, h as catchCauseIf, ha as make$7, hn as useSpan, ht as mapError, i as addFinalizer$2, ia as has, in as timeout, it as interruptible, ji as forkUnsafe, jn as spaced, jt as provideService, kr as isFailure, kt as provide$1, l as as, la as empty, ln as try_, lr as _await, m as catchCause, ma as getUnsafe, mn as updateContext, n as acquireRelease, na as compose, o as andThen, oa as Reference, on as timeoutOrElse, or as provide, p as callback, pa as getOrUndefinedUnsafe, pn as uninterruptibleMask, pr as into, pt as mapBothEager, qr as hasDies, r as acquireUseRelease, ra as fromPredicate, rt as interrupt, s as annotateCurrentSpan, sa as Service$1, st as logError, ta as encode, ti as isInterruptReason, tn as tap, tt as ignore, ua as get, ui as squash, ur as done, ut as makeSpanScoped, vn as whileLoop, vr as makeUnsafe$1, vt as matchCauseEffect, wr as failCause$1, wt as onInterrupt, xn as withSpan, xt as onError, y as catchIf, yn as withFiber, yr as succeed$3, yt as matchEffect, zt as runForkWith } from "./Effect-CFIPV2Jg.mjs";
|
|
3
3
|
import { I as partition, K as empty$1, j as map$2, r as contains, u as findFirst } from "./Array-B4kuTQeW.mjs";
|
|
4
|
-
import { $ as declare, An as InvalidType, B as TaggedStruct, Dt as isGreaterThanOrEqualTo, F as String$1, I as Struct, K as Uint8Array$1, Kn as empty$2, Nn as makeCompositeAtKey, Q as brand, S as Literals, T as NonEmptyArray, Ut as isMinLength, V as TaggedUnion, X as Unknown, Y as Union, Yt as isSchema, Z as Void, Zn as merge$1, _n as defaultParseOptions, a as Boolean, an as optionalKey, at as decodeUnknownEffect, bn as isNever, c as Class, cn as toCodecJson, d as Defect, en as link, et as declareConstructor, fn as omit, fr as map$3, g as Finite, ht as isBetween, i as BigIntFromString, in as optional, j as OptionFromNullOr, m as Exit, mt as is, n as ArraySchema, nn as makeFilter, or as fromEntries, p as Error$1, pn as decodeEffect, q as Uint8ArrayFromBase64, qn as fromInput, qt as isPattern, rt as decodeSync, s as Cause, sn as tag, st as encodeEffect, tn as make$8, v as Int, w as Never, wn as transform, x as Literal, z as TaggedError } from "./Schema-
|
|
4
|
+
import { $ as declare, An as InvalidType, B as TaggedStruct, Dt as isGreaterThanOrEqualTo, F as String$1, I as Struct, K as Uint8Array$1, Kn as empty$2, Nn as makeCompositeAtKey, Q as brand, S as Literals, T as NonEmptyArray, Ut as isMinLength, V as TaggedUnion, X as Unknown, Y as Union, Yt as isSchema, Z as Void, Zn as merge$1, _n as defaultParseOptions, a as Boolean, an as optionalKey, at as decodeUnknownEffect, bn as isNever, c as Class, cn as toCodecJson, d as Defect, en as link, et as declareConstructor, fn as omit, fr as map$3, g as Finite, ht as isBetween, i as BigIntFromString, in as optional, j as OptionFromNullOr, m as Exit, mt as is, n as ArraySchema, nn as makeFilter, or as fromEntries, p as Error$1, pn as decodeEffect, q as Uint8ArrayFromBase64, qn as fromInput, qt as isPattern, rt as decodeSync, s as Cause, sn as tag, st as encodeEffect, tn as make$8, v as Int, w as Never, wn as transform, x as Literal, z as TaggedError } from "./Schema-O3QUdX3B.mjs";
|
|
5
5
|
import { l as millis$1, p as seconds } from "./Duration-EH9Vy4U6.mjs";
|
|
6
6
|
import { i as TaggedError$1, r as TaggedClass } from "./Data-CeCULr0-.mjs";
|
|
7
|
-
import { M as uint8Array, P as currentTimeMillis, j as text } from "./HttpClientResponse-
|
|
7
|
+
import { M as uint8Array, P as currentTimeMillis, j as text } from "./HttpClientResponse-CifutXCF.mjs";
|
|
8
8
|
import { a as remove$1, i as has$1, n as empty$3, o as set, r as get$1 } from "./MutableHashMap-f8nW8AJR.mjs";
|
|
9
|
-
import { D as mapAccum, G as runForEachArray, I as provideContext$1, R as retry$1, _t as interruptAll, ft as makeUnsafe$4, gt as interrupt$2, ht as getCurrent, nt as unwrap, vt as interruptAs, w as isStream, x as fromQueue, yt as join } from "./Stream-
|
|
10
|
-
import { m as shutdownUnsafe, o as failCause$2, r as end, t as bounded$1, u as offerAll } from "./Queue-
|
|
11
|
-
import { t as SecureRandom } from "./SecureRandom-
|
|
12
|
-
import { t as WebCrypto } from "./WebCrypto-
|
|
13
|
-
import { n as makeUnsafe$5 } from "./Semaphore-
|
|
14
|
-
import { a as webCryptoDigest, i as sha256 } from "./Digest-
|
|
15
|
-
import { a as option, r as Redacted, s as ConfigProvider } from "./Config-
|
|
16
|
-
import { a as HttpClientErrorSchema } from "./HttpClientError-
|
|
9
|
+
import { D as mapAccum, G as runForEachArray, I as provideContext$1, R as retry$1, _t as interruptAll, ft as makeUnsafe$4, gt as interrupt$2, ht as getCurrent, nt as unwrap, vt as interruptAs, w as isStream, x as fromQueue, yt as join } from "./Stream-BeqiANg7.mjs";
|
|
10
|
+
import { m as shutdownUnsafe, o as failCause$2, r as end, t as bounded$1, u as offerAll } from "./Queue-CyWN-MDp.mjs";
|
|
11
|
+
import { t as SecureRandom } from "./SecureRandom-DYpl-YDn.mjs";
|
|
12
|
+
import { t as WebCrypto } from "./WebCrypto-C_95GMdw.mjs";
|
|
13
|
+
import { n as makeUnsafe$5 } from "./Semaphore-DHYKAQSv.mjs";
|
|
14
|
+
import { a as webCryptoDigest, i as sha256 } from "./Digest-CnBYV3Oh.mjs";
|
|
15
|
+
import { a as option, r as Redacted, s as ConfigProvider } from "./Config-DEUiBxw4.mjs";
|
|
16
|
+
import { a as HttpClientErrorSchema } from "./HttpClientError-BVd83gxQ.mjs";
|
|
17
17
|
// ../../node_modules/.pnpm/effect@4.1.2_patch_hash=0e61176203bb1256381ce1c5b488d7951983ce38ff698647d3f4617383abbf07/node_modules/effect/dist/FiberMap.js
|
|
18
18
|
/**
|
|
19
19
|
* Manages fibers by key inside a scope.
|
|
@@ -2823,9 +2823,9 @@ var ComputerHeldError = class extends TaggedError()("ComputerHeldError", {
|
|
|
2823
2823
|
}) {};
|
|
2824
2824
|
// ../effect/src/contract/computer/computer-limit.errors.ts
|
|
2825
2825
|
/**
|
|
2826
|
-
* A new computer
|
|
2827
|
-
*
|
|
2828
|
-
* one is
|
|
2826
|
+
* A new computer was refused for capacity, so none was made: `account`, the sandboxes the platform's provider account
|
|
2827
|
+
* may run at once, with the most it holds. Try again once one is free; nothing waits for room. `store`, the computers
|
|
2828
|
+
* one app environment may keep, is no longer set by Akter Cloud or the local engine; older engines may still send it.
|
|
2829
2829
|
*/
|
|
2830
2830
|
var ComputerLimitError = class extends TaggedError()("ComputerLimitError", {
|
|
2831
2831
|
computer: String$1,
|
|
@@ -3065,13 +3065,29 @@ const forkRpcOf = ({ actor, key }) => make$2(forkTag(actor), {
|
|
|
3065
3065
|
success: Forked
|
|
3066
3066
|
});
|
|
3067
3067
|
// ../effect/src/contract/computer/files/computer-files.schema.ts
|
|
3068
|
-
/**
|
|
3068
|
+
/** The most one call carries across the host/control link. Paths are relative to the computer's files directory. */
|
|
3069
3069
|
const computerFileBytes = 1048576;
|
|
3070
|
+
const Offset = Int.check(isGreaterThanOrEqualTo(0));
|
|
3071
|
+
/**
|
|
3072
|
+
* A file of any size moves in pieces: `ReadAt` answers at most `computerFileBytes` from `offset`, fewer at the end of
|
|
3073
|
+
* the file, and `WriteAt` at offset 0 replaces the file, and at a later offset cuts it to that length and appends, so
|
|
3074
|
+
* a resent piece is written once. `Read` and `Write` move a whole file of at most `computerFileBytes` in one call, as
|
|
3075
|
+
* engines before pieces did; they stay so a host and a control plane of different releases still copy small files.
|
|
3076
|
+
*/
|
|
3070
3077
|
const ComputerFileRequest = TaggedUnion({
|
|
3071
3078
|
Read: { path: String$1 },
|
|
3079
|
+
ReadAt: {
|
|
3080
|
+
offset: Offset,
|
|
3081
|
+
path: String$1
|
|
3082
|
+
},
|
|
3072
3083
|
Write: {
|
|
3073
3084
|
content: Uint8ArrayFromBase64,
|
|
3074
3085
|
path: String$1
|
|
3086
|
+
},
|
|
3087
|
+
WriteAt: {
|
|
3088
|
+
content: Uint8ArrayFromBase64,
|
|
3089
|
+
offset: Offset,
|
|
3090
|
+
path: String$1
|
|
3075
3091
|
}
|
|
3076
3092
|
});
|
|
3077
3093
|
const ComputerCopy = Struct({
|
|
@@ -3688,4 +3704,4 @@ var ActorClients = class ActorClients extends Service$1()("@akterjs/effect/contr
|
|
|
3688
3704
|
return (key) => ActorClients.use((clients) => clients.connect(source, key));
|
|
3689
3705
|
}
|
|
3690
3706
|
};
|
|
3691
|
-
export {
|
|
3707
|
+
export { Protocol as $, SecretName as A, Suspended as At, ComputerLostError as B, CommandId as C, make$2 as Ct, uploadChunkBytes as D, fromWebSocket as Dt, fileTag as E, isStreamSchema as Et, FileNotFoundError as F, make$6 as Ft, HandlerFailedError as G, BlobTransferError as H, FileAccessDeniedError as I, remove as It, CallerNotAllowedError as J, CommandIdExpiredError as K, StepNotFoundError as L, run as Lt, InvalidFileRequestError as M, make$5 as Mt, FilesUnavailableError as N, suspend as Nt, HostedFailure as O, Complete as Ot, FileTooLargeError as P, wrapActivityResult as Pt, ActorAlreadyExistsError as Q, ComputersUnavailableError as R, forkRpcOf as S, isWrapper as St, fileRpcsOf as T, getStreamSchemas as Tt, StorageLimitError as U, ComputerHeldError as V, InvalidRequestError as W, ActorNotCreatedError as X, ActorUnavailableError as Y, ActorErasedError as Z, ExecUnknown as _, makeCollectorUnsafe as _t, ActorComputerClients as a, layerNdjson as at, ComputerFileRequest as b, ServerClient as bt, creationModesOf as c, constEof as ct, StepEnd as d, isTerminalResponse as dt, make as et, StepStart as f, RpcClientDefect as ft, ExecRan as g, Collector as gt, ComputerSpec as h, spanName as ht, ActorState as i, json as it, InvalidSecretNameError as j, intoResult as jt, SecretUnavailableError as k, SuspendOnFailure as kt, computerRpcsOf as l, constPing as lt, ComputerLogLine as m, spanAttributes as mt, ActorFileClients as n, withRun as nt, Authentication as o, RequestId as ot, largestPage as p, RpcClientError as pt, UnauthenticatedError as q, ActorSecrets as r, RpcSerialization as rt, creationErrors as s, ResponseDefectEncoded as st, ActorClients as t, makeProtocolHttp as tt, computerTag as u, constPong as ut, execLimits as v, make$1 as vt, fileChunkBytes as w, ClientAbort as wt, computerFileBytes as x, exitSchema as xt, logPageLines as y, ParseOptions as yt, ComputerNotFoundError as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as makeRunMain } from "./Runtime-
|
|
2
|
-
import { Et as orDie, Xt as succeed, et as gen, kt as provide, yt as matchEffect } from "./Effect-
|
|
3
|
-
import { n as run } from "./Command-
|
|
1
|
+
import { i as makeRunMain } from "./Runtime-CyqeMpLX.mjs";
|
|
2
|
+
import { Et as orDie, Xt as succeed, et as gen, kt as provide, yt as matchEffect } from "./Effect-CFIPV2Jg.mjs";
|
|
3
|
+
import { n as run } from "./Command-D3hF_i6F.mjs";
|
|
4
4
|
import { akterCommand } from "./command/akter-commands.config.mjs";
|
|
5
|
-
import { t as cliRuntime } from "./cli-runtime.layer-
|
|
5
|
+
import { t as cliRuntime } from "./cli-runtime.layer-Bwuqll8h.mjs";
|
|
6
6
|
import { reportFailure } from "./terminal/cli-failure.pure.mjs";
|
|
7
|
-
import { n as operationsOf } from "./operation-registry.pure-
|
|
7
|
+
import { n as operationsOf } from "./operation-registry.pure-DeoTbR3J.mjs";
|
|
8
8
|
// ../../node_modules/.pnpm/@effect+platform-node@4.1.2_effect@4.1.2_patch_hash=0e61176203bb1256381ce1c5b488d795198_40a01a95710c8b08d9f921ebf3a75b9f/node_modules/@effect/platform-node/dist/NodeRuntime.js
|
|
9
9
|
/**
|
|
10
10
|
* Node.js process runner for Effect programs.
|
|
@@ -63,7 +63,7 @@ const spec = {
|
|
|
63
63
|
"openapi": "3.1.0",
|
|
64
64
|
"info": {
|
|
65
65
|
"title": "Akter Cloud API",
|
|
66
|
-
"version": "0.0.
|
|
66
|
+
"version": "0.0.38",
|
|
67
67
|
"description": "Sign up and sign in with an emailed code, manage sessions, organizations, their members, invitations, API keys and the approvals their dangerous actions need, and the apps they build and deploy on Akter Cloud and their environments' secrets, read an app's log, read the command history of an app's actors, fork them, export their databases and history, and read usage, set spend caps and pay through Stripe.",
|
|
68
68
|
"license": { "name": "Apache-2.0" }
|
|
69
69
|
},
|
|
@@ -1376,12 +1376,8 @@ const spec = {
|
|
|
1376
1376
|
"content": { "application/json": { "schema": { "anyOf": [{ "$ref": "#/components/schemas/NotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FeatureNotEnabledErrorEncoded" }] } } }
|
|
1377
1377
|
},
|
|
1378
1378
|
"409": {
|
|
1379
|
-
"description": "AlreadyExistsError | InUseError
|
|
1380
|
-
"content": { "application/json": { "schema": { "anyOf": [
|
|
1381
|
-
{ "$ref": "#/components/schemas/AlreadyExistsErrorEncoded" },
|
|
1382
|
-
{ "$ref": "#/components/schemas/InUseErrorEncoded" },
|
|
1383
|
-
{ "$ref": "#/components/schemas/SnapshotLimitErrorEncoded" }
|
|
1384
|
-
] } } }
|
|
1379
|
+
"description": "AlreadyExistsError | InUseError",
|
|
1380
|
+
"content": { "application/json": { "schema": { "anyOf": [{ "$ref": "#/components/schemas/AlreadyExistsErrorEncoded" }, { "$ref": "#/components/schemas/InUseErrorEncoded" }] } } }
|
|
1385
1381
|
},
|
|
1386
1382
|
"503": {
|
|
1387
1383
|
"description": "Error",
|
|
@@ -1401,7 +1397,7 @@ const spec = {
|
|
|
1401
1397
|
} }
|
|
1402
1398
|
}
|
|
1403
1399
|
},
|
|
1404
|
-
"description": "Snapshot the environment's data now, as of the moment it is taken; writes keep running meanwhile. It answers Pending, and get shows it Ready once taken, usually within seconds. A name already in use fails with AlreadyExistsError, a deleted environment with InUseError (environmentRetired)
|
|
1400
|
+
"description": "Snapshot the environment's data now, as of the moment it is taken; writes keep running meanwhile. It answers Pending, and get shows it Ready once taken, usually within seconds. A name already in use fails with AlreadyExistsError, and a deleted environment with InUseError (environmentRetired).",
|
|
1405
1401
|
"requestBody": {
|
|
1406
1402
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSnapshot" } } },
|
|
1407
1403
|
"required": true
|
|
@@ -2763,6 +2759,78 @@ const spec = {
|
|
|
2763
2759
|
"idempotent": true
|
|
2764
2760
|
}
|
|
2765
2761
|
} },
|
|
2762
|
+
"/v1/organizations/{organization}/apps/{app}/actors/{actor}/{key}/computers": { "get": {
|
|
2763
|
+
"tags": ["actors"],
|
|
2764
|
+
"operationId": "actors.computers",
|
|
2765
|
+
"parameters": [
|
|
2766
|
+
{
|
|
2767
|
+
"name": "app",
|
|
2768
|
+
"in": "path",
|
|
2769
|
+
"schema": { "$ref": "#/components/schemas/AppName" },
|
|
2770
|
+
"required": true
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
"name": "organization",
|
|
2774
|
+
"in": "path",
|
|
2775
|
+
"schema": { "$ref": "#/components/schemas/OrganizationName" },
|
|
2776
|
+
"required": true
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"name": "actor",
|
|
2780
|
+
"in": "path",
|
|
2781
|
+
"schema": { "$ref": "#/components/schemas/ActorType" },
|
|
2782
|
+
"required": true
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
"name": "key",
|
|
2786
|
+
"in": "path",
|
|
2787
|
+
"schema": { "$ref": "#/components/schemas/ActorKey" },
|
|
2788
|
+
"required": true
|
|
2789
|
+
}
|
|
2790
|
+
],
|
|
2791
|
+
"security": [{ "apiKey": [] }],
|
|
2792
|
+
"responses": {
|
|
2793
|
+
"200": {
|
|
2794
|
+
"description": "ActorComputerList",
|
|
2795
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorComputerList" } } }
|
|
2796
|
+
},
|
|
2797
|
+
"401": {
|
|
2798
|
+
"description": "UnauthorizedError",
|
|
2799
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } }
|
|
2800
|
+
},
|
|
2801
|
+
"403": {
|
|
2802
|
+
"description": "ForbiddenError",
|
|
2803
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } }
|
|
2804
|
+
},
|
|
2805
|
+
"404": {
|
|
2806
|
+
"description": "NotFoundError | FeatureNotEnabledError",
|
|
2807
|
+
"content": { "application/json": { "schema": { "anyOf": [{ "$ref": "#/components/schemas/NotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FeatureNotEnabledErrorEncoded" }] } } }
|
|
2808
|
+
},
|
|
2809
|
+
"410": {
|
|
2810
|
+
"description": "ActorErasedError",
|
|
2811
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorErasedErrorEncoded" } } }
|
|
2812
|
+
},
|
|
2813
|
+
"503": {
|
|
2814
|
+
"description": "Error",
|
|
2815
|
+
"content": { "application/json": { "schema": { "anyOf": [
|
|
2816
|
+
{ "$ref": "#/components/schemas/ActorUnavailableErrorEncoded" },
|
|
2817
|
+
{ "$ref": "#/components/schemas/AuthUnavailableErrorEncoded" },
|
|
2818
|
+
{ "$ref": "#/components/schemas/BillingUnavailableErrorEncoded" },
|
|
2819
|
+
{ "$ref": "#/components/schemas/BuildStorageUnavailableErrorEncoded" },
|
|
2820
|
+
{ "$ref": "#/components/schemas/ExecUnavailableErrorEncoded" }
|
|
2821
|
+
] } } },
|
|
2822
|
+
"headers": { "retry-after": {
|
|
2823
|
+
"schema": {
|
|
2824
|
+
"type": "string",
|
|
2825
|
+
"description": "Seconds to wait before retrying, sent with AuthUnavailableError, BillingUnavailableError and ExecUnavailableError."
|
|
2826
|
+
},
|
|
2827
|
+
"required": false
|
|
2828
|
+
} }
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
"description": "List an actor's computers as its host sees them now, each with its image, size, egress and state. It takes the same right as calling the actor, and the actor's contract must admit the caller.",
|
|
2832
|
+
"x-akter": { "flag": "computerList" }
|
|
2833
|
+
} },
|
|
2766
2834
|
"/v1/organizations/{organization}/apps/{app}/export/shards/{shard}": { "get": {
|
|
2767
2835
|
"tags": ["actors"],
|
|
2768
2836
|
"operationId": "actors.exportShard",
|
|
@@ -3360,7 +3428,6 @@ const spec = {
|
|
|
3360
3428
|
},
|
|
3361
3429
|
"x-akter": {
|
|
3362
3430
|
"confirm": true,
|
|
3363
|
-
"flag": "cloudFork",
|
|
3364
3431
|
"idempotent": true,
|
|
3365
3432
|
"servedAs": "actors.fork"
|
|
3366
3433
|
}
|
|
@@ -4103,6 +4170,65 @@ const spec = {
|
|
|
4103
4170
|
},
|
|
4104
4171
|
"x-akter": { "openWorld": true }
|
|
4105
4172
|
} },
|
|
4173
|
+
"/v1/organizations/{organization}/billing/portal": { "post": {
|
|
4174
|
+
"tags": ["billing"],
|
|
4175
|
+
"operationId": "billing.portal",
|
|
4176
|
+
"parameters": [{
|
|
4177
|
+
"name": "organization",
|
|
4178
|
+
"in": "path",
|
|
4179
|
+
"schema": { "$ref": "#/components/schemas/OrganizationName" },
|
|
4180
|
+
"required": true
|
|
4181
|
+
}],
|
|
4182
|
+
"security": [{ "apiKey": [] }],
|
|
4183
|
+
"responses": {
|
|
4184
|
+
"201": {
|
|
4185
|
+
"description": "PortalLink",
|
|
4186
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalLink" } } }
|
|
4187
|
+
},
|
|
4188
|
+
"401": {
|
|
4189
|
+
"description": "UnauthorizedError",
|
|
4190
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } }
|
|
4191
|
+
},
|
|
4192
|
+
"402": {
|
|
4193
|
+
"description": "CardRequiredError",
|
|
4194
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardRequiredErrorEncoded" } } }
|
|
4195
|
+
},
|
|
4196
|
+
"403": {
|
|
4197
|
+
"description": "ForbiddenError",
|
|
4198
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } }
|
|
4199
|
+
},
|
|
4200
|
+
"404": {
|
|
4201
|
+
"description": "NotFoundError | FeatureNotEnabledError",
|
|
4202
|
+
"content": { "application/json": { "schema": { "anyOf": [{ "$ref": "#/components/schemas/NotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FeatureNotEnabledErrorEncoded" }] } } }
|
|
4203
|
+
},
|
|
4204
|
+
"503": {
|
|
4205
|
+
"description": "Error",
|
|
4206
|
+
"content": { "application/json": { "schema": { "anyOf": [
|
|
4207
|
+
{ "$ref": "#/components/schemas/ActorUnavailableErrorEncoded" },
|
|
4208
|
+
{ "$ref": "#/components/schemas/AuthUnavailableErrorEncoded" },
|
|
4209
|
+
{ "$ref": "#/components/schemas/BillingUnavailableErrorEncoded" },
|
|
4210
|
+
{ "$ref": "#/components/schemas/BuildStorageUnavailableErrorEncoded" },
|
|
4211
|
+
{ "$ref": "#/components/schemas/ExecUnavailableErrorEncoded" }
|
|
4212
|
+
] } } },
|
|
4213
|
+
"headers": { "retry-after": {
|
|
4214
|
+
"schema": {
|
|
4215
|
+
"type": "string",
|
|
4216
|
+
"description": "Seconds to wait before retrying, sent with AuthUnavailableError, BillingUnavailableError and ExecUnavailableError."
|
|
4217
|
+
},
|
|
4218
|
+
"required": false
|
|
4219
|
+
} }
|
|
4220
|
+
}
|
|
4221
|
+
},
|
|
4222
|
+
"description": "Get a link to Stripe's customer portal, where a person updates the organization's card, reads its invoices and cancels. An organization that never opened a checkout has no Stripe customer yet and gets CardRequiredError.",
|
|
4223
|
+
"requestBody": {
|
|
4224
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenPortal" } } },
|
|
4225
|
+
"required": true
|
|
4226
|
+
},
|
|
4227
|
+
"x-akter": {
|
|
4228
|
+
"flag": "billingPortal",
|
|
4229
|
+
"openWorld": true
|
|
4230
|
+
}
|
|
4231
|
+
} },
|
|
4106
4232
|
"/v1/organizations/{organization}/billing/cap": { "put": {
|
|
4107
4233
|
"tags": ["billing"],
|
|
4108
4234
|
"operationId": "billing.setCap",
|
|
@@ -5121,6 +5247,26 @@ const spec = {
|
|
|
5121
5247
|
"maximum": 9007199254740991,
|
|
5122
5248
|
"description": "The most the work this key starts may cost in a calendar month, in whole US dollars. Raising it needs a person's confirmation."
|
|
5123
5249
|
},
|
|
5250
|
+
"PortalLink": {
|
|
5251
|
+
"type": "object",
|
|
5252
|
+
"properties": { "url": {
|
|
5253
|
+
"type": "string",
|
|
5254
|
+
"description": "A Stripe-hosted page where the person updates their card, reads their invoices and cancels. It is short-lived: open it right away."
|
|
5255
|
+
} },
|
|
5256
|
+
"required": ["url"],
|
|
5257
|
+
"additionalProperties": false
|
|
5258
|
+
},
|
|
5259
|
+
"OpenPortal": {
|
|
5260
|
+
"type": "object",
|
|
5261
|
+
"properties": { "returnUrl": { "$ref": "#/components/schemas/ReturnUrl_1" } },
|
|
5262
|
+
"additionalProperties": false
|
|
5263
|
+
},
|
|
5264
|
+
"ReturnUrl_1": {
|
|
5265
|
+
"type": "string",
|
|
5266
|
+
"maxLength": 2e3,
|
|
5267
|
+
"pattern": "^(?:https:\\/\\/app\\.akter\\.dev)(?:[/?][^\\s\\\\]*)?$",
|
|
5268
|
+
"description": "Where Stripe sends the person back to: a URL on one of these exact origins, https://app.akter.dev, at most 2000 characters. Absent, it is the Cloud API's own plain-text page, which tells the person to return to their terminal."
|
|
5269
|
+
},
|
|
5124
5270
|
"CheckoutLink": {
|
|
5125
5271
|
"type": "object",
|
|
5126
5272
|
"properties": {
|
|
@@ -5135,7 +5281,10 @@ const spec = {
|
|
|
5135
5281
|
},
|
|
5136
5282
|
"StartCheckout": {
|
|
5137
5283
|
"type": "object",
|
|
5138
|
-
"properties": {
|
|
5284
|
+
"properties": {
|
|
5285
|
+
"returnUrl": { "$ref": "#/components/schemas/ReturnUrl" },
|
|
5286
|
+
"spendCap": { "$ref": "#/components/schemas/SpendCap_3" }
|
|
5287
|
+
},
|
|
5139
5288
|
"additionalProperties": false
|
|
5140
5289
|
},
|
|
5141
5290
|
"SpendCap_3": {
|
|
@@ -5144,6 +5293,12 @@ const spec = {
|
|
|
5144
5293
|
"maximum": 9007199254740991,
|
|
5145
5294
|
"description": "The monthly cap to start the paid plan with. Defaults to the plan's starting cap."
|
|
5146
5295
|
},
|
|
5296
|
+
"ReturnUrl": {
|
|
5297
|
+
"type": "string",
|
|
5298
|
+
"maxLength": 2e3,
|
|
5299
|
+
"pattern": "^(?:https:\\/\\/app\\.akter\\.dev)(?:[/?][^\\s\\\\]*)?$",
|
|
5300
|
+
"description": "Where Stripe sends the person back to, whether they added a card or not. A checkout link still open is handed back as it is, with the return it was opened with."
|
|
5301
|
+
},
|
|
5147
5302
|
"UsageForecast": {
|
|
5148
5303
|
"type": "object",
|
|
5149
5304
|
"properties": {
|
|
@@ -5447,7 +5602,7 @@ const spec = {
|
|
|
5447
5602
|
"ActorKey_1": {
|
|
5448
5603
|
"type": "string",
|
|
5449
5604
|
"minLength": 1,
|
|
5450
|
-
"description": "The free key the copy is created under.
|
|
5605
|
+
"description": "The free key the copy is created under. It may be on another shard than the parent's; the copy's computers are copied there too."
|
|
5451
5606
|
},
|
|
5452
5607
|
"ForkId": {
|
|
5453
5608
|
"type": "string",
|
|
@@ -5678,6 +5833,86 @@ const spec = {
|
|
|
5678
5833
|
"additionalProperties": false,
|
|
5679
5834
|
"description": "A computer an actor on the shard keeps, as Akter Cloud records it. Its disk stays in the Cloud."
|
|
5680
5835
|
},
|
|
5836
|
+
"ActorComputerList": {
|
|
5837
|
+
"type": "object",
|
|
5838
|
+
"properties": { "items": {
|
|
5839
|
+
"type": "array",
|
|
5840
|
+
"items": { "$ref": "#/components/schemas/ActorComputer" }
|
|
5841
|
+
} },
|
|
5842
|
+
"required": ["items"],
|
|
5843
|
+
"additionalProperties": false
|
|
5844
|
+
},
|
|
5845
|
+
"ActorComputer": {
|
|
5846
|
+
"type": "object",
|
|
5847
|
+
"properties": {
|
|
5848
|
+
"egress": {
|
|
5849
|
+
"type": "array",
|
|
5850
|
+
"items": { "type": "string" },
|
|
5851
|
+
"description": "The hosts or rules the computer may reach."
|
|
5852
|
+
},
|
|
5853
|
+
"image": { "type": "string" },
|
|
5854
|
+
"name": {
|
|
5855
|
+
"type": "string",
|
|
5856
|
+
"description": "The computer's name, unique among its actor's computers."
|
|
5857
|
+
},
|
|
5858
|
+
"secrets": {
|
|
5859
|
+
"type": "array",
|
|
5860
|
+
"items": { "$ref": "#/components/schemas/ComputerSecretRef" }
|
|
5861
|
+
},
|
|
5862
|
+
"size": {
|
|
5863
|
+
"type": "object",
|
|
5864
|
+
"properties": {
|
|
5865
|
+
"memoryMib": {
|
|
5866
|
+
"type": "integer",
|
|
5867
|
+
"minimum": -9007199254740991,
|
|
5868
|
+
"maximum": 9007199254740991
|
|
5869
|
+
},
|
|
5870
|
+
"vcpu": {
|
|
5871
|
+
"type": "integer",
|
|
5872
|
+
"minimum": -9007199254740991,
|
|
5873
|
+
"maximum": 9007199254740991
|
|
5874
|
+
}
|
|
5875
|
+
},
|
|
5876
|
+
"required": ["memoryMib", "vcpu"],
|
|
5877
|
+
"additionalProperties": false
|
|
5878
|
+
},
|
|
5879
|
+
"state": { "$ref": "#/components/schemas/ComputerState" }
|
|
5880
|
+
},
|
|
5881
|
+
"required": [
|
|
5882
|
+
"egress",
|
|
5883
|
+
"image",
|
|
5884
|
+
"name",
|
|
5885
|
+
"size",
|
|
5886
|
+
"state"
|
|
5887
|
+
],
|
|
5888
|
+
"additionalProperties": false
|
|
5889
|
+
},
|
|
5890
|
+
"ComputerState": {
|
|
5891
|
+
"type": "string",
|
|
5892
|
+
"enum": [
|
|
5893
|
+
"starting",
|
|
5894
|
+
"running",
|
|
5895
|
+
"paused",
|
|
5896
|
+
"stopped",
|
|
5897
|
+
"failed",
|
|
5898
|
+
"gone"
|
|
5899
|
+
]
|
|
5900
|
+
},
|
|
5901
|
+
"ComputerSecretRef": {
|
|
5902
|
+
"type": "object",
|
|
5903
|
+
"properties": {
|
|
5904
|
+
"header": { "type": "string" },
|
|
5905
|
+
"host": { "type": "string" },
|
|
5906
|
+
"prefix": { "type": "string" },
|
|
5907
|
+
"secret": { "type": "string" }
|
|
5908
|
+
},
|
|
5909
|
+
"required": [
|
|
5910
|
+
"header",
|
|
5911
|
+
"host",
|
|
5912
|
+
"secret"
|
|
5913
|
+
],
|
|
5914
|
+
"additionalProperties": false
|
|
5915
|
+
},
|
|
5681
5916
|
"CommandHistoryPage": {
|
|
5682
5917
|
"type": "object",
|
|
5683
5918
|
"properties": {
|
|
@@ -6419,28 +6654,6 @@ const spec = {
|
|
|
6419
6654
|
"maxLength": 63,
|
|
6420
6655
|
"description": "A named snapshot of an environment, such as before-migration, unique within the environment. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit."
|
|
6421
6656
|
},
|
|
6422
|
-
"SnapshotLimitErrorEncoded": {
|
|
6423
|
-
"type": "object",
|
|
6424
|
-
"properties": {
|
|
6425
|
-
"_tag": {
|
|
6426
|
-
"type": "string",
|
|
6427
|
-
"enum": ["SnapshotLimitError"]
|
|
6428
|
-
},
|
|
6429
|
-
"environment": { "$ref": "#/components/schemas/EnvironmentName" },
|
|
6430
|
-
"limit": {
|
|
6431
|
-
"type": "integer",
|
|
6432
|
-
"minimum": -9007199254740991,
|
|
6433
|
-
"maximum": 9007199254740991,
|
|
6434
|
-
"description": "Snapshots one environment may hold. Deleted snapshots count too, because the storage provider keeps their data until it can be removed; delete the environment to start again."
|
|
6435
|
-
}
|
|
6436
|
-
},
|
|
6437
|
-
"required": [
|
|
6438
|
-
"_tag",
|
|
6439
|
-
"environment",
|
|
6440
|
-
"limit"
|
|
6441
|
-
],
|
|
6442
|
-
"additionalProperties": false
|
|
6443
|
-
},
|
|
6444
6657
|
"CreateSnapshot": {
|
|
6445
6658
|
"type": "object",
|
|
6446
6659
|
"properties": { "name": { "$ref": "#/components/schemas/SnapshotName" } },
|
|
@@ -7019,7 +7232,7 @@ const spec = {
|
|
|
7019
7232
|
]
|
|
7020
7233
|
};
|
|
7021
7234
|
// .generated/compiled/package-version.adapter.js
|
|
7022
|
-
const version = "0.1.
|
|
7235
|
+
const version = "0.1.3";
|
|
7023
7236
|
// src/command/akter-program.config.ts
|
|
7024
7237
|
const main = gen(function* main() {
|
|
7025
7238
|
const operations = yield* operationsOf(spec).pipe(orDie);
|
package/dist/akter.cli.mjs
CHANGED
package/dist/app-cli.config.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as flatMap, Gt as scoped } from "./Effect-
|
|
2
|
-
import { r as withDescription, t as String } from "./Argument-
|
|
3
|
-
import { c as Int, f as optional, i as withDescription$2, l as String$1, m as withDescription$1, o as Boolean, p as withDefault, t as make } from "./Command-
|
|
1
|
+
import { B as flatMap, Gt as scoped } from "./Effect-CFIPV2Jg.mjs";
|
|
2
|
+
import { r as withDescription, t as String } from "./Argument-BKjmk8CZ.mjs";
|
|
3
|
+
import { c as Int, f as optional, i as withDescription$2, l as String$1, m as withDescription$1, o as Boolean, p as withDefault, t as make } from "./Command-D3hF_i6F.mjs";
|
|
4
4
|
import { exportArchive, importApp, importInto } from "./archive/archive-cli.config.mjs";
|
|
5
5
|
import { Bench } from "./bench/bench.service.mjs";
|
|
6
6
|
import { Credentials } from "./credentials/credentials.service.mjs";
|
|
@@ -41,6 +41,7 @@ const bench = make("bench", {
|
|
|
41
41
|
duration: String$1("duration").pipe(withDefault("30s"), withDescription$1("How long to start new steps, like 30s or 5m; steps in flight then finish")),
|
|
42
42
|
entry,
|
|
43
43
|
json: Boolean("json").pipe(withDefault(false), withDescription$1("Print the report as one JSON object")),
|
|
44
|
+
rate: Int("rate").pipe(optional, withDescription$1("Run an open loop: start this many steps a second whatever the answers, with at most --concurrency in flight, and time each from its scheduled start")),
|
|
44
45
|
stepTimeout: String$1("step-timeout").pipe(withDefault("30s"), withDescription$1("How long the workload's open and each step may take before it counts as failed, so one stuck step can't hold the run open")),
|
|
45
46
|
system: String$1("system").pipe(optional, withDescription$1("Another system to run the workload against for comparison, such as \"Cloudflare Durable Object\"; it needs --url, and akter bench signs in to nothing")),
|
|
46
47
|
url: String$1("url").pipe(optional, withDescription$1("The app to run against: a loopback akter dev, or an Akter Cloud app signed in to with AKTER_API_KEY or akter login. Without it, akter bench starts akter dev on an empty folder")),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as isGreaterThanOrEqualTo, F as String, I as Struct, an as optionalKey, g as Finite, n as ArraySchema, pt as fromJsonString, qt as isPattern, v as Int, x as Literal } from "../Schema-
|
|
1
|
+
import { Dt as isGreaterThanOrEqualTo, F as String, I as Struct, an as optionalKey, g as Finite, n as ArraySchema, pt as fromJsonString, qt as isPattern, v as Int, x as Literal } from "../Schema-O3QUdX3B.mjs";
|
|
2
2
|
// src/archive/akter-archive.schema.ts
|
|
3
3
|
/** The format version this akter writes. Every version it ever wrote stays readable (ADR 0019). */
|
|
4
4
|
const archiveFormat = 1;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { T as join, c as every, j as map, z as sort } from "../Array-B4kuTQeW.mjs";
|
|
2
|
-
import { P as currentTimeMillis } from "../HttpClientResponse-
|
|
3
|
-
import { At as provideContext, B as flatMap,
|
|
4
|
-
import { t as FileSystem } from "../FileSystem-
|
|
5
|
-
import { a as BlobHashing, d as get, f as isEmpty, l as empty, n as ArchivedActors, p as remove, r as blobHashing, t as ArchivedStore, u as fromIterable } from "../hosted-runtime.layer-
|
|
2
|
+
import { P as currentTimeMillis } from "../HttpClientResponse-CifutXCF.mjs";
|
|
3
|
+
import { At as provideContext, B as flatMap, Gt as scoped, I as filter, Jn as provide$1, K as forEach, M as fail, Pr as void_, Q as fromOption, T as context, Un as effect, W as fnUntraced, Wt as scope, Xt as succeed, dt as map$1, er as close, et as gen, ft as mapBoth, gn as void_$1, ht as mapError, l as as, lt as logWarning, nn as tapCause, nr as fork, o as andThen, or as provide, qn as mergeAll, sa as Service, tn as tap, tt as ignore, xt as onError } from "../Effect-CFIPV2Jg.mjs";
|
|
4
|
+
import { t as FileSystem } from "../FileSystem-iEC-kUB-.mjs";
|
|
5
|
+
import { a as BlobHashing, d as get, f as isEmpty, l as empty, n as ArchivedActors, p as remove, r as blobHashing, t as ArchivedStore, u as fromIterable } from "../hosted-runtime.layer-BDXPqzSp.mjs";
|
|
6
6
|
import { S as none, _ as isSome, h as isNone, w as some, x as match } from "../Option-DkxSnBhp.mjs";
|
|
7
7
|
import { a as String$1 } from "../Order-C1JC991I.mjs";
|
|
8
|
-
import { t as Path } from "../Path-
|
|
9
|
-
import { mt as is, st as encodeEffect, tt as decodeEffect } from "../Schema-
|
|
10
|
-
import { D as mapAccum, O as mapEffect, T as make, U as runFoldEffect, W as runForEach, k as mapError$1, m as flatMap$1, nt as unwrap, r as concat$1, y as fromIterable$1, z as run } from "../Stream-
|
|
8
|
+
import { t as Path } from "../Path-BRnAx8py.mjs";
|
|
9
|
+
import { mt as is, st as encodeEffect, tt as decodeEffect } from "../Schema-O3QUdX3B.mjs";
|
|
10
|
+
import { D as mapAccum, O as mapEffect, T as make, U as runFoldEffect, W as runForEach, k as mapError$1, m as flatMap$1, nt as unwrap, r as concat$1, y as fromIterable$1, z as run } from "../Stream-BeqiANg7.mjs";
|
|
11
11
|
import { h as startsWith, i as includes, m as split, r as endsWith } from "../String-q5dcsVe4.mjs";
|
|
12
12
|
import { ArchiveInvalidError } from "./archive-invalid.errors.mjs";
|
|
13
13
|
import { ArchiveManifestJson, ArchiveVersion, ArchivedComputersJson, computersPath, manifestPath } from "./akter-archive.schema.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { l as filter } from "../Array-B4kuTQeW.mjs";
|
|
2
|
-
import { n as log } from "../Console-
|
|
3
|
-
import { R as filterOrFail, U as fn, W as fnUntraced, Xt as succeed } from "../Effect-
|
|
4
|
-
import { t as FileSystem } from "../FileSystem-
|
|
5
|
-
import { t as Path } from "../Path-
|
|
6
|
-
import { r as withDescription, t as String$1 } from "../Argument-
|
|
7
|
-
import { i as withDescription$2, l as String$2, m as withDescription$1, p as withDefault, t as make } from "../Command-
|
|
2
|
+
import { n as log } from "../Console-DY7H086H.mjs";
|
|
3
|
+
import { R as filterOrFail, U as fn, W as fnUntraced, Xt as succeed } from "../Effect-CFIPV2Jg.mjs";
|
|
4
|
+
import { t as FileSystem } from "../FileSystem-iEC-kUB-.mjs";
|
|
5
|
+
import { t as Path } from "../Path-BRnAx8py.mjs";
|
|
6
|
+
import { r as withDescription, t as String$1 } from "../Argument-BKjmk8CZ.mjs";
|
|
7
|
+
import { i as withDescription$2, l as String$2, m as withDescription$1, p as withDefault, t as make } from "../Command-D3hF_i6F.mjs";
|
|
8
8
|
import { AkterArchive } from "./akter-archive.service.mjs";
|
|
9
9
|
import { ArchiveInvalidError } from "./archive-invalid.errors.mjs";
|
|
10
10
|
// src/archive/archive-cli.config.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as String, z as TaggedError } from "../Schema-
|
|
1
|
+
import { F as String, z as TaggedError } from "../Schema-O3QUdX3B.mjs";
|
|
2
2
|
// src/archive/archive-invalid.errors.ts
|
|
3
3
|
/** An `.akter` archive that can't be written or read as one: cut short, corrupt, mismatched or from a newer akter. */
|
|
4
4
|
var ArchiveInvalidError = class extends TaggedError()("ArchiveInvalidError", { message: String }) {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as reduce, T as join, _ as getSomes, c as every, h as fromIterable, j as map, l as filter, u as findFirst } from "../Array-B4kuTQeW.mjs";
|
|
2
2
|
import { S as none, b as map$1, f as getOrElse, h as isNone, u as fromNullishOr, w as some } from "../Option-DkxSnBhp.mjs";
|
|
3
|
-
import { D as mapAccum, T as make, r as concat$1, y as fromIterable$1 } from "../Stream-
|
|
3
|
+
import { D as mapAccum, T as make, r as concat$1, y as fromIterable$1 } from "../Stream-BeqiANg7.mjs";
|
|
4
4
|
import { d as replace, m as split, p as slice, u as padStart } from "../String-q5dcsVe4.mjs";
|
|
5
5
|
// src/archive/tar.pure.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as fail, X as forkScoped, Xn as succeed, en as sync, et as gen, gn as void_, o as andThen, p as callback, rn as tapError, sa as Service, tt as ignore } from "../Effect-CFIPV2Jg.mjs";
|
|
2
2
|
import { Xt as isError } from "../Option-DkxSnBhp.mjs";
|
|
3
|
-
import { W as runForEach, g as fromAsyncIterable, nt as unwrap } from "../Stream-
|
|
3
|
+
import { W as runForEach, g as fromAsyncIterable, nt as unwrap } from "../Stream-BeqiANg7.mjs";
|
|
4
4
|
import { ArchiveInvalidError } from "./archive-invalid.errors.mjs";
|
|
5
5
|
import { createZstdCompress, createZstdDecompress } from "node:zlib";
|
|
6
6
|
// src/archive/zstd.adapter.ts
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { L as reduce, T as join, j as map, v as groupBy, z as sort } from "../Array-B4kuTQeW.mjs";
|
|
2
2
|
import { n as max } from "../Number-BvkRkfc-.mjs";
|
|
3
|
+
import { d as fromUndefinedOr, x as match } from "../Option-DkxSnBhp.mjs";
|
|
3
4
|
import { a as String$1, f as mapInput, i as Number, n as Boolean, o as combine } from "../Order-C1JC991I.mjs";
|
|
4
|
-
import { F as String$2, I as Struct, U as Tuple, g as Finite, hr as toEntries, n as ArraySchema, v as Int } from "../Schema-
|
|
5
|
+
import { F as String$2, I as Struct, U as Tuple, g as Finite, hr as toEntries, n as ArraySchema, v as Int } from "../Schema-O3QUdX3B.mjs";
|
|
5
6
|
import { h as startsWith, l as padEnd, y as trimEnd } from "../String-q5dcsVe4.mjs";
|
|
6
7
|
// src/bench/bench-report.pure.ts
|
|
7
8
|
const Sample = Tuple([String$2, Finite]);
|
|
@@ -105,9 +106,13 @@ const tableOf = (rows) => {
|
|
|
105
106
|
const widths = map(header, (title, column) => reduce(cells, title.length, (width, cell) => max(width, cell[column]?.length ?? first)));
|
|
106
107
|
return map([header, ...cells], (cell) => trimEnd(join(map(cell, (text, column) => padEnd(widths[column] ?? first)(text)), " ")));
|
|
107
108
|
};
|
|
109
|
+
const loopOf = ({ concurrency, rate }) => match(fromUndefinedOr(rate), {
|
|
110
|
+
onNone: () => `at concurrency ${concurrency}`,
|
|
111
|
+
onSome: (perSecond) => `in an open loop at ${perSecond} steps a second, at most ${concurrency} in flight`
|
|
112
|
+
});
|
|
108
113
|
const reportLines = (report) => [
|
|
109
114
|
report.notice,
|
|
110
|
-
`workload ${report.workload}, ${fixed(report.durationMillis / millisPerSecond)} s
|
|
115
|
+
`workload ${report.workload}, ${fixed(report.durationMillis / millisPerSecond)} s ${loopOf(report)}, against ${report.target}; ${report.total.steps} steps in ${fixed(report.elapsedMillis / millisPerSecond)} s`,
|
|
111
116
|
"",
|
|
112
117
|
...tableOf([...report.rows, report.total]),
|
|
113
118
|
"",
|