inferay 0.1.2 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inferay",
3
- "version": "0.1.2",
3
+ "version": "0.1.9",
4
4
  "description": "Command-line installer and launcher for Inferay.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
package/src/cli.js CHANGED
@@ -3,7 +3,7 @@ import { launchApp } from "./launch.js";
3
3
  import { doctor } from "./doctor.js";
4
4
  import { getChannel, setChannel } from "./config.js";
5
5
 
6
- const VERSION = "0.1.2";
6
+ const VERSION = "0.1.9";
7
7
 
8
8
  function printHelp() {
9
9
  console.log(`inferay ${VERSION}
package/src/config.js CHANGED
@@ -2,10 +2,10 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { dirname, join } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
 
5
- export const CONFIG_DIR = join(homedir(), ".inferay");
5
+ const CONFIG_DIR = join(homedir(), ".inferay");
6
6
  export const CONFIG_PATH = join(CONFIG_DIR, "config.json");
7
7
 
8
- export async function readConfig() {
8
+ async function readConfig() {
9
9
  try {
10
10
  return JSON.parse(await readFile(CONFIG_PATH, "utf8"));
11
11
  } catch (error) {
@@ -16,7 +16,7 @@ export async function readConfig() {
16
16
  }
17
17
  }
18
18
 
19
- export async function writeConfig(config) {
19
+ async function writeConfig(config) {
20
20
  await mkdir(dirname(CONFIG_PATH), { recursive: true });
21
21
  await writeFile(CONFIG_PATH, `${JSON.stringify(config, null, 2)}\n`);
22
22
  }
package/src/platform.js CHANGED
@@ -21,7 +21,7 @@ export function defaultInstallPath() {
21
21
  return "/Applications/inferay.app";
22
22
  }
23
23
 
24
- export function devAppCandidates(cwd = process.cwd()) {
24
+ function devAppCandidates(cwd = process.cwd()) {
25
25
  return [
26
26
  resolve(cwd, "build/dev-macos-arm64/inferay-dev.app"),
27
27
  resolve(cwd, "build/dev-macos-arm64/inferay.app"),
package/src/releases.js CHANGED
@@ -50,7 +50,7 @@ export function findAsset(release, platform) {
50
50
  return preferred.map((matcher) => assets.find(matcher)).find(Boolean);
51
51
  }
52
52
 
53
- export function findChecksumAsset(release) {
53
+ function findChecksumAsset(release) {
54
54
  const assets = Array.isArray(release.assets) ? release.assets : [];
55
55
  return assets.find((asset) => /checksums?\.txt$/i.test(asset.name || ""));
56
56
  }
@@ -72,14 +72,14 @@ export async function downloadAsset(asset) {
72
72
  return destination;
73
73
  }
74
74
 
75
- export async function sha256(filePath) {
75
+ async function sha256(filePath) {
76
76
  const hash = createHash("sha256");
77
77
  const file = await readFile(filePath);
78
78
  hash.update(file);
79
79
  return hash.digest("hex");
80
80
  }
81
81
 
82
- export async function verifyChecksum(filePath, expected) {
82
+ async function verifyChecksum(filePath, expected) {
83
83
  if (!expected) {
84
84
  return null;
85
85
  }