starlight-cli 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1637,7 +1637,13 @@ async evalCompoundAssignment(node, env) {
1637
1637
 
1638
1638
  async evalSldeploy(node, env) {
1639
1639
  const val = await this.evaluate(node.expr, env);
1640
- console.log(val);
1640
+
1641
+ if (typeof val === 'object' && val !== null) {
1642
+ console.log(JSON.stringify(val, null, 2));
1643
+ } else {
1644
+ console.log(val);
1645
+ }
1646
+
1641
1647
  return val;
1642
1648
  }
1643
1649
 
@@ -2633,7 +2639,7 @@ const Lexer = __nccwpck_require__(211);
2633
2639
  const Parser = __nccwpck_require__(222);
2634
2640
  const Evaluator = __nccwpck_require__(112);
2635
2641
 
2636
- const VERSION = '1.0.26';
2642
+ const VERSION = '1.0.28';
2637
2643
 
2638
2644
  const COLOR = {
2639
2645
  reset: '\x1b[0m',
@@ -2809,8 +2815,7 @@ function runFile(filePath, isTemp = false, callback) {
2809
2815
  return waitAndExit(1);
2810
2816
  }
2811
2817
 
2812
- console.log(COLOR.green + '\nProgram finished successfully.' + COLOR.reset);
2813
-
2818
+
2814
2819
  if (callback) callback();
2815
2820
  if (isTemp) try { fs.unlinkSync(filePath); } catch {}
2816
2821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-cli",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "Starlight Programming Language CLI",
5
5
  "bin": {
6
6
  "starlight": "index.js"
package/src/evaluator.js CHANGED
@@ -294,7 +294,13 @@ async evalCompoundAssignment(node, env) {
294
294
 
295
295
  async evalSldeploy(node, env) {
296
296
  const val = await this.evaluate(node.expr, env);
297
- console.log(val);
297
+
298
+ if (typeof val === 'object' && val !== null) {
299
+ console.log(JSON.stringify(val, null, 2));
300
+ } else {
301
+ console.log(val);
302
+ }
303
+
298
304
  return val;
299
305
  }
300
306
 
package/src/starlight.js CHANGED
@@ -9,7 +9,7 @@ const Lexer = require('./lexer');
9
9
  const Parser = require('./parser');
10
10
  const Evaluator = require('./evaluator');
11
11
 
12
- const VERSION = '1.0.26';
12
+ const VERSION = '1.0.28';
13
13
 
14
14
  const COLOR = {
15
15
  reset: '\x1b[0m',
@@ -185,8 +185,7 @@ function runFile(filePath, isTemp = false, callback) {
185
185
  return waitAndExit(1);
186
186
  }
187
187
 
188
- console.log(COLOR.green + '\nProgram finished successfully.' + COLOR.reset);
189
-
188
+
190
189
  if (callback) callback();
191
190
  if (isTemp) try { fs.unlinkSync(filePath); } catch {}
192
191
  }