@settlemint/sdk-cli 2.5.1-prf450dfcd → 2.5.1-prffc87b53
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 +552 -257
- package/dist/cli.js.map +10 -9
- package/package.json +7 -7
package/dist/cli.js
CHANGED
@@ -161742,7 +161742,7 @@ ${lanes.join(`
|
|
161742
161742
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161743
161743
|
var _a;
|
161744
161744
|
const text = [];
|
161745
|
-
const
|
161745
|
+
const colors3 = createColors(sys2);
|
161746
161746
|
const name2 = getDisplayNameTextOfOption(option);
|
161747
161747
|
const valueCandidates = getValueCandidate(option);
|
161748
161748
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161763,7 +161763,7 @@ ${lanes.join(`
|
|
161763
161763
|
}
|
161764
161764
|
text.push(sys2.newLine);
|
161765
161765
|
} else {
|
161766
|
-
text.push(
|
161766
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
161767
161767
|
if (option.description) {
|
161768
161768
|
const description3 = getDiagnosticText(option.description);
|
161769
161769
|
text.push(description3);
|
@@ -161808,7 +161808,7 @@ ${lanes.join(`
|
|
161808
161808
|
if (isFirstLine) {
|
161809
161809
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161810
161810
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161811
|
-
curLeft = colorLeft ?
|
161811
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
161812
161812
|
} else {
|
161813
161813
|
curLeft = "".padStart(leftAlignOfRight2);
|
161814
161814
|
}
|
@@ -161920,9 +161920,9 @@ ${lanes.join(`
|
|
161920
161920
|
return res;
|
161921
161921
|
}
|
161922
161922
|
function printEasyHelp(sys2, simpleOptions) {
|
161923
|
-
const
|
161923
|
+
const colors3 = createColors(sys2);
|
161924
161924
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version4)}`)];
|
161925
|
-
output.push(
|
161925
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161926
161926
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161927
161927
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161928
161928
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161943,7 +161943,7 @@ ${lanes.join(`
|
|
161943
161943
|
function example(ex, desc) {
|
161944
161944
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161945
161945
|
for (const example2 of examples) {
|
161946
|
-
output.push(" " +
|
161946
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
161947
161947
|
}
|
161948
161948
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161949
161949
|
}
|
@@ -161966,12 +161966,12 @@ ${lanes.join(`
|
|
161966
161966
|
}
|
161967
161967
|
function getHeader(sys2, message) {
|
161968
161968
|
var _a;
|
161969
|
-
const
|
161969
|
+
const colors3 = createColors(sys2);
|
161970
161970
|
const header = [];
|
161971
161971
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161972
161972
|
const tsIconLength = 5;
|
161973
|
-
const tsIconFirstLine =
|
161974
|
-
const tsIconSecondLine =
|
161973
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
161974
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
161975
161975
|
if (terminalWidth >= message.length + tsIconLength) {
|
161976
161976
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161977
161977
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -246144,7 +246144,10 @@ var {
|
|
246144
246144
|
} = import__.default;
|
246145
246145
|
|
246146
246146
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
246147
|
+
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
246148
|
+
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
246147
246149
|
var isBackspaceKey = (key) => key.name === "backspace";
|
246150
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
246148
246151
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
246149
246152
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
246150
246153
|
class AbortPromptError extends Error {
|
@@ -246313,7 +246316,7 @@ function useEffect(cb, depArray) {
|
|
246313
246316
|
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
246314
246317
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
246315
246318
|
|
246316
|
-
// ../../node_modules/@inquirer/
|
246319
|
+
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
246317
246320
|
import process2 from "node:process";
|
246318
246321
|
function isUnicodeSupported() {
|
246319
246322
|
if (process2.platform !== "win32") {
|
@@ -246678,11 +246681,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
246678
246681
|
const iconName = status === "loading" ? "idle" : status;
|
246679
246682
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
246680
246683
|
}
|
246684
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
246685
|
+
function useMemo(fn, dependencies) {
|
246686
|
+
return withPointer((pointer) => {
|
246687
|
+
const prev = pointer.get();
|
246688
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
246689
|
+
const value = fn();
|
246690
|
+
pointer.set({ value, dependencies });
|
246691
|
+
return value;
|
246692
|
+
}
|
246693
|
+
return prev.value;
|
246694
|
+
});
|
246695
|
+
}
|
246681
246696
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
246682
246697
|
function useRef(val) {
|
246683
246698
|
return useState({ current: val })[0];
|
246684
246699
|
}
|
246685
|
-
|
246686
246700
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
246687
246701
|
function useKeypress(userHandler) {
|
246688
246702
|
const signal = useRef(userHandler);
|
@@ -246714,6 +246728,72 @@ function readlineWidth() {
|
|
246714
246728
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
246715
246729
|
}
|
246716
246730
|
|
246731
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
246732
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
246733
|
+
const state = useRef({
|
246734
|
+
lastPointer: active,
|
246735
|
+
lastActive: undefined
|
246736
|
+
});
|
246737
|
+
const { lastPointer, lastActive } = state.current;
|
246738
|
+
const middle = Math.floor(pageSize / 2);
|
246739
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246740
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
246741
|
+
let pointer = defaultPointerPosition;
|
246742
|
+
if (renderedLength > pageSize) {
|
246743
|
+
if (loop) {
|
246744
|
+
pointer = lastPointer;
|
246745
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
246746
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
246747
|
+
}
|
246748
|
+
} else {
|
246749
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
246750
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
246751
|
+
}
|
246752
|
+
}
|
246753
|
+
state.current.lastPointer = pointer;
|
246754
|
+
state.current.lastActive = active;
|
246755
|
+
return pointer;
|
246756
|
+
}
|
246757
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
246758
|
+
const width = readlineWidth();
|
246759
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
246760
|
+
const renderedItems = items.map((item, index) => {
|
246761
|
+
if (item == null)
|
246762
|
+
return [];
|
246763
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
246764
|
+
`);
|
246765
|
+
});
|
246766
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246767
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
246768
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
246769
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
246770
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
246771
|
+
const pageBuffer = Array.from({ length: pageSize });
|
246772
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
246773
|
+
const itemVisited = new Set([active]);
|
246774
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
246775
|
+
let itemPointer = bound(active + 1);
|
246776
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
246777
|
+
const lines = renderItemAtIndex(itemPointer);
|
246778
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
246779
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
246780
|
+
itemVisited.add(itemPointer);
|
246781
|
+
bufferPointer += linesToAdd.length;
|
246782
|
+
itemPointer = bound(itemPointer + 1);
|
246783
|
+
}
|
246784
|
+
bufferPointer = activeItemPosition - 1;
|
246785
|
+
itemPointer = bound(active - 1);
|
246786
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
246787
|
+
const lines = renderItemAtIndex(itemPointer);
|
246788
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
246789
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
246790
|
+
itemVisited.add(itemPointer);
|
246791
|
+
bufferPointer -= linesToAdd.length;
|
246792
|
+
itemPointer = bound(itemPointer - 1);
|
246793
|
+
}
|
246794
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
246795
|
+
`);
|
246796
|
+
}
|
246717
246797
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
246718
246798
|
var import_mute_stream = __toESM(require_lib(), 1);
|
246719
246799
|
import * as readline2 from "node:readline";
|
@@ -247096,6 +247176,20 @@ function createPrompt(view) {
|
|
247096
247176
|
};
|
247097
247177
|
return prompt;
|
247098
247178
|
}
|
247179
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
247180
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
247181
|
+
class Separator {
|
247182
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
247183
|
+
type = "separator";
|
247184
|
+
constructor(separator) {
|
247185
|
+
if (separator) {
|
247186
|
+
this.separator = separator;
|
247187
|
+
}
|
247188
|
+
}
|
247189
|
+
static isSeparator(choice) {
|
247190
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
247191
|
+
}
|
247192
|
+
}
|
247099
247193
|
// ../../node_modules/yoctocolors/base.js
|
247100
247194
|
var exports_base = {};
|
247101
247195
|
__export(exports_base, {
|
@@ -264989,7 +265083,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
264989
265083
|
var package_default = {
|
264990
265084
|
name: "@settlemint/sdk-cli",
|
264991
265085
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
264992
|
-
version: "2.5.1-
|
265086
|
+
version: "2.5.1-prffc87b53",
|
264993
265087
|
type: "module",
|
264994
265088
|
private: false,
|
264995
265089
|
license: "FSL-1.1-MIT",
|
@@ -265037,13 +265131,13 @@ var package_default = {
|
|
265037
265131
|
"@commander-js/extra-typings": "14.0.0",
|
265038
265132
|
commander: "14.0.0",
|
265039
265133
|
"@inquirer/confirm": "5.1.14",
|
265040
|
-
"@inquirer/input": "4.2.
|
265134
|
+
"@inquirer/input": "4.2.0",
|
265041
265135
|
"@inquirer/password": "4.0.16",
|
265042
|
-
"@inquirer/select": "4.
|
265043
|
-
"@settlemint/sdk-hasura": "2.5.1-
|
265044
|
-
"@settlemint/sdk-js": "2.5.1-
|
265045
|
-
"@settlemint/sdk-utils": "2.5.1-
|
265046
|
-
"@settlemint/sdk-viem": "2.5.1-
|
265136
|
+
"@inquirer/select": "4.3.0",
|
265137
|
+
"@settlemint/sdk-hasura": "2.5.1-prffc87b53",
|
265138
|
+
"@settlemint/sdk-js": "2.5.1-prffc87b53",
|
265139
|
+
"@settlemint/sdk-utils": "2.5.1-prffc87b53",
|
265140
|
+
"@settlemint/sdk-viem": "2.5.1-prffc87b53",
|
265047
265141
|
"@types/node": "24.0.15",
|
265048
265142
|
"@types/semver": "7.7.0",
|
265049
265143
|
"@types/which": "3.0.4",
|
@@ -303165,103 +303259,10 @@ function sanitizeName(value4, length = 35) {
|
|
303165
303259
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303166
303260
|
}
|
303167
303261
|
|
303168
|
-
// ../../node_modules/@inquirer/input/dist/esm/
|
303169
|
-
var inputTheme = {
|
303170
|
-
validationFailureMode: "keep"
|
303171
|
-
};
|
303172
|
-
var esm_default2 = createPrompt((config4, done) => {
|
303173
|
-
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303174
|
-
const theme = makeTheme(inputTheme, config4.theme);
|
303175
|
-
const [status, setStatus] = useState("idle");
|
303176
|
-
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
303177
|
-
const [errorMsg, setError] = useState();
|
303178
|
-
const [value4, setValue] = useState("");
|
303179
|
-
const prefix = usePrefix({ status, theme });
|
303180
|
-
useKeypress(async (key2, rl) => {
|
303181
|
-
if (status !== "idle") {
|
303182
|
-
return;
|
303183
|
-
}
|
303184
|
-
if (isEnterKey(key2)) {
|
303185
|
-
const answer = value4 || defaultValue;
|
303186
|
-
setStatus("loading");
|
303187
|
-
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
303188
|
-
if (isValid === true) {
|
303189
|
-
setValue(answer);
|
303190
|
-
setStatus("done");
|
303191
|
-
done(answer);
|
303192
|
-
} else {
|
303193
|
-
if (theme.validationFailureMode === "clear") {
|
303194
|
-
setValue("");
|
303195
|
-
} else {
|
303196
|
-
rl.write(value4);
|
303197
|
-
}
|
303198
|
-
setError(isValid || "You must provide a valid value");
|
303199
|
-
setStatus("idle");
|
303200
|
-
}
|
303201
|
-
} else if (isBackspaceKey(key2) && !value4) {
|
303202
|
-
setDefaultValue(undefined);
|
303203
|
-
} else if (key2.name === "tab" && !value4) {
|
303204
|
-
setDefaultValue(undefined);
|
303205
|
-
rl.clearLine(0);
|
303206
|
-
rl.write(defaultValue);
|
303207
|
-
setValue(defaultValue);
|
303208
|
-
} else {
|
303209
|
-
setValue(rl.line);
|
303210
|
-
setError(undefined);
|
303211
|
-
}
|
303212
|
-
});
|
303213
|
-
useEffect((rl) => {
|
303214
|
-
if (prefill === "editable" && defaultValue) {
|
303215
|
-
rl.write(defaultValue);
|
303216
|
-
setValue(defaultValue);
|
303217
|
-
}
|
303218
|
-
}, []);
|
303219
|
-
const message = theme.style.message(config4.message, status);
|
303220
|
-
let formattedValue = value4;
|
303221
|
-
if (typeof config4.transformer === "function") {
|
303222
|
-
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
303223
|
-
} else if (status === "done") {
|
303224
|
-
formattedValue = theme.style.answer(value4);
|
303225
|
-
}
|
303226
|
-
let defaultStr;
|
303227
|
-
if (defaultValue && status !== "done" && !value4) {
|
303228
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
303229
|
-
}
|
303230
|
-
let error44 = "";
|
303231
|
-
if (errorMsg) {
|
303232
|
-
error44 = theme.style.error(errorMsg);
|
303233
|
-
}
|
303234
|
-
return [
|
303235
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
303236
|
-
error44
|
303237
|
-
];
|
303238
|
-
});
|
303239
|
-
|
303240
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
303241
|
-
async function subgraphNamePrompt({
|
303242
|
-
defaultName,
|
303243
|
-
env: env2,
|
303244
|
-
accept
|
303245
|
-
}) {
|
303246
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
303247
|
-
if (accept) {
|
303248
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303249
|
-
}
|
303250
|
-
const subgraphName = await esm_default2({
|
303251
|
-
message: "What is the name of your subgraph?",
|
303252
|
-
default: defaultSubgraphName,
|
303253
|
-
required: true
|
303254
|
-
});
|
303255
|
-
return sanitizeName(subgraphName);
|
303256
|
-
}
|
303257
|
-
|
303258
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303259
|
-
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
303260
|
-
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
303262
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303261
303263
|
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303262
|
-
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
303263
303264
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303264
|
-
// ../../node_modules/@inquirer/
|
303265
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303265
303266
|
class AbortPromptError2 extends Error {
|
303266
303267
|
name = "AbortPromptError";
|
303267
303268
|
message = "Prompt was aborted";
|
@@ -303287,10 +303288,10 @@ class HookError2 extends Error {
|
|
303287
303288
|
class ValidationError2 extends Error {
|
303288
303289
|
name = "ValidationError";
|
303289
303290
|
}
|
303290
|
-
// ../../node_modules/@inquirer/
|
303291
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303291
303292
|
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303292
303293
|
|
303293
|
-
// ../../node_modules/@inquirer/
|
303294
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303294
303295
|
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303295
303296
|
var hookStorage2 = new AsyncLocalStorage2;
|
303296
303297
|
function createStore2(rl) {
|
@@ -303395,7 +303396,7 @@ var effectScheduler2 = {
|
|
303395
303396
|
}
|
303396
303397
|
};
|
303397
303398
|
|
303398
|
-
// ../../node_modules/@inquirer/
|
303399
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303399
303400
|
function useState2(defaultValue) {
|
303400
303401
|
return withPointer2((pointer) => {
|
303401
303402
|
const setState = AsyncResource5.bind(function setState(newValue) {
|
@@ -303413,7 +303414,7 @@ function useState2(defaultValue) {
|
|
303413
303414
|
});
|
303414
303415
|
}
|
303415
303416
|
|
303416
|
-
// ../../node_modules/@inquirer/
|
303417
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303417
303418
|
function useEffect2(cb, depArray) {
|
303418
303419
|
withPointer2((pointer) => {
|
303419
303420
|
const oldDeps = pointer.get();
|
@@ -303425,10 +303426,10 @@ function useEffect2(cb, depArray) {
|
|
303425
303426
|
});
|
303426
303427
|
}
|
303427
303428
|
|
303428
|
-
// ../../node_modules/@inquirer/
|
303429
|
-
var
|
303429
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303430
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303430
303431
|
|
303431
|
-
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
303432
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/node_modules/@inquirer/figures/dist/esm/index.js
|
303432
303433
|
import process8 from "node:process";
|
303433
303434
|
function isUnicodeSupported3() {
|
303434
303435
|
if (process8.platform !== "win32") {
|
@@ -303711,31 +303712,31 @@ var fallbackSymbols2 = {
|
|
303711
303712
|
};
|
303712
303713
|
var shouldUseMain2 = isUnicodeSupported3();
|
303713
303714
|
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
303714
|
-
var
|
303715
|
+
var esm_default2 = figures2;
|
303715
303716
|
var replacements2 = Object.entries(specialMainSymbols2);
|
303716
303717
|
|
303717
|
-
// ../../node_modules/@inquirer/
|
303718
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303718
303719
|
var defaultTheme2 = {
|
303719
303720
|
prefix: {
|
303720
|
-
idle:
|
303721
|
-
done:
|
303721
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
303722
|
+
done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
|
303722
303723
|
},
|
303723
303724
|
spinner: {
|
303724
303725
|
interval: 80,
|
303725
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
303726
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
303726
303727
|
},
|
303727
303728
|
style: {
|
303728
|
-
answer:
|
303729
|
-
message:
|
303730
|
-
error: (text2) =>
|
303731
|
-
defaultAnswer: (text2) =>
|
303732
|
-
help:
|
303733
|
-
highlight:
|
303734
|
-
key: (text2) =>
|
303729
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
303730
|
+
message: import_yoctocolors_cjs3.default.bold,
|
303731
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
303732
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
303733
|
+
help: import_yoctocolors_cjs3.default.dim,
|
303734
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
303735
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
303735
303736
|
}
|
303736
303737
|
};
|
303737
303738
|
|
303738
|
-
// ../../node_modules/@inquirer/
|
303739
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303739
303740
|
function isPlainObject6(value4) {
|
303740
303741
|
if (typeof value4 !== "object" || value4 === null)
|
303741
303742
|
return false;
|
@@ -303763,7 +303764,7 @@ function makeTheme2(...themes) {
|
|
303763
303764
|
return deepMerge3(...themesToMerge);
|
303764
303765
|
}
|
303765
303766
|
|
303766
|
-
// ../../node_modules/@inquirer/
|
303767
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303767
303768
|
function usePrefix2({ status = "idle", theme }) {
|
303768
303769
|
const [showLoader, setShowLoader] = useState2(false);
|
303769
303770
|
const [tick, setTick] = useState2(0);
|
@@ -303793,23 +303794,12 @@ function usePrefix2({ status = "idle", theme }) {
|
|
303793
303794
|
const iconName = status === "loading" ? "idle" : status;
|
303794
303795
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303795
303796
|
}
|
303796
|
-
// ../../node_modules/@inquirer/
|
303797
|
-
function useMemo(fn, dependencies) {
|
303798
|
-
return withPointer2((pointer) => {
|
303799
|
-
const prev = pointer.get();
|
303800
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
303801
|
-
const value4 = fn();
|
303802
|
-
pointer.set({ value: value4, dependencies });
|
303803
|
-
return value4;
|
303804
|
-
}
|
303805
|
-
return prev.value;
|
303806
|
-
});
|
303807
|
-
}
|
303808
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303797
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303809
303798
|
function useRef2(val) {
|
303810
303799
|
return useState2({ current: val })[0];
|
303811
303800
|
}
|
303812
|
-
|
303801
|
+
|
303802
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303813
303803
|
function useKeypress2(userHandler) {
|
303814
303804
|
const signal = useRef2(userHandler);
|
303815
303805
|
signal.current = userHandler;
|
@@ -303827,7 +303817,7 @@ function useKeypress2(userHandler) {
|
|
303827
303817
|
};
|
303828
303818
|
}, []);
|
303829
303819
|
}
|
303830
|
-
// ../../node_modules/@inquirer/
|
303820
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303831
303821
|
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303832
303822
|
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303833
303823
|
function breakLines2(content, width) {
|
@@ -303840,78 +303830,12 @@ function readlineWidth2() {
|
|
303840
303830
|
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303841
303831
|
}
|
303842
303832
|
|
303843
|
-
// ../../node_modules/@inquirer/
|
303844
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
303845
|
-
const state = useRef2({
|
303846
|
-
lastPointer: active,
|
303847
|
-
lastActive: undefined
|
303848
|
-
});
|
303849
|
-
const { lastPointer, lastActive } = state.current;
|
303850
|
-
const middle = Math.floor(pageSize / 2);
|
303851
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303852
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
303853
|
-
let pointer = defaultPointerPosition;
|
303854
|
-
if (renderedLength > pageSize) {
|
303855
|
-
if (loop) {
|
303856
|
-
pointer = lastPointer;
|
303857
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
303858
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
303859
|
-
}
|
303860
|
-
} else {
|
303861
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
303862
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
303863
|
-
}
|
303864
|
-
}
|
303865
|
-
state.current.lastPointer = pointer;
|
303866
|
-
state.current.lastActive = active;
|
303867
|
-
return pointer;
|
303868
|
-
}
|
303869
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
303870
|
-
const width = readlineWidth2();
|
303871
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
303872
|
-
const renderedItems = items.map((item, index) => {
|
303873
|
-
if (item == null)
|
303874
|
-
return [];
|
303875
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
303876
|
-
`);
|
303877
|
-
});
|
303878
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303879
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
303880
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
303881
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
303882
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
303883
|
-
const pageBuffer = Array.from({ length: pageSize });
|
303884
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
303885
|
-
const itemVisited = new Set([active]);
|
303886
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
303887
|
-
let itemPointer = bound(active + 1);
|
303888
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
303889
|
-
const lines = renderItemAtIndex(itemPointer);
|
303890
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
303891
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
303892
|
-
itemVisited.add(itemPointer);
|
303893
|
-
bufferPointer += linesToAdd.length;
|
303894
|
-
itemPointer = bound(itemPointer + 1);
|
303895
|
-
}
|
303896
|
-
bufferPointer = activeItemPosition - 1;
|
303897
|
-
itemPointer = bound(active - 1);
|
303898
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
303899
|
-
const lines = renderItemAtIndex(itemPointer);
|
303900
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
303901
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
303902
|
-
itemVisited.add(itemPointer);
|
303903
|
-
bufferPointer -= linesToAdd.length;
|
303904
|
-
itemPointer = bound(itemPointer - 1);
|
303905
|
-
}
|
303906
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
303907
|
-
`);
|
303908
|
-
}
|
303909
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303833
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303910
303834
|
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303911
303835
|
import * as readline4 from "node:readline";
|
303912
303836
|
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303913
303837
|
|
303914
|
-
// ../../node_modules/@inquirer/
|
303838
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303915
303839
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303916
303840
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303917
303841
|
var height2 = (content) => content.split(`
|
@@ -303981,7 +303905,7 @@ class ScreenManager2 {
|
|
303981
303905
|
}
|
303982
303906
|
}
|
303983
303907
|
|
303984
|
-
// ../../node_modules/@inquirer/
|
303908
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303985
303909
|
class PromisePolyfill2 extends Promise {
|
303986
303910
|
static withResolver() {
|
303987
303911
|
let resolve5;
|
@@ -303994,7 +303918,7 @@ class PromisePolyfill2 extends Promise {
|
|
303994
303918
|
}
|
303995
303919
|
}
|
303996
303920
|
|
303997
|
-
// ../../node_modules/@inquirer/
|
303921
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303998
303922
|
function getCallSites2() {
|
303999
303923
|
const _prepareStackTrace = Error.prepareStackTrace;
|
304000
303924
|
let result = [];
|
@@ -304080,25 +304004,101 @@ function createPrompt2(view) {
|
|
304080
304004
|
};
|
304081
304005
|
return prompt;
|
304082
304006
|
}
|
304083
|
-
// ../../node_modules/@inquirer/
|
304084
|
-
var
|
304085
|
-
|
304086
|
-
|
304087
|
-
|
304088
|
-
|
304089
|
-
|
304090
|
-
|
304007
|
+
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
304008
|
+
var inputTheme = {
|
304009
|
+
validationFailureMode: "keep"
|
304010
|
+
};
|
304011
|
+
var esm_default3 = createPrompt2((config4, done) => {
|
304012
|
+
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
304013
|
+
const theme = makeTheme2(inputTheme, config4.theme);
|
304014
|
+
const [status, setStatus] = useState2("idle");
|
304015
|
+
const [defaultValue = "", setDefaultValue] = useState2(config4.default);
|
304016
|
+
const [errorMsg, setError] = useState2();
|
304017
|
+
const [value4, setValue] = useState2("");
|
304018
|
+
const prefix = usePrefix2({ status, theme });
|
304019
|
+
useKeypress2(async (key3, rl) => {
|
304020
|
+
if (status !== "idle") {
|
304021
|
+
return;
|
304022
|
+
}
|
304023
|
+
if (isEnterKey2(key3)) {
|
304024
|
+
const answer = value4 || defaultValue;
|
304025
|
+
setStatus("loading");
|
304026
|
+
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
304027
|
+
if (isValid === true) {
|
304028
|
+
setValue(answer);
|
304029
|
+
setStatus("done");
|
304030
|
+
done(answer);
|
304031
|
+
} else {
|
304032
|
+
if (theme.validationFailureMode === "clear") {
|
304033
|
+
setValue("");
|
304034
|
+
} else {
|
304035
|
+
rl.write(value4);
|
304036
|
+
}
|
304037
|
+
setError(isValid || "You must provide a valid value");
|
304038
|
+
setStatus("idle");
|
304039
|
+
}
|
304040
|
+
} else if (isBackspaceKey2(key3) && !value4) {
|
304041
|
+
setDefaultValue(undefined);
|
304042
|
+
} else if (key3.name === "tab" && !value4) {
|
304043
|
+
setDefaultValue(undefined);
|
304044
|
+
rl.clearLine(0);
|
304045
|
+
rl.write(defaultValue);
|
304046
|
+
setValue(defaultValue);
|
304047
|
+
} else {
|
304048
|
+
setValue(rl.line);
|
304049
|
+
setError(undefined);
|
304091
304050
|
}
|
304051
|
+
});
|
304052
|
+
useEffect2((rl) => {
|
304053
|
+
if (prefill === "editable" && defaultValue) {
|
304054
|
+
rl.write(defaultValue);
|
304055
|
+
setValue(defaultValue);
|
304056
|
+
}
|
304057
|
+
}, []);
|
304058
|
+
const message = theme.style.message(config4.message, status);
|
304059
|
+
let formattedValue = value4;
|
304060
|
+
if (typeof config4.transformer === "function") {
|
304061
|
+
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
304062
|
+
} else if (status === "done") {
|
304063
|
+
formattedValue = theme.style.answer(value4);
|
304092
304064
|
}
|
304093
|
-
|
304094
|
-
|
304065
|
+
let defaultStr;
|
304066
|
+
if (defaultValue && status !== "done" && !value4) {
|
304067
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
304095
304068
|
}
|
304069
|
+
let error44 = "";
|
304070
|
+
if (errorMsg) {
|
304071
|
+
error44 = theme.style.error(errorMsg);
|
304072
|
+
}
|
304073
|
+
return [
|
304074
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
304075
|
+
error44
|
304076
|
+
];
|
304077
|
+
});
|
304078
|
+
|
304079
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
304080
|
+
async function subgraphNamePrompt({
|
304081
|
+
defaultName,
|
304082
|
+
env: env2,
|
304083
|
+
accept
|
304084
|
+
}) {
|
304085
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
304086
|
+
if (accept) {
|
304087
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
304088
|
+
}
|
304089
|
+
const subgraphName = await esm_default3({
|
304090
|
+
message: "What is the name of your subgraph?",
|
304091
|
+
default: defaultSubgraphName,
|
304092
|
+
required: true
|
304093
|
+
});
|
304094
|
+
return sanitizeName(subgraphName);
|
304096
304095
|
}
|
304096
|
+
|
304097
304097
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
304098
304098
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
304099
304099
|
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
304100
304100
|
var selectTheme = {
|
304101
|
-
icon: { cursor:
|
304101
|
+
icon: { cursor: esm_default.pointer },
|
304102
304102
|
style: {
|
304103
304103
|
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
304104
304104
|
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
@@ -304134,19 +304134,19 @@ function normalizeChoices(choices) {
|
|
304134
304134
|
return normalizedChoice;
|
304135
304135
|
});
|
304136
304136
|
}
|
304137
|
-
var esm_default4 =
|
304137
|
+
var esm_default4 = createPrompt((config4, done) => {
|
304138
304138
|
const { loop = true, pageSize = 7 } = config4;
|
304139
|
-
const firstRender =
|
304140
|
-
const theme =
|
304141
|
-
const [status, setStatus] =
|
304142
|
-
const prefix =
|
304143
|
-
const searchTimeoutRef =
|
304139
|
+
const firstRender = useRef(true);
|
304140
|
+
const theme = makeTheme(selectTheme, config4.theme);
|
304141
|
+
const [status, setStatus] = useState("idle");
|
304142
|
+
const prefix = usePrefix({ status, theme });
|
304143
|
+
const searchTimeoutRef = useRef();
|
304144
304144
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
304145
304145
|
const bounds = useMemo(() => {
|
304146
304146
|
const first = items.findIndex(isSelectable);
|
304147
304147
|
const last = items.findLastIndex(isSelectable);
|
304148
304148
|
if (first === -1) {
|
304149
|
-
throw new
|
304149
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
304150
304150
|
}
|
304151
304151
|
return { first, last };
|
304152
304152
|
}, [items]);
|
@@ -304155,11 +304155,11 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304155
304155
|
return -1;
|
304156
304156
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
304157
304157
|
}, [config4.default, items]);
|
304158
|
-
const [active, setActive] =
|
304158
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
304159
304159
|
const selectedChoice = items[active];
|
304160
|
-
|
304160
|
+
useKeypress((key3, rl) => {
|
304161
304161
|
clearTimeout(searchTimeoutRef.current);
|
304162
|
-
if (
|
304162
|
+
if (isEnterKey(key3)) {
|
304163
304163
|
setStatus("done");
|
304164
304164
|
done(selectedChoice.value);
|
304165
304165
|
} else if (isUpKey(key3) || isDownKey(key3)) {
|
@@ -304173,7 +304173,14 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304173
304173
|
setActive(next);
|
304174
304174
|
}
|
304175
304175
|
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
304176
|
-
const
|
304176
|
+
const selectedIndex = Number(rl.line) - 1;
|
304177
|
+
let selectableIndex = -1;
|
304178
|
+
const position = items.findIndex((item2) => {
|
304179
|
+
if (Separator.isSeparator(item2))
|
304180
|
+
return false;
|
304181
|
+
selectableIndex++;
|
304182
|
+
return selectableIndex === selectedIndex;
|
304183
|
+
});
|
304177
304184
|
const item = items[position];
|
304178
304185
|
if (item != null && isSelectable(item)) {
|
304179
304186
|
setActive(position);
|
@@ -304181,7 +304188,7 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304181
304188
|
searchTimeoutRef.current = setTimeout(() => {
|
304182
304189
|
rl.clearLine(0);
|
304183
304190
|
}, 700);
|
304184
|
-
} else if (
|
304191
|
+
} else if (isBackspaceKey(key3)) {
|
304185
304192
|
rl.clearLine(0);
|
304186
304193
|
} else {
|
304187
304194
|
const searchTerm = rl.line.toLowerCase();
|
@@ -304198,7 +304205,7 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304198
304205
|
}, 700);
|
304199
304206
|
}
|
304200
304207
|
});
|
304201
|
-
|
304208
|
+
useEffect(() => () => {
|
304202
304209
|
clearTimeout(searchTimeoutRef.current);
|
304203
304210
|
}, []);
|
304204
304211
|
const message = theme.style.message(config4.message, status);
|
@@ -321777,10 +321784,298 @@ function useEffect3(cb, depArray) {
|
|
321777
321784
|
|
321778
321785
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
321779
321786
|
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
321787
|
+
|
321788
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/node_modules/@inquirer/figures/dist/esm/index.js
|
321789
|
+
import process9 from "node:process";
|
321790
|
+
function isUnicodeSupported4() {
|
321791
|
+
if (process9.platform !== "win32") {
|
321792
|
+
return process9.env["TERM"] !== "linux";
|
321793
|
+
}
|
321794
|
+
return Boolean(process9.env["WT_SESSION"]) || Boolean(process9.env["TERMINUS_SUBLIME"]) || process9.env["ConEmuTask"] === "{cmd::Cmder}" || process9.env["TERM_PROGRAM"] === "Terminus-Sublime" || process9.env["TERM_PROGRAM"] === "vscode" || process9.env["TERM"] === "xterm-256color" || process9.env["TERM"] === "alacritty" || process9.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
321795
|
+
}
|
321796
|
+
var common3 = {
|
321797
|
+
circleQuestionMark: "(?)",
|
321798
|
+
questionMarkPrefix: "(?)",
|
321799
|
+
square: "█",
|
321800
|
+
squareDarkShade: "▓",
|
321801
|
+
squareMediumShade: "▒",
|
321802
|
+
squareLightShade: "░",
|
321803
|
+
squareTop: "▀",
|
321804
|
+
squareBottom: "▄",
|
321805
|
+
squareLeft: "▌",
|
321806
|
+
squareRight: "▐",
|
321807
|
+
squareCenter: "■",
|
321808
|
+
bullet: "●",
|
321809
|
+
dot: "․",
|
321810
|
+
ellipsis: "…",
|
321811
|
+
pointerSmall: "›",
|
321812
|
+
triangleUp: "▲",
|
321813
|
+
triangleUpSmall: "▴",
|
321814
|
+
triangleDown: "▼",
|
321815
|
+
triangleDownSmall: "▾",
|
321816
|
+
triangleLeftSmall: "◂",
|
321817
|
+
triangleRightSmall: "▸",
|
321818
|
+
home: "⌂",
|
321819
|
+
heart: "♥",
|
321820
|
+
musicNote: "♪",
|
321821
|
+
musicNoteBeamed: "♫",
|
321822
|
+
arrowUp: "↑",
|
321823
|
+
arrowDown: "↓",
|
321824
|
+
arrowLeft: "←",
|
321825
|
+
arrowRight: "→",
|
321826
|
+
arrowLeftRight: "↔",
|
321827
|
+
arrowUpDown: "↕",
|
321828
|
+
almostEqual: "≈",
|
321829
|
+
notEqual: "≠",
|
321830
|
+
lessOrEqual: "≤",
|
321831
|
+
greaterOrEqual: "≥",
|
321832
|
+
identical: "≡",
|
321833
|
+
infinity: "∞",
|
321834
|
+
subscriptZero: "₀",
|
321835
|
+
subscriptOne: "₁",
|
321836
|
+
subscriptTwo: "₂",
|
321837
|
+
subscriptThree: "₃",
|
321838
|
+
subscriptFour: "₄",
|
321839
|
+
subscriptFive: "₅",
|
321840
|
+
subscriptSix: "₆",
|
321841
|
+
subscriptSeven: "₇",
|
321842
|
+
subscriptEight: "₈",
|
321843
|
+
subscriptNine: "₉",
|
321844
|
+
oneHalf: "½",
|
321845
|
+
oneThird: "⅓",
|
321846
|
+
oneQuarter: "¼",
|
321847
|
+
oneFifth: "⅕",
|
321848
|
+
oneSixth: "⅙",
|
321849
|
+
oneEighth: "⅛",
|
321850
|
+
twoThirds: "⅔",
|
321851
|
+
twoFifths: "⅖",
|
321852
|
+
threeQuarters: "¾",
|
321853
|
+
threeFifths: "⅗",
|
321854
|
+
threeEighths: "⅜",
|
321855
|
+
fourFifths: "⅘",
|
321856
|
+
fiveSixths: "⅚",
|
321857
|
+
fiveEighths: "⅝",
|
321858
|
+
sevenEighths: "⅞",
|
321859
|
+
line: "─",
|
321860
|
+
lineBold: "━",
|
321861
|
+
lineDouble: "═",
|
321862
|
+
lineDashed0: "┄",
|
321863
|
+
lineDashed1: "┅",
|
321864
|
+
lineDashed2: "┈",
|
321865
|
+
lineDashed3: "┉",
|
321866
|
+
lineDashed4: "╌",
|
321867
|
+
lineDashed5: "╍",
|
321868
|
+
lineDashed6: "╴",
|
321869
|
+
lineDashed7: "╶",
|
321870
|
+
lineDashed8: "╸",
|
321871
|
+
lineDashed9: "╺",
|
321872
|
+
lineDashed10: "╼",
|
321873
|
+
lineDashed11: "╾",
|
321874
|
+
lineDashed12: "−",
|
321875
|
+
lineDashed13: "–",
|
321876
|
+
lineDashed14: "‐",
|
321877
|
+
lineDashed15: "⁃",
|
321878
|
+
lineVertical: "│",
|
321879
|
+
lineVerticalBold: "┃",
|
321880
|
+
lineVerticalDouble: "║",
|
321881
|
+
lineVerticalDashed0: "┆",
|
321882
|
+
lineVerticalDashed1: "┇",
|
321883
|
+
lineVerticalDashed2: "┊",
|
321884
|
+
lineVerticalDashed3: "┋",
|
321885
|
+
lineVerticalDashed4: "╎",
|
321886
|
+
lineVerticalDashed5: "╏",
|
321887
|
+
lineVerticalDashed6: "╵",
|
321888
|
+
lineVerticalDashed7: "╷",
|
321889
|
+
lineVerticalDashed8: "╹",
|
321890
|
+
lineVerticalDashed9: "╻",
|
321891
|
+
lineVerticalDashed10: "╽",
|
321892
|
+
lineVerticalDashed11: "╿",
|
321893
|
+
lineDownLeft: "┐",
|
321894
|
+
lineDownLeftArc: "╮",
|
321895
|
+
lineDownBoldLeftBold: "┓",
|
321896
|
+
lineDownBoldLeft: "┒",
|
321897
|
+
lineDownLeftBold: "┑",
|
321898
|
+
lineDownDoubleLeftDouble: "╗",
|
321899
|
+
lineDownDoubleLeft: "╖",
|
321900
|
+
lineDownLeftDouble: "╕",
|
321901
|
+
lineDownRight: "┌",
|
321902
|
+
lineDownRightArc: "╭",
|
321903
|
+
lineDownBoldRightBold: "┏",
|
321904
|
+
lineDownBoldRight: "┎",
|
321905
|
+
lineDownRightBold: "┍",
|
321906
|
+
lineDownDoubleRightDouble: "╔",
|
321907
|
+
lineDownDoubleRight: "╓",
|
321908
|
+
lineDownRightDouble: "╒",
|
321909
|
+
lineUpLeft: "┘",
|
321910
|
+
lineUpLeftArc: "╯",
|
321911
|
+
lineUpBoldLeftBold: "┛",
|
321912
|
+
lineUpBoldLeft: "┚",
|
321913
|
+
lineUpLeftBold: "┙",
|
321914
|
+
lineUpDoubleLeftDouble: "╝",
|
321915
|
+
lineUpDoubleLeft: "╜",
|
321916
|
+
lineUpLeftDouble: "╛",
|
321917
|
+
lineUpRight: "└",
|
321918
|
+
lineUpRightArc: "╰",
|
321919
|
+
lineUpBoldRightBold: "┗",
|
321920
|
+
lineUpBoldRight: "┖",
|
321921
|
+
lineUpRightBold: "┕",
|
321922
|
+
lineUpDoubleRightDouble: "╚",
|
321923
|
+
lineUpDoubleRight: "╙",
|
321924
|
+
lineUpRightDouble: "╘",
|
321925
|
+
lineUpDownLeft: "┤",
|
321926
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
321927
|
+
lineUpBoldDownBoldLeft: "┨",
|
321928
|
+
lineUpDownLeftBold: "┥",
|
321929
|
+
lineUpBoldDownLeftBold: "┩",
|
321930
|
+
lineUpDownBoldLeftBold: "┪",
|
321931
|
+
lineUpDownBoldLeft: "┧",
|
321932
|
+
lineUpBoldDownLeft: "┦",
|
321933
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
321934
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
321935
|
+
lineUpDownLeftDouble: "╡",
|
321936
|
+
lineUpDownRight: "├",
|
321937
|
+
lineUpBoldDownBoldRightBold: "┣",
|
321938
|
+
lineUpBoldDownBoldRight: "┠",
|
321939
|
+
lineUpDownRightBold: "┝",
|
321940
|
+
lineUpBoldDownRightBold: "┡",
|
321941
|
+
lineUpDownBoldRightBold: "┢",
|
321942
|
+
lineUpDownBoldRight: "┟",
|
321943
|
+
lineUpBoldDownRight: "┞",
|
321944
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
321945
|
+
lineUpDoubleDownDoubleRight: "╟",
|
321946
|
+
lineUpDownRightDouble: "╞",
|
321947
|
+
lineDownLeftRight: "┬",
|
321948
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
321949
|
+
lineDownLeftBoldRightBold: "┯",
|
321950
|
+
lineDownBoldLeftRight: "┰",
|
321951
|
+
lineDownBoldLeftBoldRight: "┱",
|
321952
|
+
lineDownBoldLeftRightBold: "┲",
|
321953
|
+
lineDownLeftRightBold: "┮",
|
321954
|
+
lineDownLeftBoldRight: "┭",
|
321955
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
321956
|
+
lineDownDoubleLeftRight: "╥",
|
321957
|
+
lineDownLeftDoubleRightDouble: "╤",
|
321958
|
+
lineUpLeftRight: "┴",
|
321959
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
321960
|
+
lineUpLeftBoldRightBold: "┷",
|
321961
|
+
lineUpBoldLeftRight: "┸",
|
321962
|
+
lineUpBoldLeftBoldRight: "┹",
|
321963
|
+
lineUpBoldLeftRightBold: "┺",
|
321964
|
+
lineUpLeftRightBold: "┶",
|
321965
|
+
lineUpLeftBoldRight: "┵",
|
321966
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
321967
|
+
lineUpDoubleLeftRight: "╨",
|
321968
|
+
lineUpLeftDoubleRightDouble: "╧",
|
321969
|
+
lineUpDownLeftRight: "┼",
|
321970
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
321971
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
321972
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
321973
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
321974
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
321975
|
+
lineUpBoldDownLeftRight: "╀",
|
321976
|
+
lineUpDownBoldLeftRight: "╁",
|
321977
|
+
lineUpDownLeftBoldRight: "┽",
|
321978
|
+
lineUpDownLeftRightBold: "┾",
|
321979
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
321980
|
+
lineUpDownLeftBoldRightBold: "┿",
|
321981
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
321982
|
+
lineUpBoldDownLeftRightBold: "╄",
|
321983
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
321984
|
+
lineUpDownBoldLeftRightBold: "╆",
|
321985
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
321986
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
321987
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
321988
|
+
lineCross: "╳",
|
321989
|
+
lineBackslash: "╲",
|
321990
|
+
lineSlash: "╱"
|
321991
|
+
};
|
321992
|
+
var specialMainSymbols3 = {
|
321993
|
+
tick: "✔",
|
321994
|
+
info: "ℹ",
|
321995
|
+
warning: "⚠",
|
321996
|
+
cross: "✘",
|
321997
|
+
squareSmall: "◻",
|
321998
|
+
squareSmallFilled: "◼",
|
321999
|
+
circle: "◯",
|
322000
|
+
circleFilled: "◉",
|
322001
|
+
circleDotted: "◌",
|
322002
|
+
circleDouble: "◎",
|
322003
|
+
circleCircle: "ⓞ",
|
322004
|
+
circleCross: "ⓧ",
|
322005
|
+
circlePipe: "Ⓘ",
|
322006
|
+
radioOn: "◉",
|
322007
|
+
radioOff: "◯",
|
322008
|
+
checkboxOn: "☒",
|
322009
|
+
checkboxOff: "☐",
|
322010
|
+
checkboxCircleOn: "ⓧ",
|
322011
|
+
checkboxCircleOff: "Ⓘ",
|
322012
|
+
pointer: "❯",
|
322013
|
+
triangleUpOutline: "△",
|
322014
|
+
triangleLeft: "◀",
|
322015
|
+
triangleRight: "▶",
|
322016
|
+
lozenge: "◆",
|
322017
|
+
lozengeOutline: "◇",
|
322018
|
+
hamburger: "☰",
|
322019
|
+
smiley: "㋡",
|
322020
|
+
mustache: "෴",
|
322021
|
+
star: "★",
|
322022
|
+
play: "▶",
|
322023
|
+
nodejs: "⬢",
|
322024
|
+
oneSeventh: "⅐",
|
322025
|
+
oneNinth: "⅑",
|
322026
|
+
oneTenth: "⅒"
|
322027
|
+
};
|
322028
|
+
var specialFallbackSymbols3 = {
|
322029
|
+
tick: "√",
|
322030
|
+
info: "i",
|
322031
|
+
warning: "‼",
|
322032
|
+
cross: "×",
|
322033
|
+
squareSmall: "□",
|
322034
|
+
squareSmallFilled: "■",
|
322035
|
+
circle: "( )",
|
322036
|
+
circleFilled: "(*)",
|
322037
|
+
circleDotted: "( )",
|
322038
|
+
circleDouble: "( )",
|
322039
|
+
circleCircle: "(○)",
|
322040
|
+
circleCross: "(×)",
|
322041
|
+
circlePipe: "(│)",
|
322042
|
+
radioOn: "(*)",
|
322043
|
+
radioOff: "( )",
|
322044
|
+
checkboxOn: "[×]",
|
322045
|
+
checkboxOff: "[ ]",
|
322046
|
+
checkboxCircleOn: "(×)",
|
322047
|
+
checkboxCircleOff: "( )",
|
322048
|
+
pointer: ">",
|
322049
|
+
triangleUpOutline: "∆",
|
322050
|
+
triangleLeft: "◄",
|
322051
|
+
triangleRight: "►",
|
322052
|
+
lozenge: "♦",
|
322053
|
+
lozengeOutline: "◊",
|
322054
|
+
hamburger: "≡",
|
322055
|
+
smiley: "☺",
|
322056
|
+
mustache: "┌─┐",
|
322057
|
+
star: "✶",
|
322058
|
+
play: "►",
|
322059
|
+
nodejs: "♦",
|
322060
|
+
oneSeventh: "1/7",
|
322061
|
+
oneNinth: "1/9",
|
322062
|
+
oneTenth: "1/10"
|
322063
|
+
};
|
322064
|
+
var mainSymbols3 = { ...common3, ...specialMainSymbols3 };
|
322065
|
+
var fallbackSymbols3 = {
|
322066
|
+
...common3,
|
322067
|
+
...specialFallbackSymbols3
|
322068
|
+
};
|
322069
|
+
var shouldUseMain3 = isUnicodeSupported4();
|
322070
|
+
var figures3 = shouldUseMain3 ? mainSymbols3 : fallbackSymbols3;
|
322071
|
+
var esm_default6 = figures3;
|
322072
|
+
var replacements3 = Object.entries(specialMainSymbols3);
|
322073
|
+
|
322074
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
321780
322075
|
var defaultTheme3 = {
|
321781
322076
|
prefix: {
|
321782
322077
|
idle: import_yoctocolors_cjs5.default.blue("?"),
|
321783
|
-
done: import_yoctocolors_cjs5.default.green(
|
322078
|
+
done: import_yoctocolors_cjs5.default.green(esm_default6.tick)
|
321784
322079
|
},
|
321785
322080
|
spinner: {
|
321786
322081
|
interval: 80,
|
@@ -322067,7 +322362,7 @@ function createPrompt3(view) {
|
|
322067
322362
|
}
|
322068
322363
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
322069
322364
|
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
322070
|
-
var
|
322365
|
+
var esm_default7 = createPrompt3((config5, done) => {
|
322071
322366
|
const { validate: validate5 = () => true } = config5;
|
322072
322367
|
const theme = makeTheme3(config5.theme);
|
322073
322368
|
const [status, setStatus] = useState3("idle");
|
@@ -322138,7 +322433,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
322138
322433
|
default: false
|
322139
322434
|
});
|
322140
322435
|
if (create2) {
|
322141
|
-
const name3 = await
|
322436
|
+
const name3 = await esm_default3({
|
322142
322437
|
message: "How would you like to name this application access token?",
|
322143
322438
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
322144
322439
|
required: true,
|
@@ -322201,7 +322496,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
322201
322496
|
return aat;
|
322202
322497
|
} catch (_error) {}
|
322203
322498
|
}
|
322204
|
-
return
|
322499
|
+
return esm_default7({
|
322205
322500
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
322206
322501
|
validate(value4) {
|
322207
322502
|
try {
|
@@ -322604,7 +322899,7 @@ async function instancePrompt({
|
|
322604
322899
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
322605
322900
|
}
|
322606
322901
|
if (freeTextInput) {
|
322607
|
-
const instance = await
|
322902
|
+
const instance = await esm_default3({
|
322608
322903
|
message: "What is the URL of your SettleMint instance?",
|
322609
322904
|
default: defaultPromptInstance,
|
322610
322905
|
required: true,
|
@@ -322667,7 +322962,7 @@ async function serviceSecretPrompt({
|
|
322667
322962
|
return defaultSecret;
|
322668
322963
|
}
|
322669
322964
|
}
|
322670
|
-
const serviceSecret = await
|
322965
|
+
const serviceSecret = await esm_default7({
|
322671
322966
|
message
|
322672
322967
|
});
|
322673
322968
|
return serviceSecret || undefined;
|
@@ -322688,7 +322983,7 @@ async function serviceUrlPrompt({
|
|
322688
322983
|
if (isCi) {
|
322689
322984
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
322690
322985
|
}
|
322691
|
-
const serviceUrl = await
|
322986
|
+
const serviceUrl = await esm_default3({
|
322692
322987
|
message: example ? `${message} (eg ${example})` : message,
|
322693
322988
|
default: defaultUrl,
|
322694
322989
|
required: true,
|
@@ -323123,7 +323418,7 @@ async function serviceValuePrompt({
|
|
323123
323418
|
if (isCi) {
|
323124
323419
|
return defaultValue;
|
323125
323420
|
}
|
323126
|
-
const serviceSecret = await
|
323421
|
+
const serviceSecret = await esm_default3({
|
323127
323422
|
message: example ? `${message} (eg ${example})` : message,
|
323128
323423
|
default: defaultValue
|
323129
323424
|
});
|
@@ -323579,7 +323874,7 @@ async function projectNamePrompt(env2, argument) {
|
|
323579
323874
|
if (defaultInstance) {
|
323580
323875
|
return defaultInstance;
|
323581
323876
|
}
|
323582
|
-
return
|
323877
|
+
return esm_default3({
|
323583
323878
|
message: "What is the name of your new SettleMint project?",
|
323584
323879
|
default: defaultInstance,
|
323585
323880
|
required: true,
|
@@ -327608,7 +327903,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
327608
327903
|
return defaultPersonalAccessToken;
|
327609
327904
|
}
|
327610
327905
|
}
|
327611
|
-
return
|
327906
|
+
return esm_default7({
|
327612
327907
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
327613
327908
|
validate(value4) {
|
327614
327909
|
try {
|
@@ -327819,7 +328114,7 @@ function pincodeVerificationResponseCommand() {
|
|
327819
328114
|
nodeId: selectedBlockchainNode.id
|
327820
328115
|
});
|
327821
328116
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
327822
|
-
const pincode = await
|
328117
|
+
const pincode = await esm_default7({
|
327823
328118
|
message: "Enter your pincode",
|
327824
328119
|
validate(value4) {
|
327825
328120
|
if (!value4.trim()) {
|
@@ -329434,7 +329729,7 @@ function createCommand3() {
|
|
329434
329729
|
|
329435
329730
|
// src/prompts/delete-confirmation.prompt.ts
|
329436
329731
|
async function deleteConfirmationPrompt(itemDescription) {
|
329437
|
-
const confirmation = await
|
329732
|
+
const confirmation = await esm_default3({
|
329438
329733
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
329439
329734
|
required: true,
|
329440
329735
|
validate(value4) {
|
@@ -331179,7 +331474,7 @@ async function addressPrompt({
|
|
331179
331474
|
hardhatConfig
|
331180
331475
|
}) {
|
331181
331476
|
if (!node) {
|
331182
|
-
return
|
331477
|
+
return esm_default3({
|
331183
331478
|
message: "Which private key address do you want to deploy from?",
|
331184
331479
|
validate: (value4) => {
|
331185
331480
|
if (!isAddress(value4)) {
|
@@ -332152,4 +332447,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
332152
332447
|
// src/cli.ts
|
332153
332448
|
sdkCliCommand();
|
332154
332449
|
|
332155
|
-
//# debugId=
|
332450
|
+
//# debugId=57E8B4B05557CAA364756E2164756E21
|