@g9tm/aiassistant 1.4.1 → 1.4.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.
- package/dist/csv.js +1 -1
- package/dist/pages.js +2 -1
- package/dist/routine.js +1 -0
- package/package.json +2 -2
package/dist/csv.js
CHANGED
|
@@ -6,7 +6,7 @@ export function csvCell(value) {
|
|
|
6
6
|
}
|
|
7
7
|
/** The whole file: a BOM, a header row of the column labels, then the rows, lines ended with CRLF. */
|
|
8
8
|
export function toCsv(labels, rows) {
|
|
9
|
-
const lines = [labels.map(csvCell).join(","), ...rows.map((r) => labels.map((_, i) => csvCell(r
|
|
9
|
+
const lines = [labels.map(csvCell).join(","), ...rows.map((r) => labels.map((_, i) => csvCell(r.at(i) ?? "")).join(","))];
|
|
10
10
|
return BOM + lines.join("\r\n") + "\r\n";
|
|
11
11
|
}
|
|
12
12
|
/** A file name from a title: letters, digits and dashes only, with the extension. */
|
package/dist/pages.js
CHANGED
|
@@ -146,7 +146,8 @@ export function withHostTexts(texts, own) {
|
|
|
146
146
|
locale: texts.locale,
|
|
147
147
|
t(key, args) {
|
|
148
148
|
const v = texts.t(key, args);
|
|
149
|
-
const
|
|
149
|
+
const mine = own();
|
|
150
|
+
const words = Object.hasOwn(mine, key) ? new Map(Object.entries(mine)).get(key) : undefined; // never a prototype's member
|
|
150
151
|
return v !== key || words === undefined ? v : createTexts(texts.locale, { [key]: words }).t(key, args);
|
|
151
152
|
},
|
|
152
153
|
};
|
package/dist/routine.js
CHANGED
|
@@ -37,6 +37,7 @@ export function slotValue(slot, text) {
|
|
|
37
37
|
return null;
|
|
38
38
|
if (slot.field === "number" || slot.field === "money") {
|
|
39
39
|
const n = t.replace(/[,\u066C\u060C\s]/gu, "").replace(/\u066B/gu, ".");
|
|
40
|
+
// eslint-disable-next-line security/detect-unsafe-regex -- one optional group after digits: linear, no backtracking blow-up
|
|
40
41
|
return /^-?\d+(\.\d+)?$/u.test(n) ? n : null;
|
|
41
42
|
}
|
|
42
43
|
if (slot.field === "date")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/aiassistant",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Headless client of the G9 AI assistant: API client, run state, transports, block view models, safe text and Persian helpers. No DOM, no framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@g9tm/aiassistant-contracts": "1.4.
|
|
36
|
+
"@g9tm/aiassistant-contracts": "1.4.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -p tsconfig.json",
|