From b31d41e5f87347cfd164bf5d0a9a3597459afbb2 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 14:05:57 +0200 Subject: [PATCH 01/11] chore: sorted the list manually --- ofac.sanctions.json | 144 ++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/ofac.sanctions.json b/ofac.sanctions.json index ca6be0b..759f1cf 100644 --- a/ofac.sanctions.json +++ b/ofac.sanctions.json @@ -1,140 +1,140 @@ [ + "0x01e2919679362dfbc9ee1644ba9c6da6d6245bb1", "0x03893a7c7463ae47d46bc7f091665f1893656003", + "0x05e0b5b40b7b66098c2161a5ee11c5740a3a7c45", "0x07687e702b410fa43f4cb4af7fa097918ffd2730", "0x0836222f2b2b24a3f36f98668ed8f0b38d1a872f", "0x08723392ed15743cc38513c4925f5e6be5c17243", + "0x09193888b3f38c82dedfda55259a82c0e7de875e", "0x098b716b8aaf21512996dc57eb0615e2383e2f96", "0x0d5550d52428e7e3175bfc9550207e4ad3859b17", + "0x0e3a09dda6b20afbb34ac7cd4a6881493f3e7bf7", "0x12d66f87a04a9e220743712ce6d9bb1b5616b8fc", "0x1356c899d8c9467c7f71c195612f8a395abf2f0a", "0x169ad27a470d064dede56a2d3ff727986b15d52b", "0x178169b423a011fff22b9e3f3abea13414ddd0f1", + "0x179f48c78f57a3a78f0608cc9197b8972921d1d2", "0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff", "0x1da5821544e25c636c1417ba96ade4cf6d2f9b5a", + "0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", "0x22aaa7720ddd5388a3c0a3333430953c68f1849b", + "0x23173fe8b96a4ad8d2e17fb83ea5dcccdca1ae52", "0x23773e65ed146a459791799d01336db287f25334", + "0x242654336ca2205714071898f67e254eb49acdce", + "0x2573bac39ebe2901b4389cd468f2872cf7767faf", + "0x26903a5a198d571422b2b4ea08b56a37cbd68c89", "0x2717c5e28cf931547b621a5dddb772ab6a35b701", "0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535", + "0x2f50508a8a3d323b91336fa3ea6ae50e55f32185", + "0x2fc93484614a34f26f7970cbb94615ba109bb4bf", "0x308ed4b7b49797e1a98d3818bff6fe5385410370", + "0x330bdfade01ee9bf63c209ee33102dd334618e0a", "0x35fb6f6db4fb05e6a4ce86f2c93691425626d4b1", + "0x38735f03b30fbc022ddd06abed01f0ca823c6a94", + "0x39d908dac893cbcb53cc86e0ecc369aa4def1a29", + "0x3aac1cc67c2ec5db4ea850957b967ba153ad6279", "0x3cbded43efdaf0fc77b9c55f6fc9988fcc9b757d", "0x3cffd56b47b7b41c56258d9c7731abadc360e073", "0x3e37627deaa754090fbfbb8bd226c1ce66d255e9", + "0x3efa30704d2b8bbac821307230376556cf8cc39e", + "0x407cceeaa7c95d2fe2250bf9f2c105aa7aafb512", + "0x43fa21d92141ba9db43052492e0deee5aa5f0a93", "0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d", "0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936", "0x48549a34ae37b12f6a30566245176994e17c6b4a", + "0x4f47bc496083c727c5fbe3ce9cdf2b0f6496270c", "0x527653ea119f3e6a1f5bd18fbf4714081d7b31ce", + "0x530a64c0ce595026a4a556b703644228179e2d57", + "0x538ab61e8a9fc1b2f93b3dd9011d662d89be6fe6", "0x53b6936513e738f44fb50d2b9476730c0ab3bfc1", "0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0", + "0x57b2b8c82f065de8ef5573f9730fc1449b403c9f", "0x58e8dcc13be9780fc42e8723d8ead4cf46943df2", + "0x5a7a51bfb49f190e5a6060a5bc6052ac14a3b59f", + "0x5cab7692d4e94096462119ab7bf57319726eed2a", + "0x5efda50f22d34f262c29268506c5fa42cb56a1ce", + "0x5f48c2a71b2cc96e3f0ccae4e39318ff0dc375b2", + "0x5f6c97c6ad7bdd0ae7e0dd4ca33a4ed3fdabd4d7", "0x610b717796ad172b316836ac95a2ffad065ceab4", + "0x653477c392c16b0765603074f157314cc4f40c32", "0x67d40ee1a85bf4a4bb7ffae16de985e8427b6b45", "0x6acdfba02d390b97ac2b2d42a63e85293bcc160e", + "0x6be0ae71e6c41f2f9d0d1a3b8d0f75e6f6a0b46e", + "0x6bf694a291df3fec1f7e69701e3ab6c592435ae7", "0x6f1ca141a28907f78ebaa64fb83a9088b02a8352", "0x722122df12d4e14e13ac3b6895a86e84145b6967", + "0x723b78e67497e85279cb204544566f4dc5d2aca0", "0x72a5843cc08275c8171e582972aa4fda8c397b2a", + "0x743494b60097a2230018079c02fe21a7b687eaa5", + "0x746aebc06d2ae31b71ac51429a19d54e797878e9", + "0x756c4628e57f7e7f8a459ec2752968360cf4d1aa", + "0x76d85b4c0fc497eecc38902397ac608000a06607", + "0x776198ccf446dfa168347089d7338879273172cf", + "0x77777feddddffc19ff86db637967013e6c6a116c", + "0x797d7ae72ebddcdea2a346c1834e04d1f8df102b", "0x7db418b5d567a4e0e8c59ad71be1fce48f3e6107", "0x7f19720a857f834887fc9a7bc0a0fbe7fc7f8102", "0x7f367cc41522ce07553e823bf3be79a889debe1b", + "0x8281aa6795ade17c8973e1aedca380258bc124f9", + "0x833481186f16cece3f1eeea1a694c42034c3a0db", + "0x84443cfd09a48af6ef360c6976c5392ac5023a1f", "0x8576acc5c05d6ce88f4e49bf65bdf0c62f91353c", "0x8589427373d6d84e98730d7795d8f6f8731fda16", + "0x88fd245fedec4a936e700f9173454d1931b4c307", "0x905b63fff465b9ffbf41dea908ceb12478ec7601", "0x910cbd523d972eb0a6f4cae4618ad62622b39dbf", + "0x931546d9e66836abf687d2bc64b30407bac8c568", "0x94a1b5cdb22c43faab4abeb5c74999895464ddaf", + "0x94be88213a387e992dd87de56950a9aef34b9448", + "0x94c92f096437ab9958fc0a37f09348f30389ae79", + "0x961c5be54a2ffc17cf4cb021d863c42dacd47fc1", + "0x97b1043abd9e6fc31681635166d430a458d14f9c", + "0x983a81ca6fb1e441266d2fbcb7d8e530ac2e05a2", "0x9ad122c22b14202b4490edaf288fdb3c7cb3ff5e", + "0x9c2bc757b66f24d60f016b6237f8cdd414a879fa", + "0x9d095b9c373207cbc8bec0a03ad789fdc9dec911", "0x9f4cda013e354b8fc285bf4b9a60460cee7f7ea9", "0xa0e1c89ef1a489c9c7de96311ed5ce5d32c20e4b", "0xa160cdab225685da1d56aa342ad8841c3b53f291", + "0xa5c2254e4253490c54cef0a4347fddb8f75a4998", "0xa60c772958a3ed56c1f15dd055ba37ac8e523a0d", "0xa7e5d5a720f06526557c513402f2e6b5fa20b008", "0xaeaac358560e11f52454d997aaff2c5731b6f8a6", + "0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", + "0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", + "0xb04e030140b30c27bcdfaafffa98c57d80eda7b4", "0xb1c8094b234dce6e03f10a5b673c1d8c69739a00", + "0xb20c66c4de72433f3ce747b58b86830c459ca911", "0xb541fc07bc7619fd4062a54d96268525cbc6ffef", + "0xb6f5ec1a0a9cd1526536d3f0426c429529471f40", "0xba214c1c1928a32bffe790263e38b4af9bfcd659", "0xbb93e510bbcd0b7beb5a853875f9ec60275cf498", "0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a", "0xca0840578f57fe71599d29375e16783424023357", + "0xcc84179ffd19a1627e79f8648d09e095252bc418", + "0xcee71753c9820f063b38fdbe4cfdaf1d3d928a80", "0xd21be7248e0197ee08e0c20d4a96debdac3d20af", + "0xd47438c816c9e7f2e2888e060936a499af9582b3", "0xd4b88df4d29f5cedd6857912842cff3b20c8cfa3", + "0xd5d6f8d9e784d0e26222ad3834500801a68d027d", "0xd691f27f38b395864ea86cfc7253969b409c362d", + "0xd692fd2d0b2fbd2e52cfa5b5b9424bc981c30696", + "0xd82ed8786d7c69dc7e052f7a542ab047971e73d2", "0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b", + "0xd8d7de3349ccaa0fde6298fe6d7b7d0d34586193", "0xd90e2f925da726b50c4ed8d0fb90ad053324f31b", "0xd96f2b1c14db8458374d9aca76e26c3d18364307", + "0xdcbeffbecce100cce9e4b153c4e15cb885643193", "0xdd4c48c0b24039969fc16d1cdf626eab821d3384", + "0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", + "0xdf3a408c53e5078af6e8fb2a85088d46ee09a61b", "0xe7aa314c77f4233c18c6cc84384a9247c0cf367b", + "0xed6e0a7e4ac94d976eebfb82ccf777a3c6bad921", + "0xedc5d01286f99a066559f60a585406f3878a033e", + "0xf4b067dd14e95bab89be928c07cb22e3c94e0daa", "0xf60dd140cff0706bae9cd734ac3ae76ad9ebc32a", "0xf67721a2d8f736e75a49fdd7fad2e31d8676542a", "0xf7b31119c2682c88d88d455dbb9d5932c65cf1be", "0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144", - "0x9d095b9c373207cbc8bec0a03ad789fdc9dec911", - "0x84443cfd09a48af6ef360c6976c5392ac5023a1f", - "0xd47438c816c9e7f2e2888e060936a499af9582b3", - "0x330bdfade01ee9bf63c209ee33102dd334618e0a", - "0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", - "0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", - "0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", - "0xa5c2254e4253490c54cef0a4347fddb8f75a4998", - "0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", - "0x6bf694a291df3fec1f7e69701e3ab6c592435ae7", - "0x3aac1cc67c2ec5db4ea850957b967ba153ad6279", - "0x723b78e67497e85279cb204544566f4dc5d2aca0", - "0x0e3a09dda6b20afbb34ac7cd4a6881493f3e7bf7", - "0x76d85b4c0fc497eecc38902397ac608000a06607", - "0xcc84179ffd19a1627e79f8648d09e095252bc418", - "0xd5d6f8d9e784d0e26222ad3834500801a68d027d", - "0x407cceeaa7c95d2fe2250bf9f2c105aa7aafb512", - "0x833481186f16cece3f1eeea1a694c42034c3a0db", - "0xd8d7de3349ccaa0fde6298fe6d7b7d0d34586193", - "0x8281aa6795ade17c8973e1aedca380258bc124f9", - "0x57b2b8c82f065de8ef5573f9730fc1449b403c9f", - "0x05e0b5b40b7b66098c2161a5ee11c5740a3a7c45", - "0x23173fe8b96a4ad8d2e17fb83ea5dcccdca1ae52", - "0x538ab61e8a9fc1b2f93b3dd9011d662d89be6fe6", - "0x94be88213a387e992dd87de56950a9aef34b9448", - "0x242654336ca2205714071898f67e254eb49acdce", - "0x776198ccf446dfa168347089d7338879273172cf", - "0xedc5d01286f99a066559f60a585406f3878a033e", - "0xd692fd2d0b2fbd2e52cfa5b5b9424bc981c30696", - "0xdf3a408c53e5078af6e8fb2a85088d46ee09a61b", - "0x743494b60097a2230018079c02fe21a7b687eaa5", - "0x94c92f096437ab9958fc0a37f09348f30389ae79", - "0x5efda50f22d34f262c29268506c5fa42cb56a1ce", - "0x2f50508a8a3d323b91336fa3ea6ae50e55f32185", - "0xcee71753c9820f063b38fdbe4cfdaf1d3d928a80", - "0xffbac21a641dcfe4552920138d90f3638b3c9fba", - "0x179f48c78f57a3a78f0608cc9197b8972921d1d2", - "0xb04e030140b30c27bcdfaafffa98c57d80eda7b4", - "0x77777feddddffc19ff86db637967013e6c6a116c", - "0x3efa30704d2b8bbac821307230376556cf8cc39e", - "0x746aebc06d2ae31b71ac51429a19d54e797878e9", - "0x5f6c97c6ad7bdd0ae7e0dd4ca33a4ed3fdabd4d7", - "0xf4b067dd14e95bab89be928c07cb22e3c94e0daa", - "0x01e2919679362dfbc9ee1644ba9c6da6d6245bb1", - "0x2fc93484614a34f26f7970cbb94615ba109bb4bf", - "0x26903a5a198d571422b2b4ea08b56a37cbd68c89", - "0xb20c66c4de72433f3ce747b58b86830c459ca911", - "0x2573bac39ebe2901b4389cd468f2872cf7767faf", - "0x653477c392c16b0765603074f157314cc4f40c32", - "0x88fd245fedec4a936e700f9173454d1931b4c307", - "0x09193888b3f38c82dedfda55259a82c0e7de875e", - "0x5cab7692d4e94096462119ab7bf57319726eed2a", - "0x756c4628e57f7e7f8a459ec2752968360cf4d1aa", - "0xd82ed8786d7c69dc7e052f7a542ab047971e73d2", - "0x39d908dac893cbcb53cc86e0ecc369aa4def1a29", - "0x4f47bc496083c727c5fbe3ce9cdf2b0f6496270c", - "0x38735f03b30fbc022ddd06abed01f0ca823c6a94", - "0x97b1043abd9e6fc31681635166d430a458d14f9c", - "0xb6f5ec1a0a9cd1526536d3f0426c429529471f40", - "0xdcbeffbecce100cce9e4b153c4e15cb885643193", - "0x5f48c2a71b2cc96e3f0ccae4e39318ff0dc375b2", - "0x5a7a51bfb49f190e5a6060a5bc6052ac14a3b59f", - "0xed6e0a7e4ac94d976eebfb82ccf777a3c6bad921", - "0x797d7ae72ebddcdea2a346c1834e04d1f8df102b", - "0x931546d9e66836abf687d2bc64b30407bac8c568", - "0x43fa21d92141ba9db43052492e0deee5aa5f0a93", - "0x6be0ae71e6c41f2f9d0d1a3b8d0f75e6f6a0b46e", - "0x9c2bc757b66f24d60f016b6237f8cdd414a879fa", - "0x530a64c0ce595026a4a556b703644228179e2d57", - "0x961c5be54a2ffc17cf4cb021d863c42dacd47fc1", - "0x983a81ca6fb1e441266d2fbcb7d8e530ac2e05a2" -] \ No newline at end of file + "0xffbac21a641dcfe4552920138d90f3638b3c9fba" +] From 1b73619bb252a8faa343f456c1241a82dd0f6516 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 14:08:20 +0200 Subject: [PATCH 02/11] refactor: prevent code duplication --- src/list.ts | 141 +------------------------------------------------- tsconfig.json | 8 +-- 2 files changed, 6 insertions(+), 143 deletions(-) diff --git a/src/list.ts b/src/list.ts index 7e44426..4d8eabe 100644 --- a/src/list.ts +++ b/src/list.ts @@ -1,140 +1 @@ -export const SANCTIONED_ADDRESSES = [ - "0x03893a7c7463ae47d46bc7f091665f1893656003", - "0x07687e702b410fa43f4cb4af7fa097918ffd2730", - "0x0836222f2b2b24a3f36f98668ed8f0b38d1a872f", - "0x08723392ed15743cc38513c4925f5e6be5c17243", - "0x098b716b8aaf21512996dc57eb0615e2383e2f96", - "0x0d5550d52428e7e3175bfc9550207e4ad3859b17", - "0x12d66f87a04a9e220743712ce6d9bb1b5616b8fc", - "0x1356c899d8c9467c7f71c195612f8a395abf2f0a", - "0x169ad27a470d064dede56a2d3ff727986b15d52b", - "0x178169b423a011fff22b9e3f3abea13414ddd0f1", - "0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff", - "0x1da5821544e25c636c1417ba96ade4cf6d2f9b5a", - "0x22aaa7720ddd5388a3c0a3333430953c68f1849b", - "0x23773e65ed146a459791799d01336db287f25334", - "0x2717c5e28cf931547b621a5dddb772ab6a35b701", - "0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535", - "0x308ed4b7b49797e1a98d3818bff6fe5385410370", - "0x35fb6f6db4fb05e6a4ce86f2c93691425626d4b1", - "0x3cbded43efdaf0fc77b9c55f6fc9988fcc9b757d", - "0x3cffd56b47b7b41c56258d9c7731abadc360e073", - "0x3e37627deaa754090fbfbb8bd226c1ce66d255e9", - "0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d", - "0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936", - "0x48549a34ae37b12f6a30566245176994e17c6b4a", - "0x527653ea119f3e6a1f5bd18fbf4714081d7b31ce", - "0x53b6936513e738f44fb50d2b9476730c0ab3bfc1", - "0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0", - "0x58e8dcc13be9780fc42e8723d8ead4cf46943df2", - "0x610b717796ad172b316836ac95a2ffad065ceab4", - "0x67d40ee1a85bf4a4bb7ffae16de985e8427b6b45", - "0x6acdfba02d390b97ac2b2d42a63e85293bcc160e", - "0x6f1ca141a28907f78ebaa64fb83a9088b02a8352", - "0x722122df12d4e14e13ac3b6895a86e84145b6967", - "0x72a5843cc08275c8171e582972aa4fda8c397b2a", - "0x7db418b5d567a4e0e8c59ad71be1fce48f3e6107", - "0x7f19720a857f834887fc9a7bc0a0fbe7fc7f8102", - "0x7f367cc41522ce07553e823bf3be79a889debe1b", - "0x8576acc5c05d6ce88f4e49bf65bdf0c62f91353c", - "0x8589427373d6d84e98730d7795d8f6f8731fda16", - "0x905b63fff465b9ffbf41dea908ceb12478ec7601", - "0x910cbd523d972eb0a6f4cae4618ad62622b39dbf", - "0x94a1b5cdb22c43faab4abeb5c74999895464ddaf", - "0x9ad122c22b14202b4490edaf288fdb3c7cb3ff5e", - "0x9f4cda013e354b8fc285bf4b9a60460cee7f7ea9", - "0xa0e1c89ef1a489c9c7de96311ed5ce5d32c20e4b", - "0xa160cdab225685da1d56aa342ad8841c3b53f291", - "0xa60c772958a3ed56c1f15dd055ba37ac8e523a0d", - "0xa7e5d5a720f06526557c513402f2e6b5fa20b008", - "0xaeaac358560e11f52454d997aaff2c5731b6f8a6", - "0xb1c8094b234dce6e03f10a5b673c1d8c69739a00", - "0xb541fc07bc7619fd4062a54d96268525cbc6ffef", - "0xba214c1c1928a32bffe790263e38b4af9bfcd659", - "0xbb93e510bbcd0b7beb5a853875f9ec60275cf498", - "0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a", - "0xca0840578f57fe71599d29375e16783424023357", - "0xd21be7248e0197ee08e0c20d4a96debdac3d20af", - "0xd4b88df4d29f5cedd6857912842cff3b20c8cfa3", - "0xd691f27f38b395864ea86cfc7253969b409c362d", - "0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b", - "0xd90e2f925da726b50c4ed8d0fb90ad053324f31b", - "0xd96f2b1c14db8458374d9aca76e26c3d18364307", - "0xdd4c48c0b24039969fc16d1cdf626eab821d3384", - "0xe7aa314c77f4233c18c6cc84384a9247c0cf367b", - "0xf60dd140cff0706bae9cd734ac3ae76ad9ebc32a", - "0xf67721a2d8f736e75a49fdd7fad2e31d8676542a", - "0xf7b31119c2682c88d88d455dbb9d5932c65cf1be", - "0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144", - "0x9d095b9c373207cbc8bec0a03ad789fdc9dec911", - "0x84443cfd09a48af6ef360c6976c5392ac5023a1f", - "0xd47438c816c9e7f2e2888e060936a499af9582b3", - "0x330bdfade01ee9bf63c209ee33102dd334618e0a", - "0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", - "0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", - "0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", - "0xa5c2254e4253490c54cef0a4347fddb8f75a4998", - "0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", - "0x6bf694a291df3fec1f7e69701e3ab6c592435ae7", - "0x3aac1cc67c2ec5db4ea850957b967ba153ad6279", - "0x723b78e67497e85279cb204544566f4dc5d2aca0", - "0x0e3a09dda6b20afbb34ac7cd4a6881493f3e7bf7", - "0x76d85b4c0fc497eecc38902397ac608000a06607", - "0xcc84179ffd19a1627e79f8648d09e095252bc418", - "0xd5d6f8d9e784d0e26222ad3834500801a68d027d", - "0x407cceeaa7c95d2fe2250bf9f2c105aa7aafb512", - "0x833481186f16cece3f1eeea1a694c42034c3a0db", - "0xd8d7de3349ccaa0fde6298fe6d7b7d0d34586193", - "0x8281aa6795ade17c8973e1aedca380258bc124f9", - "0x57b2b8c82f065de8ef5573f9730fc1449b403c9f", - "0x05e0b5b40b7b66098c2161a5ee11c5740a3a7c45", - "0x23173fe8b96a4ad8d2e17fb83ea5dcccdca1ae52", - "0x538ab61e8a9fc1b2f93b3dd9011d662d89be6fe6", - "0x94be88213a387e992dd87de56950a9aef34b9448", - "0x242654336ca2205714071898f67e254eb49acdce", - "0x776198ccf446dfa168347089d7338879273172cf", - "0xedc5d01286f99a066559f60a585406f3878a033e", - "0xd692fd2d0b2fbd2e52cfa5b5b9424bc981c30696", - "0xdf3a408c53e5078af6e8fb2a85088d46ee09a61b", - "0x743494b60097a2230018079c02fe21a7b687eaa5", - "0x94c92f096437ab9958fc0a37f09348f30389ae79", - "0x5efda50f22d34f262c29268506c5fa42cb56a1ce", - "0x2f50508a8a3d323b91336fa3ea6ae50e55f32185", - "0xcee71753c9820f063b38fdbe4cfdaf1d3d928a80", - "0xffbac21a641dcfe4552920138d90f3638b3c9fba", - "0x179f48c78f57a3a78f0608cc9197b8972921d1d2", - "0xb04e030140b30c27bcdfaafffa98c57d80eda7b4", - "0x77777feddddffc19ff86db637967013e6c6a116c", - "0x3efa30704d2b8bbac821307230376556cf8cc39e", - "0x746aebc06d2ae31b71ac51429a19d54e797878e9", - "0x5f6c97c6ad7bdd0ae7e0dd4ca33a4ed3fdabd4d7", - "0xf4b067dd14e95bab89be928c07cb22e3c94e0daa", - "0x01e2919679362dfbc9ee1644ba9c6da6d6245bb1", - "0x2fc93484614a34f26f7970cbb94615ba109bb4bf", - "0x26903a5a198d571422b2b4ea08b56a37cbd68c89", - "0xb20c66c4de72433f3ce747b58b86830c459ca911", - "0x2573bac39ebe2901b4389cd468f2872cf7767faf", - "0x653477c392c16b0765603074f157314cc4f40c32", - "0x88fd245fedec4a936e700f9173454d1931b4c307", - "0x09193888b3f38c82dedfda55259a82c0e7de875e", - "0x5cab7692d4e94096462119ab7bf57319726eed2a", - "0x756c4628e57f7e7f8a459ec2752968360cf4d1aa", - "0xd82ed8786d7c69dc7e052f7a542ab047971e73d2", - "0x39d908dac893cbcb53cc86e0ecc369aa4def1a29", - "0x4f47bc496083c727c5fbe3ce9cdf2b0f6496270c", - "0x38735f03b30fbc022ddd06abed01f0ca823c6a94", - "0x97b1043abd9e6fc31681635166d430a458d14f9c", - "0xb6f5ec1a0a9cd1526536d3f0426c429529471f40", - "0xdcbeffbecce100cce9e4b153c4e15cb885643193", - "0x5f48c2a71b2cc96e3f0ccae4e39318ff0dc375b2", - "0x5a7a51bfb49f190e5a6060a5bc6052ac14a3b59f", - "0xed6e0a7e4ac94d976eebfb82ccf777a3c6bad921", - "0x797d7ae72ebddcdea2a346c1834e04d1f8df102b", - "0x931546d9e66836abf687d2bc64b30407bac8c568", - "0x43fa21d92141ba9db43052492e0deee5aa5f0a93", - "0x6be0ae71e6c41f2f9d0d1a3b8d0f75e6f6a0b46e", - "0x9c2bc757b66f24d60f016b6237f8cdd414a879fa", - "0x530a64c0ce595026a4a556b703644228179e2d57", - "0x961c5be54a2ffc17cf4cb021d863c42dacd47fc1", - "0x983a81ca6fb1e441266d2fbcb7d8e530ac2e05a2" -]; +export { default as SANCTIONED_ADDRESSES } from "../ofac.sanctions.json"; diff --git a/tsconfig.json b/tsconfig.json index 16b145b..4db7daa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,9 @@ "target": "ES2019", "moduleResolution": "node", "sourceMap": true, - "outDir": "dist" + "outDir": "dist", + "resolveJsonModule": true }, - "lib": ["ES2019"] -} \ No newline at end of file + "lib": ["ES2019"], + "include": ["src"] +} From d358062b9a9c6913436d3bc7028850932753d96f Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 14:21:42 +0200 Subject: [PATCH 03/11] chore: add script fetching xss feed --- package-lock.json | 1291 +++++++++++++++++++++++++++++- package.json | 7 +- scripts/data/processed-urls.json | 1 + scripts/export-sanctions.ts | 32 + scripts/get-latest-sanctions.ts | 53 ++ 5 files changed, 1381 insertions(+), 3 deletions(-) create mode 100644 scripts/data/processed-urls.json create mode 100644 scripts/export-sanctions.ts create mode 100644 scripts/get-latest-sanctions.ts diff --git a/package-lock.json b/package-lock.json index 1d4a2b4..204794c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,593 @@ { "name": "compliance-sdk", - "version": "1.0.6", + "version": "1.0.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "compliance-sdk", - "version": "1.0.6", + "version": "1.0.11", "license": "ISC", "devDependencies": { + "@types/jsdom": "^21.1.4", + "jsdom": "^22.1.0", + "rss-parser": "^3.13.0", + "ts-node": "^10.9.1", "typescript": "^4.9.5" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/jsdom": { + "version": "21.1.4", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.4.tgz", + "integrity": "sha512-NzAMLEV0KQ4cBaDx3Ls8VfJUElyDUm1xrtYRmcMK0gF8L5xYbujFVaQlJ50yinQ/d47j2rEP1XUzkiYrw4YRFA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, + "node_modules/@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.25.1" + } + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.4.tgz", + "integrity": "sha512-95Sfz4nvMAb0Nl9DTxN3j64adfwfbBPEYq14VN7zT5J5O2M9V6iZMIIQU1U+pJyl9agHYHNCqhCXgyEtIRRa5A==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "dev": true, + "dependencies": { + "rrweb-cssom": "^0.6.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/data-urls": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "dev": true, + "dependencies": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "dev": true, + "dependencies": { + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "node_modules/jsdom": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", + "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "dev": true, + "dependencies": { + "abab": "^2.0.6", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", + "domexception": "^4.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.4", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "dev": true + }, + "node_modules/rss-parser": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/rss-parser/-/rss-parser-3.13.0.tgz", + "integrity": "sha512-7jWUBV5yGN3rqMMj7CZufl/291QAhvrrGpDNE4k/02ZchL0npisiYYqULF71jCEKoIiHvK/Q2e6IkDwPziT7+w==", + "dev": true, + "dependencies": { + "entities": "^2.0.3", + "xml2js": "^0.5.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "dev": true + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dev": true, + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -24,14 +600,725 @@ "engines": { "node": ">=4.2.0" } + }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, + "node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "dev": true, + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", + "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "dev": true, + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } }, "dependencies": { + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "@types/jsdom": { + "version": "21.1.4", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.4.tgz", + "integrity": "sha512-NzAMLEV0KQ4cBaDx3Ls8VfJUElyDUm1xrtYRmcMK0gF8L5xYbujFVaQlJ50yinQ/d47j2rEP1XUzkiYrw4YRFA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, + "@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dev": true, + "requires": { + "undici-types": "~5.25.1" + } + }, + "@types/tough-cookie": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.4.tgz", + "integrity": "sha512-95Sfz4nvMAb0Nl9DTxN3j64adfwfbBPEYq14VN7zT5J5O2M9V6iZMIIQU1U+pJyl9agHYHNCqhCXgyEtIRRa5A==", + "dev": true + }, + "abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "cssstyle": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "dev": true, + "requires": { + "rrweb-cssom": "^0.6.0" + } + }, + "data-urls": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "dev": true, + "requires": { + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "dev": true, + "requires": { + "webidl-conversions": "^7.0.0" + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dev": true, + "requires": { + "whatwg-encoding": "^2.0.0" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "jsdom": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", + "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "dev": true, + "requires": { + "abab": "^2.0.6", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", + "domexception": "^4.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.4", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", + "xml-name-validator": "^4.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, + "parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "requires": { + "entities": "^4.4.0" + }, + "dependencies": { + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true + } + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "dev": true + }, + "rss-parser": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/rss-parser/-/rss-parser-3.13.0.tgz", + "integrity": "sha512-7jWUBV5yGN3rqMMj7CZufl/291QAhvrrGpDNE4k/02ZchL0npisiYYqULF71jCEKoIiHvK/Q2e6IkDwPziT7+w==", + "dev": true, + "requires": { + "entities": "^2.0.3", + "xml2js": "^0.5.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "dev": true + }, + "saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dev": true, + "requires": { + "punycode": "^2.3.0" + } + }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, "typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true + }, + "undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "dev": true, + "requires": { + "xml-name-validator": "^4.0.0" + } + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true + }, + "whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dev": true, + "requires": { + "iconv-lite": "0.6.3" + } + }, + "whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true + }, + "whatwg-url": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", + "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "dev": true, + "requires": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + } + }, + "ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "dev": true, + "requires": {} + }, + "xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true + }, + "xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index d45dadc..60ce14e 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,16 @@ "description": "", "main": "src/index.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "update-ofac-list": "ts-node scripts/get-latest-sanctions.ts && ts-node scripts/export-sanctions.ts" }, "author": "", "license": "ISC", "devDependencies": { + "@types/jsdom": "^21.1.4", + "jsdom": "^22.1.0", + "rss-parser": "^3.13.0", + "ts-node": "^10.9.1", "typescript": "^4.9.5" } } diff --git a/scripts/data/processed-urls.json b/scripts/data/processed-urls.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/scripts/data/processed-urls.json @@ -0,0 +1 @@ +{} diff --git a/scripts/export-sanctions.ts b/scripts/export-sanctions.ts new file mode 100644 index 0000000..eb150fd --- /dev/null +++ b/scripts/export-sanctions.ts @@ -0,0 +1,32 @@ +import { writeFile, readFile } from "fs/promises"; +import { join } from "path"; + +const DATA_PATH = join(__dirname, "data", "processed-urls.json"); +const EXPORT_PATH = join(__dirname, "..", "ofac.sanctions.json"); + +(async function main() { + const processedURLs: Record = JSON.parse( + (await readFile(DATA_PATH)).toString() + ); + const existingAddresses: string[] = JSON.parse( + (await readFile(EXPORT_PATH)).toString() + ); + + const processedAddresses = Object.values(processedURLs).flat(); + + const mergedList = [ + ...new Set(processedAddresses.concat(existingAddresses)), + ].sort(); + + const diff = mergedList.length - existingAddresses.length; + if (diff > 0) { + console.info("Updated ofac.sanctions.json with", diff, "new addresses"); + + // NOTE: keep 2 indent for ease of diffing + await writeFile(EXPORT_PATH, JSON.stringify(mergedList, null, 2) + "\n"); + } else { + console.info( + "No new addresses were found, ofac.sanctions.json wasn't updated" + ); + } +})(); diff --git a/scripts/get-latest-sanctions.ts b/scripts/get-latest-sanctions.ts new file mode 100644 index 0000000..86100ae --- /dev/null +++ b/scripts/get-latest-sanctions.ts @@ -0,0 +1,53 @@ +import { writeFile, readFile } from "fs/promises"; +import { join } from "path"; + +import Parser from "rss-parser"; +import { JSDOM } from "jsdom"; + +const DATA_PATH = join(__dirname, "data/processed-urls.json"); +const OFAC_RSS_URL = "https://ofac.treasury.gov/system/files/126/ofac.xml"; +const parser = new Parser(); + +(async function main() { + const feed = await parser.parseURL(OFAC_RSS_URL); + + const processedURLs: Record = JSON.parse( + (await readFile(DATA_PATH)).toString() + ); + + for (let { link } of feed.items) { + if (!link) continue; + if (link in processedURLs) continue; + + try { + const body = await fetch(link).then((x) => x.text()); + const dom = new JSDOM(body); + const text = + dom.window.document.getElementById("block-ofac-content")?.textContent; + if (!text) throw new Error("Couldn't find the right div"); + + const RE = /ETH (0x[a-fA-F0-9]{40})/g; + const matches = text.matchAll(RE); + if (!matches) { + console.info("No ETH addresses were found"); + processedURLs[link] = []; + } else { + processedURLs[link] = [...matches].map(([, address]) => + address.toLowerCase() + ); + } + } catch (e) { + console.error(e); + } finally { + console.info( + "Processed", + link, + "Found", + processedURLs[link].length, + "addresses" + ); + } + } + + await writeFile(DATA_PATH, JSON.stringify(processedURLs, null, 2) + "\n"); +})(); From 54bda5bbbe7df4fb03d86e44efc628f3c6dbded2 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 14:22:07 +0200 Subject: [PATCH 04/11] ci: add github action that runs the xss commands --- .github/workflows/cron.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cron.yml diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..08ee646 --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,26 @@ +name: Update OFAC list + +on: + workflow_dispatch + schedule: + # daily + - cron: '0 9 * * *' + +jobs: + update-ofac-list: + runs-on: ubuntu-latest + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + + - run: npm install + + - run: npm run update-ofac-list + + # Commit all changed files back to the repository + - uses: stefanzweifel/git-auto-commit-action@v5 From 76383ad85f368d614f9efdd38ba3fde6139bf541 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 14:59:40 +0200 Subject: [PATCH 05/11] refactor: add back the code duplication for better types --- src/list.ts | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/src/list.ts b/src/list.ts index 4d8eabe..9210a6b 100644 --- a/src/list.ts +++ b/src/list.ts @@ -1 +1,140 @@ -export { default as SANCTIONED_ADDRESSES } from "../ofac.sanctions.json"; +export const SANCTIONED_ADDRESSES = [ + "0x01e2919679362dfbc9ee1644ba9c6da6d6245bb1", + "0x03893a7c7463ae47d46bc7f091665f1893656003", + "0x05e0b5b40b7b66098c2161a5ee11c5740a3a7c45", + "0x07687e702b410fa43f4cb4af7fa097918ffd2730", + "0x0836222f2b2b24a3f36f98668ed8f0b38d1a872f", + "0x08723392ed15743cc38513c4925f5e6be5c17243", + "0x09193888b3f38c82dedfda55259a82c0e7de875e", + "0x098b716b8aaf21512996dc57eb0615e2383e2f96", + "0x0d5550d52428e7e3175bfc9550207e4ad3859b17", + "0x0e3a09dda6b20afbb34ac7cd4a6881493f3e7bf7", + "0x12d66f87a04a9e220743712ce6d9bb1b5616b8fc", + "0x1356c899d8c9467c7f71c195612f8a395abf2f0a", + "0x169ad27a470d064dede56a2d3ff727986b15d52b", + "0x178169b423a011fff22b9e3f3abea13414ddd0f1", + "0x179f48c78f57a3a78f0608cc9197b8972921d1d2", + "0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff", + "0x1da5821544e25c636c1417ba96ade4cf6d2f9b5a", + "0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", + "0x22aaa7720ddd5388a3c0a3333430953c68f1849b", + "0x23173fe8b96a4ad8d2e17fb83ea5dcccdca1ae52", + "0x23773e65ed146a459791799d01336db287f25334", + "0x242654336ca2205714071898f67e254eb49acdce", + "0x2573bac39ebe2901b4389cd468f2872cf7767faf", + "0x26903a5a198d571422b2b4ea08b56a37cbd68c89", + "0x2717c5e28cf931547b621a5dddb772ab6a35b701", + "0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535", + "0x2f50508a8a3d323b91336fa3ea6ae50e55f32185", + "0x2fc93484614a34f26f7970cbb94615ba109bb4bf", + "0x308ed4b7b49797e1a98d3818bff6fe5385410370", + "0x330bdfade01ee9bf63c209ee33102dd334618e0a", + "0x35fb6f6db4fb05e6a4ce86f2c93691425626d4b1", + "0x38735f03b30fbc022ddd06abed01f0ca823c6a94", + "0x39d908dac893cbcb53cc86e0ecc369aa4def1a29", + "0x3aac1cc67c2ec5db4ea850957b967ba153ad6279", + "0x3cbded43efdaf0fc77b9c55f6fc9988fcc9b757d", + "0x3cffd56b47b7b41c56258d9c7731abadc360e073", + "0x3e37627deaa754090fbfbb8bd226c1ce66d255e9", + "0x3efa30704d2b8bbac821307230376556cf8cc39e", + "0x407cceeaa7c95d2fe2250bf9f2c105aa7aafb512", + "0x43fa21d92141ba9db43052492e0deee5aa5f0a93", + "0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d", + "0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936", + "0x48549a34ae37b12f6a30566245176994e17c6b4a", + "0x4f47bc496083c727c5fbe3ce9cdf2b0f6496270c", + "0x527653ea119f3e6a1f5bd18fbf4714081d7b31ce", + "0x530a64c0ce595026a4a556b703644228179e2d57", + "0x538ab61e8a9fc1b2f93b3dd9011d662d89be6fe6", + "0x53b6936513e738f44fb50d2b9476730c0ab3bfc1", + "0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0", + "0x57b2b8c82f065de8ef5573f9730fc1449b403c9f", + "0x58e8dcc13be9780fc42e8723d8ead4cf46943df2", + "0x5a7a51bfb49f190e5a6060a5bc6052ac14a3b59f", + "0x5cab7692d4e94096462119ab7bf57319726eed2a", + "0x5efda50f22d34f262c29268506c5fa42cb56a1ce", + "0x5f48c2a71b2cc96e3f0ccae4e39318ff0dc375b2", + "0x5f6c97c6ad7bdd0ae7e0dd4ca33a4ed3fdabd4d7", + "0x610b717796ad172b316836ac95a2ffad065ceab4", + "0x653477c392c16b0765603074f157314cc4f40c32", + "0x67d40ee1a85bf4a4bb7ffae16de985e8427b6b45", + "0x6acdfba02d390b97ac2b2d42a63e85293bcc160e", + "0x6be0ae71e6c41f2f9d0d1a3b8d0f75e6f6a0b46e", + "0x6bf694a291df3fec1f7e69701e3ab6c592435ae7", + "0x6f1ca141a28907f78ebaa64fb83a9088b02a8352", + "0x722122df12d4e14e13ac3b6895a86e84145b6967", + "0x723b78e67497e85279cb204544566f4dc5d2aca0", + "0x72a5843cc08275c8171e582972aa4fda8c397b2a", + "0x743494b60097a2230018079c02fe21a7b687eaa5", + "0x746aebc06d2ae31b71ac51429a19d54e797878e9", + "0x756c4628e57f7e7f8a459ec2752968360cf4d1aa", + "0x76d85b4c0fc497eecc38902397ac608000a06607", + "0x776198ccf446dfa168347089d7338879273172cf", + "0x77777feddddffc19ff86db637967013e6c6a116c", + "0x797d7ae72ebddcdea2a346c1834e04d1f8df102b", + "0x7db418b5d567a4e0e8c59ad71be1fce48f3e6107", + "0x7f19720a857f834887fc9a7bc0a0fbe7fc7f8102", + "0x7f367cc41522ce07553e823bf3be79a889debe1b", + "0x8281aa6795ade17c8973e1aedca380258bc124f9", + "0x833481186f16cece3f1eeea1a694c42034c3a0db", + "0x84443cfd09a48af6ef360c6976c5392ac5023a1f", + "0x8576acc5c05d6ce88f4e49bf65bdf0c62f91353c", + "0x8589427373d6d84e98730d7795d8f6f8731fda16", + "0x88fd245fedec4a936e700f9173454d1931b4c307", + "0x905b63fff465b9ffbf41dea908ceb12478ec7601", + "0x910cbd523d972eb0a6f4cae4618ad62622b39dbf", + "0x931546d9e66836abf687d2bc64b30407bac8c568", + "0x94a1b5cdb22c43faab4abeb5c74999895464ddaf", + "0x94be88213a387e992dd87de56950a9aef34b9448", + "0x94c92f096437ab9958fc0a37f09348f30389ae79", + "0x961c5be54a2ffc17cf4cb021d863c42dacd47fc1", + "0x97b1043abd9e6fc31681635166d430a458d14f9c", + "0x983a81ca6fb1e441266d2fbcb7d8e530ac2e05a2", + "0x9ad122c22b14202b4490edaf288fdb3c7cb3ff5e", + "0x9c2bc757b66f24d60f016b6237f8cdd414a879fa", + "0x9d095b9c373207cbc8bec0a03ad789fdc9dec911", + "0x9f4cda013e354b8fc285bf4b9a60460cee7f7ea9", + "0xa0e1c89ef1a489c9c7de96311ed5ce5d32c20e4b", + "0xa160cdab225685da1d56aa342ad8841c3b53f291", + "0xa5c2254e4253490c54cef0a4347fddb8f75a4998", + "0xa60c772958a3ed56c1f15dd055ba37ac8e523a0d", + "0xa7e5d5a720f06526557c513402f2e6b5fa20b008", + "0xaeaac358560e11f52454d997aaff2c5731b6f8a6", + "0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", + "0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", + "0xb04e030140b30c27bcdfaafffa98c57d80eda7b4", + "0xb1c8094b234dce6e03f10a5b673c1d8c69739a00", + "0xb20c66c4de72433f3ce747b58b86830c459ca911", + "0xb541fc07bc7619fd4062a54d96268525cbc6ffef", + "0xb6f5ec1a0a9cd1526536d3f0426c429529471f40", + "0xba214c1c1928a32bffe790263e38b4af9bfcd659", + "0xbb93e510bbcd0b7beb5a853875f9ec60275cf498", + "0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a", + "0xca0840578f57fe71599d29375e16783424023357", + "0xcc84179ffd19a1627e79f8648d09e095252bc418", + "0xcee71753c9820f063b38fdbe4cfdaf1d3d928a80", + "0xd21be7248e0197ee08e0c20d4a96debdac3d20af", + "0xd47438c816c9e7f2e2888e060936a499af9582b3", + "0xd4b88df4d29f5cedd6857912842cff3b20c8cfa3", + "0xd5d6f8d9e784d0e26222ad3834500801a68d027d", + "0xd691f27f38b395864ea86cfc7253969b409c362d", + "0xd692fd2d0b2fbd2e52cfa5b5b9424bc981c30696", + "0xd82ed8786d7c69dc7e052f7a542ab047971e73d2", + "0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b", + "0xd8d7de3349ccaa0fde6298fe6d7b7d0d34586193", + "0xd90e2f925da726b50c4ed8d0fb90ad053324f31b", + "0xd96f2b1c14db8458374d9aca76e26c3d18364307", + "0xdcbeffbecce100cce9e4b153c4e15cb885643193", + "0xdd4c48c0b24039969fc16d1cdf626eab821d3384", + "0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", + "0xdf3a408c53e5078af6e8fb2a85088d46ee09a61b", + "0xe7aa314c77f4233c18c6cc84384a9247c0cf367b", + "0xed6e0a7e4ac94d976eebfb82ccf777a3c6bad921", + "0xedc5d01286f99a066559f60a585406f3878a033e", + "0xf4b067dd14e95bab89be928c07cb22e3c94e0daa", + "0xf60dd140cff0706bae9cd734ac3ae76ad9ebc32a", + "0xf67721a2d8f736e75a49fdd7fad2e31d8676542a", + "0xf7b31119c2682c88d88d455dbb9d5932c65cf1be", + "0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144", + "0xffbac21a641dcfe4552920138d90f3638b3c9fba", +] as const; From 6ae5a9248b36e657947e0ef78a7e64ca1d79f4d6 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 15:00:43 +0200 Subject: [PATCH 06/11] ci: automated npm publication --- .github/workflows/cron.yml | 20 +++++++++++++------- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + package.json | 15 +++++++++++++-- tsconfig.json | 3 +-- 5 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 .gitignore diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 08ee646..11a8382 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,26 +1,32 @@ name: Update OFAC list on: - workflow_dispatch + workflow_dispatch: schedule: - # daily - - cron: '0 9 * * *' + # Daily at 9AM + - cron: "0 9 * * *" jobs: update-ofac-list: runs-on: ubuntu-latest permissions: - # Give the default GITHUB_TOKEN write permission to commit and push the - # added or changed files to the repository. contents: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: "20.x" - run: npm install - - run: npm run update-ofac-list + - name: Check if new addresses were added via the OFAC xss feed + run: npm run update-ofac-list - # Commit all changed files back to the repository - uses: stefanzweifel/git-auto-commit-action@v5 + commit_message: "auto: Add new OFAC addresses" + + - name: "Run if changes have been detected" + if: steps.auto-commit-action.outputs.changes_detected == 'true' + uses: celo-org/compliance/.github/worklows/publish.yml@main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c401c07 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish Package to npmjs +on: + workflow_call: +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: "20.x" + + - run: npm install + + - name: Compile typescript library + run: npm run build + + - name: Bump version + id: bump_version + run: NPM_VERSION=$(npm version patch --no-git-tag-version) >> $GITHUB_OUTPUT + + - name: Publish + run: npm publish + env: + # TODO: get the secret + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - uses: stefanzweifel/git-auto-commit-action@v5 + commit_message: "auto: publish ${{ steps.bump_version.outputs.NPM_VERSION }}" + tagging_message: ${{ steps.bump_version.outputs.NPM_VERSION }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a65b417 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lib diff --git a/package.json b/package.json index 60ce14e..09cc6bd 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,21 @@ "name": "compliance-sdk", "version": "1.0.11", "description": "", - "main": "src/index.ts", + "main": "./lib/cjs/index.js", + "module": "./lib/esm/index.js", + "types": "./lib/index.d.ts", + "files": [ + "lib", + "ofac.sanctions.json" + ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "update-ofac-list": "ts-node scripts/get-latest-sanctions.ts && ts-node scripts/export-sanctions.ts" + "clean": "rm -rf ./lib", + "build:esm": "tsc --module esnext --outDir ./lib/esm", + "build:cjs": "tsc --module commonjs --outDir ./lib/cjs", + "build:types": "tsc --declaration --emitDeclarationOnly --outFile ./lib/index.d.ts", + "build": "npm run clean && npm run build:esm && npm run build:cjs && npm run build:types", + "xss": "ts-node scripts/get-latest-sanctions.ts && ts-node scripts/export-sanctions.ts" }, "author": "", "license": "ISC", diff --git a/tsconfig.json b/tsconfig.json index 4db7daa..02ac39e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,8 +5,7 @@ "target": "ES2019", "moduleResolution": "node", "sourceMap": true, - "outDir": "dist", - "resolveJsonModule": true + "outDir": "dist" }, "lib": ["ES2019"], "include": ["src"] From 9cbd2c4b20fa0e3947dd9ae1356af7fdd622d2dc Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 15:15:53 +0200 Subject: [PATCH 07/11] fix: update list.ts as well --- scripts/export-sanctions.ts | 10 ++++++++++ src/list.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/export-sanctions.ts b/scripts/export-sanctions.ts index eb150fd..bc6fcaf 100644 --- a/scripts/export-sanctions.ts +++ b/scripts/export-sanctions.ts @@ -3,6 +3,7 @@ import { join } from "path"; const DATA_PATH = join(__dirname, "data", "processed-urls.json"); const EXPORT_PATH = join(__dirname, "..", "ofac.sanctions.json"); +const TYPESCRIPT_PATH = join(__dirname, "..", "src", "list.ts"); (async function main() { const processedURLs: Record = JSON.parse( @@ -24,6 +25,15 @@ const EXPORT_PATH = join(__dirname, "..", "ofac.sanctions.json"); // NOTE: keep 2 indent for ease of diffing await writeFile(EXPORT_PATH, JSON.stringify(mergedList, null, 2) + "\n"); + await writeFile( + TYPESCRIPT_PATH, + `export const SANCTIONED_ADDRESSES = ${JSON.stringify( + mergedList, + null, + 2 + )} as const; +` + ); } else { console.info( "No new addresses were found, ofac.sanctions.json wasn't updated" diff --git a/src/list.ts b/src/list.ts index 9210a6b..4f1102f 100644 --- a/src/list.ts +++ b/src/list.ts @@ -136,5 +136,5 @@ export const SANCTIONED_ADDRESSES = [ "0xf67721a2d8f736e75a49fdd7fad2e31d8676542a", "0xf7b31119c2682c88d88d455dbb9d5932c65cf1be", "0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144", - "0xffbac21a641dcfe4552920138d90f3638b3c9fba", + "0xffbac21a641dcfe4552920138d90f3638b3c9fba" ] as const; From de0d8bff86ff5353acdf8de65831840717c031f8 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 15:16:31 +0200 Subject: [PATCH 08/11] fix: only run publish if the sanctions.json was updated --- .github/workflows/cron.yml | 8 +++++++- .github/workflows/publish.yml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 11a8382..0eb361d 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -24,9 +24,15 @@ jobs: - name: Check if new addresses were added via the OFAC xss feed run: npm run update-ofac-list + - name: Sets a flag if the list was changed + id: diff_flag + run: | + git diff --exit-code ofac.sanctions.json + echo "GIT_EXIT_CODE=$?" >> $GITHUB_OUTPUT + - uses: stefanzweifel/git-auto-commit-action@v5 commit_message: "auto: Add new OFAC addresses" - name: "Run if changes have been detected" - if: steps.auto-commit-action.outputs.changes_detected == 'true' + if: ${{ steps.bump_version.diff_flag.GIT_EXIT_CODE == 1 }} uses: celo-org/compliance/.github/worklows/publish.yml@main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c401c07..9b09626 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Bump version id: bump_version - run: NPM_VERSION=$(npm version patch --no-git-tag-version) >> $GITHUB_OUTPUT + run: echo "NPM_VERSION=$(npm version patch --no-git-tag-version)" >> $GITHUB_OUTPUT - name: Publish run: npm publish From 16edbe1b47822b21eaa6ceb92ea970d9609c225e Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 15:39:23 +0200 Subject: [PATCH 09/11] fix: PR feedback --- scripts/get-latest-sanctions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/get-latest-sanctions.ts b/scripts/get-latest-sanctions.ts index 86100ae..aca9624 100644 --- a/scripts/get-latest-sanctions.ts +++ b/scripts/get-latest-sanctions.ts @@ -26,15 +26,15 @@ const parser = new Parser(); dom.window.document.getElementById("block-ofac-content")?.textContent; if (!text) throw new Error("Couldn't find the right div"); - const RE = /ETH (0x[a-fA-F0-9]{40})/g; + const RE = /(0x[a-fA-F0-9]{40})/g; const matches = text.matchAll(RE); if (!matches) { console.info("No ETH addresses were found"); processedURLs[link] = []; } else { - processedURLs[link] = [...matches].map(([, address]) => - address.toLowerCase() - ); + processedURLs[link] = [ + ...new Set([...matches].map(([, address]) => address.toLowerCase())), + ]; } } catch (e) { console.error(e); From 774f53614f7e4d769d7298e27e8dd8b527601fa4 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 17:26:15 +0200 Subject: [PATCH 10/11] chore: add akeyless to get the npm token --- .github/workflows/publish.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9b09626..fa463d1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,11 +23,19 @@ jobs: id: bump_version run: echo "NPM_VERSION=$(npm version patch --no-git-tag-version)" >> $GITHUB_OUTPUT + - name: Akeyless Get Secrets + id: get_auth_token + uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest + with: + api-url: https://api.gateway.akeyless.celo-networks-dev.org + # this access-id needs to change whenever devops gives em + access-id: p-kf9vjzruht6l + static-secrets: '{"/static-secrets/apps-tooling-circle/npm-publish-token":"NPM_TOKEN"}' + - name: Publish run: npm publish env: - # TODO: get the secret - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} - uses: stefanzweifel/git-auto-commit-action@v5 commit_message: "auto: publish ${{ steps.bump_version.outputs.NPM_VERSION }}" From 3520765cfa51af38dae6949c9afb795ca5da0fb9 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 17:28:00 +0200 Subject: [PATCH 11/11] chore: add repository to package.json --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 09cc6bd..e8f31e4 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,10 @@ "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", "types": "./lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/celo-org/compliance" + }, "files": [ "lib", "ofac.sanctions.json"