@agentuity/cli 0.0.25 → 0.0.26-0

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 +1 @@
1
- {"version":3,"file":"template-flow.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/template-flow.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAM3C,UAAU,iBAAiB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2J7E"}
1
+ {"version":3,"file":"template-flow.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/template-flow.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAM3C,UAAU,iBAAiB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4J7E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/cli",
3
- "version": "0.0.25",
3
+ "version": "0.0.26-0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  import { basename, resolve } from 'node:path';
2
- import { existsSync, readdirSync, rmSync } from 'node:fs';
2
+ import { existsSync, readdirSync, rmSync, statSync } from 'node:fs';
3
3
  import { cwd } from 'node:process';
4
4
  import { homedir } from 'node:os';
5
5
  import enquirer from 'enquirer';
@@ -77,7 +77,8 @@ export async function runCreateFlow(options: CreateFlowOptions): Promise<void> {
77
77
  const baseDir = expandedTargetDir ? resolve(expandedTargetDir) : process.cwd();
78
78
  const dest = dirName === '.' ? baseDir : resolve(baseDir, dirName);
79
79
  const destExists = existsSync(dest);
80
- const destEmpty = destExists ? readdirSync(dest).length === 0 : true;
80
+ const destIsDir = destExists ? statSync(dest).isDirectory() : false;
81
+ const destEmpty = destIsDir ? readdirSync(dest).length === 0 : !destExists;
81
82
 
82
83
  if (destExists && !destEmpty && dirName !== '.') {
83
84
  // In TTY mode, ask if they want to overwrite