@fuel-ts/account 0.0.0-rc-2272-20240516141848 → 0.0.0-rc-2143-20240516153006
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/configs.d.ts +1 -1
- package/dist/configs.d.ts.map +1 -1
- package/dist/configs.global.js +1 -1
- package/dist/configs.global.js.map +1 -1
- package/dist/configs.js +5 -5
- package/dist/configs.js.map +1 -1
- package/dist/configs.mjs +3 -3
- package/dist/configs.mjs.map +1 -1
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils/launchNode.d.ts +3 -3
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +66 -82
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +2 -4
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +2 -4
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
@@ -6,7 +6,7 @@ export type LaunchNodeOptions = {
|
|
6
6
|
ip?: string;
|
7
7
|
port?: string;
|
8
8
|
args?: string[];
|
9
|
-
|
9
|
+
fuelCorePath?: string;
|
10
10
|
loggingEnabled?: boolean;
|
11
11
|
debugEnabled?: boolean;
|
12
12
|
basePath?: string;
|
@@ -31,12 +31,12 @@ export declare const killNode: (params: KillNodeParams) => void;
|
|
31
31
|
* @param ip - the ip to bind to. (optional, defaults to 0.0.0.0)
|
32
32
|
* @param port - the port to bind to. (optional, defaults to 4000 or the next available port)
|
33
33
|
* @param args - additional arguments to pass to fuel-core.
|
34
|
-
* @param
|
34
|
+
* @param fuelCorePath - the path to the fuel-core binary. (optional, defaults to 'fuel-core')
|
35
35
|
* @param loggingEnabled - whether the node should output logs. (optional, defaults to true)
|
36
36
|
* @param debugEnabled - whether the node should log debug messages. (optional, defaults to false)
|
37
37
|
* @param basePath - the base path to use for the temporary folder. (optional, defaults to os.tmpdir())
|
38
38
|
* */
|
39
|
-
export declare const launchNode: ({ ip, port, args,
|
39
|
+
export declare const launchNode: ({ ip, port, args, fuelCorePath, loggingEnabled, debugEnabled, basePath, }: LaunchNodeOptions) => LaunchNodeResult;
|
40
40
|
export type LaunchNodeAndGetWalletsResult = Promise<{
|
41
41
|
wallets: WalletUnlocked[];
|
42
42
|
stop: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"launchNode.d.ts","sourceRoot":"","sources":["../../src/test-utils/launchNode.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AASpE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAuBhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,
|
1
|
+
{"version":3,"file":"launchNode.d.ts","sourceRoot":"","sources":["../../src/test-utils/launchNode.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AASpE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAuBhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,8BAA8B,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,EAAE;QACL,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,cAAc,SAiB9C,CAAC;AAGF;;;;;;;;;KASK;AAEL,eAAO,MAAM,UAAU,8EAQpB,iBAAiB,qBA+KhB,CAAC;AAYL,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;IAClD,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC,CAAC;AAEH;;;;KAIK;AACL,eAAO,MAAM,uBAAuB;;;mCAiBnC,CAAC"}
|
@@ -9511,16 +9511,16 @@ spurious results.`);
|
|
9511
9511
|
},
|
9512
9512
|
// Document
|
9513
9513
|
Document: {
|
9514
|
-
leave: (node) =>
|
9514
|
+
leave: (node) => join2(node.definitions, "\n\n")
|
9515
9515
|
},
|
9516
9516
|
OperationDefinition: {
|
9517
9517
|
leave(node) {
|
9518
|
-
const varDefs = wrap2("(",
|
9519
|
-
const prefix =
|
9518
|
+
const varDefs = wrap2("(", join2(node.variableDefinitions, ", "), ")");
|
9519
|
+
const prefix = join2(
|
9520
9520
|
[
|
9521
9521
|
node.operation,
|
9522
|
-
|
9523
|
-
|
9522
|
+
join2([node.name, varDefs]),
|
9523
|
+
join2(node.directives, " ")
|
9524
9524
|
],
|
9525
9525
|
" "
|
9526
9526
|
);
|
@@ -9528,7 +9528,7 @@ spurious results.`);
|
|
9528
9528
|
}
|
9529
9529
|
},
|
9530
9530
|
VariableDefinition: {
|
9531
|
-
leave: ({ variable, type: type3, defaultValue, directives }) => variable + ": " + type3 + wrap2(" = ", defaultValue) + wrap2(" ",
|
9531
|
+
leave: ({ variable, type: type3, defaultValue, directives }) => variable + ": " + type3 + wrap2(" = ", defaultValue) + wrap2(" ", join2(directives, " "))
|
9532
9532
|
},
|
9533
9533
|
SelectionSet: {
|
9534
9534
|
leave: ({ selections }) => block2(selections)
|
@@ -9536,11 +9536,11 @@ spurious results.`);
|
|
9536
9536
|
Field: {
|
9537
9537
|
leave({ alias, name, arguments: args, directives, selectionSet }) {
|
9538
9538
|
const prefix = wrap2("", alias, ": ") + name;
|
9539
|
-
let argsLine = prefix + wrap2("(",
|
9539
|
+
let argsLine = prefix + wrap2("(", join2(args, ", "), ")");
|
9540
9540
|
if (argsLine.length > MAX_LINE_LENGTH2) {
|
9541
|
-
argsLine = prefix + wrap2("(\n", indent2(
|
9541
|
+
argsLine = prefix + wrap2("(\n", indent2(join2(args, "\n")), "\n)");
|
9542
9542
|
}
|
9543
|
-
return
|
9543
|
+
return join2([argsLine, join2(directives, " "), selectionSet], " ");
|
9544
9544
|
}
|
9545
9545
|
},
|
9546
9546
|
Argument: {
|
@@ -9548,14 +9548,14 @@ spurious results.`);
|
|
9548
9548
|
},
|
9549
9549
|
// Fragments
|
9550
9550
|
FragmentSpread: {
|
9551
|
-
leave: ({ name, directives }) => "..." + name + wrap2(" ",
|
9551
|
+
leave: ({ name, directives }) => "..." + name + wrap2(" ", join2(directives, " "))
|
9552
9552
|
},
|
9553
9553
|
InlineFragment: {
|
9554
|
-
leave: ({ typeCondition, directives, selectionSet }) =>
|
9554
|
+
leave: ({ typeCondition, directives, selectionSet }) => join2(
|
9555
9555
|
[
|
9556
9556
|
"...",
|
9557
9557
|
wrap2("on ", typeCondition),
|
9558
|
-
|
9558
|
+
join2(directives, " "),
|
9559
9559
|
selectionSet
|
9560
9560
|
],
|
9561
9561
|
" "
|
@@ -9564,7 +9564,7 @@ spurious results.`);
|
|
9564
9564
|
FragmentDefinition: {
|
9565
9565
|
leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => (
|
9566
9566
|
// or removed in the future.
|
9567
|
-
`fragment ${name}${wrap2("(",
|
9567
|
+
`fragment ${name}${wrap2("(", join2(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join2(directives, " "), " ")}` + selectionSet
|
9568
9568
|
)
|
9569
9569
|
},
|
9570
9570
|
// Value
|
@@ -9587,17 +9587,17 @@ spurious results.`);
|
|
9587
9587
|
leave: ({ value }) => value
|
9588
9588
|
},
|
9589
9589
|
ListValue: {
|
9590
|
-
leave: ({ values }) => "[" +
|
9590
|
+
leave: ({ values }) => "[" + join2(values, ", ") + "]"
|
9591
9591
|
},
|
9592
9592
|
ObjectValue: {
|
9593
|
-
leave: ({ fields }) => "{" +
|
9593
|
+
leave: ({ fields }) => "{" + join2(fields, ", ") + "}"
|
9594
9594
|
},
|
9595
9595
|
ObjectField: {
|
9596
9596
|
leave: ({ name, value }) => name + ": " + value
|
9597
9597
|
},
|
9598
9598
|
// Directive
|
9599
9599
|
Directive: {
|
9600
|
-
leave: ({ name, arguments: args }) => "@" + name + wrap2("(",
|
9600
|
+
leave: ({ name, arguments: args }) => "@" + name + wrap2("(", join2(args, ", "), ")")
|
9601
9601
|
},
|
9602
9602
|
// Type
|
9603
9603
|
NamedType: {
|
@@ -9611,122 +9611,122 @@ spurious results.`);
|
|
9611
9611
|
},
|
9612
9612
|
// Type System Definitions
|
9613
9613
|
SchemaDefinition: {
|
9614
|
-
leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") +
|
9614
|
+
leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") + join2(["schema", join2(directives, " "), block2(operationTypes)], " ")
|
9615
9615
|
},
|
9616
9616
|
OperationTypeDefinition: {
|
9617
9617
|
leave: ({ operation, type: type3 }) => operation + ": " + type3
|
9618
9618
|
},
|
9619
9619
|
ScalarTypeDefinition: {
|
9620
|
-
leave: ({ description, name, directives }) => wrap2("", description, "\n") +
|
9620
|
+
leave: ({ description, name, directives }) => wrap2("", description, "\n") + join2(["scalar", name, join2(directives, " ")], " ")
|
9621
9621
|
},
|
9622
9622
|
ObjectTypeDefinition: {
|
9623
|
-
leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") +
|
9623
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join2(
|
9624
9624
|
[
|
9625
9625
|
"type",
|
9626
9626
|
name,
|
9627
|
-
wrap2("implements ",
|
9628
|
-
|
9627
|
+
wrap2("implements ", join2(interfaces, " & ")),
|
9628
|
+
join2(directives, " "),
|
9629
9629
|
block2(fields)
|
9630
9630
|
],
|
9631
9631
|
" "
|
9632
9632
|
)
|
9633
9633
|
},
|
9634
9634
|
FieldDefinition: {
|
9635
|
-
leave: ({ description, name, arguments: args, type: type3, directives }) => wrap2("", description, "\n") + name + (hasMultilineItems2(args) ? wrap2("(\n", indent2(
|
9635
|
+
leave: ({ description, name, arguments: args, type: type3, directives }) => wrap2("", description, "\n") + name + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join2(args, "\n")), "\n)") : wrap2("(", join2(args, ", "), ")")) + ": " + type3 + wrap2(" ", join2(directives, " "))
|
9636
9636
|
},
|
9637
9637
|
InputValueDefinition: {
|
9638
|
-
leave: ({ description, name, type: type3, defaultValue, directives }) => wrap2("", description, "\n") +
|
9639
|
-
[name + ": " + type3, wrap2("= ", defaultValue),
|
9638
|
+
leave: ({ description, name, type: type3, defaultValue, directives }) => wrap2("", description, "\n") + join2(
|
9639
|
+
[name + ": " + type3, wrap2("= ", defaultValue), join2(directives, " ")],
|
9640
9640
|
" "
|
9641
9641
|
)
|
9642
9642
|
},
|
9643
9643
|
InterfaceTypeDefinition: {
|
9644
|
-
leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") +
|
9644
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join2(
|
9645
9645
|
[
|
9646
9646
|
"interface",
|
9647
9647
|
name,
|
9648
|
-
wrap2("implements ",
|
9649
|
-
|
9648
|
+
wrap2("implements ", join2(interfaces, " & ")),
|
9649
|
+
join2(directives, " "),
|
9650
9650
|
block2(fields)
|
9651
9651
|
],
|
9652
9652
|
" "
|
9653
9653
|
)
|
9654
9654
|
},
|
9655
9655
|
UnionTypeDefinition: {
|
9656
|
-
leave: ({ description, name, directives, types }) => wrap2("", description, "\n") +
|
9657
|
-
["union", name,
|
9656
|
+
leave: ({ description, name, directives, types }) => wrap2("", description, "\n") + join2(
|
9657
|
+
["union", name, join2(directives, " "), wrap2("= ", join2(types, " | "))],
|
9658
9658
|
" "
|
9659
9659
|
)
|
9660
9660
|
},
|
9661
9661
|
EnumTypeDefinition: {
|
9662
|
-
leave: ({ description, name, directives, values }) => wrap2("", description, "\n") +
|
9662
|
+
leave: ({ description, name, directives, values }) => wrap2("", description, "\n") + join2(["enum", name, join2(directives, " "), block2(values)], " ")
|
9663
9663
|
},
|
9664
9664
|
EnumValueDefinition: {
|
9665
|
-
leave: ({ description, name, directives }) => wrap2("", description, "\n") +
|
9665
|
+
leave: ({ description, name, directives }) => wrap2("", description, "\n") + join2([name, join2(directives, " ")], " ")
|
9666
9666
|
},
|
9667
9667
|
InputObjectTypeDefinition: {
|
9668
|
-
leave: ({ description, name, directives, fields }) => wrap2("", description, "\n") +
|
9668
|
+
leave: ({ description, name, directives, fields }) => wrap2("", description, "\n") + join2(["input", name, join2(directives, " "), block2(fields)], " ")
|
9669
9669
|
},
|
9670
9670
|
DirectiveDefinition: {
|
9671
|
-
leave: ({ description, name, arguments: args, repeatable, locations }) => wrap2("", description, "\n") + "directive @" + name + (hasMultilineItems2(args) ? wrap2("(\n", indent2(
|
9671
|
+
leave: ({ description, name, arguments: args, repeatable, locations }) => wrap2("", description, "\n") + "directive @" + name + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join2(args, "\n")), "\n)") : wrap2("(", join2(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join2(locations, " | ")
|
9672
9672
|
},
|
9673
9673
|
SchemaExtension: {
|
9674
|
-
leave: ({ directives, operationTypes }) =>
|
9675
|
-
["extend schema",
|
9674
|
+
leave: ({ directives, operationTypes }) => join2(
|
9675
|
+
["extend schema", join2(directives, " "), block2(operationTypes)],
|
9676
9676
|
" "
|
9677
9677
|
)
|
9678
9678
|
},
|
9679
9679
|
ScalarTypeExtension: {
|
9680
|
-
leave: ({ name, directives }) =>
|
9680
|
+
leave: ({ name, directives }) => join2(["extend scalar", name, join2(directives, " ")], " ")
|
9681
9681
|
},
|
9682
9682
|
ObjectTypeExtension: {
|
9683
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
9683
|
+
leave: ({ name, interfaces, directives, fields }) => join2(
|
9684
9684
|
[
|
9685
9685
|
"extend type",
|
9686
9686
|
name,
|
9687
|
-
wrap2("implements ",
|
9688
|
-
|
9687
|
+
wrap2("implements ", join2(interfaces, " & ")),
|
9688
|
+
join2(directives, " "),
|
9689
9689
|
block2(fields)
|
9690
9690
|
],
|
9691
9691
|
" "
|
9692
9692
|
)
|
9693
9693
|
},
|
9694
9694
|
InterfaceTypeExtension: {
|
9695
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
9695
|
+
leave: ({ name, interfaces, directives, fields }) => join2(
|
9696
9696
|
[
|
9697
9697
|
"extend interface",
|
9698
9698
|
name,
|
9699
|
-
wrap2("implements ",
|
9700
|
-
|
9699
|
+
wrap2("implements ", join2(interfaces, " & ")),
|
9700
|
+
join2(directives, " "),
|
9701
9701
|
block2(fields)
|
9702
9702
|
],
|
9703
9703
|
" "
|
9704
9704
|
)
|
9705
9705
|
},
|
9706
9706
|
UnionTypeExtension: {
|
9707
|
-
leave: ({ name, directives, types }) =>
|
9707
|
+
leave: ({ name, directives, types }) => join2(
|
9708
9708
|
[
|
9709
9709
|
"extend union",
|
9710
9710
|
name,
|
9711
|
-
|
9712
|
-
wrap2("= ",
|
9711
|
+
join2(directives, " "),
|
9712
|
+
wrap2("= ", join2(types, " | "))
|
9713
9713
|
],
|
9714
9714
|
" "
|
9715
9715
|
)
|
9716
9716
|
},
|
9717
9717
|
EnumTypeExtension: {
|
9718
|
-
leave: ({ name, directives, values }) =>
|
9718
|
+
leave: ({ name, directives, values }) => join2(["extend enum", name, join2(directives, " "), block2(values)], " ")
|
9719
9719
|
},
|
9720
9720
|
InputObjectTypeExtension: {
|
9721
|
-
leave: ({ name, directives, fields }) =>
|
9721
|
+
leave: ({ name, directives, fields }) => join2(["extend input", name, join2(directives, " "), block2(fields)], " ")
|
9722
9722
|
}
|
9723
9723
|
};
|
9724
|
-
function
|
9724
|
+
function join2(maybeArray, separator = "") {
|
9725
9725
|
var _maybeArray$filter$jo;
|
9726
9726
|
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
|
9727
9727
|
}
|
9728
9728
|
function block2(array) {
|
9729
|
-
return wrap2("{\n", indent2(
|
9729
|
+
return wrap2("{\n", indent2(join2(array, "\n")), "\n}");
|
9730
9730
|
}
|
9731
9731
|
function wrap2(start, maybeString, end = "") {
|
9732
9732
|
return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
|
@@ -49905,27 +49905,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
49905
49905
|
return wallet;
|
49906
49906
|
};
|
49907
49907
|
|
49908
|
-
// ../utils/dist/cli-utils.mjs
|
49909
|
-
var import_fs = __require("fs");
|
49910
|
-
var import_path7 = __require("path");
|
49911
|
-
var findBinPath = (binCommandName, startingDir) => {
|
49912
|
-
const cmdPath = (0, import_path7.join)(startingDir, "node_modules", ".bin", binCommandName);
|
49913
|
-
const parentDir = (0, import_path7.join)(startingDir, "..");
|
49914
|
-
if ((0, import_fs.existsSync)(cmdPath)) {
|
49915
|
-
return cmdPath;
|
49916
|
-
}
|
49917
|
-
if (parentDir === startingDir) {
|
49918
|
-
throw new Error(`Command not found: ${binCommandName}`);
|
49919
|
-
}
|
49920
|
-
return findBinPath(binCommandName, parentDir);
|
49921
|
-
};
|
49922
|
-
|
49923
49908
|
// src/test-utils/launchNode.ts
|
49924
49909
|
var import_child_process = __require("child_process");
|
49925
49910
|
var import_crypto19 = __require("crypto");
|
49926
|
-
var
|
49911
|
+
var import_fs = __require("fs");
|
49927
49912
|
var import_os = __toESM(__require("os"));
|
49928
|
-
var
|
49913
|
+
var import_path7 = __toESM(__require("path"));
|
49929
49914
|
var import_portfinder = __toESM(require_portfinder());
|
49930
49915
|
var import_tree_kill = __toESM(require_tree_kill());
|
49931
49916
|
var getFlagValueFromArgs = (args, flag) => {
|
@@ -49954,8 +49939,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
49954
49939
|
}
|
49955
49940
|
child.stdout.removeAllListeners();
|
49956
49941
|
child.stderr.removeAllListeners();
|
49957
|
-
if ((0,
|
49958
|
-
(0,
|
49942
|
+
if ((0, import_fs.existsSync)(configPath)) {
|
49943
|
+
(0, import_fs.rmSync)(configPath, { recursive: true });
|
49959
49944
|
}
|
49960
49945
|
}
|
49961
49946
|
};
|
@@ -49963,7 +49948,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
49963
49948
|
ip,
|
49964
49949
|
port,
|
49965
49950
|
args = [],
|
49966
|
-
|
49951
|
+
fuelCorePath = process.env.FUEL_CORE_PATH ?? void 0,
|
49967
49952
|
loggingEnabled = true,
|
49968
49953
|
debugEnabled = false,
|
49969
49954
|
basePath
|
@@ -49983,8 +49968,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
49983
49968
|
const poaInstantFlagValue = getFlagValueFromArgs(args, "--poa-instant");
|
49984
49969
|
const poaInstant = poaInstantFlagValue === "true" || poaInstantFlagValue === void 0;
|
49985
49970
|
const graphQLStartSubstring = "Binding GraphQL provider to";
|
49986
|
-
const
|
49987
|
-
const command = useSystemFuelCore ? "fuel-core" : binPath;
|
49971
|
+
const command = fuelCorePath ?? "fuel-core";
|
49988
49972
|
const ipToUse = ip || "0.0.0.0";
|
49989
49973
|
const portToUse = port || (await (0, import_portfinder.getPortPromise)({
|
49990
49974
|
port: 4e3,
|
@@ -49995,12 +49979,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
49995
49979
|
let snapshotDirToUse;
|
49996
49980
|
const prefix = basePath || import_os.default.tmpdir();
|
49997
49981
|
const suffix = basePath ? "" : (0, import_crypto19.randomUUID)();
|
49998
|
-
const tempDirPath =
|
49982
|
+
const tempDirPath = import_path7.default.join(prefix, ".fuels", suffix, "snapshotDir");
|
49999
49983
|
if (snapshotDir) {
|
50000
49984
|
snapshotDirToUse = snapshotDir;
|
50001
49985
|
} else {
|
50002
|
-
if (!(0,
|
50003
|
-
(0,
|
49986
|
+
if (!(0, import_fs.existsSync)(tempDirPath)) {
|
49987
|
+
(0, import_fs.mkdirSync)(tempDirPath, { recursive: true });
|
50004
49988
|
}
|
50005
49989
|
let { stateConfigJson } = defaultSnapshotConfigs;
|
50006
49990
|
const { chainConfigJson, metadataJson } = defaultSnapshotConfigs;
|
@@ -50036,14 +50020,14 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
50036
50020
|
let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
|
50037
50021
|
const regexMakeNumber = /("amount":)"(\d+)"/gm;
|
50038
50022
|
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
50039
|
-
const chainConfigWritePath =
|
50040
|
-
const stateConfigWritePath =
|
50041
|
-
const metadataWritePath =
|
50042
|
-
const stateTransitionWritePath =
|
50043
|
-
(0,
|
50044
|
-
(0,
|
50045
|
-
(0,
|
50046
|
-
(0,
|
50023
|
+
const chainConfigWritePath = import_path7.default.join(tempDirPath, "chainConfig.json");
|
50024
|
+
const stateConfigWritePath = import_path7.default.join(tempDirPath, "stateConfig.json");
|
50025
|
+
const metadataWritePath = import_path7.default.join(tempDirPath, "metadata.json");
|
50026
|
+
const stateTransitionWritePath = import_path7.default.join(tempDirPath, "state_transition_bytecode.wasm");
|
50027
|
+
(0, import_fs.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
50028
|
+
(0, import_fs.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
50029
|
+
(0, import_fs.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
50030
|
+
(0, import_fs.writeFileSync)(stateTransitionWritePath, JSON.stringify(""));
|
50047
50031
|
snapshotDirToUse = tempDirPath;
|
50048
50032
|
}
|
50049
50033
|
const child = (0, import_child_process.spawn)(
|