@akterjs/cli 0.1.3 → 0.1.4
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/{akter-program.config-BqHoPt6H.mjs → akter-program.config-C-mFiZp1.mjs} +1 -1
- package/dist/akter.cli.mjs +1 -1
- package/dist/command/akter-program.config.mjs +1 -1
- package/dist/export/actor-export.service.mjs +2 -2
- package/dist/export/export-failure.pure.mjs +13 -2
- package/package.json +3 -3
|
@@ -7232,7 +7232,7 @@ const spec = {
|
|
|
7232
7232
|
]
|
|
7233
7233
|
};
|
|
7234
7234
|
// .generated/compiled/package-version.adapter.js
|
|
7235
|
-
const version = "0.1.
|
|
7235
|
+
const version = "0.1.4";
|
|
7236
7236
|
// src/command/akter-program.config.ts
|
|
7237
7237
|
const main = gen(function* main() {
|
|
7238
7238
|
const operations = yield* operationsOf(spec).pipe(orDie);
|
package/dist/akter.cli.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as runAkter } from "../akter-program.config-
|
|
1
|
+
export { t as runAkter } from "../akter-program.config-C-mFiZp1.mjs";
|
|
@@ -13,7 +13,7 @@ import { ArchivedComputersJson, computersPath } from "../archive/akter-archive.s
|
|
|
13
13
|
import { t as CloudClient } from "../cloud-client.adapter-Dln8NW-9.mjs";
|
|
14
14
|
import { cloudUrl } from "../deploy/cloud-url.pure.mjs";
|
|
15
15
|
import { ExportFailedError } from "./export-failed.errors.mjs";
|
|
16
|
-
import { exportFailure, snapshotRetries } from "./export-failure.pure.mjs";
|
|
16
|
+
import { exportFailure, listingRetries, snapshotRetries } from "./export-failure.pure.mjs";
|
|
17
17
|
import { orderedLines } from "./ordered-lines.pure.mjs";
|
|
18
18
|
import { downloadedSnapshot } from "./snapshot-download.pure.mjs";
|
|
19
19
|
// src/export/actor-export.service.ts
|
|
@@ -199,7 +199,7 @@ const exportActor = fn("exportActor")(function* exportActor(job) {
|
|
|
199
199
|
});
|
|
200
200
|
/** Shards listed at once: a sparse app's 300 listings take about 300 × 330 ms one at a time, about 3 s 32 at a time. */
|
|
201
201
|
const shardsListedAtOnce = 32;
|
|
202
|
-
const listShard = (run, shard) => run.cloud.request(run.cloud.client.actorsExportShard(run.target.organization, run.target.app, String(shard), {}), "30 seconds").pipe(mapBoth({
|
|
202
|
+
const listShard = (run, shard) => run.cloud.request(run.cloud.client.actorsExportShard(run.target.organization, run.target.app, String(shard), {}), "30 seconds").pipe(retry(listingRetries), mapBoth({
|
|
203
203
|
onFailure: exportFailure(`Listing shard ${shard}`),
|
|
204
204
|
onSuccess: (page) => ({
|
|
205
205
|
page,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jn as spaced } from "../Effect-CFIPV2Jg.mjs";
|
|
1
|
+
import { En as exponential, jn as spaced } from "../Effect-CFIPV2Jg.mjs";
|
|
2
2
|
import { mt as is } from "../Schema-O3QUdX3B.mjs";
|
|
3
3
|
import { DeployFailedError } from "../deploy/deploy-failed.errors.mjs";
|
|
4
4
|
import { retryable, statusOf } from "../deploy/request-failure.pure.mjs";
|
|
@@ -9,10 +9,21 @@ const snapshotRetries = {
|
|
|
9
9
|
times: 3,
|
|
10
10
|
while: retryable
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* How a shard listing retries a 429, a 5xx, a timeout or a connection error: 0.5, 1, 2, 4, 8 and 16 seconds apart. A
|
|
14
|
+
* store that sleeps places a shard only when a call wakes it, so listing every shard wakes each one, and the gateway
|
|
15
|
+
* answers 503 when control doesn't answer the wake in 15 s or the shard isn't placed within the call's 30 s. The wake
|
|
16
|
+
* still places it, so the next attempt finds its owner.
|
|
17
|
+
*/
|
|
18
|
+
const listingRetries = {
|
|
19
|
+
schedule: exponential("500 millis"),
|
|
20
|
+
times: 6,
|
|
21
|
+
while: retryable
|
|
22
|
+
};
|
|
12
23
|
/** A failed Cloud request of an export step as the export's failure, naming the step and the HTTP status. */
|
|
13
24
|
const exportFailure = (operation) => (failure) => {
|
|
14
25
|
if (is(ExportFailedError)(failure)) return failure;
|
|
15
26
|
if (is(DeployFailedError)(failure)) return ExportFailedError.make({ message: failure.message });
|
|
16
27
|
return ExportFailedError.make({ message: `${operation} failed (${statusOf(failure)}).` });
|
|
17
28
|
};
|
|
18
|
-
export { exportFailure, snapshotRetries };
|
|
29
|
+
export { exportFailure, listingRetries, snapshotRetries };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akterjs/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "The akter command: local engine, deploy, branch, restore, history, export, migrate and bench.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"esbuild": "0.28.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@akterjs/client": "0.1.
|
|
35
|
+
"@akterjs/client": "0.1.4",
|
|
36
36
|
"@akterjs/cloud-api": "file:../../../akter-cloud/packages/cloud-api",
|
|
37
|
-
"@akterjs/effect": "0.1.
|
|
37
|
+
"@akterjs/effect": "0.1.4",
|
|
38
38
|
"@effect/openapi-generator": "4.1.2",
|
|
39
39
|
"@effect/platform-node": "4.1.2",
|
|
40
40
|
"@effect/vitest": "4.1.2",
|