* Update CI workflow, dependencies, and add Vitest for testing Co-authored-by: overtorment <overtorment@gmail.com> * Remove Vitest UI and related configuration Co-authored-by: overtorment <overtorment@gmail.com> * Move string utils tests to dedicated tests directory Co-authored-by: overtorment <overtorment@gmail.com> * Update CI workflow to separate lint and test jobs Co-authored-by: overtorment <overtorment@gmail.com> * Rename vitest.config.ts to vitest.config.mts Co-authored-by: overtorment <overtorment@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
20 lines
633 B
JavaScript
20 lines
633 B
JavaScript
const fs = require("fs");
|
|
|
|
const text = fs.readFileSync("all_tokens_unique.csv", { encoding: "utf8" });
|
|
|
|
const lines = text.split("\n");
|
|
console.log("# got", lines.length, "tokens");
|
|
|
|
console.log("INSERT INTO send_queue_2 VALUES ");
|
|
|
|
let fisrt = true;
|
|
for (const line of lines.slice(0, 1000000)) {
|
|
const [token, os] = line.split("\t");
|
|
const sql =
|
|
(fisrt ? "" : ", ") + `(null, '{"type":5,"token":"${token}","os":"${os}","text":"If you are using Lightning, please read our blog post. The service is sunsetting. Balances should be moved to another service"}', null)`;
|
|
console.log(sql);
|
|
fisrt = false;
|
|
}
|
|
|
|
console.log(";");
|