@fideliosai/db 0.0.39 → 0.0.41
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.
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
-- FID-43: Backfill decode whitespace HTML numeric entities in issue_comments.body.
|
|
2
|
+
--
|
|
3
|
+
-- Some Telegram clients (notably iOS) emit trailing whitespace as numeric
|
|
4
|
+
-- HTML entities (" ", " ", etc.). When markdown is re-pasted, the
|
|
5
|
+
-- ampersand may be backslash-escaped to "\ ". Both forms survive the
|
|
6
|
+
-- react-markdown pipeline and surface as literal text in the FideliOS UI.
|
|
7
|
+
--
|
|
8
|
+
-- The ingestion-side fix in packages/plugins/examples/telegram-gateway
|
|
9
|
+
-- (worker.ts: decodeWhitespaceEntities) prevents new occurrences. This
|
|
10
|
+
-- migration normalizes existing rows so that previously-broken comments
|
|
11
|
+
-- (e.g. on FID-39) render cleanly without manual edits.
|
|
12
|
+
--
|
|
13
|
+
-- Scope is intentionally narrow — only whitespace entities — to avoid
|
|
14
|
+
-- changing semantics for comments that legitimately mention "&#xNN;".
|
|
15
|
+
-- The optional leading backslash (markdown escape for "&") is consumed
|
|
16
|
+
-- along with the entity so we end up with plain whitespace, not "\ ".
|
|
17
|
+
|
|
18
|
+
--   /   / \  / \  → space (U+0020)
|
|
19
|
+
UPDATE "issue_comments"
|
|
20
|
+
SET "body" = regexp_replace("body", '\\?&#(?:x20|32);', ' ', 'g')
|
|
21
|
+
WHERE "body" ~ '\\?&#(?:x20|32);';
|
|
22
|
+
|
|
23
|
+
--   /   /   / \  / ... → non-breaking space (U+00A0)
|
|
24
|
+
UPDATE "issue_comments"
|
|
25
|
+
SET "body" = regexp_replace("body", '\\?&#(?:x[Aa]0|160);', U&'\00A0', 'g')
|
|
26
|
+
WHERE "body" ~ '\\?&#(?:x[Aa]0|160);';
|
|
27
|
+
|
|
28
|
+
-- 	 / 	 / \	 / \	 → tab (U+0009)
|
|
29
|
+
UPDATE "issue_comments"
|
|
30
|
+
SET "body" = regexp_replace("body", '\\?&#(?:x09|9);', E'\t', 'g')
|
|
31
|
+
WHERE "body" ~ '\\?&#(?:x09|9);';
|
|
32
|
+
|
|
33
|
+
-- 
 / 
 / / ... → line feed (U+000A)
|
|
34
|
+
UPDATE "issue_comments"
|
|
35
|
+
SET "body" = regexp_replace("body", '\\?&#(?:x0[Aa]|10);', E'\n', 'g')
|
|
36
|
+
WHERE "body" ~ '\\?&#(?:x0[Aa]|10);';
|
|
37
|
+
|
|
38
|
+
-- 
 / 
 / / ... → carriage return (U+000D)
|
|
39
|
+
UPDATE "issue_comments"
|
|
40
|
+
SET "body" = regexp_replace("body", '\\?&#(?:x0[Dd]|13);', E'\r', 'g')
|
|
41
|
+
WHERE "body" ~ '\\?&#(?:x0[Dd]|13);';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fideliosai/db",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/fideliosai/fidelios",
|
|
6
6
|
"bugs": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@aws-sdk/client-s3": "^3.888.0",
|
|
33
|
-
"@fideliosai/shared": "0.0.
|
|
33
|
+
"@fideliosai/shared": "0.0.41",
|
|
34
34
|
"drizzle-orm": "^0.38.4",
|
|
35
35
|
"embedded-postgres": "^18.1.0-beta.16",
|
|
36
36
|
"postgres": "^3.4.5"
|