@kevlns/xlmerge 1.3.1 → 2.0.1
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/AGENTS.md +141 -136
- package/LICENSE +21 -21
- package/README.md +193 -183
- package/bin/xlmerge.js +152 -152
- package/package.json +2 -2
- package/python/xlsx_merge_engine/__init__.py +2 -2
- package/python/xlsx_merge_engine/xlsx_git_merge_bridge.py +1611 -1587
- package/python/xlsx_resolver/__init__.py +2 -2
- package/python/xlsx_resolver/__main__.py +4 -4
- package/python/xlsx_resolver/formula_values.py +565 -0
- package/python/xlsx_resolver/merge_server.py +126 -126
- package/python/xlsx_resolver/merge_ui.html +1522 -1227
- package/python/xlsx_resolver/recalculate_workbook.ps1 +155 -0
- package/python/xlsx_resolver/resolve_xlsx_conflict.py +222 -222
- package/python/xlsx_resolver/xlsx_conflict.py +1994 -1601
- package/v-cli.plugin.json +194 -190
package/v-cli.plugin.json
CHANGED
|
@@ -1,190 +1,194 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"package": "@kevlns/xlmerge",
|
|
4
|
-
"command": "xlmerge",
|
|
5
|
-
"bin": "xlmerge",
|
|
6
|
-
"description": "
|
|
7
|
-
"platforms": ["darwin", "linux", "win32"],
|
|
8
|
-
"runtime": {
|
|
9
|
-
"node": ">=16",
|
|
10
|
-
"python": ">=3.9",
|
|
11
|
-
"pythonDependencies": ["openpyxl==3.1.5", "bottle==0.13.4"]
|
|
12
|
-
},
|
|
13
|
-
"environment": [
|
|
14
|
-
{
|
|
15
|
-
"name": "XLMERGE_PYTHON",
|
|
16
|
-
"description": "Python interpreter path; highest precedence, bypasses automatic discovery."
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "XLMERGE_VENV",
|
|
20
|
-
"description": "Directory for the on-demand user-level virtualenv (default: ~/.xlmerge/venv)."
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
"flags": "--
|
|
32
|
-
"description": "
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{
|
|
109
|
-
"flags": "--
|
|
110
|
-
"description": "
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
"flags": "--
|
|
136
|
-
"description": "
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
"flags": "--
|
|
162
|
-
"description": "Required.
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"flags": "--
|
|
166
|
-
"description": "
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"flags": "--
|
|
170
|
-
"description": "
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"flags": "--
|
|
174
|
-
"description": "
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@kevlns/xlmerge",
|
|
4
|
+
"command": "xlmerge",
|
|
5
|
+
"bin": "xlmerge",
|
|
6
|
+
"description": "Formula-aware visual resolver for Git merge conflicts in .xlsx/.xlsm planning tables: three-way sheet/row/cell diff, local UI, atomic write-back and commit.",
|
|
7
|
+
"platforms": ["darwin", "linux", "win32"],
|
|
8
|
+
"runtime": {
|
|
9
|
+
"node": ">=16",
|
|
10
|
+
"python": ">=3.9",
|
|
11
|
+
"pythonDependencies": ["openpyxl==3.1.5", "bottle==0.13.4"]
|
|
12
|
+
},
|
|
13
|
+
"environment": [
|
|
14
|
+
{
|
|
15
|
+
"name": "XLMERGE_PYTHON",
|
|
16
|
+
"description": "Python interpreter path; highest precedence, bypasses automatic discovery."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "XLMERGE_VENV",
|
|
20
|
+
"description": "Directory for the on-demand user-level virtualenv (default: ~/.xlmerge/venv)."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "XLMERGE_EXCEL_TIMEOUT_SECONDS",
|
|
24
|
+
"description": "Hard timeout for isolated Excel formula recalculation (default: 120 seconds per workbook)."
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"agent": {
|
|
28
|
+
"whenToUse": "When a user asks to resolve Git merge conflicts in .xlsx/.xlsm planning or configuration tables (策划表/配置表冲突): run detect first; when reviewCount > 0 run launch and give the returned url to the user. Configured auto-theirs filters may resolve and commit matched generated workbooks without opening the UI. Do not inspect workbook cells or summarize diffs yourself; the resolver owns diff, choices, write-back and commit.",
|
|
29
|
+
"globalOptions": [
|
|
30
|
+
{
|
|
31
|
+
"flags": "--repo <path>",
|
|
32
|
+
"description": "Git repository (default: current directory; searches upward for the Git root)."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"flags": "--runtime-dir <dir>",
|
|
36
|
+
"description": "Optional directory for extracted Git stage workbooks and manifest (default: system temp). Used by prepare, resolve and launch."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"commands": [
|
|
40
|
+
{
|
|
41
|
+
"path": ["detect"],
|
|
42
|
+
"usage": "xlmerge --repo <repo> detect",
|
|
43
|
+
"description": "List unresolved .xlsx/.xlsm files in the repository.",
|
|
44
|
+
"arguments": [],
|
|
45
|
+
"options": [],
|
|
46
|
+
"output": {
|
|
47
|
+
"format": "json",
|
|
48
|
+
"description": "Object with ok, repo, count, reviewCount, autoTheirs and conflicts (array of {path, stages})."
|
|
49
|
+
},
|
|
50
|
+
"exitCodes": {
|
|
51
|
+
"0": "success",
|
|
52
|
+
"1": "error (e.g. not a Git repository)",
|
|
53
|
+
"2": "usage error"
|
|
54
|
+
},
|
|
55
|
+
"safety": ["read-only", "no-worktree-modification"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": ["filter", "add"],
|
|
59
|
+
"usage": "xlmerge --repo <repo> filter add <path>",
|
|
60
|
+
"description": "Add a repository-scoped case-insensitive workbook path-suffix filter whose conflicts are adopted byte-for-byte from Git stage 3.",
|
|
61
|
+
"arguments": [
|
|
62
|
+
{
|
|
63
|
+
"name": "path",
|
|
64
|
+
"required": true,
|
|
65
|
+
"description": "Relative .xlsx/.xlsm path suffix to adopt from Git stage 3."
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"options": [],
|
|
69
|
+
"output": {
|
|
70
|
+
"format": "json",
|
|
71
|
+
"description": "Object with ok, repo, config, filter, added and the complete filters list. Writes <repo>/.xlmerge.json."
|
|
72
|
+
},
|
|
73
|
+
"exitCodes": {
|
|
74
|
+
"0": "success (including an already-present filter)",
|
|
75
|
+
"1": "invalid repository, filter path or .xlmerge.json",
|
|
76
|
+
"2": "usage error"
|
|
77
|
+
},
|
|
78
|
+
"safety": ["writes-worktree", "no-commit"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": ["prepare"],
|
|
82
|
+
"usage": "xlmerge --repo <repo> prepare [--path <file>]",
|
|
83
|
+
"description": "Build a sheet-aware manifest; configured auto-theirs matches skip extraction and cell analysis.",
|
|
84
|
+
"arguments": [],
|
|
85
|
+
"options": [
|
|
86
|
+
{
|
|
87
|
+
"flags": "--path <file>",
|
|
88
|
+
"description": "Only prepare this repository-relative .xlsx/.xlsm path."
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"output": {
|
|
92
|
+
"format": "json",
|
|
93
|
+
"description": "Object with ok and manifest (absolute path to the manifest JSON)."
|
|
94
|
+
},
|
|
95
|
+
"exitCodes": {
|
|
96
|
+
"0": "success",
|
|
97
|
+
"1": "error (no conflicts found, not a Git repository, git failure)",
|
|
98
|
+
"2": "usage error"
|
|
99
|
+
},
|
|
100
|
+
"safety": ["writes-runtime-dir", "no-worktree-modification", "no-commit"]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": ["resolve"],
|
|
104
|
+
"usage": "xlmerge --repo <repo> resolve [--path <file>] [--no-browser]",
|
|
105
|
+
"description": "Prepare conflicts and serve the local visual resolver in the foreground (blocking).",
|
|
106
|
+
"arguments": [],
|
|
107
|
+
"options": [
|
|
108
|
+
{
|
|
109
|
+
"flags": "--path <file>",
|
|
110
|
+
"description": "Only resolve this repository-relative .xlsx/.xlsm path."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"flags": "--no-browser",
|
|
114
|
+
"description": "Print the URL instead of opening a browser."
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"output": {
|
|
118
|
+
"format": "stdout",
|
|
119
|
+
"description": "Prints MERGE_SERVER_URL=http://127.0.0.1:<port> for review conflicts; an all-filtered batch instead returns JSON after stage-3 write-back and commit."
|
|
120
|
+
},
|
|
121
|
+
"exitCodes": {
|
|
122
|
+
"0": "success (resolution applied automatically or via UI; server shuts down after UI write-back)",
|
|
123
|
+
"1": "error (prepare failure or server stopped before a resolution was applied)",
|
|
124
|
+
"2": "usage error"
|
|
125
|
+
},
|
|
126
|
+
"safety": ["blocking", "binds-loopback", "opens-browser-by-default", "no-push", "writes-runtime-dir", "writes-worktree", "commits-by-default", "writes-worktree-via-ui", "commits-by-default-via-ui"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"path": ["launch"],
|
|
130
|
+
"usage": "xlmerge --repo <repo> launch [--path <file>] [--no-browser]",
|
|
131
|
+
"description": "Prepare conflicts, start the visual resolver in the background and return its URL.",
|
|
132
|
+
"arguments": [],
|
|
133
|
+
"options": [
|
|
134
|
+
{
|
|
135
|
+
"flags": "--path <file>",
|
|
136
|
+
"description": "Only resolve this repository-relative .xlsx/.xlsm path."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"flags": "--no-browser",
|
|
140
|
+
"description": "Start the server without opening a browser."
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"output": {
|
|
144
|
+
"format": "json",
|
|
145
|
+
"description": "For review conflicts: object with ok, pid, url, manifest and log paths. For an all-filtered batch: url is null and autoResolved/steps report automatic stage-3 write-back and commit."
|
|
146
|
+
},
|
|
147
|
+
"exitCodes": {
|
|
148
|
+
"0": "success",
|
|
149
|
+
"1": "error (prepare failure or server did not report a URL within 15 seconds)",
|
|
150
|
+
"2": "usage error"
|
|
151
|
+
},
|
|
152
|
+
"safety": ["starts-background-server", "binds-loopback", "opens-browser-by-default", "no-push", "writes-runtime-dir", "writes-worktree", "commits-by-default", "writes-worktree-via-ui", "commits-by-default-via-ui"]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"path": ["apply"],
|
|
156
|
+
"usage": "xlmerge --repo <repo> apply --manifest <manifest.json> --decisions <decisions.json> [--no-commit] [--push] [--message <text>]",
|
|
157
|
+
"description": "Write back decisions from a decisions JSON without launching the UI.",
|
|
158
|
+
"arguments": [],
|
|
159
|
+
"options": [
|
|
160
|
+
{
|
|
161
|
+
"flags": "--manifest <file>",
|
|
162
|
+
"description": "Required. Manifest JSON produced by prepare."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"flags": "--decisions <file>",
|
|
166
|
+
"description": "Required. Decisions JSON with per-file per-sheet cell, row, column, rename and macro choices keyed by logical IDs."
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"flags": "--no-commit",
|
|
170
|
+
"description": "Skip git add/commit after writing merged workbooks."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"flags": "--push",
|
|
174
|
+
"description": "Push after committing (off by default)."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"flags": "--message <text>",
|
|
178
|
+
"description": "Override the auto-generated structured commit message."
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"output": {
|
|
182
|
+
"format": "json",
|
|
183
|
+
"description": "Result object with success and summary of written files and commit."
|
|
184
|
+
},
|
|
185
|
+
"exitCodes": {
|
|
186
|
+
"0": "success (including with --no-commit)",
|
|
187
|
+
"1": "error (invalid or incomplete decisions, git/OS failure)",
|
|
188
|
+
"2": "usage error"
|
|
189
|
+
},
|
|
190
|
+
"safety": ["writes-worktree", "commits-by-default", "pushes-only-with-flag"]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|