@settlemint/sdk-cli 1.0.5 → 1.0.6
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/README.md +21 -1
- package/dist/cli.js +369 -303
- package/dist/cli.js.map +46 -44
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -13822,10 +13822,10 @@ var require_source_map_support = __commonJS((exports, module) => {
|
|
|
13822
13822
|
return process.exit(code);
|
|
13823
13823
|
}
|
|
13824
13824
|
}
|
|
13825
|
-
function handlerExec(
|
|
13825
|
+
function handlerExec(list2) {
|
|
13826
13826
|
return function(arg) {
|
|
13827
|
-
for (var i = 0;i <
|
|
13828
|
-
var ret =
|
|
13827
|
+
for (var i = 0;i < list2.length; i++) {
|
|
13828
|
+
var ret = list2[i](arg);
|
|
13829
13829
|
if (ret) {
|
|
13830
13830
|
return ret;
|
|
13831
13831
|
}
|
|
@@ -34433,8 +34433,8 @@ ${lanes.join(`
|
|
|
34433
34433
|
function getLinesBetweenRangeEndPositions(range1, range2, sourceFile) {
|
|
34434
34434
|
return getLinesBetweenPositions(sourceFile, range1.end, range2.end);
|
|
34435
34435
|
}
|
|
34436
|
-
function isNodeArrayMultiLine(
|
|
34437
|
-
return !positionsAreOnSameLine(
|
|
34436
|
+
function isNodeArrayMultiLine(list2, sourceFile) {
|
|
34437
|
+
return !positionsAreOnSameLine(list2.pos, list2.end, sourceFile);
|
|
34438
34438
|
}
|
|
34439
34439
|
function positionsAreOnSameLine(pos1, pos2, sourceFile) {
|
|
34440
34440
|
return getLinesBetweenPositions(sourceFile, pos1, pos2) === 0;
|
|
@@ -46227,11 +46227,11 @@ ${lanes.join(`
|
|
|
46227
46227
|
function parseList(kind, parseElement) {
|
|
46228
46228
|
const saveParsingContext = parsingContext;
|
|
46229
46229
|
parsingContext |= 1 << kind;
|
|
46230
|
-
const
|
|
46230
|
+
const list2 = [];
|
|
46231
46231
|
const listPos = getNodePos();
|
|
46232
46232
|
while (!isListTerminator(kind)) {
|
|
46233
46233
|
if (isListElement2(kind, false)) {
|
|
46234
|
-
|
|
46234
|
+
list2.push(parseListElement(kind, parseElement));
|
|
46235
46235
|
continue;
|
|
46236
46236
|
}
|
|
46237
46237
|
if (abortParsingListOrMoveToNextToken(kind)) {
|
|
@@ -46239,7 +46239,7 @@ ${lanes.join(`
|
|
|
46239
46239
|
}
|
|
46240
46240
|
}
|
|
46241
46241
|
parsingContext = saveParsingContext;
|
|
46242
|
-
return createNodeArray(
|
|
46242
|
+
return createNodeArray(list2, listPos);
|
|
46243
46243
|
}
|
|
46244
46244
|
function parseListElement(parsingContext2, parseElement) {
|
|
46245
46245
|
const node = currentNode(parsingContext2);
|
|
@@ -46480,7 +46480,7 @@ ${lanes.join(`
|
|
|
46480
46480
|
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
|
|
46481
46481
|
const saveParsingContext = parsingContext;
|
|
46482
46482
|
parsingContext |= 1 << kind;
|
|
46483
|
-
const
|
|
46483
|
+
const list2 = [];
|
|
46484
46484
|
const listPos = getNodePos();
|
|
46485
46485
|
let commaStart = -1;
|
|
46486
46486
|
while (true) {
|
|
@@ -46491,7 +46491,7 @@ ${lanes.join(`
|
|
|
46491
46491
|
parsingContext = saveParsingContext;
|
|
46492
46492
|
return;
|
|
46493
46493
|
}
|
|
46494
|
-
|
|
46494
|
+
list2.push(result);
|
|
46495
46495
|
commaStart = scanner2.getTokenStart();
|
|
46496
46496
|
if (parseOptional(28)) {
|
|
46497
46497
|
continue;
|
|
@@ -46517,15 +46517,15 @@ ${lanes.join(`
|
|
|
46517
46517
|
}
|
|
46518
46518
|
}
|
|
46519
46519
|
parsingContext = saveParsingContext;
|
|
46520
|
-
return createNodeArray(
|
|
46520
|
+
return createNodeArray(list2, listPos, undefined, commaStart >= 0);
|
|
46521
46521
|
}
|
|
46522
46522
|
function getExpectedCommaDiagnostic(kind) {
|
|
46523
46523
|
return kind === 6 ? Diagnostics.An_enum_member_name_must_be_followed_by_a_or : undefined;
|
|
46524
46524
|
}
|
|
46525
46525
|
function createMissingList() {
|
|
46526
|
-
const
|
|
46527
|
-
|
|
46528
|
-
return
|
|
46526
|
+
const list2 = createNodeArray([], getNodePos());
|
|
46527
|
+
list2.isMissingList = true;
|
|
46528
|
+
return list2;
|
|
46529
46529
|
}
|
|
46530
46530
|
function isMissingList(arr) {
|
|
46531
46531
|
return !!arr.isMissingList;
|
|
@@ -46570,13 +46570,13 @@ ${lanes.join(`
|
|
|
46570
46570
|
}
|
|
46571
46571
|
function parseTemplateSpans(isTaggedTemplate) {
|
|
46572
46572
|
const pos = getNodePos();
|
|
46573
|
-
const
|
|
46573
|
+
const list2 = [];
|
|
46574
46574
|
let node;
|
|
46575
46575
|
do {
|
|
46576
46576
|
node = parseTemplateSpan(isTaggedTemplate);
|
|
46577
|
-
|
|
46577
|
+
list2.push(node);
|
|
46578
46578
|
} while (node.literal.kind === 17);
|
|
46579
|
-
return createNodeArray(
|
|
46579
|
+
return createNodeArray(list2, pos);
|
|
46580
46580
|
}
|
|
46581
46581
|
function parseTemplateExpression(isTaggedTemplate) {
|
|
46582
46582
|
const pos = getNodePos();
|
|
@@ -46588,13 +46588,13 @@ ${lanes.join(`
|
|
|
46588
46588
|
}
|
|
46589
46589
|
function parseTemplateTypeSpans() {
|
|
46590
46590
|
const pos = getNodePos();
|
|
46591
|
-
const
|
|
46591
|
+
const list2 = [];
|
|
46592
46592
|
let node;
|
|
46593
46593
|
do {
|
|
46594
46594
|
node = parseTemplateTypeSpan();
|
|
46595
|
-
|
|
46595
|
+
list2.push(node);
|
|
46596
46596
|
} while (node.literal.kind === 17);
|
|
46597
|
-
return createNodeArray(
|
|
46597
|
+
return createNodeArray(list2, pos);
|
|
46598
46598
|
}
|
|
46599
46599
|
function parseTemplateTypeSpan() {
|
|
46600
46600
|
const pos = getNodePos();
|
|
@@ -48094,7 +48094,7 @@ ${lanes.join(`
|
|
|
48094
48094
|
}
|
|
48095
48095
|
}
|
|
48096
48096
|
function parseJsxChildren(openingTag) {
|
|
48097
|
-
const
|
|
48097
|
+
const list2 = [];
|
|
48098
48098
|
const listPos = getNodePos();
|
|
48099
48099
|
const saveParsingContext = parsingContext;
|
|
48100
48100
|
parsingContext |= 1 << 14;
|
|
@@ -48102,13 +48102,13 @@ ${lanes.join(`
|
|
|
48102
48102
|
const child = parseJsxChild(openingTag, currentToken = scanner2.reScanJsxToken());
|
|
48103
48103
|
if (!child)
|
|
48104
48104
|
break;
|
|
48105
|
-
|
|
48105
|
+
list2.push(child);
|
|
48106
48106
|
if (isJsxOpeningElement(openingTag) && (child == null ? undefined : child.kind) === 284 && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) {
|
|
48107
48107
|
break;
|
|
48108
48108
|
}
|
|
48109
48109
|
}
|
|
48110
48110
|
parsingContext = saveParsingContext;
|
|
48111
|
-
return createNodeArray(
|
|
48111
|
+
return createNodeArray(list2, listPos);
|
|
48112
48112
|
}
|
|
48113
48113
|
function parseJsxAttributes() {
|
|
48114
48114
|
const pos = getNodePos();
|
|
@@ -49465,22 +49465,22 @@ ${lanes.join(`
|
|
|
49465
49465
|
}
|
|
49466
49466
|
function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
49467
49467
|
const pos = getNodePos();
|
|
49468
|
-
let
|
|
49468
|
+
let list2;
|
|
49469
49469
|
let decorator, modifier, hasSeenStaticModifier = false, hasLeadingModifier = false, hasTrailingDecorator = false;
|
|
49470
49470
|
if (allowDecorators && token() === 60) {
|
|
49471
49471
|
while (decorator = tryParseDecorator()) {
|
|
49472
|
-
|
|
49472
|
+
list2 = append(list2, decorator);
|
|
49473
49473
|
}
|
|
49474
49474
|
}
|
|
49475
49475
|
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
49476
49476
|
if (modifier.kind === 126)
|
|
49477
49477
|
hasSeenStaticModifier = true;
|
|
49478
|
-
|
|
49478
|
+
list2 = append(list2, modifier);
|
|
49479
49479
|
hasLeadingModifier = true;
|
|
49480
49480
|
}
|
|
49481
49481
|
if (hasLeadingModifier && allowDecorators && token() === 60) {
|
|
49482
49482
|
while (decorator = tryParseDecorator()) {
|
|
49483
|
-
|
|
49483
|
+
list2 = append(list2, decorator);
|
|
49484
49484
|
hasTrailingDecorator = true;
|
|
49485
49485
|
}
|
|
49486
49486
|
}
|
|
@@ -49488,10 +49488,10 @@ ${lanes.join(`
|
|
|
49488
49488
|
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
49489
49489
|
if (modifier.kind === 126)
|
|
49490
49490
|
hasSeenStaticModifier = true;
|
|
49491
|
-
|
|
49491
|
+
list2 = append(list2, modifier);
|
|
49492
49492
|
}
|
|
49493
49493
|
}
|
|
49494
|
-
return
|
|
49494
|
+
return list2 && createNodeArray(list2, pos);
|
|
49495
49495
|
}
|
|
49496
49496
|
function parseModifiersForArrowFunction() {
|
|
49497
49497
|
let modifiers;
|
|
@@ -54059,14 +54059,14 @@ ${lanes.join(`
|
|
|
54059
54059
|
function getSubstitutedPathWithConfigDirTemplate(value, basePath) {
|
|
54060
54060
|
return getNormalizedAbsolutePath(value.replace(configDirTemplate, "./"), basePath);
|
|
54061
54061
|
}
|
|
54062
|
-
function getSubstitutedStringArrayWithConfigDirTemplate(
|
|
54063
|
-
if (!
|
|
54064
|
-
return
|
|
54062
|
+
function getSubstitutedStringArrayWithConfigDirTemplate(list2, basePath) {
|
|
54063
|
+
if (!list2)
|
|
54064
|
+
return list2;
|
|
54065
54065
|
let result;
|
|
54066
|
-
|
|
54066
|
+
list2.forEach((element, index) => {
|
|
54067
54067
|
if (!startsWithConfigDirTemplate(element))
|
|
54068
54068
|
return;
|
|
54069
|
-
(result ?? (result =
|
|
54069
|
+
(result ?? (result = list2.slice()))[index] = getSubstitutedPathWithConfigDirTemplate(element, basePath);
|
|
54070
54070
|
});
|
|
54071
54071
|
return result;
|
|
54072
54072
|
}
|
|
@@ -70063,8 +70063,8 @@ ${lanes.join(`
|
|
|
70063
70063
|
}
|
|
70064
70064
|
}
|
|
70065
70065
|
function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {
|
|
70066
|
-
const
|
|
70067
|
-
return
|
|
70066
|
+
const list2 = obj.properties;
|
|
70067
|
+
return list2.some((property) => {
|
|
70068
70068
|
const nameType = property.name && (isJsxNamespacedName(property.name) ? getStringLiteralType(getTextOfJsxAttributeName(property.name)) : getLiteralTypeFromPropertyName(property.name));
|
|
70069
70069
|
const name = nameType && isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : undefined;
|
|
70070
70070
|
const expected = name === undefined ? undefined : getTypeOfPropertyOfType(contextualType, name);
|
|
@@ -95838,8 +95838,8 @@ ${lanes.join(`
|
|
|
95838
95838
|
}
|
|
95839
95839
|
}
|
|
95840
95840
|
if (augmentations) {
|
|
95841
|
-
for (const
|
|
95842
|
-
for (const augmentation of
|
|
95841
|
+
for (const list2 of augmentations) {
|
|
95842
|
+
for (const augmentation of list2) {
|
|
95843
95843
|
if (!isGlobalScopeAugmentation(augmentation.parent))
|
|
95844
95844
|
continue;
|
|
95845
95845
|
mergeModuleAugmentation(augmentation);
|
|
@@ -95869,8 +95869,8 @@ ${lanes.join(`
|
|
|
95869
95869
|
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType2]) : anyArrayType;
|
|
95870
95870
|
globalThisType = getGlobalTypeOrUndefined("ThisType", 1);
|
|
95871
95871
|
if (augmentations) {
|
|
95872
|
-
for (const
|
|
95873
|
-
for (const augmentation of
|
|
95872
|
+
for (const list2 of augmentations) {
|
|
95873
|
+
for (const augmentation of list2) {
|
|
95874
95874
|
if (isGlobalScopeAugmentation(augmentation.parent))
|
|
95875
95875
|
continue;
|
|
95876
95876
|
mergeModuleAugmentation(augmentation);
|
|
@@ -95889,9 +95889,9 @@ ${lanes.join(`
|
|
|
95889
95889
|
}
|
|
95890
95890
|
});
|
|
95891
95891
|
} else {
|
|
95892
|
-
const
|
|
95893
|
-
diagnostics.add(addRelatedInfo(createDiagnosticForNode(firstFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,
|
|
95894
|
-
diagnostics.add(addRelatedInfo(createDiagnosticForNode(secondFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,
|
|
95892
|
+
const list2 = arrayFrom(conflictingSymbols.keys()).join(", ");
|
|
95893
|
+
diagnostics.add(addRelatedInfo(createDiagnosticForNode(firstFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list2), createDiagnosticForNode(secondFile, Diagnostics.Conflicts_are_in_this_file)));
|
|
95894
|
+
diagnostics.add(addRelatedInfo(createDiagnosticForNode(secondFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list2), createDiagnosticForNode(firstFile, Diagnostics.Conflicts_are_in_this_file)));
|
|
95895
95895
|
}
|
|
95896
95896
|
});
|
|
95897
95897
|
amalgamatedDuplicates = undefined;
|
|
@@ -96387,9 +96387,9 @@ ${lanes.join(`
|
|
|
96387
96387
|
}
|
|
96388
96388
|
return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async");
|
|
96389
96389
|
}
|
|
96390
|
-
function checkGrammarForDisallowedTrailingComma(
|
|
96391
|
-
if (
|
|
96392
|
-
return grammarErrorAtPos(
|
|
96390
|
+
function checkGrammarForDisallowedTrailingComma(list2, diag2 = Diagnostics.Trailing_comma_not_allowed) {
|
|
96391
|
+
if (list2 && list2.hasTrailingComma) {
|
|
96392
|
+
return grammarErrorAtPos(list2[0], list2.end - ",".length, ",".length, diag2);
|
|
96393
96393
|
}
|
|
96394
96394
|
return false;
|
|
96395
96395
|
}
|
|
@@ -98738,22 +98738,22 @@ ${lanes.join(`
|
|
|
98738
98738
|
for (const mapping of getDecodedMappings()) {
|
|
98739
98739
|
if (!isSourceMappedPosition(mapping))
|
|
98740
98740
|
continue;
|
|
98741
|
-
let
|
|
98742
|
-
if (!
|
|
98743
|
-
lists[mapping.sourceIndex] =
|
|
98744
|
-
|
|
98741
|
+
let list2 = lists[mapping.sourceIndex];
|
|
98742
|
+
if (!list2)
|
|
98743
|
+
lists[mapping.sourceIndex] = list2 = [];
|
|
98744
|
+
list2.push(mapping);
|
|
98745
98745
|
}
|
|
98746
|
-
sourceMappings = lists.map((
|
|
98746
|
+
sourceMappings = lists.map((list2) => sortAndDeduplicate(list2, compareSourcePositions, sameMappedPosition));
|
|
98747
98747
|
}
|
|
98748
98748
|
return sourceMappings[sourceIndex];
|
|
98749
98749
|
}
|
|
98750
98750
|
function getGeneratedMappings() {
|
|
98751
98751
|
if (generatedMappings === undefined) {
|
|
98752
|
-
const
|
|
98752
|
+
const list2 = [];
|
|
98753
98753
|
for (const mapping of getDecodedMappings()) {
|
|
98754
|
-
|
|
98754
|
+
list2.push(mapping);
|
|
98755
98755
|
}
|
|
98756
|
-
generatedMappings = sortAndDeduplicate(
|
|
98756
|
+
generatedMappings = sortAndDeduplicate(list2, compareGeneratedPositions, sameMappedPosition);
|
|
98757
98757
|
}
|
|
98758
98758
|
return generatedMappings;
|
|
98759
98759
|
}
|
|
@@ -109075,9 +109075,9 @@ ${lanes.join(`
|
|
|
109075
109075
|
const newVariableDeclaration = factory2.createVariableDeclaration(temp);
|
|
109076
109076
|
setTextRange(newVariableDeclaration, node.variableDeclaration);
|
|
109077
109077
|
const vars = flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
|
|
109078
|
-
const
|
|
109079
|
-
setTextRange(
|
|
109080
|
-
const destructure = factory2.createVariableStatement(undefined,
|
|
109078
|
+
const list2 = factory2.createVariableDeclarationList(vars);
|
|
109079
|
+
setTextRange(list2, node.variableDeclaration);
|
|
109080
|
+
const destructure = factory2.createVariableStatement(undefined, list2);
|
|
109081
109081
|
updated = factory2.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
|
|
109082
109082
|
} else {
|
|
109083
109083
|
updated = visitEachChild(node, visitor, context);
|
|
@@ -131768,15 +131768,15 @@ ${lanes.join(`
|
|
|
131768
131768
|
return false;
|
|
131769
131769
|
}
|
|
131770
131770
|
function findListItemInfo(node) {
|
|
131771
|
-
const
|
|
131772
|
-
if (!
|
|
131771
|
+
const list2 = findContainingList(node);
|
|
131772
|
+
if (!list2) {
|
|
131773
131773
|
return;
|
|
131774
131774
|
}
|
|
131775
|
-
const children =
|
|
131775
|
+
const children = list2.getChildren();
|
|
131776
131776
|
const listItemIndex = indexOfNode(children, node);
|
|
131777
131777
|
return {
|
|
131778
131778
|
listItemIndex,
|
|
131779
|
-
list
|
|
131779
|
+
list: list2
|
|
131780
131780
|
};
|
|
131781
131781
|
}
|
|
131782
131782
|
function hasChildOfKind(n, kind, sourceFile) {
|
|
@@ -142635,7 +142635,7 @@ ${newComment.split(`
|
|
|
142635
142635
|
}
|
|
142636
142636
|
}
|
|
142637
142637
|
function createSyntaxList(nodes, parent2) {
|
|
142638
|
-
const
|
|
142638
|
+
const list2 = createNode(352, nodes.pos, nodes.end, parent2);
|
|
142639
142639
|
const children = [];
|
|
142640
142640
|
let pos = nodes.pos;
|
|
142641
142641
|
for (const node of nodes) {
|
|
@@ -142644,8 +142644,8 @@ ${newComment.split(`
|
|
|
142644
142644
|
pos = node.end;
|
|
142645
142645
|
}
|
|
142646
142646
|
addSyntheticNodes(children, pos, nodes.end, parent2);
|
|
142647
|
-
|
|
142648
|
-
return
|
|
142647
|
+
list2._children = children;
|
|
142648
|
+
return list2;
|
|
142649
142649
|
}
|
|
142650
142650
|
var TokenOrIdentifierObject = class {
|
|
142651
142651
|
constructor(kind, pos, end) {
|
|
@@ -155993,25 +155993,25 @@ ${newComment.split(`
|
|
|
155993
155993
|
write();
|
|
155994
155994
|
}
|
|
155995
155995
|
}
|
|
155996
|
-
function printSnippetList(format2,
|
|
155997
|
-
const unescaped = printUnescapedSnippetList(format2,
|
|
155996
|
+
function printSnippetList(format2, list2, sourceFile) {
|
|
155997
|
+
const unescaped = printUnescapedSnippetList(format2, list2, sourceFile);
|
|
155998
155998
|
return escapes ? ts_textChanges_exports.applyChanges(unescaped, escapes) : unescaped;
|
|
155999
155999
|
}
|
|
156000
|
-
function printUnescapedSnippetList(format2,
|
|
156000
|
+
function printUnescapedSnippetList(format2, list2, sourceFile) {
|
|
156001
156001
|
escapes = undefined;
|
|
156002
156002
|
writer.clear();
|
|
156003
|
-
printer.writeList(format2,
|
|
156003
|
+
printer.writeList(format2, list2, sourceFile, writer);
|
|
156004
156004
|
return writer.getText();
|
|
156005
156005
|
}
|
|
156006
|
-
function printAndFormatSnippetList(format2,
|
|
156006
|
+
function printAndFormatSnippetList(format2, list2, sourceFile, formatContext) {
|
|
156007
156007
|
const syntheticFile = {
|
|
156008
|
-
text: printUnescapedSnippetList(format2,
|
|
156008
|
+
text: printUnescapedSnippetList(format2, list2, sourceFile),
|
|
156009
156009
|
getLineAndCharacterOfPosition(pos) {
|
|
156010
156010
|
return getLineAndCharacterOfPosition(this, pos);
|
|
156011
156011
|
}
|
|
156012
156012
|
};
|
|
156013
156013
|
const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile);
|
|
156014
|
-
const changes = flatMap(
|
|
156014
|
+
const changes = flatMap(list2, (node) => {
|
|
156015
156015
|
const nodeWithPos = ts_textChanges_exports.assignPositionsToNode(node);
|
|
156016
156016
|
return ts_formatting_exports.formatNodeGivenIndentation(nodeWithPos, syntheticFile, sourceFile.languageVariant, 0, 0, { ...formatContext, options: formatOptions });
|
|
156017
156017
|
});
|
|
@@ -164289,17 +164289,17 @@ ${content}
|
|
|
164289
164289
|
const info = getArgumentOrParameterListAndIndex(node, sourceFile, checker);
|
|
164290
164290
|
if (!info)
|
|
164291
164291
|
return;
|
|
164292
|
-
const { list, argumentIndex } = info;
|
|
164293
|
-
const argumentCount = getArgumentCount(checker,
|
|
164294
|
-
const argumentsSpan = getApplicableSpanForArguments(
|
|
164295
|
-
return { list, argumentIndex, argumentCount, argumentsSpan };
|
|
164292
|
+
const { list: list2, argumentIndex } = info;
|
|
164293
|
+
const argumentCount = getArgumentCount(checker, list2);
|
|
164294
|
+
const argumentsSpan = getApplicableSpanForArguments(list2, sourceFile);
|
|
164295
|
+
return { list: list2, argumentIndex, argumentCount, argumentsSpan };
|
|
164296
164296
|
}
|
|
164297
164297
|
function getArgumentOrParameterListAndIndex(node, sourceFile, checker) {
|
|
164298
164298
|
if (node.kind === 30 || node.kind === 21) {
|
|
164299
164299
|
return { list: getChildListThatStartsWithOpenerToken(node.parent, node, sourceFile), argumentIndex: 0 };
|
|
164300
164300
|
} else {
|
|
164301
|
-
const
|
|
164302
|
-
return
|
|
164301
|
+
const list2 = findContainingList(node);
|
|
164302
|
+
return list2 && { list: list2, argumentIndex: getArgumentIndex(checker, list2, node) };
|
|
164303
164303
|
}
|
|
164304
164304
|
}
|
|
164305
164305
|
function getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker) {
|
|
@@ -164309,8 +164309,8 @@ ${content}
|
|
|
164309
164309
|
const info = getArgumentOrParameterListInfo(node, position, sourceFile, checker);
|
|
164310
164310
|
if (!info)
|
|
164311
164311
|
return;
|
|
164312
|
-
const { list, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
164313
|
-
const isTypeParameterList = !!parent2.typeArguments && parent2.typeArguments.pos ===
|
|
164312
|
+
const { list: list2, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
164313
|
+
const isTypeParameterList = !!parent2.typeArguments && parent2.typeArguments.pos === list2.pos;
|
|
164314
164314
|
return { isTypeParameterList, invocation: { kind: 0, node: invocation }, argumentsSpan, argumentIndex, argumentCount };
|
|
164315
164315
|
} else if (isNoSubstitutionTemplateLiteral(node) && isTaggedTemplateExpression(parent2)) {
|
|
164316
164316
|
if (isInsideTemplateLiteral(node, position, sourceFile)) {
|
|
@@ -165962,8 +165962,8 @@ ${content}
|
|
|
165962
165962
|
const endPosition = this.insertNodeAfterWorker(sourceFile, after, newNode);
|
|
165963
165963
|
this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after));
|
|
165964
165964
|
}
|
|
165965
|
-
insertNodeAtEndOfList(sourceFile,
|
|
165966
|
-
this.insertNodeAt(sourceFile,
|
|
165965
|
+
insertNodeAtEndOfList(sourceFile, list2, newNode) {
|
|
165966
|
+
this.insertNodeAt(sourceFile, list2.end, newNode, { prefix: ", " });
|
|
165967
165967
|
}
|
|
165968
165968
|
insertNodesAfter(sourceFile, after, newNodes) {
|
|
165969
165969
|
const endPosition = this.insertNodeAfterWorker(sourceFile, after, first(newNodes));
|
|
@@ -166117,12 +166117,12 @@ ${options.prefix}` : `
|
|
|
166117
166117
|
}
|
|
166118
166118
|
deletedNodesInLists.forEach((node) => {
|
|
166119
166119
|
const sourceFile = node.getSourceFile();
|
|
166120
|
-
const
|
|
166121
|
-
if (node !== last(
|
|
166120
|
+
const list2 = ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile);
|
|
166121
|
+
if (node !== last(list2))
|
|
166122
166122
|
return;
|
|
166123
|
-
const lastNonDeletedIndex = findLastIndex(
|
|
166123
|
+
const lastNonDeletedIndex = findLastIndex(list2, (n) => !deletedNodesInLists.has(n), list2.length - 2);
|
|
166124
166124
|
if (lastNonDeletedIndex !== -1) {
|
|
166125
|
-
this.deleteRange(sourceFile, { pos:
|
|
166125
|
+
this.deleteRange(sourceFile, { pos: list2[lastNonDeletedIndex].end, end: startPositionToDeleteNodeInList(sourceFile, list2[lastNonDeletedIndex + 1]) });
|
|
166126
166126
|
}
|
|
166127
166127
|
});
|
|
166128
166128
|
}
|
|
@@ -168484,7 +168484,7 @@ ${options.prefix}` : `
|
|
|
168484
168484
|
const commentRanges = concatenate(trailingRangesOfPreviousToken, leadingCommentRangesOfNextToken);
|
|
168485
168485
|
return commentRanges && find(commentRanges, (range) => rangeContainsPositionExclusive(range, position) || position === range.end && (range.kind === 2 || position === sourceFile.getFullWidth()));
|
|
168486
168486
|
}
|
|
168487
|
-
function getOpenTokenForList(node,
|
|
168487
|
+
function getOpenTokenForList(node, list2) {
|
|
168488
168488
|
switch (node.kind) {
|
|
168489
168489
|
case 176:
|
|
168490
168490
|
case 262:
|
|
@@ -168498,17 +168498,17 @@ ${options.prefix}` : `
|
|
|
168498
168498
|
case 185:
|
|
168499
168499
|
case 177:
|
|
168500
168500
|
case 178:
|
|
168501
|
-
if (node.typeParameters ===
|
|
168501
|
+
if (node.typeParameters === list2) {
|
|
168502
168502
|
return 30;
|
|
168503
|
-
} else if (node.parameters ===
|
|
168503
|
+
} else if (node.parameters === list2) {
|
|
168504
168504
|
return 21;
|
|
168505
168505
|
}
|
|
168506
168506
|
break;
|
|
168507
168507
|
case 213:
|
|
168508
168508
|
case 214:
|
|
168509
|
-
if (node.typeArguments ===
|
|
168509
|
+
if (node.typeArguments === list2) {
|
|
168510
168510
|
return 30;
|
|
168511
|
-
} else if (node.arguments ===
|
|
168511
|
+
} else if (node.arguments === list2) {
|
|
168512
168512
|
return 21;
|
|
168513
168513
|
}
|
|
168514
168514
|
break;
|
|
@@ -168516,7 +168516,7 @@ ${options.prefix}` : `
|
|
|
168516
168516
|
case 231:
|
|
168517
168517
|
case 264:
|
|
168518
168518
|
case 265:
|
|
168519
|
-
if (node.typeParameters ===
|
|
168519
|
+
if (node.typeParameters === list2) {
|
|
168520
168520
|
return 30;
|
|
168521
168521
|
}
|
|
168522
168522
|
break;
|
|
@@ -168525,7 +168525,7 @@ ${options.prefix}` : `
|
|
|
168525
168525
|
case 186:
|
|
168526
168526
|
case 233:
|
|
168527
168527
|
case 205:
|
|
168528
|
-
if (node.typeArguments ===
|
|
168528
|
+
if (node.typeArguments === list2) {
|
|
168529
168529
|
return 30;
|
|
168530
168530
|
}
|
|
168531
168531
|
break;
|
|
@@ -168858,24 +168858,24 @@ ${options.prefix}` : `
|
|
|
168858
168858
|
case 207:
|
|
168859
168859
|
return getList(node.elements);
|
|
168860
168860
|
}
|
|
168861
|
-
function getList(
|
|
168862
|
-
return
|
|
168861
|
+
function getList(list2) {
|
|
168862
|
+
return list2 && rangeContainsStartEnd(getVisualListRange(node, list2, sourceFile), start, end) ? list2 : undefined;
|
|
168863
168863
|
}
|
|
168864
168864
|
}
|
|
168865
|
-
function getVisualListRange(node,
|
|
168865
|
+
function getVisualListRange(node, list2, sourceFile) {
|
|
168866
168866
|
const children = node.getChildren(sourceFile);
|
|
168867
168867
|
for (let i = 1;i < children.length - 1; i++) {
|
|
168868
|
-
if (children[i].pos ===
|
|
168868
|
+
if (children[i].pos === list2.pos && children[i].end === list2.end) {
|
|
168869
168869
|
return { pos: children[i - 1].end, end: children[i + 1].getStart(sourceFile) };
|
|
168870
168870
|
}
|
|
168871
168871
|
}
|
|
168872
|
-
return
|
|
168872
|
+
return list2;
|
|
168873
168873
|
}
|
|
168874
|
-
function getActualIndentationForListStartLine(
|
|
168875
|
-
if (!
|
|
168874
|
+
function getActualIndentationForListStartLine(list2, sourceFile, options) {
|
|
168875
|
+
if (!list2) {
|
|
168876
168876
|
return -1;
|
|
168877
168877
|
}
|
|
168878
|
-
return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(
|
|
168878
|
+
return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list2.pos), sourceFile, options);
|
|
168879
168879
|
}
|
|
168880
168880
|
function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) {
|
|
168881
168881
|
if (node.parent && node.parent.kind === 261) {
|
|
@@ -168894,19 +168894,19 @@ ${options.prefix}` : `
|
|
|
168894
168894
|
}
|
|
168895
168895
|
return -1;
|
|
168896
168896
|
}
|
|
168897
|
-
function deriveActualIndentationFromList(
|
|
168898
|
-
Debug.assert(index >= 0 && index <
|
|
168899
|
-
const node =
|
|
168897
|
+
function deriveActualIndentationFromList(list2, index, sourceFile, options) {
|
|
168898
|
+
Debug.assert(index >= 0 && index < list2.length);
|
|
168899
|
+
const node = list2[index];
|
|
168900
168900
|
let lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile);
|
|
168901
168901
|
for (let i = index - 1;i >= 0; i--) {
|
|
168902
|
-
if (
|
|
168902
|
+
if (list2[i].kind === 28) {
|
|
168903
168903
|
continue;
|
|
168904
168904
|
}
|
|
168905
|
-
const prevEndLine = sourceFile.getLineAndCharacterOfPosition(
|
|
168905
|
+
const prevEndLine = sourceFile.getLineAndCharacterOfPosition(list2[i].end).line;
|
|
168906
168906
|
if (prevEndLine !== lineAndCharacter.line) {
|
|
168907
168907
|
return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options);
|
|
168908
168908
|
}
|
|
168909
|
-
lineAndCharacter = getStartLineAndCharacterForNode(
|
|
168909
|
+
lineAndCharacter = getStartLineAndCharacterForNode(list2[i], sourceFile);
|
|
168910
168910
|
}
|
|
168911
168911
|
return -1;
|
|
168912
168912
|
}
|
|
@@ -184039,9 +184039,9 @@ var require_keyMap = __commonJS((exports) => {
|
|
|
184039
184039
|
value: true
|
|
184040
184040
|
});
|
|
184041
184041
|
exports.keyMap = keyMap;
|
|
184042
|
-
function keyMap(
|
|
184042
|
+
function keyMap(list2, keyFn) {
|
|
184043
184043
|
const result = Object.create(null);
|
|
184044
|
-
for (const item of
|
|
184044
|
+
for (const item of list2) {
|
|
184045
184045
|
result[keyFn(item)] = item;
|
|
184046
184046
|
}
|
|
184047
184047
|
return result;
|
|
@@ -184054,9 +184054,9 @@ var require_keyValMap = __commonJS((exports) => {
|
|
|
184054
184054
|
value: true
|
|
184055
184055
|
});
|
|
184056
184056
|
exports.keyValMap = keyValMap;
|
|
184057
|
-
function keyValMap(
|
|
184057
|
+
function keyValMap(list2, keyFn, valFn) {
|
|
184058
184058
|
const result = Object.create(null);
|
|
184059
|
-
for (const item of
|
|
184059
|
+
for (const item of list2) {
|
|
184060
184060
|
result[keyFn(item)] = valFn(item);
|
|
184061
184061
|
}
|
|
184062
184062
|
return result;
|
|
@@ -189421,9 +189421,9 @@ var require_groupBy = __commonJS((exports) => {
|
|
|
189421
189421
|
value: true
|
|
189422
189422
|
});
|
|
189423
189423
|
exports.groupBy = groupBy;
|
|
189424
|
-
function groupBy(
|
|
189424
|
+
function groupBy(list2, keyFn) {
|
|
189425
189425
|
const result = new Map;
|
|
189426
|
-
for (const item of
|
|
189426
|
+
for (const item of list2) {
|
|
189427
189427
|
const key = keyFn(item);
|
|
189428
189428
|
const group = result.get(key);
|
|
189429
189429
|
if (group === undefined) {
|
|
@@ -199618,7 +199618,7 @@ function opt(e4) {
|
|
|
199618
199618
|
ofRule: e4
|
|
199619
199619
|
};
|
|
199620
199620
|
}
|
|
199621
|
-
function
|
|
199621
|
+
function list2(e4, t4) {
|
|
199622
199622
|
return {
|
|
199623
199623
|
ofRule: e4,
|
|
199624
199624
|
isList: true,
|
|
@@ -201853,7 +201853,7 @@ var init_api_chunk = __esm(() => {
|
|
|
201853
201853
|
Comment: /^#.*/
|
|
201854
201854
|
};
|
|
201855
201855
|
k2 = {
|
|
201856
|
-
Document: [
|
|
201856
|
+
Document: [list2("Definition")],
|
|
201857
201857
|
Definition(t4) {
|
|
201858
201858
|
switch (t4.value) {
|
|
201859
201859
|
case "{":
|
|
@@ -201887,21 +201887,21 @@ var init_api_chunk = __esm(() => {
|
|
|
201887
201887
|
}
|
|
201888
201888
|
},
|
|
201889
201889
|
ShortQuery: ["SelectionSet"],
|
|
201890
|
-
Query: [word("query"), opt(name$1("def")), opt("VariableDefinitions"),
|
|
201891
|
-
Mutation: [word("mutation"), opt(name$1("def")), opt("VariableDefinitions"),
|
|
201892
|
-
Subscription: [word("subscription"), opt(name$1("def")), opt("VariableDefinitions"),
|
|
201893
|
-
VariableDefinitions: [p$1("("),
|
|
201890
|
+
Query: [word("query"), opt(name$1("def")), opt("VariableDefinitions"), list2("Directive"), "SelectionSet"],
|
|
201891
|
+
Mutation: [word("mutation"), opt(name$1("def")), opt("VariableDefinitions"), list2("Directive"), "SelectionSet"],
|
|
201892
|
+
Subscription: [word("subscription"), opt(name$1("def")), opt("VariableDefinitions"), list2("Directive"), "SelectionSet"],
|
|
201893
|
+
VariableDefinitions: [p$1("("), list2("VariableDefinition"), p$1(")")],
|
|
201894
201894
|
VariableDefinition: ["Variable", p$1(":"), "Type", opt("DefaultValue")],
|
|
201895
201895
|
Variable: [p$1("$", "variable"), name$1("variable")],
|
|
201896
201896
|
DefaultValue: [p$1("="), "Value"],
|
|
201897
|
-
SelectionSet: [p$1("{"),
|
|
201897
|
+
SelectionSet: [p$1("{"), list2("Selection"), p$1("}")],
|
|
201898
201898
|
Selection: (e4, t4) => e4.value === "..." ? t4.match(/[\s\u00a0,]*(on\b|@|{)/, false) ? "InlineFragment" : "FragmentSpread" : t4.match(/[\s\u00a0,]*:/, false) ? "AliasedField" : "Field",
|
|
201899
|
-
AliasedField: [name$1("property"), p$1(":"), name$1("qualifier"), opt("Arguments"),
|
|
201900
|
-
Field: [name$1("property"), opt("Arguments"),
|
|
201901
|
-
Arguments: [p$1("("),
|
|
201899
|
+
AliasedField: [name$1("property"), p$1(":"), name$1("qualifier"), opt("Arguments"), list2("Directive"), opt("SelectionSet")],
|
|
201900
|
+
Field: [name$1("property"), opt("Arguments"), list2("Directive"), opt("SelectionSet")],
|
|
201901
|
+
Arguments: [p$1("("), list2("Argument"), p$1(")")],
|
|
201902
201902
|
Argument: [name$1("attribute"), p$1(":"), "Value"],
|
|
201903
|
-
FragmentSpread: [p$1("..."), name$1("def"),
|
|
201904
|
-
InlineFragment: [p$1("..."), opt("TypeCondition"),
|
|
201903
|
+
FragmentSpread: [p$1("..."), name$1("def"), list2("Directive")],
|
|
201904
|
+
InlineFragment: [p$1("..."), opt("TypeCondition"), list2("Directive"), "SelectionSet"],
|
|
201905
201905
|
FragmentDefinition: [word("fragment"), opt(function butNot(e4, t4) {
|
|
201906
201906
|
var i4 = e4.match;
|
|
201907
201907
|
e4.match = (e5) => {
|
|
@@ -201912,7 +201912,7 @@ var init_api_chunk = __esm(() => {
|
|
|
201912
201912
|
return r4 && t4.every((t5) => t5.match && !t5.match(e5));
|
|
201913
201913
|
};
|
|
201914
201914
|
return e4;
|
|
201915
|
-
}(name$1("def"), [word("on")])), "TypeCondition",
|
|
201915
|
+
}(name$1("def"), [word("on")])), "TypeCondition", list2("Directive"), "SelectionSet"],
|
|
201916
201916
|
TypeCondition: [word("on"), "NamedType"],
|
|
201917
201917
|
Value(e4) {
|
|
201918
201918
|
switch (e4.kind) {
|
|
@@ -201957,8 +201957,8 @@ var init_api_chunk = __esm(() => {
|
|
|
201957
201957
|
BooleanValue: [t$1("Name", "builtin")],
|
|
201958
201958
|
NullValue: [t$1("Name", "keyword")],
|
|
201959
201959
|
EnumValue: [name$1("string-2")],
|
|
201960
|
-
ListValue: [p$1("["),
|
|
201961
|
-
ObjectValue: [p$1("{"),
|
|
201960
|
+
ListValue: [p$1("["), list2("Value"), p$1("]")],
|
|
201961
|
+
ObjectValue: [p$1("{"), list2("ObjectField"), p$1("}")],
|
|
201962
201962
|
ObjectField: [name$1("attribute"), p$1(":"), "Value"],
|
|
201963
201963
|
Type: (e4) => e4.value === "[" ? "ListType" : "NonNullType",
|
|
201964
201964
|
ListType: [p$1("["), "Type", p$1("]"), opt(p$1("!"))],
|
|
@@ -201977,22 +201977,22 @@ var init_api_chunk = __esm(() => {
|
|
|
201977
201977
|
};
|
|
201978
201978
|
}("atom")],
|
|
201979
201979
|
Directive: [p$1("@", "meta"), name$1("meta"), opt("Arguments")],
|
|
201980
|
-
DirectiveDef: [word("directive"), p$1("@", "meta"), name$1("meta"), opt("ArgumentsDef"), word("on"),
|
|
201981
|
-
InterfaceDef: [word("interface"), name$1("atom"), opt("Implements"),
|
|
201982
|
-
Implements: [word("implements"),
|
|
201980
|
+
DirectiveDef: [word("directive"), p$1("@", "meta"), name$1("meta"), opt("ArgumentsDef"), word("on"), list2("DirectiveLocation", p$1("|"))],
|
|
201981
|
+
InterfaceDef: [word("interface"), name$1("atom"), opt("Implements"), list2("Directive"), p$1("{"), list2("FieldDef"), p$1("}")],
|
|
201982
|
+
Implements: [word("implements"), list2("NamedType", p$1("&"))],
|
|
201983
201983
|
DirectiveLocation: [name$1("string-2")],
|
|
201984
|
-
SchemaDef: [word("schema"),
|
|
201984
|
+
SchemaDef: [word("schema"), list2("Directive"), p$1("{"), list2("OperationTypeDef"), p$1("}")],
|
|
201985
201985
|
OperationTypeDef: [name$1("keyword"), p$1(":"), name$1("atom")],
|
|
201986
|
-
ScalarDef: [word("scalar"), name$1("atom"),
|
|
201987
|
-
ObjectTypeDef: [word("type"), name$1("atom"), opt("Implements"),
|
|
201988
|
-
FieldDef: [name$1("property"), opt("ArgumentsDef"), p$1(":"), "Type",
|
|
201989
|
-
ArgumentsDef: [p$1("("),
|
|
201990
|
-
InputValueDef: [name$1("attribute"), p$1(":"), "Type", opt("DefaultValue"),
|
|
201991
|
-
UnionDef: [word("union"), name$1("atom"),
|
|
201986
|
+
ScalarDef: [word("scalar"), name$1("atom"), list2("Directive")],
|
|
201987
|
+
ObjectTypeDef: [word("type"), name$1("atom"), opt("Implements"), list2("Directive"), p$1("{"), list2("FieldDef"), p$1("}")],
|
|
201988
|
+
FieldDef: [name$1("property"), opt("ArgumentsDef"), p$1(":"), "Type", list2("Directive")],
|
|
201989
|
+
ArgumentsDef: [p$1("("), list2("InputValueDef"), p$1(")")],
|
|
201990
|
+
InputValueDef: [name$1("attribute"), p$1(":"), "Type", opt("DefaultValue"), list2("Directive")],
|
|
201991
|
+
UnionDef: [word("union"), name$1("atom"), list2("Directive"), p$1("="), list2("UnionMember", p$1("|"))],
|
|
201992
201992
|
UnionMember: ["NamedType"],
|
|
201993
|
-
EnumDef: [word("enum"), name$1("atom"),
|
|
201994
|
-
EnumValueDef: [name$1("string-2"),
|
|
201995
|
-
InputDef: [word("input"), name$1("atom"),
|
|
201993
|
+
EnumDef: [word("enum"), name$1("atom"), list2("Directive"), p$1("{"), list2("EnumValueDef"), p$1("}")],
|
|
201994
|
+
EnumValueDef: [name$1("string-2"), list2("Directive")],
|
|
201995
|
+
InputDef: [word("input"), name$1("atom"), list2("Directive"), p$1("{"), list2("InputValueDef"), p$1("}")],
|
|
201996
201996
|
ExtendDef: [word("extend"), "ExtensionDefinition"],
|
|
201997
201997
|
ExtensionDefinition(t4) {
|
|
201998
201998
|
switch (t4.value) {
|
|
@@ -209465,7 +209465,7 @@ ${Bt.cyan(Yt)}
|
|
|
209465
209465
|
code: "ENOENT"
|
|
209466
209466
|
}), getPathInfo = (e9, t7) => {
|
|
209467
209467
|
var r6 = t7.colon || or;
|
|
209468
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
209468
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.dRm0KwqNqi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
209469
209469
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
209470
209470
|
var a5 = nr ? n6.split(r6) : [""];
|
|
209471
209471
|
if (nr) {
|
|
@@ -212602,7 +212602,7 @@ ${whileRunning(e9)}`;
|
|
|
212602
212602
|
};
|
|
212603
212603
|
ni = Object.assign(async function _main() {
|
|
212604
212604
|
var e9 = new Cli({
|
|
212605
|
-
binaryVersion: "1.0.
|
|
212605
|
+
binaryVersion: "1.0.6",
|
|
212606
212606
|
binaryLabel: "gql.tada CLI",
|
|
212607
212607
|
binaryName: "gql.tada"
|
|
212608
212608
|
});
|
|
@@ -215627,7 +215627,7 @@ var require_commonjs2 = __commonJS((exports) => {
|
|
|
215627
215627
|
defaults: (options) => orig.defaults(ext2(def, options)),
|
|
215628
215628
|
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext2(def, options)),
|
|
215629
215629
|
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext2(def, options)),
|
|
215630
|
-
match: (
|
|
215630
|
+
match: (list3, pattern, options = {}) => orig.match(list3, pattern, ext2(def, options)),
|
|
215631
215631
|
sep: orig.sep,
|
|
215632
215632
|
GLOBSTAR: exports.GLOBSTAR
|
|
215633
215633
|
});
|
|
@@ -215646,13 +215646,13 @@ var require_commonjs2 = __commonJS((exports) => {
|
|
|
215646
215646
|
var makeRe2 = (pattern, options = {}) => new Minimatch2(pattern, options).makeRe();
|
|
215647
215647
|
exports.makeRe = makeRe2;
|
|
215648
215648
|
exports.minimatch.makeRe = exports.makeRe;
|
|
215649
|
-
var match2 = (
|
|
215649
|
+
var match2 = (list3, pattern, options = {}) => {
|
|
215650
215650
|
const mm = new Minimatch2(pattern, options);
|
|
215651
|
-
|
|
215652
|
-
if (mm.options.nonull && !
|
|
215653
|
-
|
|
215651
|
+
list3 = list3.filter((f5) => mm.match(f5));
|
|
215652
|
+
if (mm.options.nonull && !list3.length) {
|
|
215653
|
+
list3.push(pattern);
|
|
215654
215654
|
}
|
|
215655
|
-
return
|
|
215655
|
+
return list3;
|
|
215656
215656
|
};
|
|
215657
215657
|
exports.match = match2;
|
|
215658
215658
|
exports.minimatch.match = exports.match;
|
|
@@ -220192,7 +220192,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
220192
220192
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
220193
220193
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
220194
220194
|
var getPathInfo2 = (cmd2, {
|
|
220195
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220195
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.dRm0KwqNqi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220196
220196
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
220197
220197
|
delimiter: optDelimiter = delimiter
|
|
220198
220198
|
}) => {
|
|
@@ -220396,7 +220396,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
220396
220396
|
let pathToInitial;
|
|
220397
220397
|
try {
|
|
220398
220398
|
pathToInitial = which.sync(initialCmd, {
|
|
220399
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220399
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.dRm0KwqNqi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220400
220400
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
220401
220401
|
}).toLowerCase();
|
|
220402
220402
|
} catch (err) {
|
|
@@ -221113,7 +221113,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
221113
221113
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
221114
221114
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
221115
221115
|
var getPathInfo2 = (cmd2, {
|
|
221116
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221116
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.dRm0KwqNqi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221117
221117
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221118
221118
|
delimiter: optDelimiter = delimiter
|
|
221119
221119
|
}) => {
|
|
@@ -221371,14 +221371,14 @@ var require_compare_build = __commonJS((exports, module) => {
|
|
|
221371
221371
|
// ../../node_modules/semver/functions/sort.js
|
|
221372
221372
|
var require_sort = __commonJS((exports, module) => {
|
|
221373
221373
|
var compareBuild = require_compare_build();
|
|
221374
|
-
var sort = (
|
|
221374
|
+
var sort = (list3, loose) => list3.sort((a5, b4) => compareBuild(a5, b4, loose));
|
|
221375
221375
|
module.exports = sort;
|
|
221376
221376
|
});
|
|
221377
221377
|
|
|
221378
221378
|
// ../../node_modules/semver/functions/rsort.js
|
|
221379
221379
|
var require_rsort = __commonJS((exports, module) => {
|
|
221380
221380
|
var compareBuild = require_compare_build();
|
|
221381
|
-
var rsort = (
|
|
221381
|
+
var rsort = (list3, loose) => list3.sort((a5, b4) => compareBuild(b4, a5, loose));
|
|
221382
221382
|
module.exports = rsort;
|
|
221383
221383
|
});
|
|
221384
221384
|
|
|
@@ -223384,16 +223384,16 @@ var require_lib8 = __commonJS((exports, module) => {
|
|
|
223384
223384
|
});
|
|
223385
223385
|
}
|
|
223386
223386
|
};
|
|
223387
|
-
var checkList = (value4,
|
|
223388
|
-
if (typeof
|
|
223389
|
-
|
|
223387
|
+
var checkList = (value4, list3) => {
|
|
223388
|
+
if (typeof list3 === "string") {
|
|
223389
|
+
list3 = [list3];
|
|
223390
223390
|
}
|
|
223391
|
-
if (
|
|
223391
|
+
if (list3.length === 1 && list3[0] === "any") {
|
|
223392
223392
|
return true;
|
|
223393
223393
|
}
|
|
223394
223394
|
let negated = 0;
|
|
223395
223395
|
let match2 = false;
|
|
223396
|
-
for (const entry of
|
|
223396
|
+
for (const entry of list3) {
|
|
223397
223397
|
const negate = entry.charAt(0) === "!";
|
|
223398
223398
|
const test = negate ? entry.slice(1) : entry;
|
|
223399
223399
|
if (negate) {
|
|
@@ -223405,7 +223405,7 @@ var require_lib8 = __commonJS((exports, module) => {
|
|
|
223405
223405
|
match2 = match2 || value4 === test;
|
|
223406
223406
|
}
|
|
223407
223407
|
}
|
|
223408
|
-
return match2 || negated ===
|
|
223408
|
+
return match2 || negated === list3.length;
|
|
223409
223409
|
};
|
|
223410
223410
|
module.exports = {
|
|
223411
223411
|
checkEngine,
|
|
@@ -228068,15 +228068,15 @@ class Emitter2 {
|
|
|
228068
228068
|
this.listeners[ev].push(fn);
|
|
228069
228069
|
}
|
|
228070
228070
|
removeListener(ev, fn) {
|
|
228071
|
-
const
|
|
228072
|
-
const i6 =
|
|
228071
|
+
const list3 = this.listeners[ev];
|
|
228072
|
+
const i6 = list3.indexOf(fn);
|
|
228073
228073
|
if (i6 === -1) {
|
|
228074
228074
|
return;
|
|
228075
228075
|
}
|
|
228076
|
-
if (i6 === 0 &&
|
|
228077
|
-
|
|
228076
|
+
if (i6 === 0 && list3.length === 1) {
|
|
228077
|
+
list3.length = 0;
|
|
228078
228078
|
} else {
|
|
228079
|
-
|
|
228079
|
+
list3.splice(i6, 1);
|
|
228080
228080
|
}
|
|
228081
228081
|
}
|
|
228082
228082
|
emit(ev, code2, signal) {
|
|
@@ -230970,7 +230970,7 @@ var require_yallist = __commonJS((exports, module) => {
|
|
|
230970
230970
|
module.exports = Yallist;
|
|
230971
230971
|
Yallist.Node = Node2;
|
|
230972
230972
|
Yallist.create = Yallist;
|
|
230973
|
-
function Yallist(
|
|
230973
|
+
function Yallist(list3) {
|
|
230974
230974
|
var self2 = this;
|
|
230975
230975
|
if (!(self2 instanceof Yallist)) {
|
|
230976
230976
|
self2 = new Yallist;
|
|
@@ -230978,8 +230978,8 @@ var require_yallist = __commonJS((exports, module) => {
|
|
|
230978
230978
|
self2.tail = null;
|
|
230979
230979
|
self2.head = null;
|
|
230980
230980
|
self2.length = 0;
|
|
230981
|
-
if (
|
|
230982
|
-
|
|
230981
|
+
if (list3 && typeof list3.forEach === "function") {
|
|
230982
|
+
list3.forEach(function(item) {
|
|
230983
230983
|
self2.push(item);
|
|
230984
230984
|
});
|
|
230985
230985
|
} else if (arguments.length > 0) {
|
|
@@ -231306,11 +231306,11 @@ var require_yallist = __commonJS((exports, module) => {
|
|
|
231306
231306
|
}
|
|
231307
231307
|
self2.length++;
|
|
231308
231308
|
}
|
|
231309
|
-
function Node2(value4, prev, next,
|
|
231309
|
+
function Node2(value4, prev, next, list3) {
|
|
231310
231310
|
if (!(this instanceof Node2)) {
|
|
231311
|
-
return new Node2(value4, prev, next,
|
|
231311
|
+
return new Node2(value4, prev, next, list3);
|
|
231312
231312
|
}
|
|
231313
|
-
this.list =
|
|
231313
|
+
this.list = list3;
|
|
231314
231314
|
this.value = value4;
|
|
231315
231315
|
if (prev) {
|
|
231316
231316
|
prev.next = this;
|
|
@@ -233025,7 +233025,7 @@ var require_list = __commonJS((exports, module) => {
|
|
|
233025
233025
|
if (!opt2.noResume) {
|
|
233026
233026
|
onentryFunction(opt2);
|
|
233027
233027
|
}
|
|
233028
|
-
return opt2.file && opt2.sync ? listFileSync(opt2) : opt2.file ? listFile(opt2, cb) :
|
|
233028
|
+
return opt2.file && opt2.sync ? listFileSync(opt2) : opt2.file ? listFile(opt2, cb) : list3(opt2);
|
|
233029
233029
|
};
|
|
233030
233030
|
var onentryFunction = (opt2) => {
|
|
233031
233031
|
const onentry = opt2.onentry;
|
|
@@ -233046,7 +233046,7 @@ var require_list = __commonJS((exports, module) => {
|
|
|
233046
233046
|
opt2.filter = filter4 ? (file, entry) => filter4(file, entry) && mapHas(stripSlash(file)) : (file) => mapHas(stripSlash(file));
|
|
233047
233047
|
};
|
|
233048
233048
|
var listFileSync = (opt2) => {
|
|
233049
|
-
const p5 =
|
|
233049
|
+
const p5 = list3(opt2);
|
|
233050
233050
|
const file = opt2.file;
|
|
233051
233051
|
let threw = true;
|
|
233052
233052
|
let fd;
|
|
@@ -233098,7 +233098,7 @@ var require_list = __commonJS((exports, module) => {
|
|
|
233098
233098
|
});
|
|
233099
233099
|
return cb ? p5.then(cb, cb) : p5;
|
|
233100
233100
|
};
|
|
233101
|
-
var
|
|
233101
|
+
var list3 = (opt2) => new Parser(opt2);
|
|
233102
233102
|
});
|
|
233103
233103
|
|
|
233104
233104
|
// ../../node_modules/tar/lib/create.js
|
|
@@ -234988,7 +234988,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234988
234988
|
const colon = opt2.colon || COLON;
|
|
234989
234989
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234990
234990
|
...isWindows2 ? [process.cwd()] : [],
|
|
234991
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234991
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.dRm0KwqNqi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234992
234992
|
];
|
|
234993
234993
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234994
234994
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -236431,8 +236431,8 @@ var normalizeArgs2 = (file, args = []) => {
|
|
|
236431
236431
|
...tokens.slice(0, -1),
|
|
236432
236432
|
`${tokens.at(-1)}${nextTokens[0]}`,
|
|
236433
236433
|
...nextTokens.slice(1)
|
|
236434
|
-
], parseTemplate = ({ templates
|
|
236435
|
-
const templateString = template ??
|
|
236434
|
+
], parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
236435
|
+
const templateString = template ?? templates.raw[index];
|
|
236436
236436
|
const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);
|
|
236437
236437
|
const newTokens = concatTokens(tokens, templateTokens, templateString.startsWith(" "));
|
|
236438
236438
|
if (index === expressions.length) {
|
|
@@ -236441,10 +236441,10 @@ var normalizeArgs2 = (file, args = []) => {
|
|
|
236441
236441
|
const expression = expressions[index];
|
|
236442
236442
|
const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)];
|
|
236443
236443
|
return concatTokens(newTokens, expressionTokens, templateString.endsWith(" "));
|
|
236444
|
-
}, parseTemplates = (
|
|
236444
|
+
}, parseTemplates = (templates, expressions) => {
|
|
236445
236445
|
let tokens = [];
|
|
236446
|
-
for (const [index, template] of
|
|
236447
|
-
tokens = parseTemplate({ templates
|
|
236446
|
+
for (const [index, template] of templates.entries()) {
|
|
236447
|
+
tokens = parseTemplate({ templates, expressions, tokens, index, template });
|
|
236448
236448
|
}
|
|
236449
236449
|
return tokens;
|
|
236450
236450
|
};
|
|
@@ -236625,11 +236625,11 @@ function create$(options) {
|
|
|
236625
236625
|
const [file, ...args] = parseTemplates(templatesOrOptions, expressions);
|
|
236626
236626
|
return execa2(file, args, normalizeScriptOptions(options));
|
|
236627
236627
|
}
|
|
236628
|
-
$3.sync = (
|
|
236629
|
-
if (!Array.isArray(
|
|
236628
|
+
$3.sync = (templates, ...expressions) => {
|
|
236629
|
+
if (!Array.isArray(templates)) {
|
|
236630
236630
|
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
236631
236631
|
}
|
|
236632
|
-
const [file, ...args] = parseTemplates(
|
|
236632
|
+
const [file, ...args] = parseTemplates(templates, expressions);
|
|
236633
236633
|
return execaSync(file, args, normalizeScriptOptions(options));
|
|
236634
236634
|
};
|
|
236635
236635
|
return $3;
|
|
@@ -255455,15 +255455,15 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
255455
255455
|
var node_process = __require("node:process");
|
|
255456
255456
|
var cst = require_cst();
|
|
255457
255457
|
var lexer = require_lexer2();
|
|
255458
|
-
function includesToken(
|
|
255459
|
-
for (let i6 = 0;i6 <
|
|
255460
|
-
if (
|
|
255458
|
+
function includesToken(list3, type4) {
|
|
255459
|
+
for (let i6 = 0;i6 < list3.length; ++i6)
|
|
255460
|
+
if (list3[i6].type === type4)
|
|
255461
255461
|
return true;
|
|
255462
255462
|
return false;
|
|
255463
255463
|
}
|
|
255464
|
-
function findNonEmptyIndex(
|
|
255465
|
-
for (let i6 = 0;i6 <
|
|
255466
|
-
switch (
|
|
255464
|
+
function findNonEmptyIndex(list3) {
|
|
255465
|
+
for (let i6 = 0;i6 < list3.length; ++i6) {
|
|
255466
|
+
switch (list3[i6].type) {
|
|
255467
255467
|
case "space":
|
|
255468
255468
|
case "comment":
|
|
255469
255469
|
case "newline":
|
|
@@ -267286,8 +267286,8 @@ async function loadEnvironmentEnv(validateEnv, prod, path4 = process.cwd()) {
|
|
|
267286
267286
|
return {};
|
|
267287
267287
|
}
|
|
267288
267288
|
}
|
|
267289
|
-
async function projectRoot(fallbackToCwd = false) {
|
|
267290
|
-
const packageJsonPath = await findUp("package.json");
|
|
267289
|
+
async function projectRoot(fallbackToCwd = false, cwd) {
|
|
267290
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267291
267291
|
if (!packageJsonPath) {
|
|
267292
267292
|
if (fallbackToCwd) {
|
|
267293
267293
|
return process.cwd();
|
|
@@ -267355,8 +267355,13 @@ async function packageJsonHasWorkspaces(packageJsonPath) {
|
|
|
267355
267355
|
}
|
|
267356
267356
|
return false;
|
|
267357
267357
|
}
|
|
267358
|
-
async function writeEnv(
|
|
267359
|
-
|
|
267358
|
+
async function writeEnv({
|
|
267359
|
+
prod,
|
|
267360
|
+
env: env2,
|
|
267361
|
+
secrets,
|
|
267362
|
+
cwd
|
|
267363
|
+
}) {
|
|
267364
|
+
const projectDir = await projectRoot(true, cwd);
|
|
267360
267365
|
if (prod) {
|
|
267361
267366
|
process.env.NODE_ENV = "production";
|
|
267362
267367
|
}
|
|
@@ -267371,7 +267376,7 @@ async function writeEnv(prod, env2, secrets) {
|
|
|
267371
267376
|
if (!currentEnv) {
|
|
267372
267377
|
currentEnv = {};
|
|
267373
267378
|
}
|
|
267374
|
-
const mergedEnv = deepmerge(currentEnv, env2);
|
|
267379
|
+
const mergedEnv = deepmerge(pruneCurrentEnv(currentEnv, env2), env2);
|
|
267375
267380
|
await writeFile(envFile, stringify(mergedEnv));
|
|
267376
267381
|
}));
|
|
267377
267382
|
}
|
|
@@ -267399,6 +267404,15 @@ function stringify(obj) {
|
|
|
267399
267404
|
return Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)).map(stringifyPair).filter((value) => value !== undefined).join(`
|
|
267400
267405
|
`);
|
|
267401
267406
|
}
|
|
267407
|
+
function pruneCurrentEnv(currentEnv, env2) {
|
|
267408
|
+
const dotEnvKeys = Object.keys(DotEnvSchema.shape);
|
|
267409
|
+
return Object.fromEntries(Object.entries(currentEnv).filter(([key]) => {
|
|
267410
|
+
if (dotEnvKeys.includes(key) && !env2[key]) {
|
|
267411
|
+
return false;
|
|
267412
|
+
}
|
|
267413
|
+
return true;
|
|
267414
|
+
}));
|
|
267415
|
+
}
|
|
267402
267416
|
|
|
267403
267417
|
// src/utils/telemetry.ts
|
|
267404
267418
|
async function telemetry(data) {
|
|
@@ -267512,6 +267526,20 @@ var note = (message, level = "info") => {
|
|
|
267512
267526
|
}
|
|
267513
267527
|
console.log(maskedMessage);
|
|
267514
267528
|
};
|
|
267529
|
+
function list(title, items) {
|
|
267530
|
+
const formatItems = (items2) => {
|
|
267531
|
+
return items2.map((item) => {
|
|
267532
|
+
if (Array.isArray(item)) {
|
|
267533
|
+
return item.map((subItem) => ` • ${subItem}`).join(`
|
|
267534
|
+
`);
|
|
267535
|
+
}
|
|
267536
|
+
return `• ${item}`;
|
|
267537
|
+
}).join(`
|
|
267538
|
+
`);
|
|
267539
|
+
};
|
|
267540
|
+
return note(`${title}:
|
|
267541
|
+
${formatItems(items)}`);
|
|
267542
|
+
}
|
|
267515
267543
|
var outro = (msg) => {
|
|
267516
267544
|
console.log("");
|
|
267517
267545
|
console.log(inverse(greenBright(maskTokens2(msg))));
|
|
@@ -267538,7 +267566,7 @@ ${error.stack}`));
|
|
|
267538
267566
|
var package_default = {
|
|
267539
267567
|
name: "@settlemint/sdk-cli",
|
|
267540
267568
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267541
|
-
version: "1.0.
|
|
267569
|
+
version: "1.0.6",
|
|
267542
267570
|
type: "module",
|
|
267543
267571
|
private: false,
|
|
267544
267572
|
license: "FSL-1.1-MIT",
|
|
@@ -267593,8 +267621,8 @@ var package_default = {
|
|
|
267593
267621
|
"@inquirer/input": "4.1.3",
|
|
267594
267622
|
"@inquirer/password": "4.0.6",
|
|
267595
267623
|
"@inquirer/select": "4.0.6",
|
|
267596
|
-
"@settlemint/sdk-js": "1.0.
|
|
267597
|
-
"@settlemint/sdk-utils": "1.0.
|
|
267624
|
+
"@settlemint/sdk-js": "1.0.6",
|
|
267625
|
+
"@settlemint/sdk-utils": "1.0.6",
|
|
267598
267626
|
"get-tsconfig": "4.8.1",
|
|
267599
267627
|
giget: "1.2.3"
|
|
267600
267628
|
},
|
|
@@ -267617,15 +267645,15 @@ var package_default = {
|
|
|
267617
267645
|
]
|
|
267618
267646
|
};
|
|
267619
267647
|
|
|
267620
|
-
// src/commands/codegen/write-template.ts
|
|
267648
|
+
// src/commands/codegen/utils/write-template.ts
|
|
267621
267649
|
import { mkdir, writeFile as writeFile2 } from "node:fs/promises";
|
|
267622
267650
|
import { join as join4 } from "node:path";
|
|
267623
267651
|
|
|
267624
267652
|
// ../utils/dist/filesystem.mjs
|
|
267625
267653
|
import { dirname as dirname3 } from "node:path";
|
|
267626
267654
|
import { stat as stat2 } from "node:fs/promises";
|
|
267627
|
-
async function projectRoot2(fallbackToCwd = false) {
|
|
267628
|
-
const packageJsonPath = await findUp("package.json");
|
|
267655
|
+
async function projectRoot2(fallbackToCwd = false, cwd) {
|
|
267656
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267629
267657
|
if (!packageJsonPath) {
|
|
267630
267658
|
if (fallbackToCwd) {
|
|
267631
267659
|
return process.cwd();
|
|
@@ -267643,7 +267671,7 @@ async function exists2(path4) {
|
|
|
267643
267671
|
}
|
|
267644
267672
|
}
|
|
267645
267673
|
|
|
267646
|
-
// src/commands/codegen/write-template.ts
|
|
267674
|
+
// src/commands/codegen/utils/write-template.ts
|
|
267647
267675
|
async function writeTemplate(template, directory, filename) {
|
|
267648
267676
|
const projectDir = await projectRoot2();
|
|
267649
267677
|
const hasSrcDir = await exists2(join4(projectDir, "src"));
|
|
@@ -267685,7 +267713,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
|
267685
267713
|
return defaultValue;
|
|
267686
267714
|
}
|
|
267687
267715
|
}
|
|
267688
|
-
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime =
|
|
267716
|
+
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
|
267689
267717
|
let attempt = 0;
|
|
267690
267718
|
while (attempt < maxRetries) {
|
|
267691
267719
|
try {
|
|
@@ -267754,10 +267782,10 @@ async function getInstanceCredentials(instance, throwOnMissingInstance = true) {
|
|
|
267754
267782
|
if (!throwOnMissingInstance) {
|
|
267755
267783
|
return;
|
|
267756
267784
|
}
|
|
267757
|
-
|
|
267758
|
-
Configured instances
|
|
267759
|
-
|
|
267760
|
-
`
|
|
267785
|
+
if (Object.keys(config3.instances).length > 0) {
|
|
267786
|
+
list("Configured instances", Object.keys(config3.instances));
|
|
267787
|
+
}
|
|
267788
|
+
cancel2(`No configuration found for instance '${instance}'`);
|
|
267761
267789
|
}
|
|
267762
267790
|
return { personalAccessToken: instanceConfig.personalAccessToken };
|
|
267763
267791
|
}
|
|
@@ -267956,8 +267984,8 @@ async function installPackage(names, options = {}) {
|
|
|
267956
267984
|
// ../utils/dist/package-manager.mjs
|
|
267957
267985
|
var import_package_json = __toESM(require_lib12(), 1);
|
|
267958
267986
|
var import_package_json2 = __toESM(require_lib12(), 1);
|
|
267959
|
-
async function projectRoot3(fallbackToCwd = false) {
|
|
267960
|
-
const packageJsonPath = await findUp("package.json");
|
|
267987
|
+
async function projectRoot3(fallbackToCwd = false, cwd) {
|
|
267988
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267961
267989
|
if (!packageJsonPath) {
|
|
267962
267990
|
if (fallbackToCwd) {
|
|
267963
267991
|
return process.cwd();
|
|
@@ -267974,9 +268002,6 @@ async function exists3(path5) {
|
|
|
267974
268002
|
return false;
|
|
267975
268003
|
}
|
|
267976
268004
|
}
|
|
267977
|
-
var templates = [
|
|
267978
|
-
{ value: "@settlemint/starterkit-asset-tokenization", label: "Asset Tokenization" }
|
|
267979
|
-
];
|
|
267980
268005
|
function formatTargetDir(targetDir) {
|
|
267981
268006
|
return targetDir?.trim().replace(/\/+$/g, "");
|
|
267982
268007
|
}
|
|
@@ -268154,6 +268179,11 @@ export const { client: portalClient, graphql: portalGraphql } = createPortalClie
|
|
|
268154
268179
|
}
|
|
268155
268180
|
}
|
|
268156
268181
|
|
|
268182
|
+
// src/commands/codegen/utils/get-variable-name.ts
|
|
268183
|
+
function getVariableName(name2) {
|
|
268184
|
+
return name2.split(/[^a-zA-Z0-9]/g).map((word2, index) => (index === 0 ? word2.charAt(0).toLowerCase() : word2.charAt(0).toUpperCase()) + word2.slice(1)).join("");
|
|
268185
|
+
}
|
|
268186
|
+
|
|
268157
268187
|
// src/commands/codegen/codegen-the-graph.ts
|
|
268158
268188
|
var PACKAGE_NAME3 = "@settlemint/sdk-thegraph";
|
|
268159
268189
|
async function codegenTheGraph(env2, subgraphNames) {
|
|
@@ -268179,11 +268209,13 @@ async function codegenTheGraph(env2, subgraphNames) {
|
|
|
268179
268209
|
note(`[SKIPPED] Generating TheGraph subgraph ${name2}`);
|
|
268180
268210
|
return false;
|
|
268181
268211
|
}
|
|
268182
|
-
|
|
268212
|
+
const introspectionVariable = getVariableName(`${name2}Introspection`);
|
|
268213
|
+
template.push(`import type { introspection as ${introspectionVariable} } from "@schemas/the-graph-env-${name2}"`);
|
|
268183
268214
|
return true;
|
|
268184
268215
|
});
|
|
268185
268216
|
for (const gqlEndpoint of toGenerate) {
|
|
268186
268217
|
const name2 = gqlEndpoint.split("/").pop();
|
|
268218
|
+
const introspectionVariable = getVariableName(`${name2}Introspection`);
|
|
268187
268219
|
note(`Generating TheGraph subgraph ${name2}`);
|
|
268188
268220
|
await generateSchema({
|
|
268189
268221
|
input: gqlEndpoint,
|
|
@@ -268194,10 +268226,12 @@ async function codegenTheGraph(env2, subgraphNames) {
|
|
|
268194
268226
|
}
|
|
268195
268227
|
});
|
|
268196
268228
|
const nameSuffix = capitalizeFirstLetter(name2);
|
|
268229
|
+
const graphqlClientVariable = getVariableName(`theGraphClient${nameSuffix}`);
|
|
268230
|
+
const graphqlVariable = getVariableName(`theGraphGraphql${nameSuffix}`);
|
|
268197
268231
|
template.push(...[
|
|
268198
268232
|
`
|
|
268199
|
-
export const { client:
|
|
268200
|
-
introspection: ${
|
|
268233
|
+
export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } = createTheGraphClient<{
|
|
268234
|
+
introspection: ${introspectionVariable};
|
|
268201
268235
|
disableMasking: true;
|
|
268202
268236
|
scalars: {
|
|
268203
268237
|
DateTime: Date;
|
|
@@ -268227,7 +268261,7 @@ export const { client: theGraphClient${nameSuffix}, graphql: theGraphGraphql${na
|
|
|
268227
268261
|
import { writeFile as writeFile5 } from "node:fs/promises";
|
|
268228
268262
|
|
|
268229
268263
|
// ../utils/dist/http.mjs
|
|
268230
|
-
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime =
|
|
268264
|
+
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
|
268231
268265
|
let attempt = 0;
|
|
268232
268266
|
while (attempt < maxRetries) {
|
|
268233
268267
|
try {
|
|
@@ -268273,7 +268307,7 @@ async function graphqlFetchWithRetry(input, init2, maxRetries = 5, initialSleepT
|
|
|
268273
268307
|
}, maxRetries, initialSleepTime);
|
|
268274
268308
|
}
|
|
268275
268309
|
|
|
268276
|
-
// src/commands/codegen/test-gql-endpoint.ts
|
|
268310
|
+
// src/commands/codegen/utils/test-gql-endpoint.ts
|
|
268277
268311
|
async function testGqlEndpoint({
|
|
268278
268312
|
accessToken,
|
|
268279
268313
|
hasuraAdminSecret,
|
|
@@ -270633,7 +270667,18 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270633
270667
|
startMessage: "Saving .env and .env.local files",
|
|
270634
270668
|
stopMessage: "Written .env and .env.local file",
|
|
270635
270669
|
task: async () => {
|
|
270636
|
-
|
|
270670
|
+
const updatedSecrets = {
|
|
270671
|
+
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
270672
|
+
SETTLEMINT_HASURA_ADMIN_SECRET: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
270673
|
+
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY,
|
|
270674
|
+
SETTLEMINT_HASURA_DATABASE_URL: env2.SETTLEMINT_HASURA_DATABASE_URL
|
|
270675
|
+
};
|
|
270676
|
+
await writeEnv({
|
|
270677
|
+
prod,
|
|
270678
|
+
env: updatedSecrets,
|
|
270679
|
+
secrets: true
|
|
270680
|
+
});
|
|
270681
|
+
const updatedEnv = {
|
|
270637
270682
|
SETTLEMINT_INSTANCE: env2.SETTLEMINT_INSTANCE,
|
|
270638
270683
|
SETTLEMINT_WORKSPACE: env2.SETTLEMINT_WORKSPACE,
|
|
270639
270684
|
SETTLEMINT_APPLICATION: env2.SETTLEMINT_APPLICATION,
|
|
@@ -270649,6 +270694,7 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270649
270694
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
|
|
270650
270695
|
SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
|
|
270651
270696
|
SETTLEMINT_HD_PRIVATE_KEY: env2.SETTLEMINT_HD_PRIVATE_KEY,
|
|
270697
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: env2.SETTLEMINT_ACCESSIBLE_PRIVATE_KEY,
|
|
270652
270698
|
SETTLEMINT_MINIO: env2.SETTLEMINT_MINIO,
|
|
270653
270699
|
SETTLEMINT_MINIO_ENDPOINT: env2.SETTLEMINT_MINIO_ENDPOINT,
|
|
270654
270700
|
SETTLEMINT_MINIO_ACCESS_KEY: env2.SETTLEMINT_MINIO_ACCESS_KEY,
|
|
@@ -270661,15 +270707,15 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270661
270707
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
270662
270708
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
270663
270709
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
270710
|
+
SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME,
|
|
270664
270711
|
SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
|
|
270665
270712
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
|
|
270666
|
-
}
|
|
270667
|
-
await writeEnv(
|
|
270668
|
-
|
|
270669
|
-
|
|
270670
|
-
|
|
270671
|
-
|
|
270672
|
-
}, true);
|
|
270713
|
+
};
|
|
270714
|
+
await writeEnv({
|
|
270715
|
+
prod,
|
|
270716
|
+
env: updatedEnv,
|
|
270717
|
+
secrets: false
|
|
270718
|
+
});
|
|
270673
270719
|
}
|
|
270674
270720
|
});
|
|
270675
270721
|
}
|
|
@@ -270679,15 +270725,19 @@ async function getGraphEndpoint(settlemint, service, graphName) {
|
|
|
270679
270725
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
270680
270726
|
return {};
|
|
270681
270727
|
}
|
|
270682
|
-
const theGraphMiddleware = await
|
|
270683
|
-
|
|
270684
|
-
|
|
270685
|
-
|
|
270686
|
-
|
|
270687
|
-
|
|
270688
|
-
|
|
270689
|
-
|
|
270690
|
-
|
|
270728
|
+
const theGraphMiddleware = await spinner({
|
|
270729
|
+
startMessage: "Fetching TheGraph subgraph endpoints",
|
|
270730
|
+
stopMessage: "Fetched TheGraph subgraph endpoints",
|
|
270731
|
+
task: () => retryWhenFailed(async () => {
|
|
270732
|
+
const middleware = await settlemint.middleware.graphSubgraphs(service.uniqueName, !!graphName);
|
|
270733
|
+
if (!middleware || middleware.__typename !== "HAGraphMiddleware") {
|
|
270734
|
+
throw new Error(`Middleware '${service.uniqueName}' is not a graph middleware`);
|
|
270735
|
+
}
|
|
270736
|
+
if (graphName && !middleware.subgraphs.find(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.id.endsWith(graphName))) {
|
|
270737
|
+
throw new Error(`Subgraph '${graphName}' not found in middleware '${service.uniqueName}'`);
|
|
270738
|
+
}
|
|
270739
|
+
return middleware;
|
|
270740
|
+
})
|
|
270691
270741
|
});
|
|
270692
270742
|
const endpoints = theGraphMiddleware.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue);
|
|
270693
270743
|
return {
|
|
@@ -272718,11 +272768,14 @@ var ClientOptionsSchema = z.object({
|
|
|
272718
272768
|
});
|
|
272719
272769
|
function createSettleMintClient(options) {
|
|
272720
272770
|
ensureServer();
|
|
272721
|
-
const validatedOptions = validate2(
|
|
272771
|
+
const validatedOptions = options.anonymous ? validate2(z.object({
|
|
272772
|
+
...ClientOptionsSchema.shape,
|
|
272773
|
+
accessToken: z.literal("")
|
|
272774
|
+
}), options) : validate2(ClientOptionsSchema, options);
|
|
272722
272775
|
const baseUrl = new URL(validatedOptions.instance).toString().replace(/\/$/, "");
|
|
272723
272776
|
const gqlClient = new GraphQLClient(`${baseUrl}/api/graphql`, {
|
|
272724
272777
|
headers: {
|
|
272725
|
-
"x-auth-token": validatedOptions.accessToken
|
|
272778
|
+
"x-auth-token": validatedOptions.accessToken ?? ""
|
|
272726
272779
|
},
|
|
272727
272780
|
fetch: async (input, init2) => {
|
|
272728
272781
|
const response = await fetchWithRetry(input, init2);
|
|
@@ -273544,23 +273597,20 @@ function connectCommand() {
|
|
|
273544
273597
|
});
|
|
273545
273598
|
if (acceptDefaults) {
|
|
273546
273599
|
const selectedServices = [
|
|
273547
|
-
`Workspace: ${workspace.name}`,
|
|
273548
|
-
`Application: ${application.name}`,
|
|
273549
|
-
blockchainNode && `Blockchain Network: ${blockchainNode?.blockchainNetwork?.name}`,
|
|
273550
|
-
blockchainNode && `Blockchain Node: ${blockchainNode?.name}`,
|
|
273551
|
-
hasura && `Hasura: ${hasura?.name}`,
|
|
273552
|
-
thegraph && `TheGraph: ${thegraph?.name}`,
|
|
273553
|
-
portal && `Portal: ${portal?.name}`,
|
|
273554
|
-
ipfs && `IPFS: ${ipfs?.name}`,
|
|
273555
|
-
minio && `MinIO: ${minio?.name}`,
|
|
273556
|
-
hdPrivateKey && `HD Private Key: ${hdPrivateKey?.name}`,
|
|
273557
|
-
cDeployment && `Custom Deployment: ${cDeployment?.name}`,
|
|
273558
|
-
blockscout && `Blockscout: ${blockscout?.name}`
|
|
273559
|
-
];
|
|
273560
|
-
|
|
273561
|
-
• ${selectedServices.filter(Boolean).join(`
|
|
273562
|
-
• `)}
|
|
273563
|
-
`);
|
|
273600
|
+
`Workspace: ${workspace.name} (${workspace.uniqueName})`,
|
|
273601
|
+
`Application: ${application.name} (${application.uniqueName})`,
|
|
273602
|
+
blockchainNode && `Blockchain Network: ${blockchainNode?.blockchainNetwork?.name} (${blockchainNode?.blockchainNetwork?.uniqueName})`,
|
|
273603
|
+
blockchainNode && `Blockchain Node: ${blockchainNode?.name} (${blockchainNode?.uniqueName})`,
|
|
273604
|
+
hasura && `Hasura: ${hasura?.name} (${hasura?.uniqueName})`,
|
|
273605
|
+
thegraph && `TheGraph: ${thegraph?.name} (${thegraph?.uniqueName})`,
|
|
273606
|
+
portal && `Portal: ${portal?.name} (${portal?.uniqueName})`,
|
|
273607
|
+
ipfs && `IPFS: ${ipfs?.name} (${ipfs?.uniqueName})`,
|
|
273608
|
+
minio && `MinIO: ${minio?.name} (${minio?.uniqueName})`,
|
|
273609
|
+
hdPrivateKey && `HD Private Key: ${hdPrivateKey?.name} (${hdPrivateKey?.uniqueName})`,
|
|
273610
|
+
cDeployment && `Custom Deployment: ${cDeployment?.name} (${cDeployment?.uniqueName})`,
|
|
273611
|
+
blockscout && `Blockscout: ${blockscout?.name} (${blockscout?.uniqueName})`
|
|
273612
|
+
].filter(Boolean);
|
|
273613
|
+
list("Selected services", selectedServices);
|
|
273564
273614
|
}
|
|
273565
273615
|
await writeEnvSpinner(!!prod, {
|
|
273566
273616
|
SETTLEMINT_ACCESS_TOKEN: aatToken,
|
|
@@ -273614,26 +273664,35 @@ async function namePrompt(env2, argument) {
|
|
|
273614
273664
|
});
|
|
273615
273665
|
}
|
|
273616
273666
|
|
|
273667
|
+
// src/commands/platform/utils/platform-utils.ts
|
|
273668
|
+
function getUseCases(platformConfig) {
|
|
273669
|
+
return platformConfig.smartContractSets.sets.filter((useCase) => !useCase.featureflagged && !useCase.id.startsWith("starterkit-"));
|
|
273670
|
+
}
|
|
273671
|
+
function getStarterkits(platformConfig) {
|
|
273672
|
+
return platformConfig.smartContractSets.sets.filter((useCase) => useCase.id.startsWith("starterkit-"));
|
|
273673
|
+
}
|
|
273674
|
+
|
|
273617
273675
|
// src/commands/create/template.prompt.ts
|
|
273618
|
-
async function templatePrompt(
|
|
273619
|
-
|
|
273676
|
+
async function templatePrompt(platformConfig, argument) {
|
|
273677
|
+
const starterkits = getStarterkits(platformConfig);
|
|
273678
|
+
if (starterkits.length === 0) {
|
|
273620
273679
|
cancel2("No templates found");
|
|
273621
273680
|
}
|
|
273622
273681
|
const defaultInstance = argument;
|
|
273623
273682
|
if (defaultInstance) {
|
|
273624
|
-
const template2 =
|
|
273683
|
+
const template2 = starterkits.find((starterKit) => starterKit.id === argument);
|
|
273625
273684
|
if (!template2) {
|
|
273626
273685
|
cancel2(`No template found with name '${argument}'`);
|
|
273627
273686
|
}
|
|
273628
|
-
return template2;
|
|
273687
|
+
return template2.id;
|
|
273629
273688
|
}
|
|
273630
273689
|
const template = await esm_default2({
|
|
273631
273690
|
message: "Which template do you want to use?",
|
|
273632
273691
|
choices: [
|
|
273633
|
-
...
|
|
273634
|
-
name: template2.
|
|
273635
|
-
value: template2
|
|
273636
|
-
}))
|
|
273692
|
+
...starterkits.map((template2) => ({
|
|
273693
|
+
name: template2.name,
|
|
273694
|
+
value: template2.id
|
|
273695
|
+
})).sort((a8, b4) => a8.name.localeCompare(b4.name))
|
|
273637
273696
|
]
|
|
273638
273697
|
});
|
|
273639
273698
|
return template;
|
|
@@ -274339,9 +274398,20 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
|
|
|
274339
274398
|
|
|
274340
274399
|
// src/commands/create.ts
|
|
274341
274400
|
function createCommand2() {
|
|
274342
|
-
return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").
|
|
274401
|
+
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 }) => {
|
|
274343
274402
|
intro("Creating a new SettleMint project");
|
|
274344
274403
|
const env2 = await loadEnv(false, false);
|
|
274404
|
+
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
274405
|
+
const settlemint = createSettleMintClient({
|
|
274406
|
+
instance: selectedInstance,
|
|
274407
|
+
accessToken: "",
|
|
274408
|
+
anonymous: true
|
|
274409
|
+
});
|
|
274410
|
+
const platformConfig = await settlemint.platform.config();
|
|
274411
|
+
const selectedTemplate = await templatePrompt(platformConfig, template);
|
|
274412
|
+
if (!selectedTemplate) {
|
|
274413
|
+
return nothingSelectedError("template");
|
|
274414
|
+
}
|
|
274345
274415
|
const name2 = await namePrompt(env2, projectName);
|
|
274346
274416
|
const targetDir = formatTargetDir(name2);
|
|
274347
274417
|
const projectDir = join9(process.cwd(), targetDir);
|
|
@@ -274358,14 +274428,10 @@ function createCommand2() {
|
|
|
274358
274428
|
}
|
|
274359
274429
|
await emptyDir(projectDir);
|
|
274360
274430
|
}
|
|
274361
|
-
const selectedTemplate = await templatePrompt(templates, template);
|
|
274362
|
-
if (!selectedTemplate) {
|
|
274363
|
-
return nothingSelectedError("template");
|
|
274364
|
-
}
|
|
274365
274431
|
await spinner({
|
|
274366
274432
|
startMessage: "Scaffolding the project",
|
|
274367
274433
|
task: async () => {
|
|
274368
|
-
await downloadAndExtractNpmPackage(selectedTemplate
|
|
274434
|
+
await downloadAndExtractNpmPackage(`@settlemint/${selectedTemplate}`, projectDir);
|
|
274369
274435
|
await setName(name2, projectDir);
|
|
274370
274436
|
},
|
|
274371
274437
|
stopMessage: "Project fully scaffolded"
|
|
@@ -275933,7 +275999,7 @@ function getDeleteCommand({
|
|
|
275933
275999
|
const isDefaultUniqueName = uniqueName === "default";
|
|
275934
276000
|
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275935
276001
|
if (!serviceUniqueName) {
|
|
275936
|
-
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4}
|
|
276002
|
+
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
|
275937
276003
|
}
|
|
275938
276004
|
const result = await spinner({
|
|
275939
276005
|
startMessage: `Deleting ${type4}`,
|
|
@@ -276002,7 +276068,7 @@ function getRestartCommand({
|
|
|
276002
276068
|
usePersonalAccessToken = true
|
|
276003
276069
|
}) {
|
|
276004
276070
|
const commandName = sanitizeCommandName(name2);
|
|
276005
|
-
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4}
|
|
276071
|
+
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
|
276006
276072
|
{
|
|
276007
276073
|
description: `Restarts the specified ${type4} by id`,
|
|
276008
276074
|
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
|
@@ -276227,27 +276293,22 @@ function configCommand() {
|
|
|
276227
276293
|
intro("Getting platform configuration");
|
|
276228
276294
|
const env2 = await loadEnv(false, !!prod);
|
|
276229
276295
|
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
276230
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276231
|
-
env: env2,
|
|
276232
|
-
instance: selectedInstance,
|
|
276233
|
-
prefer: "personal"
|
|
276234
|
-
});
|
|
276235
276296
|
const settlemint = createSettleMintClient({
|
|
276236
|
-
accessToken,
|
|
276237
|
-
instance: selectedInstance
|
|
276297
|
+
accessToken: "",
|
|
276298
|
+
instance: selectedInstance,
|
|
276299
|
+
anonymous: true
|
|
276238
276300
|
});
|
|
276239
276301
|
const platformConfig = await settlemint.platform.config();
|
|
276240
|
-
|
|
276241
|
-
|
|
276242
|
-
|
|
276243
|
-
|
|
276244
|
-
|
|
276245
|
-
|
|
276246
|
-
|
|
276247
|
-
|
|
276248
|
-
|
|
276249
|
-
|
|
276250
|
-
• `)}`);
|
|
276302
|
+
const useCases = getUseCases(platformConfig);
|
|
276303
|
+
const starterkits = getStarterkits(platformConfig);
|
|
276304
|
+
list("Templates (Starterkits)", starterkits.map((starterkit) => starterkit.id).sort());
|
|
276305
|
+
list("Use cases (Smart Contract Sets)", useCases.map((useCase) => useCase.id).sort());
|
|
276306
|
+
list("Providers and regions", platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).sort((a8, b4) => a8.id.localeCompare(b4.id)).reduce((acc, provider) => {
|
|
276307
|
+
acc.push(provider.id);
|
|
276308
|
+
acc.push(provider.clusters.filter((cluster) => !cluster.disabled).map((region) => getRegionId(region.id)).sort());
|
|
276309
|
+
return acc;
|
|
276310
|
+
}, []));
|
|
276311
|
+
list("Pre-deployed abis (Smart Contract Portal)", platformConfig.preDeployedContracts.sort());
|
|
276251
276312
|
outro("Platform configuration retrieved");
|
|
276252
276313
|
});
|
|
276253
276314
|
}
|
|
@@ -276266,45 +276327,50 @@ async function useCasePrompt(platformConfig, argument) {
|
|
|
276266
276327
|
if (platformConfig.smartContractSets.sets.length === 0) {
|
|
276267
276328
|
cancel2("No use cases found");
|
|
276268
276329
|
}
|
|
276269
|
-
const
|
|
276330
|
+
const selectableUseCases = getUseCases(platformConfig);
|
|
276270
276331
|
if (argument) {
|
|
276271
276332
|
const selectedUseCase = platformConfig.smartContractSets.sets.find((set) => set.id === argument);
|
|
276272
276333
|
if (!selectedUseCase) {
|
|
276273
|
-
cancel2(`No use case found with id '${argument}'. Possible use cases: '${
|
|
276334
|
+
cancel2(`No use case found with id '${argument}'. Possible use cases: '${selectableUseCases.map((set) => set.id).sort().join(", ")}'`);
|
|
276274
276335
|
}
|
|
276275
276336
|
return selectedUseCase;
|
|
276276
276337
|
}
|
|
276277
|
-
if (
|
|
276338
|
+
if (selectableUseCases.length === 0) {
|
|
276278
276339
|
cancel2("No use cases found");
|
|
276279
276340
|
}
|
|
276280
|
-
if (
|
|
276281
|
-
return
|
|
276341
|
+
if (selectableUseCases.length === 1) {
|
|
276342
|
+
return selectableUseCases[0];
|
|
276282
276343
|
}
|
|
276283
276344
|
const useCase = await esm_default2({
|
|
276284
276345
|
message: "Which use case do you want to use?",
|
|
276285
|
-
choices:
|
|
276286
|
-
name: useCase2.name,
|
|
276346
|
+
choices: selectableUseCases.map((useCase2) => ({
|
|
276347
|
+
name: formatUseCaseName(useCase2.name),
|
|
276287
276348
|
value: useCase2.id
|
|
276288
276349
|
})).sort((a8, b4) => a8.name.localeCompare(b4.name))
|
|
276289
276350
|
});
|
|
276290
276351
|
return platformConfig.smartContractSets.sets.find((set) => set.id === useCase);
|
|
276291
276352
|
}
|
|
276353
|
+
function formatUseCaseName(name2) {
|
|
276354
|
+
if (name2.startsWith("solidity-")) {
|
|
276355
|
+
return name2.replace("solidity-", "Solidity: ");
|
|
276356
|
+
}
|
|
276357
|
+
if (name2.startsWith("chaincode-")) {
|
|
276358
|
+
return name2.replace("chaincode-", "Fabric: ");
|
|
276359
|
+
}
|
|
276360
|
+
return name2;
|
|
276361
|
+
}
|
|
276292
276362
|
|
|
276293
276363
|
// src/commands/smart-contract-set/create.ts
|
|
276294
276364
|
function createCommand4() {
|
|
276295
|
-
return new Command("create").description("Bootstrap your smart contract set").option("-n, --project-name <name>", "The name for your smart contract set project").option("--use-case <useCase>", "Use case for the smart contract set (run `settlemint platform config` to see available use cases)").option("--
|
|
276365
|
+
return new Command("create").description("Bootstrap your smart contract set").option("-n, --project-name <name>", "The name for your smart contract set project").option("--use-case <useCase>", "Use case for the smart contract set (run `settlemint platform config` to see available use cases)").option("-i, --instance <instance>", "The instance to connect to").action(async ({ projectName, useCase, instance }) => {
|
|
276296
276366
|
intro("Creating a new smart contract set");
|
|
276297
|
-
const env2 = await loadEnv(false,
|
|
276367
|
+
const env2 = await loadEnv(false, false);
|
|
276298
276368
|
const name2 = await namePrompt(env2, projectName);
|
|
276299
|
-
const
|
|
276300
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
|
276301
|
-
env: env2,
|
|
276302
|
-
instance,
|
|
276303
|
-
prefer: "personal"
|
|
276304
|
-
});
|
|
276369
|
+
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
276305
276370
|
const settlemint = createSettleMintClient({
|
|
276306
|
-
|
|
276307
|
-
|
|
276371
|
+
instance: selectedInstance,
|
|
276372
|
+
accessToken: "",
|
|
276373
|
+
anonymous: true
|
|
276308
276374
|
});
|
|
276309
276375
|
const platformConfig = await settlemint.platform.config();
|
|
276310
276376
|
const selectedUseCase = await useCasePrompt(platformConfig, useCase);
|
|
@@ -277243,4 +277309,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277243
277309
|
ascii();
|
|
277244
277310
|
sdkCliCommand();
|
|
277245
277311
|
|
|
277246
|
-
//# debugId=
|
|
277312
|
+
//# debugId=C4A9E9B554CA85AA64756E2164756E21
|