create-confluence-sync 1.0.5 → 1.0.6
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/cli.js +6 -3
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { input, password, select, confirm, checkbox } from '@inquirer/prompts';
|
|
|
7
7
|
import { createApiClient } from './api.js';
|
|
8
8
|
import { loadTree, saveTree, unhidePage } from './tree.js';
|
|
9
9
|
import { initialPull, pull, push, detectHidden } from './sync.js';
|
|
10
|
-
import { initRepo, installHook, commitAll } from './git.js';
|
|
10
|
+
import { initRepo, installHook, commitAll, getRenamedFiles, getDeletedFiles } from './git.js';
|
|
11
11
|
import { generateAgentsMd } from './agents-md.js';
|
|
12
12
|
|
|
13
13
|
const projectRoot = process.cwd();
|
|
@@ -89,9 +89,12 @@ async function cmdSync(file) {
|
|
|
89
89
|
|
|
90
90
|
try {
|
|
91
91
|
let result;
|
|
92
|
-
|
|
92
|
+
const renames = getRenamedFiles(projectRoot);
|
|
93
|
+
const renamedFromPaths = new Set(renames.map(r => r.from.replace(/\\/g, '/')));
|
|
94
|
+
const deletedFiles = getDeletedFiles(projectRoot);
|
|
95
|
+
detectHidden(tree, projectRoot, deletedFiles, renamedFromPaths);
|
|
93
96
|
if (file) {
|
|
94
|
-
result = await push(apiClient, tree, projectRoot, config.space, [file]);
|
|
97
|
+
result = await push(apiClient, tree, projectRoot, config.space, [file], renames);
|
|
95
98
|
} else {
|
|
96
99
|
result = await pull(apiClient, tree, projectRoot, config.space);
|
|
97
100
|
}
|