libretto 0.4.1 → 0.4.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.
@@ -1,5 +1,5 @@
1
1
  import { createInterface } from "node:readline";
2
- import { appendFileSync, cpSync, existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { appendFileSync, cpSync, existsSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { dirname, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -232,6 +232,9 @@ ${verb} libretto skills in ${dirNames}?`);
232
232
  return;
233
233
  }
234
234
  for (const { name, skillDest } of agentDirs) {
235
+ if (existsSync(skillDest)) {
236
+ rmSync(skillDest, { recursive: true });
237
+ }
235
238
  cpSync(sourceDir, skillDest, { recursive: true });
236
239
  const fileCount = readdirSync(skillDest).length;
237
240
  console.log(` \u2713 Copied ${fileCount} skill files to ${name}/skills/libretto/`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libretto",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "AI-powered browser automation library and CLI built on Playwright",
5
5
  "license": "MIT",
6
6
  "repository": {