Commit 1300e6e
committed
chore(db-migrations): vendor mysql-patcher to eliminate supply chain risk
Remove the mysql-patcher npm dependency and vendor the library as a
modernized async/await ESM module into lib/mysql-patcher.js. Replaces
async, bluebird, clone, glob, and xtend with native equivalents. Adds
project.json with nx test-unit, test-integration, and lint targets.
Adds eslint config extending root, prettier formatting, and jest config.
Includes 15 unit tests and 7 integration tests.
Rewrites check-db-patcher.sh to poll PM2 logs directly instead of
using pgrep, fixing the race condition where the patcher finishes
before the script can find the process. Strips ANSI escape codes
from log output for clean patch summary display.1 parent fcffd9f commit 1300e6e
25 files changed
Lines changed: 1021 additions & 98 deletions
File tree
- _scripts
- packages/db-migrations
- bin
- lib
- test
- fixtures
- end-to-end
- patches
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
27 | 9 | | |
| 10 | + | |
28 | 11 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
36 | 19 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 20 | + | |
| 21 | + | |
40 | 22 | | |
41 | 23 | | |
42 | 24 | | |
| |||
46 | 28 | | |
47 | 29 | | |
48 | 30 | | |
| 31 | + | |
| 32 | + | |
49 | 33 | | |
50 | 34 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
59 | 46 | | |
60 | 47 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 48 | | |
65 | 49 | | |
| 50 | + | |
| 51 | + | |
66 | 52 | | |
67 | 53 | | |
68 | | - | |
| 54 | + | |
69 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments