genlayer 0.0.18 → 0.0.20

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.
@@ -10,10 +10,17 @@ jobs:
10
10
  release:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
+ - name: Get CI Bot Token
14
+ uses: tibdex/github-app-token@v1
15
+ id: ci_bot_token
16
+ with:
17
+ app_id: ${{ secrets.CI_BOT_APP_ID }}
18
+ private_key: ${{ secrets.CI_BOT_SECRET }}
19
+
13
20
  - name: Checkout source code
14
21
  uses: actions/checkout@v4
15
22
  with:
16
- token: ${{ secrets.REPO_PERSONAL_ACCESS_TOKEN }}
23
+ token: ${{ steps.ci_bot_token.outputs.token }}
17
24
  - name: Setup Node.js
18
25
  uses: actions/setup-node@v2
19
26
  with:
@@ -30,5 +37,5 @@ jobs:
30
37
  NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
31
38
  - run: npm run release
32
39
  env:
33
- GITHUB_TOKEN: ${{ secrets.REPO_PERSONAL_ACCESS_TOKEN }}
40
+ GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
34
41
  NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
 
2
2
 
3
- ## 0.0.18 (2024-04-24)
3
+ ## 0.0.20 (2024-04-26)
4
+
5
+ ## 0.0.19 (2024-04-26)
4
6
 
5
7
  ## 0.0.17 (2024-04-23)
6
8
 
package/dist/index.js CHANGED
@@ -1052,7 +1052,7 @@ var require_command = __commonJS({
1052
1052
  var EventEmitter = require("events").EventEmitter;
1053
1053
  var childProcess = require("child_process");
1054
1054
  var path = require("path");
1055
- var fs2 = require("fs");
1055
+ var fs3 = require("fs");
1056
1056
  var process4 = require("process");
1057
1057
  var { Argument: Argument2, humanReadableArgName } = require_argument();
1058
1058
  var { CommanderError: CommanderError2 } = require_error();
@@ -1951,11 +1951,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1951
1951
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1952
1952
  function findFile(baseDir, baseName) {
1953
1953
  const localBin = path.resolve(baseDir, baseName);
1954
- if (fs2.existsSync(localBin))
1954
+ if (fs3.existsSync(localBin))
1955
1955
  return localBin;
1956
1956
  if (sourceExt.includes(path.extname(baseName)))
1957
1957
  return void 0;
1958
- const foundExt = sourceExt.find((ext) => fs2.existsSync(`${localBin}${ext}`));
1958
+ const foundExt = sourceExt.find((ext) => fs3.existsSync(`${localBin}${ext}`));
1959
1959
  if (foundExt)
1960
1960
  return `${localBin}${foundExt}`;
1961
1961
  return void 0;
@@ -1967,7 +1967,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1967
1967
  if (this._scriptPath) {
1968
1968
  let resolvedScriptPath;
1969
1969
  try {
1970
- resolvedScriptPath = fs2.realpathSync(this._scriptPath);
1970
+ resolvedScriptPath = fs3.realpathSync(this._scriptPath);
1971
1971
  } catch (err) {
1972
1972
  resolvedScriptPath = this._scriptPath;
1973
1973
  }
@@ -17601,10 +17601,10 @@ var require_supports_color = __commonJS({
17601
17601
  return 3;
17602
17602
  }
17603
17603
  if ("TERM_PROGRAM" in env2) {
17604
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
17604
+ const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
17605
17605
  switch (env2.TERM_PROGRAM) {
17606
17606
  case "iTerm.app":
17607
- return version >= 3 ? 3 : 2;
17607
+ return version2 >= 3 ? 3 : 2;
17608
17608
  case "Apple_Terminal":
17609
17609
  return 2;
17610
17610
  }
@@ -29099,7 +29099,7 @@ var require_iso2022 = __commonJS({
29099
29099
  var require_chardet = __commonJS({
29100
29100
  "node_modules/chardet/index.js"(exports2, module2) {
29101
29101
  "use strict";
29102
- var fs2 = require("fs");
29102
+ var fs3 = require("fs");
29103
29103
  var utf8 = require_utf8();
29104
29104
  var unicode = require_unicode();
29105
29105
  var mbcs = require_mbcs();
@@ -29173,29 +29173,29 @@ var require_chardet = __commonJS({
29173
29173
  var fd;
29174
29174
  var handler = function(err, buffer) {
29175
29175
  if (fd) {
29176
- fs2.closeSync(fd);
29176
+ fs3.closeSync(fd);
29177
29177
  }
29178
29178
  if (err)
29179
29179
  return cb(err, null);
29180
29180
  cb(null, self2.detect(buffer, opts));
29181
29181
  };
29182
29182
  if (opts && opts.sampleSize) {
29183
- fd = fs2.openSync(filepath, "r"), sample = Buffer.allocUnsafe(opts.sampleSize);
29184
- fs2.read(fd, sample, 0, opts.sampleSize, null, function(err) {
29183
+ fd = fs3.openSync(filepath, "r"), sample = Buffer.allocUnsafe(opts.sampleSize);
29184
+ fs3.read(fd, sample, 0, opts.sampleSize, null, function(err) {
29185
29185
  handler(err, sample);
29186
29186
  });
29187
29187
  return;
29188
29188
  }
29189
- fs2.readFile(filepath, handler);
29189
+ fs3.readFile(filepath, handler);
29190
29190
  };
29191
29191
  module2.exports.detectFileSync = function(filepath, opts) {
29192
29192
  if (opts && opts.sampleSize) {
29193
- var fd = fs2.openSync(filepath, "r"), sample2 = Buffer.allocUnsafe(opts.sampleSize);
29194
- fs2.readSync(fd, sample2, 0, opts.sampleSize);
29195
- fs2.closeSync(fd);
29193
+ var fd = fs3.openSync(filepath, "r"), sample2 = Buffer.allocUnsafe(opts.sampleSize);
29194
+ fs3.readSync(fd, sample2, 0, opts.sampleSize);
29195
+ fs3.closeSync(fd);
29196
29196
  return self2.detect(sample2, opts);
29197
29197
  }
29198
- return self2.detect(fs2.readFileSync(filepath), opts);
29198
+ return self2.detect(fs3.readFileSync(filepath), opts);
29199
29199
  };
29200
29200
  module2.exports.detectAll = function(buffer, opts) {
29201
29201
  if (typeof opts !== "object") {
@@ -32699,7 +32699,7 @@ var require_os_tmpdir = __commonJS({
32699
32699
  var require_tmp = __commonJS({
32700
32700
  "node_modules/tmp/lib/tmp.js"(exports2, module2) {
32701
32701
  "use strict";
32702
- var fs2 = require("fs");
32702
+ var fs3 = require("fs");
32703
32703
  var path = require("path");
32704
32704
  var crypto3 = require("crypto");
32705
32705
  var osTmpDir = require_os_tmpdir();
@@ -32763,7 +32763,7 @@ var require_tmp = __commonJS({
32763
32763
  return cb(new Error("Invalid template provided"));
32764
32764
  (function _getUniqueName() {
32765
32765
  const name = _generateTmpName(opts);
32766
- fs2.stat(name, function(err) {
32766
+ fs3.stat(name, function(err) {
32767
32767
  if (!err) {
32768
32768
  if (tries-- > 0)
32769
32769
  return _getUniqueName();
@@ -32782,7 +32782,7 @@ var require_tmp = __commonJS({
32782
32782
  do {
32783
32783
  const name = _generateTmpName(opts);
32784
32784
  try {
32785
- fs2.statSync(name);
32785
+ fs3.statSync(name);
32786
32786
  } catch (e2) {
32787
32787
  return name;
32788
32788
  }
@@ -32795,14 +32795,14 @@ var require_tmp = __commonJS({
32795
32795
  tmpName(opts, function _tmpNameCreated(err, name) {
32796
32796
  if (err)
32797
32797
  return cb(err);
32798
- fs2.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
32798
+ fs3.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
32799
32799
  if (err2)
32800
32800
  return cb(err2);
32801
32801
  if (opts.discardDescriptor) {
32802
- return fs2.close(fd, function _discardCallback(err3) {
32802
+ return fs3.close(fd, function _discardCallback(err3) {
32803
32803
  if (err3) {
32804
32804
  try {
32805
- fs2.unlinkSync(name);
32805
+ fs3.unlinkSync(name);
32806
32806
  } catch (e2) {
32807
32807
  if (!isENOENT(e2)) {
32808
32808
  err3 = e2;
@@ -32825,9 +32825,9 @@ var require_tmp = __commonJS({
32825
32825
  opts.postfix = opts.postfix || ".tmp";
32826
32826
  const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
32827
32827
  const name = tmpNameSync(opts);
32828
- var fd = fs2.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
32828
+ var fd = fs3.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
32829
32829
  if (opts.discardDescriptor) {
32830
- fs2.closeSync(fd);
32830
+ fs3.closeSync(fd);
32831
32831
  fd = void 0;
32832
32832
  }
32833
32833
  return {
@@ -32839,9 +32839,9 @@ var require_tmp = __commonJS({
32839
32839
  function _rmdirRecursiveSync(root) {
32840
32840
  const dirs = [root];
32841
32841
  do {
32842
- var dir2 = dirs.pop(), deferred = false, files = fs2.readdirSync(dir2);
32842
+ var dir2 = dirs.pop(), deferred = false, files = fs3.readdirSync(dir2);
32843
32843
  for (var i2 = 0, length = files.length; i2 < length; i2++) {
32844
- var file2 = path.join(dir2, files[i2]), stat2 = fs2.lstatSync(file2);
32844
+ var file2 = path.join(dir2, files[i2]), stat2 = fs3.lstatSync(file2);
32845
32845
  if (stat2.isDirectory()) {
32846
32846
  if (!deferred) {
32847
32847
  deferred = true;
@@ -32849,11 +32849,11 @@ var require_tmp = __commonJS({
32849
32849
  }
32850
32850
  dirs.push(file2);
32851
32851
  } else {
32852
- fs2.unlinkSync(file2);
32852
+ fs3.unlinkSync(file2);
32853
32853
  }
32854
32854
  }
32855
32855
  if (!deferred) {
32856
- fs2.rmdirSync(dir2);
32856
+ fs3.rmdirSync(dir2);
32857
32857
  }
32858
32858
  } while (dirs.length !== 0);
32859
32859
  }
@@ -32862,7 +32862,7 @@ var require_tmp = __commonJS({
32862
32862
  tmpName(opts, function _tmpNameCreated(err, name) {
32863
32863
  if (err)
32864
32864
  return cb(err);
32865
- fs2.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
32865
+ fs3.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
32866
32866
  if (err2)
32867
32867
  return cb(err2);
32868
32868
  cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
@@ -32872,7 +32872,7 @@ var require_tmp = __commonJS({
32872
32872
  function dirSync(options) {
32873
32873
  var args = _parseArguments(options), opts = args[0];
32874
32874
  const name = tmpNameSync(opts);
32875
- fs2.mkdirSync(name, opts.mode || DIR_MODE);
32875
+ fs3.mkdirSync(name, opts.mode || DIR_MODE);
32876
32876
  return {
32877
32877
  name,
32878
32878
  removeCallback: _prepareTmpDirRemoveCallback(name, opts)
@@ -32882,7 +32882,7 @@ var require_tmp = __commonJS({
32882
32882
  const removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
32883
32883
  try {
32884
32884
  if (0 <= fdPath[0]) {
32885
- fs2.closeSync(fdPath[0]);
32885
+ fs3.closeSync(fdPath[0]);
32886
32886
  }
32887
32887
  } catch (e2) {
32888
32888
  if (!isEBADF(e2) && !isENOENT(e2)) {
@@ -32890,7 +32890,7 @@ var require_tmp = __commonJS({
32890
32890
  }
32891
32891
  }
32892
32892
  try {
32893
- fs2.unlinkSync(fdPath[1]);
32893
+ fs3.unlinkSync(fdPath[1]);
32894
32894
  } catch (e2) {
32895
32895
  if (!isENOENT(e2)) {
32896
32896
  throw e2;
@@ -32903,7 +32903,7 @@ var require_tmp = __commonJS({
32903
32903
  return removeCallback;
32904
32904
  }
32905
32905
  function _prepareTmpDirRemoveCallback(name, opts) {
32906
- const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs2.rmdirSync.bind(fs2);
32906
+ const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs3.rmdirSync.bind(fs3);
32907
32907
  const removeCallback = _prepareRemoveCallback(removeFunction, name);
32908
32908
  if (!opts.keep) {
32909
32909
  _removeObjects.unshift(removeCallback);
@@ -32948,10 +32948,10 @@ var require_tmp = __commonJS({
32948
32948
  function setGracefulCleanup() {
32949
32949
  _gracefulCleanup = true;
32950
32950
  }
32951
- var version = process.versions.node.split(".").map(function(value) {
32951
+ var version2 = process.versions.node.split(".").map(function(value) {
32952
32952
  return parseInt(value, 10);
32953
32953
  });
32954
- if (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) {
32954
+ if (version2[0] === 0 && (version2[1] < 9 || version2[1] === 9 && version2[2] < 5)) {
32955
32955
  process.addListener("uncaughtException", function _uncaughtExceptionThrown(err) {
32956
32956
  _uncaughtException = true;
32957
32957
  _garbageCollector();
@@ -39555,6 +39555,9 @@ var {
39555
39555
  Help
39556
39556
  } = import_index.default;
39557
39557
 
39558
+ // package.json
39559
+ var version = "0.0.20";
39560
+
39558
39561
  // src/lib/config/text.ts
39559
39562
  var CLI_DESCRIPTION = "GenLayer CLI is a development environment for the GenLayer ecosystem. It allows developers to interact with the protocol by creating accounts, sending transactions, and working with Intelligent Contracts by testing, debugging, and deploying them.";
39560
39563
 
@@ -39836,10 +39839,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
39836
39839
  return 3;
39837
39840
  }
39838
39841
  if ("TERM_PROGRAM" in env) {
39839
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
39842
+ const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
39840
39843
  switch (env.TERM_PROGRAM) {
39841
39844
  case "iTerm.app": {
39842
- return version >= 3 ? 3 : 2;
39845
+ return version2 >= 3 ? 3 : 2;
39843
39846
  }
39844
39847
  case "Apple_Terminal": {
39845
39848
  return 2;
@@ -42145,6 +42148,9 @@ var inquirer = {
42145
42148
  };
42146
42149
  var inquirer_default = inquirer;
42147
42150
 
42151
+ // src/lib/services/simulator.ts
42152
+ var fs2 = __toESM(require("fs"));
42153
+
42148
42154
  // node_modules/node-fetch/src/index.js
42149
42155
  var import_node_http2 = __toESM(require("http"), 1);
42150
42156
  var import_node_https = __toESM(require("https"), 1);
@@ -43504,10 +43510,11 @@ var DEFAULT_REPO_GH_URL = "git@github.com:yeagerai/genlayer-simulator.git";
43504
43510
  var DEFAULT_RUN_SIMULATOR_COMMAND = (simulatorLocation) => ({
43505
43511
  darwin: `osascript -e 'tell application "Terminal" to do script "cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up"'`,
43506
43512
  win32: `start cmd.exe /k "cd ${simulatorLocation} && xcopy .env.example .env && docker compose build && docker compose up"`,
43507
- linux: `x-terminal-emulator -e 'bash -c "cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up"'`
43513
+ linux: `x-terminal-emulator -e bash -c 'cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up; echo "Press enter to exit"; read'`
43508
43514
  });
43509
43515
  var AVAILABLE_PLATFORMS = ["darwin", "win32", "linux"];
43510
43516
  var STARTING_TIMEOUT_WAIT_CYLCE = 2e3;
43517
+ var STARTING_TIMEOUT_ATTEMPTS = 120;
43511
43518
 
43512
43519
  // src/lib/clients/jsonRpcClient.ts
43513
43520
  var JsonRpcClient = class {
@@ -43631,7 +43638,8 @@ function downloadSimulator() {
43631
43638
  try {
43632
43639
  yield executeCommand(`git clone ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`, "git");
43633
43640
  } catch (error) {
43634
- if (error.toString().includes("already exists and is not an empty directory")) {
43641
+ const simulatorLocationExists = fs2.existsSync(simulatorLocation);
43642
+ if (simulatorLocationExists) {
43635
43643
  return { wasInstalled: true };
43636
43644
  }
43637
43645
  throw error;
@@ -43642,14 +43650,7 @@ function downloadSimulator() {
43642
43650
  function updateSimulator() {
43643
43651
  return __async(this, null, function* () {
43644
43652
  const simulatorLocation = getSimulatorLocation();
43645
- try {
43646
- yield executeCommand(`cd ${simulatorLocation} && git pull`, "git");
43647
- } catch (error) {
43648
- if (error.toString().includes("already exists and is not an empty directory")) {
43649
- return { wasInstalled: true };
43650
- }
43651
- throw error;
43652
- }
43653
+ yield executeCommand(`cd ${simulatorLocation} && git pull`, "git");
43653
43654
  return { wasInstalled: false };
43654
43655
  });
43655
43656
  }
@@ -43658,8 +43659,8 @@ function runSimulator() {
43658
43659
  const commandsByPlatform = DEFAULT_RUN_SIMULATOR_COMMAND(simulatorLocation);
43659
43660
  return executeCommandInNewTerminal(commandsByPlatform);
43660
43661
  }
43661
- function waitForSimulatorToBeReady(retries = 10) {
43662
- return __async(this, null, function* () {
43662
+ function waitForSimulatorToBeReady() {
43663
+ return __async(this, arguments, function* (retries = STARTING_TIMEOUT_ATTEMPTS) {
43663
43664
  try {
43664
43665
  const response = yield rpcClient.request({ method: "ping", params: [] });
43665
43666
  if (response && response.result.status === "OK") {
@@ -43775,7 +43776,7 @@ function initializeGeneralCommands(program2) {
43775
43776
  }
43776
43777
 
43777
43778
  // src/index.ts
43778
- program.version("0.0.1").description(CLI_DESCRIPTION);
43779
+ program.version(version).description(CLI_DESCRIPTION);
43779
43780
  initializeGeneralCommands(program);
43780
43781
  program.parse(process.argv);
43781
43782
  /*! Bundled license information:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genlayer",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "GenLayer Command Line Tool",
5
5
  "main": "src/index.ts",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {program} from "commander";
3
-
3
+ import {version} from "../package.json";
4
4
  import {CLI_DESCRIPTION} from "@/lib/config/text";
5
5
  import {initializeGeneralCommands} from "@/commands/general";
6
6
 
7
- program.version("0.0.1").description(CLI_DESCRIPTION);
7
+ program.version(version).description(CLI_DESCRIPTION);
8
8
 
9
9
  initializeGeneralCommands(program);
10
10
 
@@ -3,8 +3,9 @@ export const DEFAULT_REPO_GH_URL = "git@github.com:yeagerai/genlayer-simulator.g
3
3
  export const DEFAULT_RUN_SIMULATOR_COMMAND = (simulatorLocation: string) => ({
4
4
  darwin: `osascript -e 'tell application "Terminal" to do script "cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up"'`,
5
5
  win32: `start cmd.exe /k "cd ${simulatorLocation} && xcopy .env.example .env && docker compose build && docker compose up"`,
6
- linux: `x-terminal-emulator -e 'bash -c "cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up"'`,
6
+ linux: `x-terminal-emulator -e bash -c 'cd ${simulatorLocation} && cp .env.example .env && docker compose build && docker compose up; echo "Press enter to exit"; read'`,
7
7
  });
8
8
  export const AVAILABLE_PLATFORMS = ["darwin", "win32", "linux"] as const;
9
9
  export type RunningPlatform = (typeof AVAILABLE_PLATFORMS)[number];
10
10
  export const STARTING_TIMEOUT_WAIT_CYLCE = 2000;
11
+ export const STARTING_TIMEOUT_ATTEMPTS = 120;
@@ -1,8 +1,11 @@
1
+ import * as fs from "fs";
2
+
1
3
  import {rpcClient} from "@/lib/clients/jsonRpcClient";
2
4
  import {
3
5
  DEFAULT_REPO_GH_URL,
4
6
  DEFAULT_RUN_SIMULATOR_COMMAND,
5
7
  STARTING_TIMEOUT_WAIT_CYLCE,
8
+ STARTING_TIMEOUT_ATTEMPTS,
6
9
  } from "@/lib/config/simulator";
7
10
  import {
8
11
  checkCommand,
@@ -58,7 +61,8 @@ export async function downloadSimulator(): Promise<DownloadSimulatorResultType>
58
61
  try {
59
62
  await executeCommand(`git clone ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`, "git");
60
63
  } catch (error: any) {
61
- if (error.toString().includes("already exists and is not an empty directory")) {
64
+ const simulatorLocationExists = fs.existsSync(simulatorLocation);
65
+ if (simulatorLocationExists) {
62
66
  return {wasInstalled: true};
63
67
  }
64
68
  throw error;
@@ -68,15 +72,7 @@ export async function downloadSimulator(): Promise<DownloadSimulatorResultType>
68
72
 
69
73
  export async function updateSimulator(): Promise<DownloadSimulatorResultType> {
70
74
  const simulatorLocation = getSimulatorLocation();
71
-
72
- try {
73
- await executeCommand(`cd ${simulatorLocation} && git pull`, "git");
74
- } catch (error: any) {
75
- if (error.toString().includes("already exists and is not an empty directory")) {
76
- return {wasInstalled: true};
77
- }
78
- throw error;
79
- }
75
+ await executeCommand(`cd ${simulatorLocation} && git pull`, "git");
80
76
  return {wasInstalled: false};
81
77
  }
82
78
 
@@ -86,7 +82,9 @@ export function runSimulator(): Promise<{stdout: string; stderr: string}> {
86
82
  return executeCommandInNewTerminal(commandsByPlatform);
87
83
  }
88
84
 
89
- export async function waitForSimulatorToBeReady(retries: number = 10): Promise<boolean> {
85
+ export async function waitForSimulatorToBeReady(
86
+ retries: number = STARTING_TIMEOUT_ATTEMPTS,
87
+ ): Promise<boolean> {
90
88
  try {
91
89
  const response = await rpcClient.request({method: "ping", params: []});
92
90
  if (response && response.result.status === "OK") {
package/tsconfig.json CHANGED
@@ -45,7 +45,7 @@
45
45
  // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
46
46
  // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
47
47
  // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
48
- // "resolveJsonModule": true, /* Enable importing .json files. */
48
+ "resolveJsonModule": true /* Enable importing .json files. */,
49
49
  // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
50
50
  // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
51
51