roxify 1.9.1 → 1.9.3
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/Cargo.toml +1 -1
- package/dist/cli.js +1 -1
- package/dist/roxify_native.exe +0 -0
- package/dist/utils/native.js +0 -1
- package/dist/utils/rust-cli-wrapper.js +35 -35
- package/native/png_utils.rs +11 -1
- package/native/reconstitution.rs +25 -3
- package/package.json +1 -3
- package/roxify_native-x86_64-pc-windows-msvc.node +0 -0
- package/scripts/postinstall.cjs +104 -44
- package/roxify_native.node +0 -0
package/Cargo.toml
CHANGED
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { DataFormatError, decodePngToBinary, encodeBinaryToPng, hasPassphraseInP
|
|
|
6
6
|
import { packPathsGenerator, unpackBuffer } from './pack.js';
|
|
7
7
|
import * as cliProgress from './stub-progress.js';
|
|
8
8
|
import { encodeWithRustCLI, isRustBinaryAvailable, } from './utils/rust-cli-wrapper.js';
|
|
9
|
-
const VERSION = '1.
|
|
9
|
+
const VERSION = '1.9.2';
|
|
10
10
|
function getDirectorySize(dirPath) {
|
|
11
11
|
let totalSize = 0;
|
|
12
12
|
try {
|
package/dist/roxify_native.exe
CHANGED
|
Binary file
|
package/dist/utils/native.js
CHANGED
|
@@ -69,7 +69,6 @@ function getNativeModule() {
|
|
|
69
69
|
// --- 1. Platform-specific candidates (checked FIRST) ---
|
|
70
70
|
// These are the ONLY safe candidates — they match the current OS+arch.
|
|
71
71
|
const candidates = [];
|
|
72
|
-
candidates.push(resolve(root, 'roxify_native.node'), resolve(moduleDir, '..', 'roxify_native.node'));
|
|
73
72
|
for (const triple of triples) {
|
|
74
73
|
const name = `roxify_native-${triple}.node`;
|
|
75
74
|
const libName = `libroxify_native-${triple}.node`;
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
import { execSync, spawn } from 'child_process';
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
4
5
|
let moduleDir;
|
|
5
6
|
if (typeof __dirname !== 'undefined') {
|
|
6
7
|
moduleDir = __dirname;
|
|
7
8
|
}
|
|
8
9
|
else {
|
|
9
|
-
|
|
10
|
+
try {
|
|
11
|
+
moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
moduleDir = process.cwd();
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
function findRustBinary() {
|
|
12
18
|
const binNames = process.platform === 'win32'
|
|
13
19
|
? ['roxify_native.exe', 'roxify-cli.exe', 'roxify_cli.exe']
|
|
14
20
|
: ['roxify_native', 'roxify-cli', 'roxify_cli'];
|
|
15
|
-
const baseDir =
|
|
21
|
+
const baseDir = moduleDir;
|
|
22
|
+
for (const name of binNames) {
|
|
23
|
+
const sameDirPath = join(baseDir, name);
|
|
24
|
+
if (existsSync(sameDirPath))
|
|
25
|
+
return sameDirPath;
|
|
26
|
+
const parentPath = join(baseDir, '..', name);
|
|
27
|
+
if (existsSync(parentPath))
|
|
28
|
+
return parentPath;
|
|
29
|
+
const parentDistPath = join(baseDir, '..', 'dist', name);
|
|
30
|
+
if (existsSync(parentDistPath))
|
|
31
|
+
return parentDistPath;
|
|
32
|
+
}
|
|
16
33
|
if (process.pkg) {
|
|
17
34
|
const snapshotPaths = [
|
|
18
35
|
join(baseDir, '..', '..', 'target', 'release'),
|
|
@@ -22,9 +39,8 @@ function findRustBinary() {
|
|
|
22
39
|
for (const basePath of snapshotPaths) {
|
|
23
40
|
for (const name of binNames) {
|
|
24
41
|
const binPath = join(basePath, name);
|
|
25
|
-
if (existsSync(binPath))
|
|
42
|
+
if (existsSync(binPath))
|
|
26
43
|
return binPath;
|
|
27
|
-
}
|
|
28
44
|
}
|
|
29
45
|
}
|
|
30
46
|
try {
|
|
@@ -35,40 +51,35 @@ function findRustBinary() {
|
|
|
35
51
|
join(execDir, 'tools', 'roxify'),
|
|
36
52
|
join(execDir, '..', 'tools', 'roxify', 'dist'),
|
|
37
53
|
join(execDir, '..', 'tools', 'roxify'),
|
|
38
|
-
join(execDir, 'tools', 'roxify', 'roxify_native.exe'),
|
|
39
54
|
];
|
|
40
55
|
for (const c of execCandidates) {
|
|
41
56
|
for (const name of binNames) {
|
|
42
|
-
const p =
|
|
43
|
-
if (existsSync(p))
|
|
57
|
+
const p = join(c, name);
|
|
58
|
+
if (existsSync(p))
|
|
44
59
|
return p;
|
|
45
|
-
}
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
}
|
|
50
|
-
catch
|
|
64
|
+
catch { }
|
|
51
65
|
}
|
|
52
66
|
try {
|
|
53
67
|
let paths = [];
|
|
54
68
|
if (process.platform === 'win32') {
|
|
55
69
|
try {
|
|
56
|
-
const out = execSync('where rox', { encoding: 'utf-8' }).trim();
|
|
70
|
+
const out = execSync('where rox', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
57
71
|
if (out)
|
|
58
|
-
paths = out
|
|
59
|
-
.split(/\r?\n/)
|
|
60
|
-
.map((s) => s.trim())
|
|
61
|
-
.filter(Boolean);
|
|
72
|
+
paths = out.split(/\r?\n/).map((s) => s.trim()).filter(Boolean);
|
|
62
73
|
}
|
|
63
|
-
catch
|
|
74
|
+
catch { }
|
|
64
75
|
}
|
|
65
76
|
else {
|
|
66
77
|
try {
|
|
67
|
-
const out = execSync('which rox', { encoding: 'utf-8' }).trim();
|
|
78
|
+
const out = execSync('which rox', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
68
79
|
if (out)
|
|
69
80
|
paths = [out.trim()];
|
|
70
81
|
}
|
|
71
|
-
catch
|
|
82
|
+
catch { }
|
|
72
83
|
}
|
|
73
84
|
for (const p of paths) {
|
|
74
85
|
try {
|
|
@@ -78,44 +89,33 @@ function findRustBinary() {
|
|
|
78
89
|
join(d, 'dist'),
|
|
79
90
|
join(d, '..', 'dist'),
|
|
80
91
|
join(d, '..'),
|
|
92
|
+
join(d, 'node_modules', 'roxify', 'dist'),
|
|
81
93
|
];
|
|
82
94
|
for (const c of candidates) {
|
|
83
95
|
for (const name of binNames) {
|
|
84
96
|
const candidate = join(c, name);
|
|
85
|
-
if (existsSync(candidate))
|
|
97
|
+
if (existsSync(candidate))
|
|
86
98
|
return candidate;
|
|
87
|
-
}
|
|
88
99
|
}
|
|
89
100
|
}
|
|
90
101
|
}
|
|
91
|
-
catch
|
|
102
|
+
catch { }
|
|
92
103
|
}
|
|
93
104
|
}
|
|
94
|
-
catch
|
|
105
|
+
catch { }
|
|
95
106
|
for (const name of binNames) {
|
|
96
|
-
const local = join(baseDir, name);
|
|
97
|
-
if (existsSync(local)) {
|
|
98
|
-
return local;
|
|
99
|
-
}
|
|
100
|
-
const parentLocal = join(baseDir, '..', name);
|
|
101
|
-
if (existsSync(parentLocal)) {
|
|
102
|
-
return parentLocal;
|
|
103
|
-
}
|
|
104
107
|
const parentParentLocal = join(baseDir, '..', '..', name);
|
|
105
|
-
if (existsSync(parentParentLocal))
|
|
108
|
+
if (existsSync(parentParentLocal))
|
|
106
109
|
return parentParentLocal;
|
|
107
|
-
}
|
|
108
110
|
const nodeModulesPath = join(baseDir, '..', '..', '..', '..', name);
|
|
109
|
-
if (existsSync(nodeModulesPath))
|
|
111
|
+
if (existsSync(nodeModulesPath))
|
|
110
112
|
return nodeModulesPath;
|
|
111
|
-
}
|
|
112
113
|
}
|
|
113
114
|
const targetRelease = join(baseDir, '..', '..', 'target', 'release');
|
|
114
115
|
for (const name of binNames) {
|
|
115
116
|
const targetPath = join(targetRelease, name);
|
|
116
|
-
if (existsSync(targetPath))
|
|
117
|
+
if (existsSync(targetPath))
|
|
117
118
|
return targetPath;
|
|
118
|
-
}
|
|
119
119
|
}
|
|
120
120
|
return null;
|
|
121
121
|
}
|
package/native/png_utils.rs
CHANGED
|
@@ -138,12 +138,22 @@ pub fn get_png_metadata(png_data: &[u8]) -> Result<(u32, u32, u8, u8), String> {
|
|
|
138
138
|
|
|
139
139
|
pub fn extract_payload_from_png(png_data: &[u8]) -> Result<Vec<u8>, String> {
|
|
140
140
|
if let Ok(payload) = extract_payload_direct(png_data) {
|
|
141
|
-
|
|
141
|
+
if validate_payload_deep(&payload) {
|
|
142
|
+
return Ok(payload);
|
|
143
|
+
}
|
|
142
144
|
}
|
|
143
145
|
let reconst = crate::reconstitution::crop_and_reconstitute(png_data)?;
|
|
144
146
|
extract_payload_direct(&reconst)
|
|
145
147
|
}
|
|
146
148
|
|
|
149
|
+
fn validate_payload_deep(payload: &[u8]) -> bool {
|
|
150
|
+
if payload.len() < 5 { return false; }
|
|
151
|
+
if payload[0] == 0x01 || payload[0] == 0x02 { return true; }
|
|
152
|
+
let compressed = if payload[0] == 0x00 { &payload[1..] } else { payload };
|
|
153
|
+
if compressed.starts_with(b"ROX1") { return true; }
|
|
154
|
+
crate::core::zstd_decompress_bytes(compressed, None).is_ok()
|
|
155
|
+
}
|
|
156
|
+
|
|
147
157
|
fn find_pixel_header(raw: &[u8]) -> Result<usize, String> {
|
|
148
158
|
let magic = b"PXL1";
|
|
149
159
|
for i in 0..(raw.len().saturating_sub(magic.len())) {
|
package/native/reconstitution.rs
CHANGED
|
@@ -373,9 +373,31 @@ pub fn crop_and_reconstitute(png_data: &[u8]) -> Result<Vec<u8>, String> {
|
|
|
373
373
|
let mut out = RgbaImage::from_pixel(best_logical_w, best_logical_h, Rgba([0, 0, 0, 255]));
|
|
374
374
|
for ly in 0..best_logical_h {
|
|
375
375
|
for lx in 0..best_logical_w {
|
|
376
|
-
let
|
|
377
|
-
let
|
|
378
|
-
|
|
376
|
+
let bx0 = (sx as f64 + lx as f64 * scale_x).round() as u32;
|
|
377
|
+
let bx1 = (sx as f64 + (lx + 1) as f64 * scale_x).round() as u32;
|
|
378
|
+
let by0 = (sy as f64 + ly as f64 * scale_y).round() as u32;
|
|
379
|
+
let by1 = (sy as f64 + (ly + 1) as f64 * scale_y).round() as u32;
|
|
380
|
+
let bx0 = min(bx0, width - 1);
|
|
381
|
+
let bx1 = min(bx1, width).max(bx0 + 1);
|
|
382
|
+
let by0 = min(by0, height - 1);
|
|
383
|
+
let by1 = min(by1, height).max(by0 + 1);
|
|
384
|
+
|
|
385
|
+
let mut rs: Vec<u8> = Vec::new();
|
|
386
|
+
let mut gs: Vec<u8> = Vec::new();
|
|
387
|
+
let mut bs: Vec<u8> = Vec::new();
|
|
388
|
+
for py in by0..by1 {
|
|
389
|
+
for px in bx0..bx1 {
|
|
390
|
+
let p = get_pixel(px, py);
|
|
391
|
+
rs.push(p[0]);
|
|
392
|
+
gs.push(p[1]);
|
|
393
|
+
bs.push(p[2]);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
rs.sort_unstable();
|
|
397
|
+
gs.sort_unstable();
|
|
398
|
+
bs.sort_unstable();
|
|
399
|
+
let mid = rs.len() / 2;
|
|
400
|
+
out.put_pixel(lx, ly, Rgba([rs[mid], gs[mid], bs[mid], 255]));
|
|
379
401
|
}
|
|
380
402
|
}
|
|
381
403
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roxify",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ultra-lightweight PNG steganography with native Rust acceleration. Encode binary data into PNG images with zstd compression.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
|
-
"roxify_native.node",
|
|
15
|
-
"libroxify_native.node",
|
|
16
14
|
"roxify_native-x86_64-unknown-linux-gnu.node",
|
|
17
15
|
"roxify_native-i686-unknown-linux-gnu.node",
|
|
18
16
|
"roxify_native-aarch64-unknown-linux-gnu.node",
|
|
Binary file
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
const { existsSync, copyFileSync, mkdirSync } = require('fs');
|
|
3
|
-
const { join
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
const { platform, arch } = require('os');
|
|
4
5
|
|
|
5
6
|
const root = join(__dirname, '..');
|
|
6
7
|
const distDir = join(root, 'dist');
|
|
@@ -12,90 +13,149 @@ function hasCargo() {
|
|
|
12
13
|
} catch { return false; }
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
function getTriples() {
|
|
17
|
+
const os = platform();
|
|
18
|
+
const cpu = arch();
|
|
19
|
+
const map = {
|
|
20
|
+
linux: { x64: ['x86_64-unknown-linux-gnu'], arm64: ['aarch64-unknown-linux-gnu'] },
|
|
21
|
+
win32: { x64: ['x86_64-pc-windows-msvc', 'x86_64-pc-windows-gnu'], arm64: ['aarch64-pc-windows-msvc'] },
|
|
22
|
+
darwin: { x64: ['x86_64-apple-darwin'], arm64: ['aarch64-apple-darwin'] },
|
|
23
|
+
};
|
|
24
|
+
return (map[os] && map[os][cpu]) || [];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getLibExt() {
|
|
28
|
+
if (platform() === 'win32') return 'dll';
|
|
29
|
+
if (platform() === 'darwin') return 'dylib';
|
|
30
|
+
return 'so';
|
|
31
|
+
}
|
|
32
|
+
|
|
15
33
|
function getBinaryName() {
|
|
16
|
-
return
|
|
34
|
+
return platform() === 'win32' ? 'roxify_native.exe' : 'roxify_native';
|
|
17
35
|
}
|
|
18
36
|
|
|
19
37
|
function findExistingBinary() {
|
|
20
38
|
const name = getBinaryName();
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (process.platform === 'win32') {
|
|
27
|
-
candidates.push(join(root, 'target', 'x86_64-pc-windows-gnu', 'release', name));
|
|
28
|
-
candidates.push(join(root, 'target', 'x86_64-pc-windows-msvc', 'release', name));
|
|
29
|
-
} else if (process.platform === 'linux') {
|
|
30
|
-
candidates.push(join(root, 'target', 'x86_64-unknown-linux-gnu', 'release', name));
|
|
31
|
-
} else if (process.platform === 'darwin') {
|
|
32
|
-
candidates.push(join(root, 'target', 'x86_64-apple-darwin', 'release', name));
|
|
33
|
-
candidates.push(join(root, 'target', 'aarch64-apple-darwin', 'release', name));
|
|
39
|
+
const triples = getTriples();
|
|
40
|
+
const candidates = [join(distDir, name), join(root, 'target', 'release', name)];
|
|
41
|
+
for (const t of triples) {
|
|
42
|
+
candidates.push(join(root, 'target', t, 'release', name));
|
|
34
43
|
}
|
|
35
|
-
|
|
36
44
|
for (const c of candidates) {
|
|
37
45
|
if (existsSync(c)) return c;
|
|
38
46
|
}
|
|
39
47
|
return null;
|
|
40
48
|
}
|
|
41
49
|
|
|
50
|
+
function findExistingNativeLib() {
|
|
51
|
+
const triples = getTriples();
|
|
52
|
+
const ext = getLibExt();
|
|
53
|
+
const prefix = platform() === 'win32' ? '' : 'lib';
|
|
54
|
+
for (const t of triples) {
|
|
55
|
+
const specific = join(root, `roxify_native-${t}.node`);
|
|
56
|
+
if (existsSync(specific)) return { path: specific, triple: t };
|
|
57
|
+
}
|
|
58
|
+
for (const t of triples) {
|
|
59
|
+
for (const profile of ['release', 'fastdev']) {
|
|
60
|
+
const paths = [
|
|
61
|
+
join(root, 'target', t, profile, `${prefix}roxify_native.${ext}`),
|
|
62
|
+
join(root, 'target', profile, `${prefix}roxify_native.${ext}`),
|
|
63
|
+
];
|
|
64
|
+
for (const p of paths) {
|
|
65
|
+
if (existsSync(p)) return { path: p, triple: t };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function buildNative(target) {
|
|
73
|
+
if (!hasCargo()) return false;
|
|
74
|
+
const args = target ? ` --target ${target}` : '';
|
|
75
|
+
console.log(`roxify: Building native lib${args}...`);
|
|
76
|
+
try {
|
|
77
|
+
execSync(`cargo build --release --lib${args}`, { cwd: root, stdio: 'inherit', timeout: 600000 });
|
|
78
|
+
return true;
|
|
79
|
+
} catch {
|
|
80
|
+
console.log('roxify: Native lib build failed');
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
42
85
|
function buildBinary() {
|
|
43
86
|
if (!hasCargo()) {
|
|
44
|
-
console.log('roxify: Cargo not found, skipping native
|
|
87
|
+
console.log('roxify: Cargo not found, skipping native build (TypeScript fallback will be used)');
|
|
45
88
|
return false;
|
|
46
89
|
}
|
|
47
|
-
|
|
48
|
-
console.log('roxify: Building native CLI binary with Cargo...');
|
|
90
|
+
console.log('roxify: Building native CLI binary...');
|
|
49
91
|
try {
|
|
50
|
-
execSync('cargo build --release --bin roxify_native', {
|
|
51
|
-
cwd: root,
|
|
52
|
-
stdio: 'inherit',
|
|
53
|
-
timeout: 600000,
|
|
54
|
-
});
|
|
92
|
+
execSync('cargo build --release --bin roxify_native', { cwd: root, stdio: 'inherit', timeout: 600000 });
|
|
55
93
|
return true;
|
|
56
|
-
} catch
|
|
94
|
+
} catch {
|
|
57
95
|
console.log('roxify: Native build failed, TypeScript fallback will be used');
|
|
58
96
|
return false;
|
|
59
97
|
}
|
|
60
98
|
}
|
|
61
99
|
|
|
62
|
-
function
|
|
63
|
-
if (!existsSync(distDir)) {
|
|
64
|
-
mkdirSync(distDir, { recursive: true });
|
|
65
|
-
}
|
|
66
|
-
|
|
100
|
+
function ensureCliBinary() {
|
|
101
|
+
if (!existsSync(distDir)) mkdirSync(distDir, { recursive: true });
|
|
67
102
|
const dest = join(distDir, getBinaryName());
|
|
68
|
-
if (existsSync(dest))
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
103
|
+
if (existsSync(dest)) return;
|
|
71
104
|
|
|
72
105
|
const existing = findExistingBinary();
|
|
73
106
|
if (existing && existing !== dest) {
|
|
74
107
|
copyFileSync(existing, dest);
|
|
75
|
-
if (
|
|
108
|
+
if (platform() !== 'win32') {
|
|
76
109
|
try { require('fs').chmodSync(dest, 0o755); } catch { }
|
|
77
110
|
}
|
|
78
|
-
console.log(`roxify: Copied
|
|
111
|
+
console.log(`roxify: Copied CLI binary from ${existing}`);
|
|
79
112
|
return;
|
|
80
113
|
}
|
|
81
|
-
|
|
82
114
|
if (existing) return;
|
|
83
|
-
|
|
84
|
-
if (process.env.ROXIFY_SKIP_BUILD === '1') {
|
|
85
|
-
console.log('roxify: ROXIFY_SKIP_BUILD=1, skipping native build');
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
115
|
+
if (process.env.ROXIFY_SKIP_BUILD === '1') return;
|
|
88
116
|
|
|
89
117
|
if (buildBinary()) {
|
|
90
118
|
const built = join(root, 'target', 'release', getBinaryName());
|
|
91
119
|
if (existsSync(built)) {
|
|
92
120
|
copyFileSync(built, dest);
|
|
93
|
-
if (
|
|
121
|
+
if (platform() !== 'win32') {
|
|
94
122
|
try { require('fs').chmodSync(dest, 0o755); } catch { }
|
|
95
123
|
}
|
|
96
|
-
console.log('roxify:
|
|
124
|
+
console.log('roxify: CLI binary built and copied to dist/');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function ensureNativeLib() {
|
|
130
|
+
const triples = getTriples();
|
|
131
|
+
if (!triples.length) return;
|
|
132
|
+
|
|
133
|
+
for (const t of triples) {
|
|
134
|
+
if (existsSync(join(root, `roxify_native-${t}.node`))) return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const found = findExistingNativeLib();
|
|
138
|
+
if (found) {
|
|
139
|
+
const dest = join(root, `roxify_native-${found.triple}.node`);
|
|
140
|
+
copyFileSync(found.path, dest);
|
|
141
|
+
console.log(`roxify: Copied native lib → ${dest}`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (process.env.ROXIFY_SKIP_BUILD === '1') return;
|
|
146
|
+
|
|
147
|
+
const triple = triples[0];
|
|
148
|
+
if (buildNative(null)) {
|
|
149
|
+
const ext = getLibExt();
|
|
150
|
+
const prefix = platform() === 'win32' ? '' : 'lib';
|
|
151
|
+
const built = join(root, 'target', 'release', `${prefix}roxify_native.${ext}`);
|
|
152
|
+
if (existsSync(built)) {
|
|
153
|
+
const dest = join(root, `roxify_native-${triple}.node`);
|
|
154
|
+
copyFileSync(built, dest);
|
|
155
|
+
console.log(`roxify: Native lib built → ${dest}`);
|
|
97
156
|
}
|
|
98
157
|
}
|
|
99
158
|
}
|
|
100
159
|
|
|
101
|
-
|
|
160
|
+
ensureCliBinary();
|
|
161
|
+
ensureNativeLib();
|
package/roxify_native.node
DELETED
|
Binary file
|