@settlemint/sdk-cli 1.1.15-pr3e70f2f9 → 1.1.15-pr9a3d08da

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.
Files changed (3) hide show
  1. package/dist/cli.js +301 -242
  2. package/dist/cli.js.map +20 -20
  3. package/package.json +3 -3
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-pr3e70f2f9",
259686
+ version: "1.1.15-pr9a3d08da",
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-pr3e70f2f9",
259735
- "@settlemint/sdk-utils": "1.1.15-pr3e70f2f9",
259734
+ "@settlemint/sdk-js": "1.1.15-pr9a3d08da",
259735
+ "@settlemint/sdk-utils": "1.1.15-pr9a3d08da",
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,
@@ -266523,7 +266613,7 @@ async function projectNamePrompt(env2, argument) {
266523
266613
  if (defaultInstance) {
266524
266614
  return defaultInstance;
266525
266615
  }
266526
- return esm_default4({
266616
+ return esm_default2({
266527
266617
  message: "What is the name of your new SettleMint project?",
266528
266618
  default: defaultInstance,
266529
266619
  required: true,
@@ -266560,7 +266650,7 @@ async function templatePrompt(platformConfig, argument) {
266560
266650
  }
266561
266651
  return template2;
266562
266652
  }
266563
- const template = await esm_default2({
266653
+ const template = await esm_default3({
266564
266654
  message: "Which template do you want to use?",
266565
266655
  choices: [
266566
266656
  ...kits.map((template2) => ({
@@ -269768,11 +269858,7 @@ 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({
269772
- template,
269773
- version,
269774
- targetDir
269775
- }) {
269861
+ async function downloadAndExtractNpmPackage(template, targetDir) {
269776
269862
  await mkdir5(targetDir, { recursive: true });
269777
269863
  const response = await fetch(`https://registry.npmjs.org/${template}`);
269778
269864
  if (!response.ok) {
@@ -269780,7 +269866,7 @@ async function downloadAndExtractNpmPackage({
269780
269866
  }
269781
269867
  const data = await response.json();
269782
269868
  const latestVersion = data["dist-tags"].latest;
269783
- const tarball = data.versions[version ?? latestVersion].dist.tarball;
269869
+ const tarball = data.versions[latestVersion].dist.tarball;
269784
269870
  await downloadTemplate(tarball, {
269785
269871
  dir: targetDir,
269786
269872
  force: true
@@ -269789,12 +269875,9 @@ async function downloadAndExtractNpmPackage({
269789
269875
 
269790
269876
  // src/commands/create.ts
269791
269877
  function createCommand2() {
269792
- 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 }) => {
269878
+ 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 }) => {
269793
269879
  intro("Creating a new SettleMint project");
269794
269880
  const env2 = await loadEnv(false, false);
269795
- if (version && !template) {
269796
- cancel2("The --version option requires the --template option to be set");
269797
- }
269798
269881
  const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
269799
269882
  const settlemint = createSettleMintClient({
269800
269883
  instance: selectedInstance,
@@ -269813,7 +269896,7 @@ function createCommand2() {
269813
269896
  await mkdir6(projectDir, { recursive: true });
269814
269897
  }
269815
269898
  if (!await isEmpty(projectDir)) {
269816
- const confirmEmpty = await esm_default3({
269899
+ const confirmEmpty = await esm_default4({
269817
269900
  message: `The folder ${projectDir} already exists. Do you want to empty it?`,
269818
269901
  default: false
269819
269902
  });
@@ -269825,11 +269908,7 @@ function createCommand2() {
269825
269908
  await spinner({
269826
269909
  startMessage: "Scaffolding the project",
269827
269910
  task: async () => {
269828
- await downloadAndExtractNpmPackage({
269829
- template: selectedTemplate.npmPackageName,
269830
- version,
269831
- targetDir: projectDir
269832
- });
269911
+ await downloadAndExtractNpmPackage(selectedTemplate.npmPackageName, projectDir);
269833
269912
  await setName(name3, projectDir);
269834
269913
  },
269835
269914
  stopMessage: "Project fully scaffolded"
@@ -269847,7 +269926,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
269847
269926
  return defaultPersonalAccessToken;
269848
269927
  }
269849
269928
  if (existingConfig && defaultPersonalAccessToken) {
269850
- const useExisting = await esm_default3({
269929
+ const useExisting = await esm_default4({
269851
269930
  message: `Do you want to use your existing personal access token for ${instance}?`,
269852
269931
  default: true
269853
269932
  });
@@ -269955,7 +270034,7 @@ function logoutCommand() {
269955
270034
  }
269956
270035
  const env2 = await loadEnv(false, false);
269957
270036
  const defaultInstance = env2.SETTLEMINT_INSTANCE;
269958
- const instance = await esm_default2({
270037
+ const instance = await esm_default3({
269959
270038
  message: "Select the instance to logout from:",
269960
270039
  choices: instances.map((instance2) => ({
269961
270040
  value: instance2,
@@ -270171,7 +270250,7 @@ async function providerPrompt(platformConfig, argument) {
270171
270250
  if (possibleProviders.length === 1) {
270172
270251
  return possibleProviders[0];
270173
270252
  }
270174
- const provider = await esm_default2({
270253
+ const provider = await esm_default3({
270175
270254
  message: "Which provider do you want to use?",
270176
270255
  choices: platformConfig.deploymentEngineTargets.map((target) => ({
270177
270256
  name: target.name,
@@ -270202,7 +270281,7 @@ async function regionPrompt(provider, argument) {
270202
270281
  if (possibleRegions.length === 1) {
270203
270282
  return possibleRegions[0];
270204
270283
  }
270205
- const region = await esm_default2({
270284
+ const region = await esm_default3({
270206
270285
  message: "Which region do you want to use?",
270207
270286
  choices: provider.clusters.map((cluster) => ({
270208
270287
  name: cluster.name,
@@ -270690,7 +270769,7 @@ async function blockchainNetworkPrompt({
270690
270769
  envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
270691
270770
  isRequired,
270692
270771
  defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
270693
- return esm_default2({
270772
+ return esm_default3({
270694
270773
  message: "Which blockchain network do you want to connect to?",
270695
270774
  choices,
270696
270775
  default: defaultNetwork
@@ -271417,7 +271496,7 @@ function createCommand3() {
271417
271496
 
271418
271497
  // src/prompts/delete-confirmation.prompt.ts
271419
271498
  async function deleteConfirmationPrompt(itemDescription) {
271420
- const confirmation = await esm_default4({
271499
+ const confirmation = await esm_default2({
271421
271500
  message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
271422
271501
  required: true,
271423
271502
  validate(value4) {
@@ -271845,9 +271924,7 @@ function configCommand() {
271845
271924
  })).sort((a8, b4) => a8.name.localeCompare(b4.name)),
271846
271925
  kits: kits.map((kit) => ({
271847
271926
  id: kit.id,
271848
- name: kit.name,
271849
- description: kit.description,
271850
- npmPackage: kit.npmPackageName
271927
+ name: kit.name
271851
271928
  })).sort((a8, b4) => a8.name.localeCompare(b4.name)),
271852
271929
  deploymentEngineTargets: platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).flatMap((provider) => provider.clusters.filter((cluster) => !cluster.disabled).map((region) => ({
271853
271930
  providerId: provider.id,
@@ -272288,7 +272365,7 @@ async function useCasePrompt(platformConfig, argument) {
272288
272365
  if (selectableUseCases.length === 1) {
272289
272366
  return selectableUseCases[0];
272290
272367
  }
272291
- const useCase = await esm_default2({
272368
+ const useCase = await esm_default3({
272292
272369
  message: "Which use case do you want to use?",
272293
272370
  choices: selectableUseCases.map((useCase2) => ({
272294
272371
  name: formatUseCaseName(useCase2.name),
@@ -272338,7 +272415,7 @@ function createCommand4() {
272338
272415
  const targetDir = formatTargetDir(name3);
272339
272416
  const projectDir = join10(process.cwd(), targetDir);
272340
272417
  if (await exists3(projectDir) && !await isEmpty(projectDir)) {
272341
- const confirmEmpty = await esm_default3({
272418
+ const confirmEmpty = await esm_default4({
272342
272419
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
272343
272420
  default: false
272344
272421
  });
@@ -272579,7 +272656,7 @@ async function addressPrompt({
272579
272656
  note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
272580
272657
  Please select another key or activate this key on the node and try again.`, "warn");
272581
272658
  }
272582
- const address = await esm_default2({
272659
+ const address = await esm_default3({
272583
272660
  message: "Which private key do you want to deploy from?",
272584
272661
  choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
272585
272662
  name: name3,
@@ -272898,17 +272975,6 @@ import { dirname as dirname10 } from "node:path";
272898
272975
  import { rm as rm4 } from "node:fs/promises";
272899
272976
  var import_semver = __toESM(require_semver2(), 1);
272900
272977
 
272901
- // src/utils/subgraph/sanitize-name.ts
272902
- var import_slugify = __toESM(require_slugify(), 1);
272903
- function sanitizeName(value4, length = 35) {
272904
- return import_slugify.default(value4, {
272905
- strict: true,
272906
- remove: /[!"'()*+.:@~]/g,
272907
- replacement: "-",
272908
- lower: true
272909
- }).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
272910
- }
272911
-
272912
272978
  // src/utils/subgraph/subgraph-config.ts
272913
272979
  import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
272914
272980
  import { basename as basename4, join as join11 } from "node:path";
@@ -273090,40 +273156,6 @@ function subgraphCodegenCommand() {
273090
273156
 
273091
273157
  // src/commands/smart-contract-set/subgraph/deploy.ts
273092
273158
  import { dirname as dirname12 } from "node:path";
273093
-
273094
- // src/prompts/smart-contract-set/subgraph-name.prompt.ts
273095
- async function subgraphNamePrompt({
273096
- defaultName,
273097
- env: env2,
273098
- accept,
273099
- prod
273100
- }) {
273101
- const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
273102
- if (accept) {
273103
- if (defaultSubgraphName && env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== defaultSubgraphName) {
273104
- await saveSubgraphName(defaultSubgraphName, env2, prod);
273105
- }
273106
- return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME;
273107
- }
273108
- const subgraphName = await esm_default4({
273109
- message: "What is the name of your subgraph?",
273110
- default: defaultSubgraphName,
273111
- required: true
273112
- });
273113
- const sanitizedSubgraphName = sanitizeName(subgraphName);
273114
- if (env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== sanitizedSubgraphName) {
273115
- await saveSubgraphName(sanitizedSubgraphName, env2, prod);
273116
- }
273117
- return sanitizedSubgraphName;
273118
- }
273119
- async function saveSubgraphName(sanitizedSubgraphName, env2, prod) {
273120
- await writeEnvSpinner(!!prod, {
273121
- ...env2,
273122
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: sanitizedSubgraphName
273123
- });
273124
- }
273125
-
273126
- // src/commands/smart-contract-set/subgraph/deploy.ts
273127
273159
  function subgraphDeployCommand() {
273128
273160
  return new Command("deploy").description("Deploy the subgraph").usage(createExamples([
273129
273161
  {
@@ -273169,14 +273201,24 @@ function subgraphDeployCommand() {
273169
273201
  cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
273170
273202
  }
273171
273203
  }
273172
- const graphName = await subgraphNamePrompt({
273173
- defaultName: subgraphName,
273174
- env: env2,
273175
- accept: autoAccept,
273176
- prod: !!prod
273177
- });
273204
+ let graphName;
273205
+ if (!subgraphName) {
273206
+ const selectedSubgraphs = await subgraphPrompt({
273207
+ env: env2,
273208
+ accept: autoAccept,
273209
+ message: "Which subgraph do you want to deploy to?",
273210
+ allowNew: true
273211
+ });
273212
+ graphName = selectedSubgraphs[0];
273213
+ } else {
273214
+ graphName = await subgraphNamePrompt({
273215
+ defaultName: subgraphName,
273216
+ env: env2,
273217
+ accept: autoAccept
273218
+ });
273219
+ }
273178
273220
  if (!graphName) {
273179
- cancel2("No graph name provided. Please provide a graph name to continue.");
273221
+ cancel2("No subgraph name provided. Please provide a subgraph name to continue.");
273180
273222
  }
273181
273223
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273182
273224
  await executeCommand(command, [...args, "graph", "create", "--node", middlewareAdminUrl, graphName]);
@@ -273221,14 +273263,20 @@ function subgraphRemoveCommand() {
273221
273263
  description: "Remove a subgraph",
273222
273264
  command: "scs subgraph remove my-subgraph"
273223
273265
  }
273224
- ])).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 }) => {
273266
+ ])).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 }) => {
273225
273267
  intro("Removing subgraph");
273226
273268
  await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
273227
- if (!force) {
273228
- await deleteConfirmationPrompt(`the subgraph ${subgraphName}`);
273229
- }
273230
273269
  const autoAccept = !!acceptDefaults || is_in_ci_default;
273231
273270
  const env2 = await loadEnv(false, !!prod);
273271
+ const selectedSubgraphs = subgraphName ? [subgraphName] : await subgraphPrompt({
273272
+ env: env2,
273273
+ accept: autoAccept,
273274
+ message: "Which subgraph do you want to remove?"
273275
+ });
273276
+ const graphName = selectedSubgraphs[0];
273277
+ if (!force) {
273278
+ await deleteConfirmationPrompt(`the subgraph ${graphName}`);
273279
+ }
273232
273280
  const instance = await instancePrompt(env2, true);
273233
273281
  const accessToken = await getApplicationOrPersonalAccessToken({
273234
273282
  env: env2,
@@ -273246,19 +273294,30 @@ function subgraphRemoveCommand() {
273246
273294
  const cwd2 = dirname13(subgraphYamlFile);
273247
273295
  const { command, args } = await getPackageManagerExecutable();
273248
273296
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273249
- await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, subgraphName]);
273297
+ await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, graphName]);
273250
273298
  const settlemintClient = createSettleMintClient({
273251
273299
  accessToken,
273252
273300
  instance
273253
273301
  });
273254
- const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
273255
- const graphEndpoints = await getGraphEndpoint(settlemintClient, middleware);
273302
+ const graphEndpoints = await spinner({
273303
+ startMessage: "Waiting for subgraph to be removed",
273304
+ task: () => retryWhenFailed2(async () => {
273305
+ const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
273306
+ const endpoints = await getGraphEndpoint(settlemintClient, middleware);
273307
+ if (endpoints.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.some((endpoint) => endpoint.endsWith(graphName))) {
273308
+ throw new Error(`Subgraph '${graphName}' not removed from middleware '${theGraphMiddleware.uniqueName}'`);
273309
+ }
273310
+ return endpoints;
273311
+ }, 5, 5000),
273312
+ stopMessage: "Waiting finished"
273313
+ });
273256
273314
  await writeEnvSpinner(!!prod, {
273257
273315
  ...env2,
273258
273316
  SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
273317
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH === graphName ? undefined : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
273259
273318
  ...graphEndpoints
273260
273319
  });
273261
- outro(`Subgraph ${subgraphName} removed successfully`);
273320
+ outro(`Subgraph ${graphName} removed successfully`);
273262
273321
  });
273263
273322
  }
273264
273323
 
@@ -273401,4 +273460,4 @@ async function sdkCliCommand(argv = process.argv) {
273401
273460
  // src/cli.ts
273402
273461
  sdkCliCommand();
273403
273462
 
273404
- //# debugId=DF68DCA98A86439564756E2164756E21
273463
+ //# debugId=BC0E55790020BD2764756E2164756E21