repo-cloak-cli 1.2.1 → 1.2.4
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.
- package/package.json +1 -1
- package/src/commands/push.js +14 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-cloak-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "🎭 Selectively extract and anonymize files from repositories. Perfect for sharing code with AI agents without exposing proprietary details.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
package/src/commands/push.js
CHANGED
|
@@ -24,10 +24,20 @@ import { getOrCreateSecret, hasSecret, decrypt, getConfigDir } from '../core/cry
|
|
|
24
24
|
|
|
25
25
|
export async function push(options = {}) {
|
|
26
26
|
try {
|
|
27
|
-
// Step 1:
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// Step 1: Check if current directory has a mapping (auto-detect)
|
|
28
|
+
const currentDir = process.cwd();
|
|
29
|
+
let cloakedDir;
|
|
30
|
+
|
|
31
|
+
if (hasMapping(currentDir) && !options.source) {
|
|
32
|
+
// Running from inside a cloaked directory - use it directly
|
|
33
|
+
cloakedDir = currentDir;
|
|
34
|
+
console.log(chalk.cyan('\n Cloaked directory detected in current folder'));
|
|
35
|
+
} else {
|
|
36
|
+
// Ask for the source directory
|
|
37
|
+
cloakedDir = options.source
|
|
38
|
+
? resolve(options.source)
|
|
39
|
+
: await promptBackupFolder();
|
|
40
|
+
}
|
|
31
41
|
|
|
32
42
|
if (!existsSync(cloakedDir)) {
|
|
33
43
|
showError(`Directory does not exist: ${cloakedDir}`);
|