@settlemint/sdk-cli 2.6.4-pre999eb2b → 2.6.4-preac21cc8
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 +293 -292
- package/dist/cli.js.map +8 -8
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -3546,7 +3546,7 @@ var require_wrap_ansi = __commonJS((exports, module) => {
|
|
|
3546
3546
|
};
|
|
3547
3547
|
});
|
|
3548
3548
|
|
|
3549
|
-
// ../../node_modules/.bun/mute-stream@
|
|
3549
|
+
// ../../node_modules/.bun/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
3550
3550
|
var require_lib = __commonJS((exports, module) => {
|
|
3551
3551
|
var Stream = __require("stream");
|
|
3552
3552
|
|
|
@@ -161182,7 +161182,7 @@ ${lanes.join(`
|
|
|
161182
161182
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
161183
161183
|
var _a;
|
|
161184
161184
|
const text = [];
|
|
161185
|
-
const
|
|
161185
|
+
const colors3 = createColors(sys2);
|
|
161186
161186
|
const name2 = getDisplayNameTextOfOption(option);
|
|
161187
161187
|
const valueCandidates = getValueCandidate(option);
|
|
161188
161188
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
|
@@ -161203,7 +161203,7 @@ ${lanes.join(`
|
|
|
161203
161203
|
}
|
|
161204
161204
|
text.push(sys2.newLine);
|
|
161205
161205
|
} else {
|
|
161206
|
-
text.push(
|
|
161206
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
|
161207
161207
|
if (option.description) {
|
|
161208
161208
|
const description3 = getDiagnosticText(option.description);
|
|
161209
161209
|
text.push(description3);
|
|
@@ -161248,7 +161248,7 @@ ${lanes.join(`
|
|
|
161248
161248
|
if (isFirstLine) {
|
|
161249
161249
|
curLeft = left.padStart(rightAlignOfLeft2);
|
|
161250
161250
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
|
161251
|
-
curLeft = colorLeft ?
|
|
161251
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
|
161252
161252
|
} else {
|
|
161253
161253
|
curLeft = "".padStart(leftAlignOfRight2);
|
|
161254
161254
|
}
|
|
@@ -161360,9 +161360,9 @@ ${lanes.join(`
|
|
|
161360
161360
|
return res;
|
|
161361
161361
|
}
|
|
161362
161362
|
function printEasyHelp(sys2, simpleOptions) {
|
|
161363
|
-
const
|
|
161363
|
+
const colors3 = createColors(sys2);
|
|
161364
161364
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
161365
|
-
output.push(
|
|
161365
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
161366
161366
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
161367
161367
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
161368
161368
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
|
@@ -161383,7 +161383,7 @@ ${lanes.join(`
|
|
|
161383
161383
|
function example(ex, desc) {
|
|
161384
161384
|
const examples = typeof ex === "string" ? [ex] : ex;
|
|
161385
161385
|
for (const example2 of examples) {
|
|
161386
|
-
output.push(" " +
|
|
161386
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
|
161387
161387
|
}
|
|
161388
161388
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
|
161389
161389
|
}
|
|
@@ -161406,12 +161406,12 @@ ${lanes.join(`
|
|
|
161406
161406
|
}
|
|
161407
161407
|
function getHeader(sys2, message) {
|
|
161408
161408
|
var _a;
|
|
161409
|
-
const
|
|
161409
|
+
const colors3 = createColors(sys2);
|
|
161410
161410
|
const header = [];
|
|
161411
161411
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
|
161412
161412
|
const tsIconLength = 5;
|
|
161413
|
-
const tsIconFirstLine =
|
|
161414
|
-
const tsIconSecondLine =
|
|
161413
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
|
161414
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
|
161415
161415
|
if (terminalWidth >= message.length + tsIconLength) {
|
|
161416
161416
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
|
161417
161417
|
const leftAlign = rightAlign - tsIconLength;
|
|
@@ -230804,7 +230804,7 @@ var require_slugify = __commonJS((exports, module) => {
|
|
|
230804
230804
|
});
|
|
230805
230805
|
});
|
|
230806
230806
|
|
|
230807
|
-
// ../../node_modules/.bun/mute-stream@
|
|
230807
|
+
// ../../node_modules/.bun/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
|
|
230808
230808
|
var require_lib13 = __commonJS((exports, module) => {
|
|
230809
230809
|
var Stream2 = __require("stream");
|
|
230810
230810
|
|
|
@@ -246688,11 +246688,14 @@ var {
|
|
|
246688
246688
|
Help
|
|
246689
246689
|
} = import__.default;
|
|
246690
246690
|
|
|
246691
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246691
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
246692
|
+
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
246693
|
+
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
246692
246694
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
246693
246695
|
var isTabKey = (key) => key.name === "tab";
|
|
246696
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
246694
246697
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
246695
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246698
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
246696
246699
|
class AbortPromptError extends Error {
|
|
246697
246700
|
name = "AbortPromptError";
|
|
246698
246701
|
message = "Prompt was aborted";
|
|
@@ -246718,10 +246721,10 @@ class HookError extends Error {
|
|
|
246718
246721
|
class ValidationError extends Error {
|
|
246719
246722
|
name = "ValidationError";
|
|
246720
246723
|
}
|
|
246721
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246724
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
246722
246725
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
246723
246726
|
|
|
246724
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246727
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
246725
246728
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
246726
246729
|
var hookStorage = new AsyncLocalStorage;
|
|
246727
246730
|
function createStore(rl) {
|
|
@@ -246826,7 +246829,7 @@ var effectScheduler = {
|
|
|
246826
246829
|
}
|
|
246827
246830
|
};
|
|
246828
246831
|
|
|
246829
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246832
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
246830
246833
|
function useState(defaultValue) {
|
|
246831
246834
|
return withPointer((pointer) => {
|
|
246832
246835
|
const setState = AsyncResource2.bind(function setState(newValue) {
|
|
@@ -246844,7 +246847,7 @@ function useState(defaultValue) {
|
|
|
246844
246847
|
});
|
|
246845
246848
|
}
|
|
246846
246849
|
|
|
246847
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246850
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
246848
246851
|
function useEffect(cb, depArray) {
|
|
246849
246852
|
withPointer((pointer) => {
|
|
246850
246853
|
const oldDeps = pointer.get();
|
|
@@ -246856,7 +246859,7 @@ function useEffect(cb, depArray) {
|
|
|
246856
246859
|
});
|
|
246857
246860
|
}
|
|
246858
246861
|
|
|
246859
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
246862
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
246860
246863
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
246861
246864
|
|
|
246862
246865
|
// ../../node_modules/.bun/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/esm/index.js
|
|
@@ -247148,7 +247151,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
247148
247151
|
var esm_default = figures;
|
|
247149
247152
|
var replacements = Object.entries(specialMainSymbols);
|
|
247150
247153
|
|
|
247151
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247154
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
247152
247155
|
var defaultTheme = {
|
|
247153
247156
|
prefix: {
|
|
247154
247157
|
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
@@ -247169,7 +247172,7 @@ var defaultTheme = {
|
|
|
247169
247172
|
}
|
|
247170
247173
|
};
|
|
247171
247174
|
|
|
247172
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247175
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
247173
247176
|
function isPlainObject(value) {
|
|
247174
247177
|
if (typeof value !== "object" || value === null)
|
|
247175
247178
|
return false;
|
|
@@ -247197,7 +247200,7 @@ function makeTheme(...themes) {
|
|
|
247197
247200
|
return deepMerge(...themesToMerge);
|
|
247198
247201
|
}
|
|
247199
247202
|
|
|
247200
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247203
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
247201
247204
|
function usePrefix({ status = "idle", theme }) {
|
|
247202
247205
|
const [showLoader, setShowLoader] = useState(false);
|
|
247203
247206
|
const [tick, setTick] = useState(0);
|
|
@@ -247227,12 +247230,23 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
247227
247230
|
const iconName = status === "loading" ? "idle" : status;
|
|
247228
247231
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
247229
247232
|
}
|
|
247230
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247233
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
247234
|
+
function useMemo(fn, dependencies) {
|
|
247235
|
+
return withPointer((pointer) => {
|
|
247236
|
+
const prev = pointer.get();
|
|
247237
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
247238
|
+
const value = fn();
|
|
247239
|
+
pointer.set({ value, dependencies });
|
|
247240
|
+
return value;
|
|
247241
|
+
}
|
|
247242
|
+
return prev.value;
|
|
247243
|
+
});
|
|
247244
|
+
}
|
|
247245
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
247231
247246
|
function useRef(val) {
|
|
247232
247247
|
return useState({ current: val })[0];
|
|
247233
247248
|
}
|
|
247234
|
-
|
|
247235
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
247249
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
247236
247250
|
function useKeypress(userHandler) {
|
|
247237
247251
|
const signal = useRef(userHandler);
|
|
247238
247252
|
signal.current = userHandler;
|
|
@@ -247250,7 +247264,7 @@ function useKeypress(userHandler) {
|
|
|
247250
247264
|
};
|
|
247251
247265
|
}, []);
|
|
247252
247266
|
}
|
|
247253
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247267
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
247254
247268
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
247255
247269
|
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
|
247256
247270
|
function breakLines(content, width) {
|
|
@@ -247263,7 +247277,73 @@ function readlineWidth() {
|
|
|
247263
247277
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
247264
247278
|
}
|
|
247265
247279
|
|
|
247266
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247280
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
247281
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
247282
|
+
const state = useRef({
|
|
247283
|
+
lastPointer: active,
|
|
247284
|
+
lastActive: undefined
|
|
247285
|
+
});
|
|
247286
|
+
const { lastPointer, lastActive } = state.current;
|
|
247287
|
+
const middle = Math.floor(pageSize / 2);
|
|
247288
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
247289
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
247290
|
+
let pointer = defaultPointerPosition;
|
|
247291
|
+
if (renderedLength > pageSize) {
|
|
247292
|
+
if (loop) {
|
|
247293
|
+
pointer = lastPointer;
|
|
247294
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
|
247295
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
|
247296
|
+
}
|
|
247297
|
+
} else {
|
|
247298
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
247299
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
|
247300
|
+
}
|
|
247301
|
+
}
|
|
247302
|
+
state.current.lastPointer = pointer;
|
|
247303
|
+
state.current.lastActive = active;
|
|
247304
|
+
return pointer;
|
|
247305
|
+
}
|
|
247306
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
247307
|
+
const width = readlineWidth();
|
|
247308
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
|
247309
|
+
const renderedItems = items.map((item, index) => {
|
|
247310
|
+
if (item == null)
|
|
247311
|
+
return [];
|
|
247312
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
|
247313
|
+
`);
|
|
247314
|
+
});
|
|
247315
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
247316
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
|
247317
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
247318
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
247319
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
247320
|
+
const pageBuffer = Array.from({ length: pageSize });
|
|
247321
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
247322
|
+
const itemVisited = new Set([active]);
|
|
247323
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
|
247324
|
+
let itemPointer = bound(active + 1);
|
|
247325
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
247326
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
247327
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
247328
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
247329
|
+
itemVisited.add(itemPointer);
|
|
247330
|
+
bufferPointer += linesToAdd.length;
|
|
247331
|
+
itemPointer = bound(itemPointer + 1);
|
|
247332
|
+
}
|
|
247333
|
+
bufferPointer = activeItemPosition - 1;
|
|
247334
|
+
itemPointer = bound(active - 1);
|
|
247335
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
247336
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
247337
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
247338
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
247339
|
+
itemVisited.add(itemPointer);
|
|
247340
|
+
bufferPointer -= linesToAdd.length;
|
|
247341
|
+
itemPointer = bound(itemPointer - 1);
|
|
247342
|
+
}
|
|
247343
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
247344
|
+
`);
|
|
247345
|
+
}
|
|
247346
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
247267
247347
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
247268
247348
|
import * as readline2 from "node:readline";
|
|
247269
247349
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -247476,7 +247556,7 @@ var {
|
|
|
247476
247556
|
unload
|
|
247477
247557
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
247478
247558
|
|
|
247479
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247559
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
247480
247560
|
import { stripVTControlCharacters } from "node:util";
|
|
247481
247561
|
|
|
247482
247562
|
// ../../node_modules/.bun/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/esm/index.js
|
|
@@ -247495,7 +247575,7 @@ var cursorTo = (x, y) => {
|
|
|
247495
247575
|
var eraseLine = ESC + "2K";
|
|
247496
247576
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
247497
247577
|
|
|
247498
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247578
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
247499
247579
|
var height = (content) => content.split(`
|
|
247500
247580
|
`).length;
|
|
247501
247581
|
var lastLine = (content) => content.split(`
|
|
@@ -247560,7 +247640,7 @@ class ScreenManager {
|
|
|
247560
247640
|
}
|
|
247561
247641
|
}
|
|
247562
247642
|
|
|
247563
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247643
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
247564
247644
|
class PromisePolyfill extends Promise {
|
|
247565
247645
|
static withResolver() {
|
|
247566
247646
|
let resolve;
|
|
@@ -247573,7 +247653,7 @@ class PromisePolyfill extends Promise {
|
|
|
247573
247653
|
}
|
|
247574
247654
|
}
|
|
247575
247655
|
|
|
247576
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
247656
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
247577
247657
|
function getCallSites() {
|
|
247578
247658
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
247579
247659
|
let result = [];
|
|
@@ -247659,6 +247739,20 @@ function createPrompt(view) {
|
|
|
247659
247739
|
};
|
|
247660
247740
|
return prompt;
|
|
247661
247741
|
}
|
|
247742
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
247743
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
247744
|
+
class Separator {
|
|
247745
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
247746
|
+
type = "separator";
|
|
247747
|
+
constructor(separator) {
|
|
247748
|
+
if (separator) {
|
|
247749
|
+
this.separator = separator;
|
|
247750
|
+
}
|
|
247751
|
+
}
|
|
247752
|
+
static isSeparator(choice) {
|
|
247753
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
247754
|
+
}
|
|
247755
|
+
}
|
|
247662
247756
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
|
247663
247757
|
var exports_base = {};
|
|
247664
247758
|
__export(exports_base, {
|
|
@@ -262340,7 +262434,7 @@ minimatch.Minimatch = Minimatch;
|
|
|
262340
262434
|
minimatch.escape = escape2;
|
|
262341
262435
|
minimatch.unescape = unescape2;
|
|
262342
262436
|
|
|
262343
|
-
// ../../node_modules/.bun/glob@
|
|
262437
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/glob.js
|
|
262344
262438
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
262345
262439
|
|
|
262346
262440
|
// ../../node_modules/.bun/lru-cache@11.2.2/node_modules/lru-cache/dist/esm/index.js
|
|
@@ -265445,7 +265539,7 @@ class PathScurryDarwin extends PathScurryPosix {
|
|
|
265445
265539
|
var Path = process.platform === "win32" ? PathWin32 : PathPosix;
|
|
265446
265540
|
var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
|
|
265447
265541
|
|
|
265448
|
-
// ../../node_modules/.bun/glob@
|
|
265542
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/pattern.js
|
|
265449
265543
|
var isPatternList = (pl) => pl.length >= 1;
|
|
265450
265544
|
var isGlobList = (gl) => gl.length >= 1;
|
|
265451
265545
|
|
|
@@ -265563,7 +265657,7 @@ class Pattern {
|
|
|
265563
265657
|
}
|
|
265564
265658
|
}
|
|
265565
265659
|
|
|
265566
|
-
// ../../node_modules/.bun/glob@
|
|
265660
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/ignore.js
|
|
265567
265661
|
var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
265568
265662
|
|
|
265569
265663
|
class Ignore {
|
|
@@ -265651,7 +265745,7 @@ class Ignore {
|
|
|
265651
265745
|
}
|
|
265652
265746
|
}
|
|
265653
265747
|
|
|
265654
|
-
// ../../node_modules/.bun/glob@
|
|
265748
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/processor.js
|
|
265655
265749
|
class HasWalkedCache {
|
|
265656
265750
|
store;
|
|
265657
265751
|
constructor(store = new Map) {
|
|
@@ -265869,7 +265963,7 @@ class Processor {
|
|
|
265869
265963
|
}
|
|
265870
265964
|
}
|
|
265871
265965
|
|
|
265872
|
-
// ../../node_modules/.bun/glob@
|
|
265966
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/walker.js
|
|
265873
265967
|
var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
|
|
265874
265968
|
|
|
265875
265969
|
class GlobUtil {
|
|
@@ -266196,7 +266290,7 @@ class GlobStream extends GlobUtil {
|
|
|
266196
266290
|
}
|
|
266197
266291
|
}
|
|
266198
266292
|
|
|
266199
|
-
// ../../node_modules/.bun/glob@
|
|
266293
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/glob.js
|
|
266200
266294
|
var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
266201
266295
|
|
|
266202
266296
|
class Glob {
|
|
@@ -266370,7 +266464,7 @@ class Glob {
|
|
|
266370
266464
|
}
|
|
266371
266465
|
}
|
|
266372
266466
|
|
|
266373
|
-
// ../../node_modules/.bun/glob@
|
|
266467
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/has-magic.js
|
|
266374
266468
|
var hasMagic = (pattern, options = {}) => {
|
|
266375
266469
|
if (!Array.isArray(pattern)) {
|
|
266376
266470
|
pattern = [pattern];
|
|
@@ -266382,7 +266476,7 @@ var hasMagic = (pattern, options = {}) => {
|
|
|
266382
266476
|
return false;
|
|
266383
266477
|
};
|
|
266384
266478
|
|
|
266385
|
-
// ../../node_modules/.bun/glob@
|
|
266479
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/index.js
|
|
266386
266480
|
function globStreamSync(pattern, options = {}) {
|
|
266387
266481
|
return new Glob(pattern, options).streamSync();
|
|
266388
266482
|
}
|
|
@@ -266933,7 +267027,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
266933
267027
|
var package_default = {
|
|
266934
267028
|
name: "@settlemint/sdk-cli",
|
|
266935
267029
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
266936
|
-
version: "2.6.4-
|
|
267030
|
+
version: "2.6.4-preac21cc8",
|
|
266937
267031
|
type: "module",
|
|
266938
267032
|
private: false,
|
|
266939
267033
|
license: "FSL-1.1-MIT",
|
|
@@ -266976,21 +267070,21 @@ var package_default = {
|
|
|
266976
267070
|
},
|
|
266977
267071
|
dependencies: {
|
|
266978
267072
|
"@gql.tada/cli-utils": "1.7.2",
|
|
266979
|
-
"@inquirer/core": "10.3.
|
|
267073
|
+
"@inquirer/core": "10.3.2",
|
|
266980
267074
|
"node-fetch-native": "1.6.7",
|
|
266981
267075
|
zod: "^4"
|
|
266982
267076
|
},
|
|
266983
267077
|
devDependencies: {
|
|
266984
267078
|
"@commander-js/extra-typings": "14.0.0",
|
|
266985
267079
|
commander: "14.0.2",
|
|
266986
|
-
"@inquirer/confirm": "5.1.
|
|
267080
|
+
"@inquirer/confirm": "5.1.21",
|
|
266987
267081
|
"@inquirer/input": "4.3.0",
|
|
266988
267082
|
"@inquirer/password": "4.0.23",
|
|
266989
267083
|
"@inquirer/select": "4.4.2",
|
|
266990
|
-
"@settlemint/sdk-hasura": "2.6.4-
|
|
266991
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
266992
|
-
"@settlemint/sdk-utils": "2.6.4-
|
|
266993
|
-
"@settlemint/sdk-viem": "2.6.4-
|
|
267084
|
+
"@settlemint/sdk-hasura": "2.6.4-preac21cc8",
|
|
267085
|
+
"@settlemint/sdk-js": "2.6.4-preac21cc8",
|
|
267086
|
+
"@settlemint/sdk-utils": "2.6.4-preac21cc8",
|
|
267087
|
+
"@settlemint/sdk-viem": "2.6.4-preac21cc8",
|
|
266994
267088
|
"@types/node": "24.10.1",
|
|
266995
267089
|
"@types/semver": "7.7.1",
|
|
266996
267090
|
"@types/which": "3.0.4",
|
|
@@ -267007,7 +267101,7 @@ var package_default = {
|
|
|
267007
267101
|
},
|
|
267008
267102
|
peerDependencies: {
|
|
267009
267103
|
hardhat: "<= 4",
|
|
267010
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
267104
|
+
"@settlemint/sdk-js": "2.6.4-preac21cc8"
|
|
267011
267105
|
},
|
|
267012
267106
|
peerDependenciesMeta: {
|
|
267013
267107
|
hardhat: {
|
|
@@ -272562,116 +272656,11 @@ function sanitizeName(value4, length = 35) {
|
|
|
272562
272656
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
|
272563
272657
|
}
|
|
272564
272658
|
|
|
272565
|
-
// ../../node_modules/.bun/@inquirer+
|
|
272566
|
-
var inputTheme = {
|
|
272567
|
-
validationFailureMode: "keep"
|
|
272568
|
-
};
|
|
272569
|
-
var esm_default2 = createPrompt((config3, done) => {
|
|
272570
|
-
const { prefill = "tab" } = config3;
|
|
272571
|
-
const theme = makeTheme(inputTheme, config3.theme);
|
|
272572
|
-
const [status, setStatus] = useState("idle");
|
|
272573
|
-
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
|
272574
|
-
const [errorMsg, setError] = useState();
|
|
272575
|
-
const [value4, setValue] = useState("");
|
|
272576
|
-
const prefix = usePrefix({ status, theme });
|
|
272577
|
-
async function validate3(value5) {
|
|
272578
|
-
const { required: required2, pattern, patternError = "Invalid input" } = config3;
|
|
272579
|
-
if (required2 && !value5) {
|
|
272580
|
-
return "You must provide a value";
|
|
272581
|
-
}
|
|
272582
|
-
if (pattern && !pattern.test(value5)) {
|
|
272583
|
-
return patternError;
|
|
272584
|
-
}
|
|
272585
|
-
if (typeof config3.validate === "function") {
|
|
272586
|
-
return await config3.validate(value5) || "You must provide a valid value";
|
|
272587
|
-
}
|
|
272588
|
-
return true;
|
|
272589
|
-
}
|
|
272590
|
-
useKeypress(async (key, rl) => {
|
|
272591
|
-
if (status !== "idle") {
|
|
272592
|
-
return;
|
|
272593
|
-
}
|
|
272594
|
-
if (isEnterKey(key)) {
|
|
272595
|
-
const answer = value4 || defaultValue;
|
|
272596
|
-
setStatus("loading");
|
|
272597
|
-
const isValid = await validate3(answer);
|
|
272598
|
-
if (isValid === true) {
|
|
272599
|
-
setValue(answer);
|
|
272600
|
-
setStatus("done");
|
|
272601
|
-
done(answer);
|
|
272602
|
-
} else {
|
|
272603
|
-
if (theme.validationFailureMode === "clear") {
|
|
272604
|
-
setValue("");
|
|
272605
|
-
} else {
|
|
272606
|
-
rl.write(value4);
|
|
272607
|
-
}
|
|
272608
|
-
setError(isValid);
|
|
272609
|
-
setStatus("idle");
|
|
272610
|
-
}
|
|
272611
|
-
} else if (isBackspaceKey(key) && !value4) {
|
|
272612
|
-
setDefaultValue(undefined);
|
|
272613
|
-
} else if (isTabKey(key) && !value4) {
|
|
272614
|
-
setDefaultValue(undefined);
|
|
272615
|
-
rl.clearLine(0);
|
|
272616
|
-
rl.write(defaultValue);
|
|
272617
|
-
setValue(defaultValue);
|
|
272618
|
-
} else {
|
|
272619
|
-
setValue(rl.line);
|
|
272620
|
-
setError(undefined);
|
|
272621
|
-
}
|
|
272622
|
-
});
|
|
272623
|
-
useEffect((rl) => {
|
|
272624
|
-
if (prefill === "editable" && defaultValue) {
|
|
272625
|
-
rl.write(defaultValue);
|
|
272626
|
-
setValue(defaultValue);
|
|
272627
|
-
}
|
|
272628
|
-
}, []);
|
|
272629
|
-
const message = theme.style.message(config3.message, status);
|
|
272630
|
-
let formattedValue = value4;
|
|
272631
|
-
if (typeof config3.transformer === "function") {
|
|
272632
|
-
formattedValue = config3.transformer(value4, { isFinal: status === "done" });
|
|
272633
|
-
} else if (status === "done") {
|
|
272634
|
-
formattedValue = theme.style.answer(value4);
|
|
272635
|
-
}
|
|
272636
|
-
let defaultStr;
|
|
272637
|
-
if (defaultValue && status !== "done" && !value4) {
|
|
272638
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
|
272639
|
-
}
|
|
272640
|
-
let error50 = "";
|
|
272641
|
-
if (errorMsg) {
|
|
272642
|
-
error50 = theme.style.error(errorMsg);
|
|
272643
|
-
}
|
|
272644
|
-
return [
|
|
272645
|
-
[prefix, message, defaultStr, formattedValue].filter((v7) => v7 !== undefined).join(" "),
|
|
272646
|
-
error50
|
|
272647
|
-
];
|
|
272648
|
-
});
|
|
272649
|
-
|
|
272650
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
|
272651
|
-
async function subgraphNamePrompt({
|
|
272652
|
-
defaultName,
|
|
272653
|
-
env: env2,
|
|
272654
|
-
accept
|
|
272655
|
-
}) {
|
|
272656
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
|
272657
|
-
if (accept) {
|
|
272658
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
|
272659
|
-
}
|
|
272660
|
-
const subgraphName = await esm_default2({
|
|
272661
|
-
message: "What is the name of your subgraph?",
|
|
272662
|
-
default: defaultSubgraphName,
|
|
272663
|
-
required: true
|
|
272664
|
-
});
|
|
272665
|
-
return sanitizeName(subgraphName);
|
|
272666
|
-
}
|
|
272667
|
-
|
|
272668
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
272669
|
-
var isUpKey2 = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
272670
|
-
var isDownKey2 = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
272659
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
272671
272660
|
var isBackspaceKey2 = (key) => key.name === "backspace";
|
|
272672
|
-
var
|
|
272661
|
+
var isTabKey2 = (key) => key.name === "tab";
|
|
272673
272662
|
var isEnterKey2 = (key) => key.name === "enter" || key.name === "return";
|
|
272674
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272663
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
272675
272664
|
class AbortPromptError2 extends Error {
|
|
272676
272665
|
name = "AbortPromptError";
|
|
272677
272666
|
message = "Prompt was aborted";
|
|
@@ -272697,10 +272686,10 @@ class HookError2 extends Error {
|
|
|
272697
272686
|
class ValidationError2 extends Error {
|
|
272698
272687
|
name = "ValidationError";
|
|
272699
272688
|
}
|
|
272700
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272689
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
272701
272690
|
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
272702
272691
|
|
|
272703
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272692
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
272704
272693
|
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
272705
272694
|
var hookStorage2 = new AsyncLocalStorage2;
|
|
272706
272695
|
function createStore2(rl) {
|
|
@@ -272805,7 +272794,7 @@ var effectScheduler2 = {
|
|
|
272805
272794
|
}
|
|
272806
272795
|
};
|
|
272807
272796
|
|
|
272808
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272797
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
272809
272798
|
function useState2(defaultValue) {
|
|
272810
272799
|
return withPointer2((pointer) => {
|
|
272811
272800
|
const setState = AsyncResource5.bind(function setState(newValue) {
|
|
@@ -272823,7 +272812,7 @@ function useState2(defaultValue) {
|
|
|
272823
272812
|
});
|
|
272824
272813
|
}
|
|
272825
272814
|
|
|
272826
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272815
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
272827
272816
|
function useEffect2(cb, depArray) {
|
|
272828
272817
|
withPointer2((pointer) => {
|
|
272829
272818
|
const oldDeps = pointer.get();
|
|
@@ -272835,29 +272824,29 @@ function useEffect2(cb, depArray) {
|
|
|
272835
272824
|
});
|
|
272836
272825
|
}
|
|
272837
272826
|
|
|
272838
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272839
|
-
var
|
|
272827
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
272828
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
272840
272829
|
var defaultTheme2 = {
|
|
272841
272830
|
prefix: {
|
|
272842
|
-
idle:
|
|
272843
|
-
done:
|
|
272831
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
|
272832
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
|
272844
272833
|
},
|
|
272845
272834
|
spinner: {
|
|
272846
272835
|
interval: 80,
|
|
272847
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
|
272836
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
|
272848
272837
|
},
|
|
272849
272838
|
style: {
|
|
272850
|
-
answer:
|
|
272851
|
-
message:
|
|
272852
|
-
error: (text2) =>
|
|
272853
|
-
defaultAnswer: (text2) =>
|
|
272854
|
-
help:
|
|
272855
|
-
highlight:
|
|
272856
|
-
key: (text2) =>
|
|
272839
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
|
272840
|
+
message: import_yoctocolors_cjs3.default.bold,
|
|
272841
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
|
272842
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
|
272843
|
+
help: import_yoctocolors_cjs3.default.dim,
|
|
272844
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
|
272845
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
|
272857
272846
|
}
|
|
272858
272847
|
};
|
|
272859
272848
|
|
|
272860
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272849
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
272861
272850
|
function isPlainObject4(value4) {
|
|
272862
272851
|
if (typeof value4 !== "object" || value4 === null)
|
|
272863
272852
|
return false;
|
|
@@ -272885,7 +272874,7 @@ function makeTheme2(...themes) {
|
|
|
272885
272874
|
return deepMerge3(...themesToMerge);
|
|
272886
272875
|
}
|
|
272887
272876
|
|
|
272888
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272877
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
272889
272878
|
function usePrefix2({ status = "idle", theme }) {
|
|
272890
272879
|
const [showLoader, setShowLoader] = useState2(false);
|
|
272891
272880
|
const [tick, setTick] = useState2(0);
|
|
@@ -272915,23 +272904,12 @@ function usePrefix2({ status = "idle", theme }) {
|
|
|
272915
272904
|
const iconName = status === "loading" ? "idle" : status;
|
|
272916
272905
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
272917
272906
|
}
|
|
272918
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272919
|
-
function useMemo(fn, dependencies) {
|
|
272920
|
-
return withPointer2((pointer) => {
|
|
272921
|
-
const prev = pointer.get();
|
|
272922
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
|
272923
|
-
const value4 = fn();
|
|
272924
|
-
pointer.set({ value: value4, dependencies });
|
|
272925
|
-
return value4;
|
|
272926
|
-
}
|
|
272927
|
-
return prev.value;
|
|
272928
|
-
});
|
|
272929
|
-
}
|
|
272930
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
272907
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
272931
272908
|
function useRef2(val) {
|
|
272932
272909
|
return useState2({ current: val })[0];
|
|
272933
272910
|
}
|
|
272934
|
-
|
|
272911
|
+
|
|
272912
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
272935
272913
|
function useKeypress2(userHandler) {
|
|
272936
272914
|
const signal = useRef2(userHandler);
|
|
272937
272915
|
signal.current = userHandler;
|
|
@@ -272949,7 +272927,7 @@ function useKeypress2(userHandler) {
|
|
|
272949
272927
|
};
|
|
272950
272928
|
}, []);
|
|
272951
272929
|
}
|
|
272952
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272930
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
272953
272931
|
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
272954
272932
|
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
272955
272933
|
function breakLines2(content, width) {
|
|
@@ -272962,78 +272940,12 @@ function readlineWidth2() {
|
|
|
272962
272940
|
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
272963
272941
|
}
|
|
272964
272942
|
|
|
272965
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272966
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
272967
|
-
const state = useRef2({
|
|
272968
|
-
lastPointer: active,
|
|
272969
|
-
lastActive: undefined
|
|
272970
|
-
});
|
|
272971
|
-
const { lastPointer, lastActive } = state.current;
|
|
272972
|
-
const middle = Math.floor(pageSize / 2);
|
|
272973
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
272974
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
272975
|
-
let pointer = defaultPointerPosition;
|
|
272976
|
-
if (renderedLength > pageSize) {
|
|
272977
|
-
if (loop) {
|
|
272978
|
-
pointer = lastPointer;
|
|
272979
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
|
272980
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
|
272981
|
-
}
|
|
272982
|
-
} else {
|
|
272983
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
272984
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
|
272985
|
-
}
|
|
272986
|
-
}
|
|
272987
|
-
state.current.lastPointer = pointer;
|
|
272988
|
-
state.current.lastActive = active;
|
|
272989
|
-
return pointer;
|
|
272990
|
-
}
|
|
272991
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
272992
|
-
const width = readlineWidth2();
|
|
272993
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
|
272994
|
-
const renderedItems = items.map((item, index) => {
|
|
272995
|
-
if (item == null)
|
|
272996
|
-
return [];
|
|
272997
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
|
272998
|
-
`);
|
|
272999
|
-
});
|
|
273000
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
273001
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
|
273002
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
273003
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
273004
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
273005
|
-
const pageBuffer = Array.from({ length: pageSize });
|
|
273006
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
273007
|
-
const itemVisited = new Set([active]);
|
|
273008
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
|
273009
|
-
let itemPointer = bound(active + 1);
|
|
273010
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
273011
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
273012
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
273013
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
273014
|
-
itemVisited.add(itemPointer);
|
|
273015
|
-
bufferPointer += linesToAdd.length;
|
|
273016
|
-
itemPointer = bound(itemPointer + 1);
|
|
273017
|
-
}
|
|
273018
|
-
bufferPointer = activeItemPosition - 1;
|
|
273019
|
-
itemPointer = bound(active - 1);
|
|
273020
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
273021
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
273022
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
273023
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
273024
|
-
itemVisited.add(itemPointer);
|
|
273025
|
-
bufferPointer -= linesToAdd.length;
|
|
273026
|
-
itemPointer = bound(itemPointer - 1);
|
|
273027
|
-
}
|
|
273028
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
273029
|
-
`);
|
|
273030
|
-
}
|
|
273031
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
272943
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273032
272944
|
var import_mute_stream2 = __toESM(require_lib13(), 1);
|
|
273033
272945
|
import * as readline4 from "node:readline";
|
|
273034
272946
|
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
273035
272947
|
|
|
273036
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
272948
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
273037
272949
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
273038
272950
|
var height2 = (content) => content.split(`
|
|
273039
272951
|
`).length;
|
|
@@ -273099,7 +273011,7 @@ class ScreenManager2 {
|
|
|
273099
273011
|
}
|
|
273100
273012
|
}
|
|
273101
273013
|
|
|
273102
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
273014
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
273103
273015
|
class PromisePolyfill2 extends Promise {
|
|
273104
273016
|
static withResolver() {
|
|
273105
273017
|
let resolve6;
|
|
@@ -273112,7 +273024,7 @@ class PromisePolyfill2 extends Promise {
|
|
|
273112
273024
|
}
|
|
273113
273025
|
}
|
|
273114
273026
|
|
|
273115
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.
|
|
273027
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273116
273028
|
function getCallSites2() {
|
|
273117
273029
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
273118
273030
|
let result = [];
|
|
@@ -273198,20 +273110,109 @@ function createPrompt2(view) {
|
|
|
273198
273110
|
};
|
|
273199
273111
|
return prompt;
|
|
273200
273112
|
}
|
|
273201
|
-
// ../../node_modules/.bun/@inquirer+
|
|
273202
|
-
var
|
|
273203
|
-
|
|
273204
|
-
|
|
273205
|
-
|
|
273206
|
-
|
|
273207
|
-
|
|
273208
|
-
|
|
273113
|
+
// ../../node_modules/.bun/@inquirer+input@4.3.0+4cbbb20073436eb8/node_modules/@inquirer/input/dist/esm/index.js
|
|
273114
|
+
var inputTheme = {
|
|
273115
|
+
validationFailureMode: "keep"
|
|
273116
|
+
};
|
|
273117
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
|
273118
|
+
const { prefill = "tab" } = config3;
|
|
273119
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
|
273120
|
+
const [status, setStatus] = useState2("idle");
|
|
273121
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
|
273122
|
+
const [errorMsg, setError] = useState2();
|
|
273123
|
+
const [value4, setValue] = useState2("");
|
|
273124
|
+
const prefix = usePrefix2({ status, theme });
|
|
273125
|
+
async function validate3(value5) {
|
|
273126
|
+
const { required: required2, pattern, patternError = "Invalid input" } = config3;
|
|
273127
|
+
if (required2 && !value5) {
|
|
273128
|
+
return "You must provide a value";
|
|
273209
273129
|
}
|
|
273130
|
+
if (pattern && !pattern.test(value5)) {
|
|
273131
|
+
return patternError;
|
|
273132
|
+
}
|
|
273133
|
+
if (typeof config3.validate === "function") {
|
|
273134
|
+
return await config3.validate(value5) || "You must provide a valid value";
|
|
273135
|
+
}
|
|
273136
|
+
return true;
|
|
273210
273137
|
}
|
|
273211
|
-
|
|
273212
|
-
|
|
273138
|
+
useKeypress2(async (key, rl) => {
|
|
273139
|
+
if (status !== "idle") {
|
|
273140
|
+
return;
|
|
273141
|
+
}
|
|
273142
|
+
if (isEnterKey2(key)) {
|
|
273143
|
+
const answer = value4 || defaultValue;
|
|
273144
|
+
setStatus("loading");
|
|
273145
|
+
const isValid = await validate3(answer);
|
|
273146
|
+
if (isValid === true) {
|
|
273147
|
+
setValue(answer);
|
|
273148
|
+
setStatus("done");
|
|
273149
|
+
done(answer);
|
|
273150
|
+
} else {
|
|
273151
|
+
if (theme.validationFailureMode === "clear") {
|
|
273152
|
+
setValue("");
|
|
273153
|
+
} else {
|
|
273154
|
+
rl.write(value4);
|
|
273155
|
+
}
|
|
273156
|
+
setError(isValid);
|
|
273157
|
+
setStatus("idle");
|
|
273158
|
+
}
|
|
273159
|
+
} else if (isBackspaceKey2(key) && !value4) {
|
|
273160
|
+
setDefaultValue(undefined);
|
|
273161
|
+
} else if (isTabKey2(key) && !value4) {
|
|
273162
|
+
setDefaultValue(undefined);
|
|
273163
|
+
rl.clearLine(0);
|
|
273164
|
+
rl.write(defaultValue);
|
|
273165
|
+
setValue(defaultValue);
|
|
273166
|
+
} else {
|
|
273167
|
+
setValue(rl.line);
|
|
273168
|
+
setError(undefined);
|
|
273169
|
+
}
|
|
273170
|
+
});
|
|
273171
|
+
useEffect2((rl) => {
|
|
273172
|
+
if (prefill === "editable" && defaultValue) {
|
|
273173
|
+
rl.write(defaultValue);
|
|
273174
|
+
setValue(defaultValue);
|
|
273175
|
+
}
|
|
273176
|
+
}, []);
|
|
273177
|
+
const message = theme.style.message(config3.message, status);
|
|
273178
|
+
let formattedValue = value4;
|
|
273179
|
+
if (typeof config3.transformer === "function") {
|
|
273180
|
+
formattedValue = config3.transformer(value4, { isFinal: status === "done" });
|
|
273181
|
+
} else if (status === "done") {
|
|
273182
|
+
formattedValue = theme.style.answer(value4);
|
|
273183
|
+
}
|
|
273184
|
+
let defaultStr;
|
|
273185
|
+
if (defaultValue && status !== "done" && !value4) {
|
|
273186
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
|
273187
|
+
}
|
|
273188
|
+
let error50 = "";
|
|
273189
|
+
if (errorMsg) {
|
|
273190
|
+
error50 = theme.style.error(errorMsg);
|
|
273191
|
+
}
|
|
273192
|
+
return [
|
|
273193
|
+
[prefix, message, defaultStr, formattedValue].filter((v7) => v7 !== undefined).join(" "),
|
|
273194
|
+
error50
|
|
273195
|
+
];
|
|
273196
|
+
});
|
|
273197
|
+
|
|
273198
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
|
273199
|
+
async function subgraphNamePrompt({
|
|
273200
|
+
defaultName,
|
|
273201
|
+
env: env2,
|
|
273202
|
+
accept
|
|
273203
|
+
}) {
|
|
273204
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
|
273205
|
+
if (accept) {
|
|
273206
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
|
273213
273207
|
}
|
|
273208
|
+
const subgraphName = await esm_default2({
|
|
273209
|
+
message: "What is the name of your subgraph?",
|
|
273210
|
+
default: defaultSubgraphName,
|
|
273211
|
+
required: true
|
|
273212
|
+
});
|
|
273213
|
+
return sanitizeName(subgraphName);
|
|
273214
273214
|
}
|
|
273215
|
+
|
|
273215
273216
|
// ../../node_modules/.bun/@inquirer+select@4.4.2+4cbbb20073436eb8/node_modules/@inquirer/select/dist/esm/index.js
|
|
273216
273217
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273217
273218
|
var selectTheme = {
|
|
@@ -273253,20 +273254,20 @@ function normalizeChoices(choices) {
|
|
|
273253
273254
|
return normalizedChoice;
|
|
273254
273255
|
});
|
|
273255
273256
|
}
|
|
273256
|
-
var esm_default3 =
|
|
273257
|
+
var esm_default3 = createPrompt((config3, done) => {
|
|
273257
273258
|
const { loop = true, pageSize = 7 } = config3;
|
|
273258
|
-
const theme =
|
|
273259
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
|
273259
273260
|
const { keybindings } = theme;
|
|
273260
|
-
const [status, setStatus] =
|
|
273261
|
-
const prefix =
|
|
273262
|
-
const searchTimeoutRef =
|
|
273261
|
+
const [status, setStatus] = useState("idle");
|
|
273262
|
+
const prefix = usePrefix({ status, theme });
|
|
273263
|
+
const searchTimeoutRef = useRef();
|
|
273263
273264
|
const searchEnabled = !keybindings.includes("vim");
|
|
273264
273265
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
|
273265
273266
|
const bounds = useMemo(() => {
|
|
273266
273267
|
const first = items.findIndex(isSelectable);
|
|
273267
273268
|
const last = items.findLastIndex(isSelectable);
|
|
273268
273269
|
if (first === -1) {
|
|
273269
|
-
throw new
|
|
273270
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
|
273270
273271
|
}
|
|
273271
273272
|
return { first, last };
|
|
273272
273273
|
}, [items]);
|
|
@@ -273275,24 +273276,24 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
|
273275
273276
|
return -1;
|
|
273276
273277
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
|
273277
273278
|
}, [config3.default, items]);
|
|
273278
|
-
const [active, setActive] =
|
|
273279
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
|
273279
273280
|
const selectedChoice = items[active];
|
|
273280
|
-
|
|
273281
|
+
useKeypress((key, rl) => {
|
|
273281
273282
|
clearTimeout(searchTimeoutRef.current);
|
|
273282
|
-
if (
|
|
273283
|
+
if (isEnterKey(key)) {
|
|
273283
273284
|
setStatus("done");
|
|
273284
273285
|
done(selectedChoice.value);
|
|
273285
|
-
} else if (
|
|
273286
|
+
} else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
|
|
273286
273287
|
rl.clearLine(0);
|
|
273287
|
-
if (loop ||
|
|
273288
|
-
const offset =
|
|
273288
|
+
if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
|
|
273289
|
+
const offset = isUpKey(key, keybindings) ? -1 : 1;
|
|
273289
273290
|
let next = active;
|
|
273290
273291
|
do {
|
|
273291
273292
|
next = (next + offset + items.length) % items.length;
|
|
273292
273293
|
} while (!isSelectable(items[next]));
|
|
273293
273294
|
setActive(next);
|
|
273294
273295
|
}
|
|
273295
|
-
} else if (
|
|
273296
|
+
} else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {
|
|
273296
273297
|
const selectedIndex = Number(rl.line) - 1;
|
|
273297
273298
|
let selectableIndex = -1;
|
|
273298
273299
|
const position = items.findIndex((item2) => {
|
|
@@ -273308,7 +273309,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
|
273308
273309
|
searchTimeoutRef.current = setTimeout(() => {
|
|
273309
273310
|
rl.clearLine(0);
|
|
273310
273311
|
}, 700);
|
|
273311
|
-
} else if (
|
|
273312
|
+
} else if (isBackspaceKey(key)) {
|
|
273312
273313
|
rl.clearLine(0);
|
|
273313
273314
|
} else if (searchEnabled) {
|
|
273314
273315
|
const searchTerm = rl.line.toLowerCase();
|
|
@@ -273325,7 +273326,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
|
273325
273326
|
}, 700);
|
|
273326
273327
|
}
|
|
273327
273328
|
});
|
|
273328
|
-
|
|
273329
|
+
useEffect(() => () => {
|
|
273329
273330
|
clearTimeout(searchTimeoutRef.current);
|
|
273330
273331
|
}, []);
|
|
273331
273332
|
const message = theme.style.message(config3.message, status);
|
|
@@ -299012,7 +299013,7 @@ function extractInfoFromBody(body) {
|
|
|
299012
299013
|
}
|
|
299013
299014
|
}
|
|
299014
299015
|
|
|
299015
|
-
// ../../node_modules/.bun/@inquirer+confirm@5.1.
|
|
299016
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.21+4cbbb20073436eb8/node_modules/@inquirer/confirm/dist/esm/index.js
|
|
299016
299017
|
function getBooleanValue(value4, defaultValue) {
|
|
299017
299018
|
let answer = defaultValue !== false;
|
|
299018
299019
|
if (/^(y|yes)/i.test(value4))
|
|
@@ -299059,18 +299060,18 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
299059
299060
|
});
|
|
299060
299061
|
|
|
299061
299062
|
// ../../node_modules/.bun/@inquirer+password@4.0.23+4cbbb20073436eb8/node_modules/@inquirer/password/dist/esm/index.js
|
|
299062
|
-
var esm_default5 =
|
|
299063
|
+
var esm_default5 = createPrompt((config3, done) => {
|
|
299063
299064
|
const { validate: validate8 = () => true } = config3;
|
|
299064
|
-
const theme =
|
|
299065
|
-
const [status, setStatus] =
|
|
299066
|
-
const [errorMsg, setError] =
|
|
299067
|
-
const [value4, setValue] =
|
|
299068
|
-
const prefix =
|
|
299069
|
-
|
|
299065
|
+
const theme = makeTheme(config3.theme);
|
|
299066
|
+
const [status, setStatus] = useState("idle");
|
|
299067
|
+
const [errorMsg, setError] = useState();
|
|
299068
|
+
const [value4, setValue] = useState("");
|
|
299069
|
+
const prefix = usePrefix({ status, theme });
|
|
299070
|
+
useKeypress(async (key, rl) => {
|
|
299070
299071
|
if (status !== "idle") {
|
|
299071
299072
|
return;
|
|
299072
299073
|
}
|
|
299073
|
-
if (
|
|
299074
|
+
if (isEnterKey(key)) {
|
|
299074
299075
|
const answer = value4;
|
|
299075
299076
|
setStatus("loading");
|
|
299076
299077
|
const isValid = await validate8(answer);
|
|
@@ -308668,4 +308669,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
308668
308669
|
// src/cli.ts
|
|
308669
308670
|
sdkCliCommand();
|
|
308670
308671
|
|
|
308671
|
-
//# debugId=
|
|
308672
|
+
//# debugId=55F3B075F2EB5EA764756E2164756E21
|