@settlemint/sdk-cli 1.1.15 → 1.1.16

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 CHANGED
@@ -228098,6 +228098,57 @@ ${whileRunning(e10)}`;
228098
228098
  }, qe);
228099
228099
  });
228100
228100
 
228101
+ // ../../node_modules/slugify/slugify.js
228102
+ var require_slugify = __commonJS((exports, module) => {
228103
+ (function(name3, root, factory) {
228104
+ if (typeof exports === "object") {
228105
+ module.exports = factory();
228106
+ module.exports["default"] = factory();
228107
+ } else if (typeof define === "function" && define.amd) {
228108
+ define(factory);
228109
+ } else {
228110
+ root[name3] = factory();
228111
+ }
228112
+ })("slugify", exports, function() {
228113
+ var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
228114
+ var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
228115
+ function replace(string, options) {
228116
+ if (typeof string !== "string") {
228117
+ throw new Error("slugify: string argument expected");
228118
+ }
228119
+ options = typeof options === "string" ? { replacement: options } : options || {};
228120
+ var locale = locales[options.locale] || {};
228121
+ var replacement = options.replacement === undefined ? "-" : options.replacement;
228122
+ var trim = options.trim === undefined ? true : options.trim;
228123
+ var slug = string.normalize().split("").reduce(function(result, ch) {
228124
+ var appendChar = locale[ch];
228125
+ if (appendChar === undefined)
228126
+ appendChar = charMap[ch];
228127
+ if (appendChar === undefined)
228128
+ appendChar = ch;
228129
+ if (appendChar === replacement)
228130
+ appendChar = " ";
228131
+ return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
228132
+ }, "");
228133
+ if (options.strict) {
228134
+ slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
228135
+ }
228136
+ if (trim) {
228137
+ slug = slug.trim();
228138
+ }
228139
+ slug = slug.replace(/\s+/g, replacement);
228140
+ if (options.lower) {
228141
+ slug = slug.toLowerCase();
228142
+ }
228143
+ return slug;
228144
+ }
228145
+ replace.extend = function(customMap) {
228146
+ Object.assign(charMap, customMap);
228147
+ };
228148
+ return replace;
228149
+ });
228150
+ });
228151
+
228101
228152
  // ../../node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
228102
228153
  var require_node_fetch_native_DhEqb06g = __commonJS((exports) => {
228103
228154
  var l2 = Object.defineProperty;
@@ -249288,57 +249339,6 @@ var require_public_api = __commonJS((exports) => {
249288
249339
  exports.stringify = stringify3;
249289
249340
  });
249290
249341
 
249291
- // ../../node_modules/slugify/slugify.js
249292
- var require_slugify = __commonJS((exports, module) => {
249293
- (function(name3, root, factory) {
249294
- if (typeof exports === "object") {
249295
- module.exports = factory();
249296
- module.exports["default"] = factory();
249297
- } else if (typeof define === "function" && define.amd) {
249298
- define(factory);
249299
- } else {
249300
- root[name3] = factory();
249301
- }
249302
- })("slugify", exports, function() {
249303
- var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
249304
- var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
249305
- function replace(string, options) {
249306
- if (typeof string !== "string") {
249307
- throw new Error("slugify: string argument expected");
249308
- }
249309
- options = typeof options === "string" ? { replacement: options } : options || {};
249310
- var locale = locales[options.locale] || {};
249311
- var replacement = options.replacement === undefined ? "-" : options.replacement;
249312
- var trim = options.trim === undefined ? true : options.trim;
249313
- var slug = string.normalize().split("").reduce(function(result, ch) {
249314
- var appendChar = locale[ch];
249315
- if (appendChar === undefined)
249316
- appendChar = charMap[ch];
249317
- if (appendChar === undefined)
249318
- appendChar = ch;
249319
- if (appendChar === replacement)
249320
- appendChar = " ";
249321
- return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
249322
- }, "");
249323
- if (options.strict) {
249324
- slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
249325
- }
249326
- if (trim) {
249327
- slug = slug.trim();
249328
- }
249329
- slug = slug.replace(/\s+/g, replacement);
249330
- if (options.lower) {
249331
- slug = slug.toLowerCase();
249332
- }
249333
- return slug;
249334
- }
249335
- replace.extend = function(customMap) {
249336
- Object.assign(charMap, customMap);
249337
- };
249338
- return replace;
249339
- });
249340
- });
249341
-
249342
249342
  // ../utils/dist/environment.mjs
249343
249343
  import { join } from "node:path";
249344
249344
 
@@ -259498,7 +259498,7 @@ var DotEnvSchema = z.object({
259498
259498
  SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),
259499
259499
  SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),
259500
259500
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess((value) => tryParseJson(value, []), z.array(UrlSchema).optional()),
259501
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z.string().optional(),
259501
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),
259502
259502
  SETTLEMINT_PORTAL: UniqueNameSchema.optional(),
259503
259503
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
259504
259504
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
@@ -259683,7 +259683,7 @@ function pruneCurrentEnv(currentEnv, env2) {
259683
259683
  var package_default = {
259684
259684
  name: "@settlemint/sdk-cli",
259685
259685
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
259686
- version: "1.1.15",
259686
+ version: "1.1.16",
259687
259687
  type: "module",
259688
259688
  private: false,
259689
259689
  license: "FSL-1.1-MIT",
@@ -259731,8 +259731,8 @@ var package_default = {
259731
259731
  "@inquirer/input": "4.1.6",
259732
259732
  "@inquirer/password": "4.0.9",
259733
259733
  "@inquirer/select": "4.0.9",
259734
- "@settlemint/sdk-js": "1.1.15",
259735
- "@settlemint/sdk-utils": "1.1.15",
259734
+ "@settlemint/sdk-js": "1.1.16",
259735
+ "@settlemint/sdk-utils": "1.1.16",
259736
259736
  "@types/node": "22.13.9",
259737
259737
  "@types/semver": "7.5.8",
259738
259738
  "@types/which": "3.0.4",
@@ -261002,7 +261002,7 @@ ${error.stack}`));
261002
261002
  return handleError(err);
261003
261003
  }
261004
261004
  }
261005
- const spinner2 = yoctoSpinner().start(options.startMessage);
261005
+ const spinner2 = yoctoSpinner({ stream: process.stdout }).start(options.startMessage);
261006
261006
  try {
261007
261007
  const result = await options.task(spinner2);
261008
261008
  spinner2.success(options.stopMessage);
@@ -261161,7 +261161,7 @@ var DotEnvSchema2 = z.object({
261161
261161
  SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),
261162
261162
  SETTLEMINT_THEGRAPH: UniqueNameSchema2.optional(),
261163
261163
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess((value) => tryParseJson2(value, []), z.array(UrlSchema2).optional()),
261164
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z.string().optional(),
261164
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),
261165
261165
  SETTLEMINT_PORTAL: UniqueNameSchema2.optional(),
261166
261166
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
261167
261167
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
@@ -264003,6 +264003,21 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
264003
264003
  });`
264004
264004
  ]);
264005
264005
  }
264006
+ if (env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH) {
264007
+ const isDefaulSubgraphGenerated = toGenerate.some((gqlEndpoint) => {
264008
+ const name3 = gqlEndpoint.split("/").pop();
264009
+ return name3 === env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
264010
+ });
264011
+ if (isDefaulSubgraphGenerated) {
264012
+ const nameSuffix = capitalizeFirstLetter2(env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH);
264013
+ const graphqlClientVariable = getVariableName(`theGraphClient${nameSuffix}`);
264014
+ const graphqlVariable = getVariableName(`theGraphGraphql${nameSuffix}`);
264015
+ template.push(`
264016
+ export const theGraphClient = ${graphqlClientVariable};
264017
+ export const theGraphGraphql = ${graphqlVariable};
264018
+ `);
264019
+ }
264020
+ }
264006
264021
  await writeTemplate(template.join(`
264007
264022
  `), "/lib/settlemint", "the-graph.ts");
264008
264023
  const projectDir = await projectRoot3();
@@ -265061,6 +265076,101 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
265061
265076
  };
265062
265077
  }
265063
265078
 
265079
+ // src/utils/subgraph/sanitize-name.ts
265080
+ var import_slugify = __toESM(require_slugify(), 1);
265081
+ function sanitizeName(value4, length = 35) {
265082
+ return import_slugify.default(value4, {
265083
+ strict: true,
265084
+ remove: /[!"'()*+.:@~]/g,
265085
+ replacement: "-",
265086
+ lower: true
265087
+ }).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
265088
+ }
265089
+
265090
+ // ../../node_modules/@inquirer/input/dist/esm/index.js
265091
+ var inputTheme = {
265092
+ validationFailureMode: "keep"
265093
+ };
265094
+ var esm_default2 = createPrompt((config3, done) => {
265095
+ const { required, validate: validate3 = () => true } = config3;
265096
+ const theme = makeTheme(inputTheme, config3.theme);
265097
+ const [status, setStatus] = useState("idle");
265098
+ const [defaultValue = "", setDefaultValue] = useState(config3.default);
265099
+ const [errorMsg, setError] = useState();
265100
+ const [value4, setValue] = useState("");
265101
+ const prefix = usePrefix({ status, theme });
265102
+ useKeypress(async (key2, rl) => {
265103
+ if (status !== "idle") {
265104
+ return;
265105
+ }
265106
+ if (isEnterKey(key2)) {
265107
+ const answer = value4 || defaultValue;
265108
+ setStatus("loading");
265109
+ const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
265110
+ if (isValid2 === true) {
265111
+ setValue(answer);
265112
+ setStatus("done");
265113
+ done(answer);
265114
+ } else {
265115
+ if (theme.validationFailureMode === "clear") {
265116
+ setValue("");
265117
+ } else {
265118
+ rl.write(value4);
265119
+ }
265120
+ setError(isValid2 || "You must provide a valid value");
265121
+ setStatus("idle");
265122
+ }
265123
+ } else if (isBackspaceKey(key2) && !value4) {
265124
+ setDefaultValue(undefined);
265125
+ } else if (key2.name === "tab" && !value4) {
265126
+ setDefaultValue(undefined);
265127
+ rl.clearLine(0);
265128
+ rl.write(defaultValue);
265129
+ setValue(defaultValue);
265130
+ } else {
265131
+ setValue(rl.line);
265132
+ setError(undefined);
265133
+ }
265134
+ });
265135
+ const message = theme.style.message(config3.message, status);
265136
+ let formattedValue = value4;
265137
+ if (typeof config3.transformer === "function") {
265138
+ formattedValue = config3.transformer(value4, { isFinal: status === "done" });
265139
+ } else if (status === "done") {
265140
+ formattedValue = theme.style.answer(value4);
265141
+ }
265142
+ let defaultStr;
265143
+ if (defaultValue && status !== "done" && !value4) {
265144
+ defaultStr = theme.style.defaultAnswer(defaultValue);
265145
+ }
265146
+ let error5 = "";
265147
+ if (errorMsg) {
265148
+ error5 = theme.style.error(errorMsg);
265149
+ }
265150
+ return [
265151
+ [prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
265152
+ error5
265153
+ ];
265154
+ });
265155
+
265156
+ // src/prompts/smart-contract-set/subgraph-name.prompt.ts
265157
+ async function subgraphNamePrompt({
265158
+ defaultName,
265159
+ env: env2,
265160
+ accept
265161
+ }) {
265162
+ const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
265163
+ if (accept) {
265164
+ return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
265165
+ }
265166
+ const subgraphName = await esm_default2({
265167
+ message: "What is the name of your subgraph?",
265168
+ default: defaultSubgraphName,
265169
+ required: true
265170
+ });
265171
+ return sanitizeName(subgraphName);
265172
+ }
265173
+
265064
265174
  // ../../node_modules/@inquirer/select/dist/esm/index.js
265065
265175
  var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
265066
265176
  var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
@@ -265097,7 +265207,7 @@ function normalizeChoices(choices) {
265097
265207
  };
265098
265208
  });
265099
265209
  }
265100
- var esm_default2 = createPrompt((config3, done) => {
265210
+ var esm_default3 = createPrompt((config3, done) => {
265101
265211
  const { loop = true, pageSize = 7 } = config3;
265102
265212
  const firstRender = useRef(true);
265103
265213
  const theme = makeTheme(selectTheme, config3.theme);
@@ -265203,11 +265313,19 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursor
265203
265313
 
265204
265314
  // src/prompts/smart-contract-set/subgraph.prompt.ts
265205
265315
  var ALL = "All";
265206
- async function subgraphPrompt(env2, accept) {
265207
- const autoAccept = is_in_ci_default || !!accept;
265316
+ var NEW = "New subgraph";
265317
+ async function subgraphPrompt({
265318
+ env: env2,
265319
+ accept,
265320
+ message,
265321
+ allowAll = false,
265322
+ allowNew = false,
265323
+ isCi = is_in_ci_default
265324
+ }) {
265325
+ const autoAccept = isCi || !!accept;
265208
265326
  const subgraphNames = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.map((endpoint) => endpoint.split("/").pop()).filter(Boolean) ?? [];
265209
265327
  if (autoAccept) {
265210
- return subgraphNames;
265328
+ return allowAll ? subgraphNames : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ? [env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH] : [];
265211
265329
  }
265212
265330
  if (subgraphNames.length === 0) {
265213
265331
  cancel2("No subgraphs found");
@@ -265215,17 +265333,43 @@ async function subgraphPrompt(env2, accept) {
265215
265333
  if (subgraphNames.length === 1) {
265216
265334
  return subgraphNames;
265217
265335
  }
265218
- const subgraphName = await esm_default2({
265219
- message: "Which The Graph subgraph do you want to generate types for?",
265220
- choices: [ALL, ...subgraphNames].map((name3) => ({
265336
+ const choices = subgraphNames.slice().sort();
265337
+ if (allowAll) {
265338
+ choices.unshift(ALL);
265339
+ }
265340
+ if (allowNew) {
265341
+ choices.unshift(NEW);
265342
+ }
265343
+ let defaultChoice;
265344
+ if (allowAll) {
265345
+ defaultChoice = ALL;
265346
+ } else if (allowNew) {
265347
+ defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? NEW;
265348
+ } else {
265349
+ defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
265350
+ }
265351
+ const subgraphName = await esm_default3({
265352
+ message,
265353
+ choices: choices.map((name3) => ({
265221
265354
  name: name3,
265222
265355
  value: name3
265223
265356
  })),
265224
- default: ALL
265357
+ default: defaultChoice
265225
265358
  });
265226
265359
  if (!subgraphName) {
265227
265360
  cancel2("No subgraph selected");
265228
265361
  }
265362
+ if (subgraphName === NEW) {
265363
+ const newSubgraphName = await subgraphNamePrompt({
265364
+ defaultName: "",
265365
+ env: env2,
265366
+ accept: autoAccept
265367
+ });
265368
+ if (!newSubgraphName) {
265369
+ return [];
265370
+ }
265371
+ return [newSubgraphName];
265372
+ }
265229
265373
  return subgraphName === ALL ? subgraphNames : [subgraphName];
265230
265374
  }
265231
265375
 
@@ -265486,7 +265630,12 @@ function codegenCommand() {
265486
265630
  intro("Generating GraphQL types and queries for your dApp");
265487
265631
  const env2 = await loadEnv(true, !!prod);
265488
265632
  if (!Array.isArray(thegraphSubgraphNames)) {
265489
- thegraphSubgraphNames = await subgraphPrompt(env2, true);
265633
+ thegraphSubgraphNames = await subgraphPrompt({
265634
+ env: env2,
265635
+ accept: true,
265636
+ message: "Which The Graph subgraph do you want to generate types for?",
265637
+ allowAll: true
265638
+ });
265490
265639
  }
265491
265640
  const { hasura, portal, thegraph, blockscout } = await spinner({
265492
265641
  startMessage: "Testing configured GraphQL schema",
@@ -265541,7 +265690,7 @@ function getBooleanValue(value4, defaultValue) {
265541
265690
  function boolToString(value4) {
265542
265691
  return value4 ? "Yes" : "No";
265543
265692
  }
265544
- var esm_default3 = createPrompt((config3, done) => {
265693
+ var esm_default4 = createPrompt((config3, done) => {
265545
265694
  const { transformer = boolToString } = config3;
265546
265695
  const [status, setStatus] = useState("idle");
265547
265696
  const [value4, setValue] = useState("");
@@ -265573,72 +265722,6 @@ var esm_default3 = createPrompt((config3, done) => {
265573
265722
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
265574
265723
  });
265575
265724
 
265576
- // ../../node_modules/@inquirer/input/dist/esm/index.js
265577
- var inputTheme = {
265578
- validationFailureMode: "keep"
265579
- };
265580
- var esm_default4 = createPrompt((config3, done) => {
265581
- const { required, validate: validate3 = () => true } = config3;
265582
- const theme = makeTheme(inputTheme, config3.theme);
265583
- const [status, setStatus] = useState("idle");
265584
- const [defaultValue = "", setDefaultValue] = useState(config3.default);
265585
- const [errorMsg, setError] = useState();
265586
- const [value4, setValue] = useState("");
265587
- const prefix = usePrefix({ status, theme });
265588
- useKeypress(async (key2, rl) => {
265589
- if (status !== "idle") {
265590
- return;
265591
- }
265592
- if (isEnterKey(key2)) {
265593
- const answer = value4 || defaultValue;
265594
- setStatus("loading");
265595
- const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
265596
- if (isValid2 === true) {
265597
- setValue(answer);
265598
- setStatus("done");
265599
- done(answer);
265600
- } else {
265601
- if (theme.validationFailureMode === "clear") {
265602
- setValue("");
265603
- } else {
265604
- rl.write(value4);
265605
- }
265606
- setError(isValid2 || "You must provide a valid value");
265607
- setStatus("idle");
265608
- }
265609
- } else if (isBackspaceKey(key2) && !value4) {
265610
- setDefaultValue(undefined);
265611
- } else if (key2.name === "tab" && !value4) {
265612
- setDefaultValue(undefined);
265613
- rl.clearLine(0);
265614
- rl.write(defaultValue);
265615
- setValue(defaultValue);
265616
- } else {
265617
- setValue(rl.line);
265618
- setError(undefined);
265619
- }
265620
- });
265621
- const message = theme.style.message(config3.message, status);
265622
- let formattedValue = value4;
265623
- if (typeof config3.transformer === "function") {
265624
- formattedValue = config3.transformer(value4, { isFinal: status === "done" });
265625
- } else if (status === "done") {
265626
- formattedValue = theme.style.answer(value4);
265627
- }
265628
- let defaultStr;
265629
- if (defaultValue && status !== "done" && !value4) {
265630
- defaultStr = theme.style.defaultAnswer(defaultValue);
265631
- }
265632
- let error5 = "";
265633
- if (errorMsg) {
265634
- error5 = theme.style.error(errorMsg);
265635
- }
265636
- return [
265637
- [prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
265638
- error5
265639
- ];
265640
- });
265641
-
265642
265725
  // ../../node_modules/@inquirer/password/dist/esm/index.js
265643
265726
  var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
265644
265727
  var esm_default5 = createPrompt((config3, done) => {
@@ -265699,7 +265782,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
265699
265782
  return defaultAccessToken;
265700
265783
  }
265701
265784
  if (defaultAccessToken) {
265702
- const keep = await esm_default3({
265785
+ const keep = await esm_default4({
265703
265786
  message: "Do you want to use the existing application access token?",
265704
265787
  default: true
265705
265788
  });
@@ -265707,12 +265790,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
265707
265790
  return defaultAccessToken;
265708
265791
  }
265709
265792
  }
265710
- const create2 = await esm_default3({
265793
+ const create2 = await esm_default4({
265711
265794
  message: "Do you want to create a new application access token?",
265712
265795
  default: false
265713
265796
  });
265714
265797
  if (create2) {
265715
- const name3 = await esm_default4({
265798
+ const name3 = await esm_default2({
265716
265799
  message: "How would you like to name this application access token?",
265717
265800
  default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
265718
265801
  required: true,
@@ -265808,7 +265891,7 @@ async function applicationPrompt(env2, applications, accept) {
265808
265891
  if (is_in_ci_default) {
265809
265892
  nothingSelectedError("application");
265810
265893
  }
265811
- const application = await esm_default2({
265894
+ const application = await esm_default3({
265812
265895
  message: "Which application do you want to connect to?",
265813
265896
  choices: applications.map((applications2) => ({
265814
265897
  name: `${applications2.name} (${applications2.uniqueName})`,
@@ -265881,7 +265964,7 @@ async function blockchainNodePrompt({
265881
265964
  isRequired,
265882
265965
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
265883
265966
  const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
265884
- return esm_default2({
265967
+ return esm_default3({
265885
265968
  message: promptMessage ?? "Which blockchain node do you want to connect to?",
265886
265969
  choices: filteredChoices,
265887
265970
  default: defaultNode
@@ -265906,7 +265989,7 @@ async function blockscoutPrompt({
265906
265989
  envKey: "SETTLEMINT_BLOCKSCOUT",
265907
265990
  isRequired,
265908
265991
  defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
265909
- return esm_default2({
265992
+ return esm_default3({
265910
265993
  message: "Which blockscout instance do you want to connect to?",
265911
265994
  choices,
265912
265995
  default: defaultBlockscout
@@ -265929,7 +266012,7 @@ async function customDeploymentPrompt({
265929
266012
  envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
265930
266013
  isRequired,
265931
266014
  defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
265932
- return esm_default2({
266015
+ return esm_default3({
265933
266016
  message: "Which Custom Deployment do you want to connect to?",
265934
266017
  choices,
265935
266018
  default: defaultCustomDeployment
@@ -265953,7 +266036,7 @@ async function hasuraPrompt({
265953
266036
  envKey: "SETTLEMINT_HASURA",
265954
266037
  isRequired,
265955
266038
  defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
265956
- return esm_default2({
266039
+ return esm_default3({
265957
266040
  message: "Which Hasura instance do you want to connect to?",
265958
266041
  choices,
265959
266042
  default: defaultHasura
@@ -265977,7 +266060,7 @@ async function hdPrivateKeyPrompt({
265977
266060
  envKey: "SETTLEMINT_HD_PRIVATE_KEY",
265978
266061
  isRequired,
265979
266062
  defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
265980
- return esm_default2({
266063
+ return esm_default3({
265981
266064
  message: "Which HD Private Key do you want to use?",
265982
266065
  choices,
265983
266066
  default: defaultPrivateKey
@@ -266001,7 +266084,7 @@ async function ipfsPrompt({
266001
266084
  envKey: "SETTLEMINT_IPFS",
266002
266085
  isRequired,
266003
266086
  defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
266004
- return esm_default2({
266087
+ return esm_default3({
266005
266088
  message: "Which IPFS instance do you want to connect to?",
266006
266089
  choices,
266007
266090
  default: defaultStorage
@@ -266025,7 +266108,7 @@ async function minioPrompt({
266025
266108
  envKey: "SETTLEMINT_MINIO",
266026
266109
  isRequired,
266027
266110
  defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
266028
- return esm_default2({
266111
+ return esm_default3({
266029
266112
  message: "Which MinIO instance do you want to connect to?",
266030
266113
  choices,
266031
266114
  default: defaultStorage
@@ -266049,7 +266132,7 @@ async function portalPrompt({
266049
266132
  envKey: "SETTLEMINT_PORTAL",
266050
266133
  isRequired,
266051
266134
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
266052
- return esm_default2({
266135
+ return esm_default3({
266053
266136
  message: "Which Smart Contract Portal instance do you want to connect to?",
266054
266137
  choices,
266055
266138
  default: defaultMiddleware
@@ -266078,7 +266161,7 @@ async function theGraphPrompt({
266078
266161
  isRequired,
266079
266162
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
266080
266163
  const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
266081
- return esm_default2({
266164
+ return esm_default3({
266082
266165
  message: "Which The Graph instance do you want to connect to?",
266083
266166
  choices: filteredChoices,
266084
266167
  default: defaultMiddleware
@@ -266112,7 +266195,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
266112
266195
  return sanitizeInstanceUrl(defaultPromptInstance);
266113
266196
  }
266114
266197
  if (freeTextInput) {
266115
- const instance = await esm_default4({
266198
+ const instance = await esm_default2({
266116
266199
  message: "What is the URL of your SettleMint instance?",
266117
266200
  default: defaultPromptInstance,
266118
266201
  required: true,
@@ -266134,7 +266217,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
266134
266217
  if (knownInstances.length === 1) {
266135
266218
  return sanitizeInstanceUrl(knownInstances[0]);
266136
266219
  }
266137
- return esm_default2({
266220
+ return esm_default3({
266138
266221
  message: "What SettleMint instance do you want to connect to?",
266139
266222
  choices: [
266140
266223
  ...knownInstances.map((instance) => ({
@@ -266160,7 +266243,7 @@ async function workspacePrompt(env2, workspaces, accept) {
266160
266243
  if (is_in_ci_default) {
266161
266244
  nothingSelectedError("workspace");
266162
266245
  }
266163
- const workspace = await esm_default2({
266246
+ const workspace = await esm_default3({
266164
266247
  message: "Which workspace do you want to connect to?",
266165
266248
  choices: workspaces.map((workspace2) => ({
266166
266249
  name: `${workspace2.name} (${workspace2.uniqueName})`,
@@ -266253,7 +266336,7 @@ async function writeEnvSpinner(prod, env2) {
266253
266336
  SETTLEMINT_HASURA_ENDPOINT: env2.SETTLEMINT_HASURA_ENDPOINT,
266254
266337
  SETTLEMINT_THEGRAPH: env2.SETTLEMINT_THEGRAPH,
266255
266338
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS,
266256
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME,
266339
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
266257
266340
  SETTLEMINT_PORTAL: env2.SETTLEMINT_PORTAL,
266258
266341
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
266259
266342
  SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
@@ -266391,6 +266474,12 @@ function connectCommand() {
266391
266474
  middlewares,
266392
266475
  accept: acceptDefaults
266393
266476
  });
266477
+ const graphEndpoints = await getGraphEndpoint(settlemint, thegraph);
266478
+ const [defaultSubgraph] = thegraph ? await subgraphPrompt({
266479
+ env: { ...env2, ...graphEndpoints },
266480
+ accept: acceptDefaults,
266481
+ message: "Which The Graph subgraph do you want to use as the default?"
266482
+ }) : [];
266394
266483
  const portal = await portalPrompt({
266395
266484
  env: env2,
266396
266485
  middlewares,
@@ -266496,7 +266585,8 @@ function connectCommand() {
266496
266585
  SETTLEMINT_HASURA: hasura?.uniqueName,
266497
266586
  ...getHasuraEndpoints(hasura),
266498
266587
  SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
266499
- ...await getGraphEndpoint(settlemint, thegraph),
266588
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: defaultSubgraph,
266589
+ ...graphEndpoints,
266500
266590
  SETTLEMINT_PORTAL: portal?.uniqueName,
266501
266591
  ...getPortalEndpoints(portal),
266502
266592
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
@@ -266517,27 +266607,6 @@ function connectCommand() {
266517
266607
  import { mkdir as mkdir6 } from "node:fs/promises";
266518
266608
  import { join as join9 } from "node:path";
266519
266609
 
266520
- // src/prompts/project-name.prompt.ts
266521
- async function projectNamePrompt(env2, argument) {
266522
- const defaultInstance = env2.SETTLEMINT_NEW_PROJECT_NAME ?? argument;
266523
- if (defaultInstance) {
266524
- return defaultInstance;
266525
- }
266526
- return esm_default4({
266527
- message: "What is the name of your new SettleMint project?",
266528
- default: defaultInstance,
266529
- required: true,
266530
- validate(value4) {
266531
- try {
266532
- validate2(z.string(), value4);
266533
- return true;
266534
- } catch (error5) {
266535
- return "Invalid projectname";
266536
- }
266537
- }
266538
- });
266539
- }
266540
-
266541
266610
  // src/utils/platform-utils.ts
266542
266611
  function getUseCases(platformConfig) {
266543
266612
  return platformConfig.smartContractSets.sets.filter((useCase) => !useCase.featureflagged);
@@ -266546,7 +266615,7 @@ function getKits(platformConfig) {
266546
266615
  return platformConfig.kits ?? [];
266547
266616
  }
266548
266617
 
266549
- // src/prompts/starter-kit/template.prompt.ts
266618
+ // src/prompts/kit/template.prompt.ts
266550
266619
  async function templatePrompt(platformConfig, argument) {
266551
266620
  const kits = getKits(platformConfig);
266552
266621
  if (kits.length === 0) {
@@ -266560,7 +266629,7 @@ async function templatePrompt(platformConfig, argument) {
266560
266629
  }
266561
266630
  return template2;
266562
266631
  }
266563
- const template = await esm_default2({
266632
+ const template = await esm_default3({
266564
266633
  message: "Which template do you want to use?",
266565
266634
  choices: [
266566
266635
  ...kits.map((template2) => ({
@@ -266572,6 +266641,27 @@ async function templatePrompt(platformConfig, argument) {
266572
266641
  return template;
266573
266642
  }
266574
266643
 
266644
+ // src/prompts/project-name.prompt.ts
266645
+ async function projectNamePrompt(env2, argument) {
266646
+ const defaultInstance = env2.SETTLEMINT_NEW_PROJECT_NAME ?? argument;
266647
+ if (defaultInstance) {
266648
+ return defaultInstance;
266649
+ }
266650
+ return esm_default2({
266651
+ message: "What is the name of your new SettleMint project?",
266652
+ default: defaultInstance,
266653
+ required: true,
266654
+ validate(value4) {
266655
+ try {
266656
+ validate2(z.string(), value4);
266657
+ return true;
266658
+ } catch (error5) {
266659
+ return "Invalid projectname";
266660
+ }
266661
+ }
266662
+ });
266663
+ }
266664
+
266575
266665
  // src/utils/download-extract.ts
266576
266666
  import { mkdir as mkdir5 } from "node:fs/promises";
266577
266667
 
@@ -269768,7 +269858,11 @@ async function downloadTemplate(input, options = {}) {
269768
269858
  var import_proxy2 = __toESM(require_proxy(), 1);
269769
269859
 
269770
269860
  // src/utils/download-extract.ts
269771
- async function downloadAndExtractNpmPackage(template, targetDir) {
269861
+ async function downloadAndExtractNpmPackage({
269862
+ template,
269863
+ version,
269864
+ targetDir
269865
+ }) {
269772
269866
  await mkdir5(targetDir, { recursive: true });
269773
269867
  const response = await fetch(`https://registry.npmjs.org/${template}`);
269774
269868
  if (!response.ok) {
@@ -269776,7 +269870,7 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
269776
269870
  }
269777
269871
  const data = await response.json();
269778
269872
  const latestVersion = data["dist-tags"].latest;
269779
- const tarball = data.versions[latestVersion].dist.tarball;
269873
+ const tarball = data.versions[version ?? latestVersion].dist.tarball;
269780
269874
  await downloadTemplate(tarball, {
269781
269875
  dir: targetDir,
269782
269876
  force: true
@@ -269785,9 +269879,12 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
269785
269879
 
269786
269880
  // src/commands/create.ts
269787
269881
  function createCommand2() {
269788
- return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").option("-t, --template <template>", "The template for your SettleMint project (run `settlemint platform config` to see available templates)").option("-i, --instance <instance>", "The instance to connect to").action(async ({ projectName, template, instance }) => {
269882
+ return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").option("-t, --template <template>", "The template for your SettleMint project (run `settlemint platform config` to see available templates)").option("-v, --version <version>", "Specify the template version to use (defaults to latest stable version)").option("-i, --instance <instance>", "The instance to connect to").action(async ({ projectName, template, version, instance }) => {
269789
269883
  intro("Creating a new SettleMint project");
269790
269884
  const env2 = await loadEnv(false, false);
269885
+ if (version && !template) {
269886
+ cancel2("The --version option requires the --template option to be set");
269887
+ }
269791
269888
  const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
269792
269889
  const settlemint = createSettleMintClient({
269793
269890
  instance: selectedInstance,
@@ -269806,7 +269903,7 @@ function createCommand2() {
269806
269903
  await mkdir6(projectDir, { recursive: true });
269807
269904
  }
269808
269905
  if (!await isEmpty(projectDir)) {
269809
- const confirmEmpty = await esm_default3({
269906
+ const confirmEmpty = await esm_default4({
269810
269907
  message: `The folder ${projectDir} already exists. Do you want to empty it?`,
269811
269908
  default: false
269812
269909
  });
@@ -269818,7 +269915,11 @@ function createCommand2() {
269818
269915
  await spinner({
269819
269916
  startMessage: "Scaffolding the project",
269820
269917
  task: async () => {
269821
- await downloadAndExtractNpmPackage(selectedTemplate.npmPackageName, projectDir);
269918
+ await downloadAndExtractNpmPackage({
269919
+ template: selectedTemplate.npmPackageName,
269920
+ version,
269921
+ targetDir: projectDir
269922
+ });
269822
269923
  await setName(name3, projectDir);
269823
269924
  },
269824
269925
  stopMessage: "Project fully scaffolded"
@@ -269836,7 +269937,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
269836
269937
  return defaultPersonalAccessToken;
269837
269938
  }
269838
269939
  if (existingConfig && defaultPersonalAccessToken) {
269839
- const useExisting = await esm_default3({
269940
+ const useExisting = await esm_default4({
269840
269941
  message: `Do you want to use your existing personal access token for ${instance}?`,
269841
269942
  default: true
269842
269943
  });
@@ -269944,7 +270045,7 @@ function logoutCommand() {
269944
270045
  }
269945
270046
  const env2 = await loadEnv(false, false);
269946
270047
  const defaultInstance = env2.SETTLEMINT_INSTANCE;
269947
- const instance = await esm_default2({
270048
+ const instance = await esm_default3({
269948
270049
  message: "Select the instance to logout from:",
269949
270050
  choices: instances.map((instance2) => ({
269950
270051
  value: instance2,
@@ -270160,7 +270261,7 @@ async function providerPrompt(platformConfig, argument) {
270160
270261
  if (possibleProviders.length === 1) {
270161
270262
  return possibleProviders[0];
270162
270263
  }
270163
- const provider = await esm_default2({
270264
+ const provider = await esm_default3({
270164
270265
  message: "Which provider do you want to use?",
270165
270266
  choices: platformConfig.deploymentEngineTargets.map((target) => ({
270166
270267
  name: target.name,
@@ -270191,7 +270292,7 @@ async function regionPrompt(provider, argument) {
270191
270292
  if (possibleRegions.length === 1) {
270192
270293
  return possibleRegions[0];
270193
270294
  }
270194
- const region = await esm_default2({
270295
+ const region = await esm_default3({
270195
270296
  message: "Which region do you want to use?",
270196
270297
  choices: provider.clusters.map((cluster) => ({
270197
270298
  name: cluster.name,
@@ -270679,7 +270780,7 @@ async function blockchainNetworkPrompt({
270679
270780
  envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
270680
270781
  isRequired,
270681
270782
  defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
270682
- return esm_default2({
270783
+ return esm_default3({
270683
270784
  message: "Which blockchain network do you want to connect to?",
270684
270785
  choices,
270685
270786
  default: defaultNetwork
@@ -271406,7 +271507,7 @@ function createCommand3() {
271406
271507
 
271407
271508
  // src/prompts/delete-confirmation.prompt.ts
271408
271509
  async function deleteConfirmationPrompt(itemDescription) {
271409
- const confirmation = await esm_default4({
271510
+ const confirmation = await esm_default2({
271410
271511
  message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
271411
271512
  required: true,
271412
271513
  validate(value4) {
@@ -271834,7 +271935,9 @@ function configCommand() {
271834
271935
  })).sort((a8, b4) => a8.name.localeCompare(b4.name)),
271835
271936
  kits: kits.map((kit) => ({
271836
271937
  id: kit.id,
271837
- name: kit.name
271938
+ name: kit.name,
271939
+ description: kit.description,
271940
+ npmPackage: kit.npmPackageName
271838
271941
  })).sort((a8, b4) => a8.name.localeCompare(b4.name)),
271839
271942
  deploymentEngineTargets: platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).flatMap((provider) => provider.clusters.filter((cluster) => !cluster.disabled).map((region) => ({
271840
271943
  providerId: provider.id,
@@ -272275,7 +272378,7 @@ async function useCasePrompt(platformConfig, argument) {
272275
272378
  if (selectableUseCases.length === 1) {
272276
272379
  return selectableUseCases[0];
272277
272380
  }
272278
- const useCase = await esm_default2({
272381
+ const useCase = await esm_default3({
272279
272382
  message: "Which use case do you want to use?",
272280
272383
  choices: selectableUseCases.map((useCase2) => ({
272281
272384
  name: formatUseCaseName(useCase2.name),
@@ -272325,7 +272428,7 @@ function createCommand4() {
272325
272428
  const targetDir = formatTargetDir(name3);
272326
272429
  const projectDir = join10(process.cwd(), targetDir);
272327
272430
  if (await exists3(projectDir) && !await isEmpty(projectDir)) {
272328
- const confirmEmpty = await esm_default3({
272431
+ const confirmEmpty = await esm_default4({
272329
272432
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
272330
272433
  default: false
272331
272434
  });
@@ -272566,7 +272669,7 @@ async function addressPrompt({
272566
272669
  note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
272567
272670
  Please select another key or activate this key on the node and try again.`, "warn");
272568
272671
  }
272569
- const address = await esm_default2({
272672
+ const address = await esm_default3({
272570
272673
  message: "Which private key do you want to deploy from?",
272571
272674
  choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
272572
272675
  name: name3,
@@ -272885,17 +272988,6 @@ import { dirname as dirname10 } from "node:path";
272885
272988
  import { rm as rm4 } from "node:fs/promises";
272886
272989
  var import_semver = __toESM(require_semver2(), 1);
272887
272990
 
272888
- // src/utils/subgraph/sanitize-name.ts
272889
- var import_slugify = __toESM(require_slugify(), 1);
272890
- function sanitizeName(value4, length = 35) {
272891
- return import_slugify.default(value4, {
272892
- strict: true,
272893
- remove: /[!"'()*+.:@~]/g,
272894
- replacement: "-",
272895
- lower: true
272896
- }).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
272897
- }
272898
-
272899
272991
  // src/utils/subgraph/subgraph-config.ts
272900
272992
  import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
272901
272993
  import { basename as basename4, join as join11 } from "node:path";
@@ -273077,40 +273169,6 @@ function subgraphCodegenCommand() {
273077
273169
 
273078
273170
  // src/commands/smart-contract-set/subgraph/deploy.ts
273079
273171
  import { dirname as dirname12 } from "node:path";
273080
-
273081
- // src/prompts/smart-contract-set/subgraph-name.prompt.ts
273082
- async function subgraphNamePrompt({
273083
- defaultName,
273084
- env: env2,
273085
- accept,
273086
- prod
273087
- }) {
273088
- const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
273089
- if (accept) {
273090
- if (defaultSubgraphName && env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== defaultSubgraphName) {
273091
- await saveSubgraphName(defaultSubgraphName, env2, prod);
273092
- }
273093
- return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME;
273094
- }
273095
- const subgraphName = await esm_default4({
273096
- message: "What is the name of your subgraph?",
273097
- default: defaultSubgraphName,
273098
- required: true
273099
- });
273100
- const sanitizedSubgraphName = sanitizeName(subgraphName);
273101
- if (env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== sanitizedSubgraphName) {
273102
- await saveSubgraphName(sanitizedSubgraphName, env2, prod);
273103
- }
273104
- return sanitizedSubgraphName;
273105
- }
273106
- async function saveSubgraphName(sanitizedSubgraphName, env2, prod) {
273107
- await writeEnvSpinner(!!prod, {
273108
- ...env2,
273109
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: sanitizedSubgraphName
273110
- });
273111
- }
273112
-
273113
- // src/commands/smart-contract-set/subgraph/deploy.ts
273114
273172
  function subgraphDeployCommand() {
273115
273173
  return new Command("deploy").description("Deploy the subgraph").usage(createExamples([
273116
273174
  {
@@ -273156,14 +273214,24 @@ function subgraphDeployCommand() {
273156
273214
  cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
273157
273215
  }
273158
273216
  }
273159
- const graphName = await subgraphNamePrompt({
273160
- defaultName: subgraphName,
273161
- env: env2,
273162
- accept: autoAccept,
273163
- prod: !!prod
273164
- });
273217
+ let graphName;
273218
+ if (!subgraphName) {
273219
+ const selectedSubgraphs = await subgraphPrompt({
273220
+ env: env2,
273221
+ accept: autoAccept,
273222
+ message: "Which subgraph do you want to deploy to?",
273223
+ allowNew: true
273224
+ });
273225
+ graphName = selectedSubgraphs[0];
273226
+ } else {
273227
+ graphName = await subgraphNamePrompt({
273228
+ defaultName: subgraphName,
273229
+ env: env2,
273230
+ accept: autoAccept
273231
+ });
273232
+ }
273165
273233
  if (!graphName) {
273166
- cancel2("No graph name provided. Please provide a graph name to continue.");
273234
+ cancel2("No subgraph name provided. Please provide a subgraph name to continue.");
273167
273235
  }
273168
273236
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273169
273237
  await executeCommand(command, [...args, "graph", "create", "--node", middlewareAdminUrl, graphName]);
@@ -273208,14 +273276,20 @@ function subgraphRemoveCommand() {
273208
273276
  description: "Remove a subgraph",
273209
273277
  command: "scs subgraph remove my-subgraph"
273210
273278
  }
273211
- ])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-f, --force", "Force remove the subgraph without confirmation").argument("<subgraph-name>", "The name of the subgraph to remove").action(async (subgraphName, { prod, acceptDefaults, force }) => {
273279
+ ])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-f, --force", "Force remove the subgraph without confirmation").argument("[subgraph-name]", "The name of the subgraph to remove (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults, force }) => {
273212
273280
  intro("Removing subgraph");
273213
273281
  await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
273214
- if (!force) {
273215
- await deleteConfirmationPrompt(`the subgraph ${subgraphName}`);
273216
- }
273217
273282
  const autoAccept = !!acceptDefaults || is_in_ci_default;
273218
273283
  const env2 = await loadEnv(false, !!prod);
273284
+ const selectedSubgraphs = subgraphName ? [subgraphName] : await subgraphPrompt({
273285
+ env: env2,
273286
+ accept: autoAccept,
273287
+ message: "Which subgraph do you want to remove?"
273288
+ });
273289
+ const graphName = selectedSubgraphs[0];
273290
+ if (!force) {
273291
+ await deleteConfirmationPrompt(`the subgraph ${graphName}`);
273292
+ }
273219
273293
  const instance = await instancePrompt(env2, true);
273220
273294
  const accessToken = await getApplicationOrPersonalAccessToken({
273221
273295
  env: env2,
@@ -273233,19 +273307,30 @@ function subgraphRemoveCommand() {
273233
273307
  const cwd2 = dirname13(subgraphYamlFile);
273234
273308
  const { command, args } = await getPackageManagerExecutable();
273235
273309
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273236
- await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, subgraphName]);
273310
+ await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, graphName]);
273237
273311
  const settlemintClient = createSettleMintClient({
273238
273312
  accessToken,
273239
273313
  instance
273240
273314
  });
273241
- const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
273242
- const graphEndpoints = await getGraphEndpoint(settlemintClient, middleware);
273315
+ const graphEndpoints = await spinner({
273316
+ startMessage: "Waiting for subgraph to be removed",
273317
+ task: () => retryWhenFailed2(async () => {
273318
+ const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
273319
+ const endpoints = await getGraphEndpoint(settlemintClient, middleware);
273320
+ if (endpoints.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.some((endpoint) => endpoint.endsWith(graphName))) {
273321
+ throw new Error(`Subgraph '${graphName}' not removed from middleware '${theGraphMiddleware.uniqueName}'`);
273322
+ }
273323
+ return endpoints;
273324
+ }, 5, 5000),
273325
+ stopMessage: "Waiting finished"
273326
+ });
273243
273327
  await writeEnvSpinner(!!prod, {
273244
273328
  ...env2,
273245
273329
  SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
273330
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH === graphName ? undefined : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
273246
273331
  ...graphEndpoints
273247
273332
  });
273248
- outro(`Subgraph ${subgraphName} removed successfully`);
273333
+ outro(`Subgraph ${graphName} removed successfully`);
273249
273334
  });
273250
273335
  }
273251
273336
 
@@ -273388,4 +273473,4 @@ async function sdkCliCommand(argv = process.argv) {
273388
273473
  // src/cli.ts
273389
273474
  sdkCliCommand();
273390
273475
 
273391
- //# debugId=92C848ED6EB28E8864756E2164756E21
273476
+ //# debugId=5CD925A2C8366EC964756E2164756E21