xlsx-formula-recalc 0.130.7 → 0.131.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.
- package/README.md +25 -1
- package/bin/bilig-evaluate.js +2 -0
- package/dist/evaluator-bin.d.ts +1 -0
- package/dist/evaluator-bin.js +3 -0
- package/dist/evaluator-bin.js.map +1 -0
- package/dist/evaluator-cli.d.ts +46 -0
- package/dist/evaluator-cli.js +397 -0
- package/dist/evaluator-cli.js.map +1 -0
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -67,7 +67,31 @@ npm install @bilig/xlsx-formula-recalc
|
|
|
67
67
|
|
|
68
68
|
## CLI
|
|
69
69
|
|
|
70
|
-
Run the
|
|
70
|
+
Run the unified evaluator first when you want one `verified: true` proof shape
|
|
71
|
+
for XLSX stale-cache checks, WorkPaper services, and agent/MCP tooling:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npx --package @bilig/xlsx-formula-recalc bilig-evaluate --door xlsx-cache --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Expected evaluator shape:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"schemaVersion": "bilig-evaluator.v1",
|
|
82
|
+
"door": "xlsx-cache",
|
|
83
|
+
"verified": true,
|
|
84
|
+
"evidence": {
|
|
85
|
+
"target": "Summary!B2",
|
|
86
|
+
"before": 60000,
|
|
87
|
+
"after": 72000,
|
|
88
|
+
"staleCachedFormulaCount": 1,
|
|
89
|
+
"suggestedReads": ["Summary!B2"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Run the cache-doctor check directly when you need the full formula-cache report:
|
|
71
95
|
|
|
72
96
|
```sh
|
|
73
97
|
npx --package @bilig/xlsx-formula-recalc xlsx-cache-doctor --demo --json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluator-bin.js","sourceRoot":"","sources":["../src/evaluator-bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,CAAC,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const biligEvaluatorSchemaVersion = "bilig-evaluator.v1";
|
|
2
|
+
export type BiligEvaluatorDoor = 'xlsx-cache' | 'workpaper-service' | 'agent-mcp';
|
|
3
|
+
export interface BiligEvaluatorCliContext {
|
|
4
|
+
readonly stdout?: (text: string) => void;
|
|
5
|
+
readonly stderr?: (text: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface BiligEvaluatorDoorSummary {
|
|
8
|
+
readonly door: BiligEvaluatorDoor;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly command: string;
|
|
11
|
+
readonly docs: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BiligEvaluatorEvidence {
|
|
14
|
+
readonly target?: string | undefined;
|
|
15
|
+
readonly editedCell?: string | undefined;
|
|
16
|
+
readonly dependentCell?: string | undefined;
|
|
17
|
+
readonly before?: unknown;
|
|
18
|
+
readonly after?: unknown;
|
|
19
|
+
readonly afterRestore?: unknown;
|
|
20
|
+
readonly afterRestart?: unknown;
|
|
21
|
+
readonly persistedDocumentBytes?: number | undefined;
|
|
22
|
+
readonly staleCachedFormulaCount?: number | undefined;
|
|
23
|
+
readonly suggestedReads?: readonly string[] | undefined;
|
|
24
|
+
readonly toolCount?: number | undefined;
|
|
25
|
+
readonly tools?: readonly string[] | undefined;
|
|
26
|
+
readonly checks: Readonly<Record<string, boolean>>;
|
|
27
|
+
}
|
|
28
|
+
export interface BiligEvaluatorProof {
|
|
29
|
+
readonly schemaVersion: typeof biligEvaluatorSchemaVersion;
|
|
30
|
+
readonly door: BiligEvaluatorDoor;
|
|
31
|
+
readonly doorName: string;
|
|
32
|
+
readonly command: string;
|
|
33
|
+
readonly packageVersions: Readonly<Record<string, string>>;
|
|
34
|
+
readonly evidence: BiligEvaluatorEvidence;
|
|
35
|
+
readonly verified: boolean;
|
|
36
|
+
readonly durationMs: number;
|
|
37
|
+
readonly limitations: readonly string[];
|
|
38
|
+
readonly next: {
|
|
39
|
+
readonly docs: string;
|
|
40
|
+
readonly command: string;
|
|
41
|
+
};
|
|
42
|
+
readonly sourceProof: unknown;
|
|
43
|
+
}
|
|
44
|
+
export declare function listBiligEvaluatorDoors(): readonly BiligEvaluatorDoorSummary[];
|
|
45
|
+
export declare function buildBiligEvaluatorProof(door: BiligEvaluatorDoor): BiligEvaluatorProof;
|
|
46
|
+
export declare function runBiligEvaluatorCli(args: readonly string[], context?: BiligEvaluatorCliContext): number;
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { WorkPaper } from '@bilig/headless';
|
|
5
|
+
import { buildAgentWorkbookChallengeProof, buildMcpChallengeProof } from '@bilig/headless/cli';
|
|
6
|
+
import { runXlsxFormulaRecalcCli } from './cli-api.js';
|
|
7
|
+
export const biligEvaluatorSchemaVersion = 'bilig-evaluator.v1';
|
|
8
|
+
const xlsxCacheDocs = 'https://proompteng.github.io/bilig/eval-xlsx-cache-doctor.html';
|
|
9
|
+
const workpaperDocs = 'https://proompteng.github.io/bilig/eval-workpaper-service.html';
|
|
10
|
+
const mcpDocs = 'https://proompteng.github.io/bilig/eval-agent-mcp.html';
|
|
11
|
+
const doorSummaries = [
|
|
12
|
+
{
|
|
13
|
+
door: 'xlsx-cache',
|
|
14
|
+
label: 'Detect and recalculate a stale cached XLSX formula without Excel or LibreOffice.',
|
|
15
|
+
command: 'npm exec --yes --package @bilig/xlsx-formula-recalc@latest -- bilig-evaluate --door xlsx-cache --json',
|
|
16
|
+
docs: xlsxCacheDocs,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
door: 'workpaper-service',
|
|
20
|
+
label: 'Edit, recalculate, restore, and persist a WorkPaper service document.',
|
|
21
|
+
command: 'npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door workpaper-service --json',
|
|
22
|
+
docs: workpaperDocs,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
door: 'agent-mcp',
|
|
26
|
+
label: 'Exercise the WorkPaper MCP tools through a local file-backed server restart.',
|
|
27
|
+
command: 'npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json',
|
|
28
|
+
docs: mcpDocs,
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
export function listBiligEvaluatorDoors() {
|
|
32
|
+
return doorSummaries;
|
|
33
|
+
}
|
|
34
|
+
export function buildBiligEvaluatorProof(door) {
|
|
35
|
+
const startedAt = Date.now();
|
|
36
|
+
const proof = buildDoorProof(door);
|
|
37
|
+
return {
|
|
38
|
+
...proof,
|
|
39
|
+
durationMs: Math.max(0, Date.now() - startedAt),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function runBiligEvaluatorCli(args, context = {}) {
|
|
43
|
+
const writeStdout = context.stdout ?? ((text) => process.stdout.write(text));
|
|
44
|
+
const writeStderr = context.stderr ?? ((text) => process.stderr.write(text));
|
|
45
|
+
try {
|
|
46
|
+
const parsed = parseEvaluatorArgs(args);
|
|
47
|
+
if (parsed.help) {
|
|
48
|
+
writeStdout(renderEvaluatorHelp());
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
if (parsed.list) {
|
|
52
|
+
const summary = {
|
|
53
|
+
schemaVersion: biligEvaluatorSchemaVersion,
|
|
54
|
+
doors: listBiligEvaluatorDoors(),
|
|
55
|
+
};
|
|
56
|
+
writeStdout(parsed.markdown ? renderDoorListMarkdown(summary.doors) : `${JSON.stringify(summary, null, 2)}\n`);
|
|
57
|
+
return 0;
|
|
58
|
+
}
|
|
59
|
+
if (parsed.door === undefined) {
|
|
60
|
+
throw new Error('Expected --door xlsx-cache, --door workpaper-service, or --door agent-mcp.');
|
|
61
|
+
}
|
|
62
|
+
const proof = buildBiligEvaluatorProof(parsed.door);
|
|
63
|
+
writeStdout(parsed.markdown ? renderProofMarkdown(proof) : `${JSON.stringify(proof, null, 2)}\n`);
|
|
64
|
+
return proof.verified ? 0 : 1;
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
writeStderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function buildDoorProof(door) {
|
|
72
|
+
switch (door) {
|
|
73
|
+
case 'xlsx-cache':
|
|
74
|
+
return buildXlsxCacheEvaluatorProof();
|
|
75
|
+
case 'workpaper-service':
|
|
76
|
+
return buildWorkpaperServiceEvaluatorProof();
|
|
77
|
+
case 'agent-mcp':
|
|
78
|
+
return buildAgentMcpEvaluatorProof();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function buildXlsxCacheEvaluatorProof() {
|
|
82
|
+
const sourceProof = buildXlsxCacheDoctorSourceProof();
|
|
83
|
+
const firstFormula = sourceProof.formulas?.[0];
|
|
84
|
+
const checks = {
|
|
85
|
+
commandSucceeded: sourceProof.commandSucceeded === true,
|
|
86
|
+
inspectionCompleted: sourceProof.inspectionCompleted === true,
|
|
87
|
+
recalculationCompleted: sourceProof.recalculationCompleted === true,
|
|
88
|
+
staleCachedFormulaFound: (sourceProof.staleCachedFormulaCount ?? 0) > 0,
|
|
89
|
+
readbackSuggested: (sourceProof.suggestedReads?.length ?? 0) > 0,
|
|
90
|
+
};
|
|
91
|
+
const verified = Object.values(checks).every(Boolean);
|
|
92
|
+
const summary = requireDoorSummary('xlsx-cache');
|
|
93
|
+
return {
|
|
94
|
+
schemaVersion: biligEvaluatorSchemaVersion,
|
|
95
|
+
door: 'xlsx-cache',
|
|
96
|
+
doorName: 'XLSX stale-cache proof',
|
|
97
|
+
command: summary.command,
|
|
98
|
+
packageVersions: {
|
|
99
|
+
'xlsx-formula-recalc': readLocalPackageVersion(),
|
|
100
|
+
'@bilig/workpaper-runtime': WorkPaper.version,
|
|
101
|
+
},
|
|
102
|
+
evidence: {
|
|
103
|
+
target: firstFormula?.target,
|
|
104
|
+
before: firstFormula?.cachedValue,
|
|
105
|
+
after: firstFormula?.literalRecalculatedValue,
|
|
106
|
+
staleCachedFormulaCount: sourceProof.staleCachedFormulaCount,
|
|
107
|
+
suggestedReads: sourceProof.suggestedReads,
|
|
108
|
+
checks,
|
|
109
|
+
},
|
|
110
|
+
verified,
|
|
111
|
+
limitations: [
|
|
112
|
+
'This door proves stale cached formula detection and Bilig recalculation readback; it does not prove Excel desktop parity.',
|
|
113
|
+
'Use Excel, LibreOffice, or an oracle harness for macros, pivots, charts, unsupported functions, and UI-specific workbook behavior.',
|
|
114
|
+
],
|
|
115
|
+
next: {
|
|
116
|
+
docs: summary.docs,
|
|
117
|
+
command: summary.command,
|
|
118
|
+
},
|
|
119
|
+
sourceProof,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function buildWorkpaperServiceEvaluatorProof() {
|
|
123
|
+
const sourceProof = buildAgentWorkbookChallengeProof();
|
|
124
|
+
const checks = normalizeBooleanRecord(recordValue(sourceProof, 'checks'));
|
|
125
|
+
const summary = requireDoorSummary('workpaper-service');
|
|
126
|
+
return {
|
|
127
|
+
schemaVersion: biligEvaluatorSchemaVersion,
|
|
128
|
+
door: 'workpaper-service',
|
|
129
|
+
doorName: 'WorkPaper service proof',
|
|
130
|
+
command: summary.command,
|
|
131
|
+
packageVersions: {
|
|
132
|
+
'@bilig/workpaper': WorkPaper.version,
|
|
133
|
+
'xlsx-formula-recalc': readLocalPackageVersion(),
|
|
134
|
+
},
|
|
135
|
+
evidence: {
|
|
136
|
+
editedCell: stringValue(sourceProof, 'editedCell'),
|
|
137
|
+
dependentCell: stringValue(sourceProof, 'dependentCell'),
|
|
138
|
+
before: propertyValue(sourceProof, 'before'),
|
|
139
|
+
after: propertyValue(sourceProof, 'after'),
|
|
140
|
+
afterRestore: propertyValue(sourceProof, 'afterRestore'),
|
|
141
|
+
persistedDocumentBytes: numberValue(sourceProof, 'persistedDocumentBytes'),
|
|
142
|
+
checks,
|
|
143
|
+
},
|
|
144
|
+
verified: booleanValue(sourceProof, 'verified'),
|
|
145
|
+
limitations: stringArrayValue(sourceProof, 'limitations'),
|
|
146
|
+
next: {
|
|
147
|
+
docs: summary.docs,
|
|
148
|
+
command: summary.command,
|
|
149
|
+
},
|
|
150
|
+
sourceProof,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function buildAgentMcpEvaluatorProof() {
|
|
154
|
+
const sourceProof = buildMcpChallengeProof();
|
|
155
|
+
const checks = normalizeBooleanRecord(recordValue(sourceProof, 'checks'));
|
|
156
|
+
const tools = stringArrayValue(sourceProof, 'tools');
|
|
157
|
+
const summary = requireDoorSummary('agent-mcp');
|
|
158
|
+
return {
|
|
159
|
+
schemaVersion: biligEvaluatorSchemaVersion,
|
|
160
|
+
door: 'agent-mcp',
|
|
161
|
+
doorName: 'Agent MCP proof',
|
|
162
|
+
command: summary.command,
|
|
163
|
+
packageVersions: {
|
|
164
|
+
'@bilig/workpaper': WorkPaper.version,
|
|
165
|
+
'xlsx-formula-recalc': readLocalPackageVersion(),
|
|
166
|
+
},
|
|
167
|
+
evidence: {
|
|
168
|
+
editedCell: stringValue(sourceProof, 'editedCell'),
|
|
169
|
+
dependentCell: stringValue(sourceProof, 'dependentCell'),
|
|
170
|
+
before: propertyValue(sourceProof, 'before'),
|
|
171
|
+
after: propertyValue(sourceProof, 'after'),
|
|
172
|
+
afterRestore: propertyValue(sourceProof, 'afterRestore'),
|
|
173
|
+
afterRestart: propertyValue(sourceProof, 'afterRestart'),
|
|
174
|
+
persistedDocumentBytes: numberValue(sourceProof, 'persistedDocumentBytes'),
|
|
175
|
+
toolCount: tools.length,
|
|
176
|
+
tools,
|
|
177
|
+
checks,
|
|
178
|
+
},
|
|
179
|
+
verified: booleanValue(sourceProof, 'verified'),
|
|
180
|
+
limitations: stringArrayValue(sourceProof, 'limitations'),
|
|
181
|
+
next: {
|
|
182
|
+
docs: summary.docs,
|
|
183
|
+
command: summary.command,
|
|
184
|
+
},
|
|
185
|
+
sourceProof,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function buildXlsxCacheDoctorSourceProof() {
|
|
189
|
+
let stdout = '';
|
|
190
|
+
const exitCode = runXlsxFormulaRecalcCli(['--demo', '--json'], {
|
|
191
|
+
commandName: 'xlsx-cache-doctor',
|
|
192
|
+
stdout: (text) => {
|
|
193
|
+
stdout += text;
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
if (exitCode !== 0) {
|
|
197
|
+
throw new Error('xlsx-cache-doctor evaluator door failed.');
|
|
198
|
+
}
|
|
199
|
+
return parseXlsxCacheDoctorProof(stdout);
|
|
200
|
+
}
|
|
201
|
+
function parseXlsxCacheDoctorProof(text) {
|
|
202
|
+
const parsed = JSON.parse(text);
|
|
203
|
+
const source = requireRecord(parsed, 'xlsx-cache-doctor JSON output');
|
|
204
|
+
const formulasRaw = arrayValue(source, 'formulas');
|
|
205
|
+
const formulas = formulasRaw.map((formula) => {
|
|
206
|
+
const record = requireRecord(formula, 'xlsx-cache-doctor formula summary');
|
|
207
|
+
return {
|
|
208
|
+
target: optionalString(record['target']),
|
|
209
|
+
formula: optionalString(record['formula']),
|
|
210
|
+
cachedValue: record['cachedValue'],
|
|
211
|
+
literalRecalculatedValue: record['literalRecalculatedValue'],
|
|
212
|
+
stale: optionalBoolean(record['stale']),
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
return {
|
|
216
|
+
...source,
|
|
217
|
+
commandSucceeded: optionalBoolean(source['commandSucceeded']),
|
|
218
|
+
inspectionCompleted: optionalBoolean(source['inspectionCompleted']),
|
|
219
|
+
recalculationCompleted: optionalBoolean(source['recalculationCompleted']),
|
|
220
|
+
formulaCellCount: optionalNumber(source['formulaCellCount']),
|
|
221
|
+
staleCachedFormulaCount: optionalNumber(source['staleCachedFormulaCount']),
|
|
222
|
+
suggestedReads: stringArray(source['suggestedReads']),
|
|
223
|
+
formulas,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function parseEvaluatorArgs(args) {
|
|
227
|
+
let door;
|
|
228
|
+
let json = true;
|
|
229
|
+
let markdown = false;
|
|
230
|
+
let list = false;
|
|
231
|
+
let help = false;
|
|
232
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
233
|
+
const arg = args[index];
|
|
234
|
+
if (arg === undefined) {
|
|
235
|
+
throw new Error('Unexpected missing bilig-evaluate argument.');
|
|
236
|
+
}
|
|
237
|
+
if (arg === '--door') {
|
|
238
|
+
door = parseDoor(requireNextArg(args, index, '--door'));
|
|
239
|
+
index += 1;
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (arg.startsWith('--door=')) {
|
|
243
|
+
door = parseDoor(arg.slice('--door='.length));
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
switch (arg) {
|
|
247
|
+
case '--json':
|
|
248
|
+
json = true;
|
|
249
|
+
markdown = false;
|
|
250
|
+
break;
|
|
251
|
+
case '--markdown':
|
|
252
|
+
markdown = true;
|
|
253
|
+
json = false;
|
|
254
|
+
break;
|
|
255
|
+
case '--list':
|
|
256
|
+
list = true;
|
|
257
|
+
break;
|
|
258
|
+
case '--help':
|
|
259
|
+
case '-h':
|
|
260
|
+
help = true;
|
|
261
|
+
break;
|
|
262
|
+
default:
|
|
263
|
+
throw new Error(`Unknown bilig-evaluate option: ${arg}`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return { door, json, markdown, list, help };
|
|
267
|
+
}
|
|
268
|
+
function parseDoor(value) {
|
|
269
|
+
switch (value) {
|
|
270
|
+
case 'xlsx':
|
|
271
|
+
case 'xlsx-cache':
|
|
272
|
+
case 'xlsx-cache-doctor':
|
|
273
|
+
return 'xlsx-cache';
|
|
274
|
+
case 'workpaper':
|
|
275
|
+
case 'workpaper-service':
|
|
276
|
+
case 'service':
|
|
277
|
+
return 'workpaper-service';
|
|
278
|
+
case 'agent':
|
|
279
|
+
case 'agent-mcp':
|
|
280
|
+
case 'mcp':
|
|
281
|
+
return 'agent-mcp';
|
|
282
|
+
default:
|
|
283
|
+
throw new Error(`Unknown bilig-evaluate door: ${value}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function requireNextArg(args, index, option) {
|
|
287
|
+
const value = args[index + 1];
|
|
288
|
+
if (value === undefined || value.startsWith('-')) {
|
|
289
|
+
throw new Error(`Expected value after ${option}.`);
|
|
290
|
+
}
|
|
291
|
+
return value;
|
|
292
|
+
}
|
|
293
|
+
function renderEvaluatorHelp() {
|
|
294
|
+
return `Usage: bilig-evaluate --door <door> [--json|--markdown]
|
|
295
|
+
|
|
296
|
+
Doors:
|
|
297
|
+
xlsx-cache Detect stale cached XLSX formulas and prove recalculated readback.
|
|
298
|
+
workpaper-service Prove WorkPaper edit, recalc, restore, and persistence.
|
|
299
|
+
agent-mcp Prove MCP tools, restart persistence, and readback.
|
|
300
|
+
|
|
301
|
+
Options:
|
|
302
|
+
--door <door> Door to run.
|
|
303
|
+
--list Print available doors.
|
|
304
|
+
--json Print JSON proof (default).
|
|
305
|
+
--markdown Print compact Markdown proof.
|
|
306
|
+
-h, --help Show this help.
|
|
307
|
+
`;
|
|
308
|
+
}
|
|
309
|
+
function renderDoorListMarkdown(doors) {
|
|
310
|
+
return ['# Bilig Evaluator Doors', '', ...doors.map((door) => `- \`${door.door}\`: ${door.label}\n \`${door.command}\``), ''].join('\n');
|
|
311
|
+
}
|
|
312
|
+
function renderProofMarkdown(proof) {
|
|
313
|
+
return [
|
|
314
|
+
`# ${proof.doorName}`,
|
|
315
|
+
'',
|
|
316
|
+
`- Door: \`${proof.door}\``,
|
|
317
|
+
`- Verified: \`${String(proof.verified)}\``,
|
|
318
|
+
`- Command: \`${proof.command}\``,
|
|
319
|
+
`- Docs: ${proof.next.docs}`,
|
|
320
|
+
`- Evidence: \`${JSON.stringify(proof.evidence)}\``,
|
|
321
|
+
'',
|
|
322
|
+
].join('\n');
|
|
323
|
+
}
|
|
324
|
+
function requireDoorSummary(door) {
|
|
325
|
+
const summary = doorSummaries.find((entry) => entry.door === door);
|
|
326
|
+
if (summary === undefined) {
|
|
327
|
+
throw new Error(`Missing evaluator door summary for ${door}.`);
|
|
328
|
+
}
|
|
329
|
+
return summary;
|
|
330
|
+
}
|
|
331
|
+
function readLocalPackageVersion() {
|
|
332
|
+
const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
333
|
+
const parsed = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
334
|
+
const record = requireRecord(parsed, packageJsonPath);
|
|
335
|
+
const version = record['version'];
|
|
336
|
+
if (typeof version !== 'string' || version.length === 0) {
|
|
337
|
+
throw new Error(`Expected package version in ${packageJsonPath}.`);
|
|
338
|
+
}
|
|
339
|
+
return version;
|
|
340
|
+
}
|
|
341
|
+
function requireRecord(value, label) {
|
|
342
|
+
if (!isRecord(value)) {
|
|
343
|
+
throw new Error(`Expected ${label} to be an object.`);
|
|
344
|
+
}
|
|
345
|
+
return value;
|
|
346
|
+
}
|
|
347
|
+
function propertyValue(source, key) {
|
|
348
|
+
return requireRecord(source, 'proof')[key];
|
|
349
|
+
}
|
|
350
|
+
function recordValue(source, key) {
|
|
351
|
+
const value = propertyValue(source, key);
|
|
352
|
+
if (value === undefined) {
|
|
353
|
+
return {};
|
|
354
|
+
}
|
|
355
|
+
return requireRecord(value, key);
|
|
356
|
+
}
|
|
357
|
+
function normalizeBooleanRecord(source) {
|
|
358
|
+
const normalized = {};
|
|
359
|
+
for (const [key, value] of Object.entries(source)) {
|
|
360
|
+
if (typeof value === 'boolean') {
|
|
361
|
+
normalized[key] = value;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return normalized;
|
|
365
|
+
}
|
|
366
|
+
function stringValue(source, key) {
|
|
367
|
+
return optionalString(propertyValue(source, key));
|
|
368
|
+
}
|
|
369
|
+
function numberValue(source, key) {
|
|
370
|
+
return optionalNumber(propertyValue(source, key));
|
|
371
|
+
}
|
|
372
|
+
function booleanValue(source, key) {
|
|
373
|
+
return propertyValue(source, key) === true;
|
|
374
|
+
}
|
|
375
|
+
function arrayValue(source, key) {
|
|
376
|
+
const value = source[key];
|
|
377
|
+
return Array.isArray(value) ? value : [];
|
|
378
|
+
}
|
|
379
|
+
function stringArrayValue(source, key) {
|
|
380
|
+
return stringArray(propertyValue(source, key));
|
|
381
|
+
}
|
|
382
|
+
function stringArray(value) {
|
|
383
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
384
|
+
}
|
|
385
|
+
function optionalString(value) {
|
|
386
|
+
return typeof value === 'string' ? value : undefined;
|
|
387
|
+
}
|
|
388
|
+
function optionalNumber(value) {
|
|
389
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
390
|
+
}
|
|
391
|
+
function optionalBoolean(value) {
|
|
392
|
+
return typeof value === 'boolean' ? value : undefined;
|
|
393
|
+
}
|
|
394
|
+
function isRecord(value) {
|
|
395
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
396
|
+
}
|
|
397
|
+
//# sourceMappingURL=evaluator-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluator-cli.js","sourceRoot":"","sources":["../src/evaluator-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAA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CAAC,EAAE,CAAA;AACrG,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACtD,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAChF,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACvD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xlsx-formula-recalc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0",
|
|
4
4
|
"description": "Diagnose stale cached XLSX formula values and recalculate XLSX formulas in Node.js without Excel, LibreOffice, or browser automation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"excel",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"directory": "packages/xlsx-formula-recalc"
|
|
40
40
|
},
|
|
41
41
|
"bin": {
|
|
42
|
+
"bilig-evaluate": "./bin/bilig-evaluate.js",
|
|
42
43
|
"sheetjs-recalc": "./bin/sheetjs-recalc.js",
|
|
43
44
|
"xlsx-cache-doctor": "./bin/xlsx-cache-doctor.js",
|
|
44
45
|
"xlsx-recalc": "./bin/xlsx-recalc.js"
|
|
@@ -65,6 +66,11 @@
|
|
|
65
66
|
"types": "./dist/cli-api.d.ts",
|
|
66
67
|
"import": "./dist/cli-api.js",
|
|
67
68
|
"default": "./dist/cli-api.js"
|
|
69
|
+
},
|
|
70
|
+
"./evaluator": {
|
|
71
|
+
"types": "./dist/evaluator-cli.d.ts",
|
|
72
|
+
"import": "./dist/evaluator-cli.js",
|
|
73
|
+
"default": "./dist/evaluator-cli.js"
|
|
68
74
|
}
|
|
69
75
|
},
|
|
70
76
|
"publishConfig": {
|
|
@@ -77,8 +83,8 @@
|
|
|
77
83
|
"smoke": "node ./dist/cli.js --help"
|
|
78
84
|
},
|
|
79
85
|
"dependencies": {
|
|
80
|
-
"@bilig/headless": "0.
|
|
81
|
-
"@bilig/protocol": "0.
|
|
86
|
+
"@bilig/headless": "0.131.0",
|
|
87
|
+
"@bilig/protocol": "0.131.0",
|
|
82
88
|
"fflate": "0.3.11"
|
|
83
89
|
},
|
|
84
90
|
"engines": {
|