@dainprotocol/cli 1.0.8 → 1.0.10

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.
@@ -139,11 +139,15 @@ function dev(options) {
139
139
  if (proxyServer) {
140
140
  proxyServer.close(function () {
141
141
  (0, utils_1.logInfo)('Proxy server closed.');
142
- process.exit(0);
142
+ setTimeout(function () {
143
+ process.exit(0);
144
+ }, 500);
143
145
  });
144
146
  }
145
147
  else {
146
- process.exit(0);
148
+ setTimeout(function () {
149
+ process.exit(0);
150
+ }, 500);
147
151
  }
148
152
  });
149
153
  process.on('SIGTERM', function () {
@@ -151,11 +155,15 @@ function dev(options) {
151
155
  if (proxyServer) {
152
156
  proxyServer.close(function () {
153
157
  (0, utils_1.logInfo)('Proxy server closed.');
154
- process.exit(0);
158
+ setTimeout(function () {
159
+ process.exit(0);
160
+ }, 500);
155
161
  });
156
162
  }
157
163
  else {
158
- process.exit(0);
164
+ setTimeout(function () {
165
+ process.exit(0);
166
+ }, 500);
159
167
  }
160
168
  });
161
169
  // Handle uncaught exceptions and unhandled rejections
@@ -164,14 +172,18 @@ function dev(options) {
164
172
  cleanup();
165
173
  if (proxyServer)
166
174
  proxyServer.close();
167
- process.exit(1);
175
+ setTimeout(function () {
176
+ process.exit(1);
177
+ }, 500);
168
178
  });
169
179
  process.on('unhandledRejection', function (reason, promise) {
170
180
  (0, utils_1.logError)('Unhandled Rejection at:', promise + '\n\nreason:' + reason);
171
181
  cleanup();
172
182
  if (proxyServer)
173
183
  proxyServer.close();
174
- process.exit(1);
184
+ setTimeout(function () {
185
+ process.exit(1);
186
+ }, 500);
175
187
  });
176
188
  return [3 /*break*/, 5];
177
189
  case 4:
@@ -180,7 +192,9 @@ function dev(options) {
180
192
  cleanup();
181
193
  if (proxyServer)
182
194
  proxyServer.close();
183
- process.exit(1);
195
+ setTimeout(function () {
196
+ process.exit(1);
197
+ }, 500);
184
198
  return [3 /*break*/, 5];
185
199
  case 5: return [2 /*return*/];
186
200
  }
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var program = new commander_1.Command();
14
14
  program
15
15
  .name('dain')
16
16
  .description('CLI for Dain Protocol')
17
- .version('1.0.7');
17
+ .version(require('../package.json').version);
18
18
  program
19
19
  .command('init <projectName>')
20
20
  .description('Initialize a new Dain project')
package/dist/utils.js CHANGED
@@ -87,7 +87,7 @@ function getDainConfig(configFile) {
87
87
  config["version"] = config["version"] || "1.0.0";
88
88
  config["out-dir"] = config["out-dir"] || "dist"; // Default to 'dist' if not specified
89
89
  config["tunnel-base-url"] =
90
- config["tunnel-base-url"] || "wss:///devtunnel.dain-local.com"; // Default value if not specified
90
+ config["tunnel-base-url"] || "wss:///tunnel.dain-local.com"; // Default value if not specified
91
91
  // Handle API key
92
92
  if (!config["api-key"] || config["api-key"] === "env" || config["api-key"] === "MUST PUT IN .env.development as DAIN_API_KEY=YOUR_API_KEY") {
93
93
  config["api-key"] = process.env.DAIN_API_KEY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dainprotocol/cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "CLI for Dain Protocol",
5
5
  "main": "dist/index.js",
6
6
  "bin": {