rl-item-mod 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { Command } from 'commander';
3
3
  import * as fs from 'fs';
4
4
  import * as path from 'path';
5
- import { execSync } from 'child_process';
5
+ import { spawnSync } from 'child_process';
6
6
  import inquirer from 'inquirer';
7
7
  import { UPKFile } from './upk.js';
8
8
  import { resolvePackagePath, searchAssets } from './assets.js';
@@ -83,9 +83,25 @@ async function runInteractiveWizard() {
83
83
  try {
84
84
  const pythonScriptPath = path.resolve(__dirname, '../python/rl_asset_swapper.py');
85
85
  backupFile(target.path);
86
- const cmd = `python "${pythonScriptPath}" --no-gui --target "${target.item.name}" --donor "${source.item.name}" --no-preserve-header-offsets --overwrite --donor-dir "${cookedDir}" --output-dir "${cookedDir}"`;
87
86
  console.log(`\nExecuting Python offset-shifter...`);
88
- execSync(cmd, { stdio: 'inherit' });
87
+ const result = spawnSync('python', [
88
+ pythonScriptPath,
89
+ '--no-gui',
90
+ '--target', target.item.name,
91
+ '--donor', source.item.name,
92
+ '--no-preserve-header-offsets',
93
+ '--overwrite',
94
+ '--donor-dir', cookedDir,
95
+ '--output-dir', cookedDir
96
+ ], { stdio: ['inherit', 'inherit', 'pipe'], encoding: 'utf8' });
97
+ if (result.stderr && result.stderr.trim()) {
98
+ console.error('\n--- Python Error Output ---');
99
+ console.error(result.stderr.trim());
100
+ console.error('---------------------------');
101
+ }
102
+ if (result.status !== 0) {
103
+ throw new Error(`Python script exited with code ${result.status}`);
104
+ }
89
105
  console.log('SUCCESS: Visual Swap complete! Restart your game to see your new item.');
90
106
  }
91
107
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rl-item-mod",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "A comprehensive CLI tool for safely applying visual asset swaps to Rocket League UPK files with full encryption and binary offset handling.",
6
6
  "main": "dist/index.js",