mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-17 13:17:07 +02:00
Compare commits
778 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2383e8468f | |||
| a79d485b6a | |||
| 7eb931d689 | |||
| 995cd2aa7b | |||
| 1ce50e0c1b | |||
| bce3d26a1a | |||
| d9680ad0fa | |||
| e2e026e1ff | |||
| 16739d9a37 | |||
| 524a4f2275 | |||
| ba66883dc2 | |||
| 2caa735a2e | |||
| 90637fda6b | |||
| 2cef46b46a | |||
| 14b3abf76c | |||
| 8cd3961f87 | |||
| 5eb2e2b5a2 | |||
| 5dd897e042 | |||
| 9c77ec296d | |||
| 696e72323b | |||
| 3e8c01f436 | |||
| 80fc4dec09 | |||
| 671885fc8c | |||
| 002b61f0d7 | |||
| d32b462bd9 | |||
| 5c8b47288a | |||
| 8e662e6feb | |||
| 83aaeb94f6 | |||
| 8606940dee | |||
| 60e469a1c9 | |||
| 57d548743f | |||
| dab7ee2492 | |||
| 9360fd7e43 | |||
| 7b4bc53c0f | |||
| 0f7969d10a | |||
| 6b373b5985 | |||
| c0068a1561 | |||
| fad5e03f8b | |||
| a22fc68764 | |||
| 59a442e8c0 | |||
| 35e8155ecf | |||
| 8b9a5cb5fb | |||
| 29f9825f04 | |||
| ad8a6beacf | |||
| 194ac78814 | |||
| 0542f1ebea | |||
| 8de917ea5e | |||
| 0b494bbfbf | |||
| 7e74f71c79 | |||
| bd7fd676a5 | |||
| cb1c6a4d8c | |||
| b640f0c357 | |||
| 967590c7ff | |||
| 321d6ec9d7 | |||
| 79b4fd7829 | |||
| 52eb4d338f | |||
| 4b8b48e92f | |||
| e3f45b58e5 | |||
| a5f1922446 | |||
| 22e7b15a63 | |||
| c6bb2a73f8 | |||
| bde961f95d | |||
| c4867b3f68 | |||
| 1c36e9a2f0 | |||
| 1c82d8a738 | |||
| a2df591102 | |||
| c950ee0fb8 | |||
| 0ce5a9fcce | |||
| bd1970a805 | |||
| 3aaa4b1050 | |||
| 31d2426846 | |||
| 25c4e4edaf | |||
| 1a5bf53b02 | |||
| e2d1b62044 | |||
| 6186104d11 | |||
| f1e97eaea4 | |||
| bb0e58bf8b | |||
| dc802fa055 | |||
| 3c8e19367f | |||
| a89887eab8 | |||
| 7d3f0ad549 | |||
| 5608db1334 | |||
| 10443b3c02 | |||
| 7d272f3cd6 | |||
| d60a62ab24 | |||
| 2b0f73b7c5 | |||
| 0915ea8585 | |||
| ed9a0b8ac7 | |||
| 7437f39ed3 | |||
| 27f80cd97b | |||
| 04cf688a9b | |||
| 178af308ce | |||
| d40732a910 | |||
| d8a579b7b3 | |||
| bf8ef40708 | |||
| 41060d5d43 | |||
| ab6cef064c | |||
| 829d10d7b9 | |||
| 57e1f641a7 | |||
| 7df965e74b | |||
| 0e1153fdfd | |||
| 9797bc1830 | |||
| 9d00eb98d2 | |||
| 88f6e882c6 | |||
| 230a773909 | |||
| e6da1afa82 | |||
| a70d9e57be | |||
| 8afe0c0755 | |||
| e47c2513a8 | |||
| 276bcfceeb | |||
| 6fd1b35a50 | |||
| bc33244549 | |||
| 33c982b288 | |||
| 98493a1167 | |||
| a8c10f9601 | |||
| 1051f84bbf | |||
| eea137e677 | |||
| 27cf4e925f | |||
| 6b239c4e3f | |||
| 4c7ee5ef80 | |||
| 3ddb79899e | |||
| b14595a3e2 | |||
| 82c94369ae | |||
| 7e77d2e9a8 | |||
| ce5ce76b21 | |||
| 27d6b30cf9 | |||
| 9285dd5d70 | |||
| 977234808e | |||
| e1ccd327f5 | |||
| a0e3e71a4b | |||
| 2d4037da37 | |||
| d21608bb82 | |||
| f16239de73 | |||
| d00f34c240 | |||
| fd77437f59 | |||
| f9cd8d24a1 | |||
| c0a9f79834 | |||
| ca63c101a1 | |||
| dbd0b46ef2 | |||
| 89793ebe2f | |||
| e1ffc387ea | |||
| 1efd0852ef | |||
| 59d532ed4d | |||
| f034cda7cd | |||
| 5c1cf1e57d | |||
| 780960f5de | |||
| aada95e9da | |||
| 89b5003cce | |||
| 3559333461 | |||
| fbb6cab567 | |||
| 30fca29c6d | |||
| ec1e521b39 | |||
| a8998cd696 | |||
| df178baed6 | |||
| e2f75371e6 | |||
| 9f25ab39c6 | |||
| 937df6a024 | |||
| 7deb7182a8 | |||
| 82b14c56be | |||
| 58b98734c9 | |||
| c2f58f328c | |||
| 36eabe7528 | |||
| 8347093e8b | |||
| 75282cb43a | |||
| 3a253a758d | |||
| f2955c26c1 | |||
| e6c0317b37 | |||
| 0cfb218b07 | |||
| 8ef103fbde | |||
| ec5cdfb025 | |||
| 7f4d082c17 | |||
| e10011ef34 | |||
| 1eb6999c37 | |||
| 35596916bf | |||
| d61b22dd87 | |||
| 5565a9db9a | |||
| b803655306 | |||
| 20df2bf13a | |||
| e8fab85ce5 | |||
| ce730f3dbe | |||
| 2328973de5 | |||
| 37dea50c91 | |||
| 40dfc8b30a | |||
| 72971bb9ec | |||
| f835599502 | |||
| 0caa4f8099 | |||
| 71d3c9acd1 | |||
| 239ffa174a | |||
| eae79ab14b | |||
| ef7912615a | |||
| 7f20b67380 | |||
| 504337c178 | |||
| d6b4f06ac8 | |||
| 28cbf5474d | |||
| d797b84d4e | |||
| 720745857d | |||
| a74ea1aeda | |||
| 643f5e7f26 | |||
| a208b934e4 | |||
| 5892774082 | |||
| 13bfc1c3bd | |||
| 00289734c7 | |||
| 09c7c2cb91 | |||
| bbe62abd20 | |||
| cae9a4fd36 | |||
| e7ee4a8867 | |||
| b020574c88 | |||
| 192e1da5b6 | |||
| 0640079e59 | |||
| a9d99aa17f | |||
| b4667e1f88 | |||
| 7bc26fd448 | |||
| 94a9a5d5d5 | |||
| bcfa2c411f | |||
| 1e3d43dbae | |||
| c6b5e4d5df | |||
| 1293870e11 | |||
| 8309c19167 | |||
| 63a381c55a | |||
| d891f891b7 | |||
| 0b12a6b318 | |||
| 0144ab05a0 | |||
| 1f71d4372f | |||
| 5ed1ea07ef | |||
| 4d2b101278 | |||
| 1dfdadde98 | |||
| d19729869e | |||
| 5f782ad109 | |||
| 27dbdc9b5a | |||
| 4892863dd7 | |||
| dc077209cc | |||
| d8d5344d21 | |||
| d148a8384d | |||
| 6884e9428b | |||
| 25ebccfcd7 | |||
| 7adb0cbb50 | |||
| 50866abda4 | |||
| c83d904cf0 | |||
| 160447f8f6 | |||
| 184b13cc2a | |||
| 8fa965e055 | |||
| 1dd0b69079 | |||
| be8dd107e3 | |||
| 8f139f10ef | |||
| 8b0823984b | |||
| d82d2229d4 | |||
| 4be1bc17f3 | |||
| e6af0c6009 | |||
| e5d10bd72b | |||
| 9426885bb8 | |||
| 89e5d4f235 | |||
| eecb3fbc7f | |||
| 244f1319b4 | |||
| 6a2b76e760 | |||
| bc0278fce9 | |||
| 959841fb22 | |||
| fbc878dbe5 | |||
| 7d183c6580 | |||
| 0555420ad9 | |||
| ae25561c7e | |||
| 92e2b2b8f9 | |||
| 2a4a830fb7 | |||
| 0ad4c7cd7e | |||
| 41413d52ad | |||
| eabc1bd305 | |||
| 9c312e12c1 | |||
| 18ea9dda3d | |||
| 56d4212f68 | |||
| d932c19513 | |||
| b800f00b7e | |||
| e43af5234f | |||
| aa59d96e55 | |||
| 5be04ceea6 | |||
| da3392ac53 | |||
| a2c9c98b21 | |||
| 8298d6e031 | |||
| d6331022ad | |||
| 5e75d8c9a7 | |||
| 51944a212a | |||
| 49ed756479 | |||
| 1d207d5fbd | |||
| 6b1d15415d | |||
| df3bfaaab7 | |||
| ad0b8a8e7d | |||
| d5459229b9 | |||
| adbf596f0b | |||
| c740966394 | |||
| 7adab73af3 | |||
| c964f255d8 | |||
| a7ffed9716 | |||
| 488d66d248 | |||
| 93cb469cb8 | |||
| 03a2fc8ee5 | |||
| 2d72e5792e | |||
| 9bf9a87f12 | |||
| e2fca399e0 | |||
| e13fdddf98 | |||
| 890eea299d | |||
| 9beac00981 | |||
| 1a64d7d9e6 | |||
| bd5ae12f2e | |||
| dbaf1da3ce | |||
| a03c5df440 | |||
| 0776f6a2be | |||
| ac9d050d9e | |||
| b885c358a3 | |||
| 84d447973e | |||
| 019ec4de20 | |||
| 26189067cd | |||
| caf39071af | |||
| 08a1223482 | |||
| 24bd90745e | |||
| 7a72920e66 | |||
| 81a8276e2b | |||
| 8fb6f51555 | |||
| b0026aff66 | |||
| 3ced7f7c18 | |||
| 33f6995193 | |||
| 8af526682a | |||
| d0d4324957 | |||
| 2bcd0e0bbe | |||
| 1b99c7e10f | |||
| 2831bb61b8 | |||
| 320670de2a | |||
| 1f39a36f26 | |||
| 1f84ba716e | |||
| d034965d9c | |||
| 5eb30489e5 | |||
| 05458a0753 | |||
| 7975ef0699 | |||
| 5f810a1b4c | |||
| c4093e79cf | |||
| 956f8ed2ea | |||
| 7b32f76a1e | |||
| 0dd11bc051 | |||
| aa38df28af | |||
| 32962a6336 | |||
| b268b72a4a | |||
| eb0c90311b | |||
| 1070bf8e8f | |||
| 9bdb01987c | |||
| 3130fb948a | |||
| e46de9eebd | |||
| 4360355c8c | |||
| 3baaddba0b | |||
| e77c1c2a46 | |||
| 38422d59fd | |||
| c884cedfc2 | |||
| 91074a35d8 | |||
| 9a02b63a6b | |||
| 4470409a24 | |||
| 8a978420be | |||
| dfc01d51ca | |||
| 758154fa14 | |||
| ef23a85577 | |||
| e4533088ed | |||
| 4ffce4a534 | |||
| 6b77a62934 | |||
| f603867040 | |||
| b6eb7418aa | |||
| 39c97681cf | |||
| 2d0f0d8f6b | |||
| 209a767c91 | |||
| 71f2a724cb | |||
| 4b89b95738 | |||
| b535722acd | |||
| a9806a06a2 | |||
| 948e19b82f | |||
| cd841fa13a | |||
| 3ffcf91abd | |||
| 9fd84a3bfc | |||
| 627c451cd1 | |||
| e6ee89464a | |||
| 136e9f2738 | |||
| d97986e526 | |||
| 7661aa9819 | |||
| b7596f3f78 | |||
| 4e2231674c | |||
| d36d023a5c | |||
| 3d5a7ebe3d | |||
| 819384e952 | |||
| 2f34c5e821 | |||
| 0c89c154ee | |||
| 060dce7440 | |||
| 91707529bd | |||
| 22f182a8eb | |||
| 6ccc42dc3f | |||
| 655f5a8eed | |||
| cd06a72d6f | |||
| 0a5d71ecc2 | |||
| 9c214b619c | |||
| 6fddb727be | |||
| b5d3b9a803 | |||
| a74c8a94db | |||
| abc6d0ff1e | |||
| afdbcd0a38 | |||
| c31ae805a6 | |||
| 7c1afd7fe5 | |||
| ad470a3fd2 | |||
| 7755d06bba | |||
| 5aed4b79be | |||
| f0e3f29606 | |||
| abbcc525bf | |||
| ef8ade45b1 | |||
| 8919d598c2 | |||
| e21e42f5fe | |||
| 658aed8a29 | |||
| a666f7d216 | |||
| 62429df469 | |||
| 7aed699c3f | |||
| a14db0ab74 | |||
| 7b67770dc7 | |||
| 7766d8439b | |||
| fac0683a71 | |||
| 79e04967f5 | |||
| 47eb8947f5 | |||
| 959c55315c | |||
| b392f0c00f | |||
| c8e674d015 | |||
| 90fbb81e1d | |||
| 21e58ca644 | |||
| cfb0aa55ea | |||
| 9e0c021481 | |||
| 4acca8dd06 | |||
| 88eea09428 | |||
| 90d2743267 | |||
| 89945532a0 | |||
| 671860e053 | |||
| a87ca6af47 | |||
| b59ea4991c | |||
| b6fd59219f | |||
| 38ce7650c1 | |||
| 2b21e28096 | |||
| 3206651248 | |||
| ba8aa0e218 | |||
| 975a001635 | |||
| 30e7f7ccfe | |||
| cca8d97d63 | |||
| 455e6c3520 | |||
| d05ee3ec16 | |||
| b1b5d08e89 | |||
| 6202e59daa | |||
| c4a8603b81 | |||
| 5d15d1565c | |||
| 045ff558f8 | |||
| 504ed583cc | |||
| 15087f2d5a | |||
| eb1cd1c14b | |||
| 0918d86654 | |||
| d0e2220df7 | |||
| ccb04f0b45 | |||
| 54b6e1c7c3 | |||
| 7c8acdc956 | |||
| 3973ae15be | |||
| 86dadf4f5e | |||
| dc4cb4be74 | |||
| 2a29c4b551 | |||
| 2f64f45aba | |||
| 2f998ddfb6 | |||
| 93369a779d | |||
| 74e28123a8 | |||
| fef7db8710 | |||
| cb5d7626ac | |||
| e74f9f33c0 | |||
| 0d27c17e28 | |||
| f0b6d32639 | |||
| 9ebd506056 | |||
| a5a91d2444 | |||
| 4435a66ece | |||
| 874a1079c3 | |||
| 1dc239d243 | |||
| 73a04276c0 | |||
| 9955064484 | |||
| 7975b528ec | |||
| 7d9fbda975 | |||
| fce06747e3 | |||
| db0cca54a7 | |||
| 4424caecc5 | |||
| b866dcd566 | |||
| 9e4e6435ab | |||
| 41b10ff442 | |||
| 79f3307104 | |||
| 026629cd6d | |||
| cf570a8f88 | |||
| 4a64384468 | |||
| a9065c3380 | |||
| e5e5548562 | |||
| 44cf2f670f | |||
| d04d91d6dd | |||
| 3eb25b1507 | |||
| a95cae5610 | |||
| 9cc6e62f28 | |||
| 24117f7c8d | |||
| 7245e6e593 | |||
| 4a5b1f4da3 | |||
| c1ac67cc31 | |||
| 4085361b7e | |||
| 8b4227dbff | |||
| 3f7ed9e177 | |||
| f9f1ba9e24 | |||
| 29309500a6 | |||
| 6b07fe105f | |||
| 90b03a0b97 | |||
| d54a468006 | |||
| 7e98b6d853 | |||
| 8069094201 | |||
| b28dc01e6b | |||
| 6bc1f9f494 | |||
| e85dd32005 | |||
| efc4e3bf6c | |||
| 768a13ff4d | |||
| a8d73f74f4 | |||
| 4dddfc0cc5 | |||
| 4163bebe3b | |||
| ad13744d14 | |||
| 9f9b3a5b21 | |||
| 63e68baeb1 | |||
| 4382ca6582 | |||
| 99f2f4c211 | |||
| 6b23379e5a | |||
| 4deda36e8f | |||
| 0ce7831cfb | |||
| 4e9005e240 | |||
| 9147252e5b | |||
| b6b549ca18 | |||
| 85c25fb71e | |||
| 50637ba9fd | |||
| bfe55dd55a | |||
| 1a2bb3d12e | |||
| 452a0c3ed5 | |||
| b594a4690f | |||
| 7d2ba43463 | |||
| 107db42c33 | |||
| dbacb9fc8d | |||
| 1fa3499ca6 | |||
| 62f3198d27 | |||
| 529550934b | |||
| ca3b22a881 | |||
| 0ecf2d9123 | |||
| af9bb7138b | |||
| 6cbfa74f97 | |||
| 2845fb8d35 | |||
| fbe2660a57 | |||
| 1519282ac6 | |||
| 5d8d8dca70 | |||
| 0254e2c31d | |||
| 368b494d62 | |||
| 00d2213d05 | |||
| b04602bcb9 | |||
| 80bfbd503a | |||
| bfa186aebb | |||
| 818595e961 | |||
| b5e9852f8d | |||
| ff3734d65a | |||
| 4aa771ba29 | |||
| 5848c381fa | |||
| 03b35beae4 | |||
| 49856bb6f7 | |||
| 0cb56f1a85 | |||
| 4a0d698776 | |||
| a4ebdb5736 | |||
| 6a5ecc2880 | |||
| 7a5bd92442 | |||
| 63c1111608 | |||
| 5704fb560a | |||
| 33dc3b719d | |||
| d3329b4628 | |||
| 42e2c9f96f | |||
| 3e8a10757f | |||
| 8028d82fd0 | |||
| 4ad9feba68 | |||
| ef469be7a9 | |||
| 14cd73d75a | |||
| fbe6039845 | |||
| f3fbd070dd | |||
| 7c2611a5a7 | |||
| ae949f4616 | |||
| 89da434c0e | |||
| 4a98d1d655 | |||
| bb41f0e4fe | |||
| d2e0717d91 | |||
| 7912204fcb | |||
| 83e41ad618 | |||
| dd7e46c2cc | |||
| fb7424714a | |||
| 47481b711e | |||
| 0f86c3a731 | |||
| b91d1b8b3c | |||
| cd5ae6691c | |||
| 0f58986b4c | |||
| af9755c513 | |||
| 56ce25f953 | |||
| ed70c15ee9 | |||
| d88ae99425 | |||
| cf7ef55b7d | |||
| 2f12424f8d | |||
| 96aacec4fc | |||
| 7e57bb98a8 | |||
| 298f5c5a99 | |||
| bf44ea7864 | |||
| 9abdc45e93 | |||
| 0d82cc7574 | |||
| 402b2a551f | |||
| 700c589ae2 | |||
| 8929d736d9 | |||
| 8c65fce357 | |||
| b81f1e9e6b | |||
| 44d083d773 | |||
| 2b308282d4 | |||
| c7738743c5 | |||
| abc60667c6 | |||
| 53162e8bca | |||
| 6b95574e3d | |||
| c9d62ae961 | |||
| a70019927d | |||
| 01cd7f951a | |||
| 50f92bcfab | |||
| 362d9f8e59 | |||
| 0b1cf53942 | |||
| a4c769b33c | |||
| 74a1cb61c1 | |||
| 268545c728 | |||
| 184bbb01c5 | |||
| 66fa7ac419 | |||
| a80f3d997e | |||
| efa7c24c9f | |||
| 91de21c7ad | |||
| 1e9ba57ef0 | |||
| 464389b248 | |||
| 107eb72eda | |||
| ee7bf838f4 | |||
| f63bcd94d1 | |||
| 16d5cb6ade | |||
| 63decdef8b | |||
| e54e88f46d | |||
| b6f53d059e | |||
| 9e1771c5ec | |||
| 8306bc2198 | |||
| 3810fb7d51 | |||
| 5b4984113e | |||
| baf9efe246 | |||
| f4a3109a31 | |||
| 241f2f39ec | |||
| d9b40dca83 | |||
| cb3f053057 | |||
| c4ab045e57 | |||
| d9b38efd97 | |||
| 5981588c95 | |||
| 388bef59b8 | |||
| 3d8de61c1c | |||
| 91b818f98d | |||
| 3a7f0898f9 | |||
| c2f6de875a | |||
| 0647001807 | |||
| 4181d87792 | |||
| 58cf0a2015 | |||
| d80c3d305b | |||
| 4d64a2bc2f | |||
| 5c54beaaa9 | |||
| eee98f32b2 | |||
| 0949de66bf | |||
| 5a6acb24d9 | |||
| 2e5cab62c7 | |||
| 903db5fffd | |||
| e3faf32708 | |||
| 97926ddc03 | |||
| e891804051 | |||
| a2982f8b77 | |||
| 321941baab | |||
| e2e25dc30b | |||
| 1170ca4789 | |||
| d159f62138 | |||
| 25005eef1b | |||
| b17824c88d | |||
| 00f4a008f8 | |||
| 3e2bc67b59 | |||
| efe072c7c4 | |||
| 59f1d11e40 | |||
| 5f947ac983 | |||
| aa66f957f2 | |||
| cf5f69271f | |||
| c6653af782 | |||
| fa1f33a2ac | |||
| 9f479882ad | |||
| 41db316489 | |||
| 50f0f5885e | |||
| a609f09d50 | |||
| 43f2aa3068 | |||
| a094e13bd5 | |||
| eb076afbe4 | |||
| 7b41488a38 | |||
| ca12d48352 | |||
| 0331d3b2b0 | |||
| 4d4814583c | |||
| da3e158516 | |||
| 7b9d6baff0 | |||
| 550f1b7c6f | |||
| 74e8ee1786 | |||
| 55d3ea01b6 | |||
| 4cfe51cbb2 | |||
| 1f5ac60523 | |||
| 26bf4f2abd | |||
| 54671fff79 | |||
| 378309d763 | |||
| e7d4bba8b3 | |||
| fe3de0bc98 | |||
| f3e38d7b71 | |||
| eafa3b2de9 | |||
| d8cc075bd0 | |||
| bdb877a936 | |||
| 5c96e83a22 | |||
| 43abb57f77 | |||
| 9c6d821978 | |||
| 7e9babf515 | |||
| ee36baf432 | |||
| 0bf57dcab7 | |||
| e647d23adc | |||
| d1b5b9c371 | |||
| 92ec514442 | |||
| 107466dd58 | |||
| 4246260ce6 | |||
| 936787d327 | |||
| f976397283 | |||
| 657c6ad9a9 | |||
| ede07c3b0e | |||
| 9326e8dcce | |||
| 8ff2adf833 | |||
| 5e387b513a | |||
| dca316c0d5 | |||
| db2d786d50 | |||
| c0d7962142 | |||
| 5d14354ca9 | |||
| 347dace6de | |||
| d952c75e3c | |||
| abc3745be1 | |||
| 1382d7c523 | |||
| 3de0edf0f9 | |||
| 5513d39152 | |||
| 1a9547d1d2 | |||
| 26cc64d3a0 | |||
| e465b33365 | |||
| 957739ba5e | |||
| 59967374c5 | |||
| 43bc346a2b | |||
| 5fbd3f67cd | |||
| e352343d62 | |||
| baee0f0c6f | |||
| fcc5eead88 | |||
| 29d1f687d1 | |||
| f568266c7f | |||
| a1e42b8ddb | |||
| e6389b1153 | |||
| f0835acb33 | |||
| 35b04b219f | |||
| 01b62e936a | |||
| 09d16a03ef | |||
| bb61602fd2 | |||
| f30b78ea1f | |||
| 6ee652ca75 | |||
| 67d8bbc154 | |||
| b852484559 | |||
| 0b077e5e88 | |||
| 381d957db2 | |||
| f8f77abc12 | |||
| 0b0484c610 | |||
| 2b769088af | |||
| 856d13c603 | |||
| 76e398b8a1 | |||
| 24a7d85be0 | |||
| 989271f653 | |||
| 3fd8cd5713 | |||
| 43f1c7caf6 | |||
| bd91ac88a3 | |||
| fbcbf2e5a5 | |||
| 31eb03da0d | |||
| a4dbfed712 | |||
| 784cb53ec6 | |||
| 43c799bd60 |
+34
-22
@@ -1,25 +1,37 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
"eslint:recommended",
|
||||||
'plugin:react/recommended',
|
"plugin:react/recommended",
|
||||||
'plugin:import/recommended',
|
"plugin:react-hooks/recommended",
|
||||||
'plugin:jsx-a11y/recommended',
|
"plugin:import/recommended",
|
||||||
'plugin:@typescript-eslint/recommended',
|
"plugin:jsx-a11y/recommended",
|
||||||
'eslint-config-prettier',
|
"plugin:@typescript-eslint/recommended",
|
||||||
],
|
"eslint-config-prettier"
|
||||||
ignorePatterns: ['src-tauri/**/*'],
|
],
|
||||||
settings: {
|
parser: "@typescript-eslint/parser",
|
||||||
react: {
|
parserOptions: {
|
||||||
version: 'detect',
|
project: ["./tsconfig.json"]
|
||||||
},
|
},
|
||||||
'import/resolver': {
|
ignorePatterns: ["src-tauri/**/*", "plugins/**/*"],
|
||||||
node: {
|
settings: {
|
||||||
paths: ['src-web'],
|
react: {
|
||||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
version: "detect"
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"react/react-in-jsx-scope": "off",
|
|
||||||
},
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
node: {
|
||||||
|
paths: ["src-web"],
|
||||||
|
extensions: [".ts", ".tsx"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"jsx-a11y/no-autofocus": "off",
|
||||||
|
"react/react-in-jsx-scope": "off",
|
||||||
|
"import/no-unresolved": "off",
|
||||||
|
"@typescript-eslint/consistent-type-imports": ["error", {
|
||||||
|
prefer: "type-imports",
|
||||||
|
disallowTypeAnnotations: true,
|
||||||
|
fixStyle: "separate-type-imports"
|
||||||
|
}]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: Generate Artifacts
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- release
|
||||||
|
- beta
|
||||||
|
jobs:
|
||||||
|
build-artifacts:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
name: Build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: 'macos-latest' # for Arm based macs (M1 and above).
|
||||||
|
args: '--target aarch64-apple-darwin'
|
||||||
|
- platform: 'macos-latest' # for Intel based macs.
|
||||||
|
args: '--target x86_64-apple-darwin'
|
||||||
|
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
|
||||||
|
args: ''
|
||||||
|
- platform: 'windows-latest'
|
||||||
|
args: ''
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: setup node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
|
||||||
|
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||||
|
- name: install dependencies (ubuntu only)
|
||||||
|
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run lint
|
||||||
|
run: npm run lint
|
||||||
|
- name: Run tests
|
||||||
|
run: npm test
|
||||||
|
- uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
with:
|
||||||
|
tagName: 'v__VERSION__'
|
||||||
|
releaseName: 'Release __VERSION__'
|
||||||
|
releaseBody: 'https://yaak.app/changelog/__VERSION__'
|
||||||
|
releaseDraft: true
|
||||||
|
prerelease: false
|
||||||
|
args: ${{ matrix.args }}
|
||||||
+5
-1
@@ -22,5 +22,9 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
.rsw
|
*.sqlite
|
||||||
|
*.sqlite-*
|
||||||
|
|
||||||
|
.cargo
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
out/
|
||||||
.prettierrc.cjs
|
.prettierrc.cjs
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Dev Desktop" type="js.build_tools.npm">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="start" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs>
|
||||||
|
</envs>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "yaak-dev",
|
||||||
|
"adapter": "sqlite3",
|
||||||
|
"filename": "src-tauri/db.sqlite"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
plugins
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
.PHONY: sqlx-prepare, dev, migrate, build
|
||||||
|
|
||||||
|
sqlx-prepare:
|
||||||
|
cd src-tauri && cargo sqlx prepare --database-url 'sqlite://db.sqlite'
|
||||||
|
|
||||||
|
dev:
|
||||||
|
npm run tauri-dev
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
cd src-tauri && cargo sqlx migrate run --database-url 'sqlite://db.sqlite?mode=rw'
|
||||||
|
|
||||||
|
build:
|
||||||
|
./node_modules/.bin/tauri build
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
# Tauri REST Client
|
# Yaak Network Toolkit
|
||||||
|
|
||||||
It's a REST client, yo.
|
The most fun you'll ever have working with APIs.
|
||||||
|
|
||||||
|
## Common Commands
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Start dev app
|
||||||
|
npm run tauri-dev
|
||||||
|
|
||||||
|
# Migration commands
|
||||||
|
cd src-tauri
|
||||||
|
cargo sqlx migrate add ${MIGRATION_NAME}
|
||||||
|
cargo sqlx migrate run --database-url 'sqlite://db.sqlite?mode=rw'
|
||||||
|
cargo sqlx prepare --database-url 'sqlite://db.sqlite'
|
||||||
|
```
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 356 KiB |
Binary file not shown.
+27
-11
@@ -1,15 +1,31 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<title>Yaak App</title>
|
||||||
<title>Tauri + React + TS</title>
|
<!-- <script src="http://localhost:8097"></script>-->
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<!-- Certain elements like webview (and maybe <select>?) will use background
|
||||||
<div id="root"></div>
|
color depending on document background color-->
|
||||||
<div id="radix-portal"></div>
|
<style>
|
||||||
<script type="module" src="/src-web/main.tsx"></script>
|
html, body {
|
||||||
</body>
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html, body {
|
||||||
|
background-color: #1b1a29;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="text-base">
|
||||||
|
<div id="root"></div>
|
||||||
|
<div id="cm-portal" class="cm-portal"></div>
|
||||||
|
<div id="react-portal"></div>
|
||||||
|
<div id="radix-portal" class="cm-portal"></div>
|
||||||
|
<script type="module" src="/src-web/main.tsx"></script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Generated
+7841
-6761
File diff suppressed because it is too large
Load Diff
+95
-32
@@ -1,51 +1,114 @@
|
|||||||
{
|
{
|
||||||
"name": "tauri-app",
|
"name": "yaak-app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rsw build && tsc && vite build",
|
"start": "npm run tauri-dev:desktop",
|
||||||
"dev": "vite",
|
"tauri-dev:desktop": "tauri dev --no-watch --config ./src-tauri/tauri-dev.conf.json",
|
||||||
"lint": "eslint . --ext .ts,.tsx",
|
"tauri-dev:ios": "tauri ios dev --force-ip-prompt --config ./src-tauri/tauri-dev.conf.json",
|
||||||
"preview": "vite preview",
|
"tauri-build": "tauri build",
|
||||||
"tauri-dev": "concurrently -n app,rsw \"tauri dev\" \"rsw watch\""
|
"tauri": "tauri",
|
||||||
|
"build": "npm run build:frontend",
|
||||||
|
"dev": "vite dev",
|
||||||
|
"lint": "tsc && eslint . --ext .ts,.tsx",
|
||||||
|
"build:icon:release": "tauri icon design/icon.png --output ./src-tauri/icons/release",
|
||||||
|
"build:icon:dev": "tauri icon design/icon-dev.png --output ./src-tauri/icons/dev",
|
||||||
|
"build:frontend": "vite build",
|
||||||
|
"build:plugins": "run-p build:plugin:*",
|
||||||
|
"build:plugin:exporter-curl": "cd plugins/exporter-curl && vite build --emptyOutDir",
|
||||||
|
"build:plugin:importer-insomnia": "cd plugins/importer-insomnia && vite build --emptyOutDir",
|
||||||
|
"build:plugin:importer-postman": "cd plugins/importer-postman && vite build --emptyOutDir",
|
||||||
|
"build:plugin:importer-yaak": "cd plugins/importer-yaak && vite build --emptyOutDir",
|
||||||
|
"build:plugin:importer-curl": "cd plugins/importer-curl && vite build --emptyOutDir",
|
||||||
|
"build:plugin:filter-jsonpath": "cd plugins/filter-jsonpath && vite build --emptyOutDir",
|
||||||
|
"build:plugin:filter-xpath": "cd plugins/filter-xpath && vite build --emptyOutDir",
|
||||||
|
"test": "vitest",
|
||||||
|
"coverage": "vitest run --coverage",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/lang-html": "^6.4.2",
|
"@codemirror/commands": "^6.2.1",
|
||||||
"@codemirror/lang-javascript": "^6.1.4",
|
"@codemirror/lang-javascript": "^6.2.2",
|
||||||
"@codemirror/lang-json": "^6.0.1",
|
"@codemirror/lang-json": "^6.0.1",
|
||||||
"@radix-ui/react-dropdown-menu": "^2.0.2",
|
"@codemirror/lang-xml": "^6.0.2",
|
||||||
"@radix-ui/react-icons": "^1.2.0",
|
"@codemirror/language": "^6.6.0",
|
||||||
"@radix-ui/react-popover": "1.0.3",
|
"@codemirror/search": "^6.2.3",
|
||||||
"@tauri-apps/api": "^1.2.0",
|
"@lezer/generator": "^1.2.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
"@lezer/highlight": "^1.1.3",
|
||||||
"@typescript-eslint/parser": "^5.52.0",
|
"@lezer/lr": "^1.3.3",
|
||||||
|
"@react-hook/resize-observer": "^1.2.6",
|
||||||
|
"@tailwindcss/container-queries": "^0.1.0",
|
||||||
|
"@tanstack/react-query": "^5.35.5",
|
||||||
|
"@tauri-apps/api": ">=2.0.0-beta.0",
|
||||||
|
"@tauri-apps/plugin-clipboard-manager": "^2.1.0-beta.1",
|
||||||
|
"@tauri-apps/plugin-dialog": ">=2.0.0-beta.0",
|
||||||
|
"@tauri-apps/plugin-fs": ">=2.0.0-beta.0",
|
||||||
|
"@tauri-apps/plugin-os": ">=2.0.0-beta.0",
|
||||||
|
"@tauri-apps/plugin-shell": ">=2.0.0-beta.0",
|
||||||
|
"buffer": "^6.0.3",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
|
"cm6-graphql": "^0.0.9",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
|
"codemirror-json-schema": "^0.6.1",
|
||||||
|
"date-fns": "^3.3.1",
|
||||||
|
"focus-trap-react": "^10.1.1",
|
||||||
|
"format-graphql": "^1.4.0",
|
||||||
|
"framer-motion": "^9.0.4",
|
||||||
|
"lucide-react": "^0.309.0",
|
||||||
|
"mime": "^4.0.1",
|
||||||
|
"papaparse": "^5.4.1",
|
||||||
|
"parse-color": "^1.0.0",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dnd": "^16.0.1",
|
||||||
|
"react-dnd-html5-backend": "^16.0.1",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-helmet-async": "^1.3.0",
|
||||||
|
"react-router-dom": "^6.8.1",
|
||||||
|
"react-use": "^17.4.0",
|
||||||
|
"slugify": "^1.6.6",
|
||||||
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v2",
|
||||||
|
"uuid": "^9.0.0",
|
||||||
|
"xml-formatter": "^3.6.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
|
||||||
|
"@tanstack/react-query-devtools": "^5.35.5",
|
||||||
|
"@tauri-apps/cli": "^2.0.0-beta.15",
|
||||||
|
"@types/node": "^18.7.10",
|
||||||
|
"@types/papaparse": "^5.3.7",
|
||||||
|
"@types/parse-color": "^1.0.1",
|
||||||
|
"@types/parse-json": "^4.0.0",
|
||||||
|
"@types/react": "^18.0.31",
|
||||||
|
"@types/react-dom": "^18.0.11",
|
||||||
|
"@types/uuid": "^9.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||||
|
"@typescript-eslint/parser": "^7.0.2",
|
||||||
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
|
"autoprefixer": "^10.4.13",
|
||||||
"eslint": "^8.34.0",
|
"eslint": "^8.34.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||||
"eslint-plugin-react": "^7.32.2",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"framer-motion": "^9.0.4",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"prettier": "^2.8.4",
|
"husky": "^8.0.3",
|
||||||
"react": "^18.2.0",
|
"internal-ip": "^8.0.0",
|
||||||
"react-dom": "^18.2.0",
|
"lint-staged": "^15.0.2",
|
||||||
"react-helmet-async": "^1.3.0"
|
"npm-run-all": "^4.1.5",
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@tauri-apps/cli": "^1.2.2",
|
|
||||||
"@types/node": "^18.7.10",
|
|
||||||
"@types/react": "^18.0.15",
|
|
||||||
"@types/react-dom": "^18.0.6",
|
|
||||||
"@vitejs/plugin-react": "^3.0.0",
|
|
||||||
"autoprefixer": "^10.4.13",
|
|
||||||
"concurrently": "^7.6.0",
|
|
||||||
"postcss": "^8.4.21",
|
"postcss": "^8.4.21",
|
||||||
|
"postcss-nesting": "^11.2.1",
|
||||||
|
"prettier": "^2.8.4",
|
||||||
|
"react-devtools": "^4.27.2",
|
||||||
"tailwindcss": "^3.2.7",
|
"tailwindcss": "^3.2.7",
|
||||||
"typescript": "^4.6.4",
|
"typescript": "^5.4.5",
|
||||||
"vite": "^4.0.0",
|
"vite": "^5.0.0",
|
||||||
"vite-plugin-rsw": "^2.0.11",
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"vite-plugin-top-level-await": "^1.2.4"
|
"vite-plugin-top-level-await": "^1.4.1",
|
||||||
|
"vitest": "^1.3.0"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{ts,tsx}": "eslint --cache --fix",
|
||||||
|
"*.{js,css,md}": "prettier --write"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1544
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "exporter-curl",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"devDependencies": {
|
||||||
|
"vitest": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
import { HttpRequest } from '../../../src-web/lib/models';
|
||||||
|
|
||||||
|
const NEWLINE = '\\\n ';
|
||||||
|
|
||||||
|
export function pluginHookExport(request: Partial<HttpRequest>) {
|
||||||
|
const xs = ['curl'];
|
||||||
|
|
||||||
|
// Add method and URL all on first line
|
||||||
|
if (request.method) xs.push('-X', request.method);
|
||||||
|
if (request.url) xs.push(quote(request.url));
|
||||||
|
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
|
||||||
|
// Add URL params
|
||||||
|
for (const p of (request.urlParameters ?? []).filter(onlyEnabled)) {
|
||||||
|
xs.push('--url-query', quote(`${p.name}=${p.value}`));
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add headers
|
||||||
|
for (const h of (request.headers ?? []).filter(onlyEnabled)) {
|
||||||
|
xs.push('--header', quote(`${h.name}: ${h.value}`));
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add form params
|
||||||
|
if (Array.isArray(request.body?.form)) {
|
||||||
|
const flag = request.bodyType === 'multipart/form-data' ? '--form' : '--data';
|
||||||
|
for (const p of (request.body?.form ?? []).filter(onlyEnabled)) {
|
||||||
|
if (p.file) {
|
||||||
|
let v = `${p.name}=@${p.file}`;
|
||||||
|
v += p.contentType ? `;type=${p.contentType}` : '';
|
||||||
|
xs.push(flag, v);
|
||||||
|
} else {
|
||||||
|
xs.push(flag, quote(`${p.name}=${p.value}`));
|
||||||
|
}
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
} else if (typeof request.body?.text === 'string') {
|
||||||
|
// --data-raw $'...' to do special ANSI C quoting
|
||||||
|
xs.push('--data-raw', `$${quote(request.body.text)}`);
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add basic/digest authentication
|
||||||
|
if (request.authenticationType === 'basic' || request.authenticationType === 'digest') {
|
||||||
|
if (request.authenticationType === 'digest') xs.push('--digest');
|
||||||
|
xs.push(
|
||||||
|
'--user',
|
||||||
|
quote(`${request.authentication?.username ?? ''}:${request.authentication?.password ?? ''}`),
|
||||||
|
);
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add bearer authentication
|
||||||
|
if (request.authenticationType === 'bearer') {
|
||||||
|
xs.push('--header', quote(`Authorization: Bearer ${request.authentication?.token ?? ''}`));
|
||||||
|
xs.push(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove trailing newline
|
||||||
|
if (xs[xs.length - 1] === NEWLINE) {
|
||||||
|
xs.splice(xs.length - 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return xs.join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
function quote(arg: string): string {
|
||||||
|
const escaped = arg.replace(/'/g, "\\'");
|
||||||
|
return `'${escaped}'`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onlyEnabled(v: { name?: string; enabled?: boolean }): boolean {
|
||||||
|
return v.enabled !== false && !!v.name;
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
import { describe, expect, test } from 'vitest';
|
||||||
|
import { pluginHookExport } from '../src';
|
||||||
|
|
||||||
|
describe('exporter-curl', () => {
|
||||||
|
test('Exports GET with params', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
urlParameters: [
|
||||||
|
{ name: 'a', value: 'aaa' },
|
||||||
|
{ name: 'b', value: 'bbb', enabled: true },
|
||||||
|
{ name: 'c', value: 'ccc', enabled: false },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
).toEqual(
|
||||||
|
[`curl 'https://yaak.app'`, `--url-query 'a=aaa'`, `--url-query 'b=bbb'`].join(` \\\n `),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
test('Exports POST with url form data', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
bodyType: 'application/x-www-form-urlencoded',
|
||||||
|
body: {
|
||||||
|
form: [
|
||||||
|
{ name: 'a', value: 'aaa' },
|
||||||
|
{ name: 'b', value: 'bbb', enabled: true },
|
||||||
|
{ name: 'c', value: 'ccc', enabled: false },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual(
|
||||||
|
[`curl -X POST 'https://yaak.app'`, `--data 'a=aaa'`, `--data 'b=bbb'`].join(` \\\n `),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Exports PUT with multipart form', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'PUT',
|
||||||
|
bodyType: 'multipart/form-data',
|
||||||
|
body: {
|
||||||
|
form: [
|
||||||
|
{ name: 'a', value: 'aaa' },
|
||||||
|
{ name: 'b', value: 'bbb', enabled: true },
|
||||||
|
{ name: 'c', value: 'ccc', enabled: false },
|
||||||
|
{ name: 'f', file: '/foo/bar.png', contentType: 'image/png' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual(
|
||||||
|
[
|
||||||
|
`curl -X PUT 'https://yaak.app'`,
|
||||||
|
`--form 'a=aaa'`,
|
||||||
|
`--form 'b=bbb'`,
|
||||||
|
`--form f=@/foo/bar.png;type=image/png`,
|
||||||
|
].join(` \\\n `),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Exports JSON body', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
bodyType: 'application/json',
|
||||||
|
body: {
|
||||||
|
text: `{"foo":"bar's"}`,
|
||||||
|
},
|
||||||
|
headers: [{ name: 'Content-Type', value: 'application/json' }],
|
||||||
|
}),
|
||||||
|
).toEqual(
|
||||||
|
[
|
||||||
|
`curl -X POST 'https://yaak.app'`,
|
||||||
|
`--header 'Content-Type: application/json'`,
|
||||||
|
`--data-raw $'{"foo":"bar\\'s"}'`,
|
||||||
|
].join(` \\\n `),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Exports multi-line JSON body', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
bodyType: 'application/json',
|
||||||
|
body: {
|
||||||
|
text: `{"foo":"bar",\n"baz":"qux"}`,
|
||||||
|
},
|
||||||
|
headers: [{ name: 'Content-Type', value: 'application/json' }],
|
||||||
|
}),
|
||||||
|
).toEqual(
|
||||||
|
[
|
||||||
|
`curl -X POST 'https://yaak.app'`,
|
||||||
|
`--header 'Content-Type: application/json'`,
|
||||||
|
`--data-raw $'{"foo":"bar",\n"baz":"qux"}'`,
|
||||||
|
].join(` \\\n `),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Exports headers', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
headers: [
|
||||||
|
{ name: 'a', value: 'aaa' },
|
||||||
|
{ name: 'b', value: 'bbb', enabled: true },
|
||||||
|
{ name: 'c', value: 'ccc', enabled: false },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
).toEqual([`curl`, `--header 'a: aaa'`, `--header 'b: bbb'`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Basic auth', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'basic',
|
||||||
|
authentication: {
|
||||||
|
username: 'user',
|
||||||
|
password: 'pass',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual([`curl 'https://yaak.app'`, `--user 'user:pass'`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Broken basic auth', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'basic',
|
||||||
|
authentication: {},
|
||||||
|
}),
|
||||||
|
).toEqual([`curl 'https://yaak.app'`, `--user ':'`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Digest auth', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'digest',
|
||||||
|
authentication: {
|
||||||
|
username: 'user',
|
||||||
|
password: 'pass',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual([`curl 'https://yaak.app'`, `--digest --user 'user:pass'`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Bearer auth', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'bearer',
|
||||||
|
authentication: {
|
||||||
|
token: 'tok',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer tok'`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Broken bearer auth', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookExport({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'bearer',
|
||||||
|
authentication: {
|
||||||
|
username: 'user',
|
||||||
|
password: 'pass',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer '`].join(` \\\n `));
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/exporter-curl'),
|
||||||
|
},
|
||||||
|
});
|
||||||
+173
@@ -0,0 +1,173 @@
|
|||||||
|
{
|
||||||
|
"name": "filter-jsonpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "filter-jsonpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"jsonpath": "^1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/deep-is": {
|
||||||
|
"version": "0.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
||||||
|
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
|
||||||
|
},
|
||||||
|
"node_modules/escodegen": {
|
||||||
|
"version": "1.14.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
|
||||||
|
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
|
||||||
|
"dependencies": {
|
||||||
|
"esprima": "^4.0.1",
|
||||||
|
"estraverse": "^4.2.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"optionator": "^0.8.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"escodegen": "bin/escodegen.js",
|
||||||
|
"esgenerate": "bin/esgenerate.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"source-map": "~0.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/escodegen/node_modules/esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||||
|
"bin": {
|
||||||
|
"esparse": "bin/esparse.js",
|
||||||
|
"esvalidate": "bin/esvalidate.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esprima": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==",
|
||||||
|
"bin": {
|
||||||
|
"esparse": "bin/esparse.js",
|
||||||
|
"esvalidate": "bin/esvalidate.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/estraverse": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esutils": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fast-levenshtein": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||||
|
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
|
||||||
|
},
|
||||||
|
"node_modules/jsonpath": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==",
|
||||||
|
"dependencies": {
|
||||||
|
"esprima": "1.2.2",
|
||||||
|
"static-eval": "2.0.2",
|
||||||
|
"underscore": "1.12.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/levn": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
|
||||||
|
"dependencies": {
|
||||||
|
"prelude-ls": "~1.1.2",
|
||||||
|
"type-check": "~0.3.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/optionator": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||||
|
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
|
||||||
|
"dependencies": {
|
||||||
|
"deep-is": "~0.1.3",
|
||||||
|
"fast-levenshtein": "~2.0.6",
|
||||||
|
"levn": "~0.3.0",
|
||||||
|
"prelude-ls": "~1.1.2",
|
||||||
|
"type-check": "~0.3.2",
|
||||||
|
"word-wrap": "~1.2.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/prelude-ls": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"optional": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/static-eval": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==",
|
||||||
|
"dependencies": {
|
||||||
|
"escodegen": "^1.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/type-check": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
|
||||||
|
"dependencies": {
|
||||||
|
"prelude-ls": "~1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/underscore": {
|
||||||
|
"version": "1.12.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz",
|
||||||
|
"integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw=="
|
||||||
|
},
|
||||||
|
"node_modules/word-wrap": {
|
||||||
|
"version": "1.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
|
||||||
|
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "filter-jsonpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"jsonpath": "^1.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import jp from 'jsonpath';
|
||||||
|
|
||||||
|
export function pluginHookResponseFilter(filter, text) {
|
||||||
|
let parsed;
|
||||||
|
try {
|
||||||
|
parsed = JSON.parse(text);
|
||||||
|
} catch (e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const filtered = jp.query(parsed, filter);
|
||||||
|
return { filtered: JSON.stringify(filtered, null, 2) };
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.js'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/filter-jsonpath'),
|
||||||
|
},
|
||||||
|
});
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"name": "filter-xpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "filter-xpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"@xmldom/xmldom": "^0.8.10",
|
||||||
|
"xpath": "^0.0.34"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@xmldom/xmldom": {
|
||||||
|
"version": "0.8.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
|
||||||
|
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/xpath": {
|
||||||
|
"version": "0.0.34",
|
||||||
|
"resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz",
|
||||||
|
"integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "filter-xpath",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"@xmldom/xmldom": "^0.8.10",
|
||||||
|
"xpath": "^0.0.34"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import xpath from 'xpath';
|
||||||
|
import { DOMParser } from '@xmldom/xmldom';
|
||||||
|
|
||||||
|
export function pluginHookResponseFilter(filter, text) {
|
||||||
|
const doc = new DOMParser().parseFromString(text, 'text/xml');
|
||||||
|
const filtered = `${xpath.select(filter, doc)}`;
|
||||||
|
return { filtered };
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.js'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/filter-xpath'),
|
||||||
|
},
|
||||||
|
});
|
||||||
Generated
+1562
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-curl",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"shell-quote": "^1.8.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/shell-quote": "^1.7.5",
|
||||||
|
"vitest": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,421 @@
|
|||||||
|
import { ControlOperator, parse, ParseEntry } from 'shell-quote';
|
||||||
|
import {
|
||||||
|
Environment,
|
||||||
|
Folder,
|
||||||
|
HttpRequest,
|
||||||
|
HttpUrlParameter,
|
||||||
|
Model,
|
||||||
|
Workspace,
|
||||||
|
} from '../../../src-web/lib/models';
|
||||||
|
|
||||||
|
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
|
||||||
|
|
||||||
|
interface ExportResources {
|
||||||
|
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
||||||
|
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const id = 'curl';
|
||||||
|
export const name = 'cURL';
|
||||||
|
export const description = 'cURL command line tool';
|
||||||
|
|
||||||
|
const DATA_FLAGS = ['d', 'data', 'data-raw', 'data-urlencode', 'data-binary', 'data-ascii'];
|
||||||
|
const SUPPORTED_ARGS = [
|
||||||
|
['url'], // Specify the URL explicitly
|
||||||
|
['user', 'u'], // Authentication
|
||||||
|
['digest'], // Apply auth as digest
|
||||||
|
['header', 'H'],
|
||||||
|
['cookie', 'b'],
|
||||||
|
['get', 'G'], // Put the post data in the URL
|
||||||
|
['d', 'data'], // Add url encoded data
|
||||||
|
['data-raw'],
|
||||||
|
['data-urlencode'],
|
||||||
|
['data-binary'],
|
||||||
|
['data-ascii'],
|
||||||
|
['form', 'F'], // Add multipart data
|
||||||
|
['request', 'X'], // Request method
|
||||||
|
DATA_FLAGS,
|
||||||
|
].flatMap((v) => v);
|
||||||
|
|
||||||
|
type Pair = string | boolean;
|
||||||
|
|
||||||
|
type PairsByName = Record<string, Pair[]>;
|
||||||
|
|
||||||
|
export function pluginHookImport(rawData: string) {
|
||||||
|
if (!rawData.match(/^\s*curl /)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const commands: ParseEntry[][] = [];
|
||||||
|
|
||||||
|
// Replace non-escaped newlines with semicolons to make parsing easier
|
||||||
|
// NOTE: This is really slow in debug build but fast in release mode
|
||||||
|
const normalizedData = rawData.replace(/\ncurl/g, '; curl');
|
||||||
|
|
||||||
|
let currentCommand: ParseEntry[] = [];
|
||||||
|
|
||||||
|
const parsed = parse(normalizedData);
|
||||||
|
|
||||||
|
// Break up `-XPOST` into `-X POST`
|
||||||
|
const normalizedParseEntries = parsed.flatMap((entry) => {
|
||||||
|
if (
|
||||||
|
typeof entry === 'string' &&
|
||||||
|
entry.startsWith('-') &&
|
||||||
|
!entry.startsWith('--') &&
|
||||||
|
entry.length > 2
|
||||||
|
) {
|
||||||
|
return [entry.slice(0, 2), entry.slice(2)];
|
||||||
|
}
|
||||||
|
return entry;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const parseEntry of normalizedParseEntries) {
|
||||||
|
if (typeof parseEntry === 'string') {
|
||||||
|
if (parseEntry.startsWith('$')) {
|
||||||
|
currentCommand.push(parseEntry.slice(1));
|
||||||
|
} else {
|
||||||
|
currentCommand.push(parseEntry);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('comment' in parseEntry) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { op } = parseEntry as { op: 'glob'; pattern: string } | { op: ControlOperator };
|
||||||
|
|
||||||
|
// `;` separates commands
|
||||||
|
if (op === ';') {
|
||||||
|
commands.push(currentCommand);
|
||||||
|
currentCommand = [];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (op?.startsWith('$')) {
|
||||||
|
// Handle the case where literal like -H $'Header: \'Some Quoted Thing\''
|
||||||
|
const str = op.slice(2, op.length - 1).replace(/\\'/g, "'");
|
||||||
|
|
||||||
|
currentCommand.push(str);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (op === 'glob') {
|
||||||
|
currentCommand.push((parseEntry as { op: 'glob'; pattern: string }).pattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
commands.push(currentCommand);
|
||||||
|
|
||||||
|
const workspace: ExportResources['workspaces'][0] = {
|
||||||
|
model: 'workspace',
|
||||||
|
id: generateId('workspace'),
|
||||||
|
name: 'Curl Import',
|
||||||
|
};
|
||||||
|
|
||||||
|
const requests: ExportResources['httpRequests'] = commands
|
||||||
|
.filter((command) => command[0] === 'curl')
|
||||||
|
.map((v) => importCommand(v, workspace.id));
|
||||||
|
|
||||||
|
return {
|
||||||
|
resources: {
|
||||||
|
httpRequests: requests,
|
||||||
|
workspaces: [workspace],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function importCommand(parseEntries: ParseEntry[], workspaceId: string) {
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~ //
|
||||||
|
// Collect all the flags //
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~ //
|
||||||
|
const pairsByName: PairsByName = {};
|
||||||
|
const singletons: ParseEntry[] = [];
|
||||||
|
|
||||||
|
// Start at 1 so we can skip the ^curl part
|
||||||
|
for (let i = 1; i < parseEntries.length; i++) {
|
||||||
|
let parseEntry = parseEntries[i];
|
||||||
|
if (typeof parseEntry === 'string') {
|
||||||
|
parseEntry = parseEntry.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof parseEntry === 'string' && parseEntry.match(/^-{1,2}[\w-]+/)) {
|
||||||
|
const isSingleDash = parseEntry[0] === '-' && parseEntry[1] !== '-';
|
||||||
|
let name = parseEntry.replace(/^-{1,2}/, '');
|
||||||
|
|
||||||
|
if (!SUPPORTED_ARGS.includes(name)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
let value;
|
||||||
|
const nextEntry = parseEntries[i + 1];
|
||||||
|
if (isSingleDash && name.length > 1) {
|
||||||
|
// Handle squished arguments like -XPOST
|
||||||
|
value = name.slice(1);
|
||||||
|
name = name.slice(0, 1);
|
||||||
|
} else if (typeof nextEntry === 'string' && !nextEntry.startsWith('-')) {
|
||||||
|
// Next arg is not a flag, so assign it as the value
|
||||||
|
value = nextEntry;
|
||||||
|
i++; // Skip next one
|
||||||
|
} else {
|
||||||
|
value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
pairsByName[name] = pairsByName[name] || [];
|
||||||
|
pairsByName[name]!.push(value);
|
||||||
|
} else if (parseEntry) {
|
||||||
|
singletons.push(parseEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~ //
|
||||||
|
// Build the request //
|
||||||
|
// ~~~~~~~~~~~~~~~~~ //
|
||||||
|
|
||||||
|
// Url & parameters
|
||||||
|
|
||||||
|
let urlParameters: HttpUrlParameter[];
|
||||||
|
let url: string;
|
||||||
|
|
||||||
|
const urlArg = getPairValue(pairsByName, (singletons[0] as string) || '', ['url']);
|
||||||
|
const [baseUrl, search] = splitOnce(urlArg, '?');
|
||||||
|
urlParameters =
|
||||||
|
search?.split('&').map((p) => {
|
||||||
|
const v = splitOnce(p, '=');
|
||||||
|
return { name: v[0] ?? '', value: v[1] ?? '', enabled: true };
|
||||||
|
}) ?? [];
|
||||||
|
|
||||||
|
url = baseUrl ?? urlArg;
|
||||||
|
|
||||||
|
// Authentication
|
||||||
|
const [username, password] = getPairValue(pairsByName, '', ['u', 'user']).split(/:(.*)$/);
|
||||||
|
|
||||||
|
const isDigest = getPairValue(pairsByName, false, ['digest']);
|
||||||
|
const authenticationType = username ? (isDigest ? 'digest' : 'basic') : null;
|
||||||
|
const authentication = username
|
||||||
|
? {
|
||||||
|
username: username.trim(),
|
||||||
|
password: (password ?? '').trim(),
|
||||||
|
}
|
||||||
|
: {};
|
||||||
|
|
||||||
|
// Headers
|
||||||
|
const headers = [
|
||||||
|
...((pairsByName.header as string[] | undefined) || []),
|
||||||
|
...((pairsByName.H as string[] | undefined) || []),
|
||||||
|
].map((header) => {
|
||||||
|
const [name, value] = header.split(/:(.*)$/);
|
||||||
|
// remove final colon from header name if present
|
||||||
|
if (!value) {
|
||||||
|
return {
|
||||||
|
name: (name ?? '').trim().replace(/;$/, ''),
|
||||||
|
value: '',
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
name: (name ?? '').trim(),
|
||||||
|
value: value.trim(),
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// Cookies
|
||||||
|
const cookieHeaderValue = [
|
||||||
|
...((pairsByName.cookie as string[] | undefined) || []),
|
||||||
|
...((pairsByName.b as string[] | undefined) || []),
|
||||||
|
]
|
||||||
|
.map((str) => {
|
||||||
|
const name = str.split('=', 1)[0];
|
||||||
|
const value = str.replace(`${name}=`, '');
|
||||||
|
return `${name}=${value}`;
|
||||||
|
})
|
||||||
|
.join('; ');
|
||||||
|
|
||||||
|
// Convert cookie value to header
|
||||||
|
const existingCookieHeader = headers.find((header) => header.name.toLowerCase() === 'cookie');
|
||||||
|
|
||||||
|
if (cookieHeaderValue && existingCookieHeader) {
|
||||||
|
// Has existing cookie header, so let's update it
|
||||||
|
existingCookieHeader.value += `; ${cookieHeaderValue}`;
|
||||||
|
} else if (cookieHeaderValue) {
|
||||||
|
// No existing cookie header, so let's make a new one
|
||||||
|
headers.push({
|
||||||
|
name: 'Cookie',
|
||||||
|
value: cookieHeaderValue,
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
///Body (Text or Blob)
|
||||||
|
const dataParameters = pairsToDataParameters(pairsByName);
|
||||||
|
const contentTypeHeader = headers.find((header) => header.name.toLowerCase() === 'content-type');
|
||||||
|
const mimeType = contentTypeHeader ? contentTypeHeader.value.split(';')[0] : null;
|
||||||
|
|
||||||
|
// Body (Multipart Form Data)
|
||||||
|
const formDataParams = [
|
||||||
|
...((pairsByName.form as string[] | undefined) || []),
|
||||||
|
...((pairsByName.F as string[] | undefined) || []),
|
||||||
|
].map((str) => {
|
||||||
|
const parts = str.split('=');
|
||||||
|
const name = parts[0] ?? '';
|
||||||
|
const value = parts[1] ?? '';
|
||||||
|
const item: { name: string; value?: string; file?: string; enabled: boolean } = {
|
||||||
|
name,
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (value.indexOf('@') === 0) {
|
||||||
|
item.file = value.slice(1);
|
||||||
|
} else {
|
||||||
|
item.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Body
|
||||||
|
let body = {};
|
||||||
|
let bodyType: string | null = null;
|
||||||
|
const bodyAsGET = getPairValue(pairsByName, false, ['G', 'get']);
|
||||||
|
|
||||||
|
if (dataParameters.length > 0 && bodyAsGET) {
|
||||||
|
urlParameters.push(...dataParameters);
|
||||||
|
} else if (
|
||||||
|
dataParameters.length > 0 &&
|
||||||
|
(mimeType == null || mimeType === 'application/x-www-form-urlencoded')
|
||||||
|
) {
|
||||||
|
bodyType = mimeType ?? 'application/x-www-form-urlencoded';
|
||||||
|
body = {
|
||||||
|
form: dataParameters.map((parameter) => ({
|
||||||
|
...parameter,
|
||||||
|
name: decodeURIComponent(parameter.name || ''),
|
||||||
|
value: decodeURIComponent(parameter.value || ''),
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
headers.push({
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'application/x-www-form-urlencoded',
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
} else if (dataParameters.length > 0) {
|
||||||
|
bodyType =
|
||||||
|
mimeType === 'application/json' || mimeType === 'text/xml' || mimeType === 'text/plain'
|
||||||
|
? mimeType
|
||||||
|
: 'other';
|
||||||
|
body = {
|
||||||
|
text: dataParameters
|
||||||
|
.map(({ name, value }) => (name && value ? `${name}=${value}` : name || value))
|
||||||
|
.join('&'),
|
||||||
|
};
|
||||||
|
} else if (formDataParams.length) {
|
||||||
|
bodyType = mimeType ?? 'multipart/form-data';
|
||||||
|
body = {
|
||||||
|
form: formDataParams,
|
||||||
|
};
|
||||||
|
if (mimeType == null) {
|
||||||
|
headers.push({
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'multipart/form-data',
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method
|
||||||
|
let method = getPairValue(pairsByName, '', ['X', 'request']).toUpperCase();
|
||||||
|
|
||||||
|
if (method === '' && body) {
|
||||||
|
method = 'text' in body || 'form' in body ? 'POST' : 'GET';
|
||||||
|
}
|
||||||
|
|
||||||
|
const request: ExportResources['httpRequests'][0] = {
|
||||||
|
id: generateId('http_request'),
|
||||||
|
model: 'http_request',
|
||||||
|
workspaceId,
|
||||||
|
name: '',
|
||||||
|
urlParameters,
|
||||||
|
url,
|
||||||
|
method,
|
||||||
|
headers,
|
||||||
|
authentication,
|
||||||
|
authenticationType,
|
||||||
|
body,
|
||||||
|
bodyType,
|
||||||
|
folderId: null,
|
||||||
|
sortPriority: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pairsToDataParameters = (keyedPairs: PairsByName) => {
|
||||||
|
let dataParameters: {
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
contentType?: string;
|
||||||
|
filePath?: string;
|
||||||
|
enabled?: boolean;
|
||||||
|
}[] = [];
|
||||||
|
|
||||||
|
for (const flagName of DATA_FLAGS) {
|
||||||
|
const pairs = keyedPairs[flagName];
|
||||||
|
|
||||||
|
if (!pairs || pairs.length === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const p of pairs) {
|
||||||
|
if (typeof p !== 'string') continue;
|
||||||
|
|
||||||
|
const [name, value] = p.split('=');
|
||||||
|
if (p.startsWith('@')) {
|
||||||
|
// Yaak doesn't support files in url-encoded data, so
|
||||||
|
dataParameters.push({
|
||||||
|
name: name ?? '',
|
||||||
|
value: '',
|
||||||
|
filePath: p.slice(1),
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
dataParameters.push({
|
||||||
|
name: name ?? '',
|
||||||
|
value: flagName === 'data-urlencode' ? encodeURIComponent(value ?? '') : value ?? '',
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataParameters;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getPairValue = <T extends string | boolean>(
|
||||||
|
pairsByName: PairsByName,
|
||||||
|
defaultValue: T,
|
||||||
|
names: string[],
|
||||||
|
) => {
|
||||||
|
for (const name of names) {
|
||||||
|
if (pairsByName[name] && pairsByName[name]!.length) {
|
||||||
|
return pairsByName[name]![0] as T;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
function splitOnce(str: string, sep: string): string[] {
|
||||||
|
const index = str.indexOf(sep);
|
||||||
|
if (index > -1) {
|
||||||
|
return [str.slice(0, index), str.slice(index + 1)];
|
||||||
|
}
|
||||||
|
return [str];
|
||||||
|
}
|
||||||
|
|
||||||
|
const idCount: Partial<Record<Model['model'], number>> = {};
|
||||||
|
function generateId(model: Model['model']): string {
|
||||||
|
idCount[model] = (idCount[model] ?? -1) + 1;
|
||||||
|
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`;
|
||||||
|
}
|
||||||
@@ -0,0 +1,335 @@
|
|||||||
|
import { describe, expect, test } from 'vitest';
|
||||||
|
import { HttpRequest, Model, Workspace } from '../../../src-web/lib/models';
|
||||||
|
import { pluginHookImport } from '../src';
|
||||||
|
|
||||||
|
describe('importer-curl', () => {
|
||||||
|
test('Imports basic GET', () => {
|
||||||
|
expect(pluginHookImport('curl https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Explicit URL', () => {
|
||||||
|
expect(pluginHookImport('curl --url https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Missing URL', () => {
|
||||||
|
expect(pluginHookImport('curl -X POST')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
method: 'POST',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('URL between', () => {
|
||||||
|
expect(pluginHookImport('curl -v https://yaak.app -X POST')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Random flags', () => {
|
||||||
|
expect(pluginHookImport('curl --random -Z -Y -S --foo https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports --request method', () => {
|
||||||
|
expect(pluginHookImport('curl --request POST https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports -XPOST method', () => {
|
||||||
|
expect(pluginHookImport('curl -XPOST --request POST https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
method: 'POST',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports multiple requests', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookImport('curl \\\n https://yaak.app\necho "foo"\ncurl example.com;curl foo.com'),
|
||||||
|
).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({ url: 'https://yaak.app' }),
|
||||||
|
baseRequest({ url: 'example.com' }),
|
||||||
|
baseRequest({ url: 'foo.com' }),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports form data', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookImport('curl -X POST -F "a=aaa" -F b=bbb" -F f=@filepath https://yaak.app'),
|
||||||
|
).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'multipart/form-data',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: 'multipart/form-data',
|
||||||
|
body: {
|
||||||
|
form: [
|
||||||
|
{ enabled: true, name: 'a', value: 'aaa' },
|
||||||
|
{ enabled: true, name: 'b', value: 'bbb' },
|
||||||
|
{ enabled: true, name: 'f', file: 'filepath' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports data params as form url-encoded', () => {
|
||||||
|
expect(pluginHookImport('curl -d a -d b -d c=ccc https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
bodyType: 'application/x-www-form-urlencoded',
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'application/x-www-form-urlencoded',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
body: {
|
||||||
|
form: [
|
||||||
|
{ name: 'a', value: '', enabled: true },
|
||||||
|
{ name: 'b', value: '', enabled: true },
|
||||||
|
{ name: 'c', value: 'ccc', enabled: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports data params as text', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookImport('curl -H Content-Type:text/plain -d a -d b -d c=ccc https://yaak.app'),
|
||||||
|
).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
headers: [{ name: 'Content-Type', value: 'text/plain', enabled: true }],
|
||||||
|
bodyType: 'text/plain',
|
||||||
|
body: { text: 'a&b&c=ccc' },
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports multi-line JSON', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookImport(
|
||||||
|
`curl -H Content-Type:application/json -d $'{\n "foo":"bar"\n}' https://yaak.app`,
|
||||||
|
),
|
||||||
|
).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
headers: [{ name: 'Content-Type', value: 'application/json', enabled: true }],
|
||||||
|
bodyType: 'application/json',
|
||||||
|
body: { text: '{\n "foo":"bar"\n}' },
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports multiple headers', () => {
|
||||||
|
expect(
|
||||||
|
pluginHookImport('curl -H Foo:bar --header Name -H AAA:bbb -H :ccc https://yaak.app'),
|
||||||
|
).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
headers: [
|
||||||
|
{ name: 'Name', value: '', enabled: true },
|
||||||
|
{ name: 'Foo', value: 'bar', enabled: true },
|
||||||
|
{ name: 'AAA', value: 'bbb', enabled: true },
|
||||||
|
{ name: '', value: 'ccc', enabled: true },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports basic auth', () => {
|
||||||
|
expect(pluginHookImport('curl --user user:pass https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'basic',
|
||||||
|
authentication: {
|
||||||
|
username: 'user',
|
||||||
|
password: 'pass',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports digest auth', () => {
|
||||||
|
expect(pluginHookImport('curl --digest --user user:pass https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
authenticationType: 'digest',
|
||||||
|
authentication: {
|
||||||
|
username: 'user',
|
||||||
|
password: 'pass',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports cookie as header', () => {
|
||||||
|
expect(pluginHookImport('curl --cookie "foo=bar" https://yaak.app')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
headers: [{ name: 'Cookie', value: 'foo=bar', enabled: true }],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Imports query params from the URL', () => {
|
||||||
|
expect(pluginHookImport('curl "https://yaak.app?foo=bar&baz=a%20a"')).toEqual({
|
||||||
|
resources: {
|
||||||
|
workspaces: [baseWorkspace()],
|
||||||
|
httpRequests: [
|
||||||
|
baseRequest({
|
||||||
|
url: 'https://yaak.app',
|
||||||
|
urlParameters: [
|
||||||
|
{ name: 'foo', value: 'bar', enabled: true },
|
||||||
|
{ name: 'baz', value: 'a%20a', enabled: true },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const idCount: Partial<Record<Model['model'], number>> = {};
|
||||||
|
|
||||||
|
function baseRequest(mergeWith: Partial<HttpRequest>) {
|
||||||
|
idCount.http_request = (idCount.http_request ?? -1) + 1;
|
||||||
|
return {
|
||||||
|
id: `GENERATE_ID::HTTP_REQUEST_${idCount.http_request}`,
|
||||||
|
model: 'http_request',
|
||||||
|
authentication: {},
|
||||||
|
authenticationType: null,
|
||||||
|
body: {},
|
||||||
|
bodyType: null,
|
||||||
|
folderId: null,
|
||||||
|
headers: [],
|
||||||
|
method: 'GET',
|
||||||
|
name: '',
|
||||||
|
sortPriority: 0,
|
||||||
|
url: '',
|
||||||
|
urlParameters: [],
|
||||||
|
workspaceId: `GENERATE_ID::WORKSPACE_${idCount.workspace}`,
|
||||||
|
...mergeWith,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function baseWorkspace(mergeWith: Partial<Workspace> = {}) {
|
||||||
|
idCount.workspace = (idCount.workspace ?? -1) + 1;
|
||||||
|
return {
|
||||||
|
id: `GENERATE_ID::WORKSPACE_${idCount.workspace}`,
|
||||||
|
model: 'workspace',
|
||||||
|
name: 'Curl Import',
|
||||||
|
...mergeWith,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/importer-curl'),
|
||||||
|
},
|
||||||
|
});
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-insomnia",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "importer-insomnia",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"yaml": "^2.4.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/yaml": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
|
||||||
|
"bin": {
|
||||||
|
"yaml": "bin.mjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-insomnia",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"dependencies": {
|
||||||
|
"yaml": "^2.4.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,278 @@
|
|||||||
|
import {
|
||||||
|
Environment,
|
||||||
|
Folder,
|
||||||
|
GrpcRequest,
|
||||||
|
HttpRequest,
|
||||||
|
Workspace,
|
||||||
|
} from '../../../src-web/lib/models';
|
||||||
|
import { parse as parseYaml } from 'yaml';
|
||||||
|
|
||||||
|
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
|
||||||
|
|
||||||
|
export interface ExportResources {
|
||||||
|
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
||||||
|
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
grpcRequests: AtLeast<GrpcRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function pluginHookImport(contents: string) {
|
||||||
|
let parsed: any;
|
||||||
|
|
||||||
|
try {
|
||||||
|
parsed = JSON.parse(contents);
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
parsed = parseYaml(contents);
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
if (!isJSObject(parsed)) return;
|
||||||
|
if (!Array.isArray(parsed.resources)) return;
|
||||||
|
|
||||||
|
const resources: ExportResources = {
|
||||||
|
workspaces: [],
|
||||||
|
httpRequests: [],
|
||||||
|
grpcRequests: [],
|
||||||
|
environments: [],
|
||||||
|
folders: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
// Import workspaces
|
||||||
|
const workspacesToImport = parsed.resources.filter(isWorkspace);
|
||||||
|
for (const workspaceToImport of workspacesToImport) {
|
||||||
|
const baseEnvironment = parsed.resources.find(
|
||||||
|
(r: any) => isEnvironment(r) && r.parentId === workspaceToImport._id,
|
||||||
|
);
|
||||||
|
resources.workspaces.push({
|
||||||
|
id: convertId(workspaceToImport._id),
|
||||||
|
createdAt: new Date(workspacesToImport.created ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
updatedAt: new Date(workspacesToImport.updated ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
model: 'workspace',
|
||||||
|
name: workspaceToImport.name,
|
||||||
|
variables: baseEnvironment ? parseVariables(baseEnvironment.data) : [],
|
||||||
|
});
|
||||||
|
const environmentsToImport = parsed.resources.filter(
|
||||||
|
(r: any) => isEnvironment(r) && r.parentId === baseEnvironment?._id,
|
||||||
|
);
|
||||||
|
resources.environments.push(
|
||||||
|
...environmentsToImport.map((r: any) => importEnvironment(r, workspaceToImport._id)),
|
||||||
|
);
|
||||||
|
|
||||||
|
const nextFolder = (parentId: string) => {
|
||||||
|
const children = parsed.resources.filter((r: any) => r.parentId === parentId);
|
||||||
|
let sortPriority = 0;
|
||||||
|
for (const child of children) {
|
||||||
|
if (isRequestGroup(child)) {
|
||||||
|
resources.folders.push(importFolder(child, workspaceToImport._id));
|
||||||
|
nextFolder(child._id);
|
||||||
|
} else if (isHttpRequest(child)) {
|
||||||
|
resources.httpRequests.push(
|
||||||
|
importHttpRequest(child, workspaceToImport._id, sortPriority++),
|
||||||
|
);
|
||||||
|
} else if (isGrpcRequest(child)) {
|
||||||
|
resources.grpcRequests.push(
|
||||||
|
importGrpcRequest(child, workspaceToImport._id, sortPriority++),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Import folders
|
||||||
|
nextFolder(workspaceToImport._id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter out any `null` values
|
||||||
|
resources.httpRequests = resources.httpRequests.filter(Boolean);
|
||||||
|
resources.grpcRequests = resources.grpcRequests.filter(Boolean);
|
||||||
|
resources.environments = resources.environments.filter(Boolean);
|
||||||
|
resources.workspaces = resources.workspaces.filter(Boolean);
|
||||||
|
|
||||||
|
return { resources };
|
||||||
|
}
|
||||||
|
|
||||||
|
function importEnvironment(e: any, workspaceId: string): ExportResources['environments'][0] {
|
||||||
|
return {
|
||||||
|
id: convertId(e._id),
|
||||||
|
createdAt: new Date(e.created ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
updatedAt: new Date(e.updated ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
workspaceId: convertId(workspaceId),
|
||||||
|
model: 'environment',
|
||||||
|
name: e.name,
|
||||||
|
variables: Object.entries(e.data).map(([name, value]) => ({
|
||||||
|
enabled: true,
|
||||||
|
name,
|
||||||
|
value: `${value}`,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function importFolder(f: any, workspaceId: string): ExportResources['folders'][0] {
|
||||||
|
return {
|
||||||
|
id: convertId(f._id),
|
||||||
|
createdAt: new Date(f.created ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
updatedAt: new Date(f.updated ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
folderId: f.parentId === workspaceId ? null : convertId(f.parentId),
|
||||||
|
workspaceId: convertId(workspaceId),
|
||||||
|
model: 'folder',
|
||||||
|
name: f.name,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function importGrpcRequest(
|
||||||
|
r: any,
|
||||||
|
workspaceId: string,
|
||||||
|
sortPriority = 0,
|
||||||
|
): ExportResources['grpcRequests'][0] {
|
||||||
|
const parts = r.protoMethodName.split('/').filter((p: any) => p !== '');
|
||||||
|
const service = parts[0] ?? null;
|
||||||
|
const method = parts[1] ?? null;
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: convertId(r._id),
|
||||||
|
createdAt: new Date(r.created ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
updatedAt: new Date(r.updated ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
workspaceId: convertId(workspaceId),
|
||||||
|
folderId: r.parentId === workspaceId ? null : convertId(r.parentId),
|
||||||
|
model: 'grpc_request',
|
||||||
|
sortPriority,
|
||||||
|
name: r.name,
|
||||||
|
url: convertSyntax(r.url),
|
||||||
|
service,
|
||||||
|
method,
|
||||||
|
message: r.body?.text ?? '',
|
||||||
|
metadata: (r.metadata ?? [])
|
||||||
|
.map((h: any) => ({
|
||||||
|
enabled: !h.disabled,
|
||||||
|
name: h.name ?? '',
|
||||||
|
value: h.value ?? '',
|
||||||
|
}))
|
||||||
|
.filter(({ name, value }: any) => name !== '' || value !== ''),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function importHttpRequest(
|
||||||
|
r: any,
|
||||||
|
workspaceId: string,
|
||||||
|
sortPriority = 0,
|
||||||
|
): ExportResources['httpRequests'][0] {
|
||||||
|
let bodyType = null;
|
||||||
|
let body = {};
|
||||||
|
if (r.body.mimeType === 'application/octet-stream') {
|
||||||
|
bodyType = 'binary';
|
||||||
|
body = { filePath: r.body.fileName ?? '' };
|
||||||
|
} else if (r.body?.mimeType === 'application/x-www-form-urlencoded') {
|
||||||
|
bodyType = 'application/x-www-form-urlencoded';
|
||||||
|
body = {
|
||||||
|
form: (r.body.params ?? []).map((p: any) => ({
|
||||||
|
enabled: !p.disabled,
|
||||||
|
name: p.name ?? '',
|
||||||
|
value: p.value ?? '',
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
} else if (r.body?.mimeType === 'multipart/form-data') {
|
||||||
|
bodyType = 'multipart/form-data';
|
||||||
|
body = {
|
||||||
|
form: (r.body.params ?? []).map((p: any) => ({
|
||||||
|
enabled: !p.disabled,
|
||||||
|
name: p.name ?? '',
|
||||||
|
value: p.value ?? '',
|
||||||
|
file: p.fileName ?? null,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
} else if (r.body?.mimeType === 'application/graphql') {
|
||||||
|
bodyType = 'graphql';
|
||||||
|
body = { text: convertSyntax(r.body.text ?? '') };
|
||||||
|
} else if (r.body?.mimeType === 'application/json') {
|
||||||
|
bodyType = 'application/json';
|
||||||
|
body = { text: convertSyntax(r.body.text ?? '') };
|
||||||
|
}
|
||||||
|
|
||||||
|
let authenticationType = null;
|
||||||
|
let authentication = {};
|
||||||
|
if (r.authentication.type === 'bearer') {
|
||||||
|
authenticationType = 'bearer';
|
||||||
|
authentication = {
|
||||||
|
token: convertSyntax(r.authentication.token),
|
||||||
|
};
|
||||||
|
} else if (r.authentication.type === 'basic') {
|
||||||
|
authenticationType = 'basic';
|
||||||
|
authentication = {
|
||||||
|
username: convertSyntax(r.authentication.username),
|
||||||
|
password: convertSyntax(r.authentication.password),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: convertId(r._id),
|
||||||
|
createdAt: new Date(r.created ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
updatedAt: new Date(r.updated ?? Date.now()).toISOString().replace('Z', ''),
|
||||||
|
workspaceId: convertId(workspaceId),
|
||||||
|
folderId: r.parentId === workspaceId ? null : convertId(r.parentId),
|
||||||
|
model: 'http_request',
|
||||||
|
sortPriority,
|
||||||
|
name: r.name,
|
||||||
|
url: convertSyntax(r.url),
|
||||||
|
body,
|
||||||
|
bodyType,
|
||||||
|
authentication,
|
||||||
|
authenticationType,
|
||||||
|
method: r.method,
|
||||||
|
headers: (r.headers ?? [])
|
||||||
|
.map((h: any) => ({
|
||||||
|
enabled: !h.disabled,
|
||||||
|
name: h.name ?? '',
|
||||||
|
value: h.value ?? '',
|
||||||
|
}))
|
||||||
|
.filter(({ name, value }: any) => name !== '' || value !== ''),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseVariables(data: Record<string, string>) {
|
||||||
|
return Object.entries(data).map(([name, value]) => ({
|
||||||
|
enabled: true,
|
||||||
|
name,
|
||||||
|
value: `${value}`,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertSyntax(variable: string): string {
|
||||||
|
if (!isJSString(variable)) return variable;
|
||||||
|
return variable.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}');
|
||||||
|
}
|
||||||
|
|
||||||
|
function isWorkspace(obj: any) {
|
||||||
|
return isJSObject(obj) && obj._type === 'workspace';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isRequestGroup(obj: any) {
|
||||||
|
return isJSObject(obj) && obj._type === 'request_group';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isHttpRequest(obj: any) {
|
||||||
|
return isJSObject(obj) && obj._type === 'request';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isGrpcRequest(obj: any) {
|
||||||
|
return isJSObject(obj) && obj._type === 'grpc_request';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isEnvironment(obj: any) {
|
||||||
|
return isJSObject(obj) && obj._type === 'environment';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isJSObject(obj: any) {
|
||||||
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isJSString(obj: any) {
|
||||||
|
return Object.prototype.toString.call(obj) === '[object String]';
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertId(id: string): string {
|
||||||
|
if (id.startsWith('GENERATE_ID::')) {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
return `GENERATE_ID::${id}`;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/importer-insomnia'),
|
||||||
|
},
|
||||||
|
});
|
||||||
+1505
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-postman",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"devDependencies": {
|
||||||
|
"vitest": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
import { Environment, Folder, HttpRequest, Model, Workspace } from '../../../src-web/lib/models';
|
||||||
|
|
||||||
|
const POSTMAN_2_1_0_SCHEMA = 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json';
|
||||||
|
const POSTMAN_2_0_0_SCHEMA = 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json';
|
||||||
|
const VALID_SCHEMAS = [POSTMAN_2_0_0_SCHEMA, POSTMAN_2_1_0_SCHEMA];
|
||||||
|
|
||||||
|
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
|
||||||
|
|
||||||
|
interface ExportResources {
|
||||||
|
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
||||||
|
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function pluginHookImport(contents: string): { resources: ExportResources } | undefined {
|
||||||
|
const root = parseJSONToRecord(contents);
|
||||||
|
if (root == null) return;
|
||||||
|
|
||||||
|
const info = toRecord(root.info);
|
||||||
|
const isValidSchema = VALID_SCHEMAS.includes(info.schema);
|
||||||
|
if (!isValidSchema || !Array.isArray(root.item)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const globalAuth = importAuth(root.auth);
|
||||||
|
|
||||||
|
const exportResources: ExportResources = {
|
||||||
|
workspaces: [],
|
||||||
|
environments: [],
|
||||||
|
httpRequests: [],
|
||||||
|
folders: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
const workspace: ExportResources['workspaces'][0] = {
|
||||||
|
model: 'workspace',
|
||||||
|
id: generateId('workspace'),
|
||||||
|
name: info.name || 'Postman Import',
|
||||||
|
description: info.description || '',
|
||||||
|
variables:
|
||||||
|
root.variable?.map((v: any) => ({
|
||||||
|
name: v.key,
|
||||||
|
value: v.value,
|
||||||
|
})) ?? [],
|
||||||
|
};
|
||||||
|
exportResources.workspaces.push(workspace);
|
||||||
|
|
||||||
|
const importItem = (v: Record<string, any>, folderId: string | null = null) => {
|
||||||
|
if (typeof v.name === 'string' && Array.isArray(v.item)) {
|
||||||
|
const folder: ExportResources['folders'][0] = {
|
||||||
|
model: 'folder',
|
||||||
|
workspaceId: workspace.id,
|
||||||
|
id: generateId('folder'),
|
||||||
|
name: v.name,
|
||||||
|
folderId,
|
||||||
|
};
|
||||||
|
exportResources.folders.push(folder);
|
||||||
|
for (const child of v.item) {
|
||||||
|
importItem(child, folder.id);
|
||||||
|
}
|
||||||
|
} else if (typeof v.name === 'string' && 'request' in v) {
|
||||||
|
const r = toRecord(v.request);
|
||||||
|
const bodyPatch = importBody(r.body);
|
||||||
|
const requestAuthPath = importAuth(r.auth);
|
||||||
|
const authPatch = requestAuthPath.authenticationType == null ? globalAuth : requestAuthPath;
|
||||||
|
const request: ExportResources['httpRequests'][0] = {
|
||||||
|
model: 'http_request',
|
||||||
|
id: generateId('http_request'),
|
||||||
|
workspaceId: workspace.id,
|
||||||
|
folderId,
|
||||||
|
name: v.name,
|
||||||
|
method: r.method || 'GET',
|
||||||
|
url: typeof r.url === 'string' ? r.url : toRecord(r.url).raw,
|
||||||
|
body: bodyPatch.body,
|
||||||
|
bodyType: bodyPatch.bodyType,
|
||||||
|
authentication: authPatch.authentication,
|
||||||
|
authenticationType: authPatch.authenticationType,
|
||||||
|
headers: [
|
||||||
|
...bodyPatch.headers,
|
||||||
|
...authPatch.headers,
|
||||||
|
...toArray(r.header).map((h) => {
|
||||||
|
return {
|
||||||
|
name: h.key,
|
||||||
|
value: h.value,
|
||||||
|
enabled: !h.disabled,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
exportResources.httpRequests.push(request);
|
||||||
|
} else {
|
||||||
|
console.log('Unknown item', v, folderId);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const item of root.item) {
|
||||||
|
importItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return { resources: convertTemplateSyntax(exportResources) };
|
||||||
|
}
|
||||||
|
|
||||||
|
function importAuth(
|
||||||
|
rawAuth: any,
|
||||||
|
): Pick<HttpRequest, 'authentication' | 'authenticationType' | 'headers'> {
|
||||||
|
const auth = toRecord(rawAuth);
|
||||||
|
if ('basic' in auth) {
|
||||||
|
return {
|
||||||
|
headers: [],
|
||||||
|
authenticationType: 'basic',
|
||||||
|
authentication: {
|
||||||
|
username: auth.basic.username || '',
|
||||||
|
password: auth.basic.password || '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else if ('bearer' in auth) {
|
||||||
|
return {
|
||||||
|
headers: [],
|
||||||
|
authenticationType: 'bearer',
|
||||||
|
authentication: {
|
||||||
|
token: auth.bearer.token || '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// TODO: support other auth types
|
||||||
|
return { headers: [], authenticationType: null, authentication: {} };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function importBody(rawBody: any): Pick<HttpRequest, 'body' | 'bodyType' | 'headers'> {
|
||||||
|
const body = toRecord(rawBody);
|
||||||
|
if ('graphql' in body) {
|
||||||
|
return {
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'application/json',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: 'graphql',
|
||||||
|
body: {
|
||||||
|
text: JSON.stringify(
|
||||||
|
{ query: body.graphql.query, variables: parseJSONToRecord(body.graphql.variables) },
|
||||||
|
null,
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else if ('urlencoded' in body) {
|
||||||
|
return {
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'application/x-www-form-urlencoded',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: 'application/x-www-form-urlencoded',
|
||||||
|
body: {
|
||||||
|
form: toArray(body.urlencoded).map((f) => ({
|
||||||
|
enabled: !f.disabled,
|
||||||
|
name: f.key ?? '',
|
||||||
|
value: f.value ?? '',
|
||||||
|
})),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else if ('formdata' in body) {
|
||||||
|
return {
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: 'multipart/form-data',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: 'multipart/form-data',
|
||||||
|
body: {
|
||||||
|
form: toArray(body.formdata).map((f) =>
|
||||||
|
f.src != null
|
||||||
|
? {
|
||||||
|
enabled: !f.disabled,
|
||||||
|
name: f.key ?? '',
|
||||||
|
file: f.src ?? '',
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
enabled: !f.disabled,
|
||||||
|
name: f.key ?? '',
|
||||||
|
value: f.value ?? '',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else if ('raw' in body) {
|
||||||
|
return {
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: body.options?.raw?.language === 'json' ? 'application/json' : '',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: body.options?.raw?.language === 'json' ? 'application/json' : 'other',
|
||||||
|
body: {
|
||||||
|
text: body.raw ?? '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// TODO: support other body types
|
||||||
|
return { headers: [], bodyType: null, body: {} };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseJSONToRecord(jsonStr: string): Record<string, any> | null {
|
||||||
|
try {
|
||||||
|
return toRecord(JSON.parse(jsonStr));
|
||||||
|
} catch (err) {}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toRecord(value: any): Record<string, any> {
|
||||||
|
if (Object.prototype.toString.call(value) === '[object Object]') return value;
|
||||||
|
else return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
function toArray(value: any): any[] {
|
||||||
|
if (Object.prototype.toString.call(value) === '[object Array]') return value;
|
||||||
|
else return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Recursively render all nested object properties */
|
||||||
|
function convertTemplateSyntax<T>(obj: T): T {
|
||||||
|
if (typeof obj === 'string') {
|
||||||
|
return obj.replace(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}') as T;
|
||||||
|
} else if (Array.isArray(obj) && obj != null) {
|
||||||
|
return obj.map(convertTemplateSyntax) as T;
|
||||||
|
} else if (typeof obj === 'object' && obj != null) {
|
||||||
|
return Object.fromEntries(
|
||||||
|
Object.entries(obj).map(([k, v]) => [k, convertTemplateSyntax(v)]),
|
||||||
|
) as T;
|
||||||
|
} else {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const idCount: Partial<Record<Model['model'], number>> = {};
|
||||||
|
function generateId(model: Model['model']): string {
|
||||||
|
idCount[model] = (idCount[model] ?? -1) + 1;
|
||||||
|
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"info": {
|
||||||
|
"_postman_id": "9e6dfada-256c-49ea-a38f-7d1b05b7ca2d",
|
||||||
|
"name": "New Collection",
|
||||||
|
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
|
||||||
|
"_exporter_id": "18798"
|
||||||
|
},
|
||||||
|
"item": [
|
||||||
|
{
|
||||||
|
"name": "Top Folder",
|
||||||
|
"item": [
|
||||||
|
{
|
||||||
|
"name": "Nested Folder",
|
||||||
|
"item": [
|
||||||
|
{
|
||||||
|
"name": "Request 1",
|
||||||
|
"request": {
|
||||||
|
"method": "GET"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Request 2",
|
||||||
|
"request": {
|
||||||
|
"method": "GET"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Request 3",
|
||||||
|
"request": {
|
||||||
|
"method": "GET"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
import * as fs from 'node:fs';
|
||||||
|
import * as path from 'node:path';
|
||||||
|
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
||||||
|
import { Model } from '../../../src-web/lib/models';
|
||||||
|
import { pluginHookImport } from '../src';
|
||||||
|
|
||||||
|
let originalRandom = Math.random;
|
||||||
|
|
||||||
|
describe('importer-postman', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
let i = 0;
|
||||||
|
// Psuedo-random number generator to ensure consistent ID generation
|
||||||
|
Math.random = vi.fn(() => ((i++ * 1000) % 133) / 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
Math.random = originalRandom;
|
||||||
|
});
|
||||||
|
|
||||||
|
const p = path.join(__dirname, 'fixtures');
|
||||||
|
const fixtures = fs.readdirSync(p);
|
||||||
|
|
||||||
|
for (const fixture of fixtures) {
|
||||||
|
test('Imports ' + fixture, () => {
|
||||||
|
const contents = fs.readFileSync(path.join(p, fixture), 'utf-8');
|
||||||
|
const imported = pluginHookImport(contents);
|
||||||
|
const folder0 = newId('folder');
|
||||||
|
const folder1 = newId('folder');
|
||||||
|
expect(imported).toEqual({
|
||||||
|
resources: expect.objectContaining({
|
||||||
|
workspaces: [
|
||||||
|
expect.objectContaining({
|
||||||
|
id: newId('workspace'),
|
||||||
|
model: 'workspace',
|
||||||
|
name: 'New Collection',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
folders: expect.arrayContaining([
|
||||||
|
expect.objectContaining({
|
||||||
|
id: folder0,
|
||||||
|
model: 'folder',
|
||||||
|
workspaceId: existingId('workspace'),
|
||||||
|
name: 'Top Folder',
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
folderId: folder0,
|
||||||
|
id: folder1,
|
||||||
|
model: 'folder',
|
||||||
|
workspaceId: existingId('workspace'),
|
||||||
|
name: 'Nested Folder',
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
httpRequests: expect.arrayContaining([
|
||||||
|
expect.objectContaining({
|
||||||
|
id: newId('http_request'),
|
||||||
|
model: 'http_request',
|
||||||
|
name: 'Request 1',
|
||||||
|
workspaceId: existingId('workspace'),
|
||||||
|
folderId: folder1,
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
id: newId('http_request'),
|
||||||
|
model: 'http_request',
|
||||||
|
name: 'Request 2',
|
||||||
|
workspaceId: existingId('workspace'),
|
||||||
|
folderId: folder0,
|
||||||
|
}),
|
||||||
|
expect.objectContaining({
|
||||||
|
id: newId('http_request'),
|
||||||
|
model: 'http_request',
|
||||||
|
name: 'Request 3',
|
||||||
|
workspaceId: existingId('workspace'),
|
||||||
|
folderId: null,
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const idCount: Partial<Record<Model['model'], number>> = {};
|
||||||
|
function newId(model: Model['model']): string {
|
||||||
|
idCount[model] = (idCount[model] ?? -1) + 1;
|
||||||
|
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function existingId(model: Model['model']): string {
|
||||||
|
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model] ?? 0}`;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ESNext",
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": [
|
||||||
|
"ESNext",
|
||||||
|
],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./src"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/importer-postman'),
|
||||||
|
},
|
||||||
|
});
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-yaak",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "importer-yaak",
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "importer-yaak",
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
export function pluginHookImport(contents: string) {
|
||||||
|
let parsed;
|
||||||
|
try {
|
||||||
|
parsed = JSON.parse(contents);
|
||||||
|
} catch (err) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isJSObject(parsed)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isYaakExport = 'yaakSchema' in parsed;
|
||||||
|
if (!isYaakExport) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Migrate v1 to v2 -- changes requests to httpRequests
|
||||||
|
if ('requests' in parsed.resources) {
|
||||||
|
parsed.resources.httpRequests = parsed.resources.requests;
|
||||||
|
delete parsed.resources.requests;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { resources: parsed.resources }; // Should already be in the correct format
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isJSObject(obj: any) {
|
||||||
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import { describe, expect, test } from 'vitest';
|
||||||
|
import { pluginHookImport } from '../src';
|
||||||
|
|
||||||
|
describe('importer-yaak', () => {
|
||||||
|
test('Skips invalid imports', () => {
|
||||||
|
expect(pluginHookImport('not JSON')).toBeUndefined();
|
||||||
|
expect(pluginHookImport('[]')).toBeUndefined();
|
||||||
|
expect(pluginHookImport(JSON.stringify({ resources: {} }))).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('converts schema 1 to 2', () => {
|
||||||
|
const imported = pluginHookImport(
|
||||||
|
JSON.stringify({
|
||||||
|
yaakSchema: 1,
|
||||||
|
resources: {
|
||||||
|
requests: [],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(imported).toEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
resources: {
|
||||||
|
httpRequests: [],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { resolve } from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
|
fileName: 'index',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
outDir: resolve(__dirname, '../../src-tauri/plugins/importer-yaak'),
|
||||||
|
},
|
||||||
|
});
|
||||||
+5
-4
@@ -1,6 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: [
|
||||||
tailwindcss: {},
|
require('@tailwindcss/nesting')(require('postcss-nesting')),
|
||||||
autoprefixer: {},
|
require('tailwindcss'),
|
||||||
},
|
require('autoprefixer'),
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
name = "rsw"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
|
||||||
#! time interval for file changes to trigger wasm-pack build, default `50` milliseconds
|
|
||||||
interval = 50
|
|
||||||
|
|
||||||
#! link
|
|
||||||
#! npm link @see https://docs.npmjs.com/cli/v8/commands/npm-link
|
|
||||||
#! yarn link @see https://classic.yarnpkg.com/en/docs/cli/link
|
|
||||||
#! pnpm link @see https://pnpm.io/cli/link
|
|
||||||
#! The link command will only be executed if `[[crates]] link = true`
|
|
||||||
#! cli: `npm` | `yarn` | `pnpm`, default is `npm`
|
|
||||||
cli = "npm"
|
|
||||||
|
|
||||||
#! ---------------------------
|
|
||||||
|
|
||||||
#! rsw new <name>
|
|
||||||
[new]
|
|
||||||
#! @see https://rustwasm.github.io/docs/wasm-pack/commands/new.html
|
|
||||||
#! using: `wasm-pack` | `rsw` | `user`, default is `wasm-pack`
|
|
||||||
#! 1. wasm-pack: `rsw new <name> --template <template> --mode <normal|noinstall|force>`
|
|
||||||
#! 2. rsw: `rsw new <name>`, built-in templates
|
|
||||||
#! 3. user: `rsw new <name>`, if `dir` is not configured, use `wasm-pack new <name>` to initialize the project
|
|
||||||
using = "wasm-pack"
|
|
||||||
#! this field needs to be configured when `using = "user"`
|
|
||||||
#! `using = "wasm-pack"` or `using = "rsw"`, this field will be ignored
|
|
||||||
#! copy all files in this directory
|
|
||||||
dir = "my-template"
|
|
||||||
|
|
||||||
#! ################# NPM Package #################
|
|
||||||
|
|
||||||
#! When there is only `name`, other fields will use the default configuration
|
|
||||||
|
|
||||||
#! 📦 -------- package: @rsw --------
|
|
||||||
[[crates]]
|
|
||||||
#! npm package name (path: $ROOT/@rsw)
|
|
||||||
name = "src-wasm/hello"
|
|
||||||
#! run `npm link`: `true` | `false`, default is `false`
|
|
||||||
link = true
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
edition = "2018"
|
||||||
Generated
+50
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT model, created_at, updated_at, namespace, key, value\n FROM key_values\n WHERE namespace = ? AND key = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "namespace",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "key",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "06aaf8f4a17566f1d25da2a60f0baf4b5fc28c3cf0c001a84e25edf9eab3c7e3"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM http_responses\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "07d1a1c7b4f3d9625a766e60fd57bb779b71dae30e5bbce34885a911a5a42428"
|
||||||
|
}
|
||||||
Generated
+116
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, updated_at, created_at, url, status,\n status_reason, content_length, body_path, elapsed, elapsed_headers, error,\n version, remote_addr,\n headers AS \"headers!: sqlx::types::Json<Vec<HttpResponseHeader>>\"\n FROM http_responses\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status_reason",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content_length",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body_path",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed_headers",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "version",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "remote_addr",
|
||||||
|
"ordinal": 15,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "headers!: sqlx::types::Json<Vec<HttpResponseHeader>>",
|
||||||
|
"ordinal": 16,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "0fa6b56f8c996d14908a56928674b4b35af5fa36f63dc48b9b66ee6dfde78976"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO http_requests (\n id, workspace_id, folder_id, name, url, url_parameters, method, body, body_type,\n authentication, authentication_type, headers, sort_priority\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n folder_id = excluded.folder_id,\n method = excluded.method,\n headers = excluded.headers,\n body = excluded.body,\n body_type = excluded.body_type,\n authentication = excluded.authentication,\n authentication_type = excluded.authentication_type,\n url = excluded.url,\n url_parameters = excluded.url_parameters,\n sort_priority = excluded.sort_priority\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 13
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "11394af12419cca3be3a26dff9275514ea2a44504e3c7a568a9578c64b5713d1"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO workspaces (\n id, name, description, variables, setting_request_timeout,\n setting_follow_redirects, setting_validate_certificates\n )\n VALUES (?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n description = excluded.description,\n variables = excluded.variables,\n setting_request_timeout = excluded.setting_request_timeout,\n setting_follow_redirects = excluded.setting_follow_redirects,\n setting_validate_certificates = excluded.setting_validate_certificates\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "12b265491d1ebba19e1ce8a660e458ffbcd8c0850aef16ba1f70e358623ac66a"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO environments (\n id, workspace_id, name, variables\n )\n VALUES (?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n variables = excluded.variables\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "13cb883199e81966174e6fda9c252bf7213fe01b5346266c0a89dc0ac89eda64"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO grpc_events (\n id, workspace_id, request_id, connection_id, content, event_type, metadata,\n status, error\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n content = excluded.content,\n event_type = excluded.event_type,\n metadata = excluded.metadata,\n status = excluded.status,\n error = excluded.error\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 9
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "14930955e8a914e292dfbebfce2ea43cc41c1d517386ed816c16d436bf626bf3"
|
||||||
|
}
|
||||||
Generated
+104
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, folder_id, created_at, updated_at, name, sort_priority,\n url, service, method, message, authentication_type,\n authentication AS \"authentication!: Json<HashMap<String, JsonValue>>\",\n metadata AS \"metadata!: sqlx::types::Json<Vec<GrpcMetadataEntry>>\"\n FROM grpc_requests\n WHERE workspace_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Float"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "service",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication_type",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "metadata!: sqlx::types::Json<Vec<GrpcMetadataEntry>>",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "1821c2f60b9fa4514d58eb73b23e25ad683b80b9bd0c2944063190a0d0a19ee5"
|
||||||
|
}
|
||||||
Generated
+80
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, connection_id, created_at, content, status, error,\n event_type AS \"event_type!: GrpcEventType\",\n metadata AS \"metadata!: sqlx::types::Json<HashMap<String, String>>\"\n FROM grpc_events\n WHERE connection_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connection_id",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "event_type!: GrpcEventType",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "metadata!: sqlx::types::Json<HashMap<String, String>>",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "18ada3bb42c29f1940ab2e61961d79cdd69210f3dc2076aedcadeba8e34dcb6e"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO settings (id)\n VALUES ('default')\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2c181a4dc13efc52fe6a5a68291c5678a9624020df4ea744e78396f6926d5c88"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO http_responses (\n id, request_id, workspace_id, elapsed, elapsed_headers, url, status, status_reason,\n content_length, body_path, headers, version, remote_addr\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 13
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2c9658a639c5e4994ae9c8ec30bd4e40a1945d640962991f879928619950ef62"
|
||||||
|
}
|
||||||
Generated
+92
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, created_at, updated_at, service,\n method, elapsed, status, error, url,\n trailers AS \"trailers!: sqlx::types::Json<HashMap<String, String>>\"\n FROM grpc_connections\n WHERE request_id = ?\n ORDER BY created_at DESC\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "service",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "trailers!: sqlx::types::Json<HashMap<String, String>>",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "3e8651cca7feecc208a676dfd24c7d8775040d5287c16890056dcb474674edfb"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM grpc_connections\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "42bc0ded60b44dab19daf6d8fc7df83d83af5d88ea0b84514fdc877a668c27cd"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM http_requests\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "448a1d1f1866ab42c0f81fcf8eb2930bf21dfdd43ca4831bc1a198cf45ac3732"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO grpc_requests (\n id, name, workspace_id, folder_id, sort_priority, url, service, method, message,\n authentication_type, authentication, metadata\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n folder_id = excluded.folder_id,\n sort_priority = excluded.sort_priority,\n url = excluded.url,\n service = excluded.service,\n method = excluded.method,\n message = excluded.message,\n authentication_type = excluded.authentication_type,\n authentication = excluded.authentication,\n metadata = excluded.metadata\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 12
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "467b87ad1209a4653b1dc8462d79236a655240c5b402fa9fd75c12ebd9bb6b86"
|
||||||
|
}
|
||||||
Generated
+62
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, created_at, updated_at, folder_id, name, sort_priority\n FROM folders\n WHERE workspace_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Float"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "558e72df3c6f2635c6b3d52a199f9a5f7a3d82b379ff9af36645dcfb92548fdd"
|
||||||
|
}
|
||||||
Generated
+110
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, folder_id, created_at, updated_at, name, url, method,\n body_type, authentication_type, sort_priority,\n url_parameters AS \"url_parameters!: sqlx::types::Json<Vec<HttpUrlParameter>>\",\n body AS \"body!: Json<HashMap<String, JsonValue>>\",\n authentication AS \"authentication!: Json<HashMap<String, JsonValue>>\",\n headers AS \"headers!: sqlx::types::Json<Vec<HttpRequestHeader>>\"\n FROM http_requests\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body_type",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication_type",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Float"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url_parameters!: sqlx::types::Json<Vec<HttpUrlParameter>>",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "headers!: sqlx::types::Json<Vec<HttpRequestHeader>>",
|
||||||
|
"ordinal": 15,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "573db23160de025e5c72efb90be7fff5e3ec4619b962d149fdd4d618fe02c680"
|
||||||
|
}
|
||||||
Generated
+56
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, created_at, updated_at, name,\n variables AS \"variables!: sqlx::types::Json<Vec<EnvironmentVariable>>\"\n FROM environments\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variables!: sqlx::types::Json<Vec<EnvironmentVariable>>",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "5765e9565a8b89c5bc2d72197e0e4a1093739e9abba69f6fe5527d453fab4db8"
|
||||||
|
}
|
||||||
Generated
+56
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, created_at, updated_at, workspace_id, name,\n cookies AS \"cookies!: sqlx::types::Json<Vec<JsonValue>>\"\n FROM cookie_jars WHERE workspace_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cookies!: sqlx::types::Json<Vec<JsonValue>>",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "612efa9ac45723dc604a88f5e7e288b4055fec4ba7d9102131bd255c037fa021"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO grpc_connections (\n id, workspace_id, request_id, service, method, elapsed,\n status, error, trailers, url\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n service = excluded.service,\n method = excluded.method,\n elapsed = excluded.elapsed,\n status = excluded.status,\n error = excluded.error,\n trailers = excluded.trailers,\n url = excluded.url\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 10
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "66deed028199c78ed15ea2f837907887c2a2cb564d1d076dd4ebf0ecbc82e098"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM workspaces\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "84be2b954870ab181738656ecd4d03fca2ff21012947014c79626abfce8e999b"
|
||||||
|
}
|
||||||
Generated
+74
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, created_at, updated_at, name, description, setting_request_timeout,\n setting_follow_redirects, setting_validate_certificates,\n variables AS \"variables!: sqlx::types::Json<Vec<EnvironmentVariable>>\"\n FROM workspaces\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_request_timeout",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_follow_redirects",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_validate_certificates",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variables!: sqlx::types::Json<Vec<EnvironmentVariable>>",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "8dfbae65ddec905ea3734448cc9f7029b6c78de227c6fa3a85d75d0a7f21e0e9"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO folders (\n id, workspace_id, folder_id, name, sort_priority\n )\n VALUES (?, ?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n folder_id = excluded.folder_id,\n sort_priority = excluded.sort_priority\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 5
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "9238f94c688d91f42627e5b73c627c514bab4039ab5edadc79b77dfdfd63b208"
|
||||||
|
}
|
||||||
Generated
+80
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, connection_id, created_at, content, status, error,\n event_type AS \"event_type!: GrpcEventType\",\n metadata AS \"metadata!: sqlx::types::Json<HashMap<String, String>>\"\n FROM grpc_events\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connection_id",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "event_type!: GrpcEventType",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "metadata!: sqlx::types::Json<HashMap<String, String>>",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "92d8f003a8f7df692345f2d2fd2504c9222645976e3433e32e190f4ee4bf100d"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM folders\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "93aea3881dffb70a82325263740a0bb6477e78f27991ce7456b394e84383acb6"
|
||||||
|
}
|
||||||
Generated
+74
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, created_at, updated_at, name, description, setting_request_timeout,\n setting_follow_redirects, setting_validate_certificates,\n variables AS \"variables!: sqlx::types::Json<Vec<EnvironmentVariable>>\"\n FROM workspaces WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_request_timeout",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_follow_redirects",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "setting_validate_certificates",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variables!: sqlx::types::Json<Vec<EnvironmentVariable>>",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "9ba3f783238b77637ffded4171b2fbb5e5ad0be952a0d832448d65cc5f0effc1"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE grpc_connections\n SET (elapsed) = (-1)\n WHERE elapsed = 0;\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "a690a04cd1ebe8c3dbfd0cd98ae4ef093a1696d7b7ecaf694d12e5fafd62b685"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE http_responses\n SET (elapsed, status_reason) = (-1, 'Cancelled')\n WHERE elapsed = 0;\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "ac1b4ffbd98b67f0a1a74e3525387d679dd6f44c561d55c7bbea747053e53671"
|
||||||
|
}
|
||||||
Generated
+116
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, updated_at, created_at, url, status,\n status_reason, content_length, body_path, elapsed, elapsed_headers, error,\n version, remote_addr,\n headers AS \"headers!: sqlx::types::Json<Vec<HttpResponseHeader>>\"\n FROM http_responses\n WHERE request_id = ?\n ORDER BY created_at DESC\n LIMIT ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status_reason",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content_length",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body_path",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed_headers",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "version",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "remote_addr",
|
||||||
|
"ordinal": 15,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "headers!: sqlx::types::Json<Vec<HttpResponseHeader>>",
|
||||||
|
"ordinal": 16,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "ac38621cd947c3be9ca0d8ea73325fe35c3866d16f6482fc32c23762f112dc83"
|
||||||
|
}
|
||||||
Generated
+62
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, created_at, updated_at, folder_id, name, sort_priority\n FROM folders\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Float"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "ae98a7b35a5cb80a4bcd04faa22545deac2a5e9bfb814b60191f16b98ed49796"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM environments\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "aeb0712785a9964d516dc8939bc54aa8206ad852e608b362d014b67a0f21b0ed"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO cookie_jars (\n id, workspace_id, name, cookies\n )\n VALUES (?, ?, ?, ?)\n ON CONFLICT (id) DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n name = excluded.name,\n cookies = excluded.cookies\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "b3fae40a793a6724dd2286a9ca4bc0a9c000a631ee0d751a9dc4f3e76de3d57c"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM cookie_jars\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "b98609f65dd3a6bbd1ea8dc8bed2840a6d5d13fec1bbc0aa61ca4f60de98a09c"
|
||||||
|
}
|
||||||
Generated
+56
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT id, workspace_id, model, created_at, updated_at, name,\n variables AS \"variables!: sqlx::types::Json<Vec<EnvironmentVariable>>\"\n FROM environments\n WHERE workspace_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variables!: sqlx::types::Json<Vec<EnvironmentVariable>>",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "ba2b34a77723f24f86e4c3c45274dbfec6ca130e16e592f948844c037bdc0593"
|
||||||
|
}
|
||||||
Generated
+92
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, created_at, updated_at, theme, appearance,\n theme_dark, theme_light, update_channel,\n interface_font_size, interface_scale, editor_font_size, editor_soft_wrap\n FROM settings\n WHERE id = 'default'\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "appearance",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme_dark",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme_light",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "update_channel",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "interface_font_size",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "interface_scale",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "editor_font_size",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "editor_soft_wrap",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "ca3485d87b060cd77c4114d2af544adf18f6f15341d9d5db40865e92a80da4e2"
|
||||||
|
}
|
||||||
Generated
+92
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, created_at, updated_at, service,\n method, elapsed, status, error, url,\n trailers AS \"trailers!: sqlx::types::Json<HashMap<String, String>>\"\n FROM grpc_connections\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "service",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "trailers!: sqlx::types::Json<HashMap<String, String>>",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "d4b64c466624eb75e0f5bd201ebfb6a73d25eb7c9e09cb9690afdb7fef5fca8b"
|
||||||
|
}
|
||||||
Generated
+116
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, request_id, updated_at, created_at, url, status,\n status_reason, content_length, body_path, elapsed, elapsed_headers, error,\n version, remote_addr,\n headers AS \"headers!: sqlx::types::Json<Vec<HttpResponseHeader>>\"\n FROM http_responses\n WHERE workspace_id = ?\n ORDER BY created_at DESC\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "request_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status_reason",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content_length",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body_path",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elapsed_headers",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "version",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "remote_addr",
|
||||||
|
"ordinal": 15,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "headers!: sqlx::types::Json<Vec<HttpResponseHeader>>",
|
||||||
|
"ordinal": 16,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "d5e087caa163a0c7bfbbadf07eccb80105501cf5baab706aa6792dfe90af8fc9"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO key_values (namespace, key, value)\n VALUES (?, ?, ?) ON CONFLICT DO UPDATE SET\n updated_at = CURRENT_TIMESTAMP,\n value = excluded.value\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "d80c09497771e3641022e73ec6c6a87e73a551f88a948a5445d754922b82b50b"
|
||||||
|
}
|
||||||
Generated
+104
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, folder_id, created_at, updated_at, name, sort_priority,\n url, service, method, message, authentication_type,\n authentication AS \"authentication!: Json<HashMap<String, JsonValue>>\",\n metadata AS \"metadata!: sqlx::types::Json<Vec<GrpcMetadataEntry>>\"\n FROM grpc_requests\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Float"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "service",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication_type",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "metadata!: sqlx::types::Json<Vec<GrpcMetadataEntry>>",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "e1cdba43bd938772631263966a9bee263923c387f4864917f36a04043bec4857"
|
||||||
|
}
|
||||||
Generated
+110
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, workspace_id, folder_id, created_at, updated_at, name, url,\n url_parameters AS \"url_parameters!: sqlx::types::Json<Vec<HttpUrlParameter>>\",\n method, body_type, authentication_type, sort_priority,\n body AS \"body!: Json<HashMap<String, JsonValue>>\",\n authentication AS \"authentication!: Json<HashMap<String, JsonValue>>\",\n headers AS \"headers!: sqlx::types::Json<Vec<HttpRequestHeader>>\"\n FROM http_requests\n WHERE workspace_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "folder_id",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "url_parameters!: sqlx::types::Json<Vec<HttpUrlParameter>>",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "method",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body_type",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication_type",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort_priority",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Float"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authentication!: Json<HashMap<String, JsonValue>>",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "headers!: sqlx::types::Json<Vec<HttpRequestHeader>>",
|
||||||
|
"ordinal": 15,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "e61c0dddb3e86d271cb9399faa4e4443342796cb72bdd43a821fae2994ae8e2f"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE http_responses SET (\n elapsed, elapsed_headers, url, status, status_reason, content_length, body_path,\n error, headers, version, remote_addr, updated_at\n ) = (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP) WHERE id = ?;\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 12
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "e7124f5570076bfd65985744f48d8e12cf29d6d243fffdd62ade2ab70c7bddda"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE settings SET (\n theme, appearance, theme_dark, theme_light, update_channel,\n interface_font_size, interface_scale, editor_font_size, editor_soft_wrap\n ) = (?, ?, ?, ?, ?, ?, ?, ?, ?) WHERE id = 'default';\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 9
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "efd8ba41ea909b18dd520c57c1d464c5ae057b720cbbedcaec1513d43535632c"
|
||||||
|
}
|
||||||
Generated
+56
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT\n id, model, created_at, updated_at, workspace_id, name,\n cookies AS \"cookies!: sqlx::types::Json<Vec<JsonValue>>\"\n FROM cookie_jars WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updated_at",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace_id",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cookies!: sqlx::types::Json<Vec<JsonValue>>",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "f5f20f3b37d932617499a0da50997edad59e4f5998b15c50ed6eae2e97064068"
|
||||||
|
}
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n DELETE FROM grpc_requests\n WHERE id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "fe0652396bc30d926cf99083651c1cbd668bcf00ebe1a5f36616700c84972b39"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user