channel-worker 1.6.6 → 1.6.7

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.
@@ -204,11 +204,7 @@ class CommandPoller {
204
204
  const uniqueExtPath = baseExtPath + '-' + nst_profile_id + '-' + ts;
205
205
  try {
206
206
  fs.mkdirSync(uniqueExtPath, { recursive: true });
207
- const files = fs.readdirSync(baseExtPath);
208
- for (const f of files) {
209
- const src = path.join(baseExtPath, f);
210
- if (fs.statSync(src).isFile()) fs.copyFileSync(src, path.join(uniqueExtPath, f));
211
- }
207
+ fs.cpSync(baseExtPath, uniqueExtPath, { recursive: true });
212
208
  // Write Veo3-specific config.json
213
209
  fs.writeFileSync(path.join(uniqueExtPath, 'config.json'), JSON.stringify({
214
210
  channelManagerApi: 'https://api.channel.tunasm.art',
@@ -291,8 +287,9 @@ class CommandPoller {
291
287
  fs.mkdirSync(tmpExtract, { recursive: true });
292
288
  execSync(`tar -xzf "${tmpArchive}" -C "${tmpExtract}"`, { timeout: 30000 });
293
289
 
294
- const extracted = path.join(tmpExtract, 'content-creator');
295
- const sourceDir = fs.existsSync(extracted) ? extracted : tmpExtract;
290
+ // Tar extracts into subfolder — find it (could be content-creator or content-creator-ext)
291
+ const subdirs = fs.readdirSync(tmpExtract).filter(f => fs.statSync(path.join(tmpExtract, f)).isDirectory());
292
+ const sourceDir = subdirs.length === 1 ? path.join(tmpExtract, subdirs[0]) : tmpExtract;
296
293
 
297
294
  // Replace extension dir
298
295
  if (fs.existsSync(extPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {