@settlemint/sdk-cli 1.1.14-preff51751 → 1.1.15-pr11a30e63

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.14-preff51751",
259686
+ version: "1.1.15-pr11a30e63",
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.14-preff51751",
259735
- "@settlemint/sdk-utils": "1.1.14-preff51751",
259734
+ "@settlemint/sdk-js": "1.1.15-pr11a30e63",
259735
+ "@settlemint/sdk-utils": "1.1.15-pr11a30e63",
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(),
@@ -262965,6 +262965,7 @@ var getPlatformConfigQuery = graphql(`
262965
262965
  kits {
262966
262966
  id
262967
262967
  name
262968
+ description
262968
262969
  npmPackageName
262969
262970
  }
262970
262971
  }
@@ -264002,6 +264003,21 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
264002
264003
  });`
264003
264004
  ]);
264004
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
+ }
264005
264021
  await writeTemplate(template.join(`
264006
264022
  `), "/lib/settlemint", "the-graph.ts");
264007
264023
  const projectDir = await projectRoot3();
@@ -265060,6 +265076,101 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
265060
265076
  };
265061
265077
  }
265062
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
+
265063
265174
  // ../../node_modules/@inquirer/select/dist/esm/index.js
265064
265175
  var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
265065
265176
  var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
@@ -265096,7 +265207,7 @@ function normalizeChoices(choices) {
265096
265207
  };
265097
265208
  });
265098
265209
  }
265099
- var esm_default2 = createPrompt((config3, done) => {
265210
+ var esm_default3 = createPrompt((config3, done) => {
265100
265211
  const { loop = true, pageSize = 7 } = config3;
265101
265212
  const firstRender = useRef(true);
265102
265213
  const theme = makeTheme(selectTheme, config3.theme);
@@ -265202,11 +265313,19 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursor
265202
265313
 
265203
265314
  // src/prompts/smart-contract-set/subgraph.prompt.ts
265204
265315
  var ALL = "All";
265205
- async function subgraphPrompt(env2, accept) {
265206
- 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;
265207
265326
  const subgraphNames = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.map((endpoint) => endpoint.split("/").pop()).filter(Boolean) ?? [];
265208
265327
  if (autoAccept) {
265209
- return subgraphNames;
265328
+ return allowAll ? subgraphNames : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ? [env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH] : [];
265210
265329
  }
265211
265330
  if (subgraphNames.length === 0) {
265212
265331
  cancel2("No subgraphs found");
@@ -265214,17 +265333,43 @@ async function subgraphPrompt(env2, accept) {
265214
265333
  if (subgraphNames.length === 1) {
265215
265334
  return subgraphNames;
265216
265335
  }
265217
- const subgraphName = await esm_default2({
265218
- message: "Which The Graph subgraph do you want to generate types for?",
265219
- 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) => ({
265220
265354
  name: name3,
265221
265355
  value: name3
265222
265356
  })),
265223
- default: ALL
265357
+ default: defaultChoice
265224
265358
  });
265225
265359
  if (!subgraphName) {
265226
265360
  cancel2("No subgraph selected");
265227
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
+ }
265228
265373
  return subgraphName === ALL ? subgraphNames : [subgraphName];
265229
265374
  }
265230
265375
 
@@ -265485,7 +265630,12 @@ function codegenCommand() {
265485
265630
  intro("Generating GraphQL types and queries for your dApp");
265486
265631
  const env2 = await loadEnv(true, !!prod);
265487
265632
  if (!Array.isArray(thegraphSubgraphNames)) {
265488
- 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
+ });
265489
265639
  }
265490
265640
  const { hasura, portal, thegraph, blockscout } = await spinner({
265491
265641
  startMessage: "Testing configured GraphQL schema",
@@ -265540,7 +265690,7 @@ function getBooleanValue(value4, defaultValue) {
265540
265690
  function boolToString(value4) {
265541
265691
  return value4 ? "Yes" : "No";
265542
265692
  }
265543
- var esm_default3 = createPrompt((config3, done) => {
265693
+ var esm_default4 = createPrompt((config3, done) => {
265544
265694
  const { transformer = boolToString } = config3;
265545
265695
  const [status, setStatus] = useState("idle");
265546
265696
  const [value4, setValue] = useState("");
@@ -265572,72 +265722,6 @@ var esm_default3 = createPrompt((config3, done) => {
265572
265722
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
265573
265723
  });
265574
265724
 
265575
- // ../../node_modules/@inquirer/input/dist/esm/index.js
265576
- var inputTheme = {
265577
- validationFailureMode: "keep"
265578
- };
265579
- var esm_default4 = createPrompt((config3, done) => {
265580
- const { required, validate: validate3 = () => true } = config3;
265581
- const theme = makeTheme(inputTheme, config3.theme);
265582
- const [status, setStatus] = useState("idle");
265583
- const [defaultValue = "", setDefaultValue] = useState(config3.default);
265584
- const [errorMsg, setError] = useState();
265585
- const [value4, setValue] = useState("");
265586
- const prefix = usePrefix({ status, theme });
265587
- useKeypress(async (key2, rl) => {
265588
- if (status !== "idle") {
265589
- return;
265590
- }
265591
- if (isEnterKey(key2)) {
265592
- const answer = value4 || defaultValue;
265593
- setStatus("loading");
265594
- const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
265595
- if (isValid2 === true) {
265596
- setValue(answer);
265597
- setStatus("done");
265598
- done(answer);
265599
- } else {
265600
- if (theme.validationFailureMode === "clear") {
265601
- setValue("");
265602
- } else {
265603
- rl.write(value4);
265604
- }
265605
- setError(isValid2 || "You must provide a valid value");
265606
- setStatus("idle");
265607
- }
265608
- } else if (isBackspaceKey(key2) && !value4) {
265609
- setDefaultValue(undefined);
265610
- } else if (key2.name === "tab" && !value4) {
265611
- setDefaultValue(undefined);
265612
- rl.clearLine(0);
265613
- rl.write(defaultValue);
265614
- setValue(defaultValue);
265615
- } else {
265616
- setValue(rl.line);
265617
- setError(undefined);
265618
- }
265619
- });
265620
- const message = theme.style.message(config3.message, status);
265621
- let formattedValue = value4;
265622
- if (typeof config3.transformer === "function") {
265623
- formattedValue = config3.transformer(value4, { isFinal: status === "done" });
265624
- } else if (status === "done") {
265625
- formattedValue = theme.style.answer(value4);
265626
- }
265627
- let defaultStr;
265628
- if (defaultValue && status !== "done" && !value4) {
265629
- defaultStr = theme.style.defaultAnswer(defaultValue);
265630
- }
265631
- let error5 = "";
265632
- if (errorMsg) {
265633
- error5 = theme.style.error(errorMsg);
265634
- }
265635
- return [
265636
- [prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
265637
- error5
265638
- ];
265639
- });
265640
-
265641
265725
  // ../../node_modules/@inquirer/password/dist/esm/index.js
265642
265726
  var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
265643
265727
  var esm_default5 = createPrompt((config3, done) => {
@@ -265698,7 +265782,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
265698
265782
  return defaultAccessToken;
265699
265783
  }
265700
265784
  if (defaultAccessToken) {
265701
- const keep = await esm_default3({
265785
+ const keep = await esm_default4({
265702
265786
  message: "Do you want to use the existing application access token?",
265703
265787
  default: true
265704
265788
  });
@@ -265706,12 +265790,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
265706
265790
  return defaultAccessToken;
265707
265791
  }
265708
265792
  }
265709
- const create2 = await esm_default3({
265793
+ const create2 = await esm_default4({
265710
265794
  message: "Do you want to create a new application access token?",
265711
265795
  default: false
265712
265796
  });
265713
265797
  if (create2) {
265714
- const name3 = await esm_default4({
265798
+ const name3 = await esm_default2({
265715
265799
  message: "How would you like to name this application access token?",
265716
265800
  default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
265717
265801
  required: true,
@@ -265807,7 +265891,7 @@ async function applicationPrompt(env2, applications, accept) {
265807
265891
  if (is_in_ci_default) {
265808
265892
  nothingSelectedError("application");
265809
265893
  }
265810
- const application = await esm_default2({
265894
+ const application = await esm_default3({
265811
265895
  message: "Which application do you want to connect to?",
265812
265896
  choices: applications.map((applications2) => ({
265813
265897
  name: `${applications2.name} (${applications2.uniqueName})`,
@@ -265880,7 +265964,7 @@ async function blockchainNodePrompt({
265880
265964
  isRequired,
265881
265965
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
265882
265966
  const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
265883
- return esm_default2({
265967
+ return esm_default3({
265884
265968
  message: promptMessage ?? "Which blockchain node do you want to connect to?",
265885
265969
  choices: filteredChoices,
265886
265970
  default: defaultNode
@@ -265905,7 +265989,7 @@ async function blockscoutPrompt({
265905
265989
  envKey: "SETTLEMINT_BLOCKSCOUT",
265906
265990
  isRequired,
265907
265991
  defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
265908
- return esm_default2({
265992
+ return esm_default3({
265909
265993
  message: "Which blockscout instance do you want to connect to?",
265910
265994
  choices,
265911
265995
  default: defaultBlockscout
@@ -265928,7 +266012,7 @@ async function customDeploymentPrompt({
265928
266012
  envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
265929
266013
  isRequired,
265930
266014
  defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
265931
- return esm_default2({
266015
+ return esm_default3({
265932
266016
  message: "Which Custom Deployment do you want to connect to?",
265933
266017
  choices,
265934
266018
  default: defaultCustomDeployment
@@ -265952,7 +266036,7 @@ async function hasuraPrompt({
265952
266036
  envKey: "SETTLEMINT_HASURA",
265953
266037
  isRequired,
265954
266038
  defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
265955
- return esm_default2({
266039
+ return esm_default3({
265956
266040
  message: "Which Hasura instance do you want to connect to?",
265957
266041
  choices,
265958
266042
  default: defaultHasura
@@ -265976,7 +266060,7 @@ async function hdPrivateKeyPrompt({
265976
266060
  envKey: "SETTLEMINT_HD_PRIVATE_KEY",
265977
266061
  isRequired,
265978
266062
  defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
265979
- return esm_default2({
266063
+ return esm_default3({
265980
266064
  message: "Which HD Private Key do you want to use?",
265981
266065
  choices,
265982
266066
  default: defaultPrivateKey
@@ -266000,7 +266084,7 @@ async function ipfsPrompt({
266000
266084
  envKey: "SETTLEMINT_IPFS",
266001
266085
  isRequired,
266002
266086
  defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
266003
- return esm_default2({
266087
+ return esm_default3({
266004
266088
  message: "Which IPFS instance do you want to connect to?",
266005
266089
  choices,
266006
266090
  default: defaultStorage
@@ -266024,7 +266108,7 @@ async function minioPrompt({
266024
266108
  envKey: "SETTLEMINT_MINIO",
266025
266109
  isRequired,
266026
266110
  defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
266027
- return esm_default2({
266111
+ return esm_default3({
266028
266112
  message: "Which MinIO instance do you want to connect to?",
266029
266113
  choices,
266030
266114
  default: defaultStorage
@@ -266048,7 +266132,7 @@ async function portalPrompt({
266048
266132
  envKey: "SETTLEMINT_PORTAL",
266049
266133
  isRequired,
266050
266134
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
266051
- return esm_default2({
266135
+ return esm_default3({
266052
266136
  message: "Which Smart Contract Portal instance do you want to connect to?",
266053
266137
  choices,
266054
266138
  default: defaultMiddleware
@@ -266077,7 +266161,7 @@ async function theGraphPrompt({
266077
266161
  isRequired,
266078
266162
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
266079
266163
  const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
266080
- return esm_default2({
266164
+ return esm_default3({
266081
266165
  message: "Which The Graph instance do you want to connect to?",
266082
266166
  choices: filteredChoices,
266083
266167
  default: defaultMiddleware
@@ -266111,7 +266195,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
266111
266195
  return sanitizeInstanceUrl(defaultPromptInstance);
266112
266196
  }
266113
266197
  if (freeTextInput) {
266114
- const instance = await esm_default4({
266198
+ const instance = await esm_default2({
266115
266199
  message: "What is the URL of your SettleMint instance?",
266116
266200
  default: defaultPromptInstance,
266117
266201
  required: true,
@@ -266133,7 +266217,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
266133
266217
  if (knownInstances.length === 1) {
266134
266218
  return sanitizeInstanceUrl(knownInstances[0]);
266135
266219
  }
266136
- return esm_default2({
266220
+ return esm_default3({
266137
266221
  message: "What SettleMint instance do you want to connect to?",
266138
266222
  choices: [
266139
266223
  ...knownInstances.map((instance) => ({
@@ -266159,7 +266243,7 @@ async function workspacePrompt(env2, workspaces, accept) {
266159
266243
  if (is_in_ci_default) {
266160
266244
  nothingSelectedError("workspace");
266161
266245
  }
266162
- const workspace = await esm_default2({
266246
+ const workspace = await esm_default3({
266163
266247
  message: "Which workspace do you want to connect to?",
266164
266248
  choices: workspaces.map((workspace2) => ({
266165
266249
  name: `${workspace2.name} (${workspace2.uniqueName})`,
@@ -266252,7 +266336,7 @@ async function writeEnvSpinner(prod, env2) {
266252
266336
  SETTLEMINT_HASURA_ENDPOINT: env2.SETTLEMINT_HASURA_ENDPOINT,
266253
266337
  SETTLEMINT_THEGRAPH: env2.SETTLEMINT_THEGRAPH,
266254
266338
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS,
266255
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME,
266339
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
266256
266340
  SETTLEMINT_PORTAL: env2.SETTLEMINT_PORTAL,
266257
266341
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
266258
266342
  SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
@@ -266390,6 +266474,12 @@ function connectCommand() {
266390
266474
  middlewares,
266391
266475
  accept: acceptDefaults
266392
266476
  });
266477
+ const graphEndpoints = await getGraphEndpoint(settlemint, thegraph);
266478
+ const [defaultSubgraph] = thegraph ? await subgraphPrompt({
266479
+ env: { ...env2, ...graphEndpoints },
266480
+ accept: acceptDefaults,
266481
+ message: "Which TheGraph subgraph do you want to use as the default?"
266482
+ }) : [];
266393
266483
  const portal = await portalPrompt({
266394
266484
  env: env2,
266395
266485
  middlewares,
@@ -266495,7 +266585,8 @@ function connectCommand() {
266495
266585
  SETTLEMINT_HASURA: hasura?.uniqueName,
266496
266586
  ...getHasuraEndpoints(hasura),
266497
266587
  SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
266498
- ...await getGraphEndpoint(settlemint, thegraph),
266588
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: defaultSubgraph,
266589
+ ...graphEndpoints,
266499
266590
  SETTLEMINT_PORTAL: portal?.uniqueName,
266500
266591
  ...getPortalEndpoints(portal),
266501
266592
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
@@ -266522,7 +266613,7 @@ async function projectNamePrompt(env2, argument) {
266522
266613
  if (defaultInstance) {
266523
266614
  return defaultInstance;
266524
266615
  }
266525
- return esm_default4({
266616
+ return esm_default2({
266526
266617
  message: "What is the name of your new SettleMint project?",
266527
266618
  default: defaultInstance,
266528
266619
  required: true,
@@ -266553,22 +266644,22 @@ async function templatePrompt(platformConfig, argument) {
266553
266644
  }
266554
266645
  const defaultInstance = argument;
266555
266646
  if (defaultInstance) {
266556
- const template = kits.find((kit) => kit.id === argument);
266557
- if (!template) {
266647
+ const template2 = kits.find((kit) => kit.id === argument);
266648
+ if (!template2) {
266558
266649
  cancel2(`No template found with name '${argument}'`);
266559
266650
  }
266560
- return template;
266651
+ return template2;
266561
266652
  }
266562
- const selectedValue = await esm_default2({
266653
+ const template = await esm_default3({
266563
266654
  message: "Which template do you want to use?",
266564
266655
  choices: [
266565
- ...kits.map((template) => ({
266566
- name: template.name,
266567
- value: template
266656
+ ...kits.map((template2) => ({
266657
+ name: template2.name,
266658
+ value: template2
266568
266659
  })).sort((a7, b4) => a7.name.localeCompare(b4.name))
266569
266660
  ]
266570
266661
  });
266571
- return selectedValue;
266662
+ return template;
266572
266663
  }
266573
266664
 
266574
266665
  // src/utils/download-extract.ts
@@ -269805,7 +269896,7 @@ function createCommand2() {
269805
269896
  await mkdir6(projectDir, { recursive: true });
269806
269897
  }
269807
269898
  if (!await isEmpty(projectDir)) {
269808
- const confirmEmpty = await esm_default3({
269899
+ const confirmEmpty = await esm_default4({
269809
269900
  message: `The folder ${projectDir} already exists. Do you want to empty it?`,
269810
269901
  default: false
269811
269902
  });
@@ -269835,7 +269926,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
269835
269926
  return defaultPersonalAccessToken;
269836
269927
  }
269837
269928
  if (existingConfig && defaultPersonalAccessToken) {
269838
- const useExisting = await esm_default3({
269929
+ const useExisting = await esm_default4({
269839
269930
  message: `Do you want to use your existing personal access token for ${instance}?`,
269840
269931
  default: true
269841
269932
  });
@@ -269943,7 +270034,7 @@ function logoutCommand() {
269943
270034
  }
269944
270035
  const env2 = await loadEnv(false, false);
269945
270036
  const defaultInstance = env2.SETTLEMINT_INSTANCE;
269946
- const instance = await esm_default2({
270037
+ const instance = await esm_default3({
269947
270038
  message: "Select the instance to logout from:",
269948
270039
  choices: instances.map((instance2) => ({
269949
270040
  value: instance2,
@@ -270159,7 +270250,7 @@ async function providerPrompt(platformConfig, argument) {
270159
270250
  if (possibleProviders.length === 1) {
270160
270251
  return possibleProviders[0];
270161
270252
  }
270162
- const provider = await esm_default2({
270253
+ const provider = await esm_default3({
270163
270254
  message: "Which provider do you want to use?",
270164
270255
  choices: platformConfig.deploymentEngineTargets.map((target) => ({
270165
270256
  name: target.name,
@@ -270190,7 +270281,7 @@ async function regionPrompt(provider, argument) {
270190
270281
  if (possibleRegions.length === 1) {
270191
270282
  return possibleRegions[0];
270192
270283
  }
270193
- const region = await esm_default2({
270284
+ const region = await esm_default3({
270194
270285
  message: "Which region do you want to use?",
270195
270286
  choices: provider.clusters.map((cluster) => ({
270196
270287
  name: cluster.name,
@@ -270678,7 +270769,7 @@ async function blockchainNetworkPrompt({
270678
270769
  envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
270679
270770
  isRequired,
270680
270771
  defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
270681
- return esm_default2({
270772
+ return esm_default3({
270682
270773
  message: "Which blockchain network do you want to connect to?",
270683
270774
  choices,
270684
270775
  default: defaultNetwork
@@ -271405,7 +271496,7 @@ function createCommand3() {
271405
271496
 
271406
271497
  // src/prompts/delete-confirmation.prompt.ts
271407
271498
  async function deleteConfirmationPrompt(itemDescription) {
271408
- const confirmation = await esm_default4({
271499
+ const confirmation = await esm_default2({
271409
271500
  message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
271410
271501
  required: true,
271411
271502
  validate(value4) {
@@ -272274,7 +272365,7 @@ async function useCasePrompt(platformConfig, argument) {
272274
272365
  if (selectableUseCases.length === 1) {
272275
272366
  return selectableUseCases[0];
272276
272367
  }
272277
- const useCase = await esm_default2({
272368
+ const useCase = await esm_default3({
272278
272369
  message: "Which use case do you want to use?",
272279
272370
  choices: selectableUseCases.map((useCase2) => ({
272280
272371
  name: formatUseCaseName(useCase2.name),
@@ -272324,7 +272415,7 @@ function createCommand4() {
272324
272415
  const targetDir = formatTargetDir(name3);
272325
272416
  const projectDir = join10(process.cwd(), targetDir);
272326
272417
  if (await exists3(projectDir) && !await isEmpty(projectDir)) {
272327
- const confirmEmpty = await esm_default3({
272418
+ const confirmEmpty = await esm_default4({
272328
272419
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
272329
272420
  default: false
272330
272421
  });
@@ -272565,7 +272656,7 @@ async function addressPrompt({
272565
272656
  note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
272566
272657
  Please select another key or activate this key on the node and try again.`, "warn");
272567
272658
  }
272568
- const address = await esm_default2({
272659
+ const address = await esm_default3({
272569
272660
  message: "Which private key do you want to deploy from?",
272570
272661
  choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
272571
272662
  name: name3,
@@ -272884,17 +272975,6 @@ import { dirname as dirname10 } from "node:path";
272884
272975
  import { rm as rm4 } from "node:fs/promises";
272885
272976
  var import_semver = __toESM(require_semver2(), 1);
272886
272977
 
272887
- // src/utils/subgraph/sanitize-name.ts
272888
- var import_slugify = __toESM(require_slugify(), 1);
272889
- function sanitizeName(value4, length = 35) {
272890
- return import_slugify.default(value4, {
272891
- strict: true,
272892
- remove: /[!"'()*+.:@~]/g,
272893
- replacement: "-",
272894
- lower: true
272895
- }).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
272896
- }
272897
-
272898
272978
  // src/utils/subgraph/subgraph-config.ts
272899
272979
  import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
272900
272980
  import { basename as basename4, join as join11 } from "node:path";
@@ -273076,40 +273156,6 @@ function subgraphCodegenCommand() {
273076
273156
 
273077
273157
  // src/commands/smart-contract-set/subgraph/deploy.ts
273078
273158
  import { dirname as dirname12 } from "node:path";
273079
-
273080
- // src/prompts/smart-contract-set/subgraph-name.prompt.ts
273081
- async function subgraphNamePrompt({
273082
- defaultName,
273083
- env: env2,
273084
- accept,
273085
- prod
273086
- }) {
273087
- const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
273088
- if (accept) {
273089
- if (defaultSubgraphName && env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== defaultSubgraphName) {
273090
- await saveSubgraphName(defaultSubgraphName, env2, prod);
273091
- }
273092
- return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME;
273093
- }
273094
- const subgraphName = await esm_default4({
273095
- message: "What is the name of your subgraph?",
273096
- default: defaultSubgraphName,
273097
- required: true
273098
- });
273099
- const sanitizedSubgraphName = sanitizeName(subgraphName);
273100
- if (env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== sanitizedSubgraphName) {
273101
- await saveSubgraphName(sanitizedSubgraphName, env2, prod);
273102
- }
273103
- return sanitizedSubgraphName;
273104
- }
273105
- async function saveSubgraphName(sanitizedSubgraphName, env2, prod) {
273106
- await writeEnvSpinner(!!prod, {
273107
- ...env2,
273108
- SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: sanitizedSubgraphName
273109
- });
273110
- }
273111
-
273112
- // src/commands/smart-contract-set/subgraph/deploy.ts
273113
273159
  function subgraphDeployCommand() {
273114
273160
  return new Command("deploy").description("Deploy the subgraph").usage(createExamples([
273115
273161
  {
@@ -273155,14 +273201,24 @@ function subgraphDeployCommand() {
273155
273201
  cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
273156
273202
  }
273157
273203
  }
273158
- const graphName = await subgraphNamePrompt({
273159
- defaultName: subgraphName,
273160
- env: env2,
273161
- accept: autoAccept,
273162
- prod: !!prod
273163
- });
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
+ }
273164
273220
  if (!graphName) {
273165
- cancel2("No graph name provided. Please provide a graph name to continue.");
273221
+ cancel2("No subgraph name provided. Please provide a graph name to continue.");
273166
273222
  }
273167
273223
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273168
273224
  await executeCommand(command, [...args, "graph", "create", "--node", middlewareAdminUrl, graphName]);
@@ -273207,14 +273263,20 @@ function subgraphRemoveCommand() {
273207
273263
  description: "Remove a subgraph",
273208
273264
  command: "scs subgraph remove my-subgraph"
273209
273265
  }
273210
- ])).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 deploy (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults, force }) => {
273211
273267
  intro("Removing subgraph");
273212
273268
  await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
273213
- if (!force) {
273214
- await deleteConfirmationPrompt(`the subgraph ${subgraphName}`);
273215
- }
273216
273269
  const autoAccept = !!acceptDefaults || is_in_ci_default;
273217
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
+ }
273218
273280
  const instance = await instancePrompt(env2, true);
273219
273281
  const accessToken = await getApplicationOrPersonalAccessToken({
273220
273282
  env: env2,
@@ -273232,19 +273294,30 @@ function subgraphRemoveCommand() {
273232
273294
  const cwd2 = dirname13(subgraphYamlFile);
273233
273295
  const { command, args } = await getPackageManagerExecutable();
273234
273296
  const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
273235
- await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, subgraphName]);
273297
+ await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, graphName]);
273236
273298
  const settlemintClient = createSettleMintClient({
273237
273299
  accessToken,
273238
273300
  instance
273239
273301
  });
273240
- const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
273241
- 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
+ });
273242
273314
  await writeEnvSpinner(!!prod, {
273243
273315
  ...env2,
273244
273316
  SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
273317
+ SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH === graphName ? undefined : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
273245
273318
  ...graphEndpoints
273246
273319
  });
273247
- outro(`Subgraph ${subgraphName} removed successfully`);
273320
+ outro(`Subgraph ${graphName} removed successfully`);
273248
273321
  });
273249
273322
  }
273250
273323
 
@@ -273387,4 +273460,4 @@ async function sdkCliCommand(argv = process.argv) {
273387
273460
  // src/cli.ts
273388
273461
  sdkCliCommand();
273389
273462
 
273390
- //# debugId=B5325EE65B66B31264756E2164756E21
273463
+ //# debugId=6703B75888577C4E64756E2164756E21