@layr-labs/ecloud-cli 0.2.1-dev → 0.2.2-dev
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/VERSION +2 -2
- package/dist/commands/auth/whoami.js.map +1 -1
- package/dist/commands/billing/cancel.js.map +1 -1
- package/dist/commands/billing/status.js.map +1 -1
- package/dist/commands/billing/subscribe.js.map +1 -1
- package/dist/commands/compute/app/create.js.map +1 -1
- package/dist/commands/compute/app/deploy.js +17 -9
- package/dist/commands/compute/app/deploy.js.map +1 -1
- package/dist/commands/compute/app/info.js +27 -12
- package/dist/commands/compute/app/info.js.map +1 -1
- package/dist/commands/compute/app/list.js +11 -7
- package/dist/commands/compute/app/list.js.map +1 -1
- package/dist/commands/compute/app/logs.js +2 -2
- package/dist/commands/compute/app/logs.js.map +1 -1
- package/dist/commands/compute/app/profile/set.js +3 -3
- package/dist/commands/compute/app/profile/set.js.map +1 -1
- package/dist/commands/compute/app/releases.js +19 -101
- package/dist/commands/compute/app/releases.js.map +1 -1
- package/dist/commands/compute/app/start.js +2 -2
- package/dist/commands/compute/app/start.js.map +1 -1
- package/dist/commands/compute/app/stop.js +2 -2
- package/dist/commands/compute/app/stop.js.map +1 -1
- package/dist/commands/compute/app/terminate.js +2 -2
- package/dist/commands/compute/app/terminate.js.map +1 -1
- package/dist/commands/compute/app/upgrade.js +19 -11
- package/dist/commands/compute/app/upgrade.js.map +1 -1
- package/dist/commands/compute/build/info.js +11 -10
- package/dist/commands/compute/build/info.js.map +1 -1
- package/dist/commands/compute/build/list.js +27 -61
- package/dist/commands/compute/build/list.js.map +1 -1
- package/dist/commands/compute/build/logs.js +10 -7
- package/dist/commands/compute/build/logs.js.map +1 -1
- package/dist/commands/compute/build/status.js +10 -7
- package/dist/commands/compute/build/status.js.map +1 -1
- package/dist/commands/compute/build/submit.js +10 -7
- package/dist/commands/compute/build/submit.js.map +1 -1
- package/dist/commands/compute/build/verify.js +10 -7
- package/dist/commands/compute/build/verify.js.map +1 -1
- package/dist/commands/compute/environment/set.js.map +1 -1
- package/dist/commands/compute/undelegate.js +1 -1
- package/dist/commands/compute/undelegate.js.map +1 -1
- package/package.json +2 -2
|
@@ -236,7 +236,7 @@ function listApps(environment) {
|
|
|
236
236
|
|
|
237
237
|
// src/utils/version.ts
|
|
238
238
|
function getCliVersion() {
|
|
239
|
-
return true ? "0.2.
|
|
239
|
+
return true ? "0.2.2-dev" : "0.0.0";
|
|
240
240
|
}
|
|
241
241
|
function getClientId() {
|
|
242
242
|
return `ecloud-cli/v${getCliVersion()}`;
|
|
@@ -381,7 +381,7 @@ Select an app to ${action}:
|
|
|
381
381
|
environmentConfig,
|
|
382
382
|
walletClient,
|
|
383
383
|
publicClient,
|
|
384
|
-
getClientId()
|
|
384
|
+
{ clientId: getClientId() }
|
|
385
385
|
);
|
|
386
386
|
const appInfos = await getAppInfosChunked(userApiClient, apps);
|
|
387
387
|
const freshProfiles = {};
|
|
@@ -871,15 +871,7 @@ function formatAppRelease(release, index) {
|
|
|
871
871
|
return lines;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
|
-
// src/commands/compute/app/releases.ts
|
|
875
|
-
import { isAddress as isAddress3 } from "viem";
|
|
876
|
-
import Table from "cli-table3";
|
|
877
|
-
|
|
878
874
|
// src/utils/cliFormat.ts
|
|
879
|
-
function terminalWidth(fallback = 120) {
|
|
880
|
-
const cols = typeof process.stdout.columns === "number" ? process.stdout.columns : void 0;
|
|
881
|
-
return cols && cols > 0 ? cols : fallback;
|
|
882
|
-
}
|
|
883
875
|
function formatHumanTime(value) {
|
|
884
876
|
const raw = String(value ?? "").trim();
|
|
885
877
|
if (!raw) return "-";
|
|
@@ -994,11 +986,7 @@ var AppReleases = class _AppReleases extends Command {
|
|
|
994
986
|
async run() {
|
|
995
987
|
return withTelemetry(this, async () => {
|
|
996
988
|
const { args, flags } = await this.parse(_AppReleases);
|
|
997
|
-
const
|
|
998
|
-
const needsPrivateKey = !rawAppId || !isAddress3(rawAppId);
|
|
999
|
-
const validatedFlags = await validateCommonFlags(flags, {
|
|
1000
|
-
requirePrivateKey: needsPrivateKey
|
|
1001
|
-
});
|
|
989
|
+
const validatedFlags = await validateCommonFlags(flags);
|
|
1002
990
|
const environment = validatedFlags.environment || "sepolia";
|
|
1003
991
|
const environmentConfig = getEnvironmentConfig3(environment);
|
|
1004
992
|
const rpcUrl = validatedFlags["rpc-url"] || environmentConfig.defaultRPCURL;
|
|
@@ -1010,15 +998,14 @@ var AppReleases = class _AppReleases extends Command {
|
|
|
1010
998
|
rpcUrl,
|
|
1011
999
|
action: "view releases for"
|
|
1012
1000
|
});
|
|
1013
|
-
if (!privateKey) {
|
|
1014
|
-
this.error("Private key is required to fetch releases. Please provide --private-key.");
|
|
1015
|
-
}
|
|
1016
1001
|
const { publicClient, walletClient } = createViemClients({
|
|
1017
1002
|
privateKey,
|
|
1018
1003
|
rpcUrl,
|
|
1019
1004
|
environment
|
|
1020
1005
|
});
|
|
1021
|
-
const userApiClient = new UserApiClient3(environmentConfig, walletClient, publicClient,
|
|
1006
|
+
const userApiClient = new UserApiClient3(environmentConfig, walletClient, publicClient, {
|
|
1007
|
+
clientId: getClientId()
|
|
1008
|
+
});
|
|
1022
1009
|
const data = await userApiClient.getApp(appID);
|
|
1023
1010
|
const releases = sortReleasesOldestFirst(data.releases);
|
|
1024
1011
|
if (releases.length === 0) {
|
|
@@ -1043,7 +1030,8 @@ ${separator()}
|
|
|
1043
1030
|
}
|
|
1044
1031
|
return;
|
|
1045
1032
|
}
|
|
1046
|
-
|
|
1033
|
+
for (let i = 0; i < releases.length; i++) {
|
|
1034
|
+
const r = releases[i];
|
|
1047
1035
|
const rel = r.rmsReleaseId ?? String(i);
|
|
1048
1036
|
const block = r.createdAtBlock ? String(r.createdAtBlock) : "-";
|
|
1049
1037
|
const created = r.createdAt ? formatHumanTime(r.createdAt) : "-";
|
|
@@ -1053,89 +1041,19 @@ ${separator()}
|
|
|
1053
1041
|
const image = formatImageDisplay(r.build?.imageUrl ?? r.registryUrl ?? "-");
|
|
1054
1042
|
const build = r.build?.buildId ?? "-";
|
|
1055
1043
|
const prov = provenanceSummaryFromBuild(r.build);
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
digest: chalk2.bold("Digest"),
|
|
1067
|
-
image: chalk2.bold("Image"),
|
|
1068
|
-
build: chalk2.bold("Build"),
|
|
1069
|
-
prov: chalk2.bold("Prov"),
|
|
1070
|
-
deps: chalk2.bold("Deps")
|
|
1071
|
-
};
|
|
1072
|
-
const tw = terminalWidth();
|
|
1073
|
-
const shouldStack = tw < 140;
|
|
1074
|
-
if (shouldStack) {
|
|
1075
|
-
for (const r of rows) {
|
|
1076
|
-
this.log(`${chalk2.cyan(r.rel)} ${r.created} (block ${r.block})`);
|
|
1077
|
-
this.log(` Repo: ${r.repo}`);
|
|
1078
|
-
this.log(` Commit: ${r.commit}`);
|
|
1079
|
-
this.log(` Digest: ${r.digest}`);
|
|
1080
|
-
this.log(` Image: ${r.image}`);
|
|
1081
|
-
this.log(` Build: ${r.build}`);
|
|
1082
|
-
this.log(` Provenance: ${r.prov}`);
|
|
1083
|
-
const relObj = releases.find((x, idx) => (x.rmsReleaseId ?? String(idx)) === r.rel);
|
|
1084
|
-
const depLines = formatDepLines(relObj?.build?.dependencies);
|
|
1085
|
-
if (depLines.length) {
|
|
1086
|
-
for (const l of depLines) this.log(l);
|
|
1087
|
-
}
|
|
1088
|
-
this.log(chalk2.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
1044
|
+
this.log(`${chalk2.cyan(rel)} ${created} (block ${block})`);
|
|
1045
|
+
this.log(` Repo: ${repo}`);
|
|
1046
|
+
this.log(` Commit: ${commit}`);
|
|
1047
|
+
this.log(` Digest: ${digest}`);
|
|
1048
|
+
this.log(` Image: ${image}`);
|
|
1049
|
+
this.log(` Build: ${build}`);
|
|
1050
|
+
this.log(` Provenance: ${prov}`);
|
|
1051
|
+
const depLines = formatDepLines(r.build?.dependencies);
|
|
1052
|
+
if (depLines.length) {
|
|
1053
|
+
for (const l of depLines) this.log(l);
|
|
1089
1054
|
}
|
|
1090
|
-
this.log("");
|
|
1091
|
-
this.log(
|
|
1092
|
-
chalk2.gray(
|
|
1093
|
-
`Tip: use ${chalk2.yellow("--full")} for detailed release output, ${chalk2.yellow(
|
|
1094
|
-
"--json"
|
|
1095
|
-
)} to copy/paste, and ${chalk2.yellow(
|
|
1096
|
-
"ecloud compute build info <buildId>"
|
|
1097
|
-
)} for full build/provenance details.`
|
|
1098
|
-
)
|
|
1099
|
-
);
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
const fixed = 6 + 10 + 20 + 36 + 12 + 8 + 10;
|
|
1103
|
-
const remaining = Math.max(60, tw - fixed);
|
|
1104
|
-
const repoW = Math.max(18, Math.floor(remaining * 0.25));
|
|
1105
|
-
const digestW = Math.max(18, Math.floor(remaining * 0.35));
|
|
1106
|
-
const imageW = Math.max(18, remaining - repoW - digestW);
|
|
1107
|
-
const table = new Table({
|
|
1108
|
-
head: [
|
|
1109
|
-
headers.rel,
|
|
1110
|
-
headers.block,
|
|
1111
|
-
headers.created,
|
|
1112
|
-
headers.repo,
|
|
1113
|
-
headers.commit,
|
|
1114
|
-
headers.digest,
|
|
1115
|
-
headers.image,
|
|
1116
|
-
headers.build,
|
|
1117
|
-
headers.prov,
|
|
1118
|
-
headers.deps
|
|
1119
|
-
],
|
|
1120
|
-
colWidths: [6, 10, 20, repoW, 10, digestW, imageW, 36, 12, 8],
|
|
1121
|
-
wordWrap: true,
|
|
1122
|
-
style: { "padding-left": 0, "padding-right": 1, head: [], border: [] }
|
|
1123
|
-
});
|
|
1124
|
-
for (const r of rows) {
|
|
1125
|
-
table.push([
|
|
1126
|
-
r.rel,
|
|
1127
|
-
r.block,
|
|
1128
|
-
r.created,
|
|
1129
|
-
r.repo,
|
|
1130
|
-
r.commit,
|
|
1131
|
-
r.digest,
|
|
1132
|
-
r.image,
|
|
1133
|
-
r.build,
|
|
1134
|
-
r.prov,
|
|
1135
|
-
r.deps
|
|
1136
|
-
]);
|
|
1055
|
+
this.log(chalk2.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
1137
1056
|
}
|
|
1138
|
-
this.log(table.toString());
|
|
1139
1057
|
this.log("");
|
|
1140
1058
|
this.log(
|
|
1141
1059
|
chalk2.gray(
|