ppcos 0.4.0 → 0.4.1

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.
@@ -1,5 +1,4 @@
1
- import { createWriteStream, existsSync, mkdirSync } from 'fs';
2
- import { pipeline } from 'stream/promises';
1
+ import { existsSync, mkdirSync } from 'fs';
3
2
  import { Extract } from 'unzipper';
4
3
  import { Readable } from 'stream';
5
4
  import { downloadSkills } from './api-client.js';
@@ -28,11 +27,16 @@ export async function fetchSkills(targetDir) {
28
27
  // Convert web stream to Node stream
29
28
  const nodeStream = Readable.fromWeb(stream);
30
29
 
31
- // Extract zip to target directory
32
- await pipeline(
33
- nodeStream,
34
- Extract({ path: targetDir })
35
- );
30
+ // Extract zip use .pipe() with close event instead of pipeline.
31
+ // unzipper's Extract doesn't properly signal completion through pipeline,
32
+ // causing rmSync to delete the temp dir while files are still being written.
33
+ await new Promise((resolve, reject) => {
34
+ nodeStream
35
+ .pipe(Extract({ path: targetDir }))
36
+ .on('close', resolve)
37
+ .on('error', reject);
38
+ nodeStream.on('error', reject);
39
+ });
36
40
  }
37
41
 
38
42
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ppcos",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI tool to manage Google Ads AI workflow skills and agents for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {