@renxqoo/renx-code-linux-arm64 0.0.66 → 0.0.70

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.
@@ -0,0 +1,7 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath, pathToFileURL } from 'node:url';
3
+
4
+ const __filename = fileURLToPath(import.meta.url);
5
+ const __dirname = path.dirname(__filename);
6
+ process.chdir(__dirname);
7
+ await import(pathToFileURL(path.join(__dirname, 'parser.worker.js')).href);
package/bin/renx CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renxqoo/renx-code-linux-arm64",
3
- "version": "0.0.66",
3
+ "version": "0.0.70",
4
4
  "description": "Renx Code terminal AI coding assistant (linux-arm64)",
5
5
  "type": "commonjs",
6
6
  "private": false,
@@ -19,6 +19,7 @@
19
19
  "README.md"
20
20
  ],
21
21
  "scripts": {
22
+ "preinstall": "node ./scripts/platform-preinstall.mjs",
22
23
  "postinstall": "node ./scripts/install-ripgrep.mjs"
23
24
  },
24
25
  "engines": {
@@ -23,6 +23,76 @@ const TARGETS = {
23
23
  'win32:x64': { target: 'x86_64-pc-windows-msvc', platformKey: 'windows-x86_64' },
24
24
  };
25
25
 
26
+ const SPINNER_FRAMES = ['|', '/', '-', '\\'];
27
+
28
+ function createLoadingIndicator(label) {
29
+ const stream = process.stderr;
30
+ const interactive = Boolean(stream.isTTY) && process.env.CI !== 'true';
31
+ let timer = null;
32
+ let frameIndex = 0;
33
+ let active = false;
34
+
35
+ const render = () => {
36
+ const frame = SPINNER_FRAMES[frameIndex % SPINNER_FRAMES.length];
37
+ frameIndex += 1;
38
+ stream.write(`\r[renx] ${frame} ${label}`);
39
+ };
40
+
41
+ return {
42
+ start() {
43
+ if (active) {
44
+ return;
45
+ }
46
+ active = true;
47
+
48
+ if (!interactive) {
49
+ console.log(`[renx] ${label}...`);
50
+ return;
51
+ }
52
+
53
+ render();
54
+ timer = setInterval(render, 120);
55
+ timer.unref?.();
56
+ },
57
+ succeed(message) {
58
+ if (!active) {
59
+ return;
60
+ }
61
+ active = false;
62
+
63
+ if (timer) {
64
+ clearInterval(timer);
65
+ timer = null;
66
+ }
67
+
68
+ if (!interactive) {
69
+ console.log(`[renx] ${message}`);
70
+ return;
71
+ }
72
+
73
+ stream.write(`\r[renx] OK ${message}\n`);
74
+ },
75
+ fail(message) {
76
+ if (!active) {
77
+ return;
78
+ }
79
+ active = false;
80
+
81
+ if (timer) {
82
+ clearInterval(timer);
83
+ timer = null;
84
+ }
85
+
86
+ if (!interactive) {
87
+ console.warn(`[renx] ${message}`);
88
+ return;
89
+ }
90
+
91
+ stream.write(`\r[renx] !! ${message}\n`);
92
+ },
93
+ };
94
+ }
95
+
26
96
  async function main() {
27
97
  if (process.env.RENX_SKIP_RIPGREP_INSTALL === '1') {
28
98
  console.log('[renx] skipping bundled ripgrep install (RENX_SKIP_RIPGREP_INSTALL=1)');
@@ -59,9 +129,11 @@ async function main() {
59
129
  }
60
130
 
61
131
  const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'renx-ripgrep-'));
132
+ const loading = createLoadingIndicator(`installing bundled ripgrep for ${targetInfo.target}`);
133
+ let completed = false;
62
134
  try {
135
+ loading.start();
63
136
  const archivePath = path.join(tempDir, path.basename(new URL(url).pathname));
64
- console.log(`[renx] downloading ripgrep for ${targetInfo.target}`);
65
137
  await downloadFile(url, archivePath);
66
138
  await verifyArchive(archivePath, platformInfo);
67
139
 
@@ -74,8 +146,12 @@ async function main() {
74
146
  if (process.platform !== 'win32') {
75
147
  await fs.chmod(binaryPath, 0o755);
76
148
  }
77
- console.log(`[renx] installed bundled ripgrep to ${binaryPath}`);
149
+ completed = true;
150
+ loading.succeed(`installed bundled ripgrep to ${binaryPath}`);
78
151
  } finally {
152
+ if (!completed) {
153
+ loading.fail(`bundled ripgrep install interrupted for ${targetInfo.target}`);
154
+ }
79
155
  await fs.rm(tempDir, { recursive: true, force: true });
80
156
  }
81
157
  }
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ const packageName = process.env.npm_package_name || 'renx platform package';
4
+ const version = process.env.npm_package_version || '0.0.0';
5
+
6
+ console.log(`[renx] preparing native package ${packageName}@${version}...`);