@aspects-ai/workspace-cli 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -272,7 +272,10 @@ async function fetchDirectory(options) {
272
272
  if (!await fs3.pathExists(sourceDir)) {
273
273
  throw new Error(`Directory '${options.directory}' not found in repository`);
274
274
  }
275
- await fs3.ensureDir(options.targetPath);
275
+ if (await fs3.pathExists(options.targetPath)) {
276
+ await fs3.remove(options.targetPath);
277
+ }
278
+ await fs3.ensureDir(path3.dirname(options.targetPath));
276
279
  await fs3.copy(sourceDir, options.targetPath, {
277
280
  overwrite: true,
278
281
  errorOnExist: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aspects-ai/workspace-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "description": "Lightweight CLI for installing libraries into workspaces",
6
6
  "type": "module",