@secondlayer/cli 8.13.0 → 8.14.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.
- package/dist/cli.js +28 -22
- package/dist/cli.js.map +5 -5
- package/package.json +6 -16
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.1",
|
|
31815
31815
|
repository: {
|
|
31816
31816
|
type: "git",
|
|
31817
31817
|
url: "git+https://github.com/ryanwaits/secondlayer.git",
|
|
@@ -31836,11 +31836,7 @@ var package_default = {
|
|
|
31836
31836
|
import: "./dist/plugins/index.js"
|
|
31837
31837
|
}
|
|
31838
31838
|
},
|
|
31839
|
-
files: [
|
|
31840
|
-
"dist",
|
|
31841
|
-
"templates",
|
|
31842
|
-
"README.md"
|
|
31843
|
-
],
|
|
31839
|
+
files: ["dist", "templates", "README.md"],
|
|
31844
31840
|
scripts: {
|
|
31845
31841
|
build: "bunup",
|
|
31846
31842
|
dev: "bunup --watch",
|
|
@@ -31848,23 +31844,17 @@ var package_default = {
|
|
|
31848
31844
|
typecheck: "tsc --noEmit",
|
|
31849
31845
|
prepublishOnly: "bun run build"
|
|
31850
31846
|
},
|
|
31851
|
-
keywords: [
|
|
31852
|
-
"stacks",
|
|
31853
|
-
"clarity",
|
|
31854
|
-
"blockchain",
|
|
31855
|
-
"smart-contracts",
|
|
31856
|
-
"cli"
|
|
31857
|
-
],
|
|
31847
|
+
keywords: ["stacks", "clarity", "blockchain", "smart-contracts", "cli"],
|
|
31858
31848
|
author: "",
|
|
31859
31849
|
license: "MIT",
|
|
31860
31850
|
dependencies: {
|
|
31861
31851
|
"@inquirer/prompts": "^8.2.0",
|
|
31862
|
-
"@secondlayer/bundler": "^0.
|
|
31852
|
+
"@secondlayer/bundler": "^0.4.0",
|
|
31863
31853
|
"@secondlayer/scaffold": "^1.3.0",
|
|
31864
31854
|
"@secondlayer/sdk": "^6.23.1",
|
|
31865
|
-
"@secondlayer/shared": "^6.
|
|
31855
|
+
"@secondlayer/shared": "^6.40.0",
|
|
31866
31856
|
"@secondlayer/stacks": "^2.5.1",
|
|
31867
|
-
"@secondlayer/subgraphs": "^3.
|
|
31857
|
+
"@secondlayer/subgraphs": "^3.19.0",
|
|
31868
31858
|
"@biomejs/js-api": "^0.7.0",
|
|
31869
31859
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
31870
31860
|
esbuild: "^0.19.0",
|
|
@@ -32137,11 +32127,15 @@ async function showProfile(json) {
|
|
|
32137
32127
|
["Plan", profile.plan],
|
|
32138
32128
|
["Display Name", profile.displayName ?? dim("—")],
|
|
32139
32129
|
["Bio", profile.bio ?? dim("—")],
|
|
32140
|
-
["Slug", profile.slug ?? dim("—")]
|
|
32130
|
+
["Slug", profile.slug ?? dim("—")],
|
|
32131
|
+
[
|
|
32132
|
+
"Notify on reindex complete",
|
|
32133
|
+
profile.notifyReindexComplete ? "on" : "off"
|
|
32134
|
+
]
|
|
32141
32135
|
]))
|
|
32142
32136
|
});
|
|
32143
32137
|
}
|
|
32144
|
-
async function applyProfileUpdate(options) {
|
|
32138
|
+
async function applyProfileUpdate(options, getOptionValueSource) {
|
|
32145
32139
|
const data = {};
|
|
32146
32140
|
if (options.name)
|
|
32147
32141
|
data.display_name = options.name;
|
|
@@ -32149,6 +32143,9 @@ async function applyProfileUpdate(options) {
|
|
|
32149
32143
|
data.bio = options.bio;
|
|
32150
32144
|
if (options.slug)
|
|
32151
32145
|
data.slug = options.slug;
|
|
32146
|
+
if (getOptionValueSource("notifyReindexComplete") === "cli") {
|
|
32147
|
+
data.notify_reindex_complete = options.notifyReindexComplete;
|
|
32148
|
+
}
|
|
32152
32149
|
const updated = await updateAccountProfile(data);
|
|
32153
32150
|
output({
|
|
32154
32151
|
json: options.json,
|
|
@@ -32158,7 +32155,11 @@ async function applyProfileUpdate(options) {
|
|
|
32158
32155
|
console.log(formatKeyValue([
|
|
32159
32156
|
["Display Name", updated.displayName ?? dim("—")],
|
|
32160
32157
|
["Bio", updated.bio ?? dim("—")],
|
|
32161
|
-
["Slug", updated.slug ?? dim("—")]
|
|
32158
|
+
["Slug", updated.slug ?? dim("—")],
|
|
32159
|
+
[
|
|
32160
|
+
"Notify on reindex complete",
|
|
32161
|
+
updated.notifyReindexComplete ? "on" : "off"
|
|
32162
|
+
]
|
|
32162
32163
|
]));
|
|
32163
32164
|
}
|
|
32164
32165
|
});
|
|
@@ -32167,7 +32168,7 @@ function registerAccountCommand(program2) {
|
|
|
32167
32168
|
const account = program2.command("account").description("Manage your account profile");
|
|
32168
32169
|
addBillingCommand(account);
|
|
32169
32170
|
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), {
|
|
32171
|
+
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
32172
|
action: "update profile"
|
|
32172
32173
|
}));
|
|
32173
32174
|
}
|
|
@@ -35388,8 +35389,9 @@ function formatSubgraphSync(sync) {
|
|
|
35388
35389
|
};
|
|
35389
35390
|
}
|
|
35390
35391
|
const range = processedBlocks !== undefined && totalBlocks !== undefined ? `${processedBlocks} / ${totalBlocks} blocks` : `${sync.lastProcessedBlock} / ${targetBlock}`;
|
|
35392
|
+
const eta = sync.etaSeconds != null ? ` · est ${formatDuration(sync.etaSeconds)}` : "";
|
|
35391
35393
|
return {
|
|
35392
|
-
line: `reindexing — ${progress} (${range}, target #${targetBlock})`,
|
|
35394
|
+
line: `reindexing — ${progress} (${range}, target #${targetBlock})${eta}`,
|
|
35393
35395
|
remainingLabel: "Reindex Remaining",
|
|
35394
35396
|
remaining: String(sync.blocksRemaining)
|
|
35395
35397
|
};
|
|
@@ -35615,6 +35617,10 @@ Stopped watching.`);
|
|
|
35615
35617
|
info(` REST: ${apiUrl}/api/subgraphs/${effectiveDef.name}/${firstTable}`);
|
|
35616
35618
|
info(` Publish: sl subgraphs publish ${effectiveDef.name} (open anon /v1 reads)`);
|
|
35617
35619
|
}
|
|
35620
|
+
if (result.reindexStarted) {
|
|
35621
|
+
const denom = result.estimatedEvents != null ? ` ~${result.estimatedEvents.toLocaleString()} events —` : "";
|
|
35622
|
+
info(` Reindex: ${denom} started in the background — check status in ~30s for an ETA`);
|
|
35623
|
+
}
|
|
35618
35624
|
info(` Watch: sl subgraphs status ${effectiveDef.name}`);
|
|
35619
35625
|
if (firstTable) {
|
|
35620
35626
|
info(` Webhook: sl subscriptions create ${effectiveDef.name}-hook --subgraph ${effectiveDef.name} --table ${firstTable} --url <your-endpoint>`);
|
|
@@ -38120,5 +38126,5 @@ registerAccountCommand(program);
|
|
|
38120
38126
|
registerKeysCommand(program);
|
|
38121
38127
|
program.parse();
|
|
38122
38128
|
|
|
38123
|
-
//# debugId=
|
|
38129
|
+
//# debugId=5CCA45951BC8A27364756E2164756E21
|
|
38124
38130
|
//# sourceMappingURL=cli.js.map
|