@secondlayer/cli 8.13.0 → 8.14.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/dist/cli.js +25 -9
- package/dist/cli.js.map +5 -5
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -31811,7 +31811,7 @@ var {
|
|
|
31811
31811
|
// package.json
|
|
31812
31812
|
var package_default = {
|
|
31813
31813
|
name: "@secondlayer/cli",
|
|
31814
|
-
version: "8.
|
|
31814
|
+
version: "8.14.0",
|
|
31815
31815
|
repository: {
|
|
31816
31816
|
type: "git",
|
|
31817
31817
|
url: "git+https://github.com/ryanwaits/secondlayer.git",
|
|
@@ -31862,9 +31862,9 @@ var package_default = {
|
|
|
31862
31862
|
"@secondlayer/bundler": "^0.3.7",
|
|
31863
31863
|
"@secondlayer/scaffold": "^1.3.0",
|
|
31864
31864
|
"@secondlayer/sdk": "^6.23.1",
|
|
31865
|
-
"@secondlayer/shared": "^6.
|
|
31865
|
+
"@secondlayer/shared": "^6.40.0",
|
|
31866
31866
|
"@secondlayer/stacks": "^2.5.1",
|
|
31867
|
-
"@secondlayer/subgraphs": "^3.
|
|
31867
|
+
"@secondlayer/subgraphs": "^3.19.0",
|
|
31868
31868
|
"@biomejs/js-api": "^0.7.0",
|
|
31869
31869
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
31870
31870
|
esbuild: "^0.19.0",
|
|
@@ -32137,11 +32137,15 @@ async function showProfile(json) {
|
|
|
32137
32137
|
["Plan", profile.plan],
|
|
32138
32138
|
["Display Name", profile.displayName ?? dim("—")],
|
|
32139
32139
|
["Bio", profile.bio ?? dim("—")],
|
|
32140
|
-
["Slug", profile.slug ?? dim("—")]
|
|
32140
|
+
["Slug", profile.slug ?? dim("—")],
|
|
32141
|
+
[
|
|
32142
|
+
"Notify on reindex complete",
|
|
32143
|
+
profile.notifyReindexComplete ? "on" : "off"
|
|
32144
|
+
]
|
|
32141
32145
|
]))
|
|
32142
32146
|
});
|
|
32143
32147
|
}
|
|
32144
|
-
async function applyProfileUpdate(options) {
|
|
32148
|
+
async function applyProfileUpdate(options, getOptionValueSource) {
|
|
32145
32149
|
const data = {};
|
|
32146
32150
|
if (options.name)
|
|
32147
32151
|
data.display_name = options.name;
|
|
@@ -32149,6 +32153,9 @@ async function applyProfileUpdate(options) {
|
|
|
32149
32153
|
data.bio = options.bio;
|
|
32150
32154
|
if (options.slug)
|
|
32151
32155
|
data.slug = options.slug;
|
|
32156
|
+
if (getOptionValueSource("notifyReindexComplete") === "cli") {
|
|
32157
|
+
data.notify_reindex_complete = options.notifyReindexComplete;
|
|
32158
|
+
}
|
|
32152
32159
|
const updated = await updateAccountProfile(data);
|
|
32153
32160
|
output({
|
|
32154
32161
|
json: options.json,
|
|
@@ -32158,7 +32165,11 @@ async function applyProfileUpdate(options) {
|
|
|
32158
32165
|
console.log(formatKeyValue([
|
|
32159
32166
|
["Display Name", updated.displayName ?? dim("—")],
|
|
32160
32167
|
["Bio", updated.bio ?? dim("—")],
|
|
32161
|
-
["Slug", updated.slug ?? dim("—")]
|
|
32168
|
+
["Slug", updated.slug ?? dim("—")],
|
|
32169
|
+
[
|
|
32170
|
+
"Notify on reindex complete",
|
|
32171
|
+
updated.notifyReindexComplete ? "on" : "off"
|
|
32172
|
+
]
|
|
32162
32173
|
]));
|
|
32163
32174
|
}
|
|
32164
32175
|
});
|
|
@@ -32167,7 +32178,7 @@ function registerAccountCommand(program2) {
|
|
|
32167
32178
|
const account = program2.command("account").description("Manage your account profile");
|
|
32168
32179
|
addBillingCommand(account);
|
|
32169
32180
|
account.command("get").description("Show your account profile").option("--json", "Output as JSON").action(withErrorHandling(async (options) => showProfile(options.json), { action: "show profile" }));
|
|
32170
|
-
account.command("update").description("Update your public profile").option("--name <name>", "Set display name").option("--bio <bio>", "Set bio").option("--slug <slug>", "Set public URL slug").option("--json", "Output as JSON").action(withErrorHandling(async (options) => applyProfileUpdate(options), {
|
|
32181
|
+
account.command("update").description("Update your public profile").option("--name <name>", "Set display name").option("--bio <bio>", "Set bio").option("--slug <slug>", "Set public URL slug").option("--notify-reindex-complete", "Email me when a subgraph reindex finishes").option("--no-notify-reindex-complete", "Don't email me when a subgraph reindex finishes").option("--json", "Output as JSON").action(withErrorHandling(async (options, command) => applyProfileUpdate(options, (key) => command.getOptionValueSource(key)), {
|
|
32171
32182
|
action: "update profile"
|
|
32172
32183
|
}));
|
|
32173
32184
|
}
|
|
@@ -35388,8 +35399,9 @@ function formatSubgraphSync(sync) {
|
|
|
35388
35399
|
};
|
|
35389
35400
|
}
|
|
35390
35401
|
const range = processedBlocks !== undefined && totalBlocks !== undefined ? `${processedBlocks} / ${totalBlocks} blocks` : `${sync.lastProcessedBlock} / ${targetBlock}`;
|
|
35402
|
+
const eta = sync.etaSeconds != null ? ` · est ${formatDuration(sync.etaSeconds)}` : "";
|
|
35391
35403
|
return {
|
|
35392
|
-
line: `reindexing — ${progress} (${range}, target #${targetBlock})`,
|
|
35404
|
+
line: `reindexing — ${progress} (${range}, target #${targetBlock})${eta}`,
|
|
35393
35405
|
remainingLabel: "Reindex Remaining",
|
|
35394
35406
|
remaining: String(sync.blocksRemaining)
|
|
35395
35407
|
};
|
|
@@ -35615,6 +35627,10 @@ Stopped watching.`);
|
|
|
35615
35627
|
info(` REST: ${apiUrl}/api/subgraphs/${effectiveDef.name}/${firstTable}`);
|
|
35616
35628
|
info(` Publish: sl subgraphs publish ${effectiveDef.name} (open anon /v1 reads)`);
|
|
35617
35629
|
}
|
|
35630
|
+
if (result.reindexStarted) {
|
|
35631
|
+
const denom = result.estimatedEvents != null ? ` ~${result.estimatedEvents.toLocaleString()} events —` : "";
|
|
35632
|
+
info(` Reindex: ${denom} started in the background — check status in ~30s for an ETA`);
|
|
35633
|
+
}
|
|
35618
35634
|
info(` Watch: sl subgraphs status ${effectiveDef.name}`);
|
|
35619
35635
|
if (firstTable) {
|
|
35620
35636
|
info(` Webhook: sl subscriptions create ${effectiveDef.name}-hook --subgraph ${effectiveDef.name} --table ${firstTable} --url <your-endpoint>`);
|
|
@@ -38120,5 +38136,5 @@ registerAccountCommand(program);
|
|
|
38120
38136
|
registerKeysCommand(program);
|
|
38121
38137
|
program.parse();
|
|
38122
38138
|
|
|
38123
|
-
//# debugId=
|
|
38139
|
+
//# debugId=7477A77F4D7194B764756E2164756E21
|
|
38124
38140
|
//# sourceMappingURL=cli.js.map
|