@settlemint/sdk-cli 2.6.2-prf4f7dbcf → 2.6.2-prf7f629f7
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 +572 -573
- package/dist/cli.js.map +17 -17
- package/package.json +8 -8
package/dist/cli.js
CHANGED
@@ -233941,16 +233941,16 @@ var init_lru = __esm(() => {
|
|
233941
233941
|
});
|
233942
233942
|
this.maxSize = size2;
|
233943
233943
|
}
|
233944
|
-
get(
|
233945
|
-
const value5 = super.get(
|
233946
|
-
if (super.has(
|
233947
|
-
this.delete(
|
233948
|
-
super.set(
|
233944
|
+
get(key2) {
|
233945
|
+
const value5 = super.get(key2);
|
233946
|
+
if (super.has(key2) && value5 !== undefined) {
|
233947
|
+
this.delete(key2);
|
233948
|
+
super.set(key2, value5);
|
233949
233949
|
}
|
233950
233950
|
return value5;
|
233951
233951
|
}
|
233952
|
-
set(
|
233953
|
-
super.set(
|
233952
|
+
set(key2, value5) {
|
233953
|
+
super.set(key2, value5);
|
233954
233954
|
if (this.maxSize && this.size > this.maxSize) {
|
233955
233955
|
const firstKey = this.keys().next().value;
|
233956
233956
|
if (firstKey)
|
@@ -234992,9 +234992,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
234992
234992
|
});
|
234993
234993
|
|
234994
234994
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/utils/stringify.js
|
234995
|
-
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (
|
234995
|
+
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (key2, value_) => {
|
234996
234996
|
const value6 = typeof value_ === "bigint" ? value_.toString() : value_;
|
234997
|
-
return typeof replacer === "function" ? replacer(
|
234997
|
+
return typeof replacer === "function" ? replacer(key2, value6) : value6;
|
234998
234998
|
}, space);
|
234999
234999
|
|
235000
235000
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -235108,13 +235108,13 @@ var init_stateOverride = __esm(() => {
|
|
235108
235108
|
|
235109
235109
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/errors/transaction.js
|
235110
235110
|
function prettyPrint(args) {
|
235111
|
-
const entries = Object.entries(args).map(([
|
235111
|
+
const entries = Object.entries(args).map(([key2, value5]) => {
|
235112
235112
|
if (value5 === undefined || value5 === false)
|
235113
235113
|
return null;
|
235114
|
-
return [
|
235114
|
+
return [key2, value5];
|
235115
235115
|
}).filter(Boolean);
|
235116
|
-
const maxLength = entries.reduce((acc, [
|
235117
|
-
return entries.map(([
|
235116
|
+
const maxLength = entries.reduce((acc, [key2]) => Math.max(acc, key2.length), 0);
|
235117
|
+
return entries.map(([key2, value5]) => ` ${`${key2}:`.padEnd(maxLength + 1)} ${value5}`).join(`
|
235118
235118
|
`);
|
235119
235119
|
}
|
235120
235120
|
var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -236232,7 +236232,7 @@ var init_sha2 = __esm(() => {
|
|
236232
236232
|
});
|
236233
236233
|
|
236234
236234
|
// ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js
|
236235
|
-
var HMAC, hmac = (hash3,
|
236235
|
+
var HMAC, hmac = (hash3, key2, message) => new HMAC(hash3, key2).update(message).digest();
|
236236
236236
|
var init_hmac = __esm(() => {
|
236237
236237
|
init_utils2();
|
236238
236238
|
HMAC = class HMAC extends Hash {
|
@@ -236241,7 +236241,7 @@ var init_hmac = __esm(() => {
|
|
236241
236241
|
this.finished = false;
|
236242
236242
|
this.destroyed = false;
|
236243
236243
|
ahash(hash3);
|
236244
|
-
const
|
236244
|
+
const key2 = toBytes2(_key);
|
236245
236245
|
this.iHash = hash3.create();
|
236246
236246
|
if (typeof this.iHash.update !== "function")
|
236247
236247
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -236249,7 +236249,7 @@ var init_hmac = __esm(() => {
|
|
236249
236249
|
this.outputLen = this.iHash.outputLen;
|
236250
236250
|
const blockLen = this.blockLen;
|
236251
236251
|
const pad2 = new Uint8Array(blockLen);
|
236252
|
-
pad2.set(
|
236252
|
+
pad2.set(key2.length > blockLen ? hash3.create().update(key2).digest() : key2);
|
236253
236253
|
for (let i7 = 0;i7 < pad2.length; i7++)
|
236254
236254
|
pad2[i7] ^= 54;
|
236255
236255
|
this.iHash.update(pad2);
|
@@ -236299,7 +236299,7 @@ var init_hmac = __esm(() => {
|
|
236299
236299
|
this.iHash.destroy();
|
236300
236300
|
}
|
236301
236301
|
};
|
236302
|
-
hmac.create = (hash3,
|
236302
|
+
hmac.create = (hash3, key2) => new HMAC(hash3, key2);
|
236303
236303
|
});
|
236304
236304
|
|
236305
236305
|
// ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
|
@@ -236758,13 +236758,13 @@ function getMinHashLength(fieldOrder) {
|
|
236758
236758
|
const length = getFieldBytesLength(fieldOrder);
|
236759
236759
|
return length + Math.ceil(length / 2);
|
236760
236760
|
}
|
236761
|
-
function mapHashToField(
|
236762
|
-
const len =
|
236761
|
+
function mapHashToField(key2, fieldOrder, isLE2 = false) {
|
236762
|
+
const len = key2.length;
|
236763
236763
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
236764
236764
|
const minLen = getMinHashLength(fieldOrder);
|
236765
236765
|
if (len < 16 || len < minLen || len > 1024)
|
236766
236766
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
236767
|
-
const num = isLE2 ? bytesToNumberLE(
|
236767
|
+
const num = isLE2 ? bytesToNumberLE(key2) : bytesToNumberBE(key2);
|
236768
236768
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
236769
236769
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
236770
236770
|
}
|
@@ -237079,20 +237079,20 @@ function weierstrassPoints(opts) {
|
|
237079
237079
|
function isWithinCurveOrder(num) {
|
237080
237080
|
return inRange(num, _1n5, CURVE.n);
|
237081
237081
|
}
|
237082
|
-
function normPrivateKeyToScalar(
|
237082
|
+
function normPrivateKeyToScalar(key2) {
|
237083
237083
|
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N6 } = CURVE;
|
237084
|
-
if (lengths && typeof
|
237085
|
-
if (isBytes2(
|
237086
|
-
|
237087
|
-
if (typeof
|
237084
|
+
if (lengths && typeof key2 !== "bigint") {
|
237085
|
+
if (isBytes2(key2))
|
237086
|
+
key2 = bytesToHex2(key2);
|
237087
|
+
if (typeof key2 !== "string" || !lengths.includes(key2.length))
|
237088
237088
|
throw new Error("invalid private key");
|
237089
|
-
|
237089
|
+
key2 = key2.padStart(nByteLength * 2, "0");
|
237090
237090
|
}
|
237091
237091
|
let num;
|
237092
237092
|
try {
|
237093
|
-
num = typeof
|
237093
|
+
num = typeof key2 === "bigint" ? key2 : bytesToNumberBE(ensureBytes("private key", key2, nByteLength));
|
237094
237094
|
} catch (error48) {
|
237095
|
-
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof
|
237095
|
+
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof key2);
|
237096
237096
|
}
|
237097
237097
|
if (wrapPrivateKey)
|
237098
237098
|
num = mod(num, N6);
|
@@ -237926,7 +237926,7 @@ var init_weierstrass = __esm(() => {
|
|
237926
237926
|
function getHash(hash3) {
|
237927
237927
|
return {
|
237928
237928
|
hash: hash3,
|
237929
|
-
hmac: (
|
237929
|
+
hmac: (key2, ...msgs) => hmac(hash3, key2, concatBytes(...msgs)),
|
237930
237930
|
randomBytes
|
237931
237931
|
};
|
237932
237932
|
}
|
@@ -238552,11 +238552,11 @@ function extract2(value_, { format: format2 }) {
|
|
238552
238552
|
const value5 = {};
|
238553
238553
|
function extract_(formatted2) {
|
238554
238554
|
const keys = Object.keys(formatted2);
|
238555
|
-
for (const
|
238556
|
-
if (
|
238557
|
-
value5[
|
238558
|
-
if (formatted2[
|
238559
|
-
extract_(formatted2[
|
238555
|
+
for (const key2 of keys) {
|
238556
|
+
if (key2 in value_)
|
238557
|
+
value5[key2] = value_[key2];
|
238558
|
+
if (formatted2[key2] && typeof formatted2[key2] === "object" && !Array.isArray(formatted2[key2]))
|
238559
|
+
extract_(formatted2[key2]);
|
238560
238560
|
}
|
238561
238561
|
}
|
238562
238562
|
const formatted = format2(value_ || {});
|
@@ -238572,8 +238572,8 @@ function defineFormatter(type5, format2) {
|
|
238572
238572
|
format: (args) => {
|
238573
238573
|
const formatted = format2(args);
|
238574
238574
|
if (exclude) {
|
238575
|
-
for (const
|
238576
|
-
delete formatted[
|
238575
|
+
for (const key2 of exclude) {
|
238576
|
+
delete formatted[key2];
|
238577
238577
|
}
|
238578
238578
|
}
|
238579
238579
|
return {
|
@@ -239119,9 +239119,9 @@ var init_hex = __esm(() => {
|
|
239119
239119
|
|
239120
239120
|
// ../../node_modules/.bun/ox@0.9.3+50e9b7ffbf081acf/node_modules/ox/_esm/core/Json.js
|
239121
239121
|
function stringify4(value5, replacer, space) {
|
239122
|
-
return JSON.stringify(value5, (
|
239122
|
+
return JSON.stringify(value5, (key2, value6) => {
|
239123
239123
|
if (typeof replacer === "function")
|
239124
|
-
return replacer(
|
239124
|
+
return replacer(key2, value6);
|
239125
239125
|
if (typeof value6 === "bigint")
|
239126
239126
|
return value6.toString() + bigIntSuffix;
|
239127
239127
|
return value6;
|
@@ -267215,7 +267215,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
267215
267215
|
var package_default = {
|
267216
267216
|
name: "@settlemint/sdk-cli",
|
267217
267217
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
267218
|
-
version: "2.6.2-
|
267218
|
+
version: "2.6.2-prf7f629f7",
|
267219
267219
|
type: "module",
|
267220
267220
|
private: false,
|
267221
267221
|
license: "FSL-1.1-MIT",
|
@@ -267265,14 +267265,14 @@ var package_default = {
|
|
267265
267265
|
devDependencies: {
|
267266
267266
|
"@commander-js/extra-typings": "14.0.0",
|
267267
267267
|
commander: "14.0.1",
|
267268
|
-
"@inquirer/confirm": "5.1.
|
267269
|
-
"@inquirer/input": "4.2.
|
267268
|
+
"@inquirer/confirm": "5.1.17",
|
267269
|
+
"@inquirer/input": "4.2.2",
|
267270
267270
|
"@inquirer/password": "4.0.18",
|
267271
267271
|
"@inquirer/select": "4.3.2",
|
267272
|
-
"@settlemint/sdk-hasura": "2.6.2-
|
267273
|
-
"@settlemint/sdk-js": "2.6.2-
|
267274
|
-
"@settlemint/sdk-utils": "2.6.2-
|
267275
|
-
"@settlemint/sdk-viem": "2.6.2-
|
267272
|
+
"@settlemint/sdk-hasura": "2.6.2-prf7f629f7",
|
267273
|
+
"@settlemint/sdk-js": "2.6.2-prf7f629f7",
|
267274
|
+
"@settlemint/sdk-utils": "2.6.2-prf7f629f7",
|
267275
|
+
"@settlemint/sdk-viem": "2.6.2-prf7f629f7",
|
267276
267276
|
"@types/node": "24.4.0",
|
267277
267277
|
"@types/semver": "7.7.1",
|
267278
267278
|
"@types/which": "3.0.4",
|
@@ -267289,7 +267289,7 @@ var package_default = {
|
|
267289
267289
|
},
|
267290
267290
|
peerDependencies: {
|
267291
267291
|
hardhat: "<= 4",
|
267292
|
-
"@settlemint/sdk-js": "2.6.2-
|
267292
|
+
"@settlemint/sdk-js": "2.6.2-prf7f629f7"
|
267293
267293
|
},
|
267294
267294
|
peerDependenciesMeta: {
|
267295
267295
|
hardhat: {
|
@@ -273107,481 +273107,23 @@ function sanitizeName(value5, length = 35) {
|
|
273107
273107
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
273108
273108
|
}
|
273109
273109
|
|
273110
|
-
// ../../node_modules/.bun/@inquirer+
|
273111
|
-
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
273112
|
-
var isTabKey2 = (key2) => key2.name === "tab";
|
273113
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
273114
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
273115
|
-
class AbortPromptError2 extends Error {
|
273116
|
-
name = "AbortPromptError";
|
273117
|
-
message = "Prompt was aborted";
|
273118
|
-
constructor(options) {
|
273119
|
-
super();
|
273120
|
-
this.cause = options?.cause;
|
273121
|
-
}
|
273122
|
-
}
|
273123
|
-
|
273124
|
-
class CancelPromptError2 extends Error {
|
273125
|
-
name = "CancelPromptError";
|
273126
|
-
message = "Prompt was canceled";
|
273127
|
-
}
|
273128
|
-
|
273129
|
-
class ExitPromptError2 extends Error {
|
273130
|
-
name = "ExitPromptError";
|
273131
|
-
}
|
273132
|
-
|
273133
|
-
class HookError2 extends Error {
|
273134
|
-
name = "HookError";
|
273135
|
-
}
|
273136
|
-
|
273137
|
-
class ValidationError2 extends Error {
|
273138
|
-
name = "ValidationError";
|
273139
|
-
}
|
273140
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273141
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
273142
|
-
|
273143
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
273144
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
273145
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
273146
|
-
function createStore2(rl) {
|
273147
|
-
const store = {
|
273148
|
-
rl,
|
273149
|
-
hooks: [],
|
273150
|
-
hooksCleanup: [],
|
273151
|
-
hooksEffect: [],
|
273152
|
-
index: 0,
|
273153
|
-
handleChange() {}
|
273154
|
-
};
|
273155
|
-
return store;
|
273156
|
-
}
|
273157
|
-
function withHooks2(rl, cb) {
|
273158
|
-
const store = createStore2(rl);
|
273159
|
-
return hookStorage2.run(store, () => {
|
273160
|
-
function cycle(render) {
|
273161
|
-
store.handleChange = () => {
|
273162
|
-
store.index = 0;
|
273163
|
-
render();
|
273164
|
-
};
|
273165
|
-
store.handleChange();
|
273166
|
-
}
|
273167
|
-
return cb(cycle);
|
273168
|
-
});
|
273169
|
-
}
|
273170
|
-
function getStore2() {
|
273171
|
-
const store = hookStorage2.getStore();
|
273172
|
-
if (!store) {
|
273173
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
273174
|
-
}
|
273175
|
-
return store;
|
273176
|
-
}
|
273177
|
-
function readline3() {
|
273178
|
-
return getStore2().rl;
|
273179
|
-
}
|
273180
|
-
function withUpdates2(fn) {
|
273181
|
-
const wrapped = (...args) => {
|
273182
|
-
const store = getStore2();
|
273183
|
-
let shouldUpdate = false;
|
273184
|
-
const oldHandleChange = store.handleChange;
|
273185
|
-
store.handleChange = () => {
|
273186
|
-
shouldUpdate = true;
|
273187
|
-
};
|
273188
|
-
const returnValue = fn(...args);
|
273189
|
-
if (shouldUpdate) {
|
273190
|
-
oldHandleChange();
|
273191
|
-
}
|
273192
|
-
store.handleChange = oldHandleChange;
|
273193
|
-
return returnValue;
|
273194
|
-
};
|
273195
|
-
return AsyncResource4.bind(wrapped);
|
273196
|
-
}
|
273197
|
-
function withPointer2(cb) {
|
273198
|
-
const store = getStore2();
|
273199
|
-
const { index } = store;
|
273200
|
-
const pointer = {
|
273201
|
-
get() {
|
273202
|
-
return store.hooks[index];
|
273203
|
-
},
|
273204
|
-
set(value5) {
|
273205
|
-
store.hooks[index] = value5;
|
273206
|
-
},
|
273207
|
-
initialized: index in store.hooks
|
273208
|
-
};
|
273209
|
-
const returnValue = cb(pointer);
|
273210
|
-
store.index++;
|
273211
|
-
return returnValue;
|
273212
|
-
}
|
273213
|
-
function handleChange2() {
|
273214
|
-
getStore2().handleChange();
|
273215
|
-
}
|
273216
|
-
var effectScheduler2 = {
|
273217
|
-
queue(cb) {
|
273218
|
-
const store = getStore2();
|
273219
|
-
const { index } = store;
|
273220
|
-
store.hooksEffect.push(() => {
|
273221
|
-
store.hooksCleanup[index]?.();
|
273222
|
-
const cleanFn = cb(readline3());
|
273223
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
273224
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
273225
|
-
}
|
273226
|
-
store.hooksCleanup[index] = cleanFn;
|
273227
|
-
});
|
273228
|
-
},
|
273229
|
-
run() {
|
273230
|
-
const store = getStore2();
|
273231
|
-
withUpdates2(() => {
|
273232
|
-
store.hooksEffect.forEach((effect) => {
|
273233
|
-
effect();
|
273234
|
-
});
|
273235
|
-
store.hooksEffect.length = 0;
|
273236
|
-
})();
|
273237
|
-
},
|
273238
|
-
clearAll() {
|
273239
|
-
const store = getStore2();
|
273240
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
273241
|
-
cleanFn?.();
|
273242
|
-
});
|
273243
|
-
store.hooksEffect.length = 0;
|
273244
|
-
store.hooksCleanup.length = 0;
|
273245
|
-
}
|
273246
|
-
};
|
273247
|
-
|
273248
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273249
|
-
function useState2(defaultValue) {
|
273250
|
-
return withPointer2((pointer) => {
|
273251
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
273252
|
-
if (pointer.get() !== newValue) {
|
273253
|
-
pointer.set(newValue);
|
273254
|
-
handleChange2();
|
273255
|
-
}
|
273256
|
-
});
|
273257
|
-
if (pointer.initialized) {
|
273258
|
-
return [pointer.get(), setState];
|
273259
|
-
}
|
273260
|
-
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
273261
|
-
pointer.set(value5);
|
273262
|
-
return [value5, setState];
|
273263
|
-
});
|
273264
|
-
}
|
273265
|
-
|
273266
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
273267
|
-
function useEffect2(cb, depArray) {
|
273268
|
-
withPointer2((pointer) => {
|
273269
|
-
const oldDeps = pointer.get();
|
273270
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
273271
|
-
if (hasChanged) {
|
273272
|
-
effectScheduler2.queue(cb);
|
273273
|
-
}
|
273274
|
-
pointer.set(depArray);
|
273275
|
-
});
|
273276
|
-
}
|
273277
|
-
|
273278
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
273279
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
273280
|
-
var defaultTheme2 = {
|
273281
|
-
prefix: {
|
273282
|
-
idle: import_yoctocolors_cjs3.default.blue("?"),
|
273283
|
-
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
273284
|
-
},
|
273285
|
-
spinner: {
|
273286
|
-
interval: 80,
|
273287
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
273288
|
-
},
|
273289
|
-
style: {
|
273290
|
-
answer: import_yoctocolors_cjs3.default.cyan,
|
273291
|
-
message: import_yoctocolors_cjs3.default.bold,
|
273292
|
-
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
273293
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
273294
|
-
help: import_yoctocolors_cjs3.default.dim,
|
273295
|
-
highlight: import_yoctocolors_cjs3.default.cyan,
|
273296
|
-
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
273297
|
-
}
|
273298
|
-
};
|
273299
|
-
|
273300
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
273301
|
-
function isPlainObject4(value5) {
|
273302
|
-
if (typeof value5 !== "object" || value5 === null)
|
273303
|
-
return false;
|
273304
|
-
let proto = value5;
|
273305
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
273306
|
-
proto = Object.getPrototypeOf(proto);
|
273307
|
-
}
|
273308
|
-
return Object.getPrototypeOf(value5) === proto;
|
273309
|
-
}
|
273310
|
-
function deepMerge3(...objects) {
|
273311
|
-
const output = {};
|
273312
|
-
for (const obj of objects) {
|
273313
|
-
for (const [key2, value5] of Object.entries(obj)) {
|
273314
|
-
const prevValue = output[key2];
|
273315
|
-
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
|
273316
|
-
}
|
273317
|
-
}
|
273318
|
-
return output;
|
273319
|
-
}
|
273320
|
-
function makeTheme2(...themes) {
|
273321
|
-
const themesToMerge = [
|
273322
|
-
defaultTheme2,
|
273323
|
-
...themes.filter((theme) => theme != null)
|
273324
|
-
];
|
273325
|
-
return deepMerge3(...themesToMerge);
|
273326
|
-
}
|
273327
|
-
|
273328
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
273329
|
-
function usePrefix2({ status = "idle", theme }) {
|
273330
|
-
const [showLoader, setShowLoader] = useState2(false);
|
273331
|
-
const [tick, setTick] = useState2(0);
|
273332
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
273333
|
-
useEffect2(() => {
|
273334
|
-
if (status === "loading") {
|
273335
|
-
let tickInterval;
|
273336
|
-
let inc = -1;
|
273337
|
-
const delayTimeout = setTimeout(() => {
|
273338
|
-
setShowLoader(true);
|
273339
|
-
tickInterval = setInterval(() => {
|
273340
|
-
inc = inc + 1;
|
273341
|
-
setTick(inc % spinner2.frames.length);
|
273342
|
-
}, spinner2.interval);
|
273343
|
-
}, 300);
|
273344
|
-
return () => {
|
273345
|
-
clearTimeout(delayTimeout);
|
273346
|
-
clearInterval(tickInterval);
|
273347
|
-
};
|
273348
|
-
} else {
|
273349
|
-
setShowLoader(false);
|
273350
|
-
}
|
273351
|
-
}, [status]);
|
273352
|
-
if (showLoader) {
|
273353
|
-
return spinner2.frames[tick];
|
273354
|
-
}
|
273355
|
-
const iconName = status === "loading" ? "idle" : status;
|
273356
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
273357
|
-
}
|
273358
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
273359
|
-
function useRef2(val) {
|
273360
|
-
return useState2({ current: val })[0];
|
273361
|
-
}
|
273362
|
-
|
273363
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
273364
|
-
function useKeypress2(userHandler) {
|
273365
|
-
const signal = useRef2(userHandler);
|
273366
|
-
signal.current = userHandler;
|
273367
|
-
useEffect2((rl) => {
|
273368
|
-
let ignore = false;
|
273369
|
-
const handler = withUpdates2((_input, event) => {
|
273370
|
-
if (ignore)
|
273371
|
-
return;
|
273372
|
-
signal.current(event, rl);
|
273373
|
-
});
|
273374
|
-
rl.input.on("keypress", handler);
|
273375
|
-
return () => {
|
273376
|
-
ignore = true;
|
273377
|
-
rl.input.removeListener("keypress", handler);
|
273378
|
-
};
|
273379
|
-
}, []);
|
273380
|
-
}
|
273381
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
273382
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
273383
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
273384
|
-
function breakLines2(content, width) {
|
273385
|
-
return content.split(`
|
273386
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
273387
|
-
`).map((str) => str.trimEnd())).join(`
|
273388
|
-
`);
|
273389
|
-
}
|
273390
|
-
function readlineWidth2() {
|
273391
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
273392
|
-
}
|
273393
|
-
|
273394
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273395
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
273396
|
-
import * as readline4 from "node:readline";
|
273397
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
273398
|
-
|
273399
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
273400
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
273401
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
273402
|
-
var height2 = (content) => content.split(`
|
273403
|
-
`).length;
|
273404
|
-
var lastLine2 = (content) => content.split(`
|
273405
|
-
`).pop() ?? "";
|
273406
|
-
function cursorDown2(n7) {
|
273407
|
-
return n7 > 0 ? import_ansi_escapes2.default.cursorDown(n7) : "";
|
273408
|
-
}
|
273409
|
-
|
273410
|
-
class ScreenManager2 {
|
273411
|
-
height = 0;
|
273412
|
-
extraLinesUnderPrompt = 0;
|
273413
|
-
cursorPos;
|
273414
|
-
rl;
|
273415
|
-
constructor(rl) {
|
273416
|
-
this.rl = rl;
|
273417
|
-
this.cursorPos = rl.getCursorPos();
|
273418
|
-
}
|
273419
|
-
write(content) {
|
273420
|
-
this.rl.output.unmute();
|
273421
|
-
this.rl.output.write(content);
|
273422
|
-
this.rl.output.mute();
|
273423
|
-
}
|
273424
|
-
render(content, bottomContent = "") {
|
273425
|
-
const promptLine = lastLine2(content);
|
273426
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
273427
|
-
let prompt = rawPromptLine;
|
273428
|
-
if (this.rl.line.length > 0) {
|
273429
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
273430
|
-
}
|
273431
|
-
this.rl.setPrompt(prompt);
|
273432
|
-
this.cursorPos = this.rl.getCursorPos();
|
273433
|
-
const width = readlineWidth2();
|
273434
|
-
content = breakLines2(content, width);
|
273435
|
-
bottomContent = breakLines2(bottomContent, width);
|
273436
|
-
if (rawPromptLine.length % width === 0) {
|
273437
|
-
content += `
|
273438
|
-
`;
|
273439
|
-
}
|
273440
|
-
let output = content + (bottomContent ? `
|
273441
|
-
` + bottomContent : "");
|
273442
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
273443
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
273444
|
-
if (bottomContentHeight > 0)
|
273445
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
273446
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
273447
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
273448
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
273449
|
-
this.height = height2(output);
|
273450
|
-
}
|
273451
|
-
checkCursorPos() {
|
273452
|
-
const cursorPos = this.rl.getCursorPos();
|
273453
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
273454
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
273455
|
-
this.cursorPos = cursorPos;
|
273456
|
-
}
|
273457
|
-
}
|
273458
|
-
done({ clearContent }) {
|
273459
|
-
this.rl.setPrompt("");
|
273460
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
273461
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
273462
|
-
`;
|
273463
|
-
output += import_ansi_escapes2.default.cursorShow;
|
273464
|
-
this.write(output);
|
273465
|
-
this.rl.close();
|
273466
|
-
}
|
273467
|
-
}
|
273468
|
-
|
273469
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
273470
|
-
class PromisePolyfill2 extends Promise {
|
273471
|
-
static withResolver() {
|
273472
|
-
let resolve6;
|
273473
|
-
let reject;
|
273474
|
-
const promise2 = new Promise((res, rej) => {
|
273475
|
-
resolve6 = res;
|
273476
|
-
reject = rej;
|
273477
|
-
});
|
273478
|
-
return { promise: promise2, resolve: resolve6, reject };
|
273479
|
-
}
|
273480
|
-
}
|
273481
|
-
|
273482
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273483
|
-
function getCallSites2() {
|
273484
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
273485
|
-
let result = [];
|
273486
|
-
try {
|
273487
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
273488
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
273489
|
-
result = callSitesWithoutCurrent;
|
273490
|
-
return callSitesWithoutCurrent;
|
273491
|
-
};
|
273492
|
-
new Error().stack;
|
273493
|
-
} catch {
|
273494
|
-
return result;
|
273495
|
-
}
|
273496
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
273497
|
-
return result;
|
273498
|
-
}
|
273499
|
-
function createPrompt2(view) {
|
273500
|
-
const callSites = getCallSites2();
|
273501
|
-
const prompt = (config3, context = {}) => {
|
273502
|
-
const { input = process.stdin, signal } = context;
|
273503
|
-
const cleanups = new Set;
|
273504
|
-
const output = new import_mute_stream2.default;
|
273505
|
-
output.pipe(context.output ?? process.stdout);
|
273506
|
-
const rl = readline4.createInterface({
|
273507
|
-
terminal: true,
|
273508
|
-
input,
|
273509
|
-
output
|
273510
|
-
});
|
273511
|
-
const screen = new ScreenManager2(rl);
|
273512
|
-
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
273513
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
273514
|
-
if (signal) {
|
273515
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
273516
|
-
if (signal.aborted) {
|
273517
|
-
abort();
|
273518
|
-
return Object.assign(promise2, { cancel: cancel3 });
|
273519
|
-
}
|
273520
|
-
signal.addEventListener("abort", abort);
|
273521
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
273522
|
-
}
|
273523
|
-
cleanups.add(onExit((code2, signal2) => {
|
273524
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
273525
|
-
}));
|
273526
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
273527
|
-
rl.on("SIGINT", sigint);
|
273528
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
273529
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
273530
|
-
rl.input.on("keypress", checkCursorPos);
|
273531
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
273532
|
-
return withHooks2(rl, (cycle) => {
|
273533
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
273534
|
-
rl.on("close", hooksCleanup);
|
273535
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
273536
|
-
cycle(() => {
|
273537
|
-
try {
|
273538
|
-
const nextView = view(config3, (value5) => {
|
273539
|
-
setImmediate(() => resolve6(value5));
|
273540
|
-
});
|
273541
|
-
if (nextView === undefined) {
|
273542
|
-
const callerFilename = callSites[1]?.getFileName();
|
273543
|
-
throw new Error(`Prompt functions must return a string.
|
273544
|
-
at ${callerFilename}`);
|
273545
|
-
}
|
273546
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
273547
|
-
screen.render(content, bottomContent);
|
273548
|
-
effectScheduler2.run();
|
273549
|
-
} catch (error48) {
|
273550
|
-
reject(error48);
|
273551
|
-
}
|
273552
|
-
});
|
273553
|
-
return Object.assign(promise2.then((answer) => {
|
273554
|
-
effectScheduler2.clearAll();
|
273555
|
-
return answer;
|
273556
|
-
}, (error48) => {
|
273557
|
-
effectScheduler2.clearAll();
|
273558
|
-
throw error48;
|
273559
|
-
}).finally(() => {
|
273560
|
-
cleanups.forEach((cleanup) => cleanup());
|
273561
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
273562
|
-
output.end();
|
273563
|
-
}).then(() => promise2), { cancel: cancel3 });
|
273564
|
-
});
|
273565
|
-
};
|
273566
|
-
return prompt;
|
273567
|
-
}
|
273568
|
-
// ../../node_modules/.bun/@inquirer+input@4.2.3+e9dc26b4af2fda18/node_modules/@inquirer/input/dist/esm/index.js
|
273110
|
+
// ../../node_modules/.bun/@inquirer+input@4.2.2+e9dc26b4af2fda18/node_modules/@inquirer/input/dist/esm/index.js
|
273569
273111
|
var inputTheme = {
|
273570
273112
|
validationFailureMode: "keep"
|
273571
273113
|
};
|
273572
|
-
var esm_default2 =
|
273114
|
+
var esm_default2 = createPrompt((config3, done) => {
|
273573
273115
|
const { required: required2, validate: validate3 = () => true, prefill = "tab" } = config3;
|
273574
|
-
const theme =
|
273575
|
-
const [status, setStatus] =
|
273576
|
-
const [defaultValue = "", setDefaultValue] =
|
273577
|
-
const [errorMsg, setError] =
|
273578
|
-
const [value5, setValue] =
|
273579
|
-
const prefix =
|
273580
|
-
|
273116
|
+
const theme = makeTheme(inputTheme, config3.theme);
|
273117
|
+
const [status, setStatus] = useState("idle");
|
273118
|
+
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
273119
|
+
const [errorMsg, setError] = useState();
|
273120
|
+
const [value5, setValue] = useState("");
|
273121
|
+
const prefix = usePrefix({ status, theme });
|
273122
|
+
useKeypress(async (key2, rl) => {
|
273581
273123
|
if (status !== "idle") {
|
273582
273124
|
return;
|
273583
273125
|
}
|
273584
|
-
if (
|
273126
|
+
if (isEnterKey(key2)) {
|
273585
273127
|
const answer = value5 || defaultValue;
|
273586
273128
|
setStatus("loading");
|
273587
273129
|
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -273598,9 +273140,9 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
273598
273140
|
setError(isValid || "You must provide a valid value");
|
273599
273141
|
setStatus("idle");
|
273600
273142
|
}
|
273601
|
-
} else if (
|
273143
|
+
} else if (isBackspaceKey(key2) && !value5) {
|
273602
273144
|
setDefaultValue(undefined);
|
273603
|
-
} else if (
|
273145
|
+
} else if (isTabKey(key2) && !value5) {
|
273604
273146
|
setDefaultValue(undefined);
|
273605
273147
|
rl.clearLine(0);
|
273606
273148
|
rl.write(defaultValue);
|
@@ -273610,7 +273152,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
273610
273152
|
setError(undefined);
|
273611
273153
|
}
|
273612
273154
|
});
|
273613
|
-
|
273155
|
+
useEffect((rl) => {
|
273614
273156
|
if (prefill === "editable" && defaultValue) {
|
273615
273157
|
rl.write(defaultValue);
|
273616
273158
|
setValue(defaultValue);
|
@@ -273656,13 +273198,13 @@ async function subgraphNamePrompt({
|
|
273656
273198
|
}
|
273657
273199
|
|
273658
273200
|
// ../../node_modules/.bun/@inquirer+select@4.3.2+e9dc26b4af2fda18/node_modules/@inquirer/select/dist/esm/index.js
|
273659
|
-
var
|
273660
|
-
var
|
273201
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
273202
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
273661
273203
|
var selectTheme = {
|
273662
273204
|
icon: { cursor: esm_default.pointer },
|
273663
273205
|
style: {
|
273664
|
-
disabled: (text2) =>
|
273665
|
-
description: (text2) =>
|
273206
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
273207
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
273666
273208
|
},
|
273667
273209
|
helpMode: "auto",
|
273668
273210
|
indexMode: "hidden"
|
@@ -273718,22 +273260,22 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
273718
273260
|
}, [config3.default, items]);
|
273719
273261
|
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
273720
273262
|
const selectedChoice = items[active];
|
273721
|
-
useKeypress((
|
273263
|
+
useKeypress((key2, rl) => {
|
273722
273264
|
clearTimeout(searchTimeoutRef.current);
|
273723
|
-
if (isEnterKey(
|
273265
|
+
if (isEnterKey(key2)) {
|
273724
273266
|
setStatus("done");
|
273725
273267
|
done(selectedChoice.value);
|
273726
|
-
} else if (isUpKey(
|
273268
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
273727
273269
|
rl.clearLine(0);
|
273728
|
-
if (loop || isUpKey(
|
273729
|
-
const offset = isUpKey(
|
273270
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
273271
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
273730
273272
|
let next = active;
|
273731
273273
|
do {
|
273732
273274
|
next = (next + offset + items.length) % items.length;
|
273733
273275
|
} while (!isSelectable(items[next]));
|
273734
273276
|
setActive(next);
|
273735
273277
|
}
|
273736
|
-
} else if (isNumberKey(
|
273278
|
+
} else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
|
273737
273279
|
const selectedIndex = Number(rl.line) - 1;
|
273738
273280
|
let selectableIndex = -1;
|
273739
273281
|
const position = items.findIndex((item2) => {
|
@@ -273749,7 +273291,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
273749
273291
|
searchTimeoutRef.current = setTimeout(() => {
|
273750
273292
|
rl.clearLine(0);
|
273751
273293
|
}, 700);
|
273752
|
-
} else if (isBackspaceKey(
|
273294
|
+
} else if (isBackspaceKey(key2)) {
|
273753
273295
|
rl.clearLine(0);
|
273754
273296
|
} else {
|
273755
273297
|
const searchTerm = rl.line.toLowerCase();
|
@@ -273808,7 +273350,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
273808
273350
|
const choiceDescription = selectedChoice.description ? `
|
273809
273351
|
${theme.style.description(selectedChoice.description)}` : ``;
|
273810
273352
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
273811
|
-
${page}${helpTipBottom}${choiceDescription}${
|
273353
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
|
273812
273354
|
});
|
273813
273355
|
|
273814
273356
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -275453,14 +274995,14 @@ function includesArgs(parameters) {
|
|
275453
274995
|
});
|
275454
274996
|
}
|
275455
274997
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
275456
|
-
return Object.entries(matchArgs).every(([
|
274998
|
+
return Object.entries(matchArgs).every(([key2, value5]) => {
|
275457
274999
|
if (value5 === null || value5 === undefined)
|
275458
275000
|
return true;
|
275459
|
-
const input = inputs.find((input2) => input2.name ===
|
275001
|
+
const input = inputs.find((input2) => input2.name === key2);
|
275460
275002
|
if (!input)
|
275461
275003
|
return false;
|
275462
275004
|
const value_ = Array.isArray(value5) ? value5 : [value5];
|
275463
|
-
return value_.some((value6) => isEqual(input, value6, args[
|
275005
|
+
return value_.some((value6) => isEqual(input, value6, args[key2]));
|
275464
275006
|
});
|
275465
275007
|
return false;
|
275466
275008
|
}
|
@@ -275659,13 +275201,13 @@ function observe(observerId, callbacks, fn) {
|
|
275659
275201
|
if (listeners && listeners.length > 0)
|
275660
275202
|
return unwatch;
|
275661
275203
|
const emit = {};
|
275662
|
-
for (const
|
275663
|
-
emit[
|
275204
|
+
for (const key2 in callbacks) {
|
275205
|
+
emit[key2] = (...args) => {
|
275664
275206
|
const listeners2 = getListeners();
|
275665
275207
|
if (listeners2.length === 0)
|
275666
275208
|
return;
|
275667
275209
|
for (const listener of listeners2)
|
275668
|
-
listener.fns[
|
275210
|
+
listener.fns[key2]?.(...args);
|
275669
275211
|
};
|
275670
275212
|
}
|
275671
275213
|
const cleanup = fn(emit);
|
@@ -276045,7 +275587,7 @@ function uid(length = 11) {
|
|
276045
275587
|
|
276046
275588
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/createClient.js
|
276047
275589
|
function createClient(parameters) {
|
276048
|
-
const { batch, chain, ccipRead, key:
|
275590
|
+
const { batch, chain, ccipRead, key: key2 = "base", name: name4 = "Base Client", type: type5 = "base" } = parameters;
|
276049
275591
|
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
276050
275592
|
const blockTime = chain?.blockTime ?? 12000;
|
276051
275593
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
@@ -276063,7 +275605,7 @@ function createClient(parameters) {
|
|
276063
275605
|
cacheTime,
|
276064
275606
|
ccipRead,
|
276065
275607
|
chain,
|
276066
|
-
key:
|
275608
|
+
key: key2,
|
276067
275609
|
name: name4,
|
276068
275610
|
pollingInterval,
|
276069
275611
|
request: request2,
|
@@ -276075,8 +275617,8 @@ function createClient(parameters) {
|
|
276075
275617
|
function extend2(base2) {
|
276076
275618
|
return (extendFn) => {
|
276077
275619
|
const extended = extendFn(base2);
|
276078
|
-
for (const
|
276079
|
-
delete extended[
|
275620
|
+
for (const key3 in client)
|
275621
|
+
delete extended[key3];
|
276080
275622
|
const combined = { ...base2, ...extended };
|
276081
275623
|
return Object.assign(combined, { extend: extend2(combined) });
|
276082
275624
|
};
|
@@ -276495,7 +276037,7 @@ init_getChainContractAddress();
|
|
276495
276037
|
init_toHex();
|
276496
276038
|
init_localBatchGatewayRequest();
|
276497
276039
|
async function getEnsText(client, parameters) {
|
276498
|
-
const { blockNumber, blockTag, key:
|
276040
|
+
const { blockNumber, blockTag, key: key2, name: name4, gatewayUrls, strict } = parameters;
|
276499
276041
|
const { chain } = client;
|
276500
276042
|
const universalResolverAddress = (() => {
|
276501
276043
|
if (parameters.universalResolverAddress)
|
@@ -276520,7 +276062,7 @@ async function getEnsText(client, parameters) {
|
|
276520
276062
|
encodeFunctionData({
|
276521
276063
|
abi: textResolverAbi,
|
276522
276064
|
functionName: "text",
|
276523
|
-
args: [namehash(name4),
|
276065
|
+
args: [namehash(name4), key2]
|
276524
276066
|
}),
|
276525
276067
|
gatewayUrls ?? [localBatchGatewayUrl]
|
276526
276068
|
],
|
@@ -278589,16 +278131,16 @@ class LruMap2 extends Map {
|
|
278589
278131
|
});
|
278590
278132
|
this.maxSize = size5;
|
278591
278133
|
}
|
278592
|
-
get(
|
278593
|
-
const value5 = super.get(
|
278594
|
-
if (super.has(
|
278595
|
-
this.delete(
|
278596
|
-
super.set(
|
278134
|
+
get(key2) {
|
278135
|
+
const value5 = super.get(key2);
|
278136
|
+
if (super.has(key2) && value5 !== undefined) {
|
278137
|
+
this.delete(key2);
|
278138
|
+
super.set(key2, value5);
|
278597
278139
|
}
|
278598
278140
|
return value5;
|
278599
278141
|
}
|
278600
|
-
set(
|
278601
|
-
super.set(
|
278142
|
+
set(key2, value5) {
|
278143
|
+
super.set(key2, value5);
|
278602
278144
|
if (this.maxSize && this.size > this.maxSize) {
|
278603
278145
|
const firstKey = this.keys().next().value;
|
278604
278146
|
if (firstKey)
|
@@ -282047,21 +281589,21 @@ function publicActions(client) {
|
|
282047
281589
|
|
282048
281590
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/createPublicClient.js
|
282049
281591
|
function createPublicClient(parameters) {
|
282050
|
-
const { key:
|
281592
|
+
const { key: key2 = "public", name: name4 = "Public Client" } = parameters;
|
282051
281593
|
const client = createClient({
|
282052
281594
|
...parameters,
|
282053
|
-
key:
|
281595
|
+
key: key2,
|
282054
281596
|
name: name4,
|
282055
281597
|
type: "publicClient"
|
282056
281598
|
});
|
282057
281599
|
return client.extend(publicActions);
|
282058
281600
|
}
|
282059
281601
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/transports/createTransport.js
|
282060
|
-
function createTransport({ key:
|
281602
|
+
function createTransport({ key: key2, methods, name: name4, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type5 }, value5) {
|
282061
281603
|
const uid2 = uid();
|
282062
281604
|
return {
|
282063
281605
|
config: {
|
282064
|
-
key:
|
281606
|
+
key: key2,
|
282065
281607
|
methods,
|
282066
281608
|
name: name4,
|
282067
281609
|
request: request2,
|
@@ -282093,7 +281635,7 @@ class UrlRequiredError extends BaseError2 {
|
|
282093
281635
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/transports/http.js
|
282094
281636
|
init_createBatchScheduler();
|
282095
281637
|
function http(url2, config3 = {}) {
|
282096
|
-
const { batch, fetchFn, fetchOptions, key:
|
281638
|
+
const { batch, fetchFn, fetchOptions, key: key2 = "http", methods, name: name4 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config3;
|
282097
281639
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
282098
281640
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
282099
281641
|
const retryCount = config3.retryCount ?? retryCount_;
|
@@ -282109,7 +281651,7 @@ function http(url2, config3 = {}) {
|
|
282109
281651
|
timeout
|
282110
281652
|
});
|
282111
281653
|
return createTransport({
|
282112
|
-
key:
|
281654
|
+
key: key2,
|
282113
281655
|
methods,
|
282114
281656
|
name: name4,
|
282115
281657
|
async request({ method, params }) {
|
@@ -299057,23 +298599,23 @@ var LRUCache3 = class {
|
|
299057
298599
|
constructor(maxSize) {
|
299058
298600
|
this.maxSize = maxSize;
|
299059
298601
|
}
|
299060
|
-
get(
|
299061
|
-
const value5 = this.cache.get(
|
298602
|
+
get(key2) {
|
298603
|
+
const value5 = this.cache.get(key2);
|
299062
298604
|
if (value5 !== undefined) {
|
299063
|
-
this.cache.delete(
|
299064
|
-
this.cache.set(
|
298605
|
+
this.cache.delete(key2);
|
298606
|
+
this.cache.set(key2, value5);
|
299065
298607
|
}
|
299066
298608
|
return value5;
|
299067
298609
|
}
|
299068
|
-
set(
|
299069
|
-
this.cache.delete(
|
298610
|
+
set(key2, value5) {
|
298611
|
+
this.cache.delete(key2);
|
299070
298612
|
if (this.cache.size >= this.maxSize) {
|
299071
298613
|
const firstKey = this.cache.keys().next().value;
|
299072
298614
|
if (firstKey !== undefined) {
|
299073
298615
|
this.cache.delete(firstKey);
|
299074
298616
|
}
|
299075
298617
|
}
|
299076
|
-
this.cache.set(
|
298618
|
+
this.cache.set(key2, value5);
|
299077
298619
|
}
|
299078
298620
|
clear() {
|
299079
298621
|
this.cache.clear();
|
@@ -299084,9 +298626,9 @@ var publicClientCache = new LRUCache3(50);
|
|
299084
298626
|
var walletClientFactoryCache = new LRUCache3(50);
|
299085
298627
|
function buildHeaders(baseHeaders, authHeaders) {
|
299086
298628
|
const filteredHeaders = {};
|
299087
|
-
for (const [
|
298629
|
+
for (const [key2, value5] of Object.entries(authHeaders)) {
|
299088
298630
|
if (value5 !== undefined) {
|
299089
|
-
filteredHeaders[
|
298631
|
+
filteredHeaders[key2] = value5;
|
299090
298632
|
}
|
299091
298633
|
}
|
299092
298634
|
return appendHeaders(baseHeaders, filteredHeaders);
|
@@ -299394,7 +298936,464 @@ function extractInfoFromBody(body) {
|
|
299394
298936
|
}
|
299395
298937
|
}
|
299396
298938
|
|
299397
|
-
// ../../node_modules/.bun/@inquirer+
|
298939
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
298940
|
+
var isTabKey2 = (key2) => key2.name === "tab";
|
298941
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
298942
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
298943
|
+
class AbortPromptError2 extends Error {
|
298944
|
+
name = "AbortPromptError";
|
298945
|
+
message = "Prompt was aborted";
|
298946
|
+
constructor(options) {
|
298947
|
+
super();
|
298948
|
+
this.cause = options?.cause;
|
298949
|
+
}
|
298950
|
+
}
|
298951
|
+
|
298952
|
+
class CancelPromptError2 extends Error {
|
298953
|
+
name = "CancelPromptError";
|
298954
|
+
message = "Prompt was canceled";
|
298955
|
+
}
|
298956
|
+
|
298957
|
+
class ExitPromptError2 extends Error {
|
298958
|
+
name = "ExitPromptError";
|
298959
|
+
}
|
298960
|
+
|
298961
|
+
class HookError2 extends Error {
|
298962
|
+
name = "HookError";
|
298963
|
+
}
|
298964
|
+
|
298965
|
+
class ValidationError2 extends Error {
|
298966
|
+
name = "ValidationError";
|
298967
|
+
}
|
298968
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
298969
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
298970
|
+
|
298971
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
298972
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
298973
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
298974
|
+
function createStore2(rl) {
|
298975
|
+
const store = {
|
298976
|
+
rl,
|
298977
|
+
hooks: [],
|
298978
|
+
hooksCleanup: [],
|
298979
|
+
hooksEffect: [],
|
298980
|
+
index: 0,
|
298981
|
+
handleChange() {}
|
298982
|
+
};
|
298983
|
+
return store;
|
298984
|
+
}
|
298985
|
+
function withHooks2(rl, cb) {
|
298986
|
+
const store = createStore2(rl);
|
298987
|
+
return hookStorage2.run(store, () => {
|
298988
|
+
function cycle(render) {
|
298989
|
+
store.handleChange = () => {
|
298990
|
+
store.index = 0;
|
298991
|
+
render();
|
298992
|
+
};
|
298993
|
+
store.handleChange();
|
298994
|
+
}
|
298995
|
+
return cb(cycle);
|
298996
|
+
});
|
298997
|
+
}
|
298998
|
+
function getStore2() {
|
298999
|
+
const store = hookStorage2.getStore();
|
299000
|
+
if (!store) {
|
299001
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
299002
|
+
}
|
299003
|
+
return store;
|
299004
|
+
}
|
299005
|
+
function readline3() {
|
299006
|
+
return getStore2().rl;
|
299007
|
+
}
|
299008
|
+
function withUpdates2(fn) {
|
299009
|
+
const wrapped = (...args) => {
|
299010
|
+
const store = getStore2();
|
299011
|
+
let shouldUpdate = false;
|
299012
|
+
const oldHandleChange = store.handleChange;
|
299013
|
+
store.handleChange = () => {
|
299014
|
+
shouldUpdate = true;
|
299015
|
+
};
|
299016
|
+
const returnValue = fn(...args);
|
299017
|
+
if (shouldUpdate) {
|
299018
|
+
oldHandleChange();
|
299019
|
+
}
|
299020
|
+
store.handleChange = oldHandleChange;
|
299021
|
+
return returnValue;
|
299022
|
+
};
|
299023
|
+
return AsyncResource4.bind(wrapped);
|
299024
|
+
}
|
299025
|
+
function withPointer2(cb) {
|
299026
|
+
const store = getStore2();
|
299027
|
+
const { index: index2 } = store;
|
299028
|
+
const pointer = {
|
299029
|
+
get() {
|
299030
|
+
return store.hooks[index2];
|
299031
|
+
},
|
299032
|
+
set(value5) {
|
299033
|
+
store.hooks[index2] = value5;
|
299034
|
+
},
|
299035
|
+
initialized: index2 in store.hooks
|
299036
|
+
};
|
299037
|
+
const returnValue = cb(pointer);
|
299038
|
+
store.index++;
|
299039
|
+
return returnValue;
|
299040
|
+
}
|
299041
|
+
function handleChange2() {
|
299042
|
+
getStore2().handleChange();
|
299043
|
+
}
|
299044
|
+
var effectScheduler2 = {
|
299045
|
+
queue(cb) {
|
299046
|
+
const store = getStore2();
|
299047
|
+
const { index: index2 } = store;
|
299048
|
+
store.hooksEffect.push(() => {
|
299049
|
+
store.hooksCleanup[index2]?.();
|
299050
|
+
const cleanFn = cb(readline3());
|
299051
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
299052
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
299053
|
+
}
|
299054
|
+
store.hooksCleanup[index2] = cleanFn;
|
299055
|
+
});
|
299056
|
+
},
|
299057
|
+
run() {
|
299058
|
+
const store = getStore2();
|
299059
|
+
withUpdates2(() => {
|
299060
|
+
store.hooksEffect.forEach((effect) => {
|
299061
|
+
effect();
|
299062
|
+
});
|
299063
|
+
store.hooksEffect.length = 0;
|
299064
|
+
})();
|
299065
|
+
},
|
299066
|
+
clearAll() {
|
299067
|
+
const store = getStore2();
|
299068
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
299069
|
+
cleanFn?.();
|
299070
|
+
});
|
299071
|
+
store.hooksEffect.length = 0;
|
299072
|
+
store.hooksCleanup.length = 0;
|
299073
|
+
}
|
299074
|
+
};
|
299075
|
+
|
299076
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299077
|
+
function useState2(defaultValue) {
|
299078
|
+
return withPointer2((pointer) => {
|
299079
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
299080
|
+
if (pointer.get() !== newValue) {
|
299081
|
+
pointer.set(newValue);
|
299082
|
+
handleChange2();
|
299083
|
+
}
|
299084
|
+
});
|
299085
|
+
if (pointer.initialized) {
|
299086
|
+
return [pointer.get(), setState];
|
299087
|
+
}
|
299088
|
+
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
299089
|
+
pointer.set(value5);
|
299090
|
+
return [value5, setState];
|
299091
|
+
});
|
299092
|
+
}
|
299093
|
+
|
299094
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
299095
|
+
function useEffect2(cb, depArray) {
|
299096
|
+
withPointer2((pointer) => {
|
299097
|
+
const oldDeps = pointer.get();
|
299098
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
299099
|
+
if (hasChanged) {
|
299100
|
+
effectScheduler2.queue(cb);
|
299101
|
+
}
|
299102
|
+
pointer.set(depArray);
|
299103
|
+
});
|
299104
|
+
}
|
299105
|
+
|
299106
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
299107
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
299108
|
+
var defaultTheme2 = {
|
299109
|
+
prefix: {
|
299110
|
+
idle: import_yoctocolors_cjs4.default.blue("?"),
|
299111
|
+
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
299112
|
+
},
|
299113
|
+
spinner: {
|
299114
|
+
interval: 80,
|
299115
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
299116
|
+
},
|
299117
|
+
style: {
|
299118
|
+
answer: import_yoctocolors_cjs4.default.cyan,
|
299119
|
+
message: import_yoctocolors_cjs4.default.bold,
|
299120
|
+
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
299121
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
299122
|
+
help: import_yoctocolors_cjs4.default.dim,
|
299123
|
+
highlight: import_yoctocolors_cjs4.default.cyan,
|
299124
|
+
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
299125
|
+
}
|
299126
|
+
};
|
299127
|
+
|
299128
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
299129
|
+
function isPlainObject4(value5) {
|
299130
|
+
if (typeof value5 !== "object" || value5 === null)
|
299131
|
+
return false;
|
299132
|
+
let proto = value5;
|
299133
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
299134
|
+
proto = Object.getPrototypeOf(proto);
|
299135
|
+
}
|
299136
|
+
return Object.getPrototypeOf(value5) === proto;
|
299137
|
+
}
|
299138
|
+
function deepMerge3(...objects) {
|
299139
|
+
const output = {};
|
299140
|
+
for (const obj of objects) {
|
299141
|
+
for (const [key2, value5] of Object.entries(obj)) {
|
299142
|
+
const prevValue = output[key2];
|
299143
|
+
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
|
299144
|
+
}
|
299145
|
+
}
|
299146
|
+
return output;
|
299147
|
+
}
|
299148
|
+
function makeTheme2(...themes) {
|
299149
|
+
const themesToMerge = [
|
299150
|
+
defaultTheme2,
|
299151
|
+
...themes.filter((theme) => theme != null)
|
299152
|
+
];
|
299153
|
+
return deepMerge3(...themesToMerge);
|
299154
|
+
}
|
299155
|
+
|
299156
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
299157
|
+
function usePrefix2({ status = "idle", theme }) {
|
299158
|
+
const [showLoader, setShowLoader] = useState2(false);
|
299159
|
+
const [tick, setTick] = useState2(0);
|
299160
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
299161
|
+
useEffect2(() => {
|
299162
|
+
if (status === "loading") {
|
299163
|
+
let tickInterval;
|
299164
|
+
let inc = -1;
|
299165
|
+
const delayTimeout = setTimeout(() => {
|
299166
|
+
setShowLoader(true);
|
299167
|
+
tickInterval = setInterval(() => {
|
299168
|
+
inc = inc + 1;
|
299169
|
+
setTick(inc % spinner2.frames.length);
|
299170
|
+
}, spinner2.interval);
|
299171
|
+
}, 300);
|
299172
|
+
return () => {
|
299173
|
+
clearTimeout(delayTimeout);
|
299174
|
+
clearInterval(tickInterval);
|
299175
|
+
};
|
299176
|
+
} else {
|
299177
|
+
setShowLoader(false);
|
299178
|
+
}
|
299179
|
+
}, [status]);
|
299180
|
+
if (showLoader) {
|
299181
|
+
return spinner2.frames[tick];
|
299182
|
+
}
|
299183
|
+
const iconName = status === "loading" ? "idle" : status;
|
299184
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
299185
|
+
}
|
299186
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
299187
|
+
function useRef2(val) {
|
299188
|
+
return useState2({ current: val })[0];
|
299189
|
+
}
|
299190
|
+
|
299191
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
299192
|
+
function useKeypress2(userHandler) {
|
299193
|
+
const signal = useRef2(userHandler);
|
299194
|
+
signal.current = userHandler;
|
299195
|
+
useEffect2((rl) => {
|
299196
|
+
let ignore = false;
|
299197
|
+
const handler = withUpdates2((_input, event) => {
|
299198
|
+
if (ignore)
|
299199
|
+
return;
|
299200
|
+
signal.current(event, rl);
|
299201
|
+
});
|
299202
|
+
rl.input.on("keypress", handler);
|
299203
|
+
return () => {
|
299204
|
+
ignore = true;
|
299205
|
+
rl.input.removeListener("keypress", handler);
|
299206
|
+
};
|
299207
|
+
}, []);
|
299208
|
+
}
|
299209
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
299210
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
299211
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
299212
|
+
function breakLines2(content, width) {
|
299213
|
+
return content.split(`
|
299214
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
299215
|
+
`).map((str) => str.trimEnd())).join(`
|
299216
|
+
`);
|
299217
|
+
}
|
299218
|
+
function readlineWidth2() {
|
299219
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
299220
|
+
}
|
299221
|
+
|
299222
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299223
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
299224
|
+
import * as readline4 from "node:readline";
|
299225
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
299226
|
+
|
299227
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
299228
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
299229
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
299230
|
+
var height2 = (content) => content.split(`
|
299231
|
+
`).length;
|
299232
|
+
var lastLine2 = (content) => content.split(`
|
299233
|
+
`).pop() ?? "";
|
299234
|
+
function cursorDown2(n7) {
|
299235
|
+
return n7 > 0 ? import_ansi_escapes3.default.cursorDown(n7) : "";
|
299236
|
+
}
|
299237
|
+
|
299238
|
+
class ScreenManager2 {
|
299239
|
+
height = 0;
|
299240
|
+
extraLinesUnderPrompt = 0;
|
299241
|
+
cursorPos;
|
299242
|
+
rl;
|
299243
|
+
constructor(rl) {
|
299244
|
+
this.rl = rl;
|
299245
|
+
this.cursorPos = rl.getCursorPos();
|
299246
|
+
}
|
299247
|
+
write(content) {
|
299248
|
+
this.rl.output.unmute();
|
299249
|
+
this.rl.output.write(content);
|
299250
|
+
this.rl.output.mute();
|
299251
|
+
}
|
299252
|
+
render(content, bottomContent = "") {
|
299253
|
+
const promptLine = lastLine2(content);
|
299254
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
299255
|
+
let prompt = rawPromptLine;
|
299256
|
+
if (this.rl.line.length > 0) {
|
299257
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
299258
|
+
}
|
299259
|
+
this.rl.setPrompt(prompt);
|
299260
|
+
this.cursorPos = this.rl.getCursorPos();
|
299261
|
+
const width = readlineWidth2();
|
299262
|
+
content = breakLines2(content, width);
|
299263
|
+
bottomContent = breakLines2(bottomContent, width);
|
299264
|
+
if (rawPromptLine.length % width === 0) {
|
299265
|
+
content += `
|
299266
|
+
`;
|
299267
|
+
}
|
299268
|
+
let output = content + (bottomContent ? `
|
299269
|
+
` + bottomContent : "");
|
299270
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
299271
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
299272
|
+
if (bottomContentHeight > 0)
|
299273
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
299274
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
299275
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
299276
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
299277
|
+
this.height = height2(output);
|
299278
|
+
}
|
299279
|
+
checkCursorPos() {
|
299280
|
+
const cursorPos = this.rl.getCursorPos();
|
299281
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
299282
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
299283
|
+
this.cursorPos = cursorPos;
|
299284
|
+
}
|
299285
|
+
}
|
299286
|
+
done({ clearContent }) {
|
299287
|
+
this.rl.setPrompt("");
|
299288
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
299289
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
299290
|
+
`;
|
299291
|
+
output += import_ansi_escapes3.default.cursorShow;
|
299292
|
+
this.write(output);
|
299293
|
+
this.rl.close();
|
299294
|
+
}
|
299295
|
+
}
|
299296
|
+
|
299297
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
299298
|
+
class PromisePolyfill2 extends Promise {
|
299299
|
+
static withResolver() {
|
299300
|
+
let resolve7;
|
299301
|
+
let reject;
|
299302
|
+
const promise2 = new Promise((res, rej) => {
|
299303
|
+
resolve7 = res;
|
299304
|
+
reject = rej;
|
299305
|
+
});
|
299306
|
+
return { promise: promise2, resolve: resolve7, reject };
|
299307
|
+
}
|
299308
|
+
}
|
299309
|
+
|
299310
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299311
|
+
function getCallSites2() {
|
299312
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
299313
|
+
let result = [];
|
299314
|
+
try {
|
299315
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
299316
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
299317
|
+
result = callSitesWithoutCurrent;
|
299318
|
+
return callSitesWithoutCurrent;
|
299319
|
+
};
|
299320
|
+
new Error().stack;
|
299321
|
+
} catch {
|
299322
|
+
return result;
|
299323
|
+
}
|
299324
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
299325
|
+
return result;
|
299326
|
+
}
|
299327
|
+
function createPrompt2(view) {
|
299328
|
+
const callSites = getCallSites2();
|
299329
|
+
const prompt = (config3, context = {}) => {
|
299330
|
+
const { input = process.stdin, signal } = context;
|
299331
|
+
const cleanups = new Set;
|
299332
|
+
const output = new import_mute_stream2.default;
|
299333
|
+
output.pipe(context.output ?? process.stdout);
|
299334
|
+
const rl = readline4.createInterface({
|
299335
|
+
terminal: true,
|
299336
|
+
input,
|
299337
|
+
output
|
299338
|
+
});
|
299339
|
+
const screen = new ScreenManager2(rl);
|
299340
|
+
const { promise: promise2, resolve: resolve7, reject } = PromisePolyfill2.withResolver();
|
299341
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
299342
|
+
if (signal) {
|
299343
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
299344
|
+
if (signal.aborted) {
|
299345
|
+
abort();
|
299346
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
299347
|
+
}
|
299348
|
+
signal.addEventListener("abort", abort);
|
299349
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
299350
|
+
}
|
299351
|
+
cleanups.add(onExit((code2, signal2) => {
|
299352
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
299353
|
+
}));
|
299354
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
299355
|
+
rl.on("SIGINT", sigint);
|
299356
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
299357
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
299358
|
+
rl.input.on("keypress", checkCursorPos);
|
299359
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
299360
|
+
return withHooks2(rl, (cycle) => {
|
299361
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
299362
|
+
rl.on("close", hooksCleanup);
|
299363
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
299364
|
+
cycle(() => {
|
299365
|
+
try {
|
299366
|
+
const nextView = view(config3, (value5) => {
|
299367
|
+
setImmediate(() => resolve7(value5));
|
299368
|
+
});
|
299369
|
+
if (nextView === undefined) {
|
299370
|
+
const callerFilename = callSites[1]?.getFileName();
|
299371
|
+
throw new Error(`Prompt functions must return a string.
|
299372
|
+
at ${callerFilename}`);
|
299373
|
+
}
|
299374
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
299375
|
+
screen.render(content, bottomContent);
|
299376
|
+
effectScheduler2.run();
|
299377
|
+
} catch (error48) {
|
299378
|
+
reject(error48);
|
299379
|
+
}
|
299380
|
+
});
|
299381
|
+
return Object.assign(promise2.then((answer) => {
|
299382
|
+
effectScheduler2.clearAll();
|
299383
|
+
return answer;
|
299384
|
+
}, (error48) => {
|
299385
|
+
effectScheduler2.clearAll();
|
299386
|
+
throw error48;
|
299387
|
+
}).finally(() => {
|
299388
|
+
cleanups.forEach((cleanup) => cleanup());
|
299389
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
299390
|
+
output.end();
|
299391
|
+
}).then(() => promise2), { cancel: cancel3 });
|
299392
|
+
});
|
299393
|
+
};
|
299394
|
+
return prompt;
|
299395
|
+
}
|
299396
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.17+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
299398
299397
|
function getBooleanValue(value5, defaultValue) {
|
299399
299398
|
let answer = defaultValue !== false;
|
299400
299399
|
if (/^(y|yes)/i.test(value5))
|
@@ -299406,21 +299405,21 @@ function getBooleanValue(value5, defaultValue) {
|
|
299406
299405
|
function boolToString(value5) {
|
299407
299406
|
return value5 ? "Yes" : "No";
|
299408
299407
|
}
|
299409
|
-
var esm_default4 =
|
299408
|
+
var esm_default4 = createPrompt2((config3, done) => {
|
299410
299409
|
const { transformer = boolToString } = config3;
|
299411
|
-
const [status, setStatus] =
|
299412
|
-
const [value5, setValue] =
|
299413
|
-
const theme =
|
299414
|
-
const prefix =
|
299415
|
-
|
299410
|
+
const [status, setStatus] = useState2("idle");
|
299411
|
+
const [value5, setValue] = useState2("");
|
299412
|
+
const theme = makeTheme2(config3.theme);
|
299413
|
+
const prefix = usePrefix2({ status, theme });
|
299414
|
+
useKeypress2((key3, rl) => {
|
299416
299415
|
if (status !== "idle")
|
299417
299416
|
return;
|
299418
|
-
if (
|
299417
|
+
if (isEnterKey2(key3)) {
|
299419
299418
|
const answer = getBooleanValue(value5, config3.default);
|
299420
299419
|
setValue(transformer(answer));
|
299421
299420
|
setStatus("done");
|
299422
299421
|
done(answer);
|
299423
|
-
} else if (
|
299422
|
+
} else if (isTabKey2(key3)) {
|
299424
299423
|
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
299425
299424
|
rl.clearLine(0);
|
299426
299425
|
rl.write(answer);
|
@@ -309051,4 +309050,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
309051
309050
|
// src/cli.ts
|
309052
309051
|
sdkCliCommand();
|
309053
309052
|
|
309054
|
-
//# debugId=
|
309053
|
+
//# debugId=1C66FF92ABB1E7C564756E2164756E21
|