thinkinglanguage 0.1.0 → 0.1.1

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/bin/tl CHANGED
@@ -7,7 +7,7 @@ const os = require("os");
7
7
  const fs = require("fs");
8
8
 
9
9
  const binName = os.platform() === "win32" ? "tl.exe" : "tl";
10
- const binPath = path.join(__dirname, binName);
10
+ const binPath = path.join(__dirname, "..", "native", binName);
11
11
 
12
12
  if (!fs.existsSync(binPath)) {
13
13
  console.error(
package/install.js CHANGED
@@ -8,10 +8,10 @@ const https = require("https");
8
8
  const os = require("os");
9
9
  const zlib = require("zlib");
10
10
 
11
- const VERSION = `v${require("./package.json").version}`;
11
+ const RELEASE_VERSION = "v0.1.0";
12
12
  const REPO = "mplusm/thinkinglanguage";
13
- const BIN_DIR = path.join(__dirname, "bin");
14
- const BIN_PATH = path.join(BIN_DIR, os.platform() === "win32" ? "tl.exe" : "tl");
13
+ const NATIVE_DIR = path.join(__dirname, "native");
14
+ const BIN_PATH = path.join(NATIVE_DIR, os.platform() === "win32" ? "tl.exe" : "tl");
15
15
 
16
16
  function getPlatformTarget() {
17
17
  const platform = os.platform();
@@ -130,21 +130,21 @@ async function main() {
130
130
  const isWindows = os.platform() === "win32";
131
131
  const ext = isWindows ? "zip" : "tar.gz";
132
132
  const archive = `tl-${target}.${ext}`;
133
- const url = `https://github.com/${REPO}/releases/download/${VERSION}/${archive}`;
133
+ const url = `https://github.com/${REPO}/releases/download/${RELEASE_VERSION}/${archive}`;
134
134
 
135
- console.log(`Downloading tl ${VERSION} for ${target}...`);
135
+ console.log(`Downloading tl ${RELEASE_VERSION} for ${target}...`);
136
136
  const buffer = await fetch(url);
137
137
 
138
- fs.mkdirSync(BIN_DIR, { recursive: true });
138
+ fs.mkdirSync(NATIVE_DIR, { recursive: true });
139
139
 
140
140
  const binaryName = isWindows ? "tl.exe" : "tl";
141
141
 
142
142
  console.log("Extracting...");
143
143
  let found;
144
144
  if (isWindows) {
145
- found = extractZip(buffer, BIN_DIR, binaryName);
145
+ found = extractZip(buffer, NATIVE_DIR, binaryName);
146
146
  } else {
147
- found = extractTarGz(buffer, BIN_DIR, binaryName);
147
+ found = extractTarGz(buffer, NATIVE_DIR, binaryName);
148
148
  }
149
149
 
150
150
  if (!found) {
package/native/tl ADDED
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "thinkinglanguage",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A purpose-built language for Data Engineering & AI",
5
- "license": "MIT OR Apache-2.0",
5
+ "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/mplusm/thinkinglanguage"
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "files": [
25
25
  "bin/",
26
+ "native/",
26
27
  "install.js"
27
28
  ]
28
29
  }