@xnoxs/flux-lang 4.0.4 → 4.0.5

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/src/self/pkg.js CHANGED
@@ -1,15 +1,6 @@
1
- /* compiled from src/self/pkg.flux by Flux Lang */
1
+ /* compiled from src/self/pkg.flux */
2
2
  'use strict';
3
- // ── Flux stdlib ──
4
-
5
- function join(arr, sep) { return arr.join(sep != null ? sep : ','); }
6
-
7
- function keys(obj) { return Object.keys(obj); }
8
-
9
- function startsWith(s, prefix) { return String(s).startsWith(prefix); }
10
- // ── end stdlib ──
11
-
12
- // Generated by Flux Transpiler v3.2.0
3
+ // Generated by Flux Transpiler v3.5.3 (self-hosted)
13
4
  "use strict";
14
5
 
15
6
  const Fs = require("fs");
@@ -19,7 +10,7 @@ const Http = require("http");
19
10
  const Os = require("os");
20
11
  const { readPackage } = require("./config");
21
12
  const REGISTRY_URL = "https://registry.npmjs.org";
22
- const ESC = "\u001b";
13
+ const ESC = "\\u001b";
23
14
  const C = { reset: (ESC + "[0m"), bold: (ESC + "[1m"), dim: (ESC + "[2m"), red: (ESC + "[31m"), green: (ESC + "[32m"), yellow: (ESC + "[33m"), blue: (ESC + "[34m"), cyan: (ESC + "[36m"), gray: (ESC + "[90m") };
24
15
  function clr(c, s) {
25
16
  return ((c + s) + C.reset);
@@ -41,7 +32,7 @@ function startSpinner(label) {
41
32
  }
42
33
  let frame = 0;
43
34
  function tick() {
44
- stdout.write((((("\r" + clr(C.cyan, SPIN_FRAMES[(frame % SPIN_FRAMES.length)])) + " ") + label) + " "));
35
+ stdout.write((((("\\r" + clr(C.cyan, SPIN_FRAMES[(frame % SPIN_FRAMES.length)])) + " ") + label) + " "));
45
36
  frame = (frame + 1);
46
37
  }
47
38
  const timer = setInterval(tick, 80);
@@ -52,7 +43,7 @@ function stopSpinner(timer) {
52
43
  return;
53
44
  }
54
45
  clearInterval(timer);
55
- stdout.write((("\r" + ESC) + "[2K"));
46
+ stdout.write((("\\r" + ESC) + "[2K"));
56
47
  }
57
48
  async function fetchJson(url) {
58
49
  const mod = (url.startsWith("https") ? Https : Http);