@diy-accounting-uk/diya-gl 1.2.1 → 1.2.2
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.
|
@@ -259,6 +259,32 @@
|
|
|
259
259
|
"scorecard": "101279 passed, 0 warnings, 0 failed"
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"tag": "diya-gl-v1.2.1",
|
|
265
|
+
"date": "2026-09-10",
|
|
266
|
+
"formatVersion": "diya-gl/1",
|
|
267
|
+
"engineVersion": "1.2.1+411866032aec",
|
|
268
|
+
"taxDataHash": "6a9c036b5f9c",
|
|
269
|
+
"reconciledCommit": "320b4b8a1585e16fa170c2d312c14df38d0bcf5b",
|
|
270
|
+
"templates": {
|
|
271
|
+
"bst": {
|
|
272
|
+
"hash": "0d003e10e00c",
|
|
273
|
+
"scorecard": "810 passed, 0 warnings, 0 failed"
|
|
274
|
+
},
|
|
275
|
+
"taxi": {
|
|
276
|
+
"hash": "1ff69654d64d",
|
|
277
|
+
"scorecard": "686 passed, 0 warnings, 0 failed"
|
|
278
|
+
},
|
|
279
|
+
"se": {
|
|
280
|
+
"hash": "c6a50059cc90",
|
|
281
|
+
"scorecard": "7679 passed, 0 warnings, 0 failed"
|
|
282
|
+
},
|
|
283
|
+
"ltd": {
|
|
284
|
+
"hash": "0c18ceeaced4",
|
|
285
|
+
"scorecard": "101279 passed, 0 warnings, 0 failed"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
262
288
|
}
|
|
263
289
|
]
|
|
264
290
|
}
|
|
@@ -33,11 +33,11 @@ const SCHEMA_ROOT_FROM_APP = ["..", "web", "spreadsheets.diyaccounting.co.uk", "
|
|
|
33
33
|
// serves the templates the DIYA-GL pages use, and keeps it in a user cache so
|
|
34
34
|
// every later run works with no network.
|
|
35
35
|
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
36
|
+
// Both the current /diya-gl/ and legacy /books/ paths resolve — the old one
|
|
37
|
+
// through a redirect — so published versions built before the path moved keep
|
|
38
|
+
// working.
|
|
39
39
|
const TEMPLATE_PREFIX = "templates/";
|
|
40
|
-
const DEFAULT_TEMPLATE_SOURCE = "https://spreadsheets.diyaccounting.co.uk/
|
|
40
|
+
const DEFAULT_TEMPLATE_SOURCE = "https://spreadsheets.diyaccounting.co.uk/diya-gl/assets/";
|
|
41
41
|
|
|
42
42
|
let templateTermsAnnounced = false;
|
|
43
43
|
|
|
@@ -58,8 +58,19 @@ function primaryField(boxes, boxNumber) {
|
|
|
58
58
|
return fieldsOf(boxEntry(boxes, boxNumber))[0];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
// "__proto__", "constructor" and "prototype" are not field names, they are
|
|
62
|
+
// the prototype chain -- a path carrying one would write onto Object.prototype
|
|
63
|
+
// rather than the object this call meant to build. Every path here comes from
|
|
64
|
+
// sa103-mtd-mapping.json's own "field" column, so a segment like this is a
|
|
65
|
+
// defect in that mapping file and must fail loudly rather than land quietly
|
|
66
|
+
// on some other object.
|
|
67
|
+
const UNSAFE_PATH_SEGMENTS = new Set(["__proto__", "constructor", "prototype"]);
|
|
68
|
+
|
|
69
|
+
export function setPath(target, path, value) {
|
|
62
70
|
const parts = path.split(".");
|
|
71
|
+
for (const part of parts) {
|
|
72
|
+
if (UNSAFE_PATH_SEGMENTS.has(part)) throw new Error(`setPath: "${part}" is not a field name, in path "${path}"`);
|
|
73
|
+
}
|
|
63
74
|
let node = target;
|
|
64
75
|
for (let i = 0; i < parts.length - 1; i++) node = node[parts[i]] ||= {};
|
|
65
76
|
node[parts[parts.length - 1]] = value;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
export const PROVENANCE_DATA = {
|
|
14
14
|
"formatVersion": "diya-gl/1",
|
|
15
|
-
"engineVersion": "1.2.
|
|
15
|
+
"engineVersion": "1.2.2+f31df0f7451c",
|
|
16
16
|
"taxDataHash": "6a9c036b5f9c",
|
|
17
17
|
"reconciledCommit": "320b4b8a1585e16fa170c2d312c14df38d0bcf5b",
|
|
18
18
|
"templates": {
|